On Mon, 2009-02-23 at 18:37 +0200, Kalle Valo wrote: > Currently the timer is triggering every two seconds > (IEEE80211_MONITORING_INTERVAL). Decrease the timer to only trigger when > nothing is received to avoid waking up CPU. > > Now there's a functional change that probe requests are sent only when the > data path is idle, earlier they were sent also while there was activity > on the data path. > > This is also preparation for beacon filtering support. Thanks to Johannes > Berg for the idea. > > Signed-off-by: Kalle Valo <kalle.valo@xxxxxxxxx> > --- > > net/mac80211/ieee80211_i.h | 1 + > net/mac80211/mlme.c | 7 +++++++ > net/mac80211/rx.c | 3 +++ > 3 files changed, 11 insertions(+), 0 deletions(-) > > diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h > index d06c757..7851135 100644 > --- a/net/mac80211/ieee80211_i.h > +++ b/net/mac80211/ieee80211_i.h > @@ -1078,6 +1078,7 @@ void ieee80211_dynamic_ps_timer(unsigned long data); > void ieee80211_send_nullfunc(struct ieee80211_local *local, > struct ieee80211_sub_if_data *sdata, > int powersave); > +void ieee80211_rx_trigger(struct ieee80211_sub_if_data *sdata); I think that could have a better name maybe? _sta_rx_notify? > void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw, > enum queue_stop_reason reason); > diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c > index 5a49779..b3caac0 100644 > --- a/net/mac80211/mlme.c > +++ b/net/mac80211/mlme.c > @@ -911,6 +911,13 @@ static void ieee80211_associate(struct ieee80211_sub_if_data *sdata) > mod_timer(&ifmgd->timer, jiffies + IEEE80211_ASSOC_TIMEOUT); > } > > +void ieee80211_rx_trigger(struct ieee80211_sub_if_data *sdata) > +{ > + if (sdata->vif.type == NL80211_IFTYPE_STATION) { > + mod_timer(&sdata->u.mgd.timer, > + jiffies + IEEE80211_MONITORING_INTERVAL); > + } Should we have the sta check outside the function? Seems a little odd to have a check in a file that only contains STATION mode code. Other than that, looks good to me. I'd have thought this would be more complicated :) johannes
Attachment:
signature.asc
Description: This is a digitally signed message part