From c1155a256a2d369bd1eba59d5d036621b568a929 Mon Sep 17 00:00:00 2001 From: Kalle Valo Date: Sun, 22 Mar 2009 21:57:06 +0200 Subject: [PATCH] --- yaml --- r: 136185 b: refs/heads/master c: 3cf335d527ba6af80f4143f3c9e5136afdb143af h: refs/heads/master i: 136183: b9826af67f7154c7a5631a9371ea748ca1741691 v: v3 --- [refs] | 2 +- trunk/net/mac80211/ieee80211_i.h | 2 ++ trunk/net/mac80211/mlme.c | 15 +++++++++++++++ trunk/net/mac80211/rx.c | 3 +++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index cd7581193e67..65dd29fc9395 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: af83debf5bb44257082d4489ac86123a0cadf6d3 +refs/heads/master: 3cf335d527ba6af80f4143f3c9e5136afdb143af diff --git a/trunk/net/mac80211/ieee80211_i.h b/trunk/net/mac80211/ieee80211_i.h index 564167fbb9aa..055bb776408c 100644 --- a/trunk/net/mac80211/ieee80211_i.h +++ b/trunk/net/mac80211/ieee80211_i.h @@ -1083,6 +1083,8 @@ 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_sta_rx_notify(struct ieee80211_sub_if_data *sdata, + struct ieee80211_hdr *hdr); void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw, enum queue_stop_reason reason); diff --git a/trunk/net/mac80211/mlme.c b/trunk/net/mac80211/mlme.c index c05be09b9c6f..209abb073dfb 100644 --- a/trunk/net/mac80211/mlme.c +++ b/trunk/net/mac80211/mlme.c @@ -909,6 +909,21 @@ static void ieee80211_associate(struct ieee80211_sub_if_data *sdata) mod_timer(&ifmgd->timer, jiffies + IEEE80211_ASSOC_TIMEOUT); } +void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata, + struct ieee80211_hdr *hdr) +{ + /* + * We can postpone the mgd.timer whenever receiving unicast frames + * from AP because we know that the connection is working both ways + * at that time. But multicast frames (and hence also beacons) must + * be ignored here, because we need to trigger the timer during + * data idle periods for sending the periodical probe request to + * the AP. + */ + if (!is_multicast_ether_addr(hdr->addr1)) + mod_timer(&sdata->u.mgd.timer, + jiffies + IEEE80211_MONITORING_INTERVAL); +} static void ieee80211_associated(struct ieee80211_sub_if_data *sdata) { diff --git a/trunk/net/mac80211/rx.c b/trunk/net/mac80211/rx.c index 47d395a51923..dbfb28465354 100644 --- a/trunk/net/mac80211/rx.c +++ b/trunk/net/mac80211/rx.c @@ -856,6 +856,9 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx) if (!(rx->flags & IEEE80211_RX_RA_MATCH)) return RX_CONTINUE; + if (rx->sdata->vif.type == NL80211_IFTYPE_STATION) + ieee80211_sta_rx_notify(rx->sdata, hdr); + sta->rx_fragments++; sta->rx_bytes += rx->skb->len; sta->last_signal = rx->status->signal;