summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnson <jjohnson@codeaurora.org>2016-10-03 15:04:57 -0700
committerqcabuildsw <qcabuildsw@localhost>2016-10-06 08:14:36 -0700
commit9eeed0aedb6958ed2c685ea826433929da4b7252 (patch)
treef674c4bd44ecad1f26c6086c337ab3716c1d3d11
parentd6e4b639f84f8270a45a3f230d4bb6ccc1ec81f7 (diff)
qcacld-3.0: Cleanup strange behavior in __iw_set_mode()
__iw_set_mode() currently uses hdd_conn_get_connected_bss_type() to see if the adapter is connected, discarding the connectedBssType returned by the function. That is not the correct API for this use case. Clean up this strange behavior by using hdd_conn_is_connected() to see if the adapter is connected. Change-Id: I66f85fb8275ae2885012ebf8710187b2b886dfb0 CRs-Fixed: 1073739
-rw-r--r--core/hdd/src/wlan_hdd_wext.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c
index 7074de2d6bd2..9992c4b41a8d 100644
--- a/core/hdd/src/wlan_hdd_wext.c
+++ b/core/hdd/src/wlan_hdd_wext.c
@@ -2037,7 +2037,6 @@ static int __iw_set_mode(struct net_device *dev,
hdd_context_t *hdd_ctx;
tCsrRoamProfile *pRoamProfile;
eCsrRoamBssType LastBSSType;
- eMib_dot11DesiredBssType connectedBssType;
struct hdd_config *pConfig;
struct wireless_dev *wdev;
int ret;
@@ -2085,8 +2084,8 @@ static int __iw_set_mode(struct net_device *dev,
/* the BSS mode changed. We need to issue disconnect
* if connected or in IBSS disconnect state
*/
- if (hdd_conn_get_connected_bss_type
- (WLAN_HDD_GET_STATION_CTX_PTR(pAdapter), &connectedBssType)
+ if (hdd_conn_is_connected
+ (WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))
|| (eCSR_BSS_TYPE_START_IBSS == LastBSSType)) {
QDF_STATUS qdf_status;
/* need to issue a disconnect to CSR. */