From 5a36a4a9f6b0ba5cf2c9dd3884ce481d4ee8c565 Mon Sep 17 00:00:00 2001 From: Deepak Dhamdhere Date: Sat, 12 Nov 2016 15:08:22 -0800 Subject: [PATCH] qcacld-3.0: Allow REASSOC to same BSSID Allow wlan_hdd_cfg80211_connect() and wpa_cli "REASSOC" command to reassociate to same bssid by using the currently connected channel. CRs-Fixed: 1089293 Change-Id: Idee480dc480a137426dd3189e1ca1e542bcf053a --- core/hdd/inc/wlan_hdd_main.h | 2 +- core/hdd/src/wlan_hdd_ioctl.c | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 2db3111dbde6..bc0665cab094 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1909,7 +1909,7 @@ static inline int wlan_hdd_nl_init(hdd_context_t *hdd_ctx) QDF_STATUS hdd_sme_close_session_callback(void *pContext); int hdd_reassoc(hdd_adapter_t *adapter, const uint8_t *bssid, - const uint8_t channel, const handoff_src src); + uint8_t channel, const handoff_src src); void hdd_svc_fw_shutdown_ind(struct device *dev); int hdd_register_cb(hdd_context_t *hdd_ctx); void hdd_deregister_cb(hdd_context_t *hdd_ctx); diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index 683b17a8c5f3..21974220efa2 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -874,9 +874,9 @@ void hdd_wma_send_fastreassoc_cmd(int sessionId, const tSirMacAddr bssid, /** * hdd_reassoc() - perform a userspace-directed reassoc - * @adapter: Adapter upon which the command was received - * @bssid: BSSID with which to reassociate - * @channel: channel upon which to reassociate + * @adapter: Adapter upon which the command was received + * @bssid: BSSID with which to reassociate + * @channel: channel upon which to reassociate * @src: The source for the trigger of this action * * This function performs a userspace-directed reassoc operation @@ -884,7 +884,7 @@ void hdd_wma_send_fastreassoc_cmd(int sessionId, const tSirMacAddr bssid, * Return: 0 for success non-zero for failure */ int hdd_reassoc(hdd_adapter_t *adapter, const uint8_t *bssid, - const uint8_t channel, const handoff_src src) + uint8_t channel, const handoff_src src) { hdd_station_ctx_t *pHddStaCtx; hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter); @@ -913,13 +913,12 @@ int hdd_reassoc(hdd_adapter_t *adapter, const uint8_t *bssid, /* * if the target bssid is same as currently associated AP, - * then no need to proceed with reassoc + * use the current connections's channel. */ if (!memcmp(bssid, pHddStaCtx->conn_info.bssId.bytes, QDF_MAC_ADDR_SIZE)) { hdd_info("Reassoc BSSID is same as currently associated AP bssid"); - ret = -EINVAL; - goto exit; + channel = pHddStaCtx->conn_info.operationChannel; } /* Check channel number is a valid channel number */