From 165bc60022da1e1cc697f7b4a48fa05e7d9daffc Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Mon, 21 Mar 2016 12:43:00 +0530 Subject: qcacld-3.0: Add INI param to ignore HT op mode of peer AP qcacld-2.0 to qcacld-3.0 propagation Currently even if peer AP is in Legacy mode, driver can enable 11g protection, even though there is no 11g AP in vicinity. As a part of fix, add an INI param which will enable 11g protection only when there is a 11g AP in vicinity. Change-Id: Ic76e6070b02f92ef33934a0e5158fa4ef6c3e45b CRs-Fixed: 897755 --- core/hdd/inc/wlan_hdd_cfg.h | 10 ++++++++++ core/hdd/src/wlan_hdd_cfg.c | 13 +++++++++++++ core/mac/src/pe/sch/sch_beacon_process.c | 3 ++- core/sme/inc/csr_api.h | 1 + core/sme/inc/csr_internal.h | 1 + core/sme/src/csr/csr_api_roam.c | 5 ++++- 6 files changed, 31 insertions(+), 2 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 93ceda3bb05b..f9391cfa69f8 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -2929,6 +2929,15 @@ enum dot11p_mode { #define CFG_ROAM_DENSE_RSSI_THRE_OFFSET_MAX (20) #define CFG_ROAM_DENSE_RSSI_THRE_OFFSET_DEFAULT (0) +/* + * Enabling gignore_peer_ht_opmode will enable 11g + * protection only when there is a 11g AP in vicinity. + */ +#define CFG_IGNORE_PEER_HT_MODE_NAME "gignore_peer_ht_opmode" +#define CFG_IGNORE_PEER_HT_MODE_MIN (0) +#define CFG_IGNORE_PEER_HT_MODE_MAX (1) +#define CFG_IGNORE_PEER_HT_MODE_DEFAULT (0) + /* * Dense Roam Min APs * minimum number of AP required for dense roam @@ -3530,6 +3539,7 @@ struct hdd_config { #endif uint32_t roam_dense_traffic_thresh; uint32_t roam_dense_rssi_thresh_offset; + bool ignore_peer_ht_opmode; uint32_t roam_dense_min_aps; }; diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 5d3b5d6d69b3..b25f46b08569 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -3711,6 +3711,14 @@ REG_TABLE_ENTRY g_registry_table[] = { CFG_ROAM_DENSE_RSSI_THRE_OFFSET_MIN, CFG_ROAM_DENSE_RSSI_THRE_OFFSET_MAX), + REG_VARIABLE(CFG_IGNORE_PEER_HT_MODE_NAME, WLAN_PARAM_Integer, + struct hdd_config, ignore_peer_ht_opmode, + VAR_FLAGS_OPTIONAL | + VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_IGNORE_PEER_HT_MODE_DEFAULT, + CFG_IGNORE_PEER_HT_MODE_MIN, + CFG_IGNORE_PEER_HT_MODE_MAX), + REG_VARIABLE(CFG_ROAM_DENSE_MIN_APS, WLAN_PARAM_Integer, struct hdd_config, roam_dense_min_aps, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -5301,6 +5309,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx) hdd_info("Name = [%s] Value = [%u]", CFG_ROAM_DENSE_RSSI_THRE_OFFSET, pHddCtx->config->roam_dense_rssi_thresh_offset); + hdd_info("Name = [%s] Value = [%u]", + CFG_IGNORE_PEER_HT_MODE_NAME, + pHddCtx->config->ignore_peer_ht_opmode); hdd_info("Name = [%s] Value = [%u]", CFG_ROAM_DENSE_MIN_APS, pHddCtx->config->roam_dense_min_aps); @@ -6745,6 +6756,8 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx) pHddCtx->config->obss_active_dwelltime; smeConfig->csrConfig.obss_passive_dwelltime = pHddCtx->config->obss_passive_dwelltime; + smeConfig->csrConfig.ignore_peer_ht_opmode = + pConfig->ignore_peer_ht_opmode; status = sme_update_config(pHddCtx->hHal, smeConfig); if (!QDF_IS_STATUS_SUCCESS(status)) { diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c index 7cf542cff880..be5af48c2ce6 100644 --- a/core/mac/src/pe/sch/sch_beacon_process.c +++ b/core/mac/src/pe/sch/sch_beacon_process.c @@ -199,7 +199,8 @@ ap_beacon_process_24_ghz(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info, * 11b because if that's needed then our operating mode would have * already been set to legacy in the previous blocks. */ - if (eSIR_HT_OP_MODE_OVERLAP_LEGACY == bcn_struct->HTInfo.opMode) { + if ((eSIR_HT_OP_MODE_OVERLAP_LEGACY == bcn_struct->HTInfo.opMode) && + !mac_ctx->roam.configParam.ignore_peer_ht_opmode) { if (eSIR_HT_OP_MODE_OVERLAP_LEGACY == mac_ctx->lim.gHTOperMode || eSIR_HT_OP_MODE_MIXED == mac_ctx->lim.gHTOperMode) return; diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index e2f1fcf03b6a..0d06b3ac3346 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1219,6 +1219,7 @@ typedef struct tagCsrConfigParam { uint32_t obss_width_interval; uint32_t obss_active_dwelltime; uint32_t obss_passive_dwelltime; + bool ignore_peer_ht_opmode; } tCsrConfigParam; /* Tush */ diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h index 290584e89be5..15ce478fd687 100644 --- a/core/sme/inc/csr_internal.h +++ b/core/sme/inc/csr_internal.h @@ -638,6 +638,7 @@ typedef struct tagCsrConfig { uint32_t obss_width_interval; uint32_t obss_active_dwelltime; uint32_t obss_passive_dwelltime; + bool ignore_peer_ht_opmode; } tCsrConfig; typedef struct tagCsrChannelPowerInfo { diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index bb812b1747cf..832b82806d7d 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -2343,7 +2343,8 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac, pMac->sme.ps_global_info.ps_enabled = pParam->is_ps_enabled; - + pMac->roam.configParam.ignore_peer_ht_opmode = + pParam->ignore_peer_ht_opmode; pMac->policy_manager_enabled = pParam->policy_manager_enabled; pMac->fine_time_meas_cap = pParam->fine_time_meas_cap; pMac->dual_mac_feature_disable = @@ -2534,6 +2535,8 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam) pMac->roam.configParam.obss_active_dwelltime; pParam->obss_passive_dwelltime = pMac->roam.configParam.obss_passive_dwelltime; + pParam->ignore_peer_ht_opmode = + pMac->roam.configParam.ignore_peer_ht_opmode; pParam->enableHtSmps = pMac->roam.configParam.enableHtSmps; pParam->htSmps = pMac->roam.configParam.htSmps; pParam->send_smps_action = pMac->roam.configParam.send_smps_action; -- cgit v1.2.3