Ver Fonte

qcacld-3.0: Remove WLAN_FEATURE_VOWIFI_11R option from HDD

Conditional compilation option WLAN_FEATURE_VOWIFI_11R is always
defined in cld3.0 and underlying code is permanent in the driver.
Hence, remove #ifdef WLAN_FEATURE_VOWIFI_11R check from HDD source
code.

CRs-Fixed: 960105
Change-Id: Ifdad17f5b85148dfa4bb459939168beec4b5b1cf
Deepak Dhamdhere há 9 anos atrás
pai
commit
9f09e75f87

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

@@ -840,12 +840,10 @@ typedef enum {
 #define CFG_QOS_IMPLICIT_SETUP_ENABLED_MAX                  (1)
 #define CFG_QOS_IMPLICIT_SETUP_ENABLED_DEFAULT              (1)
 
-#if defined WLAN_FEATURE_VOWIFI_11R
 #define CFG_FT_RESOURCE_REQ_NAME                        "gFTResourceReqSupported"
 #define CFG_FT_RESOURCE_REQ_MIN                         (0)
 #define CFG_FT_RESOURCE_REQ_MAX                         (1)
 #define CFG_FT_RESOURCE_REQ_DEFAULT                     (0)
-#endif
 
 #define CFG_TELE_BCN_TRANS_LI_NAME                   "telescopicBeaconTransListenInterval"
 #define CFG_TELE_BCN_TRANS_LI_MIN                    (0)
@@ -2945,10 +2943,8 @@ struct hdd_config {
 	char rm_capability[3 * DOT11F_IE_RRMENABLEDCAP_MAX_LEN];
 #endif
 
-#ifdef WLAN_FEATURE_VOWIFI_11R
 	/* Vowifi 11r params */
 	bool fFTResourceReqSupported;
-#endif
 
 	uint16_t nNeighborScanPeriod;
 	uint8_t nNeighborLookupRssiThreshold;

+ 8 - 33
core/hdd/src/wlan_hdd_assoc.c

@@ -99,11 +99,9 @@ uint8_t ccp_rsn_oui07[HDD_RSN_OUI_SIZE] = { 0x00, 0x0F, 0xAC, 0x06 };
 uint8_t ccp_rsn_oui08[HDD_RSN_OUI_SIZE] = { 0x00, 0x0F, 0xAC, 0x05 };
 #endif
 
-#if defined(WLAN_FEATURE_VOWIFI_11R)
 /* Offset where the EID-Len-IE, start. */
 #define FT_ASSOC_RSP_IES_OFFSET 6  /* Capability(2) + AID(2) + Status Code(2) */
 #define FT_ASSOC_REQ_IES_OFFSET 4  /* Capability(2) + LI(2) */
-#endif
 
 #define BEACON_FRAME_IES_OFFSET 12
 #define HDD_PEER_AUTHORIZE_WAIT 10
@@ -400,7 +398,6 @@ hdd_conn_save_connect_info(hdd_adapter_t *pAdapter, tCsrRoamInfo *pRoamInfo,
 	hdd_conn_save_connected_bss_type(pHddStaCtx, eBssType);
 }
 
-#if defined(WLAN_FEATURE_VOWIFI_11R)
 /**
  * hdd_send_ft_assoc_response() - send fast transition assoc response
  * @dev: pointer to net device
@@ -461,9 +458,7 @@ hdd_send_ft_assoc_response(struct net_device *dev,
 
 	kfree(buff);
 }
-#endif /* WLAN_FEATURE_VOWIFI_11R */
 
-#ifdef WLAN_FEATURE_VOWIFI_11R
 /**
  * hdd_send_ft_event() - send fast transition event
  * @pAdapter: pointer to adapter
@@ -575,8 +570,6 @@ static void hdd_send_ft_event(hdd_adapter_t *pAdapter)
 #endif
 }
 
-#endif /* WLAN_FEATURE_VOWIFI_11R */
-
 #ifdef FEATURE_WLAN_ESE
 /**
  * hdd_send_new_ap_channel_info() - send new ap channel info
@@ -708,12 +701,10 @@ static void hdd_send_association_event(struct net_device *dev,
 	char *msg;
 	struct cdf_mac_addr peerMacAddr;
 
-#ifdef WLAN_FEATURE_VOWIFI_11R
 	/* Added to find the auth type on the fly at run time */
 	/* rather than with cfg to see if FT is enabled */
 	hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
 	tCsrRoamProfile *pRoamProfile = &(pWextState->roamProfile);
-#endif
 
 	memset(&wrqu, '\0', sizeof(wrqu));
 	wrqu.ap_addr.sa_family = ARPHRD_ETHER;
@@ -762,10 +753,9 @@ static void hdd_send_association_event(struct net_device *dev,
 		/*
 		 * Send IWEVASSOCRESPIE Event if WLAN_FEATURE_CIQ_METRICS
 		 * is Enabled Or Send IWEVASSOCRESPIE Event if
-		 * WLAN_FEATURE_VOWIFI_11R is Enabled and fFTEnable is true.
+		 * fFTEnable is true.
+		 * Send FT Keys to the supplicant when FT is enabled
 		 */
-#ifdef WLAN_FEATURE_VOWIFI_11R
-		/* Send FT Keys to the supplicant when FT is enabled */
 		if ((pRoamProfile->AuthType.authType[0] ==
 		     eCSR_AUTH_TYPE_FT_RSN_PSK)
 		    || (pRoamProfile->AuthType.authType[0] ==
@@ -779,7 +769,6 @@ static void hdd_send_association_event(struct net_device *dev,
 		    ) {
 			hdd_send_ft_assoc_response(dev, pAdapter, pCsrRoamInfo);
 		}
-#endif
 		if (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT) {
 			tSirSmeChanInfo chan_info;
 			cdf_copy_macaddr(&peerMacAddr,
@@ -1089,9 +1078,7 @@ static CDF_STATUS hdd_dis_connect_handler(hdd_adapter_t *pAdapter,
 	}
 
 	hdd_wmm_adapter_clear(pAdapter);
-#if defined(WLAN_FEATURE_VOWIFI_11R)
 	sme_ft_reset(WLAN_HDD_GET_HAL_CTX(pAdapter), pAdapter->sessionId);
-#endif
 	if (eCSR_ROAM_IBSS_LEAVE == roamStatus) {
 		uint8_t i;
 		sta_id = pHddStaCtx->broadcast_ibss_staid;
@@ -1849,13 +1836,11 @@ static CDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
 		 */
 		if (!pRoamInfo->fReassocReq) {
 			struct cfg80211_bss *bss;
-#ifdef WLAN_FEATURE_VOWIFI_11R
 			u8 *pFTAssocRsp = NULL;
 			unsigned int assocRsplen = 0;
 			u8 *pFTAssocReq = NULL;
 			unsigned int assocReqlen = 0;
 			struct ieee80211_channel *chan;
-#endif
 			uint8_t rspRsnIe[DOT11F_IE_RSN_MAX_LEN];
 			uint32_t rspRsnLength = DOT11F_IE_RSN_MAX_LEN;
 
@@ -1870,7 +1855,6 @@ static CDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
 					WLAN_CONTROL_PATH);
 				return CDF_STATUS_E_FAILURE;
 			}
-#ifdef WLAN_FEATURE_VOWIFI_11R
 			if (pRoamInfo->u.pConnectedProfile->AuthType ==
 			    eCSR_AUTH_TYPE_FT_RSN
 			    || pRoamInfo->u.pConnectedProfile->AuthType ==
@@ -2028,9 +2012,7 @@ static CDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
 								WLAN_STATUS_SUCCESS,
 								GFP_KERNEL);
 				}
-			} else
-#endif
-			{
+			} else {
 				/*
 				 * wpa supplicant expecting WPA/RSN IE in
 				 * connect result.
@@ -4075,11 +4057,11 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId,
 			pRoamInfo->roamSynchInProgress = false;
 #endif
 		break;
-#ifdef WLAN_FEATURE_VOWIFI_11R
+
 	case eCSR_ROAM_FT_RESPONSE:
 		hdd_send_ft_event(pAdapter);
 		break;
-#endif
+
 	case eCSR_ROAM_PMK_NOTIFY:
 		if (eCSR_AUTH_TYPE_RSN == pHddStaCtx->conn_info.authType
 				|| hdd_is_8021x_sha256_auth_type(pHddStaCtx)) {
@@ -4208,16 +4190,13 @@ eCsrAuthType hdd_translate_rsn_to_csr_auth_type(uint8_t auth_suite[4])
 		auth_type = eCSR_AUTH_TYPE_RSN;
 	} else if (memcmp(auth_suite, ccp_rsn_oui02, 4) == 0) {
 		auth_type = eCSR_AUTH_TYPE_RSN_PSK;
-	} else
-#ifdef WLAN_FEATURE_VOWIFI_11R
-	if (memcmp(auth_suite, ccp_rsn_oui04, 4) == 0) {
+	} else if (memcmp(auth_suite, ccp_rsn_oui04, 4) == 0) {
 		/* Check for 11r FT Authentication with PSK */
 		auth_type = eCSR_AUTH_TYPE_FT_RSN_PSK;
 	} else if (memcmp(auth_suite, ccp_rsn_oui03, 4) == 0) {
 		/* Check for 11R FT Authentication with 802.1X */
 		auth_type = eCSR_AUTH_TYPE_FT_RSN;
 	} else
-#endif
 #ifdef FEATURE_WLAN_ESE
 	if (memcmp(auth_suite, ccp_rsn_oui06, 4) == 0) {
 		auth_type = eCSR_AUTH_TYPE_CCKM_RSN;
@@ -4625,7 +4604,6 @@ int hdd_set_csr_auth_type(hdd_adapter_t *pAdapter, eCsrAuthType RSNAuthType)
 			} else
 #endif
 
-#ifdef WLAN_FEATURE_VOWIFI_11R
 			if ((RSNAuthType == eCSR_AUTH_TYPE_FT_RSN) &&
 			    ((pWextState->
 			      authKeyMgmt & IW_AUTH_KEY_MGMT_802_1X)
@@ -4640,7 +4618,6 @@ int hdd_set_csr_auth_type(hdd_adapter_t *pAdapter, eCsrAuthType RSNAuthType)
 				pRoamProfile->AuthType.authType[0] =
 					eCSR_AUTH_TYPE_FT_RSN_PSK;
 			} else
-#endif
 
 #ifdef WLAN_FEATURE_11W
 			if (RSNAuthType == eCSR_AUTH_TYPE_RSN_PSK_SHA256) {
@@ -5251,9 +5228,8 @@ static int __iw_get_auth(struct net_device *dev, struct iw_request_info *info,
 		wrqu->param.flags = IW_AUTH_WPA_VERSION;
 		wrqu->param.value = IW_AUTH_WPA_VERSION_WPA;
 		break;
-#ifdef WLAN_FEATURE_VOWIFI_11R
+
 	case eCSR_AUTH_TYPE_FT_RSN:
-#endif
 	case eCSR_AUTH_TYPE_RSN:
 		wrqu->param.flags = IW_AUTH_WPA_VERSION;
 		wrqu->param.value = IW_AUTH_WPA_VERSION_WPA2;
@@ -5275,9 +5251,8 @@ static int __iw_get_auth(struct net_device *dev, struct iw_request_info *info,
 		hddLog(LOG1, FL("called with WPA PSK auth type"));
 		wrqu->param.value = IW_AUTH_ALG_OPEN_SYSTEM;
 		return -EIO;
-#ifdef WLAN_FEATURE_VOWIFI_11R
+
 	case eCSR_AUTH_TYPE_FT_RSN_PSK:
-#endif
 	case eCSR_AUTH_TYPE_RSN_PSK:
 #ifdef WLAN_FEATURE_11W
 	case eCSR_AUTH_TYPE_RSN_PSK_SHA256:

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

@@ -1322,14 +1322,12 @@ REG_TABLE_ENTRY g_registry_table[] = {
 			    (void *) CFG_RM_CAPABILITY_DEFAULT),
 #endif
 
-#ifdef WLAN_FEATURE_VOWIFI_11R
 	REG_VARIABLE(CFG_FT_RESOURCE_REQ_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, fFTResourceReqSupported,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
 		     CFG_FT_RESOURCE_REQ_DEFAULT,
 		     CFG_FT_RESOURCE_REQ_MIN,
 		     CFG_FT_RESOURCE_REQ_MAX),
-#endif
 
 	REG_DYNAMIC_VARIABLE(CFG_NEIGHBOR_SCAN_TIMER_PERIOD_NAME,
 			     WLAN_PARAM_Integer,
@@ -4768,11 +4766,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
 		  "Name = [IsRArateLimitEnabled] Value = [%u] ",
 		  pHddCtx->config->IsRArateLimitEnabled);
 #endif
-#ifdef WLAN_FEATURE_VOWIFI_11R
 	CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_INFO_HIGH,
 		  "Name = [fFTResourceReqSupported] Value = [%u] ",
 		  pHddCtx->config->fFTResourceReqSupported);
-#endif
 
 	CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_INFO_HIGH,
 		  "Name = [nNeighborLookupRssiThreshold] Value = [%u] ",
@@ -6517,10 +6513,8 @@ CDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
 
 	hdd_set_power_save_offload_config(pHddCtx);
 
-#ifdef WLAN_FEATURE_VOWIFI_11R
 	smeConfig->csrConfig.csr11rConfig.IsFTResourceReqSupported =
 		pConfig->fFTResourceReqSupported;
-#endif
 	smeConfig->csrConfig.isFastRoamIniFeatureEnabled =
 		pConfig->isFastRoamIniFeatureEnabled;
 	smeConfig->csrConfig.MAWCEnabled = pConfig->MAWCEnabled;

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

@@ -131,10 +131,8 @@
 		.flags = flag, \
 	}
 
-#ifdef WLAN_FEATURE_VOWIFI_11R
 #define WLAN_AKM_SUITE_FT_8021X         0x000FAC03
 #define WLAN_AKM_SUITE_FT_PSK           0x000FAC04
-#endif
 
 #define HDD_CHANNEL_14 14
 
@@ -6825,7 +6823,6 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
 		       MAC_ADDR_ARRAY(setKey.peerMac.bytes),
 		       setKey.keyDirection);
 
-#ifdef WLAN_FEATURE_VOWIFI_11R
 		/* The supplicant may attempt to set the PTK once pre-authentication
 		   is done. Save the key in the UMAC and include it in the ADD BSS
 		   request */
@@ -6840,7 +6837,6 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
 			       "%s: Update PreAuth Key failed", __func__);
 			return -EINVAL;
 		}
-#endif /* WLAN_FEATURE_VOWIFI_11R */
 
 		/* issue set key request to SME */
 		status = sme_roam_set_key(WLAN_HDD_GET_HAL_CTX(pAdapter),
@@ -8087,9 +8083,7 @@ static int wlan_hdd_cfg80211_set_auth_type(hdd_adapter_t *pAdapter,
 		break;
 
 	case NL80211_AUTHTYPE_OPEN_SYSTEM:
-#ifdef WLAN_FEATURE_VOWIFI_11R
 	case NL80211_AUTHTYPE_FT:
-#endif /* WLAN_FEATURE_VOWIFI_11R */
 		hddLog(LOG1,
 		       FL("set authentication type to OPEN"));
 		pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM;
@@ -8141,18 +8135,14 @@ static int wlan_hdd_set_akm_suite(hdd_adapter_t *pAdapter, u32 key_mgmt)
 	switch (key_mgmt) {
 	case WLAN_AKM_SUITE_PSK:
 	case WLAN_AKM_SUITE_PSK_SHA256:
-#ifdef WLAN_FEATURE_VOWIFI_11R
 	case WLAN_AKM_SUITE_FT_PSK:
-#endif
 		hddLog(LOG1, FL("setting key mgmt type to PSK"));
 		pWextState->authKeyMgmt |= IW_AUTH_KEY_MGMT_PSK;
 		break;
 
 	case WLAN_AKM_SUITE_8021X_SHA256:
 	case WLAN_AKM_SUITE_8021X:
-#ifdef WLAN_FEATURE_VOWIFI_11R
 	case WLAN_AKM_SUITE_FT_8021X:
-#endif
 		hddLog(LOG1,
 		       FL("setting key mgmt type to 8021x"));
 		pWextState->authKeyMgmt |= IW_AUTH_KEY_MGMT_802_1X;
@@ -10354,7 +10344,7 @@ static int wlan_hdd_cfg80211_flush_pmksa(struct wiphy *wiphy,
 	return ret;
 }
 
-#if defined(WLAN_FEATURE_VOWIFI_11R) && defined(KERNEL_SUPPORT_11R_CFG80211)
+#if defined(KERNEL_SUPPORT_11R_CFG80211)
 /**
  * __wlan_hdd_cfg80211_update_ft_ies() - update fast transition ies
  * @wiphy: Pointer to wiphy
@@ -11297,7 +11287,7 @@ static struct cfg80211_ops wlan_hdd_cfg80211_ops = {
 	.set_pmksa = wlan_hdd_cfg80211_set_pmksa,
 	.del_pmksa = wlan_hdd_cfg80211_del_pmksa,
 	.flush_pmksa = wlan_hdd_cfg80211_flush_pmksa,
-#if defined(WLAN_FEATURE_VOWIFI_11R) && defined(KERNEL_SUPPORT_11R_CFG80211)
+#if defined(KERNEL_SUPPORT_11R_CFG80211)
 	.update_ft_ies = wlan_hdd_cfg80211_update_ft_ies,
 #endif
 #ifdef FEATURE_WLAN_TDLS

+ 0 - 2
core/hdd/src/wlan_hdd_ioctl.c

@@ -6114,10 +6114,8 @@ static const hdd_drv_cmd_t hdd_drv_cmds[] = {
 	{"SETROAMRESCANRSSIDIFF",     drv_cmd_set_roam_rescan_rssi_diff},
 	{"GETROAMRESCANRSSIDIFF",     drv_cmd_get_roam_rescan_rssi_diff},
 	{"SETFASTROAM",               drv_cmd_set_fast_roam},
-#ifdef WLAN_FEATURE_VOWIFI_11R
 	{"SETFASTTRANSITION",         drv_cmd_set_fast_transition},
 	{"FASTREASSOC",               drv_cmd_fast_reassoc},
-#endif
 #if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
 	{"CCXPLMREQ",                 drv_cmd_ccx_plm_req},
 #endif

+ 0 - 12
core/hdd/src/wlan_hdd_wext.c

@@ -392,9 +392,7 @@ static const hdd_freq_chan_map_t freq_chan_map[] = {
 /* (SIOCIWFIRSTPRIV + 17) is currently unused */
 /* (SIOCIWFIRSTPRIV + 19) is currently unused */
 
-#ifdef WLAN_FEATURE_VOWIFI_11R
 #define WLAN_PRIV_SET_FTIES             (SIOCIWFIRSTPRIV + 20)
-#endif
 
 /* Private ioctl for setting the host offload feature */
 #define WLAN_PRIV_SET_HOST_OFFLOAD (SIOCIWFIRSTPRIV + 18)
@@ -924,15 +922,11 @@ static bool hdd_is_auth_type_rsn(eCsrAuthType authType)
 	case eCSR_AUTH_TYPE_WPA_NONE:
 		rsnType = true;
 		break;
-#ifdef WLAN_FEATURE_VOWIFI_11R
 	case eCSR_AUTH_TYPE_FT_RSN:
-#endif
 	case eCSR_AUTH_TYPE_RSN:
 		rsnType = true;
 		break;
-#ifdef WLAN_FEATURE_VOWIFI_11R
 	case eCSR_AUTH_TYPE_FT_RSN_PSK:
-#endif
 	case eCSR_AUTH_TYPE_RSN_PSK:
 #ifdef WLAN_FEATURE_11W
 	case eCSR_AUTH_TYPE_RSN_PSK_SHA256:
@@ -4189,7 +4183,6 @@ static int __iw_set_encodeext(struct net_device *dev,
 		  ("%s:cipher_alg:%d key_len[%d] *pEncryptionType :%d"),
 		  __func__, (int)ext->alg, (int)ext->key_len, setKey.encType);
 
-#ifdef WLAN_FEATURE_VOWIFI_11R
 	/* The supplicant may attempt to set the PTK once
 	 * pre-authentication is done. Save the key in the UMAC and
 	 * include it in the ADD BSS request
@@ -4205,7 +4198,6 @@ static int __iw_set_encodeext(struct net_device *dev,
 		       "%s: Update PreAuth Key failed", __func__);
 		return -EINVAL;
 	}
-#endif /* WLAN_FEATURE_VOWIFI_11R */
 
 	pHddStaCtx->roam_info.roamingState = HDD_ROAM_STATE_SETTING_KEY;
 
@@ -8340,7 +8332,6 @@ static int iw_get_tspec(struct net_device *dev,
 	return ret;
 }
 
-#ifdef WLAN_FEATURE_VOWIFI_11R
 /**
  * iw_set_fties - Set FT IEs private ioctl handler
  * @dev: device upon which the ioctl was received
@@ -8406,7 +8397,6 @@ static int iw_set_fties(struct net_device *dev,
 
 	return ret;
 }
-#endif
 
 /**
  * iw_set_host_offload - Set host offload ioctl handler
@@ -9613,9 +9603,7 @@ static const iw_handler we_private[] = {
 	[WLAN_PRIV_ADD_TSPEC - SIOCIWFIRSTPRIV] = iw_add_tspec,
 	[WLAN_PRIV_DEL_TSPEC - SIOCIWFIRSTPRIV] = iw_del_tspec,
 	[WLAN_PRIV_GET_TSPEC - SIOCIWFIRSTPRIV] = iw_get_tspec,
-#ifdef WLAN_FEATURE_VOWIFI_11R
 	[WLAN_PRIV_SET_FTIES - SIOCIWFIRSTPRIV] = iw_set_fties,
-#endif
 	[WLAN_PRIV_SET_HOST_OFFLOAD - SIOCIWFIRSTPRIV] = iw_set_host_offload,
 	[WLAN_GET_WLAN_STATISTICS - SIOCIWFIRSTPRIV] = iw_get_statistics,
 	[WLAN_SET_KEEPALIVE_PARAMS - SIOCIWFIRSTPRIV] =