Search Linux Wireless

[PATCH] mac80211: Update last_ack status for all except probing frames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Update last_ack status for all except station probing frames
(i.e null data). Otherwise the station inactivity duration is
cleared whenever AP is checking presence of idle stations by sending
null data frame for every inactive threshold (ap_max_inactivity).
Though the station is idle for longer period, the inactive
time in station dump is restricted ap_max_inactivity threshold.

Signed-off-by: Rajkumar Manoharan <rmanohar@xxxxxxxxxxxxxxxx>
---
 net/mac80211/status.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index da7427a41529..24ce416f74cd 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -185,10 +185,21 @@ static void ieee80211_check_pending_bar(struct sta_info *sta, u8 *addr, u8 tid)
 static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb)
 {
 	struct ieee80211_mgmt *mgmt = (void *) skb->data;
+	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 	struct ieee80211_local *local = sta->local;
 	struct ieee80211_sub_if_data *sdata = sta->sdata;
 
-	if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS))
+	/* Update last_ack status for all except station probing frames
+	 * (i.e null data). Otherwise the station inactivity duration is cleared
+	 * whenever AP is checking presence of idle stations by sending
+	 * null data frame for every inactive threshold (ap_max_inactivity).
+	 * Though the station is idle for longer period, the inactive time in
+	 * station dump is restricted ap_max_inactivity threshold.
+	 */
+	if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS) &&
+	    !((info->flags & IEEE80211_TX_INTFL_NL80211_FRAME_TX) &&
+	      (ieee80211_is_nullfunc(mgmt->frame_control) ||
+	       ieee80211_is_qos_nullfunc(mgmt->frame_control))))
 		sta->status_stats.last_ack = jiffies;
 
 	if (ieee80211_is_data_qos(mgmt->frame_control)) {
-- 
1.9.1




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux