aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2020-09-28 15:11:51 +0200
committerFelix Fietkau <nbd@nbd.name>2020-09-29 17:32:26 +0200
commit5b296141c2f7c0a7026ad0c7910d1aa1bacb14bd (patch)
tree3ca5910a84f0f8eaaedc08ca408476729c312284 /package/kernel/mac80211
parent3fab4ace570740a90f96c55c2c6ce85c48bc0bdc (diff)
downloadupstream-5b296141c2f7c0a7026ad0c7910d1aa1bacb14bd.tar.gz
upstream-5b296141c2f7c0a7026ad0c7910d1aa1bacb14bd.tar.bz2
upstream-5b296141c2f7c0a7026ad0c7910d1aa1bacb14bd.zip
mac80211: another fix for the sta connection monitor
Make the code more closely match the original behavior Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211')
-rw-r--r--package/kernel/mac80211/patches/subsys/332-mac80211-fix-regression-in-sta-connection-monitor.patch42
1 files changed, 37 insertions, 5 deletions
diff --git a/package/kernel/mac80211/patches/subsys/332-mac80211-fix-regression-in-sta-connection-monitor.patch b/package/kernel/mac80211/patches/subsys/332-mac80211-fix-regression-in-sta-connection-monitor.patch
index 72b6ed56c4..cff8045c05 100644
--- a/package/kernel/mac80211/patches/subsys/332-mac80211-fix-regression-in-sta-connection-monitor.patch
+++ b/package/kernel/mac80211/patches/subsys/332-mac80211-fix-regression-in-sta-connection-monitor.patch
@@ -13,7 +13,18 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
-@@ -1129,6 +1129,8 @@ void ieee80211_tx_status_ext(struct ieee
+@@ -991,10 +991,6 @@ static void __ieee80211_tx_status(struct
+ if (!(info->flags & IEEE80211_TX_CTL_INJECTED) && acked)
+ ieee80211_frame_acked(sta, skb);
+
+- if ((sta->sdata->vif.type == NL80211_IFTYPE_STATION) &&
+- ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS))
+- ieee80211_sta_tx_notify(sta->sdata, (void *) skb->data,
+- acked, info->status.tx_time);
+ }
+
+ /* SNMP counters
+@@ -1129,11 +1125,18 @@ void ieee80211_tx_status_ext(struct ieee
noack_success = !!(info->flags & IEEE80211_TX_STAT_NOACK_TRANSMITTED);
if (pubsta) {
@@ -22,17 +33,38 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!acked && !noack_success)
sta->status_stats.retry_failed++;
sta->status_stats.retry_count += retry_count;
-@@ -1143,6 +1145,13 @@ void ieee80211_tx_status_ext(struct ieee
+
+ if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) {
++ if (sdata->vif.type == NL80211_IFTYPE_STATION &&
++ skb && !(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP))
++ ieee80211_sta_tx_notify(sdata, (void *) skb->data,
++ acked, info->status.tx_time);
++
+ if (acked) {
+ sta->status_stats.last_ack = jiffies;
+
+@@ -1143,6 +1146,11 @@ void ieee80211_tx_status_ext(struct ieee
/* Track when last packet was ACKed */
sta->status_stats.last_pkt_time = jiffies;
+ /* Reset connection monitor */
+ if (sdata->vif.type == NL80211_IFTYPE_STATION &&
-+ unlikely(sdata->u.mgd.probe_send_count > 0)) {
++ unlikely(sdata->u.mgd.probe_send_count > 0))
+ sdata->u.mgd.probe_send_count = 0;
-+ ieee80211_queue_work(&local->hw, &sdata->work);
-+ }
+
if (info->status.is_valid_ack_signal) {
sta->status_stats.last_ack_signal =
(s8)info->status.ack_signal;
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -2508,7 +2508,9 @@ void ieee80211_sta_tx_notify(struct ieee
+ !sdata->u.mgd.probe_send_count)
+ return;
+
+- if (!ack)
++ if (ack)
++ sdata->u.mgd.probe_send_count = 0;
++ else
+ sdata->u.mgd.nullfunc_failed = true;
+ ieee80211_queue_work(&sdata->local->hw, &sdata->work);
+ }