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
This commit is contained in:
Ashish Kumar Dhanotiya 2017-09-07 17:25:48 +05:30 committed by snandini
parent 5cc34cbaec
commit 52def21a51

View File

@ -2109,6 +2109,8 @@ static void hdd_send_re_assoc_event(struct net_device *dev,
tCsrRoamConnectedProfile roam_profile;
tHalHandle hal_handle = WLAN_HDD_GET_HAL_CTX(pAdapter);
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
int chan_no;
int freq;
qdf_mem_zero(&roam_profile, sizeof(roam_profile));
@ -2161,8 +2163,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);