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:

committed by
Madan Koyyalamudi

parent
e29354e1a1
commit
c4c40f5217
@@ -37,4 +37,30 @@ QDF_STATUS wlan_spatial_reuse_config_set(struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t sr_ctrl,
|
||||
uint8_t non_srg_max_pd_offset);
|
||||
|
||||
/**
|
||||
* wlan_spatial_reuse_he_siga_val15_allowed_set() - Set spatial reuse config
|
||||
* he_siga_val15_allowed
|
||||
* @vdev: objmgr manager vdev
|
||||
* @he_siga_va15_allowed: enable/disable he_siga_val15_allowed
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS wlan_spatial_reuse_he_siga_val15_allowed_set(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
bool he_siga_va15_allowed);
|
||||
|
||||
/**
|
||||
* wlan_sr_setup_req() - Enable SR with provided pd threshold
|
||||
*
|
||||
* @vdev: objmgr vdev
|
||||
* @pdev: objmgr pdev
|
||||
* @is_sr_enable: sr enable/disable
|
||||
* @pd_threshold: pd threshold
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
wlan_sr_setup_req(struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_objmgr_pdev *pdev, bool is_sr_enable,
|
||||
int32_t pd_threshold);
|
||||
#endif
|
||||
|
@@ -20,9 +20,9 @@
|
||||
#ifndef _SPATIAL_REUSE_UCFG_API_H_
|
||||
#define _SPATIAL_REUSE_UCFG_API_H_
|
||||
|
||||
#ifdef WLAN_FEATURE_SR
|
||||
#include <qdf_trace.h>
|
||||
#include <wlan_objmgr_vdev_obj.h>
|
||||
|
||||
/**
|
||||
* ucfg_spatial_reuse_get_sr_config() - Spatial reuse config get
|
||||
*
|
||||
@@ -60,5 +60,43 @@ void ucfg_spatial_reuse_set_sr_config(struct wlan_objmgr_vdev *vdev,
|
||||
*/
|
||||
void ucfg_spatial_reuse_send_sr_config(struct wlan_objmgr_vdev *vdev,
|
||||
bool enable);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ucfg_spatial_reuse_set_sr_enable() - set enable/disable Spatial reuse
|
||||
*
|
||||
* @vdev: object manager vdev
|
||||
* @enable: spatial reuse to be enabled or not
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void ucfg_spatial_reuse_set_sr_enable(struct wlan_objmgr_vdev *vdev,
|
||||
bool enable);
|
||||
|
||||
/**
|
||||
* ucfg_spatial_reuse_send_sr_prohibit() - Send spatial reuse config to enable
|
||||
* or disbale he_siga_val15_allowed
|
||||
*
|
||||
* @vdev: object manager vdev
|
||||
* @enable_he_siga_val15_prohibit: enable/disable he_siga_val15_allowed
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void ucfg_spatial_reuse_send_sr_prohibit(struct wlan_objmgr_vdev *vdev,
|
||||
bool enable_he_siga_val15_prohibit);
|
||||
|
||||
/**
|
||||
* ucfg_spatial_reuse_setup_req() - To enable/disable SR
|
||||
*
|
||||
* vdev: object manager vdev
|
||||
* pdev: object manager pdev
|
||||
* is_sr_enable: sr enable/disable
|
||||
* pd_threshold: pd thresold
|
||||
*
|
||||
* Return: Success/Failure
|
||||
*/
|
||||
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);
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user