mac80211: fix regression in station connection monitor optimization
[openwrt/staging/dedeckeh.git] / package / kernel / mac80211 / patches / subsys / 332-mac80211-fix-regression-in-sta-connection-monitor.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Mon, 21 Sep 2020 17:43:06 +0200
3 Subject: [PATCH] mac80211: fix regression in sta connection monitor
4
5 When the nulldata frame was acked, the probe send count needs to be reset,
6 otherwise it will keep increasing until the connection is considered dead,
7 even though it fine.
8
9 Fixes: 9abf4e49830d ("mac80211: optimize station connection monitor")
10 Reported-by: Georgi Valkov <gvalkov@abv.bg>
11 Signed-off-by: Felix Fietkau <nbd@nbd.name>
12 ---
13
14 --- a/net/mac80211/mlme.c
15 +++ b/net/mac80211/mlme.c
16 @@ -2508,7 +2508,9 @@ void ieee80211_sta_tx_notify(struct ieee
17 !sdata->u.mgd.probe_send_count)
18 return;
19
20 - if (!ack)
21 + if (ack)
22 + sdata->u.mgd.probe_send_count = 0;
23 + else
24 sdata->u.mgd.nullfunc_failed = true;
25 ieee80211_queue_work(&sdata->local->hw, &sdata->work);
26 }