[PATCH] wpa_supplicant: Include frequencies in get_capability channels

Bruno Randolf br1
Tue Mar 26 05:45:36 PDT 2013


Also print the frequencies in MHz in the "get_capability channels" command and
add a tag "NO_IBSS" if IBSS mode is not allowed on a channel.

Signed-hostap: Bruno Randolf <br1 at einfach.org>
---
 wpa_supplicant/ctrl_iface.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 5bcf748..5703a80 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -2917,7 +2917,7 @@ static int ctrl_iface_get_capability_channels(struct wpa_supplicant *wpa_s,
 		default:
 			continue;
 		}
-		ret = os_snprintf(pos, end - pos, "Mode[%s] Channels:", hmode);
+		ret = os_snprintf(pos, end - pos, "Mode[%s] Channels:\n", hmode);
 		if (ret < 0 || ret >= end - pos)
 			return pos - buf;
 		pos += ret;
@@ -2925,7 +2925,9 @@ static int ctrl_iface_get_capability_channels(struct wpa_supplicant *wpa_s,
 		for (i = 0; i < wpa_s->hw.modes[j].num_channels; i++) {
 			if (chnl[i].flag & HOSTAPD_CHAN_DISABLED)
 				continue;
-			ret = os_snprintf(pos, end - pos, " %d", chnl[i].chan);
+			ret = os_snprintf(pos, end - pos, " %d = %d MHz%s\n",
+					  chnl[i].chan, chnl[i].freq,
+					  chnl[i].flag & HOSTAPD_CHAN_NO_IBSS ? " (NO_IBSS)" : "");
 			if (ret < 0 || ret >= end - pos)
 				return pos - buf;
 			pos += ret;
-- 
1.7.9.5




More information about the Hostap mailing list