diff options
| author | Selvaraj, Sridhar <sselvara@codeaurora.org> | 2016-09-30 15:59:51 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-10-05 23:20:31 -0700 |
| commit | bd3deb6b96ed96f81a945a14917410a5bc58a700 (patch) | |
| tree | 5cbc28eeff2712d0800135d27e8e72a6c12634ac | |
| parent | ce5af24c2e33f02594b8201cd9dbb52617503acb (diff) | |
qcacld-2.0: Invoke re-association on reception of prev_bssid in connect
qcacld-3.0 to qcacld-2.0 propagation.
When supplicant issues connect with prev_bssid set, it expects the
driver to do re-association instead of disconnect and connect.
This fix checks if prev_bssid is set and bssid/bssid_hint, channel/
channel_hint parameters are present in connect and if yes, invokes STA
re-association instead of disconnect and connect.
Change-Id: I8d4d29086a205563061bb155a1298de91839cbec
CRs-Fixed: 1071581
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index f07753c34862..8fc1859549f4 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -19306,8 +19306,8 @@ disconnected: * @req: Pointer to the structure cfg_connect_params receieved from user space * @status: out variable for status of reassoc request * - * This function will start reassociation if bssid hint, channel hint and - * previous bssid parameters are present in the connect request + * This function will start reassociation if prev_bssid is set and bssid/ + * bssid_hint, channel/channel_hint parameters are present in connect request. * * Return: true if connect was for ReAssociation, false otherwise */ @@ -19317,14 +19317,25 @@ static bool wlan_hdd_reassoc_bssid_hint(hdd_adapter_t *adapter, int *status) { bool reassoc = false; - if (req->bssid_hint && req->channel_hint && req->prev_bssid) { + const uint8_t *bssid = NULL; + uint16_t channel = 0; + + if (req->bssid) + bssid = req->bssid; + else if (req->bssid_hint) + bssid = req->bssid_hint; + + if (req->channel) + channel = req->channel->hw_value; + else if (req->channel_hint) + channel = req->channel_hint->hw_value; + + if (bssid && channel && req->prev_bssid) { reassoc = true; hddLog(VOS_TRACE_LEVEL_INFO, FL("REASSOC Attempt on channel %d to "MAC_ADDRESS_STR), - req->channel_hint->hw_value, - MAC_ADDR_ARRAY(req->bssid_hint)); - *status = hdd_reassoc(adapter, req->bssid_hint, - req->channel_hint->hw_value, + channel, MAC_ADDR_ARRAY(bssid)); + *status = hdd_reassoc(adapter, bssid, channel, CONNECT_CMD_USERSPACE); hddLog(VOS_TRACE_LEVEL_DEBUG, "hdd_reassoc: status: %d", *status); |
