qcacmn: Configure STA with default non-SRG SR parameters
Currently, STA cannot perform SR when SAP does not include SR IE in Beacon/Probe response/Assoc response. This change is done to configure default non-SRG OBSS PD parameters in FW in this case. Change-Id: I8effbc31631267bd96a269e0bffff74139dafaf1 CRs-Fixed: 3607399
This commit is contained in:
committed by
Rahul Choudhary
parent
4d62f37743
commit
48f4d53901
@@ -189,7 +189,6 @@ spatial_reuse_set_sr_enable_disable(struct wlan_objmgr_vdev *vdev,
|
||||
int32_t non_srg_pd_threshold)
|
||||
{
|
||||
uint32_t val = 0;
|
||||
uint8_t sr_ctrl;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
||||
@@ -197,10 +196,6 @@ spatial_reuse_set_sr_enable_disable(struct wlan_objmgr_vdev *vdev,
|
||||
if (!psoc)
|
||||
return QDF_STATUS_E_NOENT;
|
||||
|
||||
sr_ctrl = wlan_vdev_mlme_get_sr_ctrl(vdev);
|
||||
if ((!(sr_ctrl & NON_SRG_PD_SR_DISALLOWED) &&
|
||||
(sr_ctrl & NON_SRG_OFFSET_PRESENT)) ||
|
||||
(sr_ctrl & SRG_INFO_PRESENT)) {
|
||||
if (is_sr_enable) {
|
||||
wlan_mlme_update_sr_data(vdev, &val, srg_pd_threshold,
|
||||
non_srg_pd_threshold,
|
||||
@@ -217,23 +212,18 @@ spatial_reuse_set_sr_enable_disable(struct wlan_objmgr_vdev *vdev,
|
||||
mlme_debug("srp param val: %u, enable: %d",
|
||||
val, is_sr_enable);
|
||||
if (is_sr_enable) {
|
||||
status = spatial_reuse_send_bss_color_bit_map(vdev,
|
||||
pdev);
|
||||
status = spatial_reuse_send_bss_color_bit_map(vdev, pdev);
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
return status;
|
||||
status = spatial_reuse_send_partial_bssid_bit_map(vdev,
|
||||
pdev);
|
||||
status = spatial_reuse_send_partial_bssid_bit_map(vdev, pdev);
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
return status;
|
||||
}
|
||||
status =
|
||||
spatial_reuse_send_pd_threshold(pdev, vdev->vdev_objmgr.vdev_id,
|
||||
status = spatial_reuse_send_pd_threshold(pdev,
|
||||
vdev->vdev_objmgr.vdev_id,
|
||||
val);
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
return status;
|
||||
} else {
|
||||
mlme_debug("Spatial reuse not enabled");
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -36,11 +36,13 @@
|
||||
#define NON_SRG_MAX_PD_OFFSET_POS 0
|
||||
#define NON_SRG_MAX_PD_OFFSET_SIZE 8
|
||||
#define SR_PD_THRESHOLD_MIN -82
|
||||
#define SR_PD_THRESHOLD_MAX -62
|
||||
#define SRG_SPR_ENABLE_POS 30
|
||||
#define SRG_THRESHOLD_MAX_PD_POS 8
|
||||
#define NON_SRG_PD_SR_DISALLOWED 0x02
|
||||
#define HE_SIG_VAL_15_ALLOWED 0x10
|
||||
#define NON_SRG_OFFSET_PRESENT 0x04
|
||||
#define NON_SRG_MAX_PD_OFFSET 20
|
||||
#define SRG_INFO_PRESENT 0x08
|
||||
#define NON_SRG_SPR_ENABLE_POS 31
|
||||
#define NON_SRG_SPR_ENABLE 0x80
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2019, 2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -416,20 +416,29 @@ wlan_mlme_update_sr_data(struct wlan_objmgr_vdev *vdev, int *val,
|
||||
uint8_t sr_ctrl;
|
||||
|
||||
sr_ctrl = wlan_vdev_mlme_get_sr_ctrl(vdev);
|
||||
if (!(sr_ctrl & NON_SRG_PD_SR_DISALLOWED) &&
|
||||
(sr_ctrl & NON_SRG_OFFSET_PRESENT)) {
|
||||
if (!(sr_ctrl & NON_SRG_PD_SR_DISALLOWED)) {
|
||||
/*
|
||||
* Configure default non_srg_pd_threshold value for non-srg
|
||||
* when AP, doesn't send SRPS IE or non-srg offset value is
|
||||
* not present in SRPS IE.
|
||||
*/
|
||||
if (!sr_ctrl || !(sr_ctrl & NON_SRG_OFFSET_PRESENT))
|
||||
ap_non_srg_pd_threshold = SR_PD_THRESHOLD_MAX;
|
||||
else if (sr_ctrl & NON_SRG_OFFSET_PRESENT)
|
||||
ap_non_srg_pd_threshold =
|
||||
wlan_vdev_mlme_get_non_srg_pd_offset(vdev) +
|
||||
SR_PD_THRESHOLD_MIN;
|
||||
|
||||
/*
|
||||
* Update non_srg_pd_threshold with provide
|
||||
* Update non_srg_pd_threshold with provided
|
||||
* non_srg_pd_threshold for non-srg, if pd threshold is
|
||||
* with in the range else keep the same as
|
||||
* advertised by AP.
|
||||
* within the range else keep the same as advertised by AP.
|
||||
*/
|
||||
if (!non_srg_pd_threshold ||
|
||||
(non_srg_pd_threshold > ap_non_srg_pd_threshold))
|
||||
non_srg_pd_threshold = ap_non_srg_pd_threshold;
|
||||
else if (non_srg_pd_threshold < SR_PD_THRESHOLD_MIN)
|
||||
non_srg_pd_threshold = SR_PD_THRESHOLD_MIN;
|
||||
|
||||
/* 31st BIT - Enable/Disable Non-SRG based spatial reuse. */
|
||||
*val |= is_sr_enable << NON_SRG_SPR_ENABLE_POS;
|
||||
|
||||
Reference in New Issue
Block a user