Prechádzať zdrojové kódy

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
Ashish Kumar Dhanotiya 7 rokov pred
rodič
commit
52def21a51
1 zmenil súbory, kde vykonal 11 pridanie a 2 odobranie
  1. 11 2
      core/hdd/src/wlan_hdd_assoc.c

+ 11 - 2
core/hdd/src/wlan_hdd_assoc.c

@@ -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);