diff options
| author | Ashish Kumar Dhanotiya <adhanoti@codeaurora.org> | 2017-09-07 17:25:48 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-09-11 22:17:05 -0700 |
| commit | 048b60f323028dfd47af1cd01fe8830b645dd374 (patch) | |
| tree | 29a17aec3ff2a6cdcd8aeee5d082daa64e349def | |
| parent | 8c4a429ad70df097dd6e577fefe6b6a16ece5064 (diff) | |
qcacld-3.0: Pass frequency to ieee80211_get_channel API
In hdd_send_re_assoc_event api to get ieee80211_channel,
channel number is passed to ieee80211_get_channel kernel
API which expect frequency as an argument.
Pass frequency to ieee80211_get_channel API instead of
channel number.
CRs-fixed: 2053536
Change-Id: I216889d13252c56e817c4e09e77459cc38f8e9ec
| -rw-r--r-- | core/hdd/src/wlan_hdd_assoc.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index cc0ef6b03eee..cf4175ce6e56 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -2007,6 +2007,8 @@ static void hdd_send_re_assoc_event(struct net_device *dev, uint8_t *final_req_ie = NULL; tCsrRoamConnectedProfile roam_profile; tHalHandle hal_handle = WLAN_HDD_GET_HAL_CTX(pAdapter); + int chan_no; + int freq; qdf_mem_zero(&roam_profile, sizeof(roam_profile)); @@ -2059,8 +2061,15 @@ static void hdd_send_re_assoc_event(struct net_device *dev, qdf_mem_copy(rspRsnIe, pFTAssocRsp, len); qdf_mem_zero(rspRsnIe + len, IW_GENERIC_IE_MAX - len); - chan = ieee80211_get_channel(pAdapter->wdev.wiphy, - (int)pCsrRoamInfo->pBssDesc->channelId); + chan_no = pCsrRoamInfo->pBssDesc->channelId; + if (chan_no <= 14) + freq = ieee80211_channel_to_frequency(chan_no, + NL80211_BAND_2GHZ); + else + freq = ieee80211_channel_to_frequency(chan_no, + NL80211_BAND_5GHZ); + chan = ieee80211_get_channel(pAdapter->wdev.wiphy, freq); + sme_roam_get_connect_profile(hal_handle, pAdapter->sessionId, &roam_profile); |
