qcacld-3.0: Spatial Reuse enhancement for SAP
Add below two enhancements for SAP 1. Spatial Reuse enabled in single MAC concurrency 2. Set bit HESIGA_Spatial_reuse_value15_allowed in SRP IE Change-Id: Id2d3d04ae1b3b9a2e6d84f30749b577bc7b79061 CRs-Fixed: 3305447
This commit is contained in:

committed by
Madan Koyyalamudi

parent
13046aa4c1
commit
983623c4b8
2
Kbuild
2
Kbuild
@@ -2600,7 +2600,7 @@ SR_UCFG_INC := -I$(WLAN_ROOT)/components/spatial_reuse/dispatcher/inc
|
|||||||
SR_TGT_DIR := $(WLAN_COMMON_ROOT)/target_if/spatial_reuse/src
|
SR_TGT_DIR := $(WLAN_COMMON_ROOT)/target_if/spatial_reuse/src
|
||||||
SR_TGT_INC := -I$(WLAN_COMMON_INC)/target_if/spatial_reuse/inc/
|
SR_TGT_INC := -I$(WLAN_COMMON_INC)/target_if/spatial_reuse/inc/
|
||||||
|
|
||||||
ifeq ($(CONFIG_WLAN_FEATURE_11AX), y)
|
ifeq ($(CONFIG_WLAN_FEATURE_SR), y)
|
||||||
WLAN_SR_OBJS := $(SR_UCFG_DIR)/spatial_reuse_ucfg_api.o \
|
WLAN_SR_OBJS := $(SR_UCFG_DIR)/spatial_reuse_ucfg_api.o \
|
||||||
$(SR_UCFG_DIR)/spatial_reuse_api.o \
|
$(SR_UCFG_DIR)/spatial_reuse_api.o \
|
||||||
$(SR_TGT_DIR)/target_if_spatial_reuse.o
|
$(SR_TGT_DIR)/target_if_spatial_reuse.o
|
||||||
|
@@ -688,6 +688,29 @@ static inline void policy_mgr_check_concurrent_intf_and_restart_sap(
|
|||||||
*/
|
*/
|
||||||
uint32_t policy_mgr_get_conc_vdev_on_same_mac(struct wlan_objmgr_psoc *psoc,
|
uint32_t policy_mgr_get_conc_vdev_on_same_mac(struct wlan_objmgr_psoc *psoc,
|
||||||
uint32_t vdev_id, uint8_t mac_id);
|
uint32_t vdev_id, uint8_t mac_id);
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_SR
|
||||||
|
/**
|
||||||
|
* policy_mgr_sr_same_mac_conc_enabled() - Function to check same MAC
|
||||||
|
* concurrency support in Spatial Reuse
|
||||||
|
* @psoc: PSOC object information
|
||||||
|
*
|
||||||
|
* This function is used to check whether concurrency is supported
|
||||||
|
* on same mac or not with Spatial Reuse enabled.
|
||||||
|
*
|
||||||
|
* Return: True if same MAC concurrency is supported with Spatial Reuse
|
||||||
|
* else False.
|
||||||
|
*/
|
||||||
|
bool policy_mgr_sr_same_mac_conc_enabled(struct wlan_objmgr_psoc *psoc);
|
||||||
|
#else
|
||||||
|
static inline
|
||||||
|
bool policy_mgr_sr_same_mac_conc_enabled(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* policy_mgr_is_mcc_in_24G() - Function to check for MCC in 2.4GHz
|
* policy_mgr_is_mcc_in_24G() - Function to check for MCC in 2.4GHz
|
||||||
* @psoc: PSOC object information
|
* @psoc: PSOC object information
|
||||||
|
@@ -8839,3 +8839,28 @@ QDF_STATUS policy_mgr_get_sbs_cfg(struct wlan_objmgr_psoc *psoc, bool *sbs)
|
|||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_SR
|
||||||
|
bool policy_mgr_sr_same_mac_conc_enabled(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
struct wmi_unified *wmi_handle;
|
||||||
|
bool sr_conc_enabled;
|
||||||
|
|
||||||
|
if (!psoc) {
|
||||||
|
mlme_err("PSOC is NULL");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
|
||||||
|
if (!wmi_handle) {
|
||||||
|
mlme_err("wmi_handle is null");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
sr_conc_enabled = policy_mgr_get_same_mac_conc_sr_status(psoc);
|
||||||
|
|
||||||
|
return (sr_conc_enabled &&
|
||||||
|
wmi_service_enabled(wmi_handle,
|
||||||
|
wmi_service_obss_per_packet_sr_support));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
#include <qdf_trace.h>
|
#include <qdf_trace.h>
|
||||||
#include <wlan_objmgr_vdev_obj.h>
|
#include <wlan_objmgr_vdev_obj.h>
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_SR
|
||||||
/**
|
/**
|
||||||
* wlan_spatial_reuse_config_set() - Set spatial reuse config
|
* wlan_spatial_reuse_config_set() - Set spatial reuse config
|
||||||
* @vdev: objmgr manager vdev
|
* @vdev: objmgr manager vdev
|
||||||
@@ -36,6 +37,15 @@
|
|||||||
QDF_STATUS wlan_spatial_reuse_config_set(struct wlan_objmgr_vdev *vdev,
|
QDF_STATUS wlan_spatial_reuse_config_set(struct wlan_objmgr_vdev *vdev,
|
||||||
uint8_t sr_ctrl,
|
uint8_t sr_ctrl,
|
||||||
uint8_t non_srg_max_pd_offset);
|
uint8_t non_srg_max_pd_offset);
|
||||||
|
#else
|
||||||
|
static inline
|
||||||
|
QDF_STATUS wlan_spatial_reuse_config_set(struct wlan_objmgr_vdev *vdev,
|
||||||
|
uint8_t sr_ctrl,
|
||||||
|
uint8_t non_srg_max_pd_offset)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wlan_spatial_reuse_he_siga_val15_allowed_set() - Set spatial reuse config
|
* wlan_spatial_reuse_he_siga_val15_allowed_set() - Set spatial reuse config
|
||||||
|
@@ -43,20 +43,22 @@ void ucfg_spatial_reuse_send_sr_config(struct wlan_objmgr_vdev *vdev,
|
|||||||
bool enable)
|
bool enable)
|
||||||
{
|
{
|
||||||
uint8_t sr_ctrl = 0;
|
uint8_t sr_ctrl = 0;
|
||||||
uint8_t non_srg_max_pd_offset = 0;
|
/* Disabled PD Threshold */
|
||||||
|
uint8_t non_srg_max_pd_offset = 0x80;
|
||||||
|
|
||||||
if (enable && (!wlan_vdev_mlme_get_he_spr_enabled(vdev))) {
|
/* SR feature itself is disabled by user */
|
||||||
|
if (!wlan_vdev_mlme_get_he_spr_enabled(vdev))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (enable) {
|
||||||
sr_ctrl = wlan_vdev_mlme_get_sr_ctrl(vdev);
|
sr_ctrl = wlan_vdev_mlme_get_sr_ctrl(vdev);
|
||||||
non_srg_max_pd_offset = wlan_vdev_mlme_get_pd_offset(vdev);
|
non_srg_max_pd_offset = wlan_vdev_mlme_get_pd_offset(vdev);
|
||||||
if (sr_ctrl && non_srg_max_pd_offset) {
|
if (sr_ctrl && non_srg_max_pd_offset)
|
||||||
wlan_spatial_reuse_config_set(vdev, sr_ctrl,
|
wlan_spatial_reuse_config_set(vdev, sr_ctrl,
|
||||||
non_srg_max_pd_offset);
|
non_srg_max_pd_offset);
|
||||||
wlan_vdev_mlme_set_he_spr_enabled(vdev, true);
|
} else {
|
||||||
}
|
|
||||||
} else if (!enable && wlan_vdev_mlme_get_he_spr_enabled(vdev)) {
|
|
||||||
wlan_spatial_reuse_config_set(vdev, sr_ctrl,
|
wlan_spatial_reuse_config_set(vdev, sr_ctrl,
|
||||||
non_srg_max_pd_offset);
|
non_srg_max_pd_offset);
|
||||||
wlan_vdev_mlme_set_he_spr_enabled(vdev, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2091,7 +2091,6 @@ static void hdd_roam_channel_switch_handler(struct hdd_adapter *adapter,
|
|||||||
|
|
||||||
policy_mgr_check_concurrent_intf_and_restart_sap(hdd_ctx->psoc);
|
policy_mgr_check_concurrent_intf_and_restart_sap(hdd_ctx->psoc);
|
||||||
wlan_twt_concurrency_update(hdd_ctx);
|
wlan_twt_concurrency_update(hdd_ctx);
|
||||||
hdd_update_he_obss_pd(adapter, NULL, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_HOST_ROAM
|
#ifdef WLAN_FEATURE_HOST_ROAM
|
||||||
|
@@ -724,7 +724,6 @@ hdd_cm_connect_failure_post_user_update(struct wlan_objmgr_vdev *vdev,
|
|||||||
WLAN_CONTROL_PATH);
|
WLAN_CONTROL_PATH);
|
||||||
ucfg_dp_periodic_sta_stats_start(vdev);
|
ucfg_dp_periodic_sta_stats_start(vdev);
|
||||||
wlan_twt_concurrency_update(hdd_ctx);
|
wlan_twt_concurrency_update(hdd_ctx);
|
||||||
hdd_update_he_obss_pd(adapter, NULL, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hdd_cm_connect_failure(struct wlan_objmgr_vdev *vdev,
|
static void hdd_cm_connect_failure(struct wlan_objmgr_vdev *vdev,
|
||||||
@@ -1389,7 +1388,6 @@ hdd_cm_connect_success_post_user_update(struct wlan_objmgr_vdev *vdev,
|
|||||||
}
|
}
|
||||||
ucfg_dp_periodic_sta_stats_start(vdev);
|
ucfg_dp_periodic_sta_stats_start(vdev);
|
||||||
wlan_twt_concurrency_update(hdd_ctx);
|
wlan_twt_concurrency_update(hdd_ctx);
|
||||||
hdd_update_he_obss_pd(adapter, NULL, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hdd_cm_connect_success(struct wlan_objmgr_vdev *vdev,
|
static void hdd_cm_connect_success(struct wlan_objmgr_vdev *vdev,
|
||||||
|
@@ -464,7 +464,6 @@ hdd_cm_disconnect_complete_post_user_update(struct wlan_objmgr_vdev *vdev,
|
|||||||
hdd_cm_set_default_wlm_mode(adapter);
|
hdd_cm_set_default_wlm_mode(adapter);
|
||||||
__hdd_cm_disconnect_handler_post_user_update(adapter, vdev);
|
__hdd_cm_disconnect_handler_post_user_update(adapter, vdev);
|
||||||
wlan_twt_concurrency_update(hdd_ctx);
|
wlan_twt_concurrency_update(hdd_ctx);
|
||||||
hdd_update_he_obss_pd(adapter, NULL, false);
|
|
||||||
hdd_cm_reset_udp_qos_upgrade_config(adapter);
|
hdd_cm_reset_udp_qos_upgrade_config(adapter);
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
|
@@ -6688,7 +6688,6 @@ error:
|
|||||||
|
|
||||||
free:
|
free:
|
||||||
wlan_twt_concurrency_update(hdd_ctx);
|
wlan_twt_concurrency_update(hdd_ctx);
|
||||||
hdd_update_he_obss_pd(adapter, NULL, true);
|
|
||||||
if (deliver_start_evt) {
|
if (deliver_start_evt) {
|
||||||
status = ucfg_if_mgr_deliver_event(
|
status = ucfg_if_mgr_deliver_event(
|
||||||
vdev,
|
vdev,
|
||||||
@@ -6856,7 +6855,6 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
|
|||||||
false);
|
false);
|
||||||
wlan_twt_concurrency_update(hdd_ctx);
|
wlan_twt_concurrency_update(hdd_ctx);
|
||||||
wlan_set_sap_user_config_freq(adapter->vdev, 0);
|
wlan_set_sap_user_config_freq(adapter->vdev, 0);
|
||||||
hdd_update_he_obss_pd(adapter, NULL, false);
|
|
||||||
status = ucfg_if_mgr_deliver_event(adapter->vdev,
|
status = ucfg_if_mgr_deliver_event(adapter->vdev,
|
||||||
WLAN_IF_MGR_EV_AP_STOP_BSS_COMPLETE,
|
WLAN_IF_MGR_EV_AP_STOP_BSS_COMPLETE,
|
||||||
NULL);
|
NULL);
|
||||||
@@ -7369,62 +7367,45 @@ wlan_util_get_centre_freq(struct wireless_dev *wdev, unsigned int link_id)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_SR
|
#if defined(WLAN_FEATURE_SR) && \
|
||||||
void hdd_update_he_obss_pd(struct hdd_adapter *adapter,
|
(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0))
|
||||||
struct cfg80211_ap_settings *params,
|
/**
|
||||||
bool iface_start)
|
* hdd_update_he_obss_pd() - Enable or disable spatial reuse
|
||||||
|
* based on user space input and concurrency combination.
|
||||||
|
* @adapter: Pointer to hostapd adapter
|
||||||
|
* @params: Pointer to AP configuration from cfg80211
|
||||||
|
* @iface_start: Interface start or not
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
|
static void hdd_update_he_obss_pd(struct hdd_adapter *adapter,
|
||||||
|
struct cfg80211_ap_settings *params)
|
||||||
{
|
{
|
||||||
struct wlan_objmgr_vdev *vdev, *conc_vdev;
|
struct wlan_objmgr_vdev *vdev;
|
||||||
uint8_t vdev_id = adapter->vdev_id;
|
|
||||||
uint8_t mac_id;
|
|
||||||
struct wlan_objmgr_psoc *psoc;
|
|
||||||
uint32_t conc_vdev_id;
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)) || \
|
|
||||||
defined(CFG80211_SPATIAL_REUSE_EXT_BACKPORT)
|
|
||||||
struct ieee80211_he_obss_pd *obss_pd;
|
struct ieee80211_he_obss_pd *obss_pd;
|
||||||
#endif
|
|
||||||
|
|
||||||
vdev = hdd_objmgr_get_vdev_by_user(adapter, WLAN_OSIF_ID);
|
vdev = hdd_objmgr_get_vdev_by_user(adapter, WLAN_OSIF_ID);
|
||||||
if (!vdev)
|
if (!vdev)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)) || \
|
|
||||||
defined(CFG80211_SPATIAL_REUSE_EXT_BACKPORT)
|
|
||||||
if (params && params->he_obss_pd.enable) {
|
if (params && params->he_obss_pd.enable) {
|
||||||
obss_pd = ¶ms->he_obss_pd;
|
obss_pd = ¶ms->he_obss_pd;
|
||||||
ucfg_spatial_reuse_set_sr_config(vdev,
|
ucfg_spatial_reuse_set_sr_config(vdev,
|
||||||
obss_pd->sr_ctrl,
|
obss_pd->sr_ctrl,
|
||||||
obss_pd->non_srg_max_offset);
|
obss_pd->non_srg_max_offset);
|
||||||
|
ucfg_spatial_reuse_set_sr_enable(vdev, obss_pd->enable);
|
||||||
hdd_debug("obss_pd_enable: %d, sr_ctrl: %d, non_srg_max_offset: %d",
|
hdd_debug("obss_pd_enable: %d, sr_ctrl: %d, non_srg_max_offset: %d",
|
||||||
obss_pd->enable, obss_pd->sr_ctrl,
|
obss_pd->enable, obss_pd->sr_ctrl,
|
||||||
obss_pd->non_srg_max_offset);
|
obss_pd->non_srg_max_offset);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
psoc = wlan_vdev_get_psoc(vdev);
|
|
||||||
policy_mgr_get_mac_id_by_session_id(psoc, vdev_id, &mac_id);
|
|
||||||
conc_vdev_id = policy_mgr_get_conc_vdev_on_same_mac(psoc, vdev_id,
|
|
||||||
mac_id);
|
|
||||||
if (conc_vdev_id != WLAN_INVALID_VDEV_ID) {
|
|
||||||
conc_vdev =
|
|
||||||
wlan_objmgr_get_vdev_by_id_from_psoc(
|
|
||||||
psoc, conc_vdev_id,
|
|
||||||
WLAN_HDD_ID_OBJ_MGR);
|
|
||||||
if (!conc_vdev)
|
|
||||||
goto release_ref;
|
|
||||||
if (iface_start) {
|
|
||||||
ucfg_spatial_reuse_send_sr_config(conc_vdev, false);
|
|
||||||
hdd_debug("disable obss pd for vdev:%d", conc_vdev_id);
|
|
||||||
} else {
|
|
||||||
ucfg_spatial_reuse_send_sr_config(conc_vdev, true);
|
|
||||||
hdd_debug("enable obss pd for vdev:%d", conc_vdev_id);
|
|
||||||
}
|
|
||||||
wlan_objmgr_vdev_release_ref(conc_vdev, WLAN_HDD_ID_OBJ_MGR);
|
|
||||||
}
|
|
||||||
|
|
||||||
release_ref:
|
|
||||||
hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_ID);
|
hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_ID);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
static inline
|
||||||
|
void hdd_update_he_obss_pd(struct hdd_adapter *adapter,
|
||||||
|
struct cfg80211_ap_settings *params)
|
||||||
|
{
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -7742,7 +7723,7 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
|
|||||||
wlan_hdd_update_twt_responder(hdd_ctx, params);
|
wlan_hdd_update_twt_responder(hdd_ctx, params);
|
||||||
|
|
||||||
/* Enable/disable non-srg obss pd spatial reuse */
|
/* Enable/disable non-srg obss pd spatial reuse */
|
||||||
hdd_update_he_obss_pd(adapter, params, true);
|
hdd_update_he_obss_pd(adapter, params);
|
||||||
|
|
||||||
hdd_place_marker(adapter, "TRY TO START", NULL);
|
hdd_place_marker(adapter, "TRY TO START", NULL);
|
||||||
status =
|
status =
|
||||||
|
@@ -449,27 +449,6 @@ void hdd_stop_sap_due_to_invalid_channel(struct work_struct *work);
|
|||||||
*/
|
*/
|
||||||
bool hdd_is_any_sta_connecting(struct hdd_context *hdd_ctx);
|
bool hdd_is_any_sta_connecting(struct hdd_context *hdd_ctx);
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_11AX
|
|
||||||
/**
|
|
||||||
* hdd_update_he_obss_pd() - Enable or disable spatial reuse
|
|
||||||
* based on user space input and concurrency combination.
|
|
||||||
* @adapter: Pointer to hostapd adapter
|
|
||||||
* @params: Pointer to AP configuration from cfg80211
|
|
||||||
* @iface_start: Interface start or not
|
|
||||||
*
|
|
||||||
* Return: void
|
|
||||||
*/
|
|
||||||
void hdd_update_he_obss_pd(struct hdd_adapter *adapter,
|
|
||||||
struct cfg80211_ap_settings *params,
|
|
||||||
bool iface_start);
|
|
||||||
#else
|
|
||||||
static inline void hdd_update_he_obss_pd(struct hdd_adapter *adapter,
|
|
||||||
struct cfg80211_ap_settings *params,
|
|
||||||
bool iface_start)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_11BE_MLO
|
#ifdef WLAN_FEATURE_11BE_MLO
|
||||||
/**
|
/**
|
||||||
* wlan_hdd_mlo_reset() - reset mlo configuration if start bss fails
|
* wlan_hdd_mlo_reset() - reset mlo configuration if start bss fails
|
||||||
|
@@ -9527,6 +9527,8 @@ void lim_process_set_he_bss_color(struct mac_context *mac_ctx, uint32_t *msg_buf
|
|||||||
struct sir_set_he_bss_color *bss_color;
|
struct sir_set_he_bss_color *bss_color;
|
||||||
struct pe_session *session_entry = NULL;
|
struct pe_session *session_entry = NULL;
|
||||||
tUpdateBeaconParams beacon_params;
|
tUpdateBeaconParams beacon_params;
|
||||||
|
/* PD threshold -128 to disable SR */
|
||||||
|
uint8_t non_srg_pd_threshold_disabled = 0x80;
|
||||||
|
|
||||||
if (!msg_buf) {
|
if (!msg_buf) {
|
||||||
pe_err("Buffer is Pointing to NULL");
|
pe_err("Buffer is Pointing to NULL");
|
||||||
@@ -9562,11 +9564,10 @@ void lim_process_set_he_bss_color(struct mac_context *mac_ctx, uint32_t *msg_buf
|
|||||||
beacon_params.bss_color = session_entry->he_op.bss_color;
|
beacon_params.bss_color = session_entry->he_op.bss_color;
|
||||||
session_entry->bss_color_changing = 1;
|
session_entry->bss_color_changing = 1;
|
||||||
|
|
||||||
if (wlan_vdev_mlme_get_he_spr_enabled(session_entry->vdev)) {
|
if (wlan_vdev_mlme_get_he_spr_enabled(session_entry->vdev))
|
||||||
/* Disable spatial reuse during BSS color change */
|
/* Disable spatial reuse during BSS color change */
|
||||||
wlan_spatial_reuse_config_set(session_entry->vdev, 0, 0);
|
wlan_spatial_reuse_config_set(session_entry->vdev, 0,
|
||||||
wlan_vdev_mlme_set_he_spr_enabled(session_entry->vdev, false);
|
non_srg_pd_threshold_disabled);
|
||||||
}
|
|
||||||
|
|
||||||
if (sch_set_fixed_beacon_fields(mac_ctx, session_entry) !=
|
if (sch_set_fixed_beacon_fields(mac_ctx, session_entry) !=
|
||||||
QDF_STATUS_SUCCESS) {
|
QDF_STATUS_SUCCESS) {
|
||||||
|
@@ -2318,6 +2318,7 @@ lim_send_bss_color_change_ie_update(struct mac_context *mac_ctx,
|
|||||||
session->he_bss_color_change.countdown);
|
session->he_bss_color_change.countdown);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_SR
|
||||||
static void
|
static void
|
||||||
lim_update_spatial_reuse(struct pe_session *session)
|
lim_update_spatial_reuse(struct pe_session *session)
|
||||||
{
|
{
|
||||||
@@ -2329,7 +2330,7 @@ lim_update_spatial_reuse(struct pe_session *session)
|
|||||||
sr_ctrl = wlan_vdev_mlme_get_sr_ctrl(session->vdev);
|
sr_ctrl = wlan_vdev_mlme_get_sr_ctrl(session->vdev);
|
||||||
non_srg_pd_max_offset = wlan_vdev_mlme_get_pd_offset(session->vdev);
|
non_srg_pd_max_offset = wlan_vdev_mlme_get_pd_offset(session->vdev);
|
||||||
if (non_srg_pd_max_offset && sr_ctrl &&
|
if (non_srg_pd_max_offset && sr_ctrl &&
|
||||||
!wlan_vdev_mlme_get_he_spr_enabled(session->vdev)) {
|
wlan_vdev_mlme_get_he_spr_enabled(session->vdev)) {
|
||||||
psoc = wlan_vdev_get_psoc(session->vdev);
|
psoc = wlan_vdev_get_psoc(session->vdev);
|
||||||
policy_mgr_get_mac_id_by_session_id(psoc,
|
policy_mgr_get_mac_id_by_session_id(psoc,
|
||||||
vdev_id,
|
vdev_id,
|
||||||
@@ -2337,17 +2338,18 @@ lim_update_spatial_reuse(struct pe_session *session)
|
|||||||
conc_vdev_id = policy_mgr_get_conc_vdev_on_same_mac(psoc,
|
conc_vdev_id = policy_mgr_get_conc_vdev_on_same_mac(psoc,
|
||||||
vdev_id,
|
vdev_id,
|
||||||
mac_id);
|
mac_id);
|
||||||
if (conc_vdev_id == WLAN_INVALID_VDEV_ID) {
|
if (conc_vdev_id == WLAN_INVALID_VDEV_ID ||
|
||||||
/*
|
policy_mgr_sr_same_mac_conc_enabled(psoc))
|
||||||
* Enable spatial reuse only if no concurrent
|
|
||||||
* vdev running on same mac
|
|
||||||
*/
|
|
||||||
wlan_spatial_reuse_config_set(session->vdev, sr_ctrl,
|
wlan_spatial_reuse_config_set(session->vdev, sr_ctrl,
|
||||||
non_srg_pd_max_offset);
|
non_srg_pd_max_offset);
|
||||||
wlan_vdev_mlme_set_he_spr_enabled(session->vdev, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
static void
|
||||||
|
lim_update_spatial_reuse(struct pe_session *session)
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
lim_handle_bss_color_change_ie(struct mac_context *mac_ctx,
|
lim_handle_bss_color_change_ie(struct mac_context *mac_ctx,
|
||||||
|
@@ -7167,6 +7167,7 @@ populate_dot11f_sr_info(struct mac_context *mac_ctx,
|
|||||||
sr_info->srg_info_present = 0;
|
sr_info->srg_info_present = 0;
|
||||||
sr_info->non_srg_offset_present = 1;
|
sr_info->non_srg_offset_present = 1;
|
||||||
sr_info->srg_info_present = 0;
|
sr_info->srg_info_present = 0;
|
||||||
|
sr_info->sr_value15_allow = (sr_ctrl & WLAN_HE_SIGA_SR_VAL15_ALLOWED);
|
||||||
sr_info->non_srg_offset.info.non_srg_pd_max_offset = non_srg_pd_offset;
|
sr_info->non_srg_offset.info.non_srg_pd_max_offset = non_srg_pd_offset;
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
|
@@ -1323,18 +1323,18 @@ static inline QDF_STATUS wma_set_tsf_gpio_pin(WMA_HANDLE handle, uint32_t pin)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_11AX
|
#ifdef WLAN_FEATURE_SR
|
||||||
/**
|
/**
|
||||||
* wma_spr_update() - enable/disable spatial reuse
|
* wma_sr_update() - enable/disable spatial reuse
|
||||||
* @wma: wma handle
|
* @wma: wma handle
|
||||||
* @vdev_id: vdev id
|
* @vdev_id: vdev id
|
||||||
* @enable: indicates spatial reuse enable/disable
|
* @enable: indicates spatial reuse enable/disable
|
||||||
*
|
*
|
||||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||||
*/
|
*/
|
||||||
QDF_STATUS wma_spr_update(tp_wma_handle wma, uint8_t vdev_id, bool enable);
|
QDF_STATUS wma_sr_update(tp_wma_handle wma, uint8_t vdev_id, bool enable);
|
||||||
#else
|
#else
|
||||||
static inline QDF_STATUS wma_spr_update(tp_wma_handle wma, uint8_t vdev_id,
|
static inline QDF_STATUS wma_sr_update(tp_wma_handle wma, uint8_t vdev_id,
|
||||||
bool enable)
|
bool enable)
|
||||||
{
|
{
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
|
@@ -1282,7 +1282,6 @@ QDF_STATUS wma_vdev_start_resp_handler(struct vdev_mlme_obj *vdev_mlme,
|
|||||||
wma_dcs_clear_vdev_starting(mac_ctx, rsp->vdev_id);
|
wma_dcs_clear_vdev_starting(mac_ctx, rsp->vdev_id);
|
||||||
wma_dcs_wlan_interference_mitigation_enable(mac_ctx,
|
wma_dcs_wlan_interference_mitigation_enable(mac_ctx,
|
||||||
iface->mac_id, rsp);
|
iface->mac_id, rsp);
|
||||||
wma_spr_update(wma, rsp->vdev_id, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
|
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
|
||||||
@@ -2311,7 +2310,6 @@ void wma_send_del_bss_response(tp_wma_handle wma, struct del_bss_resp *resp)
|
|||||||
vdev_id);
|
vdev_id);
|
||||||
cdp_fc_vdev_unpause(soc, vdev_id, OL_TXQ_PAUSE_REASON_VDEV_STOP, 0);
|
cdp_fc_vdev_unpause(soc, vdev_id, OL_TXQ_PAUSE_REASON_VDEV_STOP, 0);
|
||||||
wma_vdev_clear_pause_bit(vdev_id, PAUSE_TYPE_HOST);
|
wma_vdev_clear_pause_bit(vdev_id, PAUSE_TYPE_HOST);
|
||||||
wma_spr_update(wma, vdev_id, false);
|
|
||||||
qdf_atomic_set(&iface->bss_status, WMA_BSS_STATUS_STOPPED);
|
qdf_atomic_set(&iface->bss_status, WMA_BSS_STATUS_STOPPED);
|
||||||
wma_debug("(type %d subtype %d) BSS is stopped",
|
wma_debug("(type %d subtype %d) BSS is stopped",
|
||||||
iface->type, iface->sub_type);
|
iface->type, iface->sub_type);
|
||||||
|
@@ -645,25 +645,36 @@ QDF_STATUS wma_process_dhcp_ind(WMA_HANDLE handle,
|
|||||||
&peer_set_param_fp);
|
&peer_set_param_fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined WLAN_FEATURE_11AX
|
#ifdef WLAN_FEATURE_SR
|
||||||
|
|
||||||
#define NON_SRG_PD_SR_DISALLOWED 0x02
|
static void wma_sr_send_pd_threshold(tp_wma_handle wma,
|
||||||
#define NON_SRG_OFFSET_PRESENT 0x04
|
|
||||||
#define NON_SRG_SPR_ENABLE_POS 24
|
|
||||||
#define NON_SRG_PARAM_VAL_DBM_UNIT 0x20
|
|
||||||
#define NON_SRG_SPR_ENABLE 0x80
|
|
||||||
|
|
||||||
QDF_STATUS wma_spr_update(tp_wma_handle wma,
|
|
||||||
uint8_t vdev_id,
|
uint8_t vdev_id,
|
||||||
bool enable)
|
uint32_t val)
|
||||||
{
|
{
|
||||||
struct pdev_params pparam;
|
struct vdev_set_params vparam;
|
||||||
uint32_t val = 0;
|
|
||||||
wmi_unified_t wmi_handle = wma->wmi_handle;
|
wmi_unified_t wmi_handle = wma->wmi_handle;
|
||||||
|
bool sr_supported =
|
||||||
|
wmi_service_enabled(wmi_handle,
|
||||||
|
wmi_service_srg_srp_spatial_reuse_support);
|
||||||
|
|
||||||
|
if (sr_supported) {
|
||||||
|
vparam.vdev_id = vdev_id;
|
||||||
|
vparam.param_id = WMI_VDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD;
|
||||||
|
vparam.param_value = val;
|
||||||
|
wmi_unified_vdev_set_param_send(wmi_handle, &vparam);
|
||||||
|
} else {
|
||||||
|
wma_debug("Target doesn't support SR operations");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wma_sr_update(tp_wma_handle wma, uint8_t vdev_id, bool enable)
|
||||||
|
{
|
||||||
|
uint32_t val = 0;
|
||||||
uint8_t mac_id;
|
uint8_t mac_id;
|
||||||
uint32_t conc_vdev_id;
|
uint32_t conc_vdev_id;
|
||||||
struct wlan_objmgr_vdev *vdev;
|
struct wlan_objmgr_vdev *vdev;
|
||||||
uint8_t sr_ctrl, non_srg_pd_max_offset;
|
uint8_t sr_ctrl, non_srg_pd_max_offset;
|
||||||
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(wma->psoc, vdev_id,
|
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(wma->psoc, vdev_id,
|
||||||
WLAN_LEGACY_WMA_ID);
|
WLAN_LEGACY_WMA_ID);
|
||||||
@@ -671,9 +682,16 @@ QDF_STATUS wma_spr_update(tp_wma_handle wma,
|
|||||||
wma_err("Can't get vdev by vdev_id:%d", vdev_id);
|
wma_err("Can't get vdev by vdev_id:%d", vdev_id);
|
||||||
return QDF_STATUS_E_INVAL;
|
return QDF_STATUS_E_INVAL;
|
||||||
}
|
}
|
||||||
|
if (!wlan_vdev_mlme_get_he_spr_enabled(vdev)) {
|
||||||
|
wma_err("Spatial Reuse disabled");
|
||||||
|
status = QDF_STATUS_E_NOSUPPORT;
|
||||||
|
goto release_ref;
|
||||||
|
}
|
||||||
|
|
||||||
sr_ctrl = wlan_vdev_mlme_get_sr_ctrl(vdev);
|
sr_ctrl = wlan_vdev_mlme_get_sr_ctrl(vdev);
|
||||||
non_srg_pd_max_offset = wlan_vdev_mlme_get_pd_offset(vdev);
|
non_srg_pd_max_offset = wlan_vdev_mlme_get_pd_offset(vdev);
|
||||||
|
wma_debug("SR Control: %x pd_max_offset: %x",
|
||||||
|
sr_ctrl, non_srg_pd_max_offset);
|
||||||
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)) {
|
||||||
policy_mgr_get_mac_id_by_session_id(wma->psoc,
|
policy_mgr_get_mac_id_by_session_id(wma->psoc,
|
||||||
@@ -683,36 +701,28 @@ QDF_STATUS wma_spr_update(tp_wma_handle wma,
|
|||||||
policy_mgr_get_conc_vdev_on_same_mac(wma->psoc,
|
policy_mgr_get_conc_vdev_on_same_mac(wma->psoc,
|
||||||
vdev_id,
|
vdev_id,
|
||||||
mac_id);
|
mac_id);
|
||||||
if (conc_vdev_id != WLAN_INVALID_VDEV_ID) {
|
if (conc_vdev_id != WLAN_INVALID_VDEV_ID &&
|
||||||
|
!policy_mgr_sr_same_mac_conc_enabled(wma->psoc)) {
|
||||||
wma_debug("Concurrent intf present,SR PD not enabled");
|
wma_debug("Concurrent intf present,SR PD not enabled");
|
||||||
goto release_ref;
|
goto release_ref;
|
||||||
}
|
}
|
||||||
qdf_mem_zero(&pparam, sizeof(pparam));
|
|
||||||
pparam.param_id = WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD;
|
|
||||||
if (enable) {
|
if (enable) {
|
||||||
val = NON_SRG_SPR_ENABLE;
|
val |= 1 << NON_SRG_SPR_ENABLE_POS;
|
||||||
val |= NON_SRG_PARAM_VAL_DBM_UNIT;
|
val |= SR_PARAM_VAL_DBM_UNIT << SR_PARAM_VAL_DBM_POS;
|
||||||
val = val << NON_SRG_SPR_ENABLE_POS;
|
val |= (uint8_t)((non_srg_pd_max_offset +
|
||||||
val |= non_srg_pd_max_offset;
|
NON_SR_PD_THRESHOLD_MIN) <<
|
||||||
wlan_vdev_mlme_set_he_spr_enabled(vdev, true);
|
NON_SRG_MAX_PD_OFFSET_POS);
|
||||||
} else {
|
|
||||||
wlan_vdev_mlme_set_he_spr_enabled(vdev, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pparam.param_value = val;
|
wma_debug("non-srg param val: %x, enable: %x", val, enable);
|
||||||
|
wma_sr_send_pd_threshold(wma, vdev_id, val);
|
||||||
wma_debug("non-srg param val: %u, enable: %d",
|
|
||||||
pparam.param_value, enable);
|
|
||||||
|
|
||||||
wmi_unified_pdev_param_send(wmi_handle, &pparam,
|
|
||||||
WMA_WILDCARD_PDEV_ID);
|
|
||||||
} else {
|
} else {
|
||||||
wma_debug("Spatial reuse not enabled");
|
wma_debug("Spatial reuse is disabled in ctrl");
|
||||||
}
|
}
|
||||||
|
|
||||||
release_ref:
|
release_ref:
|
||||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_WMA_ID);
|
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_WMA_ID);
|
||||||
return QDF_STATUS_SUCCESS;
|
return status;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -2544,6 +2544,7 @@ QDF_STATUS wma_set_ap_vdev_up(tp_wma_handle wma, uint8_t vdev_id)
|
|||||||
}
|
}
|
||||||
wma_set_sap_keepalive(wma, vdev_id);
|
wma_set_sap_keepalive(wma, vdev_id);
|
||||||
wma_set_vdev_mgmt_rate(wma, vdev_id);
|
wma_set_vdev_mgmt_rate(wma, vdev_id);
|
||||||
|
wma_sr_update(wma, vdev_id, true);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@@ -4110,6 +4110,8 @@ QDF_STATUS wma_send_vdev_down_to_fw(t_wma_handle *wma, uint8_t vdev_id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
status = vdev_mgr_down_send(vdev_mlme);
|
status = vdev_mgr_down_send(vdev_mlme);
|
||||||
|
if (QDF_IS_STATUS_SUCCESS(status))
|
||||||
|
wma_sr_update(wma, vdev_id, false);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@@ -4434,6 +4436,7 @@ QDF_STATUS wma_sta_vdev_up_send(struct vdev_mlme_obj *vdev_mlme,
|
|||||||
status = QDF_STATUS_E_FAILURE;
|
status = QDF_STATUS_E_FAILURE;
|
||||||
} else {
|
} else {
|
||||||
wma_set_vdev_mgmt_rate(wma, vdev_id);
|
wma_set_vdev_mgmt_rate(wma, vdev_id);
|
||||||
|
wma_sr_update(wma, vdev_id, true);
|
||||||
if (iface->beacon_filter_enabled)
|
if (iface->beacon_filter_enabled)
|
||||||
wma_add_beacon_filter(
|
wma_add_beacon_filter(
|
||||||
wma,
|
wma,
|
||||||
|
Reference in New Issue
Block a user