Эх сурвалжийг харах

qcacld-3.0: Remove obsolete STA support for SIOCGIWAUTH

At one time the predecessor to the current driver was managed via
wireless extensions, but now the driver is managed by cfg80211. The
STA implementation of SIOCGIWAUTH should no longer be used, so remove
it.

Change-Id: I454f925ac3d11cf84d311285b74ecd3674ecb90f
CRs-Fixed: 2128360
Jeff Johnson 7 жил өмнө
parent
commit
4139b82219

+ 0 - 3
core/hdd/inc/wlan_hdd_wext.h

@@ -303,9 +303,6 @@ extern int iw_get_ap_address(struct net_device *dev,
 extern int iw_set_auth(struct net_device *dev, struct iw_request_info *info,
 		       union iwreq_data *wrqu, char *extra);
 
-extern int iw_get_auth(struct net_device *dev, struct iw_request_info *info,
-		       union iwreq_data *wrqu, char *extra);
-
 extern int iw_set_var_ints_getnone(struct net_device *dev,
 				   struct iw_request_info *info,
 				   union iwreq_data *wrqu, char *extra);

+ 0 - 157
core/hdd/src/wlan_hdd_assoc.c

@@ -5850,163 +5850,6 @@ int iw_set_auth(struct net_device *dev, struct iw_request_info *info,
 
 	return ret;
 }
-/**
- * __iw_get_auth() -
- *	This function returns the auth type to the wpa_supplicant
- * @dev: pointer to the net device
- * @info: pointer to the iw request info
- * @wrqu: pointer to iwreq_data
- * @extra: pointer to the data
- *
- * Return: 0 on success, error number otherwise
- */
-static int __iw_get_auth(struct net_device *dev, struct iw_request_info *info,
-		union iwreq_data *wrqu, char *extra)
-{
-	struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
-	struct hdd_context *hdd_ctx;
-	struct hdd_wext_state *pWextState =
-		WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
-	tCsrRoamProfile *pRoamProfile = &pWextState->roamProfile;
-	int ret;
-
-	ENTER_DEV(dev);
-
-	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
-	ret = wlan_hdd_validate_context(hdd_ctx);
-	if (ret)
-		return ret;
-
-	ret = hdd_check_standard_wext_control(hdd_ctx, info);
-	if (0 != ret)
-		return ret;
-
-	switch (pRoamProfile->negotiatedAuthType) {
-	case eCSR_AUTH_TYPE_WPA_NONE:
-		wrqu->param.flags = IW_AUTH_WPA_VERSION;
-		wrqu->param.value = IW_AUTH_WPA_VERSION_DISABLED;
-		break;
-	case eCSR_AUTH_TYPE_WPA:
-		wrqu->param.flags = IW_AUTH_WPA_VERSION;
-		wrqu->param.value = IW_AUTH_WPA_VERSION_WPA;
-		break;
-
-	case eCSR_AUTH_TYPE_FT_RSN:
-	case eCSR_AUTH_TYPE_RSN:
-		wrqu->param.flags = IW_AUTH_WPA_VERSION;
-		wrqu->param.value = IW_AUTH_WPA_VERSION_WPA2;
-		break;
-	case eCSR_AUTH_TYPE_OPEN_SYSTEM:
-		wrqu->param.value = IW_AUTH_ALG_OPEN_SYSTEM;
-		break;
-	case eCSR_AUTH_TYPE_SHARED_KEY:
-		wrqu->param.value = IW_AUTH_ALG_SHARED_KEY;
-		break;
-	case eCSR_AUTH_TYPE_UNKNOWN:
-		hdd_debug("called with unknown auth type");
-		wrqu->param.value = IW_AUTH_ALG_OPEN_SYSTEM;
-		break;
-	case eCSR_AUTH_TYPE_AUTOSWITCH:
-		wrqu->param.value = IW_AUTH_ALG_OPEN_SYSTEM;
-		break;
-	case eCSR_AUTH_TYPE_WPA_PSK:
-		hdd_debug("called with WPA PSK auth type");
-		wrqu->param.value = IW_AUTH_ALG_OPEN_SYSTEM;
-		return -EIO;
-
-	case eCSR_AUTH_TYPE_FT_RSN_PSK:
-	case eCSR_AUTH_TYPE_RSN_PSK:
-#ifdef WLAN_FEATURE_11W
-	case eCSR_AUTH_TYPE_RSN_PSK_SHA256:
-	case eCSR_AUTH_TYPE_RSN_8021X_SHA256:
-#endif
-		hdd_debug("called with RSN PSK auth type");
-		wrqu->param.value = IW_AUTH_ALG_OPEN_SYSTEM;
-		return -EIO;
-	default:
-		hdd_warn("Unknown auth type: %d",
-			pRoamProfile->negotiatedAuthType);
-		wrqu->param.value = IW_AUTH_ALG_OPEN_SYSTEM;
-		return -EIO;
-	}
-	if (((wrqu->param.flags & IW_AUTH_INDEX) == IW_AUTH_CIPHER_PAIRWISE)) {
-		switch (pRoamProfile->negotiatedUCEncryptionType) {
-		case eCSR_ENCRYPT_TYPE_NONE:
-			wrqu->param.value = IW_AUTH_CIPHER_NONE;
-			break;
-		case eCSR_ENCRYPT_TYPE_WEP40:
-		case eCSR_ENCRYPT_TYPE_WEP40_STATICKEY:
-			wrqu->param.value = IW_AUTH_CIPHER_WEP40;
-			break;
-		case eCSR_ENCRYPT_TYPE_TKIP:
-			wrqu->param.value = IW_AUTH_CIPHER_TKIP;
-			break;
-		case eCSR_ENCRYPT_TYPE_WEP104:
-		case eCSR_ENCRYPT_TYPE_WEP104_STATICKEY:
-			wrqu->param.value = IW_AUTH_CIPHER_WEP104;
-			break;
-		case eCSR_ENCRYPT_TYPE_AES:
-			wrqu->param.value = IW_AUTH_CIPHER_CCMP;
-			break;
-		default:
-			hdd_warn("called with unknown auth type %d",
-				   pRoamProfile->negotiatedUCEncryptionType);
-			return -EIO;
-		}
-	}
-
-	if (((wrqu->param.flags & IW_AUTH_INDEX) == IW_AUTH_CIPHER_GROUP)) {
-		switch (pRoamProfile->negotiatedMCEncryptionType) {
-		case eCSR_ENCRYPT_TYPE_NONE:
-			wrqu->param.value = IW_AUTH_CIPHER_NONE;
-			break;
-		case eCSR_ENCRYPT_TYPE_WEP40:
-		case eCSR_ENCRYPT_TYPE_WEP40_STATICKEY:
-			wrqu->param.value = IW_AUTH_CIPHER_WEP40;
-			break;
-		case eCSR_ENCRYPT_TYPE_TKIP:
-			wrqu->param.value = IW_AUTH_CIPHER_TKIP;
-			break;
-		case eCSR_ENCRYPT_TYPE_WEP104:
-		case eCSR_ENCRYPT_TYPE_WEP104_STATICKEY:
-			wrqu->param.value = IW_AUTH_CIPHER_WEP104;
-			break;
-		case eCSR_ENCRYPT_TYPE_AES:
-			wrqu->param.value = IW_AUTH_CIPHER_CCMP;
-			break;
-		default:
-			hdd_err("called with unknown auth type %d",
-				 pRoamProfile->negotiatedMCEncryptionType);
-			return -EIO;
-		}
-	}
-
-	hdd_debug("called with auth type %d",
-		 pRoamProfile->AuthType.authType[0]);
-	EXIT();
-	return 0;
-}
-
-/**
- * iw_get_auth() - get auth callback function
- * @dev: Pointer to the net device.
- * @info: Pointer to the iw_request_info.
- * @wrqu: Pointer to the iwreq_data.
- * @extra: Pointer to the data.
- *
- * Return: 0 for success, error number on failure.
- */
-int iw_get_auth(struct net_device *dev, struct iw_request_info *info,
-		union iwreq_data *wrqu, char *extra)
-{
-	int ret;
-
-	cds_ssr_protect(__func__);
-	ret = __iw_get_auth(dev, info, wrqu, extra);
-	cds_ssr_unprotect(__func__);
-
-	return ret;
-}
 
 /**
  * __iw_set_ap_address() - set ap address

+ 1 - 1
core/hdd/src/wlan_hdd_wext.c

@@ -12979,7 +12979,7 @@ static const iw_handler we_handler[] = {
 	(iw_handler) iw_set_genie,      /* SIOCSIWGENIE */
 	(iw_handler) iw_get_genie,      /* SIOCGIWGENIE */
 	(iw_handler) iw_set_auth,       /* SIOCSIWAUTH */
-	(iw_handler) iw_get_auth,       /* SIOCGIWAUTH */
+	(iw_handler) NULL,      /* SIOCGIWAUTH */
 	(iw_handler) NULL,      /* SIOCSIWENCODEEXT */
 	(iw_handler) NULL,      /* SIOCGIWENCODEEXT */
 	(iw_handler) NULL,      /* SIOCSIWPMKSA */