qcacld-3.0: Handle VENDOR_SUBCMD_SR and operation

Add support to parse VENDOR_SUBCMD_SR and to parse
nested attributes OPERATION and PARAMS and to handle
ENABLE operation, Disable operation and prohibit
operation. Enable opeartion may have PD threshold
or in case vendor command doesn't provide PD threshold
host will send PD threshold advertised by AP.

Change-Id: Ie98a1b8681f41f3a63523ac40b5cfb688a7b0cb0
CRs-Fixed: 3299042
This commit is contained in:
Sheenam Monga
2022-09-23 03:41:33 -07:00
committed by Madan Koyyalamudi
parent e29354e1a1
commit c4c40f5217
7 changed files with 359 additions and 7 deletions

View File

@@ -17,7 +17,6 @@
/**
* DOC : contains interface prototypes for spatial_reuse api
*/
#include <spatial_reuse_api.h>
QDF_STATUS wlan_spatial_reuse_config_set(struct wlan_objmgr_vdev *vdev,
@@ -40,3 +39,41 @@ QDF_STATUS wlan_spatial_reuse_config_set(struct wlan_objmgr_vdev *vdev,
return QDF_STATUS_E_NULL_VALUE;
}
QDF_STATUS wlan_spatial_reuse_he_siga_val15_allowed_set(
struct wlan_objmgr_vdev *vdev,
bool he_siga_va15_allowed)
{
struct wlan_lmac_if_tx_ops *tx_ops;
struct wlan_objmgr_psoc *psoc = wlan_vdev_get_psoc(vdev);
if (!psoc)
return QDF_STATUS_E_NULL_VALUE;
tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
if (!tx_ops)
return QDF_STATUS_E_NULL_VALUE;
if (tx_ops->spatial_reuse_tx_ops.send_sr_prohibit_cfg)
return tx_ops->spatial_reuse_tx_ops.send_sr_prohibit_cfg(
vdev,
he_siga_va15_allowed);
return QDF_STATUS_E_NULL_VALUE;
}
QDF_STATUS
wlan_sr_setup_req(struct wlan_objmgr_vdev *vdev, struct wlan_objmgr_pdev *pdev,
bool is_sr_enable, int32_t pd_threshold) {
struct wlan_lmac_if_tx_ops *tx_ops;
QDF_STATUS status = QDF_STATUS_E_FAILURE;
tx_ops = wlan_psoc_get_lmac_if_txops(wlan_pdev_get_psoc(pdev));
if (tx_ops &&
tx_ops->spatial_reuse_tx_ops.target_if_set_sr_enable_disable) {
status =
tx_ops->spatial_reuse_tx_ops.target_if_set_sr_enable_disable(
vdev, pdev, is_sr_enable, pd_threshold);
return status;
}
return status;
}

View File

@@ -17,7 +17,6 @@
/**
* DOC : contains interface prototypes for OS_IF layer
*/
#include <qdf_trace.h>
#include <spatial_reuse_ucfg_api.h>
#include <spatial_reuse_api.h>
@@ -60,3 +59,27 @@ void ucfg_spatial_reuse_send_sr_config(struct wlan_objmgr_vdev *vdev,
wlan_vdev_mlme_set_he_spr_enabled(vdev, false);
}
}
void ucfg_spatial_reuse_set_sr_enable(struct wlan_objmgr_vdev *vdev,
bool enable)
{
wlan_vdev_mlme_set_he_spr_enabled(vdev, enable);
}
void ucfg_spatial_reuse_send_sr_prohibit(struct wlan_objmgr_vdev *vdev,
bool enable_he_siga_val15_prohibit)
{
bool sr_enabled = wlan_vdev_mlme_get_he_spr_enabled(vdev);
if (sr_enabled)
wlan_spatial_reuse_he_siga_val15_allowed_set(
vdev, enable_he_siga_val15_prohibit);
}
QDF_STATUS
ucfg_spatial_reuse_setup_req(struct wlan_objmgr_vdev *vdev,
struct wlan_objmgr_pdev *pdev,
bool is_sr_enable, int32_t pd_threshold)
{
return wlan_sr_setup_req(vdev, pdev, is_sr_enable, pd_threshold);
}