From 3c6c0efabcb59c1993ca31e0504183da8ad2b14d Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sun, 15 Oct 2017 17:59:14 -0700 Subject: [PATCH] qcacld-3.0: Remove obsolete STA support for SIOCGIWESSID 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 SIOCGIWESSID should no longer be used, so remove it. Change-Id: I4210a1faf12adeaeede1a379f0827eddfbd19881 CRs-Fixed: 2128990 --- core/hdd/inc/wlan_hdd_wext.h | 4 -- core/hdd/src/wlan_hdd_assoc.c | 72 ----------------------------------- core/hdd/src/wlan_hdd_wext.c | 2 +- 3 files changed, 1 insertion(+), 77 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_wext.h b/core/hdd/inc/wlan_hdd_wext.h index ff4fb2207adb..e287ab1c5979 100644 --- a/core/hdd/inc/wlan_hdd_wext.h +++ b/core/hdd/inc/wlan_hdd_wext.h @@ -280,10 +280,6 @@ extern int iw_set_essid(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); -extern int iw_get_essid(struct net_device *dev, - struct iw_request_info *info, - struct iw_point *dwrq, char *extra); - extern int iw_set_ap_address(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 9390c76c3eac..31d8820cb305 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -5528,78 +5528,6 @@ int iw_set_essid(struct net_device *dev, return ret; } -/** - * __iw_get_essid() - This function returns the essid to the wpa_supplicant - * @dev: pointer to the net device - * @info: pointer to the iw request info - * @dwrq: pointer to iw_point - * @extra: pointer to the data - * - * Return: 0 on success, error number otherwise - */ -static int __iw_get_essid(struct net_device *dev, - struct iw_request_info *info, - struct iw_point *dwrq, char *extra) -{ - struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); - struct hdd_context *hdd_ctx; - struct hdd_wext_state *wextBuf = WLAN_HDD_GET_WEXT_STATE_PTR(adapter); - struct hdd_station_ctx *sta_ctx = - WLAN_HDD_GET_STATION_CTX_PTR(adapter); - 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; - - if ((sta_ctx->conn_info.connState == eConnectionState_Associated && - wextBuf->roamProfile.SSIDs.SSIDList->SSID.length > 0) || - ((sta_ctx->conn_info.connState == eConnectionState_IbssConnected - || sta_ctx->conn_info.connState == - eConnectionState_IbssDisconnected) - && wextBuf->roamProfile.SSIDs.SSIDList->SSID.length > 0)) { - dwrq->length = sta_ctx->conn_info.SSID.SSID.length; - memcpy(extra, sta_ctx->conn_info.SSID.SSID.ssId, - dwrq->length); - dwrq->flags = 1; - } else { - memset(extra, 0, dwrq->length); - dwrq->length = 0; - dwrq->flags = 0; - } - EXIT(); - return 0; -} - -/** - * iw_get_essid() - get essid handler 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_essid(struct net_device *dev, - struct iw_request_info *info, - struct iw_point *wrqu, char *extra) -{ - int ret; - - cds_ssr_protect(__func__); - ret = __iw_get_essid(dev, info, wrqu, extra); - cds_ssr_unprotect(__func__); - - return ret; -} - /** * __iw_set_ap_address() - set ap address * @dev: pointer to the net device diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 05dfd2884894..5f9731b73a96 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -11348,7 +11348,7 @@ static const iw_handler we_handler[] = { (iw_handler) NULL, /* SIOCSIWSCAN */ (iw_handler) NULL, /* SIOCGIWSCAN */ (iw_handler) iw_set_essid, /* SIOCSIWESSID */ - (iw_handler) iw_get_essid, /* SIOCGIWESSID */ + (iw_handler) NULL, /* SIOCGIWESSID */ (iw_handler) NULL, /* SIOCSIWNICKN */ (iw_handler) NULL, /* SIOCGIWNICKN */ (iw_handler) NULL, /* -- hole -- */