diff options
| author | Selvaraj, Sridhar <sselvara@qti.qualcomm.com> | 2016-07-19 12:05:53 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-07-27 15:02:43 +0530 |
| commit | 26be421da2069abd5e37f48b683bab48c5434af6 (patch) | |
| tree | 8c6ef6dfd84aa45e1d41beaaf182cc39f1330605 | |
| parent | e567f372e2452a676cd765dddbf9866d69b97a98 (diff) | |
qcacld-2.0: Do not start new connection if cfg80211 request REASSOC fails
qcacld-3.0 to qcacld-2.0 propagation
Change return type of wlan_hdd_reassoc_bssid_hint to indicate REASSOC
request rather than success or failure of hdd_reassoc request. If this
function returns false, continue with connection else return status code
from the function.
Change-Id: Ib0f894d329146d11fe80995248e3b3c343fb7372
CRs-Fixed: 1046841
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 8674245abe49..f8082edf3f1c 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -19096,34 +19096,39 @@ disconnected: * wlan_hdd_reassoc_bssid_hint() - Start reassociation if bssid is present * @adapter: Pointer to the HDD adapter * @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 * - * Return: success if reassociation is happening - * Error code if reassociation is not permitted or not happening + * Return: true if connect was for ReAssociation, false otherwise */ #ifdef CFG80211_CONNECT_PREV_BSSID -static int wlan_hdd_reassoc_bssid_hint(hdd_adapter_t *adapter, - struct cfg80211_connect_params *req) +static bool wlan_hdd_reassoc_bssid_hint(hdd_adapter_t *adapter, + struct cfg80211_connect_params *req, + int *status) { - int status = -EPERM; + bool reassoc = false; if (req->bssid_hint && req->channel_hint && 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, + *status = hdd_reassoc(adapter, req->bssid_hint, req->channel_hint->hw_value, CONNECT_CMD_USERSPACE); + hddLog(VOS_TRACE_LEVEL_DEBUG, + "hdd_reassoc: status: %d", *status); } - return status; + return reassoc; } #else -static int wlan_hdd_reassoc_bssid_hint(hdd_adapter_t *adapter, - struct cfg80211_connect_params *req) +static bool wlan_hdd_reassoc_bssid_hint(hdd_adapter_t *adapter, + struct cfg80211_connect_params *req, + int *status) { - return -EPERM; + return false; } #endif @@ -19175,8 +19180,7 @@ static int __wlan_hdd_cfg80211_connect( struct wiphy *wiphy, if (0 != status) return status; - status = wlan_hdd_reassoc_bssid_hint(pAdapter, req); - if (0 == status) + if (true == wlan_hdd_reassoc_bssid_hint(pAdapter, req, &status)) return status; #if defined(FEATURE_WLAN_LFR) && defined(WLAN_FEATURE_ROAM_SCAN_OFFLOAD) |
