Browse Source

qcacld-3.0: Remove duplicate func hdd_cfg80211_get_bss

With I10ec42749ebcd2ddea23f7f3a94d862124df156d, wlan_cfg80211_get_bss
is added and has same functionality as hdd_cfg80211_get_bss.

So use wlan_cfg80211_get_bss instead of hdd_cfg80211_get_bss.

Change-Id: I1445c62fcec2f6dec33433c06ae6169c3eef1fac
CRs-Fixed: 2412288
Abhishek Singh 6 năm trước cách đây
mục cha
commit
59cdca1891

+ 0 - 17
core/hdd/inc/wlan_hdd_main.h

@@ -2843,23 +2843,6 @@ void hdd_populate_random_mac_addr(struct hdd_context *hdd_ctx, uint32_t num);
  * Return: 0 if interface was opened else false
  */
 bool hdd_is_interface_up(struct hdd_adapter *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,
 			struct csr_roam_info *roam_info, const u8 *req_ie,

+ 5 - 5
core/hdd/src/wlan_hdd_assoc.c

@@ -2363,10 +2363,10 @@ static void hdd_send_re_assoc_event(struct net_device *dev,
 	sme_roam_get_connect_profile(hdd_ctx->mac_handle, adapter->vdev_id,
 				     &roam_profile);
 
-	bss = hdd_cfg80211_get_bss(adapter->wdev.wiphy,
-			chan, pCsrRoamInfo->bssid.bytes,
-			&roam_profile.SSID.ssId[0],
-			roam_profile.SSID.length);
+	bss = wlan_cfg80211_get_bss(adapter->wdev.wiphy,
+				    chan, pCsrRoamInfo->bssid.bytes,
+				    &roam_profile.SSID.ssId[0],
+				    roam_profile.SSID.length);
 
 	if (bss == NULL)
 		hdd_warn("Get BSS returned NULL");
@@ -3104,7 +3104,7 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
 								channelId);
 
 						roam_bss =
-							hdd_cfg80211_get_bss(
+							wlan_cfg80211_get_bss(
 							adapter->wdev.wiphy,
 							chan,
 							roam_info->bssid.bytes,

+ 5 - 6
core/hdd/src/wlan_hdd_cfg80211.c

@@ -15226,8 +15226,7 @@ void wlan_hdd_cfg80211_unlink_bss(struct hdd_adapter *adapter,
 	struct wiphy *wiphy = wdev->wiphy;
 	struct cfg80211_bss *bss = NULL;
 
-	bss = hdd_cfg80211_get_bss(wiphy, NULL, bssid,
-			NULL, 0);
+	bss = wlan_cfg80211_get_bss(wiphy, NULL, bssid, NULL, 0);
 	if (!bss) {
 		hdd_err("BSS not present");
 	} else {
@@ -17996,10 +17995,10 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
 			hdd_warn("Channel:%d not OK for DNBS",
 				req->channel->hw_value);
 			if (chan) {
-				bss = hdd_cfg80211_get_bss(wiphy,
-							chan,
-							req->bssid, req->ssid,
-							req->ssid_len);
+				bss = wlan_cfg80211_get_bss(wiphy, chan,
+							    req->bssid,
+							    req->ssid,
+							    req->ssid_len);
 				if (bss) {
 					cfg80211_assoc_timeout(ndev, bss);
 					return -ETIMEDOUT;

+ 1 - 26
core/hdd/src/wlan_hdd_main.c

@@ -5874,31 +5874,6 @@ bool hdd_is_interface_up(struct hdd_adapter *adapter)
 		return false;
 }
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0)) \
-	&& !defined(WITH_BACKPORTS) && !defined(IEEE80211_PRIVACY)
-struct cfg80211_bss *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
-struct cfg80211_bss *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
-
 #if defined CFG80211_CONNECT_BSS || \
 	(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0))
 #if defined CFG80211_CONNECT_TIMEOUT_REASON_CODE || \
@@ -6367,7 +6342,7 @@ void hdd_connect_result(struct net_device *dev, const u8 *bssid,
 				HDD_NL80211_BAND_5GHZ);
 
 		chan = ieee80211_get_channel(padapter->wdev.wiphy, freq);
-		bss = hdd_cfg80211_get_bss(padapter->wdev.wiphy, chan, bssid,
+		bss = wlan_cfg80211_get_bss(padapter->wdev.wiphy, chan, bssid,
 			roam_info->u.pConnectedProfile->SSID.ssId,
 			roam_info->u.pConnectedProfile->SSID.length);
 	}