It's not very helpful to see, in iwconfig, the current frequency
the card is tuned to if that frequency is currently somewhere
across the board because we're scanning. Since we keep track of
the frequency the user wants, display that instead.
Signed-off-by: Johannes Berg <[email protected]>
---
net/mac80211/wext.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- wireless-testing.orig/net/mac80211/wext.c 2009-05-04 17:41:53.000000000 +0200
+++ wireless-testing/net/mac80211/wext.c 2009-05-04 17:42:02.000000000 +0200
@@ -185,7 +185,7 @@ static int ieee80211_ioctl_giwfreq(struc
if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
return cfg80211_ibss_wext_giwfreq(dev, info, freq, extra);
- freq->m = local->hw.conf.channel->center_freq;
+ freq->m = local->oper_channel->center_freq;
freq->e = 6;
return 0;
Johannes Berg wrote:
> It's not very helpful to see, in iwconfig, the current frequency
> the card is tuned to if that frequency is currently somewhere
> across the board because we're scanning. Since we keep track of
> the frequency the user wants, display that instead.
>
> Signed-off-by: Johannes Berg <[email protected]>
> ---
> net/mac80211/wext.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- wireless-testing.orig/net/mac80211/wext.c 2009-05-04 17:41:53.000000000 +0200
> +++ wireless-testing/net/mac80211/wext.c 2009-05-04 17:42:02.000000000 +0200
> @@ -185,7 +185,7 @@ static int ieee80211_ioctl_giwfreq(struc
> if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
> return cfg80211_ibss_wext_giwfreq(dev, info, freq, extra);
>
> - freq->m = local->hw.conf.channel->center_freq;
> + freq->m = local->oper_channel->center_freq;
> freq->e = 6;
>
> return 0;
>
>
>
Nack. People should see the hardware channel. If I set channel 6 and my
wifi card is on channel 11 I need to see 11 not 6. Doesn't make any
sense to show some imaginary idealistic "I wish it was on channel 6"
when the hardware is on channel 11. Am I missing something here?
Thanks,
Rick Farina
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
Johannes Berg wrote:
> On Mon, 2009-05-04 at 13:50 -0400, Richard Farina wrote:
>
>> Johannes Berg wrote:
>>
>>> It's not very helpful to see, in iwconfig, the current frequency
>>> the card is tuned to if that frequency is currently somewhere
>>> across the board because we're scanning. Since we keep track of
>>> the frequency the user wants, display that instead.
>>>
>>> Signed-off-by: Johannes Berg <[email protected]>
>>> ---
>>> net/mac80211/wext.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> --- wireless-testing.orig/net/mac80211/wext.c 2009-05-04 17:41:53.000000000 +0200
>>> +++ wireless-testing/net/mac80211/wext.c 2009-05-04 17:42:02.000000000 +0200
>>> @@ -185,7 +185,7 @@ static int ieee80211_ioctl_giwfreq(struc
>>> if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
>>> return cfg80211_ibss_wext_giwfreq(dev, info, freq, extra);
>>>
>>> - freq->m = local->hw.conf.channel->center_freq;
>>> + freq->m = local->oper_channel->center_freq;
>>> freq->e = 6;
>>>
>>> return 0;
>>>
>>>
>>>
>>>
>> Nack. People should see the hardware channel. If I set channel 6 and my
>> wifi card is on channel 11 I need to see 11 not 6. Doesn't make any
>> sense to show some imaginary idealistic "I wish it was on channel 6"
>> when the hardware is on channel 11. Am I missing something here?
>>
>
> Umm, if _you_ set channel 11 then you _will_ see channel 11. It's just
> that when it's scanning and happens to be on channel 132 instead of 11,
> while you previously set 11, you will _after_ this patch see 11, not
> 132.
>
>
Yes, and at what point does it seem like a good idea to hide the channel
the wifi card is on? If I set channel 11 and it is scanning instead of
locked on channel 11 then I should see the current channel the hardware
is on. This seems like an aweful idea to me, granted, it may help a few
people that don't understand how scanning works, but hiding the truth is
never a good idea. NACK.
-Rick Farina
> johannes
>
"John W. Linville" <[email protected]> writes:
>> Yes, and at what point does it seem like a good idea to hide the channel
>> the wifi card is on? If I set channel 11 and it is scanning instead of
>> locked on channel 11 then I should see the current channel the hardware
>> is on. This seems like an aweful idea to me, granted, it may help a few
>> people that don't understand how scanning works, but hiding the truth is
>> never a good idea. NACK.
>
> I can see what you mean, but I think showing seemingly random
> fluctuations in channel assignments is at best distracting. Don't you
> agree that most people are more interested in seeing the configuration
> state than the transient state of the hardware?
I agree, it's very distracting. And while doing mac80211 software scan
the device is on a channel approximately 30 ms with queues stopped, so
no data is transfered at that time. I don't see any benefit from
reporting this value to user space: "Hey, I'm on channel 5 now but by
the time to you read this I will be on channel 6 already."
If people want to follow how mac80211 changes the frequency during scan,
the proper way is to add debug messages for op_config() calls. I saw
that Johannes was already working on that.
--
Kalle Valo
On Tue, 2009-05-05 at 20:49 +0200, Johannes Berg wrote:
> On Tue, 2009-05-05 at 14:32 -0400, Richard Farina wrote:
>
> > To be honest, I would be perfectly happy with this patch if something
> > like a scanning "flag" were to be show in the output if that is what is
> > happening. I don't so much need to see the current channel (when in sta
> > mode at least) as I need to know that the card is scanning if it is not
> > currently on the channel the AP is on. I'd be very happy to simply see
> > it say "scanning" next to the channel or some such when this occurs.
>
> Except that's totally not possible with wext.
Also, again, it is impossible in practise to do that for all cards since
fullmac cards might be bg scanning without telling the host.
johannes
Kalle Valo wrote:
> "John W. Linville" <[email protected]> writes:
>
>
>>> Yes, and at what point does it seem like a good idea to hide the channel
>>> the wifi card is on? If I set channel 11 and it is scanning instead of
>>> locked on channel 11 then I should see the current channel the hardware
>>> is on. This seems like an aweful idea to me, granted, it may help a few
>>> people that don't understand how scanning works, but hiding the truth is
>>> never a good idea. NACK.
>>>
>> I can see what you mean, but I think showing seemingly random
>> fluctuations in channel assignments is at best distracting. Don't you
>> agree that most people are more interested in seeing the configuration
>> state than the transient state of the hardware?
>>
>
> I agree, it's very distracting. And while doing mac80211 software scan
> the device is on a channel approximately 30 ms with queues stopped, so
> no data is transfered at that time. I don't see any benefit from
> reporting this value to user space: "Hey, I'm on channel 5 now but by
> the time to you read this I will be on channel 6 already."
>
> If people want to follow how mac80211 changes the frequency during scan,
> the proper way is to add debug messages for op_config() calls. I saw
> that Johannes was already working on that.
>
>
To be honest, I would be perfectly happy with this patch if something
like a scanning "flag" were to be show in the output if that is what is
happening. I don't so much need to see the current channel (when in sta
mode at least) as I need to know that the card is scanning if it is not
currently on the channel the AP is on. I'd be very happy to simply see
it say "scanning" next to the channel or some such when this occurs.
thanks,
Rick Farina
On Mon, May 04, 2009 at 02:11:52PM -0400, Richard Farina wrote:
> Johannes Berg wrote:
>> Umm, if _you_ set channel 11 then you _will_ see channel 11. It's just
>> that when it's scanning and happens to be on channel 132 instead of 11,
>> while you previously set 11, you will _after_ this patch see 11, not
>> 132.
>>
>>
> Yes, and at what point does it seem like a good idea to hide the channel
> the wifi card is on? If I set channel 11 and it is scanning instead of
> locked on channel 11 then I should see the current channel the hardware
> is on. This seems like an aweful idea to me, granted, it may help a few
> people that don't understand how scanning works, but hiding the truth is
> never a good idea. NACK.
I can see what you mean, but I think showing seemingly random
fluctuations in channel assignments is at best distracting. Don't you
agree that most people are more interested in seeing the configuration
state than the transient state of the hardware?
John
--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.
On Mon, 2009-05-04 at 13:50 -0400, Richard Farina wrote:
> Johannes Berg wrote:
> > It's not very helpful to see, in iwconfig, the current frequency
> > the card is tuned to if that frequency is currently somewhere
> > across the board because we're scanning. Since we keep track of
> > the frequency the user wants, display that instead.
> >
> > Signed-off-by: Johannes Berg <[email protected]>
> > ---
> > net/mac80211/wext.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > --- wireless-testing.orig/net/mac80211/wext.c 2009-05-04 17:41:53.000000000 +0200
> > +++ wireless-testing/net/mac80211/wext.c 2009-05-04 17:42:02.000000000 +0200
> > @@ -185,7 +185,7 @@ static int ieee80211_ioctl_giwfreq(struc
> > if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
> > return cfg80211_ibss_wext_giwfreq(dev, info, freq, extra);
> >
> > - freq->m = local->hw.conf.channel->center_freq;
> > + freq->m = local->oper_channel->center_freq;
> > freq->e = 6;
> >
> > return 0;
> >
> >
> >
> Nack. People should see the hardware channel. If I set channel 6 and my
> wifi card is on channel 11 I need to see 11 not 6. Doesn't make any
> sense to show some imaginary idealistic "I wish it was on channel 6"
> when the hardware is on channel 11. Am I missing something here?
Umm, if _you_ set channel 11 then you _will_ see channel 11. It's just
that when it's scanning and happens to be on channel 132 instead of 11,
while you previously set 11, you will _after_ this patch see 11, not
132.
johannes
On Monday 04 May 2009, John W. Linville wrote:
> On Mon, May 04, 2009 at 02:11:52PM -0400, Richard Farina wrote:
> > Johannes Berg wrote:
> >> Umm, if _you_ set channel 11 then you _will_ see channel 11. It's just
> >> that when it's scanning and happens to be on channel 132 instead of 11,
> >> while you previously set 11, you will _after_ this patch see 11, not
> >> 132.
> >
> > Yes, and at what point does it seem like a good idea to hide the channel
> > the wifi card is on? If I set channel 11 and it is scanning instead of
> > locked on channel 11 then I should see the current channel the hardware
> > is on. This seems like an aweful idea to me, granted, it may help a few
> > people that don't understand how scanning works, but hiding the truth is
> > never a good idea. NACK.
>
> I can see what you mean, but I think showing seemingly random
> fluctuations in channel assignments is at best distracting. Don't you
> agree that most people are more interested in seeing the configuration
> state than the transient state of the hardware?
I want to report my experience. There was a bug in the ath5k driver with a
hanging result during scanning mode. I was able to discover the problem
thanks to the iwconfig output.
In alternative, is it possible to add a status flag so that iwconfig from user
space can report scanning mode is operative?
Fabio
On Mon, May 4, 2009 at 11:53 AM, Fabio Rossi <[email protected]> wrote:
> On Monday 04 May 2009, John W. Linville wrote:
>
>> On Mon, May 04, 2009 at 02:11:52PM -0400, Richard Farina wrote:
>> > Johannes Berg wrote:
>> >> Umm, if _you_ set channel 11 then you _will_ see channel 11. It's=
just
>> >> that when it's scanning and happens to be on channel 132 instead =
of 11,
>> >> while you previously set 11, you will _after_ this patch see 11, =
not
>> >> 132.
>> >
>> > Yes, and at what point does it seem like a good idea to hide the c=
hannel
>> > the wifi card is on? =C2=A0If I set channel 11 and it is scanning =
instead of
>> > locked on channel 11 then I should see the current channel the har=
dware
>> > is on. =C2=A0This seems like an aweful idea to me, granted, it may=
help a few
>> > people that don't understand how scanning works, but hiding the tr=
uth is
>> > never a good idea. NACK.
>>
>> I can see what you mean, but I think showing seemingly random
>> fluctuations in channel assignments is at best distracting. =C2=A0Do=
n't you
>> agree that most people are more interested in seeing the configurati=
on
>> state than the transient state of the hardware?
>
> I want to report my experience. There was a bug in the ath5k driver w=
ith a
> hanging result during scanning mode. I was able to discover the probl=
em
> thanks to the iwconfig output.
>
> In alternative, is it possible to add a status flag so that iwconfig =
from user
> space can report scanning mode is operative?
iw event
Or the old way : iwevent
Luis
On Mon, 2009-05-04 at 11:33 -0700, Luis R. Rodriguez wrote:
> Why not show both through iw and for wext just use whatever wext did
> for most devices?
Where "most devices" counts as number of drivers (I think all
pre-mac80211 drivers behave like _after_ my patch), or number of
deployed devices (piles of Intel devices, I guess), or...?
Also keep in mind that for many devices we simply cannot provide the
real channel the radio is currently tuned to.
johannes
On Mon, 2009-05-04 at 14:11 -0400, Richard Farina wrote:
> Yes, and at what point does it seem like a good idea to hide the channel
> the wifi card is on? If I set channel 11 and it is scanning instead of
> locked on channel 11 then I should see the current channel the hardware
> is on. This seems like an aweful idea to me, granted, it may help a few
> people that don't understand how scanning works, but hiding the truth is
> never a good idea. NACK.
It's not really about hiding the truth. Besides, many many devices are
_already_ "hiding the truth" (to use your words) because they do
scanning in firmware and you never know what channel they're on (e.g.
all Intel wireless hardware).
I think it's completely pointless for us to reply to the question "what
channel am I on" with the answer "currently the receiver is tuned to
132", when we can say "you're associated to a network on channel 11".
After all, we don't unset the SSID/BSSID when scanning either, even
though we're currently not talking to the AP.
johannes
On Mon, 2009-05-04 at 14:30 -0400, Richard Farina wrote:
> And if the card claims to be associated but ends up stuck on another
> channel?
Then your network breaks anyway? And you see messages in the log that it
failed to switch channel? We're talking about mac80211 devices :)
> I can't see a good reason for this at all but if no one agrees
> with me then it is well without your power to simply overrule me.
>
> I think it is an awful idea, and intel being broken isn't an excuse to
> break everything else. If the card isn't on the right channel because
> of some random failure this patch ensures there is no way to
> troubleshoot. If you want to display current channel that is the
> hardware channel, if you want to display "Channel the AP I'm associated
> to is on" then call it something other than "Current Channel"
It's not just Intel... All fullmac devices, ie. everything not using
mac80211, shows the same behaviour.
And trying to say "current channel" is "hardware channel" runs into the
nice pitfall that, unfortunately, wext is so undefined that you can't
really say either. I think the channel it's trying to use makes a whole
lot more sense because otherwise a user who just randomly does
"iwconfig" will be mightily confused if for example wpa_supplicant had
just requested a scan.
johannes
Johannes Berg wrote:
> On Mon, 2009-05-04 at 14:11 -0400, Richard Farina wrote:
>
>
>> Yes, and at what point does it seem like a good idea to hide the channel
>> the wifi card is on? If I set channel 11 and it is scanning instead of
>> locked on channel 11 then I should see the current channel the hardware
>> is on. This seems like an aweful idea to me, granted, it may help a few
>> people that don't understand how scanning works, but hiding the truth is
>> never a good idea. NACK.
>>
>
> It's not really about hiding the truth. Besides, many many devices are
> _already_ "hiding the truth" (to use your words) because they do
> scanning in firmware and you never know what channel they're on (e.g.
> all Intel wireless hardware).
>
> I think it's completely pointless for us to reply to the question "what
> channel am I on" with the answer "currently the receiver is tuned to
> 132", when we can say "you're associated to a network on channel 11".
>
>
And if the card claims to be associated but ends up stuck on another
channel? I can't see a good reason for this at all but if no one agrees
with me then it is well without your power to simply overrule me.
I think it is an awful idea, and intel being broken isn't an excuse to
break everything else. If the card isn't on the right channel because
of some random failure this patch ensures there is no way to
troubleshoot. If you want to display current channel that is the
hardware channel, if you want to display "Channel the AP I'm associated
to is on" then call it something other than "Current Channel"
My 0.02.
Thanks,
Rick Farina
> After all, we don't unset the SSID/BSSID when scanning either, even
> though we're currently not talking to the AP.
>
> johannes
>
On Tue, 2009-05-05 at 14:32 -0400, Richard Farina wrote:
> To be honest, I would be perfectly happy with this patch if something
> like a scanning "flag" were to be show in the output if that is what is
> happening. I don't so much need to see the current channel (when in sta
> mode at least) as I need to know that the card is scanning if it is not
> currently on the channel the AP is on. I'd be very happy to simply see
> it say "scanning" next to the channel or some such when this occurs.
Except that's totally not possible with wext.
johannes
On Mon, May 4, 2009 at 11:30 AM, Richard Farina <[email protected]> wro=
te:
> Johannes Berg wrote:
>>
>> On Mon, 2009-05-04 at 14:11 -0400, Richard Farina wrote:
>>
>>
>>>
>>> Yes, and at what point does it seem like a good idea to hide the ch=
annel
>>> the wifi card is on? =C2=A0If I set channel 11 and it is scanning i=
nstead of
>>> locked on channel 11 then I should see the current channel the hard=
ware is
>>> on. =C2=A0This seems like an aweful idea to me, granted, it may hel=
p a few people
>>> that don't understand how scanning works, but hiding the truth is n=
ever a
>>> good idea. NACK.
>>>
>>
>> It's not really about hiding the truth. Besides, many many devices a=
re
>> _already_ "hiding the truth" (to use your words) because they do
>> scanning in firmware and you never know what channel they're on (e.g=
=2E
>> all Intel wireless hardware).
>>
>> I think it's completely pointless for us to reply to the question "w=
hat
>> channel am I on" with the answer "currently the receiver is tuned to
>> 132", when we can say "you're associated to a network on channel 11"=
=2E
>>
>>
>
> And if the card claims to be associated but ends up stuck on another
> channel? =C2=A0I can't see a good reason for this at all but if no on=
e agrees
> with me then it is well without your power to simply overrule me.
>
> I think it is an awful idea, and intel being broken isn't an excuse t=
o break
> everything else. =C2=A0If the card isn't on the right channel because=
of some
> random failure this patch ensures there is no way to troubleshoot. =C2=
=A0If you
> want to display current channel that is the hardware channel, if you =
want to
> display "Channel the AP I'm associated to is on" then call it somethi=
ng
> other than "Current Channel"
>
> My 0.02.
Why not show both through iw and for wext just use whatever wext did
for most devices?
Luis