* [PATCH 1/1] mac80211: fix beacon interval value
@ 2008-06-12 19:38 Tomas Winkler
2008-06-12 19:41 ` Johannes Berg
0 siblings, 1 reply; 6+ messages in thread
From: Tomas Winkler @ 2008-06-12 19:38 UTC (permalink / raw)
To: linville, johannes, yi.zhu; +Cc: linux-wireless, Tomas Winkler
This patch fixes setting beacon interval
1. in register_hw it honors value requested by the driver
2. It uses default 100 instead of 1000 or 10000. Scanning for beacon
interval ~1sec and above is not sane
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
net/mac80211/main.c | 3 ++-
net/mac80211/mlme.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index b182f01..5c5396e 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -1707,7 +1707,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
debugfs_hw_add(local);
- local->hw.conf.beacon_int = 1000;
+ if (local->hw.conf.beacon_int < 10)
+ local->hw.conf.beacon_int = 100;
local->wstats_flags |= local->hw.flags & (IEEE80211_HW_SIGNAL_UNSPEC |
IEEE80211_HW_SIGNAL_DB |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 7f05820..46f2037 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3583,7 +3583,7 @@ static int ieee80211_sta_create_ibss(struct net_device *dev,
sband = local->hw.wiphy->bands[bss->band];
if (local->hw.conf.beacon_int == 0)
- local->hw.conf.beacon_int = 10000;
+ local->hw.conf.beacon_int = 100;
bss->beacon_int = local->hw.conf.beacon_int;
bss->last_update = jiffies;
bss->capability = WLAN_CAPABILITY_IBSS;
--
1.5.4.1
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] mac80211: fix beacon interval value
2008-06-12 19:38 [PATCH 1/1] mac80211: fix beacon interval value Tomas Winkler
@ 2008-06-12 19:41 ` Johannes Berg
2008-06-12 20:05 ` Tomas Winkler
0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2008-06-12 19:41 UTC (permalink / raw)
To: Tomas Winkler; +Cc: linville, yi.zhu, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 292 bytes --]
> 1. in register_hw it honors value requested by the driver
I don't think the driver should be able to "request" a value.
> 2. It uses default 100 instead of 1000 or 10000. Scanning for beacon
> interval ~1sec and above is not sane
Yeah, 10000 seems a bit excessive.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] mac80211: fix beacon interval value
2008-06-12 19:41 ` Johannes Berg
@ 2008-06-12 20:05 ` Tomas Winkler
2008-06-12 20:08 ` Johannes Berg
0 siblings, 1 reply; 6+ messages in thread
From: Tomas Winkler @ 2008-06-12 20:05 UTC (permalink / raw)
To: Johannes Berg; +Cc: linville, yi.zhu, linux-wireless
On Thu, Jun 12, 2008 at 10:41 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
>
>> 1. in register_hw it honors value requested by the driver
>
> I don't think the driver should be able to "request" a value.
Yes and no.
The problem is that we don't have user space interface to tune this
for IBSS so in this circumstances
driver can choose what value is best for it.
Tomas
>
>> 2. It uses default 100 instead of 1000 or 10000. Scanning for beacon
>> interval ~1sec and above is not sane
>
> Yeah, 10000 seems a bit excessive.
Actually this never took affect as there is no way that 0 is assigned
to hw->conf.beacon_int but even 1000 is edgy and not suitable for a
default value.
Tomas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] mac80211: fix beacon interval value
2008-06-12 20:05 ` Tomas Winkler
@ 2008-06-12 20:08 ` Johannes Berg
2008-06-12 20:47 ` Tomas Winkler
0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2008-06-12 20:08 UTC (permalink / raw)
To: Tomas Winkler; +Cc: linville, yi.zhu, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1331 bytes --]
On Thu, 2008-06-12 at 23:05 +0300, Tomas Winkler wrote:
> On Thu, Jun 12, 2008 at 10:41 PM, Johannes Berg
> <johannes@sipsolutions.net> wrote:
> >
> >> 1. in register_hw it honors value requested by the driver
> >
> > I don't think the driver should be able to "request" a value.
>
> Yes and no.
> The problem is that we don't have user space interface to tune this
> for IBSS so in this circumstances
> driver can choose what value is best for it.
I don't see how the beacon interval has any relation to "what is best
for the hardware/driver". And doing this just creates hard to debug
differences between drivers. All differences between different drivers
are causing problems at some point.
Wrt. configurability, yes, we should maybe allow this. Although it's
only used for IBSS (in BSS it is configurable already) so I'm not
entirely sure... users are probably not able to make an informed
decision anyway.
> >> 2. It uses default 100 instead of 1000 or 10000. Scanning for beacon
> >> interval ~1sec and above is not sane
> >
> > Yeah, 10000 seems a bit excessive.
>
> Actually this never took affect as there is no way that 0 is assigned
> to hw->conf.beacon_int but even 1000 is edgy and not suitable for a
> default value.
Sure, I'm fine with changing both values to 100.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] mac80211: fix beacon interval value
2008-06-12 20:08 ` Johannes Berg
@ 2008-06-12 20:47 ` Tomas Winkler
2008-06-12 20:53 ` Johannes Berg
0 siblings, 1 reply; 6+ messages in thread
From: Tomas Winkler @ 2008-06-12 20:47 UTC (permalink / raw)
To: Johannes Berg; +Cc: linville, yi.zhu, linux-wireless
On Thu, Jun 12, 2008 at 11:08 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Thu, 2008-06-12 at 23:05 +0300, Tomas Winkler wrote:
>> On Thu, Jun 12, 2008 at 10:41 PM, Johannes Berg
>> <johannes@sipsolutions.net> wrote:
>> >
>> >> 1. in register_hw it honors value requested by the driver
>> >
>> > I don't think the driver should be able to "request" a value.
>>
>> Yes and no.
>> The problem is that we don't have user space interface to tune this
>> for IBSS so in this circumstances
>> driver can choose what value is best for it.
>
> I don't see how the beacon interval has any relation to "what is best
> for the hardware/driver".
Usually this affect power management if implemented.
And doing this just creates hard to debug
> differences between drivers. All differences between different drivers
> are causing problems at some point.
Get assimilated :)
> Wrt. configurability, yes, we should maybe allow this. Although it's
> only used for IBSS (in BSS it is configurable already)
You mean probably AP
What should be the proper interface sysfs or iw(nl) ?
>so I'm not
> entirely sure... users are probably not able to make an informed
> decision anyway.
Are you talking about Linux users ? :). Usually vendors take such decisions.
>
>> >> 2. It uses default 100 instead of 1000 or 10000. Scanning for beacon
>> >> interval ~1sec and above is not sane
>> >
>> > Yeah, 10000 seems a bit excessive.
>>
>> Actually this never took affect as there is no way that 0 is assigned
>> to hw->conf.beacon_int but even 1000 is edgy and not suitable for a
>> default value.
>
> Sure, I'm fine with changing both values to 100.
Good.
Tomas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] mac80211: fix beacon interval value
2008-06-12 20:47 ` Tomas Winkler
@ 2008-06-12 20:53 ` Johannes Berg
0 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2008-06-12 20:53 UTC (permalink / raw)
To: Tomas Winkler; +Cc: linville, yi.zhu, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 990 bytes --]
> > I don't see how the beacon interval has any relation to "what is best
> > for the hardware/driver".
>
> Usually this affect power management if implemented.
Hmm, yeah, but wouldn't that have to deal with all values?
> And doing this just creates hard to debug
> > differences between drivers. All differences between different drivers
> > are causing problems at some point.
>
> Get assimilated :)
Heh.
> > Wrt. configurability, yes, we should maybe allow this. Although it's
> > only used for IBSS (in BSS it is configurable already)
> You mean probably AP
Yes.
> What should be the proper interface sysfs or iw(nl) ?
nl80211, I'd think, yeah, for BSS (AP) you can set it along with the
beacon.
> >so I'm not
> > entirely sure... users are probably not able to make an informed
> > decision anyway.
>
> Are you talking about Linux users ? :). Usually vendors take such decisions.
Well I mean if it's userspace-configurable.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-06-12 20:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-12 19:38 [PATCH 1/1] mac80211: fix beacon interval value Tomas Winkler
2008-06-12 19:41 ` Johannes Berg
2008-06-12 20:05 ` Tomas Winkler
2008-06-12 20:08 ` Johannes Berg
2008-06-12 20:47 ` Tomas Winkler
2008-06-12 20:53 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox