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
This commit is contained in:
Abhishek Singh
2017-01-02 12:09:34 +05:30
committed by qcabuildsw
parent 3c50701eeb
commit b5e38ef48a
4 changed files with 40 additions and 56 deletions

View File

@@ -1982,6 +1982,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,

View File

@@ -1999,14 +1999,11 @@ static void hdd_send_re_assoc_event(struct net_device *dev,
(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");
@@ -2584,6 +2581,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
@@ -2620,10 +2619,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,

View File

@@ -11122,43 +11122,6 @@ static int wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy,
return ret;
}
/*
* 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.
@@ -11175,7 +11138,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");

View File

@@ -3864,10 +3864,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,
@@ -3879,7 +3877,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,
@@ -3891,7 +3888,6 @@ struct cfg80211_bss *hdd_cfg80211_get_bss(struct wiphy *wiphy,
IEEE80211_PRIVACY_ANY);
}
#endif
#endif
#if defined CFG80211_CONNECT_BSS
/**