qcacld-3.0: Fail SR commands in concurrency
Fail all the Spatial Reuse commands if SR in concurrency is not supported. Change-Id: Ifcee0cfb6f52bcde5bcb4193f4f8bb336ba6b191 CRs-Fixed: 3338582
This commit is contained in:

committed by
Madan Koyyalamudi

parent
b9a928a6c5
commit
f5b2eeb7f6
@@ -120,11 +120,11 @@ void ucfg_spatial_reuse_send_sr_prohibit(struct wlan_objmgr_vdev *vdev,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* ucfg_spatial_reuse_setup_req() - To enable/disable SR (Spatial Reuse)
|
* 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
|
||||||
* srg_pd_threshold: SRG pd threshold
|
* @srg_pd_threshold: SRG pd threshold
|
||||||
* non_srg_pd_threshold: NON SRG pd threshold
|
* @non_srg_pd_threshold: NON SRG pd threshold
|
||||||
*
|
*
|
||||||
* Return: Success/Failure
|
* Return: Success/Failure
|
||||||
*/
|
*/
|
||||||
@@ -134,6 +134,16 @@ ucfg_spatial_reuse_setup_req(struct wlan_objmgr_vdev *vdev,
|
|||||||
bool is_sr_enable, int32_t srg_pd_threshold,
|
bool is_sr_enable, int32_t srg_pd_threshold,
|
||||||
int32_t non_srg_pd_threshold);
|
int32_t non_srg_pd_threshold);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_spatial_reuse_operation_allowed() - Checks whether SR is allowed or not
|
||||||
|
* @psoc: Object manager psoc
|
||||||
|
* @vdev: object manager vdev
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS when SR is allowed else Failure
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
ucfg_spatial_reuse_operation_allowed(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct wlan_objmgr_vdev *vdev);
|
||||||
#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,
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
#include <qdf_trace.h>
|
#include <qdf_trace.h>
|
||||||
#include <spatial_reuse_ucfg_api.h>
|
#include <spatial_reuse_ucfg_api.h>
|
||||||
#include <spatial_reuse_api.h>
|
#include <spatial_reuse_api.h>
|
||||||
|
#include <wlan_policy_mgr_api.h>
|
||||||
|
|
||||||
void ucfg_spatial_reuse_register_cb(struct wlan_objmgr_psoc *psoc,
|
void ucfg_spatial_reuse_register_cb(struct wlan_objmgr_psoc *psoc,
|
||||||
sr_osif_event_cb cb)
|
sr_osif_event_cb cb)
|
||||||
@@ -122,3 +123,26 @@ ucfg_spatial_reuse_setup_req(struct wlan_objmgr_vdev *vdev,
|
|||||||
return wlan_sr_setup_req(vdev, pdev, is_sr_enable,
|
return wlan_sr_setup_req(vdev, pdev, is_sr_enable,
|
||||||
srg_pd_threshold, non_srg_pd_threshold);
|
srg_pd_threshold, non_srg_pd_threshold);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS ucfg_spatial_reuse_operation_allowed(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct wlan_objmgr_vdev *vdev)
|
||||||
|
{
|
||||||
|
uint32_t conc_vdev_id;
|
||||||
|
uint8_t vdev_id, mac_id;
|
||||||
|
QDF_STATUS status;
|
||||||
|
|
||||||
|
if (!vdev || !psoc)
|
||||||
|
return QDF_STATUS_E_NULL_VALUE;
|
||||||
|
|
||||||
|
vdev_id = wlan_vdev_get_id(vdev);
|
||||||
|
status = policy_mgr_get_mac_id_by_session_id(psoc, vdev_id, &mac_id);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
|
return status;
|
||||||
|
conc_vdev_id = policy_mgr_get_conc_vdev_on_same_mac(psoc, vdev_id,
|
||||||
|
mac_id);
|
||||||
|
if (conc_vdev_id != WLAN_INVALID_VDEV_ID &&
|
||||||
|
!policy_mgr_sr_same_mac_conc_enabled(psoc))
|
||||||
|
return QDF_STATUS_E_NOSUPPORT;
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
@@ -702,6 +702,12 @@ static int __wlan_hdd_cfg80211_sr_operations(struct wiphy *wiphy,
|
|||||||
hdd_err("11AX is not supported");
|
hdd_err("11AX is not supported");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
status = ucfg_spatial_reuse_operation_allowed(hdd_ctx->psoc,
|
||||||
|
adapter->vdev);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
|
hdd_err("SR operations not allowed status: %u", status);
|
||||||
|
return qdf_status_to_os_return(status);
|
||||||
|
}
|
||||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_SR_MAX, data,
|
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_SR_MAX, data,
|
||||||
data_len, wlan_hdd_sr_policy)) {
|
data_len, wlan_hdd_sr_policy)) {
|
||||||
hdd_err("invalid attr");
|
hdd_err("invalid attr");
|
||||||
|
Reference in New Issue
Block a user