All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: Update last_ack status for all except probing frames
@ 2017-10-31  0:29 Rajkumar Manoharan
  2017-11-01  2:31 ` Igor Mitsyanko
  2017-11-06 10:29 ` Johannes Berg
  0 siblings, 2 replies; 10+ messages in thread
From: Rajkumar Manoharan @ 2017-10-31  0:29 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, rmanohar, Rajkumar Manoharan

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@qti.qualcomm.com>
---
 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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-11-20 16:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-31  0:29 [PATCH] mac80211: Update last_ack status for all except probing frames Rajkumar Manoharan
2017-11-01  2:31 ` Igor Mitsyanko
2017-11-02 18:06   ` Rajkumar Manoharan
2017-11-06 10:29 ` Johannes Berg
2017-11-06 17:44   ` Rajkumar Manoharan
2017-11-06 19:50     ` Igor Mitsyanko
2017-11-06 20:20       ` Rajkumar Manoharan
2017-11-13  9:25         ` Johannes Berg
2017-11-15 19:21           ` Rajkumar Manoharan
2017-11-20 16:09             ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.