Ver Fonte

qcacld-3.0: Remove unused params from struct sap_config

Remove unused params from struct sap_config.

Change-Id: I1c7045d8ac32d848cc07c5ae3b70b96cf65a934a
CRs-Fixed: 2989769
Utkarsh Bhatnagar há 3 anos atrás
pai
commit
1f0cb49790
3 ficheiros alterados com 4 adições e 71 exclusões
  1. 3 40
      core/hdd/src/wlan_hdd_hostapd.c
  2. 0 12
      core/sap/inc/sap_api.h
  3. 1 19
      core/sap/src/sap_module.c

+ 3 - 40
core/hdd/src/wlan_hdd_hostapd.c

@@ -5473,26 +5473,6 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 				mlme_set_bigtk_support(adapter->vdev, true);
 		}
 
-		ie = wlan_get_ie_ptr_from_eid(WLAN_EID_COUNTRY,
-					      beacon->tail, beacon->tail_len);
-		if ((adapter->device_mode == QDF_SAP_MODE) && ie) {
-			if (ie[1] < IEEE80211_COUNTRY_IE_MIN_LEN) {
-				hdd_err("Invalid Country IE len: %d", ie[1]);
-				ret = -EINVAL;
-				goto error;
-			}
-
-			if (!qdf_mem_cmp(hdd_ctx->reg.alpha2, &ie[2],
-					 REG_ALPHA2_LEN))
-				config->ieee80211d = 1;
-			else
-				config->ieee80211d = 0;
-		} else
-			config->ieee80211d = 0;
-
-		config->countryCode[0] = hdd_ctx->reg.alpha2[0];
-		config->countryCode[1] = hdd_ctx->reg.alpha2[1];
-
 		/* Overwrite second AP's channel with first only when:
 		 * 1. If operating mode is single mac
 		 * 2. or if 2nd AP is coming up on 5G band channel
@@ -5539,8 +5519,6 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 		wlansap_set_dfs_preferred_channel_location(mac_handle);
 
 		wlan_hdd_set_sap_mcc_chnl_avoid(hdd_ctx);
-	} else {
-		config->ieee80211d = 0;
 	}
 
 	tgt_dfs_set_tx_leakage_threshold(hdd_ctx->pdev);
@@ -5580,9 +5558,6 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 	}
 	/* Forward WPS PBC probe request frame up */
 	config->fwdWPSPBCProbeReq = 1;
-
-	config->RSNEncryptType = eCSR_ENCRYPT_TYPE_NONE;
-	config->mcRSNEncryptType = eCSR_ENCRYPT_TYPE_NONE;
 	(WLAN_HDD_GET_AP_CTX_PTR(adapter))->encryption_type =
 		eCSR_ENCRYPT_TYPE_NONE;
 
@@ -5617,8 +5592,6 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 			/* Now copy over all the security attributes you have
 			 * parsed out. Use the cipher type in the RSN IE
 			 */
-			config->RSNEncryptType = rsn_encrypt_type;
-			config->mcRSNEncryptType = mc_rsn_encrypt_type;
 			(WLAN_HDD_GET_AP_CTX_PTR(adapter))->
 			encryption_type = rsn_encrypt_type;
 			hdd_debug("CSR Encryption: %d mcEncryption: %d num_akm_suites:%d",
@@ -5665,12 +5638,6 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 					 config->RSNWPAReqIE);
 
 			if (QDF_STATUS_SUCCESS == status) {
-				/* Now copy over all the security attributes
-				 * you have parsed out. Use the cipher type
-				 * in the RSN IE
-				 */
-				config->RSNEncryptType = rsn_encrypt_type;
-				config->mcRSNEncryptType = mc_rsn_encrypt_type;
 				(WLAN_HDD_GET_AP_CTX_PTR(adapter))->
 				encryption_type = rsn_encrypt_type;
 				hdd_debug("CSR Encryption: %d mcEncryption: %d num_akm_suites:%d",
@@ -5893,12 +5860,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 		goto error;
 	}
 
-	config->mfpCapable = mfp_capable;
-	config->mfpRequired = mfp_required;
-	hdd_debug("Soft AP MFP capable %d, MFP required %d",
-		  config->mfpCapable, config->mfpRequired);
-
-	hdd_nofl_debug("SAP mac:" QDF_MAC_ADDR_FMT " SSID: %.*s BCNINTV:%d Freq:%d freq_seg0:%d freq_seg1:%d ch_width:%d HW mode:%d privacy:%d akm:%d acs_mode:%d acs_dfs_mode %d dtim period:%d",
+	hdd_nofl_debug("SAP mac:" QDF_MAC_ADDR_FMT " SSID: %.*s BCNINTV:%d Freq:%d freq_seg0:%d freq_seg1:%d ch_width:%d HW mode:%d privacy:%d akm:%d acs_mode:%d acs_dfs_mode %d dtim period:%d MFPC %d, MFPR %d",
 		       QDF_MAC_ADDR_REF(adapter->mac_addr.bytes),
 		       config->SSIDinfo.ssid.length,
 		       config->SSIDinfo.ssid.ssId, (int)config->beacon_int,
@@ -5907,7 +5869,8 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 		       config->ch_params.ch_width,
 		       config->SapHw_mode, config->privacy,
 		       config->authType, config->acs_cfg.acs_mode,
-		       config->acs_dfs_mode, config->dtim_period);
+		       config->acs_dfs_mode, config->dtim_period,
+		       mfp_capable, mfp_required);
 
 	mutex_lock(&hdd_ctx->sap_lock);
 	if (cds_is_driver_unloading()) {

+ 0 - 12
core/sap/inc/sap_api.h

@@ -474,23 +474,17 @@ struct sap_config {
 	eCsrPhyMode SapHw_mode;         /* Wireless Mode */
 	eSapMacAddrACL SapMacaddr_acl;
 	struct qdf_mac_addr accept_mac[MAX_ACL_MAC_ADDRESS]; /* MAC filtering */
-	bool ieee80211d;      /* Specify if 11D is enabled or disabled */
 	struct qdf_mac_addr deny_mac[MAX_ACL_MAC_ADDRESS];  /* MAC filtering */
 	struct qdf_mac_addr self_macaddr;       /* self macaddress or BSSID */
 	uint32_t chan_freq;          /* Operation channel frequency */
 	uint32_t sec_ch_freq;
 	struct ch_params ch_params;
 	uint32_t ch_width_orig;
-	uint8_t max_num_sta;      /* maximum number of STAs in station table */
 	uint8_t dtim_period;      /* dtim interval */
 	uint16_t num_accept_mac;
 	uint16_t num_deny_mac;
 	/* Max ie length 255 * 2(WPA+RSN) + 2 bytes(vendor specific ID) * 2 */
 	uint8_t RSNWPAReqIE[(WLAN_MAX_IE_LEN * 2) + 4];
-	/* it is ignored if [0] is 0. */
-	uint8_t countryCode[REG_ALPHA2_LEN + 1];
-	uint8_t RSNEncryptType;
-	uint8_t mcRSNEncryptType;
 	eSapAuthType authType;
 	tCsrAuthList akm_list;
 	bool privacy;
@@ -501,8 +495,6 @@ struct sap_config {
 	uint32_t beacon_int;            /* Beacon Interval */
 	enum QDF_OPMODE persona; /* Tells us which persona, GO or AP */
 	bool enOverLapCh;
-	bool mfpRequired;
-	bool mfpCapable;
 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
 	uint8_t cc_switch_mode;
 #endif
@@ -518,10 +510,6 @@ struct sap_config {
 	void *pProbeRespBcnIEsBuffer;
 	uint16_t beacon_tx_rate;
 	uint8_t *vendor_ie;
-	uint16_t sta_inactivity_timeout;
-	uint16_t tx_pkt_fail_cnt_threshold;
-	uint8_t short_retry_limit;
-	uint8_t long_retry_limit;
 	tSirMacRateSet supported_rates;
 	tSirMacRateSet extended_rates;
 	enum sap_acs_dfs_mode acs_dfs_mode;

+ 1 - 19
core/sap/src/sap_module.c

@@ -700,24 +700,6 @@ void wlan_sap_set_sap_ctx_acs_cfg(struct sap_context *sap_ctx,
 	sap_ctx->acs_cfg = &sap_config->acs_cfg;
 }
 
-#ifdef WLAN_CONV_CRYPTO_SUPPORTED
-static inline QDF_STATUS
-wlansap_set_vdev_crypto_prarams_from_ie(struct wlan_objmgr_vdev *vdev,
-					uint8_t *ie_ptr,
-					uint16_t ie_len)
-{
-	return wlan_set_vdev_crypto_prarams_from_ie(vdev, ie_ptr, ie_len);
-}
-#else
-static inline QDF_STATUS
-wlansap_set_vdev_crypto_prarams_from_ie(struct wlan_objmgr_vdev *vdev,
-					uint8_t *ie_ptr,
-					uint16_t ie_len)
-{
-	return QDF_STATUS_SUCCESS;
-}
-#endif
-
 QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
 			     sap_event_cb sap_event_cb,
 			     struct sap_config *config, void *user_context)
@@ -745,7 +727,7 @@ QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
 
 	sap_ctx->fsm_state = SAP_INIT;
 
-	qdf_status = wlansap_set_vdev_crypto_prarams_from_ie(
+	qdf_status = wlan_set_vdev_crypto_prarams_from_ie(
 			sap_ctx->vdev,
 			config->RSNWPAReqIE,
 			config->RSNWPAReqIELength);