Przeglądaj źródła

qcacld-3.0: Refine mlme obss ht40 configurations

Refine mlme obss ht40 configurations based on converged cfg component.
Remove related legacy codes.

Change-Id: If4f061a16e9a2a0bba81d1d24aa1f52bbeadacf5
CRs-Fixed: 2311907
Wu Gao 6 lat temu
rodzic
commit
d8f3db0fb5

+ 20 - 0
components/mlme/core/src/wlan_mlme_main.c

@@ -198,6 +198,25 @@ static void mlme_update_sap_cfg(struct wlan_objmgr_psoc *psoc,
 		cfg_get(psoc, CFG_INI_REDUCED_BEACON_INTERVAL);
 }
 
+static void mlme_init_obss_ht40_cfg(struct wlan_objmgr_psoc *psoc,
+				    struct wlan_mlme_obss_ht40 *obss_ht40)
+{
+	obss_ht40->active_dwelltime =
+		cfg_get(psoc, CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME);
+	obss_ht40->passive_dwelltime =
+		cfg_get(psoc, CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME);
+	obss_ht40->width_trigger_interval =
+		cfg_get(psoc, CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL);
+	obss_ht40->passive_per_channel = (uint32_t)
+		cfg_default(CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL);
+	obss_ht40->active_per_channel = (uint32_t)
+		cfg_default(CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL);
+	obss_ht40->width_trans_delay = (uint32_t)
+		cfg_default(CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY);
+	obss_ht40->scan_activity_threshold = (uint32_t)
+		cfg_default(CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD);
+}
+
 QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
 {
 	struct wlan_mlme_psoc_obj *mlme_obj;
@@ -216,6 +235,7 @@ QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
 	mlme_update_sap_protection_cfg(psoc, &mlme_cfg->sap_protection_cfg);
 	mlme_init_chainmask_cfg(psoc, &mlme_cfg->chainmask_cfg);
 	mlme_update_sap_cfg(psoc, &mlme_cfg->sap_cfg);
+	mlme_init_obss_ht40_cfg(psoc, &mlme_cfg->obss_ht40);
 
 	return status;
 }

+ 2 - 0
components/mlme/dispatcher/inc/cfg_mlme.h

@@ -25,6 +25,7 @@
 
 #include "cfg_mlme_chainmask.h"
 #include "cfg_mlme_ht_caps.h"
+#include "cfg_mlme_obss_ht40.h"
 #include "cfg_mlme_vht_caps.h"
 #include "cfg_mlme_rates.h"
 #include "cfg_sap_protection.h"
@@ -33,6 +34,7 @@
 #define CFG_MLME_ALL \
 	CFG_CHAINMASK_ALL \
 	CFG_HT_CAPS_ALL \
+	CFG_OBSS_HT40_ALL \
 	CFG_VHT_CAPS_ALL \
 	CFG_RATES_ALL \
 	CFG_SAP_PROTECTION_ALL \

+ 208 - 0
components/mlme/dispatcher/inc/cfg_mlme_obss_ht40.h

@@ -0,0 +1,208 @@
+/*
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/**
+ * DOC: This file contains configuration definitions for MLME OBSS HT40.
+ */
+#ifndef CFG_MLME_OBSS_HT40_H__
+#define CFG_MLME_OBSS_HT40_H__
+
+/*
+ * <ini>
+ * obss_active_dwelltime - Set obss active dwelltime
+ * @Min: 10
+ * @Max: 1000
+ * @Default: 10
+ *
+ * This ini is used to set dwell time in secs for active
+ * obss scan
+ *
+ * Related: None
+ *
+ * Supported Feature: Scan
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME CFG_INI_UINT( \
+	"obss_active_dwelltime", \
+	10, \
+	1000, \
+	10, \
+	CFG_VALUE_OR_DEFAULT, \
+	"Set obss active dwelltime")
+
+/*
+ * <ini>
+ * obss_passive_dwelltime - Set obss passive dwelltime
+ * @Min: 5
+ * @Max: 1000
+ * @Default: 20
+ *
+ * This ini is used to set dwell time in secs for passive
+ * obss scan
+ *
+ * Related: None
+ *
+ * Supported Feature: Scan
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME CFG_INI_UINT( \
+	"obss_passive_dwelltime", \
+	5, \
+	1000, \
+	20, \
+	CFG_VALUE_OR_DEFAULT, \
+	"Set obss passive dwelltime")
+
+/*
+ * <ini>
+ * obss_width_trigger_interval - Set obss trigger interval
+ * @Min: 10
+ * @Max: 900
+ * @Default: 200
+ *
+ * This ini is used during an OBSS scan operation,
+ * where each channel in the set is scanned at least
+ * once per configured trigger interval time. Unit is TUs.
+ *
+ * Related: None
+ *
+ * Supported Feature: Scan
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL CFG_INI_UINT( \
+	"obss_width_trigger_interval", \
+	10, \
+	900, \
+	200, \
+	CFG_VALUE_OR_DEFAULT, \
+	"Set obss trigger interval")
+
+/*
+ * obss_passive_total_per_channel - Set obss scan passive total per channel
+ * @Min: 200
+ * @Max: 10000
+ * @Default: 200
+ *
+ * FW can perform multiple scans with in a OBSS scan interval. This cfg is for
+ * the total per channel dwell time of passive scans. Unit is TUs.
+ *
+ * Related: None
+ *
+ * Supported Feature: Scan
+ *
+ * Usage: Internal
+ *
+ */
+#define CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL CFG_UINT( \
+	"obss_passive_total_per_channel", \
+	200, \
+	10000, \
+	200, \
+	CFG_VALUE_OR_DEFAULT, \
+	"obss passive total per channel")
+
+/*
+ * obss_active_total_per_channel - Set obss scan active total per channel
+ * @Min: 20
+ * @Max: 10000
+ * @Default: 20
+ *
+ * FW can perform multiple scans with in a OBSS scan interval. This cfg is for
+ * the total per channel dwell time of active scans. Unit is TUs.
+ *
+ * Related: None
+ *
+ * Supported Feature: Scan
+ *
+ * Usage: Internal
+ *
+ */
+#define CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL CFG_UINT( \
+	"obss_active_total_per_channel", \
+	20, \
+	10000, \
+	20, \
+	CFG_VALUE_OR_DEFAULT, \
+	"obss active total per channel")
+
+/*
+ * obss_scan_activity_thre - Set obss scan activity threshold
+ * @Min: 0
+ * @Max: 100
+ * @Default: 25
+ *
+ * This cfg sets obss scan activity threshold.
+ *
+ * Related: None
+ *
+ * Supported Feature: Scan
+ *
+ * Usage: Internal
+ *
+ */
+#define CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD CFG_UINT( \
+	"obss_scan_activity_thre", \
+	0, \
+	100, \
+	25, \
+	CFG_VALUE_OR_DEFAULT, \
+	"obss ht40 scan activity threshold")
+
+/*
+ * obss_width_transition_delay - Set obss width transition delay
+ * @Min: 5
+ * @Max: 100
+ * @Default: 5
+ *
+ * This cfg sets obss width transition delay, it is used to check exemption
+ * from scan. The unit is TUs.
+ *
+ * Related: None
+ *
+ * Supported Feature: Scan
+ *
+ * Usage: Internal
+ *
+ */
+#define CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY CFG_UINT( \
+	"obss_width_transition_delay", \
+	5, \
+	100, \
+	5, \
+	CFG_VALUE_OR_DEFAULT, \
+	"obss ht40 width transition delay")
+
+#define CFG_OBSS_HT40_ALL \
+	CFG(CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME) \
+	CFG(CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME) \
+	CFG(CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL) \
+	CFG(CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL) \
+	CFG(CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL) \
+	CFG(CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD) \
+	CFG(CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY)
+
+#endif /* CFG_MLME_OBSS_HT40_H__ */

+ 22 - 0
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -180,15 +180,37 @@ struct wlan_mlme_chainmask {
 	uint8_t rx_chain_mask_5g;
 };
 
+/**
+ * struct wlan_mlme_obss_ht40 - OBSS HT40 config items
+ * @active_dwelltime:        obss active dwelltime
+ * @passive_dwelltime:       obss passive dwelltime
+ * @width_trigger_interval:  obss trigger interval
+ * @passive_per_channel:     obss scan passive total duration per channel
+ * @active_per_channel:      obss scan active total duration per channel
+ * @width_trans_delay:       obss width transition delay
+ * @scan_activity_threshold: obss scan activity threshold
+ */
+struct wlan_mlme_obss_ht40 {
+	uint32_t active_dwelltime;
+	uint32_t passive_dwelltime;
+	uint32_t width_trigger_interval;
+	uint32_t passive_per_channel;
+	uint32_t active_per_channel;
+	uint32_t width_trans_delay;
+	uint32_t scan_activity_threshold;
+};
+
 /**
  * struct wlan_mlme_cfg - MLME config items
  * @ht_cfg: HT related CFG Items
+ * @obss_ht40:obss ht40 CFG Items
  * @vht_cfg: VHT related CFG Items
  * @rates: Rates related cfg items
  * @sap_protection_cfg: SAP erp protection related CFG items
  */
 struct wlan_mlme_cfg {
 	struct wlan_mlme_ht_caps ht_caps;
+	struct wlan_mlme_obss_ht40 obss_ht40;
 	struct wlan_mlme_vht_caps vht_caps;
 	struct wlan_mlme_rates rates;
 	struct wlan_mlme_sap_protection sap_protection_cfg;

+ 0 - 73
core/hdd/inc/wlan_hdd_cfg.h

@@ -1015,76 +1015,6 @@ enum hdd_dot11_mode {
 #define CFG_FIRST_SCAN_BUCKET_THRESHOLD_MAX       (-30)
 #define CFG_FIRST_SCAN_BUCKET_THRESHOLD_DEFAULT   (-30)
 
-/*
- * <ini>
- * obss_active_dwelltime - Set obss active dwelltime
- * @Min: 5
- * @Max: 1000
- * @Default: 10
- *
- * This ini is used to set dwell time in secs for active
- * obss scan
- *
- * Related: None
- *
- * Supported Feature: Scan
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME_NAME    "obss_active_dwelltime"
-#define CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME_MIN     (5)
-#define CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME_MAX     (1000)
-#define CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME_DEFAULT (10)
-
-/*
- * <ini>
- * obss_passive_dwelltime - Set obss passive dwelltime
- * @Min: 10
- * @Max: 1000
- * @Default: 20
- *
- * This ini is used to set dwell time in secs for passive
- * obss scan
- *
- * Related: None
- *
- * Supported Feature: Scan
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_NAME   "obss_passive_dwelltime"
-#define CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_MIN    (10)
-#define CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_MAX    (1000)
-#define CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_DEFAULT (20)
-
-/*
- * <ini>
- * obss_width_trigger_interval - Set obss trigger interval
- * @Min: 10
- * @Max: 900
- * @Default: 200
- *
- * This ini is used during an OBSS scan operation,
- * where each channel in the set is scanned at least
- * once per configured trigger interval time.
- *
- * Related: None
- *
- * Supported Feature: Scan
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL_NAME "obss_width_trigger_interval"
-#define CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL_MIN  (10)
-#define CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL_MAX  (900)
-#define CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL_DEFAULT (200)
-
 /*
  * <ini>
  * gbug_report_for_scan_results - Enable bug report
@@ -14109,9 +14039,6 @@ struct hdd_config {
 #ifdef FEATURE_LFR_SUBNET_DETECTION
 	bool enable_lfr_subnet_detection;
 #endif
-	uint16_t obss_active_dwelltime;
-	uint16_t obss_passive_dwelltime;
-	uint16_t obss_width_trigger_interval;
 	uint8_t inform_bss_rssi_raw;
 #ifdef WLAN_FEATURE_TSF
 	uint32_t tsf_gpio_pin;

+ 0 - 32
core/hdd/src/wlan_hdd_cfg.c

@@ -3431,30 +3431,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_ENABLE_LFR_SUBNET_MIN,
 		     CFG_ENABLE_LFR_SUBNET_MAX),
 #endif
-	REG_VARIABLE(CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME_NAME,
-		WLAN_PARAM_Integer,
-		struct hdd_config, obss_active_dwelltime,
-		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME_DEFAULT,
-		CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME_MIN,
-		CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME_MAX),
-
-	REG_VARIABLE(CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_NAME,
-		WLAN_PARAM_Integer,
-		struct hdd_config, obss_passive_dwelltime,
-		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_DEFAULT,
-		CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_MIN,
-		CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_MAX),
-
-	REG_VARIABLE(CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL_NAME,
-		WLAN_PARAM_Integer,
-		struct hdd_config, obss_width_trigger_interval,
-		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL_DEFAULT,
-		CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL_MIN,
-		CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL_MAX),
-
 	REG_VARIABLE(CFG_INFORM_BSS_RSSI_RAW_NAME, WLAN_PARAM_Integer,
 		struct hdd_config, inform_bss_rssi_raw,
 		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -7387,13 +7363,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
 		hdd_ctx->config->min_delay_btw_roam_scans;
 	smeConfig->csrConfig.roam_trigger_reason_bitmask =
 		hdd_ctx->config->roam_trigger_reason_bitmask;
-	smeConfig->csrConfig.obss_width_interval =
-			hdd_ctx->config->obss_width_trigger_interval;
-	smeConfig->csrConfig.obss_active_dwelltime =
-			hdd_ctx->config->obss_active_dwelltime;
-	smeConfig->csrConfig.obss_passive_dwelltime =
-			hdd_ctx->config->obss_passive_dwelltime;
-
 	status = ucfg_mlme_get_ignore_peer_ht_mode(hdd_ctx->hdd_psoc,
 						   &ignore_peer_ht_mode);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
@@ -7401,7 +7370,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
 		goto error;
 	}
 	smeConfig->csrConfig.ignore_peer_ht_opmode = ignore_peer_ht_mode;
-
 	smeConfig->csrConfig.enable_fatal_event =
 			pConfig->enable_fatal_event;
 	smeConfig->csrConfig.scan_adaptive_dwell_mode =

+ 0 - 35
core/mac/inc/wni_cfg.h

@@ -191,13 +191,6 @@ enum {
 	WNI_CFG_IBSS_ATIM_WIN_SIZE,
 	WNI_CFG_DFS_MASTER_ENABLED,
 	WNI_CFG_VHT_ENABLE_TXBF_20MHZ,
-	WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME,
-	WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME,
-	WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL,
-	WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL,
-	WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL,
-	WNI_CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY,
-	WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD,
 	WNI_CFG_TGT_GTX_USR_CFG,
 	WNI_CFG_MAX_HT_MCS_TX_DATA,
 	WNI_CFG_DISABLE_ABG_RATE_FOR_TX_DATA,
@@ -1185,34 +1178,6 @@ enum {
 #define WNI_CFG_VHT_ENABLE_TXBF_20MHZ_STAMAX    1
 #define WNI_CFG_VHT_ENABLE_TXBF_20MHZ_STADEF    0
 
-#define WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_STAMIN  5
-#define WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_STAMAX  1000
-#define WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_STADEF  20
-
-#define WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME_STAMIN    10
-#define WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME_STAMAX    1000
-#define WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME_STADEF    10
-
-#define WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL_STAMIN    10
-#define WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL_STAMAX    900
-#define WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL_STADEF    200
-
-#define WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL_STAMIN    200
-#define WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL_STAMAX    10000
-#define WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL_STADEF    200
-
-#define WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL_STAMIN    20
-#define WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL_STAMAX    10000
-#define WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL_STADEF    20
-
-#define WNI_CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY_STAMIN    5
-#define WNI_CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY_STAMAX    100
-#define WNI_CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY_STADEF    5
-
-#define WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD_STAMIN    0
-#define WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD_STAMAX    100
-#define WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD_STADEF    25
-
 #define WNI_CFG_TGT_GTX_USR_CFG_STAMIN 0
 #define WNI_CFG_TGT_GTX_USR_CFG_STAMAX 32
 #define WNI_CFG_TGT_GTX_USR_CFG_STADEF 32

+ 0 - 7
core/mac/src/cfg/cfg_param_name.c

@@ -205,13 +205,6 @@ const char *cfg_get_string(uint16_t cfg_id)
 	CASE_RETURN_STRING(WNI_CFG_IBSS_ATIM_WIN_SIZE);
 	CASE_RETURN_STRING(WNI_CFG_DFS_MASTER_ENABLED);
 	CASE_RETURN_STRING(WNI_CFG_VHT_ENABLE_TXBF_20MHZ);
-	CASE_RETURN_STRING(WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME);
-	CASE_RETURN_STRING(WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME);
-	CASE_RETURN_STRING(WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL);
-	CASE_RETURN_STRING(WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL);
-	CASE_RETURN_STRING(WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL);
-	CASE_RETURN_STRING(WNI_CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY);
-	CASE_RETURN_STRING(WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD);
 	CASE_RETURN_STRING(WNI_CFG_TGT_GTX_USR_CFG);
 	CASE_RETURN_STRING(WNI_CFG_MAX_HT_MCS_TX_DATA);
 	CASE_RETURN_STRING(WNI_CFG_DISABLE_ABG_RATE_FOR_TX_DATA);

+ 0 - 42
core/mac/src/cfg/cfg_proc_msg.c

@@ -868,48 +868,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
 	WNI_CFG_VHT_ENABLE_TXBF_20MHZ_STAMIN,
 	WNI_CFG_VHT_ENABLE_TXBF_20MHZ_STAMAX,
 	WNI_CFG_VHT_ENABLE_TXBF_20MHZ_STADEF},
-	{WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
-	CFG_CTL_NTF_LIM,
-	WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_STAMIN,
-	WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_STAMAX,
-	WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_STADEF},
-	{WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
-	CFG_CTL_NTF_LIM,
-	WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME_STAMIN,
-	WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME_STAMAX,
-	WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME_STADEF},
-	{WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
-	CFG_CTL_NTF_LIM,
-	WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL_STAMIN,
-	WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL_STAMAX,
-	WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL_STADEF},
-	{WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
-	CFG_CTL_NTF_LIM,
-	WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL_STAMIN,
-	WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL_STAMAX,
-	WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL_STADEF},
-	{WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
-	CFG_CTL_NTF_LIM,
-	WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL_STAMIN,
-	WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL_STAMAX,
-	WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL_STADEF},
-	{WNI_CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
-	CFG_CTL_NTF_LIM,
-	WNI_CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY_STAMIN,
-	WNI_CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY_STAMAX,
-	WNI_CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY_STADEF},
-	{WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
-	CFG_CTL_NTF_LIM,
-	WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD_STAMIN,
-	WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD_STAMAX,
-	WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD_STADEF},
 	{WNI_CFG_TGT_GTX_USR_CFG,
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
 	WNI_CFG_TGT_GTX_USR_CFG_STAMIN,

+ 38 - 66
core/mac/src/pe/lim/lim_utils.c

@@ -61,6 +61,9 @@
 #ifdef WLAN_FEATURE_11W
 #include "wni_cfg.h"
 #endif
+#include "cfg_mlme_obss_ht40.h"
+#include "cfg_ucfg_api.h"
+
 #define ASCII_SPACE_CHARACTER 0x20
 
 /* A DFS channel can be ACTIVE for max 9000 msec, from the last
@@ -6881,66 +6884,35 @@ const char *lim_bss_type_to_string(const uint16_t bss_type)
  */
 void lim_init_obss_params(tpAniSirGlobal mac_ctx, tpPESession session)
 {
-	uint32_t  cfg_value;
+	struct wlan_mlme_obss_ht40 *obss_ht40;
 
-	if (wlan_cfg_get_int(mac_ctx, WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME,
-		&cfg_value) !=  QDF_STATUS_SUCCESS) {
-		pe_err("Fail to retrieve: %x value",
-			WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME);
+	if (!(mac_ctx->mlme_cfg)) {
+		pe_err("invalid mlme cfg");
 		return;
 	}
-	session->obss_ht40_scanparam.obss_active_dwelltime = cfg_value;
 
-	if (wlan_cfg_get_int(mac_ctx, WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME,
-		&cfg_value) != QDF_STATUS_SUCCESS) {
-		pe_err("Fail to retrieve: %x value",
-			WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME);
-		return;
-	}
-	session->obss_ht40_scanparam.obss_passive_dwelltime = cfg_value;
+	obss_ht40  = &mac_ctx->mlme_cfg->obss_ht40;
 
-	if (wlan_cfg_get_int(mac_ctx,
-		WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL,
-		&cfg_value) != QDF_STATUS_SUCCESS) {
-		pe_err("Fail to retrieve: %x value",
-			WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL);
-		return;
-	}
-	session->obss_ht40_scanparam.obss_width_trigger_interval = cfg_value;
-	if (wlan_cfg_get_int(mac_ctx,
-		WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL,
-		&cfg_value) != QDF_STATUS_SUCCESS) {
-		pe_err("Fail to retrieve: %x value",
-			WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL);
-		return;
-	}
-	session->obss_ht40_scanparam.obss_active_total_per_channel = cfg_value;
-	if (wlan_cfg_get_int(mac_ctx,
-		WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL, &cfg_value)
-		!= QDF_STATUS_SUCCESS) {
-		pe_err("Fail to retrieve: %x value",
-			WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL);
-		return;
-	}
-	session->obss_ht40_scanparam.obss_passive_total_per_channel = cfg_value;
+	session->obss_ht40_scanparam.obss_active_dwelltime =
+		obss_ht40->active_dwelltime;
+
+	session->obss_ht40_scanparam.obss_passive_dwelltime =
+		obss_ht40->passive_dwelltime;
+
+	session->obss_ht40_scanparam.obss_width_trigger_interval =
+		obss_ht40->width_trigger_interval;
+
+	session->obss_ht40_scanparam.obss_active_total_per_channel =
+		obss_ht40->active_per_channel;
+
+	session->obss_ht40_scanparam.obss_passive_total_per_channel =
+		obss_ht40->passive_per_channel;
 
-	if (wlan_cfg_get_int(mac_ctx,
-		WNI_CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY, &cfg_value)
-		!= QDF_STATUS_SUCCESS) {
-		pe_err("Fail to retrieve: %x value",
-			WNI_CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY);
-		return;
-	}
 	session->obss_ht40_scanparam.bsswidth_ch_trans_delay =
-								cfg_value;
+		obss_ht40->width_trans_delay;
 
-	if (wlan_cfg_get_int(mac_ctx, WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD,
-		&cfg_value) != QDF_STATUS_SUCCESS) {
-		pe_err("Fail to retrieve: %x value",
-			WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD);
-		return;
-	}
-	session->obss_ht40_scanparam.obss_activity_threshold = cfg_value;
+	session->obss_ht40_scanparam.obss_activity_threshold =
+		obss_ht40->scan_activity_threshold;
 }
 
 /**
@@ -6959,51 +6931,51 @@ void lim_update_obss_scanparams(tpPESession session,
 	 * configured through cfg
 	 */
 	if ((scan_params->obssScanActiveDwell >
-		WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME_STAMIN) &&
+		cfg_min(CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME)) &&
 		(scan_params->obssScanActiveDwell <
-		WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME_STAMAX))
+		cfg_max(CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME)))
 		session->obss_ht40_scanparam.obss_active_dwelltime =
 			scan_params->obssScanActiveDwell;
 
 	if ((scan_params->obssScanPassiveDwell >
-		WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_STAMIN) &&
+		cfg_min(CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME)) &&
 		(scan_params->obssScanPassiveDwell <
-		WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_STAMAX))
+		cfg_max(CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME)))
 		session->obss_ht40_scanparam.obss_passive_dwelltime =
 			scan_params->obssScanPassiveDwell;
 
 	if ((scan_params->bssWidthChannelTransitionDelayFactor >
-		WNI_CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY_STAMIN) &&
+		cfg_min(CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY)) &&
 		(scan_params->bssWidthChannelTransitionDelayFactor <
-		WNI_CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY_STAMAX))
+		cfg_max(CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY)))
 		session->obss_ht40_scanparam.bsswidth_ch_trans_delay =
 			scan_params->bssWidthChannelTransitionDelayFactor;
 
 	if ((scan_params->obssScanActiveTotalPerChannel >
-		WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL_STAMIN) &&
+		cfg_min(CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL)) &&
 		(scan_params->obssScanActiveTotalPerChannel <
-		WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL_STAMAX))
+		cfg_max(CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL)))
 		session->obss_ht40_scanparam.obss_active_total_per_channel =
 			scan_params->obssScanActiveTotalPerChannel;
 
 	if ((scan_params->obssScanPassiveTotalPerChannel >
-		WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL_STAMIN) &&
+		cfg_min(CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL)) &&
 		(scan_params->obssScanPassiveTotalPerChannel <
-		WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL_STAMAX))
+		cfg_max(CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL)))
 		session->obss_ht40_scanparam.obss_passive_total_per_channel =
 			scan_params->obssScanPassiveTotalPerChannel;
 
 	if ((scan_params->bssChannelWidthTriggerScanInterval >
-		WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL_STAMIN) &&
+		cfg_min(CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL)) &&
 		(scan_params->bssChannelWidthTriggerScanInterval <
-		WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL_STAMAX))
+		cfg_max(CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL)))
 		session->obss_ht40_scanparam.obss_width_trigger_interval =
 			scan_params->bssChannelWidthTriggerScanInterval;
 
 	if ((scan_params->obssScanActivityThreshold >
-		WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD_STAMIN) &&
+		cfg_min(CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD)) &&
 		(scan_params->obssScanActivityThreshold <
-		WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD_STAMAX))
+		cfg_max(CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD)))
 		session->obss_ht40_scanparam.obss_activity_threshold =
 			scan_params->obssScanActivityThreshold;
 	return;

+ 0 - 3
core/sme/inc/csr_api.h

@@ -1232,9 +1232,6 @@ typedef struct tagCsrConfigParam {
 	int8_t roam_bg_scan_bad_rssi_thresh;
 	uint8_t roam_bad_rssi_thresh_offset_2g;
 	uint32_t roam_bg_scan_client_bitmap;
-	uint32_t obss_width_interval;
-	uint32_t obss_active_dwelltime;
-	uint32_t obss_passive_dwelltime;
 	bool ignore_peer_ht_opmode;
 	bool enable_edca_params;
 	uint32_t edca_vo_cwmin;

+ 0 - 3
core/sme/inc/csr_internal.h

@@ -539,9 +539,6 @@ struct csr_config {
 	bool early_stop_scan_enable;
 	int8_t early_stop_scan_min_threshold;
 	int8_t early_stop_scan_max_threshold;
-	uint32_t obss_width_interval;
-	uint32_t obss_active_dwelltime;
-	uint32_t obss_passive_dwelltime;
 	bool ignore_peer_ht_opmode;
 	bool enable_edca_params;
 	uint32_t edca_vo_cwmin;

+ 0 - 27
core/sme/src/csr/csr_api_roam.c

@@ -2888,27 +2888,6 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
 			pMac->roam.configParam.agingCount =
 				pParam->nScanResultAgeCount;
 		}
-		if (pParam->obss_width_interval) {
-			pMac->roam.configParam.obss_width_interval =
-				pParam->obss_width_interval;
-			cfg_set_int(pMac,
-				WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL,
-				pParam->obss_width_interval);
-		}
-		if (pParam->obss_active_dwelltime) {
-			pMac->roam.configParam.obss_active_dwelltime =
-				pParam->obss_active_dwelltime;
-			cfg_set_int(pMac,
-				WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME,
-				pParam->obss_active_dwelltime);
-		}
-		if (pParam->obss_passive_dwelltime) {
-			pMac->roam.configParam.obss_passive_dwelltime =
-				pParam->obss_passive_dwelltime;
-			cfg_set_int(pMac,
-				WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME,
-				pParam->obss_passive_dwelltime);
-		}
 
 		pMac->first_scan_bucket_threshold =
 			pParam->first_scan_bucket_threshold;
@@ -3536,12 +3515,6 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
 		pMac->roam.configParam.early_stop_scan_min_threshold;
 	pParam->early_stop_scan_max_threshold =
 		pMac->roam.configParam.early_stop_scan_max_threshold;
-	pParam->obss_width_interval =
-		pMac->roam.configParam.obss_width_interval;
-	pParam->obss_active_dwelltime =
-		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;