* [PATCH] iw: display 5/10 MHz channel widths
@ 2016-07-21 15:39 Bob Copeland
2016-07-22 9:53 ` Julian Calaby
2016-08-01 12:24 ` Johannes Berg
0 siblings, 2 replies; 5+ messages in thread
From: Bob Copeland @ 2016-07-21 15:39 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Bob Copeland
iw was showing 'width: unknown' for channels on OCB interfaces; teach
it the values for 5/10 MHz so it will show the configured width.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
interface.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/interface.c b/interface.c
index 209561d..2802235 100644
--- a/interface.c
+++ b/interface.c
@@ -295,6 +295,10 @@ char *channel_width_name(enum nl80211_chan_width width)
return "80+80 MHz";
case NL80211_CHAN_WIDTH_160:
return "160 MHz";
+ case NL80211_CHAN_WIDTH_5:
+ return "5 MHz";
+ case NL80211_CHAN_WIDTH_10:
+ return "10 MHz";
default:
return "unknown";
}
--
2.9.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] iw: display 5/10 MHz channel widths
2016-07-21 15:39 [PATCH] iw: display 5/10 MHz channel widths Bob Copeland
@ 2016-07-22 9:53 ` Julian Calaby
2016-07-22 10:38 ` Bob Copeland
2016-08-01 12:24 ` Johannes Berg
1 sibling, 1 reply; 5+ messages in thread
From: Julian Calaby @ 2016-07-22 9:53 UTC (permalink / raw)
To: Bob Copeland; +Cc: Johannes Berg, linux-wireless
Hi Bob,
On Fri, Jul 22, 2016 at 1:39 AM, Bob Copeland <me@bobcopeland.com> wrote:
> iw was showing 'width: unknown' for channels on OCB interfaces; teach
> it the values for 5/10 MHz so it will show the configured width.
>
> Signed-off-by: Bob Copeland <me@bobcopeland.com>
> ---
> interface.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/interface.c b/interface.c
> index 209561d..2802235 100644
> --- a/interface.c
> +++ b/interface.c
> @@ -295,6 +295,10 @@ char *channel_width_name(enum nl80211_chan_width width)
> return "80+80 MHz";
> case NL80211_CHAN_WIDTH_160:
> return "160 MHz";
> + case NL80211_CHAN_WIDTH_5:
> + return "5 MHz";
> + case NL80211_CHAN_WIDTH_10:
> + return "10 MHz";
> default:
> return "unknown";
> }
Judging by the previous two entries, it looks like the case statements
are sorted, so should these ones therefore be at the top of the list?
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iw: display 5/10 MHz channel widths
2016-07-22 9:53 ` Julian Calaby
@ 2016-07-22 10:38 ` Bob Copeland
2016-07-22 11:21 ` Julian Calaby
0 siblings, 1 reply; 5+ messages in thread
From: Bob Copeland @ 2016-07-22 10:38 UTC (permalink / raw)
To: Julian Calaby; +Cc: Johannes Berg, linux-wireless
On Fri, Jul 22, 2016 at 07:53:35PM +1000, Julian Calaby wrote:
> Hi Bob,
Hi!
> > --- a/interface.c
> > +++ b/interface.c
> > @@ -295,6 +295,10 @@ char *channel_width_name(enum nl80211_chan_width width)
> > return "80+80 MHz";
> > case NL80211_CHAN_WIDTH_160:
> > return "160 MHz";
> > + case NL80211_CHAN_WIDTH_5:
> > + return "5 MHz";
> > + case NL80211_CHAN_WIDTH_10:
> > + return "10 MHz";
> > default:
> > return "unknown";
> > }
>
> Judging by the previous two entries, it looks like the case statements
> are sorted, so should these ones therefore be at the top of the list?
These are sorted by NL80211_CHAN_WIDTH_* attribute value, which makes
a little more sense to me than sorting by the string or numerically by
width, but sure, I can do it either way.
--
Bob Copeland %% http://bobcopeland.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iw: display 5/10 MHz channel widths
2016-07-22 10:38 ` Bob Copeland
@ 2016-07-22 11:21 ` Julian Calaby
0 siblings, 0 replies; 5+ messages in thread
From: Julian Calaby @ 2016-07-22 11:21 UTC (permalink / raw)
To: Bob Copeland; +Cc: Johannes Berg, linux-wireless
Hi Bob,
On Fri, Jul 22, 2016 at 8:38 PM, Bob Copeland <me@bobcopeland.com> wrote:
> On Fri, Jul 22, 2016 at 07:53:35PM +1000, Julian Calaby wrote:
>> Hi Bob,
>
> Hi!
>
>> > --- a/interface.c
>> > +++ b/interface.c
>> > @@ -295,6 +295,10 @@ char *channel_width_name(enum nl80211_chan_width width)
>> > return "80+80 MHz";
>> > case NL80211_CHAN_WIDTH_160:
>> > return "160 MHz";
>> > + case NL80211_CHAN_WIDTH_5:
>> > + return "5 MHz";
>> > + case NL80211_CHAN_WIDTH_10:
>> > + return "10 MHz";
>> > default:
>> > return "unknown";
>> > }
>>
>> Judging by the previous two entries, it looks like the case statements
>> are sorted, so should these ones therefore be at the top of the list?
>
> These are sorted by NL80211_CHAN_WIDTH_* attribute value, which makes
> a little more sense to me than sorting by the string or numerically by
> width, but sure, I can do it either way.
That's fine by me: I was asking because it looked like you might have
just added them to the bottom.
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iw: display 5/10 MHz channel widths
2016-07-21 15:39 [PATCH] iw: display 5/10 MHz channel widths Bob Copeland
2016-07-22 9:53 ` Julian Calaby
@ 2016-08-01 12:24 ` Johannes Berg
1 sibling, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2016-08-01 12:24 UTC (permalink / raw)
To: Bob Copeland; +Cc: linux-wireless
On Thu, 2016-07-21 at 11:39 -0400, Bob Copeland wrote:
> iw was showing 'width: unknown' for channels on OCB interfaces; teach
> it the values for 5/10 MHz so it will show the configured width.
>
Applied, thanks.
johannes
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-08-01 12:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-21 15:39 [PATCH] iw: display 5/10 MHz channel widths Bob Copeland
2016-07-22 9:53 ` Julian Calaby
2016-07-22 10:38 ` Bob Copeland
2016-07-22 11:21 ` Julian Calaby
2016-08-01 12:24 ` Johannes Berg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.