diff options
| author | Abhishek Singh <absingh@codeaurora.org> | 2017-01-02 12:09:34 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-01-06 20:55:37 -0800 |
| commit | aaf142f4b1f6a6c0a4807e1edb7af9d2e9cdcc5f (patch) | |
| tree | c0e08efc3017e27814f04e0c5b0145e84ffe33e6 | |
| parent | 49477728016a12ff20c834072d19e578d1bc2dac (diff) | |
qcacld-3.0: Use cfg80211_roamed_bss API to indicate the roaming
qcacld-2.0 to qcacld-3.0 propagation
After disconnect request, the driver sends disconnect
indication to the kernel and it schedules a workqueue to
process this disconnect event. Now if this workqueue is
delayed and connect request is received before its
scheduled, the disconnect event workqueue reset the
ssid_len of the wdev.
Now as the ssid_len does not match with bss ssid length the
get bss returns NULL and thus roam indication is not sent
to supplicant.
To fix this use cfg80211_roamed_bss to indicate the roaming
and use the ssid and ssid len from driver to get the bss.
Change-Id: I5b88ce41951cb61582ee801be124ca0b5b6b825b
CRs-Fixed: 1098150
| -rw-r--r-- | core/hdd/inc/wlan_hdd_main.h | 21 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_assoc.c | 32 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 39 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 6 |
4 files changed, 41 insertions, 57 deletions
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 1da0371e9aeb..5dcb9b4def5d 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -1956,6 +1956,25 @@ int hdd_wlan_start_modules(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter, bool reinit); int hdd_wlan_stop_modules(hdd_context_t *hdd_ctx); int hdd_start_adapter(hdd_adapter_t *adapter); + +/** + * hdd_get_bss_entry() - Get the bss entry matching the chan, bssid and ssid + * @wiphy: wiphy + * @channel: channel of the BSS to find + * @bssid: bssid of the BSS to find + * @ssid: ssid of the BSS to find + * @ssid_len: ssid len of of the BSS to find + * + * The API is a wrapper to get bss from kernel matching the chan, + * bssid and ssid + * + * Return: bss structure if found else NULL + */ +struct cfg80211_bss *hdd_cfg80211_get_bss(struct wiphy *wiphy, + struct ieee80211_channel *channel, + const u8 *bssid, + const u8 *ssid, size_t ssid_len); + void hdd_connect_result(struct net_device *dev, const u8 *bssid, tCsrRoamInfo *roam_info, const u8 *req_ie, size_t req_ie_len, const u8 *resp_ie, diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index d996f2657f74..aab5fe3727f5 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -1955,17 +1955,14 @@ static void hdd_send_re_assoc_event(struct net_device *dev, qdf_mem_zero(rspRsnIe + len, IW_GENERIC_IE_MAX - len); chan = ieee80211_get_channel(pAdapter->wdev.wiphy, - (int)pCsrRoamInfo->pBssDesc->channelId); + (int)pCsrRoamInfo->pBssDesc->channelId); sme_roam_get_connect_profile(hal_handle, pAdapter->sessionId, &roam_profile); - bss = cfg80211_get_bss(pAdapter->wdev.wiphy, chan, - pCsrRoamInfo->bssid.bytes, - &roam_profile.SSID.ssId[0], roam_profile.SSID.length, -#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0)) && !defined(WITH_BACKPORTS) - WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS); -#else - IEEE80211_BSS_TYPE_ESS, IEEE80211_PRIVACY_ANY); -#endif + + bss = hdd_cfg80211_get_bss(pAdapter->wdev.wiphy, + chan, pCsrRoamInfo->bssid.bytes, + &roam_profile.SSID.ssId[0], + roam_profile.SSID.length); if (bss == NULL) hdd_err("Get BSS returned NULL"); @@ -2495,6 +2492,8 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter, if (ft_carrier_on) { if (!hddDisconInProgress) { + struct cfg80211_bss *roam_bss; + /* * After roaming is completed, * active session count is @@ -2531,10 +2530,17 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter, QDF_TRACE_LEVEL_DEBUG, pFTAssocReq, assocReqlen); - - cfg80211_roamed(dev, chan, - pRoamInfo-> - bssid.bytes, + roam_bss = + hdd_cfg80211_get_bss( + pAdapter->wdev.wiphy, + chan, + pRoamInfo->bssid.bytes, + pRoamInfo->u. + pConnectedProfile->SSID.ssId, + pRoamInfo->u. + pConnectedProfile->SSID.length); + cfg80211_roamed_bss(dev, + roam_bss, pFTAssocReq, assocReqlen, pFTAssocRsp, diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index bf33072f6e75..98b00122ff11 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -11047,43 +11047,6 @@ static int wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy, } /* - * wlan_hdd_cfg80211_get_bss :to get the bss from kernel cache. - * @wiphy: wiphy pointer - * @channel: channel of the BSS - * @bssid: Bssid of BSS - * @ssid: Ssid of the BSS - * @ssid_len: ssid length - * - * Return: bss found in kernel cache - */ -#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0)) && !defined(WITH_BACKPORTS) -static -struct cfg80211_bss *wlan_hdd_cfg80211_get_bss(struct wiphy *wiphy, - struct ieee80211_channel *channel, const u8 *bssid, - const u8 *ssid, size_t ssid_len) -{ - return cfg80211_get_bss(wiphy, channel, bssid, - ssid, - ssid_len, - WLAN_CAPABILITY_ESS, - WLAN_CAPABILITY_ESS); -} -#else -static -struct cfg80211_bss *wlan_hdd_cfg80211_get_bss(struct wiphy *wiphy, - struct ieee80211_channel *channel, const u8 *bssid, - const u8 *ssid, size_t ssid_len) -{ - return cfg80211_get_bss(wiphy, channel, bssid, - ssid, - ssid_len, - IEEE80211_BSS_TYPE_ESS, - IEEE80211_PRIVACY_ANY); -} -#endif - - -/* * wlan_hdd_cfg80211_update_bss_list :to inform nl80211 * interface that BSS might have been lost. * @pAdapter: adaptor @@ -11099,7 +11062,7 @@ struct cfg80211_bss *wlan_hdd_cfg80211_update_bss_list( struct wiphy *wiphy = wdev->wiphy; struct cfg80211_bss *bss = NULL; - bss = wlan_hdd_cfg80211_get_bss(wiphy, NULL, bssid, + bss = hdd_cfg80211_get_bss(wiphy, NULL, bssid, NULL, 0); if (bss == NULL) { hdd_err("BSS not present"); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 3e087ffebfb0..c14f5ad41478 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -3842,10 +3842,8 @@ static bool hdd_is_interface_up(hdd_adapter_t *adapter) return false; } -#if defined CFG80211_CONNECT_BSS #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0)) \ - && !defined(WITH_BACKPORTS) && !defined(IEEE80211_PRIVACY) -static + && !defined(WITH_BACKPORTS) struct cfg80211_bss *hdd_cfg80211_get_bss(struct wiphy *wiphy, struct ieee80211_channel *channel, const u8 *bssid, const u8 *ssid, @@ -3857,7 +3855,6 @@ struct cfg80211_bss *hdd_cfg80211_get_bss(struct wiphy *wiphy, WLAN_CAPABILITY_ESS); } #else -static struct cfg80211_bss *hdd_cfg80211_get_bss(struct wiphy *wiphy, struct ieee80211_channel *channel, const u8 *bssid, const u8 *ssid, @@ -3869,7 +3866,6 @@ struct cfg80211_bss *hdd_cfg80211_get_bss(struct wiphy *wiphy, IEEE80211_PRIVACY_ANY); } #endif -#endif #if defined CFG80211_CONNECT_BSS /** |
