[PATCH] Extend STATUS command with frequency information
Bojan Prtvar
bojan.prtvar
Thu Sep 11 23:46:00 PDT 2014
This makes 'wpa_cli status' command more versatile.
Signed-off-by: Bojan Prtvar <bojan.prtvar at rt-rk.com>
---
wpa_supplicant/ctrl_iface.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index f612b49..bd54676 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -1539,6 +1539,11 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
if (ret < 0 || ret >= end - pos)
return pos - buf;
pos += ret;
+ ret = os_snprintf(pos, end - pos, "frequency=%d MHz\n",
+ wpa_s->assoc_freq);
+ if (ret < 0 || ret >= end - pos)
+ return pos - buf;
+ pos += ret;
if (ssid) {
u8 *_ssid = ssid->ssid;
size_t ssid_len = ssid->ssid_len;
--
1.9.1.286.g5172cb3
More information about the Hostap
mailing list