Skip to content

Commit 618bac9

Browse files
zhoufuroegrumbachjmberg-intelilanpeer2Miriam-Rachel
authored
[Intel-SIG] [Meteor Lake] Sync dependency mac80211 patches for iwlwifi driver up to v6.7 (#69)
* wifi: mac80211: add support for mld in ieee80211_chswitch_done commit a469a59 ("wifi: mac80211: add support for mld in ieee80211_chswitch_done") upstream. This allows to finalize the CSA per link. In case the switch didn't work, tear down the MLD connection. Also pass the ieee80211_bss_conf to post_channel_switch to let the driver know which link completed the switch. deepin-Intel-SIG: commit a469a59 ("wifi: mac80211: add support for mld in ieee80211_chswitch_done"). Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Gregory Greenman <[email protected]> Link: https://lore.kernel.org/r/20230828130311.3d3eacc88436.Ic2d14e2285aa1646216a56806cfd4a8d0054437c@changeid Signed-off-by: Johannes Berg <[email protected]> [ Furong Zhou: amend commit log ] Signed-off-by: Furong Zhou <[email protected]> * wifi: mac80211: support antenna control in injection commit ef246a1 ("wifi: mac80211: support antenna control in injection") upstream. Support antenna control for injection by parsing the antenna radiotap field (which may be presented multiple times) and telling the driver about the resulting antenna bitmap. Of course there's no guarantee the driver will actually honour this, just like any other injection control. If misconfigured, i.e. the injected HT/VHT MCS needs more chains than antennas are configured, the bitmap is reset to zero, indicating no selection. For now this is only set up for two anntenas so we keep more free bits, but that can be trivially extended if any driver implements support for it that can deal with hardware with more antennas. deepin-Intel-SIG: commit ef246a1 ("wifi: mac80211: support antenna control in injection"). Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Gregory Greenman <[email protected]> Link: https://lore.kernel.org/r/20230920211508.f71001aa4da9.I00ccb762a806ea62bc3d728fa3a0d29f4f285eeb@changeid Signed-off-by: Johannes Berg <[email protected]> [ Furong Zhou: amend commit log ] Signed-off-by: Furong Zhou <[email protected]> * wifi: mac80211: Rename and update IEEE80211_VIF_DISABLE_SMPS_OVERRIDE commit 00f823b ("wifi: mac80211: Rename and update IEEE80211_VIF_DISABLE_SMPS_OVERRIDE") upstream. EMLSR operation and SMPS operation cannot coexist. Thus, when EMLSR is enabled, all SMPS signaling towards the AP should be stopped (it is expected that the AP will consider SMPS to be off). Rename IEEE80211_VIF_DISABLE_SMPS_OVERRIDE to IEEE80211_VIF_EML_ACTIVE and use the flag as an indication from the driver that EMLSR is enabled. When EMLSR is enabled SMPS flows towards the AP MLD should be stopped. deepin-Intel-SIG: commit 00f823b ("wifi: mac80211: Rename and update IEEE80211_VIF_DISABLE_SMPS_OVERRIDE"). Signed-off-by: Ilan Peer <[email protected]> Signed-off-by: Gregory Greenman <[email protected]> Link: https://lore.kernel.org/r/20230928172905.fb2c2f9a0645.If6df5357568abd623a081f0f33b07e63fb8bba99@changeid Signed-off-by: Johannes Berg <[email protected]> [ Furong Zhou: amend commit log ] Signed-off-by: Furong Zhou <[email protected]> * wifi: mac80211: make mgd_protect_tdls_discover MLO-aware commit 271d14b ("wifi: mac80211: make mgd_protect_tdls_discover MLO-aware") upstream. Since userspace can choose now what link to establish the TDLS on, we should know on what channel to do session protection. Add a link id parameter to this callback. deepin-Intel-SIG: commit 271d14b ("wifi: mac80211: make mgd_protect_tdls_discover MLO-aware"). Signed-off-by: Miri Korenblit <[email protected]> Signed-off-by: Gregory Greenman <[email protected]> Link: https://lore.kernel.org/r/20230928172905.ef12ce3eb835.If864f406cfd9e24f36a2b88fd13a37328633fcf9@changeid Signed-off-by: Johannes Berg <[email protected]> [ Furong Zhou: amend commit log ] Signed-off-by: Furong Zhou <[email protected]> * wifi: mac80211: add a driver callback to add vif debugfs commit a1f5dcb ("wifi: mac80211: add a driver callback to add vif debugfs") upstream. Add a callback which the driver can use to add the vif debugfs. We used to have this back until commit d260ff1 ("mac80211: remove vif debugfs driver callbacks") where we thought that it will be easier to just add them during interface add/remove. However, now with multi-link, we want to have proper debugfs for drivers for multi-link where some files might be in the netdev for non-MLO connections, and in the links for MLO ones, so we need to do some reconstruction when switching the mode. Moving to this new call enables that and MLO drivers will have to use it for proper debugfs operation. deepin-Intel-SIG: commit a1f5dcb ("wifi: mac80211: add a driver callback to add vif debugfs"). Signed-off-by: Miri Korenblit <[email protected]> Signed-off-by: Johannes Berg <[email protected]> [ Furong Zhou: amend commit log ] Signed-off-by: Furong Zhou <[email protected]> Signed-off-by: Gregory Greenman <[email protected]> Link: https://lore.kernel.org/r/20230928172905.ac38913f6ab7.Iee731d746bb08fcc628fa776f337016a12dc62ac@changeid Signed-off-by: Johannes Berg <[email protected]> * wifi: mac80211: Notify the low level driver on change in MLO valid links commit 041a74c ("wifi: mac80211: Notify the low level driver on change in MLO valid links") upstream. Notify the low level driver when there is change in the valid links. deepin-Intel-SIG: commit 041a74c ("wifi: mac80211: Notify the low level driver on change in MLO valid links"). Signed-off-by: Ilan Peer <[email protected]> Signed-off-by: Gregory Greenman <[email protected]> Link: https://lore.kernel.org/r/20230920211508.4fc85b0a51b0.I64238e0e892709a2bd4764b3bca93cdcf021e2fd@changeid Signed-off-by: Johannes Berg <[email protected]> [ Furong Zhou: amend commit log ] Signed-off-by: Furong Zhou <[email protected]> * wifi: mac80211: Check if we had first beacon with relevant links commit e433304 ("wifi: mac80211: Check if we had first beacon with relevant links") upstream. If there is a disassoc before the fisrt beacon we need to protect a session for the deauth frame. Currently we are checking if we had a beacon in the default link, which is wrong in a MLO connection and link id != 0. Fix this by checking all the active links, if none had a beacon then protect a session. If at least one link had a beacon there is no need for session protection. deepin-Intel-SIG: commit e433304 ("wifi: mac80211: Check if we had first beacon with relevant links"). Signed-off-by: Miri Korenblit <[email protected]> Signed-off-by: Gregory Greenman <[email protected]> Link: https://lore.kernel.org/r/20231004120820.d290f0ab77b0.Ic1505cf3d60f74580d31efa7e52046947c490b85@changeid Signed-off-by: Johannes Berg <[email protected]> [ Furong Zhou: amend commit log ] Signed-off-by: Furong Zhou <[email protected]> * wifi: mac80211: add link id to mgd_prepare_tx() commit e76f3b4 ("wifi: mac80211: add link id to mgd_prepare_tx()") upstream. As we are moving to MLO and links terms, also the airtime protection will be done for a link rather than for a vif. Thus, some drivers will need to know for which link to protect airtime. Add link id as a parameter to the mgd_prepare_tx() callback. deepin-Intel-SIG: commit e76f3b4 ("wifi: mac80211: add link id to mgd_prepare_tx()"). Signed-off-by: Miri Korenblit <[email protected]> Signed-off-by: Gregory Greenman <[email protected]> Link: https://lore.kernel.org/r/20230928172905.c7fc59a6780b.Ic88a5037d31e184a2dce0b031ece1a0a93a3a9da@changeid Signed-off-by: Johannes Berg <[email protected]> [ Furong Zhou: amend commit log ] Signed-off-by: Furong Zhou <[email protected]> * wifi: mac80211: rename ieee80211_tx_status() to ieee80211_tx_status_skb() commit 2703bc8 ("wifi: mac80211: rename ieee80211_tx_status() to ieee80211_tx_status_skb()") upstream. make htmldocs warns: Documentation/driver-api/80211/mac80211:109: ./include/net/mac80211.h:5170: WARNING: Duplicate C declaration, also defined at mac80211:1117. Declaration is '.. c:function:: void ieee80211_tx_status (struct ieee80211_hw *hw, struct sk_buff *skb)'. This is because there's a function named ieee80211_tx_status() and a struct named ieee80211_tx_status. This has been discussed previously but no solution found: https://lore.kernel.org/all/[email protected]/ There's also a bug open for three years with no solution in sight: sphinx-doc/sphinx#8313 So I guess we have no other solution than to a workaround this in the code, for example to rename the function to ieee80211_tx_status_skb() to avoid the name conflict. I got the idea for the name from ieee80211_tx_status_noskb() in which the skb is not provided as an argument, instead with ieee80211_tx_status_skb() the skb is provided. Compile tested only. deepin-Intel-SIG: commit 2703bc8 ("wifi: mac80211: rename ieee80211_tx_status() to ieee80211_tx_status_skb()"). Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Johannes Berg <[email protected]> [ Furong Zhou: amend commit log ] Signed-off-by: Furong Zhou <[email protected]> * wifi: cfg80211: annotate iftype_data pointer with sparse commit e8c1841 ("wifi: cfg80211: annotate iftype_data pointer with sparse") upstream. There were are a number of cases in mac80211 and iwlwifi (at least) that used the sband->iftype_data pointer directly, instead of using the accessors to find the right array entry to use. Make sparse warn when such a thing is done. To not have a lot of casts, add two helper functions/macros - ieee80211_set_sband_iftype_data() - for_each_sband_iftype_data() deepin-Intel-SIG: commit e8c1841 ("wifi: cfg80211: annotate iftype_data pointer with sparse"). Signed-off-by: Johannes Berg <[email protected]> [ Furong Zhou: amend commit log ] Signed-off-by: Furong Zhou <[email protected]> --------- Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Gregory Greenman <[email protected]> Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Furong Zhou <[email protected]> Signed-off-by: Ilan Peer <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Co-authored-by: Emmanuel Grumbach <[email protected]> Co-authored-by: Johannes Berg <[email protected]> Co-authored-by: Ilan Peer <[email protected]> Co-authored-by: Miri Korenblit <[email protected]> Co-authored-by: Kalle Valo <[email protected]>
1 parent 0957833 commit 618bac9

File tree

51 files changed

+341
-187
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+341
-187
lines changed

Documentation/driver-api/80211/mac80211.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ functions/definitions
120120
ieee80211_rx
121121
ieee80211_rx_ni
122122
ieee80211_rx_irqsafe
123-
ieee80211_tx_status
123+
ieee80211_tx_status_skb
124124
ieee80211_tx_status_ni
125125
ieee80211_tx_status_irqsafe
126126
ieee80211_rts_get

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5893,17 +5893,19 @@ static void ath11k_mac_setup_he_cap(struct ath11k *ar,
58935893
ar->mac.iftype[NL80211_BAND_2GHZ],
58945894
NL80211_BAND_2GHZ);
58955895
band = &ar->mac.sbands[NL80211_BAND_2GHZ];
5896-
band->iftype_data = ar->mac.iftype[NL80211_BAND_2GHZ];
5897-
band->n_iftype_data = count;
5896+
_ieee80211_set_sband_iftype_data(band,
5897+
ar->mac.iftype[NL80211_BAND_2GHZ],
5898+
count);
58985899
}
58995900

59005901
if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP) {
59015902
count = ath11k_mac_copy_he_cap(ar, cap,
59025903
ar->mac.iftype[NL80211_BAND_5GHZ],
59035904
NL80211_BAND_5GHZ);
59045905
band = &ar->mac.sbands[NL80211_BAND_5GHZ];
5905-
band->iftype_data = ar->mac.iftype[NL80211_BAND_5GHZ];
5906-
band->n_iftype_data = count;
5906+
_ieee80211_set_sband_iftype_data(band,
5907+
ar->mac.iftype[NL80211_BAND_5GHZ],
5908+
count);
59075909
}
59085910

59095911
if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP &&
@@ -5912,8 +5914,9 @@ static void ath11k_mac_setup_he_cap(struct ath11k *ar,
59125914
ar->mac.iftype[NL80211_BAND_6GHZ],
59135915
NL80211_BAND_6GHZ);
59145916
band = &ar->mac.sbands[NL80211_BAND_6GHZ];
5915-
band->iftype_data = ar->mac.iftype[NL80211_BAND_6GHZ];
5916-
band->n_iftype_data = count;
5917+
_ieee80211_set_sband_iftype_data(band,
5918+
ar->mac.iftype[NL80211_BAND_6GHZ],
5919+
count);
59175920
}
59185921
}
59195922

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ ath12k_dp_tx_htt_tx_complete_buf(struct ath12k_base *ab,
402402
}
403403
}
404404

405-
ieee80211_tx_status(ar->hw, msdu);
405+
ieee80211_tx_status_skb(ar->hw, msdu);
406406
}
407407

408408
static void
@@ -499,7 +499,7 @@ static void ath12k_dp_tx_complete_msdu(struct ath12k *ar,
499499
* Might end up reporting it out-of-band from HTT stats.
500500
*/
501501

502-
ieee80211_tx_status(ar->hw, msdu);
502+
ieee80211_tx_status_skb(ar->hw, msdu);
503503

504504
exit:
505505
rcu_read_unlock();

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4647,8 +4647,8 @@ static void ath12k_mac_setup_sband_iftype_data(struct ath12k *ar,
46474647
ar->mac.iftype[band],
46484648
band);
46494649
sband = &ar->mac.sbands[band];
4650-
sband->iftype_data = ar->mac.iftype[band];
4651-
sband->n_iftype_data = count;
4650+
_ieee80211_set_sband_iftype_data(sband, ar->mac.iftype[band],
4651+
count);
46524652
}
46534653

46544654
if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP) {
@@ -4657,8 +4657,8 @@ static void ath12k_mac_setup_sband_iftype_data(struct ath12k *ar,
46574657
ar->mac.iftype[band],
46584658
band);
46594659
sband = &ar->mac.sbands[band];
4660-
sband->iftype_data = ar->mac.iftype[band];
4661-
sband->n_iftype_data = count;
4660+
_ieee80211_set_sband_iftype_data(sband, ar->mac.iftype[band],
4661+
count);
46624662
}
46634663

46644664
if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP &&
@@ -4668,8 +4668,8 @@ static void ath12k_mac_setup_sband_iftype_data(struct ath12k *ar,
46684668
ar->mac.iftype[band],
46694669
band);
46704670
sband = &ar->mac.sbands[band];
4671-
sband->iftype_data = ar->mac.iftype[band];
4672-
sband->n_iftype_data = count;
4671+
_ieee80211_set_sband_iftype_data(sband, ar->mac.iftype[band],
4672+
count);
46734673
}
46744674
}
46754675

drivers/net/wireless/ath/ath5k/base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1770,7 +1770,7 @@ ath5k_tx_frame_completed(struct ath5k_hw *ah, struct sk_buff *skb,
17701770
ah->stats.antenna_tx[0]++; /* invalid */
17711771

17721772
trace_ath5k_tx_complete(ah, skb, txq, ts);
1773-
ieee80211_tx_status(ah->hw, skb);
1773+
ieee80211_tx_status_skb(ah->hw, skb);
17741774
}
17751775

17761776
static void

drivers/net/wireless/ath/ath9k/htc_drv_txrx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ static void ath9k_htc_tx_process(struct ath9k_htc_priv *priv,
523523
}
524524

525525
/* Send status to mac80211 */
526-
ieee80211_tx_status(priv->hw, skb);
526+
ieee80211_tx_status_skb(priv->hw, skb);
527527
}
528528

529529
static inline void ath9k_htc_tx_drainq(struct ath9k_htc_priv *priv,

drivers/net/wireless/ath/ath9k/xmit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static void ath_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
9494

9595
if (info->flags & (IEEE80211_TX_CTL_REQ_TX_STATUS |
9696
IEEE80211_TX_STATUS_EOSP)) {
97-
ieee80211_tx_status(hw, skb);
97+
ieee80211_tx_status_skb(hw, skb);
9898
return;
9999
}
100100

drivers/net/wireless/broadcom/b43/dma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,9 +1531,9 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
15311531
ring->nr_failed_tx_packets++;
15321532
ring->nr_total_packet_tries += status->frame_count;
15331533
#endif /* DEBUG */
1534-
ieee80211_tx_status(dev->wl->hw, meta->skb);
1534+
ieee80211_tx_status_skb(dev->wl->hw, meta->skb);
15351535

1536-
/* skb will be freed by ieee80211_tx_status().
1536+
/* skb will be freed by ieee80211_tx_status_skb().
15371537
* Poison our pointer. */
15381538
meta->skb = B43_DMA_PTR_POISON;
15391539
} else {

drivers/net/wireless/broadcom/b43/pio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ void b43_pio_handle_txstatus(struct b43_wldev *dev,
582582
q->buffer_used -= total_len;
583583
q->free_packet_slots += 1;
584584

585-
ieee80211_tx_status(dev->wl->hw, pack->skb);
585+
ieee80211_tx_status_skb(dev->wl->hw, pack->skb);
586586
pack->skb = NULL;
587587
list_add(&pack->list, &q->packets_list);
588588

drivers/net/wireless/intel/iwlegacy/4965-mac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6122,7 +6122,7 @@ il4965_mac_channel_switch(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
61226122
if (il->ops->set_channel_switch(il, ch_switch)) {
61236123
clear_bit(S_CHANNEL_SWITCH_PENDING, &il->status);
61246124
il->switch_channel = 0;
6125-
ieee80211_chswitch_done(il->vif, false);
6125+
ieee80211_chswitch_done(il->vif, false, 0);
61266126
}
61276127

61286128
out:

0 commit comments

Comments
 (0)