mac80211: update to linux 6.1-rc8
[openwrt/staging/jow.git] / package / kernel / ath10k-ct / patches / 100-api_update.patch
1 --- a/ath10k-5.15/mac.c
2 +++ b/ath10k-5.15/mac.c
3 @@ -788,7 +788,7 @@ int ath10k_mac_vif_chan(struct ieee80211
4 struct ieee80211_chanctx_conf *conf;
5
6 rcu_read_lock();
7 - conf = rcu_dereference(vif->chanctx_conf);
8 + conf = rcu_dereference(vif->bss_conf.chanctx_conf);
9 if (!conf) {
10 rcu_read_unlock();
11 return -ENOENT;
12 @@ -1764,8 +1764,8 @@ static int ath10k_vdev_start_restart(str
13 arg.channel.chan_radar =
14 !!(chandef->chan->flags & IEEE80211_CHAN_RADAR);
15 } else if (arvif->vdev_type == WMI_VDEV_TYPE_IBSS) {
16 - arg.ssid = arvif->vif->bss_conf.ssid;
17 - arg.ssid_len = arvif->vif->bss_conf.ssid_len;
18 + arg.ssid = arvif->vif->cfg.ssid;
19 + arg.ssid_len = arvif->vif->cfg.ssid_len;
20 }
21
22 ath10k_dbg(ar, ATH10K_DBG_MAC,
23 @@ -1890,7 +1890,7 @@ static int ath10k_mac_setup_bcn_tmpl(str
24 arvif->vdev_type != WMI_VDEV_TYPE_IBSS)
25 return 0;
26
27 - bcn = ieee80211_beacon_get_template(hw, vif, &offs);
28 + bcn = ieee80211_beacon_get_template(hw, vif, &offs, 0);
29 if (!bcn) {
30 ath10k_warn(ar, "failed to get beacon template from mac80211\n");
31 return -EPERM;
32 @@ -2083,8 +2083,7 @@ static void ath10k_control_beaconing(str
33 }
34
35 static void ath10k_control_ibss(struct ath10k_vif *arvif,
36 - struct ieee80211_bss_conf *info,
37 - const u8 self_peer[ETH_ALEN])
38 + struct ieee80211_vif *vif)
39 {
40 struct ath10k *ar = arvif->ar;
41 u32 vdev_param;
42 @@ -2092,7 +2091,7 @@ static void ath10k_control_ibss(struct a
43
44 lockdep_assert_held(&arvif->ar->conf_mutex);
45
46 - if (!info->ibss_joined) {
47 + if (!vif->cfg.ibss_joined) {
48 if (is_zero_ether_addr(arvif->bssid))
49 return;
50
51 @@ -2298,7 +2297,7 @@ static void ath10k_mac_vif_ap_csa_count_
52 if (arvif->vdev_type != WMI_VDEV_TYPE_AP)
53 return;
54
55 - if (!vif->csa_active)
56 + if (!vif->bss_conf.csa_active)
57 return;
58
59 if (!arvif->is_up)
60 @@ -2433,7 +2432,7 @@ static void ath10k_peer_assoc_h_basic(st
61 lockdep_assert_held(&ar->conf_mutex);
62
63 if (vif->type == NL80211_IFTYPE_STATION)
64 - aid = vif->bss_conf.aid;
65 + aid = vif->cfg.aid;
66 else
67 aid = sta->aid;
68
69 @@ -2463,7 +2462,8 @@ static void ath10k_peer_assoc_h_crypto(s
70 return;
71
72 bss = cfg80211_get_bss(ar->hw->wiphy, def.chan, info->bssid,
73 - info->ssid_len ? info->ssid : NULL, info->ssid_len,
74 + vif->cfg.ssid_len ? vif->cfg.ssid : NULL,
75 + vif->cfg.ssid_len,
76 IEEE80211_BSS_TYPE_ANY, IEEE80211_PRIVACY_ANY);
77 if (bss) {
78 const struct cfg80211_bss_ies *ies;
79 @@ -2521,7 +2521,7 @@ static void ath10k_peer_assoc_h_rates(st
80
81 band = def.chan->band;
82 sband = ar->hw->wiphy->bands[band];
83 - ratemask = sta->supp_rates[band];
84 + ratemask = sta->deflink.supp_rates[band];
85 ratemask &= arvif->bitrate_mask.control[band].legacy;
86 rates = sband->bitrates;
87
88 @@ -2770,7 +2770,7 @@ static void ath10k_peer_assoc_h_ht(struc
89 struct ieee80211_sta *sta,
90 struct wmi_peer_assoc_complete_arg *arg)
91 {
92 - const struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap;
93 + const struct ieee80211_sta_ht_cap *ht_cap = &sta->deflink.ht_cap;
94 struct ath10k_vif *arvif = (void *)vif->drv_priv;
95 struct cfg80211_chan_def def;
96 enum nl80211_band band;
97 @@ -2814,7 +2814,7 @@ static void ath10k_peer_assoc_h_ht(struc
98 if (ht_cap->cap & IEEE80211_HT_CAP_LDPC_CODING)
99 arg->peer_flags |= ar->wmi.peer_flags->ldbc;
100
101 - if (sta->bandwidth >= IEEE80211_STA_RX_BW_40) {
102 + if (sta->deflink.bandwidth >= IEEE80211_STA_RX_BW_40) {
103 arg->peer_flags |= ar->wmi.peer_flags->bw40;
104 arg->peer_rate_caps |= WMI_RC_CW40_FLAG;
105 }
106 @@ -2883,7 +2883,7 @@ static void ath10k_peer_assoc_h_ht(struc
107 arg->peer_ht_rates.rates[i] = i;
108 } else {
109 arg->peer_ht_rates.num_rates = n;
110 - arg->peer_num_spatial_streams = min(sta->rx_nss, max_nss);
111 + arg->peer_num_spatial_streams = min(sta->deflink.rx_nss, max_nss);
112 }
113
114 ath10k_dbg(ar, ATH10K_DBG_MAC, "mac ht peer %pM mcs cnt %d nss %d\n",
115 @@ -3045,7 +3045,7 @@ static void ath10k_peer_assoc_h_vht(stru
116 struct ieee80211_sta *sta,
117 struct wmi_peer_assoc_complete_arg *arg)
118 {
119 - const struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap;
120 + const struct ieee80211_sta_vht_cap *vht_cap = &sta->deflink.vht_cap;
121 struct ath10k_vif *arvif = (void *)vif->drv_priv;
122 struct ath10k_hw_params *hw = &ar->hw_params;
123 struct cfg80211_chan_def def;
124 @@ -3087,10 +3087,10 @@ static void ath10k_peer_assoc_h_vht(stru
125 (1U << (IEEE80211_HT_MAX_AMPDU_FACTOR +
126 ampdu_factor)) - 1);
127
128 - if (sta->bandwidth == IEEE80211_STA_RX_BW_80)
129 + if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_80)
130 arg->peer_flags |= ar->wmi.peer_flags->bw80;
131
132 - if (sta->bandwidth == IEEE80211_STA_RX_BW_160)
133 + if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160)
134 arg->peer_flags |= ar->wmi.peer_flags->bw160;
135
136 /* Calculate peer NSS capability from VHT capabilities if STA
137 @@ -3104,7 +3104,7 @@ static void ath10k_peer_assoc_h_vht(stru
138 vht_mcs_mask[i])
139 max_nss = i + 1;
140 }
141 - arg->peer_num_spatial_streams = min(sta->rx_nss, max_nss);
142 + arg->peer_num_spatial_streams = min(sta->deflink.rx_nss, max_nss);
143 arg->peer_vht_rates.rx_max_rate =
144 __le16_to_cpu(vht_cap->vht_mcs.rx_highest);
145 arg->peer_vht_rates.rx_mcs_set =
146 @@ -3266,7 +3266,7 @@ static bool ath10k_mac_sta_has_ofdm_only
147 {
148 struct ath10k_vif *arvif = (void *)vif->drv_priv;
149 u32 msk = arvif->bitrate_mask.control[NL80211_BAND_2GHZ].legacy &
150 - sta->supp_rates[NL80211_BAND_2GHZ];
151 + sta->deflink.supp_rates[NL80211_BAND_2GHZ];
152 /* We have 12 bits of legacy rates, first 4 are /b (CCK) rates. */
153 return (msk & 0xff0) && !(msk & 0xf);
154 }
155 @@ -3276,7 +3276,7 @@ static bool ath10k_mac_sta_has_ofdm_and_
156 {
157 struct ath10k_vif *arvif = (void *)vif->drv_priv;
158 u32 msk = arvif->bitrate_mask.control[NL80211_BAND_2GHZ].legacy &
159 - sta->supp_rates[NL80211_BAND_2GHZ];
160 + sta->deflink.supp_rates[NL80211_BAND_2GHZ];
161 /* We have 12 bits of legacy rates, first 4 are /b (CCK) rates. */
162 return ((msk & 0xf) && (msk & 0xff0));
163 }
164 @@ -3284,8 +3284,10 @@ static bool ath10k_mac_sta_has_ofdm_and_
165 static enum wmi_phy_mode ath10k_mac_get_phymode_vht(struct ath10k *ar,
166 struct ieee80211_sta *sta)
167 {
168 - if (sta->bandwidth == IEEE80211_STA_RX_BW_160) {
169 - switch (sta->vht_cap.cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK) {
170 + struct ieee80211_sta_vht_cap *vht_cap = &sta->deflink.vht_cap;
171 +
172 + if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160) {
173 + switch (vht_cap->cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK) {
174 case IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ:
175 return MODE_11AC_VHT160;
176 case IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ:
177 @@ -3296,13 +3298,13 @@ static enum wmi_phy_mode ath10k_mac_get_
178 }
179 }
180
181 - if (sta->bandwidth == IEEE80211_STA_RX_BW_80)
182 + if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_80)
183 return MODE_11AC_VHT80;
184
185 - if (sta->bandwidth == IEEE80211_STA_RX_BW_40)
186 + if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_40)
187 return MODE_11AC_VHT40;
188
189 - if (sta->bandwidth == IEEE80211_STA_RX_BW_20)
190 + if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_20)
191 return MODE_11AC_VHT20;
192
193 return MODE_UNKNOWN;
194 @@ -3329,15 +3331,15 @@ static void ath10k_peer_assoc_h_phymode(
195
196 switch (band) {
197 case NL80211_BAND_2GHZ:
198 - if (sta->vht_cap.vht_supported &&
199 + if (sta->deflink.vht_cap.vht_supported &&
200 !ath10k_peer_assoc_h_vht_masked(vht_mcs_mask)) {
201 - if (sta->bandwidth == IEEE80211_STA_RX_BW_40)
202 + if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_40)
203 phymode = MODE_11AC_VHT40;
204 else
205 phymode = MODE_11AC_VHT20;
206 - } else if (sta->ht_cap.ht_supported &&
207 + } else if (sta->deflink.ht_cap.ht_supported &&
208 !ath10k_peer_assoc_h_ht_masked(ht_mcs_mask)) {
209 - if (sta->bandwidth == IEEE80211_STA_RX_BW_40)
210 + if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_40)
211 phymode = MODE_11NG_HT40;
212 else
213 phymode = MODE_11NG_HT20;
214 @@ -3354,12 +3356,12 @@ static void ath10k_peer_assoc_h_phymode(
215 /*
216 * Check VHT first.
217 */
218 - if (sta->vht_cap.vht_supported &&
219 + if (sta->deflink.vht_cap.vht_supported &&
220 !ath10k_peer_assoc_h_vht_masked(vht_mcs_mask)) {
221 phymode = ath10k_mac_get_phymode_vht(ar, sta);
222 - } else if (sta->ht_cap.ht_supported &&
223 + } else if (sta->deflink.ht_cap.ht_supported &&
224 !ath10k_peer_assoc_h_ht_masked(ht_mcs_mask)) {
225 - if (sta->bandwidth >= IEEE80211_STA_RX_BW_40)
226 + if (sta->deflink.bandwidth >= IEEE80211_STA_RX_BW_40)
227 phymode = MODE_11NA_HT40;
228 else
229 phymode = MODE_11NA_HT20;
230 @@ -3373,8 +3375,8 @@ static void ath10k_peer_assoc_h_phymode(
231 }
232
233 ath10k_dbg(ar, ATH10K_DBG_MAC, "mac peer %pM phymode %s legacy-supp-rates: 0x%x arvif-legacy-rates: 0x%x vht-supp: %d\n",
234 - sta->addr, ath10k_wmi_phymode_str(phymode), sta->supp_rates[band],
235 - arvif->bitrate_mask.control[band].legacy, sta->vht_cap.vht_supported);
236 + sta->addr, ath10k_wmi_phymode_str(phymode), sta->deflink.supp_rates[band],
237 + arvif->bitrate_mask.control[band].legacy, sta->deflink.vht_cap.vht_supported);
238
239 arg->peer_phymode = phymode;
240 WARN_ON(phymode == MODE_UNKNOWN);
241 @@ -3677,8 +3679,8 @@ static void ath10k_bss_assoc(struct ieee
242 /* ap_sta must be accessed only within rcu section which must be left
243 * before calling ath10k_setup_peer_smps() which might sleep.
244 */
245 - ht_cap = ap_sta->ht_cap;
246 - vht_cap = ap_sta->vht_cap;
247 + ht_cap = ap_sta->deflink.ht_cap;
248 + vht_cap = ap_sta->deflink.vht_cap;
249
250 ret = ath10k_peer_assoc_prepare(ar, vif, ap_sta, &peer_arg);
251 if (ret) {
252 @@ -3713,11 +3715,11 @@ static void ath10k_bss_assoc(struct ieee
253
254 ath10k_dbg(ar, ATH10K_DBG_MAC,
255 "mac vdev %d up (associated) bssid %pM aid %d bandwidth %d\n",
256 - arvif->vdev_id, bss_conf->bssid, bss_conf->aid, ap_sta->bandwidth);
257 + arvif->vdev_id, bss_conf->bssid, vif->cfg.aid, ap_sta->deflink.bandwidth);
258
259 WARN_ON(arvif->is_up);
260
261 - arvif->aid = bss_conf->aid;
262 + arvif->aid = vif->cfg.aid;
263 ether_addr_copy(arvif->bssid, bss_conf->bssid);
264
265 ret = ath10k_wmi_pdev_set_param(ar,
266 @@ -4022,7 +4024,7 @@ static int ath10k_station_assoc(struct a
267 */
268 if (!reassoc) {
269 ret = ath10k_setup_peer_smps(ar, arvif, sta->addr,
270 - &sta->ht_cap);
271 + &sta->deflink.ht_cap);
272 if (ret) {
273 ath10k_warn(ar, "failed to setup peer SMPS for vdev %d: %d\n",
274 arvif->vdev_id, ret);
275 @@ -6916,7 +6918,7 @@ static void ath10k_recalculate_mgmt_rate
276 static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
277 struct ieee80211_vif *vif,
278 struct ieee80211_bss_conf *info,
279 - u32 changed)
280 + u64 changed)
281 {
282 struct ath10k *ar = hw->priv;
283 struct ath10k_vif *arvif = (void *)vif->drv_priv;
284 @@ -6930,7 +6932,7 @@ static void ath10k_bss_info_changed(stru
285 mutex_lock(&ar->conf_mutex);
286
287 if (changed & BSS_CHANGED_IBSS)
288 - ath10k_control_ibss(arvif, info, vif->addr);
289 + ath10k_control_ibss(arvif, vif);
290
291 if (changed & BSS_CHANGED_BEACON_INT) {
292 arvif->beacon_interval = info->beacon_int;
293 @@ -6995,9 +6997,9 @@ static void ath10k_bss_info_changed(stru
294
295 if (changed & BSS_CHANGED_SSID &&
296 vif->type == NL80211_IFTYPE_AP) {
297 - arvif->u.ap.ssid_len = info->ssid_len;
298 - if (info->ssid_len)
299 - memcpy(arvif->u.ap.ssid, info->ssid, info->ssid_len);
300 + arvif->u.ap.ssid_len = vif->cfg.ssid_len;
301 + if (vif->cfg.ssid_len)
302 + memcpy(arvif->u.ap.ssid, vif->cfg.ssid, vif->cfg.ssid_len);
303 arvif->u.ap.hidden_ssid = info->hidden_ssid;
304 }
305
306 @@ -7074,7 +7076,7 @@ static void ath10k_bss_info_changed(stru
307 }
308
309 if (changed & BSS_CHANGED_ASSOC) {
310 - if (info->assoc) {
311 + if (vif->cfg.assoc) {
312 /* Workaround: Make sure monitor vdev is not running
313 * when associating to prevent some firmware revisions
314 * (e.g. 10.1 and 10.2) from crashing.
315 @@ -7099,7 +7101,7 @@ static void ath10k_bss_info_changed(stru
316 }
317
318 if (changed & BSS_CHANGED_PS) {
319 - arvif->ps = vif->bss_conf.ps;
320 + arvif->ps = vif->cfg.ps;
321
322 ret = ath10k_config_ps(ar);
323 if (ret)
324 @@ -7699,7 +7701,7 @@ static void ath10k_sta_rc_update_wk(stru
325
326 if (changed & IEEE80211_RC_SUPP_RATES_CHANGED) {
327 ath10k_dbg(ar, ATH10K_DBG_STA, "mac update sta %pM supp rates, bandwidth: %d\n",
328 - sta->addr, sta->bandwidth);
329 + sta->addr, sta->deflink.bandwidth);
330
331 err = ath10k_station_assoc(ar, arvif->vif, sta, true);
332 if (err)
333 @@ -7751,10 +7753,10 @@ static int ath10k_sta_set_txpwr(struct i
334 int ret = 0;
335 s16 txpwr;
336
337 - if (sta->txpwr.type == NL80211_TX_POWER_AUTOMATIC) {
338 + if (sta->deflink.txpwr.type == NL80211_TX_POWER_AUTOMATIC) {
339 txpwr = 0;
340 } else {
341 - txpwr = sta->txpwr.power;
342 + txpwr = sta->deflink.txpwr.power;
343 if (!txpwr)
344 return -EINVAL;
345 }
346 @@ -7874,26 +7876,29 @@ static int ath10k_mac_validate_rate_mask
347 struct ieee80211_sta *sta,
348 u32 rate_ctrl_flag, u8 nss)
349 {
350 - if (nss > sta->rx_nss) {
351 + struct ieee80211_sta_ht_cap *ht_cap = &sta->deflink.ht_cap;
352 + struct ieee80211_sta_vht_cap *vht_cap = &sta->deflink.vht_cap;
353 +
354 + if (nss > sta->deflink.rx_nss) {
355 ath10k_warn(ar, "Invalid nss field, configured %u limit %u\n",
356 - nss, sta->rx_nss);
357 + nss, sta->deflink.rx_nss);
358 return -EINVAL;
359 }
360
361 if (ATH10K_HW_PREAMBLE(rate_ctrl_flag) == WMI_RATE_PREAMBLE_VHT) {
362 - if (!sta->vht_cap.vht_supported) {
363 + if (!vht_cap->vht_supported) {
364 ath10k_warn(ar, "Invalid VHT rate for sta %pM\n",
365 sta->addr);
366 return -EINVAL;
367 }
368 } else if (ATH10K_HW_PREAMBLE(rate_ctrl_flag) == WMI_RATE_PREAMBLE_HT) {
369 - if (!sta->ht_cap.ht_supported || sta->vht_cap.vht_supported) {
370 + if (!ht_cap->ht_supported || vht_cap->vht_supported) {
371 ath10k_warn(ar, "Invalid HT rate for sta %pM\n",
372 sta->addr);
373 return -EINVAL;
374 }
375 } else {
376 - if (sta->ht_cap.ht_supported || sta->vht_cap.vht_supported)
377 + if (ht_cap->ht_supported || vht_cap->vht_supported)
378 return -EINVAL;
379 }
380
381 @@ -8567,7 +8572,7 @@ static int ath10k_sta_state(struct ieee8
382 * New association.
383 */
384 ath10k_dbg(ar, ATH10K_DBG_STA, "mac sta %pM associated, bandwidth: %d\n",
385 - sta->addr, sta->bandwidth);
386 + sta->addr, sta->deflink.bandwidth);
387
388 ret = ath10k_station_assoc(ar, vif, sta, false);
389 if (ret)
390 @@ -8580,7 +8585,7 @@ static int ath10k_sta_state(struct ieee8
391 * Tdls station authorized.
392 */
393 ath10k_dbg(ar, ATH10K_DBG_STA, "mac tdls sta %pM authorized, bandwidth: %d\n",
394 - sta->addr, sta->bandwidth);
395 + sta->addr, sta->deflink.bandwidth);
396
397 ret = ath10k_station_assoc(ar, vif, sta, false);
398 if (ret) {
399 @@ -8721,8 +8726,8 @@ exit:
400 return ret;
401 }
402
403 -static int ath10k_conf_tx(struct ieee80211_hw *hw,
404 - struct ieee80211_vif *vif, u16 ac,
405 +static int ath10k_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
406 + unsigned int link_id, u16 ac,
407 const struct ieee80211_tx_queue_params *params)
408 {
409 struct ath10k *ar = hw->priv;
410 @@ -9308,7 +9313,7 @@ static bool ath10k_mac_set_vht_bitrate_m
411 u8 rate = arvif->vht_pfr;
412
413 /* skip non vht and multiple rate peers */
414 - if (!sta->vht_cap.vht_supported || arvif->vht_num_rates != 1)
415 + if (!sta->deflink.vht_cap.vht_supported || arvif->vht_num_rates != 1)
416 return false;
417
418 err = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr,
419 @@ -9349,7 +9354,7 @@ static void ath10k_mac_clr_bitrate_mask_
420 int err;
421
422 /* clear vht peers only */
423 - if (arsta->arvif != arvif || !sta->vht_cap.vht_supported)
424 + if (arsta->arvif != arvif || !sta->deflink.vht_cap.vht_supported)
425 return;
426
427 err = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr,
428 @@ -9534,13 +9539,13 @@ static void ath10k_sta_rc_update(struct
429
430 ath10k_dbg(ar, ATH10K_DBG_STA,
431 "mac sta rc update for %pM changed %08x bw %d nss %d smps %d\n",
432 - sta->addr, changed, sta->bandwidth, sta->rx_nss,
433 - sta->smps_mode);
434 + sta->addr, changed, sta->deflink.bandwidth, sta->deflink.rx_nss,
435 + sta->deflink.smps_mode);
436
437 if (changed & IEEE80211_RC_BW_CHANGED) {
438 bw = WMI_PEER_CHWIDTH_20MHZ;
439
440 - switch (sta->bandwidth) {
441 + switch (sta->deflink.bandwidth) {
442 case IEEE80211_STA_RX_BW_20:
443 bw = WMI_PEER_CHWIDTH_20MHZ;
444 break;
445 @@ -9555,7 +9560,7 @@ static void ath10k_sta_rc_update(struct
446 break;
447 default:
448 ath10k_warn(ar, "Invalid bandwidth %d in rc update for %pM\n",
449 - sta->bandwidth, sta->addr);
450 + sta->deflink.bandwidth, sta->addr);
451 bw = WMI_PEER_CHWIDTH_20MHZ;
452 break;
453 }
454 @@ -9564,12 +9569,12 @@ static void ath10k_sta_rc_update(struct
455 }
456
457 if (changed & IEEE80211_RC_NSS_CHANGED)
458 - arsta->nss = sta->rx_nss;
459 + arsta->nss = sta->deflink.rx_nss;
460
461 if (changed & IEEE80211_RC_SMPS_CHANGED) {
462 smps = WMI_PEER_SMPS_PS_NONE;
463
464 - switch (sta->smps_mode) {
465 + switch (sta->deflink.smps_mode) {
466 case IEEE80211_SMPS_AUTOMATIC:
467 case IEEE80211_SMPS_OFF:
468 smps = WMI_PEER_SMPS_PS_NONE;
469 @@ -9582,7 +9587,7 @@ static void ath10k_sta_rc_update(struct
470 break;
471 case IEEE80211_SMPS_NUM_MODES:
472 ath10k_warn(ar, "Invalid smps %d in sta rc update for %pM\n",
473 - sta->smps_mode, sta->addr);
474 + sta->deflink.smps_mode, sta->addr);
475 smps = WMI_PEER_SMPS_PS_NONE;
476 break;
477 }
478 @@ -9896,7 +9901,7 @@ ath10k_mac_change_chanctx_cnt_iter(void
479 {
480 struct ath10k_mac_change_chanctx_arg *arg = data;
481
482 - if (rcu_access_pointer(vif->chanctx_conf) != arg->ctx)
483 + if (rcu_access_pointer(vif->bss_conf.chanctx_conf) != arg->ctx)
484 return;
485
486 arg->n_vifs++;
487 @@ -9909,7 +9914,7 @@ ath10k_mac_change_chanctx_fill_iter(void
488 struct ath10k_mac_change_chanctx_arg *arg = data;
489 struct ieee80211_chanctx_conf *ctx;
490
491 - ctx = rcu_access_pointer(vif->chanctx_conf);
492 + ctx = rcu_access_pointer(vif->bss_conf.chanctx_conf);
493 if (ctx != arg->ctx)
494 return;
495
496 @@ -9982,6 +9987,7 @@ unlock:
497 static int
498 ath10k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw,
499 struct ieee80211_vif *vif,
500 + struct ieee80211_bss_conf *link_conf,
501 struct ieee80211_chanctx_conf *ctx)
502 {
503 struct ath10k *ar = hw->priv;
504 @@ -10061,6 +10067,7 @@ err:
505 static void
506 ath10k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
507 struct ieee80211_vif *vif,
508 + struct ieee80211_bss_conf *link_conf,
509 struct ieee80211_chanctx_conf *ctx)
510 {
511 struct ath10k *ar = hw->priv;
512 --- a/ath10k-5.15/txrx.c
513 +++ b/ath10k-5.15/txrx.c
514 @@ -260,7 +260,7 @@ int ath10k_txrx_tx_unref(struct ath10k_h
515 nf = ar->debug.nf_sum[0];
516 #endif
517 info->status.ack_signal = nf + tx_done->ack_rssi;
518 - info->status.is_valid_ack_signal = true;
519 + info->status.flags |= IEEE80211_TX_STATUS_ACK_SIGNAL_VALID;
520 }
521
522 if (tx_done->tx_rate_code || tx_done->tx_rate_flags || ar->ok_tx_rate_status) {
523 --- a/ath10k-5.15/wmi.c
524 +++ b/ath10k-5.15/wmi.c
525 @@ -2587,7 +2587,7 @@ wmi_process_mgmt_tx_comp(struct ath10k *
526 info->flags |= IEEE80211_TX_STAT_ACK;
527 info->status.ack_signal = ath10k_get_noisefloor(0, ar) +
528 param->ack_rssi;
529 - info->status.is_valid_ack_signal = true;
530 + info->status.flags |= IEEE80211_TX_STATUS_ACK_SIGNAL_VALID;
531 }
532
533 ieee80211_tx_status_irqsafe(ar->hw, msdu);
534 @@ -4258,13 +4258,13 @@ void ath10k_wmi_event_host_swba(struct a
535 * Once CSA counter is completed stop sending beacons until
536 * actual channel switch is done
537 */
538 - if (arvif->vif->csa_active &&
539 + if (arvif->vif->bss_conf.csa_active &&
540 ieee80211_beacon_cntdwn_is_complete(arvif->vif)) {
541 ieee80211_csa_finish(arvif->vif);
542 continue;
543 }
544
545 - bcn = ieee80211_beacon_get(ar->hw, arvif->vif);
546 + bcn = ieee80211_beacon_get(ar->hw, arvif->vif, 0);
547 if (!bcn) {
548 ath10k_warn(ar, "could not get mac80211 beacon, vdev_id: %i addr: %pM\n",
549 arvif->vdev_id, arvif->vif->addr);
550 --- a/ath10k-5.15/htt_rx.c
551 +++ b/ath10k-5.15/htt_rx.c
552 @@ -4017,7 +4017,7 @@ ath10k_update_per_peer_tx_stats(struct a
553 switch (txrate.flags) {
554 case WMI_RATE_PREAMBLE_OFDM:
555 if (arsta->arvif && arsta->arvif->vif)
556 - conf = rcu_dereference(arsta->arvif->vif->chanctx_conf);
557 + conf = rcu_dereference(arsta->arvif->vif->bss_conf.chanctx_conf);
558 if (conf && conf->def.chan->band == NL80211_BAND_5GHZ)
559 arsta->tx_info.status.rates[0].idx = rate_idx - 4;
560 break;
561 --- a/ath10k-5.15/wmi-tlv.c
562 +++ b/ath10k-5.15/wmi-tlv.c
563 @@ -205,7 +205,7 @@ static int ath10k_wmi_tlv_event_bcn_tx_s
564 }
565
566 arvif = ath10k_get_arvif(ar, vdev_id);
567 - if (arvif && arvif->is_up && arvif->vif->csa_active)
568 + if (arvif && arvif->is_up && arvif->vif->bss_conf.csa_active)
569 ieee80211_queue_work(ar->hw, &arvif->ap_csa_work);
570
571 kfree(tb);
572 --- a/ath10k-5.15/core.c
573 +++ b/ath10k-5.15/core.c
574 @@ -4081,7 +4081,7 @@ static int ath10k_core_probe_fw(struct a
575 ath10k_debug_print_board_info(ar);
576 }
577
578 - device_get_mac_address(ar->dev, ar->mac_addr, sizeof(ar->mac_addr));
579 + device_get_mac_address(ar->dev, ar->mac_addr);
580
581 /* Try to get mac address from device node (from nvmem cell) */
582 of_get_mac_address(ar->dev->of_node, ar->mac_addr);
583 --- a/ath10k-5.15/pci.c
584 +++ b/ath10k-5.15/pci.c
585 @@ -3547,8 +3547,7 @@ static void ath10k_pci_free_irq(struct a
586
587 void ath10k_pci_init_napi(struct ath10k *ar)
588 {
589 - netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_pci_napi_poll,
590 - ATH10K_NAPI_BUDGET);
591 + netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_pci_napi_poll);
592 }
593
594 static int ath10k_pci_init_irq(struct ath10k *ar)
595 --- a/ath10k-5.15/sdio.c
596 +++ b/ath10k-5.15/sdio.c
597 @@ -2531,8 +2531,7 @@ static int ath10k_sdio_probe(struct sdio
598 return -ENOMEM;
599 }
600
601 - netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_sdio_napi_poll,
602 - ATH10K_NAPI_BUDGET);
603 + netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_sdio_napi_poll);
604
605 ath10k_dbg(ar, ATH10K_DBG_BOOT,
606 "sdio new func %d vendor 0x%x device 0x%x block 0x%x/0x%x\n",
607 --- a/ath10k-5.15/snoc.c
608 +++ b/ath10k-5.15/snoc.c
609 @@ -1242,8 +1242,7 @@ static int ath10k_snoc_napi_poll(struct
610
611 static void ath10k_snoc_init_napi(struct ath10k *ar)
612 {
613 - netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_snoc_napi_poll,
614 - ATH10K_NAPI_BUDGET);
615 + netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_snoc_napi_poll);
616 }
617
618 static int ath10k_snoc_request_irq(struct ath10k *ar)