]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/mac80211/mlme.c
mac80211: decrease execution of the associated timer
[linux-2.6-omap-h63xx.git] / net / mac80211 / mlme.c
index c05be09b9c6f5db67a85742d4b0f61e9724ac4c5..209abb073dfb5dbf43a63e8ad0ddb42ee5f7ec88 100644 (file)
@@ -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)
 {