From 7f6455ba113168e6b03ded787b8bec4983ce960e Mon Sep 17 00:00:00 2001 From: Naveen S Nair Date: Wed, 26 May 2021 12:12:30 +0530 Subject: wlan: Define QCOM_WLAN_ROOT to represent a new path. Certain build systems define a new path (say hardware/qcom/***/wlan instead of hardware/qcom/wlan). Since this path is referred by the other dependent modules (such as HalProxyDaemon, oem-ss), define a new variable to point to the current path. Change-Id: I05c566bf2a9f4db54f294d0f44ffa6e8b680a9ff --- Android.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Android.mk b/Android.mk index 200eb36..6695cef 100644 --- a/Android.mk +++ b/Android.mk @@ -1,4 +1,6 @@ # TODO: Find a better way to separate build configs for ADP vs non-ADP devices +QCOM_WLAN_ROOT := $(call my-dir) + ifneq ($(BOARD_IS_AUTOMOTIVE),true) include $(call all-subdir-makefiles) endif -- cgit v1.2.3 From f02f6680d48a2b4fd8e8999d2bb1168e784ec517 Mon Sep 17 00:00:00 2001 From: Aleti Nageshwar Reddy Date: Mon, 26 Jul 2021 09:11:50 +0530 Subject: wpa_supplicant_8_lib: Reject getstainfo command on non-hapd iface This commit enhances getstainfo command to reject the request if it is not sent on hapd interface. Change-Id: I50925aa01930795e1d7226021173f179a8f4d4ca CRs-Fixed: 2999517 --- qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c b/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c index bb0ff98..48538ff 100644 --- a/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c +++ b/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c @@ -1874,6 +1874,11 @@ static int wpa_driver_get_all_sta_info(struct i802_bss *bss, int *status) struct sta_info *sta; int ret, total_ret = 0; + if(bss->drv && bss->drv->nlmode != NL80211_IFTYPE_AP) { + wpa_printf(MSG_ERROR,"Not a hapd interface"); + return -1; + } + if (!hapd) { wpa_printf(MSG_ERROR,"hapd is NULL"); return -1; -- cgit v1.2.3 From 61b8dd124f5c52c87038d6476ae73a2d3570b1e8 Mon Sep 17 00:00:00 2001 From: Vinay Gannevaram Date: Thu, 22 Jul 2021 19:27:05 +0530 Subject: WifiHal: populate llstats peer info with correct offset llstats peerinfo has varying wifi rate stats. Since llstats is a linear buffer with interface and peer stats, we should include wifi rate stats length while computing offset of next peer CRs-Fixed: 2999671 Change-Id: Icc0395cf290268f4c2c96031389fae36ac48d47c --- qcwcn/wifi_hal/llstats.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qcwcn/wifi_hal/llstats.cpp b/qcwcn/wifi_hal/llstats.cpp index 46f6a5e..2e07e46 100644 --- a/qcwcn/wifi_hal/llstats.cpp +++ b/qcwcn/wifi_hal/llstats.cpp @@ -1189,6 +1189,7 @@ int LLStatsCommand::handleResponse(WifiEvent &reply) status = WIFI_ERROR_INVALID_ARGS; goto cleanup; } + num_rates = 0; for (peerInfo = (struct nlattr *) nla_data(tb_vendor[ QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO]), rem = nla_len(tb_vendor[ @@ -1200,7 +1201,8 @@ int LLStatsCommand::handleResponse(WifiEvent &reply) QCA_WLAN_VENDOR_ATTR_LL_STATS_MAX+ 1]; pPeerStats = (wifi_peer_info *) ( (u8 *)pIfaceStat->peer_info - + (i++ * sizeof(wifi_peer_info))); + + (i++ * sizeof(wifi_peer_info)) + + (num_rates * sizeof(wifi_rate_stat))); nla_parse(tb2, QCA_WLAN_VENDOR_ATTR_LL_STATS_MAX, (struct nlattr *) nla_data(peerInfo), nla_len(peerInfo), NULL); @@ -1209,6 +1211,7 @@ int LLStatsCommand::handleResponse(WifiEvent &reply) { goto cleanup; } + num_rates += pPeerStats->num_rate; } } -- cgit v1.2.3