* [PATCH] mac80211: Notify the driver only when the beacon interval changes
@ 2009-02-27 4:19 Sujith
2009-02-27 16:17 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Sujith @ 2009-02-27 4:19 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, johannes, Jouni.Malinen
Currently, the driver is unconditionally notified of beacon
interval. This is a problem in AP mode, because the driver has
to know that the beacon interval has actualy changed to recalculate
TBTT and reset the HW TSF. Fix this to make mac80211 notify the driver
only when the beacon interval has been reconfigured to a new value.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
( CC the list properly this time. )
net/mac80211/cfg.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index c43129e..58693e5 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -451,7 +451,8 @@ static int ieee80211_config_beacon(struct ieee80211_sub_if_data *sdata,
* This is a kludge. beacon interval should really be part
* of the beacon information.
*/
- if (params->interval) {
+ if (params->interval && (sdata->local->hw.conf.beacon_int !=
+ params->interval)) {
sdata->local->hw.conf.beacon_int = params->interval;
err = ieee80211_hw_config(sdata->local,
IEEE80211_CONF_CHANGE_BEACON_INTERVAL);
--
1.6.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] mac80211: Notify the driver only when the beacon interval changes
2009-02-27 4:19 [PATCH] mac80211: Notify the driver only when the beacon interval changes Sujith
@ 2009-02-27 16:17 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2009-02-27 16:17 UTC (permalink / raw)
To: Sujith; +Cc: linville, linux-wireless, Jouni.Malinen
[-- Attachment #1: Type: text/plain, Size: 1284 bytes --]
On Fri, 2009-02-27 at 09:49 +0530, Sujith wrote:
> Currently, the driver is unconditionally notified of beacon
> interval. This is a problem in AP mode, because the driver has
> to know that the beacon interval has actualy changed to recalculate
> TBTT and reset the HW TSF. Fix this to make mac80211 notify the driver
> only when the beacon interval has been reconfigured to a new value.
>
> Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
> ---
>
> ( CC the list properly this time. )
>
> net/mac80211/cfg.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
> index c43129e..58693e5 100644
> --- a/net/mac80211/cfg.c
> +++ b/net/mac80211/cfg.c
> @@ -451,7 +451,8 @@ static int ieee80211_config_beacon(struct ieee80211_sub_if_data *sdata,
> * This is a kludge. beacon interval should really be part
> * of the beacon information.
> */
> - if (params->interval) {
> + if (params->interval && (sdata->local->hw.conf.beacon_int !=
> + params->interval)) {
> sdata->local->hw.conf.beacon_int = params->interval;
> err = ieee80211_hw_config(sdata->local,
> IEEE80211_CONF_CHANGE_BEACON_INTERVAL);
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-27 21:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-27 4:19 [PATCH] mac80211: Notify the driver only when the beacon interval changes Sujith
2009-02-27 16:17 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox