Browse Source

qcacld-3.0: Use link info in hdd_is_sta_legacy() API

Modify the hdd_is_sta_legacy() API function prototype
to use link info pointer instead of adapter.

As station context is part of per link data structure
in adapter, the API will only need link info to get
station context.
The existing callers moved to deflink.

Change-Id: I62596d1a6416972d9e763885bf068984ce75ba92
CRs-Fixed: 3448649
Vinod Kumar Pirla 2 years ago
parent
commit
3eb2b1f63f
1 changed files with 4 additions and 4 deletions
  1. 4 4
      core/hdd/src/wlan_hdd_tdls.c

+ 4 - 4
core/hdd/src/wlan_hdd_tdls.c

@@ -614,11 +614,11 @@ int wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
 }
 
 static bool
-hdd_is_sta_legacy(struct hdd_adapter *adapter)
+hdd_is_sta_legacy(struct wlan_hdd_link_info *link_info)
 {
 	struct hdd_station_ctx *sta_ctx;
 
-	sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter->deflink);
+	sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(link_info);
 	if (!sta_ctx)
 		return false;
 
@@ -669,7 +669,7 @@ hdd_check_and_set_tdls_conn_params(struct wlan_objmgr_vdev *vdev)
 	/*
 	 * Only need to set this if STA link is in legacy mode
 	 */
-	if (!hdd_is_sta_legacy(adapter))
+	if (!hdd_is_sta_legacy(adapter->deflink))
 		return;
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
@@ -714,7 +714,7 @@ hdd_check_and_set_tdls_disconn_params(struct wlan_objmgr_vdev *vdev)
 	/*
 	 * Only need to set this if STA link is in legacy mode
 	 */
-	if (!hdd_is_sta_legacy(adapter))
+	if (!hdd_is_sta_legacy(adapter->deflink))
 		return;
 
 	hdd_cm_netif_queue_enable(adapter);