Message ID | 1364301936-9228-1-git-send-email-br1@einfach.org |
---|---|
State | Changes Requested |
Headers | show |
On Tue, Mar 26, 2013 at 12:45:36PM +0000, Bruno Randolf wrote: > 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. This control interface command may already be used by external programs and changing the format of the returned information could result in compatibility issues. As such, I don't think this is acceptable without introducing a different way of fetching this new format (e.g., "get_capability freq").
On 03/30/2013 05:44 PM, Jouni Malinen wrote: > On Tue, Mar 26, 2013 at 12:45:36PM +0000, Bruno Randolf wrote: >> 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. > > This control interface command may already be used by external programs > and changing the format of the returned information could result in > compatibility issues. As such, I don't think this is acceptable without > introducing a different way of fetching this new format (e.g., > "get_capability freq"). Thanks, I sent a new patch. bruno
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;