Sfoglia il codice sorgente

qcacld-3.0: Refactor SAP ini items

Refactor ini items gSapForce11NFor11AC and gGoForce11NFor11AC
into new mlme component.

Change-Id: I85e2f7f9ae14a23c322572290b095aae0f29b0ec
CRs-Fixed: 2354940
Bala Venkatesh 6 anni fa
parent
commit
3d786ebe08

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

@@ -1058,6 +1058,12 @@ static void mlme_init_he_cap_in_cfg(struct wlan_objmgr_psoc *psoc,
 static void mlme_init_sap_cfg(struct wlan_objmgr_psoc *psoc,
 			      struct wlan_mlme_cfg_sap *sap_cfg)
 {
+	uint8_t *ssid;
+
+	ssid = cfg_default(CFG_SSID);
+	qdf_mem_zero(sap_cfg->cfg_ssid, MLME_CFG_SSID_LEN);
+	sap_cfg->cfg_ssid_len = STR_SSID_DEFAULT_LEN;
+	qdf_mem_copy(sap_cfg->cfg_ssid, ssid, STR_SSID_DEFAULT_LEN);
 	sap_cfg->beacon_interval = cfg_get(psoc, CFG_BEACON_INTERVAL);
 	sap_cfg->dtim_interval = cfg_default(CFG_DTIM_PERIOD);
 	sap_cfg->listen_interval = cfg_default(CFG_LISTEN_INTERVAL);
@@ -1094,6 +1100,10 @@ static void mlme_init_sap_cfg(struct wlan_objmgr_psoc *psoc,
 		cfg_get(psoc, CFG_COUNTRY_CODE_PRIORITY);
 	sap_cfg->sap_pref_chan_location =
 		cfg_get(psoc, CFG_SAP_PREF_CHANNEL_LOCATION);
+	sap_cfg->sap_force_11n_for_11ac =
+		cfg_get(psoc, CFG_SAP_FORCE_11N_FOR_11AC);
+	sap_cfg->go_force_11n_for_11ac =
+		cfg_get(psoc, CFG_GO_FORCE_11N_FOR_11AC);
 
 }
 

+ 55 - 3
components/mlme/dispatcher/inc/cfg_mlme_sap.h

@@ -23,11 +23,14 @@
 #ifndef __CFG_MLME_SAP_H
 #define __CFG_MLME_SAP_H
 
+#define STR_SSID_DEFAULT "1234567890"
+#define STR_SSID_DEFAULT_LEN sizeof(STR_SSID_DEFAULT)
+
 #define CFG_SSID CFG_STRING( \
 			"cfg_ssid", \
 			0, \
-			32, \
-			"1,2,3,4,5,6,7,8,9,0", \
+			STR_SSID_DEFAULT_LEN, \
+			STR_SSID_DEFAULT, \
 			"CFG_SSID")
 
 #define CFG_BEACON_INTERVAL CFG_INI_UINT( \
@@ -526,6 +529,53 @@
 			0, \
 			CFG_VALUE_OR_DEFAULT, \
 			"Sap preferred channel location")
+/*
+ * <ini>
+ * gSapForce11NFor11AC - Restrict SAP to 11n if set 1 even though
+ * hostapd.conf request for 11ac.
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * Restrict SAP to 11n if set 1 even though hostapd.conf request for 11ac.
+ *
+ * 0- Do not force 11n for 11ac.
+ * 1- Force 11n for 11ac.
+ *
+ * Supported Feature: SAP
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_SAP_FORCE_11N_FOR_11AC CFG_INI_BOOL( \
+			"gSapForce11NFor11AC", \
+			0, \
+			"Sap force 11n for 11ac")
+
+/*
+ * <ini>
+ * gGoForce11NFor11AC - Restrict GO to 11n if set 1 even though
+ * hostapd.conf request for 11ac.
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * Restrict GO to 11n if set 1 even though hostapd.conf request for 11ac.
+ *
+ * 0- Do not force 11n for 11ac.
+ * 1- Force 11n for 11ac.
+ *
+ * Supported Feature: GO
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_GO_FORCE_11N_FOR_11AC CFG_INI_BOOL( \
+			"gGoForce11NFor11AC", \
+			0, \
+			"GO force 11n for 11ac")
 
 
  #define CFG_SAP_ALL \
@@ -554,6 +604,8 @@
 	CFG(CFG_REDUCED_BEACON_INTERVAL) \
 	CFG(CFG_MAX_LI_MODULATED_DTIM) \
 	CFG(CFG_COUNTRY_CODE_PRIORITY) \
-	CFG(CFG_SAP_PREF_CHANNEL_LOCATION)
+	CFG(CFG_SAP_PREF_CHANNEL_LOCATION) \
+	CFG(CFG_SAP_FORCE_11N_FOR_11AC) \
+	CFG(CFG_GO_FORCE_11N_FOR_11AC)
 
 #endif /* __CFG_MLME_SAP_H */

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

@@ -637,6 +637,28 @@ QDF_STATUS wlan_mlme_get_sap_reduced_beacon_interval(struct wlan_objmgr_psoc
 QDF_STATUS wlan_mlme_get_sap_chan_switch_rate_enabled(struct wlan_objmgr_psoc
 						      *psoc, bool *value);
 
+/**
+ * wlan_mlme_get_sap_force_11n_for_11ac() - get the sap 11n for 11ac
+ *
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS wlan_mlme_get_sap_force_11n_for_11ac(struct wlan_objmgr_psoc
+						*psoc, bool *value);
+
+/**
+ * wlan_mlme_get_go_force_11n_for_11ac() - get the go 11n for 11ac
+ *
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS wlan_mlme_get_go_force_11n_for_11ac(struct wlan_objmgr_psoc
+					       *psoc, bool *value);
+
 /**
  * wlan_mlme_get_oce_sta_enabled_info() - Get the OCE feature enable
  * info for STA

+ 6 - 1
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -498,6 +498,8 @@ struct wlan_mlme_wps_params {
 #define MLME_CFG_TX_MGMT_RATE_DEF       0xFF
 #define MLME_CFG_TX_MGMT_2G_RATE_DEF    0xFF
 #define MLME_CFG_TX_MGMT_5G_RATE_DEF    0xFF
+#define MLME_CFG_SSID_LEN               32
+
 /**
  * struct wlan_mlme_cfg_sap - SAP related config items
  * @cfg_ssid: SSID to be configured
@@ -528,7 +530,8 @@ struct wlan_mlme_wps_params {
  * @sap_pref_chan_location: SAP Preferred channel location.
  */
 struct wlan_mlme_cfg_sap {
-	uint8_t cfg_ssid[32];
+	uint8_t cfg_ssid[MLME_CFG_SSID_LEN];
+	uint8_t cfg_ssid_len;
 	uint16_t beacon_interval;
 	uint16_t dtim_interval;
 	uint16_t listen_interval;
@@ -554,6 +557,8 @@ struct wlan_mlme_cfg_sap {
 	uint8_t max_li_modulated_dtim_time;
 	bool country_code_priority;
 	uint8_t sap_pref_chan_location;
+	bool sap_force_11n_for_11ac;
+	bool go_force_11n_for_11ac;
 };
 
 /**

+ 34 - 0
components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h

@@ -1070,6 +1070,40 @@ QDF_STATUS ucfg_mlme_get_sap_chan_switch_rate_enabled(struct wlan_objmgr_psoc
 	return wlan_mlme_get_sap_chan_switch_rate_enabled(psoc, value);
 }
 
+/**
+ * ucfg_mlme_get_sap_force_11n_for_11ac() - get the sap 11n for 11ac
+ *
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF Status
+ */
+static inline
+QDF_STATUS ucfg_mlme_get_sap_force_11n_for_11ac(struct wlan_objmgr_psoc
+						*psoc, bool *value)
+{
+	return wlan_mlme_get_sap_force_11n_for_11ac(psoc, value);
+}
+
+/**
+ * ucfg_mlme_get_go_force_11n_for_11ac() - get the GO 11n for 11ac
+ *
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF Status
+ */
+static inline
+QDF_STATUS ucfg_mlme_get_go_force_11n_for_11ac(struct wlan_objmgr_psoc
+					       *psoc, bool *value)
+{
+	return wlan_mlme_get_go_force_11n_for_11ac(psoc, value);
+}
+
 /**
  * ucfg_mlme_get_oce_sta_enabled_info() - Get OCE feature enable/disable
  * info for STA

+ 32 - 0
components/mlme/dispatcher/src/wlan_mlme_api.c

@@ -1875,6 +1875,38 @@ QDF_STATUS wlan_mlme_get_sap_chan_switch_rate_enabled(struct wlan_objmgr_psoc
 	return QDF_STATUS_SUCCESS;
 }
 
+QDF_STATUS wlan_mlme_get_sap_force_11n_for_11ac(struct wlan_objmgr_psoc
+						*psoc, bool *value)
+{
+	struct wlan_mlme_psoc_obj *mlme_obj;
+
+	mlme_obj = mlme_get_psoc_obj(psoc);
+	if (!mlme_obj) {
+		mlme_err("Failed to get MLME Obj");
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	*value = mlme_obj->cfg.sap_cfg.sap_force_11n_for_11ac;
+
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlme_get_go_force_11n_for_11ac(struct wlan_objmgr_psoc
+					       *psoc, bool *value)
+{
+	struct wlan_mlme_psoc_obj *mlme_obj;
+
+	mlme_obj = mlme_get_psoc_obj(psoc);
+	if (!mlme_obj) {
+		mlme_err("Failed to get MLME Obj");
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	*value = mlme_obj->cfg.sap_cfg.go_force_11n_for_11ac;
+
+	return QDF_STATUS_SUCCESS;
+}
+
 QDF_STATUS wlan_mlme_get_oce_sta_enabled_info(struct wlan_objmgr_psoc *psoc,
 					      bool *value)
 {

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

@@ -4702,20 +4702,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_MARK_INDOOR_AS_DISABLE_MAX      (1)
 #define CFG_MARK_INDOOR_AS_DISABLE_DEFAULT  (0)
 
-/*
- * Force softap to 11n, when gSapForce11NFor11AC is set to 1 from ini
- * despite of hostapd.conf request for 11ac
- */
-#define CFG_SAP_FORCE_11N_FOR_11AC_NAME    "gSapForce11NFor11AC"
-#define CFG_SAP_FORCE_11N_FOR_11AC_MIN     (0)
-#define CFG_SAP_FORCE_11N_FOR_11AC_MAX     (1)
-#define CFG_SAP_FORCE_11N_FOR_11AC_DEFAULT (0)
-
-#define CFG_GO_FORCE_11N_FOR_11AC_NAME    "gGoForce11NFor11AC"
-#define CFG_GO_FORCE_11N_FOR_11AC_MIN     (0)
-#define CFG_GO_FORCE_11N_FOR_11AC_MAX     (1)
-#define CFG_GO_FORCE_11N_FOR_11AC_DEFAULT (0)
-
 /*
  * sap tx leakage threshold
  * customer can set this value from 100 to 1000 which means
@@ -6686,9 +6672,6 @@ struct hdd_config {
 	bool indoor_channel_support;
 	/* control marking indoor channel passive to disable */
 	bool force_ssc_disable_indoor_channel;
-	/* parameter to force sap into 11n */
-	bool sap_force_11n_for_11ac;
-	bool go_force_11n_for_11ac;
 	uint16_t sap_tx_leakage_threshold;
 	bool sap_internal_restart;
 	enum restart_beaconing_on_ch_avoid_rule

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

@@ -1938,20 +1938,6 @@ struct reg_table_entry g_registry_table[] = {
 		CFG_SAP_TX_LEAKAGE_THRESHOLD_MIN,
 		CFG_SAP_TX_LEAKAGE_THRESHOLD_MAX),
 
-	REG_VARIABLE(CFG_SAP_FORCE_11N_FOR_11AC_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, sap_force_11n_for_11ac,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_SAP_FORCE_11N_FOR_11AC_DEFAULT,
-		     CFG_SAP_FORCE_11N_FOR_11AC_MIN,
-		     CFG_SAP_FORCE_11N_FOR_11AC_MAX),
-
-	REG_VARIABLE(CFG_GO_FORCE_11N_FOR_11AC_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, go_force_11n_for_11ac,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_GO_FORCE_11N_FOR_11AC_DEFAULT,
-		     CFG_GO_FORCE_11N_FOR_11AC_MIN,
-		     CFG_GO_FORCE_11N_FOR_11AC_MAX),
-
 	REG_VARIABLE(CFG_RESTART_BEACONING_ON_CH_AVOID_NAME, WLAN_PARAM_Integer,
 		struct hdd_config, restart_beaconing_on_chan_avoid_event,
 		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,

+ 12 - 5
core/hdd/src/wlan_hdd_cfg80211.c

@@ -2504,6 +2504,8 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 		cfg_default(CFG_USER_AUTO_CHANNEL_SELECTION);
 	bool is_external_acs_policy =
 		cfg_default(CFG_EXTERNAL_ACS_POLICY);
+	bool sap_force_11n_for_11ac = 0;
+	bool go_force_11n_for_11ac = 0;
 
 	/* ***Note*** Donot set SME config related to ACS operation here because
 	 * ACS operation is not synchronouse and ACS for Second AP may come when
@@ -2524,6 +2526,11 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 	if (ret)
 		return ret;
 
+	ucfg_mlme_get_sap_force_11n_for_11ac(hdd_ctx->psoc,
+					     &sap_force_11n_for_11ac);
+	ucfg_mlme_get_go_force_11n_for_11ac(hdd_ctx->psoc,
+					    &go_force_11n_for_11ac);
+
 	hdd_debug("current country is %s", hdd_ctx->reg.alpha2);
 
 	if (!((adapter->device_mode == QDF_SAP_MODE) ||
@@ -2579,9 +2586,9 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 		vht_enabled = 0;
 
 	if (((adapter->device_mode == QDF_SAP_MODE) &&
-	     (hdd_ctx->config->sap_force_11n_for_11ac)) ||
-	     ((adapter->device_mode == QDF_P2P_GO_MODE) &&
-	     (hdd_ctx->config->go_force_11n_for_11ac))) {
+	      sap_force_11n_for_11ac) ||
+	    ((adapter->device_mode == QDF_P2P_GO_MODE) &&
+	      go_force_11n_for_11ac)) {
 		vht_enabled = 0;
 		hdd_info("VHT is Disabled in ACS");
 	}
@@ -2731,10 +2738,10 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 	if (ht_enabled &&
 	    sap_config->acs_cfg.end_ch >= WLAN_REG_CH_NUM(CHAN_ENUM_36) &&
 	    ((adapter->device_mode == QDF_SAP_MODE &&
-	      !hdd_ctx->config->sap_force_11n_for_11ac &&
+	      !sap_force_11n_for_11ac &&
 	      hdd_ctx->config->sap_11ac_override) ||
 	      (adapter->device_mode == QDF_P2P_GO_MODE &&
-	      !hdd_ctx->config->go_force_11n_for_11ac &&
+	      !go_force_11n_for_11ac &&
 	      hdd_ctx->config->go_11ac_override))) {
 		vht_enabled = 1;
 		sap_config->acs_cfg.hw_mode = eCSR_DOT11_MODE_11ac;

+ 20 - 6
core/hdd/src/wlan_hdd_hostapd.c

@@ -4217,6 +4217,13 @@ static int wlan_hdd_sap_p2p_11ac_overrides(struct hdd_adapter *ap_adapter)
 	uint8_t ch_width;
 	uint8_t sub_20_chan_width;
 	QDF_STATUS status;
+	bool sap_force_11n_for_11ac = 0;
+	bool go_force_11n_for_11ac = 0;
+
+	ucfg_mlme_get_sap_force_11n_for_11ac(hdd_ctx->psoc,
+					     &sap_force_11n_for_11ac);
+	ucfg_mlme_get_go_force_11n_for_11ac(hdd_ctx->psoc,
+					    &go_force_11n_for_11ac);
 
 	/* Fixed channel 11AC override:
 	 * 11AC override in qcacld is introduced for following reasons:
@@ -4245,10 +4252,10 @@ static int wlan_hdd_sap_p2p_11ac_overrides(struct hdd_adapter *ap_adapter)
 	    sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ax ||
 	    sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ax_ONLY) &&
 	    ((ap_adapter->device_mode == QDF_SAP_MODE &&
-	    !hdd_ctx->config->sap_force_11n_for_11ac &&
+	    !sap_force_11n_for_11ac &&
 	    hdd_ctx->config->sap_11ac_override) ||
 	    (ap_adapter->device_mode == QDF_P2P_GO_MODE &&
-	    !hdd_ctx->config->go_force_11n_for_11ac &&
+	    !go_force_11n_for_11ac &&
 	    hdd_ctx->config->go_11ac_override))) {
 		hdd_debug("** Driver force 11AC override for SAP/Go **");
 
@@ -4629,11 +4636,18 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 		cfg_default(CFG_AUTO_CHANNEL_SELECT_WEIGHT);
 	bool bval = false;
 	uint8_t pref_chan_location = 0;
+	bool sap_force_11n_for_11ac = 0;
+	bool go_force_11n_for_11ac = 0;
 
 	hdd_enter();
 
 	hdd_notify_teardown_tdls_links(adapter->vdev);
 
+	ucfg_mlme_get_sap_force_11n_for_11ac(hdd_ctx->psoc,
+					     &sap_force_11n_for_11ac);
+	ucfg_mlme_get_go_force_11n_for_11ac(hdd_ctx->psoc,
+					    &go_force_11n_for_11ac);
+
 	if (policy_mgr_is_hw_mode_change_in_progress(hdd_ctx->psoc)) {
 		status = policy_mgr_wait_for_connection_update(
 			hdd_ctx->psoc);
@@ -5131,9 +5145,9 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 		pConfig->SapHw_mode = eCSR_DOT11_MODE_11ac;
 
 	if (((adapter->device_mode == QDF_SAP_MODE) &&
-	     (hdd_ctx->config->sap_force_11n_for_11ac)) ||
+	     (sap_force_11n_for_11ac)) ||
 	     ((adapter->device_mode == QDF_P2P_GO_MODE) &&
-	     (hdd_ctx->config->go_force_11n_for_11ac))) {
+	     (go_force_11n_for_11ac))) {
 		if (pConfig->SapHw_mode == eCSR_DOT11_MODE_11ac ||
 		    pConfig->SapHw_mode == eCSR_DOT11_MODE_11ac_ONLY)
 			pConfig->SapHw_mode = eCSR_DOT11_MODE_11n;
@@ -5156,9 +5170,9 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 	sme_update_config(mac_handle, sme_config);
 
 	if (!((adapter->device_mode == QDF_SAP_MODE) &&
-	     (hdd_ctx->config->sap_force_11n_for_11ac)) ||
+	     (sap_force_11n_for_11ac)) ||
 	     ((adapter->device_mode == QDF_P2P_GO_MODE) &&
-	     (hdd_ctx->config->go_force_11n_for_11ac))) {
+	     (go_force_11n_for_11ac))) {
 		pConfig->ch_width_orig =
 			hdd_map_nl_chan_width(pConfig->ch_width_orig);
 	} else {

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

@@ -25,7 +25,6 @@
 
 enum {
 	WNI_CFG_STA_ID,
-	WNI_CFG_SSID,
 	WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME,
 	WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME,
 	WNI_CFG_DOT11_MODE,
@@ -63,7 +62,6 @@ enum {
  */
 
 #define WNI_CFG_STA_ID_LEN    6
-#define WNI_CFG_SSID_LEN    32
 #define WNI_CFG_PROPRIETARY_OPERATIONAL_RATE_SET_LEN    4
 #define WNI_CFG_VALID_CHANNEL_LIST_LEN    100
 #define WNI_CFG_MAX_TX_POWER_2_4_LEN    128

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

@@ -40,7 +40,6 @@ const char *cfg_get_string(uint16_t cfg_id)
 	default:
 		break;
 	CASE_RETURN_STRING(WNI_CFG_STA_ID);
-	CASE_RETURN_STRING(WNI_CFG_SSID);
 	CASE_RETURN_STRING(WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME);
 	CASE_RETURN_STRING(WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME);
 	CASE_RETURN_STRING(WNI_CFG_DOT11_MODE);

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

@@ -29,9 +29,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
 	{WNI_CFG_STA_ID,
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_RELOAD,
 	0, 255, 1},
-	{WNI_CFG_SSID,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_RESTART,
-	0, 255, 6},
 	{WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME,
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
 	WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME_STAMIN,
@@ -176,10 +173,6 @@ cfgstatic_string cfg_static_string[CFG_MAX_STATIC_STRING] = {
 	WNI_CFG_STA_ID_LEN,
 	6,
 	{0x22, 0x22, 0x44, 0x44, 0x33, 0x33} },
-	{WNI_CFG_SSID,
-	WNI_CFG_SSID_LEN,
-	10,
-	{1, 2, 3, 4, 5, 6, 7, 8, 9, 0} },
 	{WNI_CFG_VALID_CHANNEL_LIST,
 	WNI_CFG_VALID_CHANNEL_LIST_LEN,
 	55,

+ 3 - 4
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -1450,11 +1450,10 @@ populate_dot11f_ssid(tpAniSirGlobal pMac,
 
 QDF_STATUS populate_dot11f_ssid2(tpAniSirGlobal pMac, tDot11fIESSID *pDot11f)
 {
-	uint32_t nCfg;
-	QDF_STATUS nSirStatus;
 
-	CFG_GET_STR(nSirStatus, pMac, WNI_CFG_SSID, pDot11f->ssid, nCfg, 32);
-	pDot11f->num_ssid = (uint8_t) nCfg;
+	qdf_mem_copy(pDot11f->ssid, pMac->mlme_cfg->sap_cfg.cfg_ssid,
+		     pMac->mlme_cfg->sap_cfg.cfg_ssid_len);
+	pDot11f->num_ssid = pMac->mlme_cfg->sap_cfg.cfg_ssid_len;
 	pDot11f->present = 1;
 	return QDF_STATUS_SUCCESS;
 } /* End populate_dot11f_ssid2. */

+ 1 - 1
core/sme/inc/csr_internal.h

@@ -231,7 +231,7 @@ struct scan_profile       {
 	uint8_t *pChannelList;
 	tSirScanType scanType;
 	eCsrRoamBssType bssType;
-	uint8_t ssid[WNI_CFG_SSID_LEN];
+	uint8_t ssid[MLME_CFG_SSID_LEN];
 	uint8_t bReturnAfter1stMatch;
 	uint8_t fUniqueResult;
 	uint8_t freshScan;

+ 8 - 2
core/sme/src/csr/csr_api_roam.c

@@ -4654,9 +4654,15 @@ static void csr_set_cfg_ssid(tpAniSirGlobal pMac, tSirMacSSid *pSSID)
 {
 	uint32_t len = 0;
 
-	if (pSSID->length <= WNI_CFG_SSID_LEN)
+	if (pSSID->length <= MLME_CFG_SSID_LEN)
 		len = pSSID->length;
-	cfg_set_str(pMac, WNI_CFG_SSID, (uint8_t *) pSSID->ssId, len);
+	else
+		len = MLME_CFG_SSID_LEN;
+
+	qdf_mem_copy(pMac->mlme_cfg->sap_cfg.cfg_ssid,
+		     (uint8_t *)pSSID->ssId, len);
+	pMac->mlme_cfg->sap_cfg.cfg_ssid_len = len;
+
 }
 
 static QDF_STATUS csr_set_qos_to_cfg(tpAniSirGlobal pMac, uint32_t sessionId,