summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.mk2
-rw-r--r--qcwcn/wifi_hal/llstats.cpp5
-rw-r--r--qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c5
3 files changed, 11 insertions, 1 deletions
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
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;
}
}
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;