Browse Source

qcacld-3.0: Use link info pointer to save bcn protect stats

Modify the following API to take link info pointer as function
argument to fetch per link bcn protect stats.
The existing callers moved to deflink pointer in adapter.

1) hdd_add_pmf_bcn_protect_stats()

Change-Id: I0a09238586c6dbb8b7e7a49ddfb9dca211ff3428
CRs-Fixed: 3517954
Vinod Kumar Pirla 2 years ago
parent
commit
4a25793b34
1 changed files with 6 additions and 5 deletions
  1. 6 5
      core/hdd/src/wlan_hdd_station_info.c

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

@@ -1938,16 +1938,17 @@ hdd_get_connect_fail_reason_code_len(struct hdd_adapter *adapter)
 /**
  * hdd_add_pmf_bcn_protect_stats() - add pmf bcn protect counters in resp
  * @skb: pointer to response skb buffer
- * @adapter: adapter holding valid bcn protect counters
+ * @link_info: Pointer to link_info holding valid bcn protect counters
  *
  * This function adds the pmf bcn stats in response.
  *
  * Return: 0 on success
  */
-static int hdd_add_pmf_bcn_protect_stats(struct sk_buff *skb,
-					 struct hdd_adapter *adapter)
+static int
+hdd_add_pmf_bcn_protect_stats(struct sk_buff *skb,
+			      struct wlan_hdd_link_info *link_info)
 {
-	struct hdd_stats *hdd_stats = &adapter->deflink->hdd_stats;
+	struct hdd_stats *hdd_stats = &link_info->hdd_stats;
 
 	if (!hdd_stats->bcn_protect_stats.pmf_bcn_stats_valid)
 		return 0;
@@ -2474,7 +2475,7 @@ static int hdd_get_station_info_ex(struct hdd_context *hdd_ctx,
 		return -ENOMEM;
 	}
 
-	if (hdd_add_pmf_bcn_protect_stats(skb, adapter)) {
+	if (hdd_add_pmf_bcn_protect_stats(skb, adapter->deflink)) {
 		hdd_err_rl("hdd_add_pmf_bcn_protect_stats fail");
 		wlan_cfg80211_vendor_free_skb(skb);
 		return -EINVAL;