Skip to content

Commit 9146fe2

Browse files
committed
Johannes Berg says: ==================== Another set of updates: - various small fixes for ath10k/ath12k/mwifiex/rsi - cfg80211 fix for HE bitrate overflow - mac80211 fixes - S1G beacon handling in scan - skb tailroom handling for HW encryption - CSA fix for multi-link - handling of disabled links during association * tag 'wireless-2026-11-22' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: cfg80211: ignore link disabled flag from userspace wifi: mac80211: apply advertised TTLM from association response wifi: mac80211: parse all TTLM entries wifi: mac80211: don't increment crypto_tx_tailroom_needed_cnt twice wifi: mac80211: don't perform DA check on S1G beacon wifi: ath12k: Fix wrong P2P device link id issue wifi: ath12k: fix dead lock while flushing management frames wifi: ath12k: Fix scan state stuck in ABORTING after cancel_remain_on_channel wifi: ath12k: cancel scan only on active scan vdev wifi: mwifiex: Fix a loop in mwifiex_update_ampdu_rxwinsize() wifi: mac80211: correctly check if CSA is active wifi: cfg80211: Fix bitrate calculation overflow for HE rates wifi: rsi: Fix memory corruption due to not set vif driver data size wifi: ath12k: don't force radio frequency check in freq_to_idx() wifi: ath12k: fix dma_free_coherent() pointer wifi: ath10k: fix dma_free_coherent() pointer ==================== Link: https://patch.msgid.link/20260122110248.15450-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 5778d65 + 50b3598 commit 9146fe2

15 files changed

Lines changed: 171 additions & 150 deletions

File tree

drivers/net/wireless/ath/ath10k/ce.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,8 +1727,8 @@ static void _ath10k_ce_free_pipe(struct ath10k *ar, int ce_id)
17271727
(ce_state->src_ring->nentries *
17281728
sizeof(struct ce_desc) +
17291729
CE_DESC_RING_ALIGN),
1730-
ce_state->src_ring->base_addr_owner_space,
1731-
ce_state->src_ring->base_addr_ce_space);
1730+
ce_state->src_ring->base_addr_owner_space_unaligned,
1731+
ce_state->src_ring->base_addr_ce_space_unaligned);
17321732
kfree(ce_state->src_ring);
17331733
}
17341734

@@ -1737,8 +1737,8 @@ static void _ath10k_ce_free_pipe(struct ath10k *ar, int ce_id)
17371737
(ce_state->dest_ring->nentries *
17381738
sizeof(struct ce_desc) +
17391739
CE_DESC_RING_ALIGN),
1740-
ce_state->dest_ring->base_addr_owner_space,
1741-
ce_state->dest_ring->base_addr_ce_space);
1740+
ce_state->dest_ring->base_addr_owner_space_unaligned,
1741+
ce_state->dest_ring->base_addr_ce_space_unaligned);
17421742
kfree(ce_state->dest_ring);
17431743
}
17441744

@@ -1758,8 +1758,8 @@ static void _ath10k_ce_free_pipe_64(struct ath10k *ar, int ce_id)
17581758
(ce_state->src_ring->nentries *
17591759
sizeof(struct ce_desc_64) +
17601760
CE_DESC_RING_ALIGN),
1761-
ce_state->src_ring->base_addr_owner_space,
1762-
ce_state->src_ring->base_addr_ce_space);
1761+
ce_state->src_ring->base_addr_owner_space_unaligned,
1762+
ce_state->src_ring->base_addr_ce_space_unaligned);
17631763
kfree(ce_state->src_ring);
17641764
}
17651765

@@ -1768,8 +1768,8 @@ static void _ath10k_ce_free_pipe_64(struct ath10k *ar, int ce_id)
17681768
(ce_state->dest_ring->nentries *
17691769
sizeof(struct ce_desc_64) +
17701770
CE_DESC_RING_ALIGN),
1771-
ce_state->dest_ring->base_addr_owner_space,
1772-
ce_state->dest_ring->base_addr_ce_space);
1771+
ce_state->dest_ring->base_addr_owner_space_unaligned,
1772+
ce_state->dest_ring->base_addr_ce_space_unaligned);
17731773
kfree(ce_state->dest_ring);
17741774
}
17751775

drivers/net/wireless/ath/ath12k/ce.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -984,8 +984,8 @@ void ath12k_ce_free_pipes(struct ath12k_base *ab)
984984
dma_free_coherent(ab->dev,
985985
pipe->src_ring->nentries * desc_sz +
986986
CE_DESC_RING_ALIGN,
987-
pipe->src_ring->base_addr_owner_space,
988-
pipe->src_ring->base_addr_ce_space);
987+
pipe->src_ring->base_addr_owner_space_unaligned,
988+
pipe->src_ring->base_addr_ce_space_unaligned);
989989
kfree(pipe->src_ring);
990990
pipe->src_ring = NULL;
991991
}
@@ -995,8 +995,8 @@ void ath12k_ce_free_pipes(struct ath12k_base *ab)
995995
dma_free_coherent(ab->dev,
996996
pipe->dest_ring->nentries * desc_sz +
997997
CE_DESC_RING_ALIGN,
998-
pipe->dest_ring->base_addr_owner_space,
999-
pipe->dest_ring->base_addr_ce_space);
998+
pipe->dest_ring->base_addr_owner_space_unaligned,
999+
pipe->dest_ring->base_addr_ce_space_unaligned);
10001000
kfree(pipe->dest_ring);
10011001
pipe->dest_ring = NULL;
10021002
}
@@ -1007,8 +1007,8 @@ void ath12k_ce_free_pipes(struct ath12k_base *ab)
10071007
dma_free_coherent(ab->dev,
10081008
pipe->status_ring->nentries * desc_sz +
10091009
CE_DESC_RING_ALIGN,
1010-
pipe->status_ring->base_addr_owner_space,
1011-
pipe->status_ring->base_addr_ce_space);
1010+
pipe->status_ring->base_addr_owner_space_unaligned,
1011+
pipe->status_ring->base_addr_ce_space_unaligned);
10121012
kfree(pipe->status_ring);
10131013
pipe->status_ring = NULL;
10141014
}

drivers/net/wireless/ath/ath12k/mac.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5495,7 +5495,8 @@ static void ath12k_mac_op_cancel_hw_scan(struct ieee80211_hw *hw,
54955495

54965496
for_each_set_bit(link_id, &links_map, ATH12K_NUM_MAX_LINKS) {
54975497
arvif = wiphy_dereference(hw->wiphy, ahvif->link[link_id]);
5498-
if (!arvif || arvif->is_started)
5498+
if (!arvif || !arvif->is_created ||
5499+
arvif->ar->scan.arvif != arvif)
54995500
continue;
55005501

55015502
ar = arvif->ar;
@@ -9172,7 +9173,10 @@ static void ath12k_mac_op_tx(struct ieee80211_hw *hw,
91729173
return;
91739174
}
91749175
} else {
9175-
link_id = 0;
9176+
if (vif->type == NL80211_IFTYPE_P2P_DEVICE)
9177+
link_id = ATH12K_FIRST_SCAN_LINK;
9178+
else
9179+
link_id = 0;
91769180
}
91779181

91789182
arvif = rcu_dereference(ahvif->link[link_id]);
@@ -12142,16 +12146,16 @@ static void ath12k_mac_op_flush(struct ieee80211_hw *hw, struct ieee80211_vif *v
1214212146
if (drop)
1214312147
return;
1214412148

12149+
for_each_ar(ah, ar, i)
12150+
wiphy_work_flush(hw->wiphy, &ar->wmi_mgmt_tx_work);
12151+
1214512152
/* vif can be NULL when flush() is considered for hw */
1214612153
if (!vif) {
1214712154
for_each_ar(ah, ar, i)
1214812155
ath12k_mac_flush(ar);
1214912156
return;
1215012157
}
1215112158

12152-
for_each_ar(ah, ar, i)
12153-
wiphy_work_flush(hw->wiphy, &ar->wmi_mgmt_tx_work);
12154-
1215512159
ahvif = ath12k_vif_to_ahvif(vif);
1215612160
links = ahvif->links_map;
1215712161
for_each_set_bit(link_id, &links, IEEE80211_MLD_MAX_NUM_LINKS) {
@@ -13343,7 +13347,7 @@ static int ath12k_mac_op_cancel_remain_on_channel(struct ieee80211_hw *hw,
1334313347
ath12k_scan_abort(ar);
1334413348

1334513349
cancel_delayed_work_sync(&ar->scan.timeout);
13346-
wiphy_work_cancel(hw->wiphy, &ar->scan.vdev_clean_wk);
13350+
wiphy_work_flush(hw->wiphy, &ar->scan.vdev_clean_wk);
1334713351

1334813352
return 0;
1334913353
}

drivers/net/wireless/ath/ath12k/wmi.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6575,16 +6575,9 @@ static int freq_to_idx(struct ath12k *ar, int freq)
65756575
if (!sband)
65766576
continue;
65776577

6578-
for (ch = 0; ch < sband->n_channels; ch++, idx++) {
6579-
if (sband->channels[ch].center_freq <
6580-
KHZ_TO_MHZ(ar->freq_range.start_freq) ||
6581-
sband->channels[ch].center_freq >
6582-
KHZ_TO_MHZ(ar->freq_range.end_freq))
6583-
continue;
6584-
6578+
for (ch = 0; ch < sband->n_channels; ch++, idx++)
65856579
if (sband->channels[ch].center_freq == freq)
65866580
goto exit;
6587-
}
65886581
}
65896582

65906583
exit:

drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ void mwifiex_update_rxreor_flags(struct mwifiex_adapter *adapter, u8 flags)
825825
static void mwifiex_update_ampdu_rxwinsize(struct mwifiex_adapter *adapter,
826826
bool coex_flag)
827827
{
828-
u8 i;
828+
u8 i, j;
829829
u32 rx_win_size;
830830
struct mwifiex_private *priv;
831831

@@ -863,8 +863,8 @@ static void mwifiex_update_ampdu_rxwinsize(struct mwifiex_adapter *adapter,
863863
if (rx_win_size != priv->add_ba_param.rx_win_size) {
864864
if (!priv->media_connected)
865865
continue;
866-
for (i = 0; i < MAX_NUM_TID; i++)
867-
mwifiex_11n_delba(priv, i);
866+
for (j = 0; j < MAX_NUM_TID; j++)
867+
mwifiex_11n_delba(priv, j);
868868
}
869869
}
870870
}

drivers/net/wireless/rsi/rsi_91x_mac80211.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2035,6 +2035,7 @@ int rsi_mac80211_attach(struct rsi_common *common)
20352035

20362036
hw->queues = MAX_HW_QUEUES;
20372037
hw->extra_tx_headroom = RSI_NEEDED_HEADROOM;
2038+
hw->vif_data_size = sizeof(struct vif_priv);
20382039

20392040
hw->max_rates = 1;
20402041
hw->max_rate_tries = MAX_RETRIES;

include/net/cfg80211.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3221,16 +3221,13 @@ struct cfg80211_auth_request {
32213221
* if this is %NULL for a link, that link is not requested
32223222
* @elems: extra elements for the per-STA profile for this link
32233223
* @elems_len: length of the elements
3224-
* @disabled: If set this link should be included during association etc. but it
3225-
* should not be used until enabled by the AP MLD.
32263224
* @error: per-link error code, must be <= 0. If there is an error, then the
32273225
* operation as a whole must fail.
32283226
*/
32293227
struct cfg80211_assoc_link {
32303228
struct cfg80211_bss *bss;
32313229
const u8 *elems;
32323230
size_t elems_len;
3233-
bool disabled;
32343231
int error;
32353232
};
32363233

include/uapi/linux/nl80211.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2880,8 +2880,9 @@ enum nl80211_commands {
28802880
* index. If the userspace includes more RNR elements than number of
28812881
* MBSSID elements then these will be added in every EMA beacon.
28822882
*
2883-
* @NL80211_ATTR_MLO_LINK_DISABLED: Flag attribute indicating that the link is
2884-
* disabled.
2883+
* @NL80211_ATTR_MLO_LINK_DISABLED: Unused. It was used to indicate that a link
2884+
* is disabled during association. However, the AP will send the
2885+
* information by including a TTLM in the association response.
28852886
*
28862887
* @NL80211_ATTR_BSS_DUMP_INCLUDE_USE_DATA: Include BSS usage data, i.e.
28872888
* include BSSes that can only be used in restricted scenarios and/or

net/mac80211/ieee80211_i.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,6 @@ struct ieee80211_mgd_assoc_data {
451451
struct ieee80211_conn_settings conn;
452452

453453
u16 status;
454-
455-
bool disabled;
456454
} link[IEEE80211_MLD_MAX_NUM_LINKS];
457455

458456
u8 ap_addr[ETH_ALEN] __aligned(2);

net/mac80211/iface.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,8 @@ static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata,
350350
/* we hold the RTNL here so can safely walk the list */
351351
list_for_each_entry(nsdata, &local->interfaces, list) {
352352
if (nsdata != sdata && ieee80211_sdata_running(nsdata)) {
353+
struct ieee80211_link_data *link;
354+
353355
/*
354356
* Only OCB and monitor mode may coexist
355357
*/
@@ -376,8 +378,10 @@ static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata,
376378
* will not add another interface while any channel
377379
* switch is active.
378380
*/
379-
if (nsdata->vif.bss_conf.csa_active)
380-
return -EBUSY;
381+
for_each_link_data(nsdata, link) {
382+
if (link->conf->csa_active)
383+
return -EBUSY;
384+
}
381385

382386
/*
383387
* The remaining checks are only performed for interfaces

0 commit comments

Comments
 (0)