Skip to content

Commit 03c6123

Browse files
committed
mt76: update to Git HEAD (2026-07-01)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
1 parent a8d9988 commit 03c6123

4 files changed

Lines changed: 205 additions & 29 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
From: Felix Fietkau <nbd@nbd.name>
2+
Date: Mon, 23 Mar 2026 10:14:22 +0000
3+
Subject: [PATCH] wifi: mac80211: add ieee80211_txq_aql_pending()
4+
5+
Add a function to allow drivers to query the pending AQL airtime
6+
for a given txq, for both unicast and broadcast.
7+
This will be used for mt76 to limit buffering in AP mode for power-save
8+
stations.
9+
10+
Signed-off-by: Felix Fietkau <nbd@nbd.name>
11+
---
12+
13+
--- a/include/net/mac80211.h
14+
+++ b/include/net/mac80211.h
15+
@@ -6603,6 +6603,17 @@ bool
16+
ieee80211_txq_airtime_check(struct ieee80211_hw *hw, struct ieee80211_txq *txq);
17+
18+
/**
19+
+ * ieee80211_txq_aql_pending - get pending AQL airtime for a txq
20+
+ *
21+
+ * @hw: pointer obtained from ieee80211_alloc_hw()
22+
+ * @txq: pointer obtained from station or virtual interface
23+
+ *
24+
+ * Return: pending airtime (in usec) for the given txq.
25+
+ */
26+
+u32 ieee80211_txq_aql_pending(struct ieee80211_hw *hw,
27+
+ struct ieee80211_txq *txq);
28+
+
29+
+/**
30+
* ieee80211_iter_keys - iterate keys programmed into the device
31+
* @hw: pointer obtained from ieee80211_alloc_hw()
32+
* @vif: virtual interface to iterate, may be %NULL for all
33+
--- a/net/mac80211/tx.c
34+
+++ b/net/mac80211/tx.c
35+
@@ -4185,6 +4185,24 @@ bool ieee80211_txq_airtime_check(struct
36+
}
37+
EXPORT_SYMBOL(ieee80211_txq_airtime_check);
38+
39+
+u32 ieee80211_txq_aql_pending(struct ieee80211_hw *hw,
40+
+ struct ieee80211_txq *txq)
41+
+{
42+
+ struct ieee80211_local *local = hw_to_local(hw);
43+
+ struct sta_info *sta;
44+
+
45+
+ if (!txq->sta)
46+
+ return atomic_read(&local->aql_bc_pending_airtime);
47+
+
48+
+ sta = container_of(txq->sta, struct sta_info, sta);
49+
+
50+
+ if (unlikely(txq->tid == IEEE80211_NUM_TIDS))
51+
+ return 0;
52+
+
53+
+ return atomic_read(&sta->airtime[txq->ac].aql_tx_pending);
54+
+}
55+
+EXPORT_SYMBOL(ieee80211_txq_aql_pending);
56+
+
57+
static bool
58+
ieee80211_txq_schedule_airtime_check(struct ieee80211_local *local, u8 ac)
59+
{
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
From: Felix Fietkau <nbd@nbd.name>
2+
Date: Wed, 10 Jun 2026 11:22:25 +0000
3+
Subject: [PATCH] wifi: mac80211: notify driver on airtime weight changes
4+
5+
Add a new sta_set_airtime_weight driver op so drivers can program the
6+
airtime fairness weight into hardware. The op is called when the weight
7+
is updated via sta_apply_parameters, and on station upload if a
8+
non-default weight is already set.
9+
10+
Signed-off-by: Felix Fietkau <nbd@nbd.name>
11+
---
12+
13+
--- a/include/net/mac80211.h
14+
+++ b/include/net/mac80211.h
15+
@@ -4484,6 +4484,8 @@ struct ieee80211_prep_tx_info {
16+
* @set_sar_specs: Update the SAR (TX power) settings.
17+
* @sta_set_decap_offload: Called to notify the driver when a station is allowed
18+
* to use rx decapsulation offload
19+
+ * @sta_set_airtime_weight: Called to notify the driver of a change to a
20+
+ * station's airtime fairness weight, so it can be programmed in hardware.
21+
* @add_twt_setup: Update hw with TWT agreement parameters received from the peer.
22+
* This callback allows the hw to check if requested parameters
23+
* are supported and if there is enough room for a new agreement.
24+
@@ -4896,6 +4898,9 @@ struct ieee80211_ops {
25+
void (*sta_set_decap_offload)(struct ieee80211_hw *hw,
26+
struct ieee80211_vif *vif,
27+
struct ieee80211_sta *sta, bool enabled);
28+
+ void (*sta_set_airtime_weight)(struct ieee80211_hw *hw,
29+
+ struct ieee80211_vif *vif,
30+
+ struct ieee80211_sta *sta, u16 weight);
31+
void (*add_twt_setup)(struct ieee80211_hw *hw,
32+
struct ieee80211_sta *sta,
33+
struct ieee80211_twt_setup *twt);
34+
--- a/net/mac80211/cfg.c
35+
+++ b/net/mac80211/cfg.c
36+
@@ -2298,8 +2298,12 @@ static int sta_apply_parameters(struct i
37+
if (ieee80211_vif_is_mesh(&sdata->vif))
38+
sta_apply_mesh_params(local, sta, params);
39+
40+
- if (params->airtime_weight)
41+
+ if (params->airtime_weight) {
42+
sta->airtime_weight = params->airtime_weight;
43+
+ if (sta->uploaded)
44+
+ drv_sta_set_airtime_weight(local, sdata, &sta->sta,
45+
+ sta->airtime_weight);
46+
+ }
47+
48+
/* set the STA state after all sta info from usermode has been set */
49+
if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) ||
50+
--- a/net/mac80211/driver-ops.c
51+
+++ b/net/mac80211/driver-ops.c
52+
@@ -157,6 +157,10 @@ int drv_sta_state(struct ieee80211_local
53+
sta->uploaded = true;
54+
if (rcu_access_pointer(sta->sta.rates))
55+
drv_sta_rate_tbl_update(local, sdata, &sta->sta);
56+
+ if (sta->airtime_weight != IEEE80211_DEFAULT_AIRTIME_WEIGHT)
57+
+ drv_sta_set_airtime_weight(local, sdata,
58+
+ &sta->sta,
59+
+ sta->airtime_weight);
60+
}
61+
} else if (old_state == IEEE80211_STA_ASSOC &&
62+
new_state == IEEE80211_STA_AUTH) {
63+
--- a/net/mac80211/driver-ops.h
64+
+++ b/net/mac80211/driver-ops.h
65+
@@ -1633,6 +1633,25 @@ static inline void drv_sta_set_decap_off
66+
trace_drv_return_void(local);
67+
}
68+
69+
+static inline void drv_sta_set_airtime_weight(struct ieee80211_local *local,
70+
+ struct ieee80211_sub_if_data *sdata,
71+
+ struct ieee80211_sta *sta,
72+
+ u16 weight)
73+
+{
74+
+ sdata = get_bss_sdata(sdata);
75+
+
76+
+ might_sleep();
77+
+ lockdep_assert_wiphy(local->hw.wiphy);
78+
+ if (!check_sdata_in_driver(sdata))
79+
+ return;
80+
+
81+
+ trace_drv_sta_set_airtime_weight(local, sdata, sta, weight);
82+
+ if (local->ops->sta_set_airtime_weight)
83+
+ local->ops->sta_set_airtime_weight(&local->hw, &sdata->vif, sta,
84+
+ weight);
85+
+ trace_drv_return_void(local);
86+
+}
87+
+
88+
static inline void drv_add_twt_setup(struct ieee80211_local *local,
89+
struct ieee80211_sub_if_data *sdata,
90+
struct ieee80211_sta *sta,
91+
--- a/net/mac80211/sta_info.c
92+
+++ b/net/mac80211/sta_info.c
93+
@@ -832,8 +832,13 @@ static int sta_info_insert_drv_state(str
94+
* Drivers using legacy sta_add/sta_remove callbacks only
95+
* get uploaded set to true after sta_add is called.
96+
*/
97+
- if (!local->ops->sta_add)
98+
+ if (!local->ops->sta_add) {
99+
sta->uploaded = true;
100+
+ if (sta->airtime_weight != IEEE80211_DEFAULT_AIRTIME_WEIGHT)
101+
+ drv_sta_set_airtime_weight(local, sdata,
102+
+ &sta->sta,
103+
+ sta->airtime_weight);
104+
+ }
105+
return 0;
106+
}
107+
108+
--- a/net/mac80211/trace.h
109+
+++ b/net/mac80211/trace.h
110+
@@ -2481,6 +2481,33 @@ DEFINE_EVENT(sta_flag_evt, drv_sta_set_d
111+
TP_ARGS(local, sdata, sta, enabled)
112+
);
113+
114+
+TRACE_EVENT(drv_sta_set_airtime_weight,
115+
+ TP_PROTO(struct ieee80211_local *local,
116+
+ struct ieee80211_sub_if_data *sdata,
117+
+ struct ieee80211_sta *sta, u16 weight),
118+
+
119+
+ TP_ARGS(local, sdata, sta, weight),
120+
+
121+
+ TP_STRUCT__entry(
122+
+ LOCAL_ENTRY
123+
+ VIF_ENTRY
124+
+ STA_ENTRY
125+
+ __field(u16, weight)
126+
+ ),
127+
+
128+
+ TP_fast_assign(
129+
+ LOCAL_ASSIGN;
130+
+ VIF_ASSIGN;
131+
+ STA_ASSIGN;
132+
+ __entry->weight = weight;
133+
+ ),
134+
+
135+
+ TP_printk(
136+
+ LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " weight:%u",
137+
+ LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->weight
138+
+ )
139+
+);
140+
+
141+
TRACE_EVENT(drv_add_twt_setup,
142+
TP_PROTO(struct ieee80211_local *local,
143+
struct ieee80211_sta *sta,

package/kernel/mt76/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ PKG_SOURCE_VERSION:=8dfead68c20251fccb39113ee864fbbafc5b7f76
3535
PKG_MIRROR_HASH:=1abbc60039e5eb1b25c678a711b79a92e8b9f39e4db9801610811c76d2928718
3636
PATCH_DIR:=./patches-6.x
3737
else
38-
PKG_SOURCE_DATE:=2026-03-21
39-
PKG_SOURCE_VERSION:=018f60316d4dd6b4e741874eda40e2dfaa29df3b
40-
PKG_MIRROR_HASH:=3b952b494142e719bd0d227d0b35b4373dafc44364b1d2e2821e0ae9b73f37b0
38+
PKG_SOURCE_DATE:=2026-07-01
39+
PKG_SOURCE_VERSION:=59676919ea408b0b13a9d23f2e2e1a1ab407fba1
40+
PKG_MIRROR_HASH:=74c987549a329895dedcaaf919dfe64373beb119a8cc7a88695a3a8463848907
4141
PATCH_DIR:=./patches-6.18
4242
endif
4343

package/kernel/mt76/patches-6.18/003-pass-LED-define-via-ccflags-y.patch

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)