Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Intel-SIG] [Meteor Lake] Sync dependency mac80211 patches for iwlwifi driver up to v6.7 #69

Merged
2 changes: 1 addition & 1 deletion Documentation/driver-api/80211/mac80211.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ functions/definitions
ieee80211_rx
ieee80211_rx_ni
ieee80211_rx_irqsafe
ieee80211_tx_status
ieee80211_tx_status_skb
ieee80211_tx_status_ni
ieee80211_tx_status_irqsafe
ieee80211_rts_get
Expand Down
15 changes: 9 additions & 6 deletions drivers/net/wireless/ath/ath11k/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -5893,17 +5893,19 @@ static void ath11k_mac_setup_he_cap(struct ath11k *ar,
ar->mac.iftype[NL80211_BAND_2GHZ],
NL80211_BAND_2GHZ);
band = &ar->mac.sbands[NL80211_BAND_2GHZ];
band->iftype_data = ar->mac.iftype[NL80211_BAND_2GHZ];
band->n_iftype_data = count;
_ieee80211_set_sband_iftype_data(band,
ar->mac.iftype[NL80211_BAND_2GHZ],
count);
}

if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP) {
count = ath11k_mac_copy_he_cap(ar, cap,
ar->mac.iftype[NL80211_BAND_5GHZ],
NL80211_BAND_5GHZ);
band = &ar->mac.sbands[NL80211_BAND_5GHZ];
band->iftype_data = ar->mac.iftype[NL80211_BAND_5GHZ];
band->n_iftype_data = count;
_ieee80211_set_sband_iftype_data(band,
ar->mac.iftype[NL80211_BAND_5GHZ],
count);
}

if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP &&
Expand All @@ -5912,8 +5914,9 @@ static void ath11k_mac_setup_he_cap(struct ath11k *ar,
ar->mac.iftype[NL80211_BAND_6GHZ],
NL80211_BAND_6GHZ);
band = &ar->mac.sbands[NL80211_BAND_6GHZ];
band->iftype_data = ar->mac.iftype[NL80211_BAND_6GHZ];
band->n_iftype_data = count;
_ieee80211_set_sband_iftype_data(band,
ar->mac.iftype[NL80211_BAND_6GHZ],
count);
}
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath/ath12k/dp_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ ath12k_dp_tx_htt_tx_complete_buf(struct ath12k_base *ab,
}
}

ieee80211_tx_status(ar->hw, msdu);
ieee80211_tx_status_skb(ar->hw, msdu);
}

static void
Expand Down Expand Up @@ -499,7 +499,7 @@ static void ath12k_dp_tx_complete_msdu(struct ath12k *ar,
* Might end up reporting it out-of-band from HTT stats.
*/

ieee80211_tx_status(ar->hw, msdu);
ieee80211_tx_status_skb(ar->hw, msdu);

exit:
rcu_read_unlock();
Expand Down
12 changes: 6 additions & 6 deletions drivers/net/wireless/ath/ath12k/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -4647,8 +4647,8 @@ static void ath12k_mac_setup_sband_iftype_data(struct ath12k *ar,
ar->mac.iftype[band],
band);
sband = &ar->mac.sbands[band];
sband->iftype_data = ar->mac.iftype[band];
sband->n_iftype_data = count;
_ieee80211_set_sband_iftype_data(sband, ar->mac.iftype[band],
count);
}

if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP) {
Expand All @@ -4657,8 +4657,8 @@ static void ath12k_mac_setup_sband_iftype_data(struct ath12k *ar,
ar->mac.iftype[band],
band);
sband = &ar->mac.sbands[band];
sband->iftype_data = ar->mac.iftype[band];
sband->n_iftype_data = count;
_ieee80211_set_sband_iftype_data(sband, ar->mac.iftype[band],
count);
}

if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP &&
Expand All @@ -4668,8 +4668,8 @@ static void ath12k_mac_setup_sband_iftype_data(struct ath12k *ar,
ar->mac.iftype[band],
band);
sband = &ar->mac.sbands[band];
sband->iftype_data = ar->mac.iftype[band];
sband->n_iftype_data = count;
_ieee80211_set_sband_iftype_data(sband, ar->mac.iftype[band],
count);
}
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1770,7 +1770,7 @@ ath5k_tx_frame_completed(struct ath5k_hw *ah, struct sk_buff *skb,
ah->stats.antenna_tx[0]++; /* invalid */

trace_ath5k_tx_complete(ah, skb, txq, ts);
ieee80211_tx_status(ah->hw, skb);
ieee80211_tx_status_skb(ah->hw, skb);
}

static void
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ static void ath9k_htc_tx_process(struct ath9k_htc_priv *priv,
}

/* Send status to mac80211 */
ieee80211_tx_status(priv->hw, skb);
ieee80211_tx_status_skb(priv->hw, skb);
}

static inline void ath9k_htc_tx_drainq(struct ath9k_htc_priv *priv,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath9k/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static void ath_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)

if (info->flags & (IEEE80211_TX_CTL_REQ_TX_STATUS |
IEEE80211_TX_STATUS_EOSP)) {
ieee80211_tx_status(hw, skb);
ieee80211_tx_status_skb(hw, skb);
return;
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/broadcom/b43/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1531,9 +1531,9 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
ring->nr_failed_tx_packets++;
ring->nr_total_packet_tries += status->frame_count;
#endif /* DEBUG */
ieee80211_tx_status(dev->wl->hw, meta->skb);
ieee80211_tx_status_skb(dev->wl->hw, meta->skb);

/* skb will be freed by ieee80211_tx_status().
/* skb will be freed by ieee80211_tx_status_skb().
* Poison our pointer. */
meta->skb = B43_DMA_PTR_POISON;
} else {
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/broadcom/b43/pio.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ void b43_pio_handle_txstatus(struct b43_wldev *dev,
q->buffer_used -= total_len;
q->free_packet_slots += 1;

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

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/intel/iwlegacy/4965-mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -6122,7 +6122,7 @@ il4965_mac_channel_switch(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
if (il->ops->set_channel_switch(il, ch_switch)) {
clear_bit(S_CHANNEL_SWITCH_PENDING, &il->status);
il->switch_channel = 0;
ieee80211_chswitch_done(il->vif, false);
ieee80211_chswitch_done(il->vif, false, 0);
}

out:
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/intel/iwlegacy/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -4090,7 +4090,7 @@ il_chswitch_done(struct il_priv *il, bool is_success)
return;

if (test_and_clear_bit(S_CHANNEL_SWITCH_PENDING, &il->status))
ieee80211_chswitch_done(il->vif, is_success);
ieee80211_chswitch_done(il->vif, is_success, 0);
}
EXPORT_SYMBOL(il_chswitch_done);

Expand Down
6 changes: 3 additions & 3 deletions drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/******************************************************************************
*
* Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved.
* Copyright (C) 2018 - 2019, 2022 Intel Corporation
* Copyright(C) 2018 - 2019, 2022 - 2023 Intel Corporation
*
* Portions of this file are derived from the ipw3945 project, as well
* as portions of the ieee80211 subsystem header files.
Expand Down Expand Up @@ -1001,7 +1001,7 @@ static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw,
if (priv->lib->set_channel_switch(priv, ch_switch)) {
clear_bit(STATUS_CHANNEL_SWITCH_PENDING, &priv->status);
priv->switch_channel = 0;
ieee80211_chswitch_done(ctx->vif, false);
ieee80211_chswitch_done(ctx->vif, false, 0);
}

out:
Expand All @@ -1024,7 +1024,7 @@ void iwl_chswitch_done(struct iwl_priv *priv, bool is_success)
return;

if (ctx->vif)
ieee80211_chswitch_done(ctx->vif, is_success);
ieee80211_chswitch_done(ctx->vif, is_success, 0);
}

static void iwlagn_configure_filter(struct ieee80211_hw *hw,
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/intel/iwlwifi/dvm/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ void iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb)

while (!skb_queue_empty(&skbs)) {
skb = __skb_dequeue(&skbs);
ieee80211_tx_status(priv->hw, skb);
ieee80211_tx_status_skb(priv->hw, skb);
}
}

Expand Down Expand Up @@ -1385,6 +1385,6 @@ void iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv,

while (!skb_queue_empty(&reclaimed_skbs)) {
skb = __skb_dequeue(&reclaimed_skbs);
ieee80211_tx_status(priv->hw, skb);
ieee80211_tx_status_skb(priv->hw, skb);
}
}
4 changes: 2 additions & 2 deletions drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1077,8 +1077,8 @@ static void iwl_init_he_hw_capab(struct iwl_trans *trans,

memcpy(iftype_data, iwl_he_eht_capa, sizeof(iwl_he_eht_capa));

sband->iftype_data = iftype_data;
sband->n_iftype_data = ARRAY_SIZE(iwl_he_eht_capa);
_ieee80211_set_sband_iftype_data(sband, iftype_data,
ARRAY_SIZE(iwl_he_eht_capa));

for (i = 0; i < sband->n_iftype_data; i++)
iwl_nvm_fixup_sband_iftd(trans, data, sband, &iftype_data[i],
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1839,7 +1839,7 @@ void iwl_mvm_channel_switch_start_notif(struct iwl_mvm *mvm,

iwl_mvm_csa_client_absent(mvm, vif);
cancel_delayed_work(&mvmvif->csa_work);
ieee80211_chswitch_done(vif, true);
ieee80211_chswitch_done(vif, true, 0);
break;
default:
/* should never happen */
Expand Down
10 changes: 6 additions & 4 deletions drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1370,7 +1370,8 @@ int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
}

int iwl_mvm_post_channel_switch(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *link_conf)
{
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
Expand Down Expand Up @@ -1452,7 +1453,8 @@ void iwl_mvm_abort_channel_switch(struct ieee80211_hw *hw,
mvmvif->csa_failed = true;
mutex_unlock(&mvm->mutex);

iwl_mvm_post_channel_switch(hw, vif);
/* If we're here, we can't support MLD */
iwl_mvm_post_channel_switch(hw, vif, &vif->bss_conf);
}

void iwl_mvm_channel_switch_disconnect_wk(struct work_struct *wk)
Expand All @@ -1464,7 +1466,7 @@ void iwl_mvm_channel_switch_disconnect_wk(struct work_struct *wk)
vif = container_of((void *)mvmvif, struct ieee80211_vif, drv_priv);

/* Trigger disconnect (should clear the CSA state) */
ieee80211_chswitch_done(vif, false);
ieee80211_chswitch_done(vif, false, 0);
}

static u8
Expand Down Expand Up @@ -5485,7 +5487,7 @@ void iwl_mvm_channel_switch_rx_beacon(struct ieee80211_hw *hw,
if (mvmvif->csa_misbehave) {
/* Second time, give up on this AP*/
iwl_mvm_abort_channel_switch(hw, vif);
ieee80211_chswitch_done(vif, false);
ieee80211_chswitch_done(vif, false, 0);
mvmvif->csa_misbehave = false;
return;
}
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ static int iwl_mvm_esr_mode_active(struct iwl_mvm *mvm,

mvmvif->esr_active = true;

/* Disable SMPS overrideing by user */
vif->driver_flags |= IEEE80211_VIF_DISABLE_SMPS_OVERRIDE;
/* Indicate to mac80211 that EML is enabled */
vif->driver_flags |= IEEE80211_VIF_EML_ACTIVE;

iwl_mvm_update_smps_on_active_links(mvm, vif, IWL_MVM_SMPS_REQ_FW,
IEEE80211_SMPS_OFF);
Expand Down Expand Up @@ -370,7 +370,7 @@ static int iwl_mvm_esr_mode_inactive(struct iwl_mvm *mvm,

mvmvif->esr_active = false;

vif->driver_flags &= ~IEEE80211_VIF_DISABLE_SMPS_OVERRIDE;
vif->driver_flags &= ~IEEE80211_VIF_EML_ACTIVE;

iwl_mvm_update_smps_on_active_links(mvm, vif, IWL_MVM_SMPS_REQ_FW,
IEEE80211_SMPS_AUTOMATIC);
Expand Down
6 changes: 4 additions & 2 deletions drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -2315,7 +2315,8 @@ void iwl_mvm_teardown_tdls_peers(struct iwl_mvm *mvm);
void iwl_mvm_recalc_tdls_state(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
bool sta_added);
void iwl_mvm_mac_mgd_protect_tdls_discover(struct ieee80211_hw *hw,
struct ieee80211_vif *vif);
struct ieee80211_vif *vif,
unsigned int link_id);
int iwl_mvm_tdls_channel_switch(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta, u8 oper_class,
Expand Down Expand Up @@ -2426,7 +2427,8 @@ static inline u8 iwl_mvm_phy_band_from_nl80211(enum nl80211_band band)
/* Channel Switch */
void iwl_mvm_channel_switch_disconnect_wk(struct work_struct *wk);
int iwl_mvm_post_channel_switch(struct ieee80211_hw *hw,
struct ieee80211_vif *vif);
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *link);

/* Channel Context */
/**
Expand Down
5 changes: 3 additions & 2 deletions drivers/net/wireless/intel/iwlwifi/mvm/tdls.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* Copyright (C) 2014 Intel Mobile Communications GmbH
* Copyright (C) 2017 Intel Deutschland GmbH
* Copyright (C) 2018-2020, 2022 Intel Corporation
* Copyright (C) 2018-2020, 2022-2023 Intel Corporation
*/
#include <linux/etherdevice.h>
#include "mvm.h"
Expand Down Expand Up @@ -144,7 +144,8 @@ void iwl_mvm_recalc_tdls_state(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
}

void iwl_mvm_mac_mgd_protect_tdls_discover(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
struct ieee80211_vif *vif,
unsigned int link_id)
{
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
u32 duration = 2 * vif->bss_conf.dtim_period * vif->bss_conf.beacon_int;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ iwl_mvm_te_handle_notify_csa(struct iwl_mvm *mvm,
}
iwl_mvm_csa_client_absent(mvm, te_data->vif);
cancel_delayed_work(&mvmvif->csa_work);
ieee80211_chswitch_done(te_data->vif, true);
ieee80211_chswitch_done(te_data->vif, true, 0);
break;
default:
/* should never happen */
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/intel/iwlwifi/mvm/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm,
RS_DRV_DATA_PACK(lq_color, tx_resp->reduced_tpc);

if (likely(!iwl_mvm_time_sync_frame(mvm, skb, hdr->addr1)))
ieee80211_tx_status(mvm->hw, skb);
ieee80211_tx_status_skb(mvm->hw, skb);
}

/* This is an aggregation queue or might become one, so we use
Expand Down Expand Up @@ -2060,7 +2060,7 @@ static void iwl_mvm_tx_reclaim(struct iwl_mvm *mvm, int sta_id, int tid,

while (!skb_queue_empty(&reclaimed_skbs)) {
skb = __skb_dequeue(&reclaimed_skbs);
ieee80211_tx_status(mvm->hw, skb);
ieee80211_tx_status_skb(mvm->hw, skb);
}
}

Expand Down
9 changes: 3 additions & 6 deletions drivers/net/wireless/mediatek/mt76/mt7915/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1127,26 +1127,23 @@ void mt7915_set_stream_he_caps(struct mt7915_phy *phy)
n = mt7915_init_he_caps(phy, NL80211_BAND_2GHZ, data);

band = &phy->mt76->sband_2g.sband;
band->iftype_data = data;
band->n_iftype_data = n;
_ieee80211_set_sband_iftype_data(band, data, n);
}

if (phy->mt76->cap.has_5ghz) {
data = phy->iftype[NL80211_BAND_5GHZ];
n = mt7915_init_he_caps(phy, NL80211_BAND_5GHZ, data);

band = &phy->mt76->sband_5g.sband;
band->iftype_data = data;
band->n_iftype_data = n;
_ieee80211_set_sband_iftype_data(band, data, n);
}

if (phy->mt76->cap.has_6ghz) {
data = phy->iftype[NL80211_BAND_6GHZ];
n = mt7915_init_he_caps(phy, NL80211_BAND_6GHZ, data);

band = &phy->mt76->sband_6g.sband;
band->iftype_data = data;
band->n_iftype_data = n;
_ieee80211_set_sband_iftype_data(band, data, n);
}
}

Expand Down