Extend STATUS command with frequency information

This makes 'wpa_cli status' command more versatile.

Signed-off-by: Bojan Prtvar <bojan.prtvar@rt-rk.com>
This commit is contained in:
Bojan Prtvar 2014-09-13 18:24:04 +02:00 committed by Jouni Malinen
parent 375f4a3b5a
commit b6ebdfbedd

View file

@ -1540,6 +1540,11 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
if (ret < 0 || ret >= end - pos) if (ret < 0 || ret >= end - pos)
return pos - buf; return pos - buf;
pos += ret; pos += ret;
ret = os_snprintf(pos, end - pos, "freq=%u\n",
wpa_s->assoc_freq);
if (ret < 0 || ret >= end - pos)
return pos - buf;
pos += ret;
if (ssid) { if (ssid) {
u8 *_ssid = ssid->ssid; u8 *_ssid = ssid->ssid;
size_t ssid_len = ssid->ssid_len; size_t ssid_len = ssid->ssid_len;