summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleti Nageshwar Reddy <anageshw@codeaurora.org>2021-07-26 09:11:50 +0530
committerAleti Nageshwar Reddy <anageshw@codeaurora.org>2021-07-26 09:26:40 +0530
commitf02f6680d48a2b4fd8e8999d2bb1168e784ec517 (patch)
tree73573e836aa6d9ae831ed9f8c47c0af06d101e3c
parentbaf0623af84916e9487966d29230ef0765960e22 (diff)
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
-rw-r--r--qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c5
1 files changed, 5 insertions, 0 deletions
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;