Browse Source

qcacld-3.0: Fix SAP per peer REO stats

Currently for SAP mode, issue is only first valid sta is
requested to print REO stats where sta_info pointer does
not move along with the loop.

Fix is to print REO stats for both vdev peer and sta peers
in SAP mode.

Change-Id: I4864dbecace091fd086f184599e108ad3f2e3d37
CRs-Fixed: 2423173
jiad 6 years ago
parent
commit
134f78e5a6
1 changed files with 11 additions and 2 deletions
  1. 11 2
      core/hdd/src/wlan_hdd_hostapd_wext.c

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

@@ -175,17 +175,26 @@ static int __iw_softap_set_two_ints_getnone(struct net_device *dev,
 			req.stats, req.mac_id);
 		sta_info = adapter->sta_info;
 		if (value[1] == CDP_TXRX_STATS_28) {
+			req.peer_addr = (char *)&adapter->mac_addr;
+			ret = cdp_txrx_stats_request(soc, vdev, &req);
+
 			for (count = 0; count < WLAN_MAX_STA_COUNT; count++) {
-				if (sta_info[count].in_use) {
+				if (sta_info->in_use) {
 					hdd_debug("sta: %d: bss_id: %pM",
 						  sta_info->sta_id,
 						  (void *)&sta_info->sta_mac);
 					req.peer_addr =
 						(char *)&sta_info->sta_mac;
+					ret = cdp_txrx_stats_request(soc, vdev,
+								     &req);
 				}
+
+				sta_info++;
 			}
+		} else {
+			ret = cdp_txrx_stats_request(soc, vdev, &req);
 		}
-		ret = cdp_txrx_stats_request(soc, vdev, &req);
+
 		break;
 	}