diff options
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 15 | ||||
-rw-r--r-- | net/mac80211/rx.c | 3 |
3 files changed, 20 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 564167fbb9aa..055bb776408c 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -1083,6 +1083,8 @@ void ieee80211_dynamic_ps_timer(unsigned long data); | |||
1083 | void ieee80211_send_nullfunc(struct ieee80211_local *local, | 1083 | void ieee80211_send_nullfunc(struct ieee80211_local *local, |
1084 | struct ieee80211_sub_if_data *sdata, | 1084 | struct ieee80211_sub_if_data *sdata, |
1085 | int powersave); | 1085 | int powersave); |
1086 | void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata, | ||
1087 | struct ieee80211_hdr *hdr); | ||
1086 | 1088 | ||
1087 | void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw, | 1089 | void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw, |
1088 | enum queue_stop_reason reason); | 1090 | enum queue_stop_reason reason); |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index c05be09b9c6f..209abb073dfb 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -909,6 +909,21 @@ static void ieee80211_associate(struct ieee80211_sub_if_data *sdata) | |||
909 | mod_timer(&ifmgd->timer, jiffies + IEEE80211_ASSOC_TIMEOUT); | 909 | mod_timer(&ifmgd->timer, jiffies + IEEE80211_ASSOC_TIMEOUT); |
910 | } | 910 | } |
911 | 911 | ||
912 | void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata, | ||
913 | struct ieee80211_hdr *hdr) | ||
914 | { | ||
915 | /* | ||
916 | * We can postpone the mgd.timer whenever receiving unicast frames | ||
917 | * from AP because we know that the connection is working both ways | ||
918 | * at that time. But multicast frames (and hence also beacons) must | ||
919 | * be ignored here, because we need to trigger the timer during | ||
920 | * data idle periods for sending the periodical probe request to | ||
921 | * the AP. | ||
922 | */ | ||
923 | if (!is_multicast_ether_addr(hdr->addr1)) | ||
924 | mod_timer(&sdata->u.mgd.timer, | ||
925 | jiffies + IEEE80211_MONITORING_INTERVAL); | ||
926 | } | ||
912 | 927 | ||
913 | static void ieee80211_associated(struct ieee80211_sub_if_data *sdata) | 928 | static void ieee80211_associated(struct ieee80211_sub_if_data *sdata) |
914 | { | 929 | { |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 47d395a51923..dbfb28465354 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -856,6 +856,9 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx) | |||
856 | if (!(rx->flags & IEEE80211_RX_RA_MATCH)) | 856 | if (!(rx->flags & IEEE80211_RX_RA_MATCH)) |
857 | return RX_CONTINUE; | 857 | return RX_CONTINUE; |
858 | 858 | ||
859 | if (rx->sdata->vif.type == NL80211_IFTYPE_STATION) | ||
860 | ieee80211_sta_rx_notify(rx->sdata, hdr); | ||
861 | |||
859 | sta->rx_fragments++; | 862 | sta->rx_fragments++; |
860 | sta->rx_bytes += rx->skb->len; | 863 | sta->rx_bytes += rx->skb->len; |
861 | sta->last_signal = rx->status->signal; | 864 | sta->last_signal = rx->status->signal; |