From: Felix Fietkau <nbd@openwrt.org>
To: linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net
Subject: [PATCH 3.12 2/2] mac80211: update sta->last_rx on acked tx frames
Date: Sun, 29 Sep 2013 21:39:34 +0200 [thread overview]
Message-ID: <1380483574-88667-2-git-send-email-nbd@openwrt.org> (raw)
In-Reply-To: <1380483574-88667-1-git-send-email-nbd@openwrt.org>
When clients are idle for too long, hostapd sends nullfunc frames for
probing. When those are acked by the client, the idle time needs to be
updated.
To make this work (and to avoid unnecessary probing), update sta->last_rx
whenever an ACK was received for a tx packet. Only do this if the flag
IEEE80211_HW_REPORTS_TX_ACK_STATUS is set.
Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
net/mac80211/status.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 368837f..78dc2e9 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -180,6 +180,9 @@ static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb)
struct ieee80211_local *local = sta->local;
struct ieee80211_sub_if_data *sdata = sta->sdata;
+ if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
+ sta->last_rx = jiffies;
+
if (ieee80211_is_data_qos(mgmt->frame_control)) {
struct ieee80211_hdr *hdr = (void *) skb->data;
u8 *qc = ieee80211_get_qos_ctl(hdr);
--
1.8.0.2
next prev parent reply other threads:[~2013-09-29 19:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-29 19:39 [PATCH 3.12 1/2] mac80211: use sta_info_get_bss() for nl80211 tx and client probing Felix Fietkau
2013-09-29 19:39 ` Felix Fietkau [this message]
2013-09-30 9:10 ` [PATCH 3.12 2/2] mac80211: update sta->last_rx on acked tx frames Johannes Berg
2013-09-30 9:46 ` Felix Fietkau
2013-09-30 10:34 ` Johannes Berg
2013-09-30 9:31 ` [PATCH 3.12 1/2] mac80211: use sta_info_get_bss() for nl80211 tx and client probing Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1380483574-88667-2-git-send-email-nbd@openwrt.org \
--to=nbd@openwrt.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox