qcacld-3.0: Handle SRG and NON-SRG pd threshold
Currently, only single pd_threshold is fetched and treated as SRG and NON-SRG pd threshold instead of handling both threshold separately. Fix is to get SRG and NON-SRG pd threshold from userspace instead of single pd threshold Change-Id: I2a131ea9040c799bc12a17a9ce42be02da8a717b CRs-Fixed: 3328189
This commit is contained in:

committed by
Madan Koyyalamudi

parent
1b32411a89
commit
45372b860a
@@ -127,16 +127,16 @@ QDF_STATUS wlan_spatial_reuse_he_siga_val15_allowed_set(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* wlan_sr_setup_req() - Enable SR with provided pd threshold
|
* wlan_sr_setup_req() - Enable SR with provided pd threshold
|
||||||
*
|
|
||||||
* @vdev: objmgr vdev
|
* @vdev: objmgr vdev
|
||||||
* @pdev: objmgr pdev
|
* @pdev: objmgr pdev
|
||||||
* @is_sr_enable: sr enable/disable
|
* @is_sr_enable: sr enable/disable
|
||||||
* @pd_threshold: pd threshold
|
* @srg_pd_threshold: SRG pd threshold
|
||||||
|
* @non_srg_pd_threshold: NON SRG PD threshold
|
||||||
*
|
*
|
||||||
* Return: QDF_STATUS
|
* Return: QDF_STATUS
|
||||||
*/
|
*/
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
wlan_sr_setup_req(struct wlan_objmgr_vdev *vdev,
|
wlan_sr_setup_req(struct wlan_objmgr_vdev *vdev,
|
||||||
struct wlan_objmgr_pdev *pdev, bool is_sr_enable,
|
struct wlan_objmgr_pdev *pdev, bool is_sr_enable,
|
||||||
int32_t pd_threshold);
|
int32_t srg_pd_threshold, int32_t non_srg_pd_threshold);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -119,19 +119,21 @@ void ucfg_spatial_reuse_send_sr_prohibit(struct wlan_objmgr_vdev *vdev,
|
|||||||
bool enable_he_siga_val15_prohibit);
|
bool enable_he_siga_val15_prohibit);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ucfg_spatial_reuse_setup_req() - To enable/disable SR
|
* ucfg_spatial_reuse_setup_req() - To enable/disable SR (Spatial Reuse)
|
||||||
*
|
|
||||||
* vdev: object manager vdev
|
* vdev: object manager vdev
|
||||||
* pdev: object manager pdev
|
* pdev: object manager pdev
|
||||||
* is_sr_enable: sr enable/disable
|
* is_sr_enable: SR enable/disable
|
||||||
* pd_threshold: pd threshold
|
* srg_pd_threshold: SRG pd threshold
|
||||||
|
* non_srg_pd_threshold: NON SRG pd threshold
|
||||||
*
|
*
|
||||||
* Return: Success/Failure
|
* Return: Success/Failure
|
||||||
*/
|
*/
|
||||||
QDF_STATUS ucfg_spatial_reuse_setup_req(struct wlan_objmgr_vdev *vdev,
|
QDF_STATUS
|
||||||
struct wlan_objmgr_pdev *pdev,
|
ucfg_spatial_reuse_setup_req(struct wlan_objmgr_vdev *vdev,
|
||||||
bool is_sr_enable,
|
struct wlan_objmgr_pdev *pdev,
|
||||||
int32_t pd_threshold);
|
bool is_sr_enable, int32_t srg_pd_threshold,
|
||||||
|
int32_t non_srg_pd_threshold);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
static inline
|
static inline
|
||||||
void ucfg_spatial_reuse_register_cb(struct wlan_objmgr_psoc *psoc,
|
void ucfg_spatial_reuse_register_cb(struct wlan_objmgr_psoc *psoc,
|
||||||
|
@@ -68,7 +68,8 @@ QDF_STATUS wlan_spatial_reuse_he_siga_val15_allowed_set(
|
|||||||
|
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
wlan_sr_setup_req(struct wlan_objmgr_vdev *vdev, struct wlan_objmgr_pdev *pdev,
|
wlan_sr_setup_req(struct wlan_objmgr_vdev *vdev, struct wlan_objmgr_pdev *pdev,
|
||||||
bool is_sr_enable, int32_t pd_threshold) {
|
bool is_sr_enable, int32_t srg_pd_threshold,
|
||||||
|
int32_t non_srg_pd_threshold) {
|
||||||
struct wlan_lmac_if_tx_ops *tx_ops;
|
struct wlan_lmac_if_tx_ops *tx_ops;
|
||||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||||
|
|
||||||
@@ -77,7 +78,8 @@ wlan_sr_setup_req(struct wlan_objmgr_vdev *vdev, struct wlan_objmgr_pdev *pdev,
|
|||||||
tx_ops->spatial_reuse_tx_ops.target_if_set_sr_enable_disable) {
|
tx_ops->spatial_reuse_tx_ops.target_if_set_sr_enable_disable) {
|
||||||
status =
|
status =
|
||||||
tx_ops->spatial_reuse_tx_ops.target_if_set_sr_enable_disable(
|
tx_ops->spatial_reuse_tx_ops.target_if_set_sr_enable_disable(
|
||||||
vdev, pdev, is_sr_enable, pd_threshold);
|
vdev, pdev, is_sr_enable,
|
||||||
|
srg_pd_threshold, non_srg_pd_threshold);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
|
@@ -115,7 +115,9 @@ void ucfg_spatial_reuse_send_sr_prohibit(struct wlan_objmgr_vdev *vdev,
|
|||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
ucfg_spatial_reuse_setup_req(struct wlan_objmgr_vdev *vdev,
|
ucfg_spatial_reuse_setup_req(struct wlan_objmgr_vdev *vdev,
|
||||||
struct wlan_objmgr_pdev *pdev,
|
struct wlan_objmgr_pdev *pdev,
|
||||||
bool is_sr_enable, int32_t pd_threshold)
|
bool is_sr_enable, int32_t srg_pd_threshold,
|
||||||
|
int32_t non_srg_pd_threshold)
|
||||||
{
|
{
|
||||||
return wlan_sr_setup_req(vdev, pdev, is_sr_enable, pd_threshold);
|
return wlan_sr_setup_req(vdev, pdev, is_sr_enable,
|
||||||
|
srg_pd_threshold, non_srg_pd_threshold);
|
||||||
}
|
}
|
||||||
|
@@ -588,7 +588,8 @@ static int __wlan_hdd_cfg80211_sr_operations(struct wiphy *wiphy,
|
|||||||
QDF_STATUS status;
|
QDF_STATUS status;
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
bool is_sr_enable = false;
|
bool is_sr_enable = false;
|
||||||
int32_t pd_threshold = 0;
|
int32_t srg_pd_threshold = 0;
|
||||||
|
int32_t non_srg_pd_threshold = 0;
|
||||||
uint8_t sr_he_siga_val15_allowed = true;
|
uint8_t sr_he_siga_val15_allowed = true;
|
||||||
uint8_t pdev_id, mac_id, sr_ctrl, non_srg_max_pd_offset;
|
uint8_t pdev_id, mac_id, sr_ctrl, non_srg_max_pd_offset;
|
||||||
uint8_t srg_min_pd_offset = 0, srg_max_pd_offset = 0;
|
uint8_t srg_min_pd_offset = 0, srg_max_pd_offset = 0;
|
||||||
@@ -690,18 +691,25 @@ static int __wlan_hdd_cfg80211_sr_operations(struct wiphy *wiphy,
|
|||||||
*/
|
*/
|
||||||
if (is_sr_enable &&
|
if (is_sr_enable &&
|
||||||
tb2[QCA_WLAN_VENDOR_ATTR_SR_PARAMS_SRG_PD_THRESHOLD]) {
|
tb2[QCA_WLAN_VENDOR_ATTR_SR_PARAMS_SRG_PD_THRESHOLD]) {
|
||||||
pd_threshold =
|
srg_pd_threshold =
|
||||||
nla_get_s32(
|
nla_get_s32(
|
||||||
tb2[QCA_WLAN_VENDOR_ATTR_SR_PARAMS_SRG_PD_THRESHOLD]);
|
tb2[QCA_WLAN_VENDOR_ATTR_SR_PARAMS_SRG_PD_THRESHOLD]);
|
||||||
}
|
}
|
||||||
hdd_debug("setting sr enable %d with pd threshold %d",
|
|
||||||
is_sr_enable, pd_threshold);
|
if (is_sr_enable &&
|
||||||
|
tb2[QCA_WLAN_VENDOR_ATTR_SR_PARAMS_NON_SRG_PD_THRESHOLD]) {
|
||||||
|
non_srg_pd_threshold =
|
||||||
|
nla_get_s32(
|
||||||
|
tb2[QCA_WLAN_VENDOR_ATTR_SR_PARAMS_NON_SRG_PD_THRESHOLD]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
hdd_debug("setting sr enable %d with pd threshold srg: %d non srg: %d",
|
||||||
|
is_sr_enable, srg_pd_threshold, non_srg_pd_threshold);
|
||||||
/* Set the variables */
|
/* Set the variables */
|
||||||
ucfg_spatial_reuse_set_sr_enable(adapter->vdev, is_sr_enable);
|
ucfg_spatial_reuse_set_sr_enable(adapter->vdev, is_sr_enable);
|
||||||
status = ucfg_spatial_reuse_setup_req(adapter->vdev,
|
status = ucfg_spatial_reuse_setup_req(
|
||||||
hdd_ctx->pdev,
|
adapter->vdev, hdd_ctx->pdev, is_sr_enable,
|
||||||
is_sr_enable,
|
srg_pd_threshold, non_srg_pd_threshold);
|
||||||
pd_threshold);
|
|
||||||
if (status != QDF_STATUS_SUCCESS) {
|
if (status != QDF_STATUS_SUCCESS) {
|
||||||
hdd_err("failed to enable Spatial Reuse feature");
|
hdd_err("failed to enable Spatial Reuse feature");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@@ -696,7 +696,7 @@ static void wma_sr_handle_conc(tp_wma_handle wma,
|
|||||||
if ((!(sr_ctrl & NON_SRG_PD_SR_DISALLOWED) &&
|
if ((!(sr_ctrl & NON_SRG_PD_SR_DISALLOWED) &&
|
||||||
(sr_ctrl & NON_SRG_OFFSET_PRESENT)) ||
|
(sr_ctrl & NON_SRG_OFFSET_PRESENT)) ||
|
||||||
(sr_ctrl & SRG_INFO_PRESENT)) {
|
(sr_ctrl & SRG_INFO_PRESENT)) {
|
||||||
wlan_mlme_update_sr_data(conc_vdev, &val, 0, true);
|
wlan_mlme_update_sr_data(conc_vdev, &val, 0, 0, true);
|
||||||
wma_sr_send_pd_threshold(wma, conc_vdev_id, val);
|
wma_sr_send_pd_threshold(wma, conc_vdev_id, val);
|
||||||
wlan_spatial_reuse_osif_event(conc_vdev,
|
wlan_spatial_reuse_osif_event(conc_vdev,
|
||||||
SR_OPERATION_RESUME,
|
SR_OPERATION_RESUME,
|
||||||
@@ -758,7 +758,7 @@ QDF_STATUS wma_sr_update(tp_wma_handle wma, uint8_t vdev_id, bool enable)
|
|||||||
(sr_ctrl & NON_SRG_OFFSET_PRESENT)) ||
|
(sr_ctrl & NON_SRG_OFFSET_PRESENT)) ||
|
||||||
(sr_ctrl & SRG_INFO_PRESENT)) {
|
(sr_ctrl & SRG_INFO_PRESENT)) {
|
||||||
if (enable) {
|
if (enable) {
|
||||||
wlan_mlme_update_sr_data(vdev, &val, 0, true);
|
wlan_mlme_update_sr_data(vdev, &val, 0, 0, true);
|
||||||
} else {
|
} else {
|
||||||
/* VDEV down, disable SR */
|
/* VDEV down, disable SR */
|
||||||
wlan_vdev_mlme_set_sr_ctrl(vdev, 0);
|
wlan_vdev_mlme_set_sr_ctrl(vdev, 0);
|
||||||
|
Reference in New Issue
Block a user