Commit eec5969c authored by Jakub Kicinski's avatar Jakub Kicinski

Merge tag 'wireless-2024-07-04' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless

Kalle Valo says:

====================
wireless fixes for v6.10

Hopefully the last fixes for v6.10. Fix a regression in wilc1000
where bitrate Information Elements longer than 255 bytes were broken.
Few fixes also to mac80211 and iwlwifi.

* tag 'wireless-2024-07-04' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless:
  wifi: iwlwifi: mvm: check vif for NULL/ERR_PTR before dereference
  wifi: iwlwifi: mvm: avoid link lookup in statistics
  wifi: iwlwifi: mvm: don't wake up rx_sync_waitq upon RFKILL
  wifi: iwlwifi: properly set WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK
  wifi: wilc1000: fix ies_len type in connect path
  wifi: mac80211: fix BSS_CHANGED_UNSOL_BCAST_PROBE_RESP
====================

Link: https://patch.msgid.link/20240704111431.11DEDC3277B@smtp.kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents e3671971 4130c67c
...@@ -654,7 +654,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) ...@@ -654,7 +654,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
hw->wiphy->features |= NL80211_FEATURE_WFA_TPC_IE_IN_PROBES; hw->wiphy->features |= NL80211_FEATURE_WFA_TPC_IE_IN_PROBES;
if (iwl_fw_lookup_cmd_ver(mvm->fw, WOWLAN_KEK_KCK_MATERIAL, if (iwl_fw_lookup_cmd_ver(mvm->fw, WOWLAN_KEK_KCK_MATERIAL,
IWL_FW_CMD_VER_UNKNOWN) == 3) IWL_FW_CMD_VER_UNKNOWN) >= 3)
hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK; hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK;
if (fw_has_api(&mvm->fw->ucode_capa, if (fw_has_api(&mvm->fw->ucode_capa,
...@@ -1656,7 +1656,8 @@ static void iwl_mvm_prevent_esr_done_wk(struct wiphy *wiphy, ...@@ -1656,7 +1656,8 @@ static void iwl_mvm_prevent_esr_done_wk(struct wiphy *wiphy,
struct iwl_mvm_vif *mvmvif = struct iwl_mvm_vif *mvmvif =
container_of(wk, struct iwl_mvm_vif, prevent_esr_done_wk.work); container_of(wk, struct iwl_mvm_vif, prevent_esr_done_wk.work);
struct iwl_mvm *mvm = mvmvif->mvm; struct iwl_mvm *mvm = mvmvif->mvm;
struct ieee80211_vif *vif = iwl_mvm_get_bss_vif(mvm); struct ieee80211_vif *vif =
container_of((void *)mvmvif, struct ieee80211_vif, drv_priv);
mutex_lock(&mvm->mutex); mutex_lock(&mvm->mutex);
iwl_mvm_unblock_esr(mvm, vif, IWL_MVM_ESR_BLOCKED_PREVENTION); iwl_mvm_unblock_esr(mvm, vif, IWL_MVM_ESR_BLOCKED_PREVENTION);
...@@ -1682,7 +1683,8 @@ static void iwl_mvm_unblock_esr_tpt(struct wiphy *wiphy, struct wiphy_work *wk) ...@@ -1682,7 +1683,8 @@ static void iwl_mvm_unblock_esr_tpt(struct wiphy *wiphy, struct wiphy_work *wk)
struct iwl_mvm_vif *mvmvif = struct iwl_mvm_vif *mvmvif =
container_of(wk, struct iwl_mvm_vif, unblock_esr_tpt_wk); container_of(wk, struct iwl_mvm_vif, unblock_esr_tpt_wk);
struct iwl_mvm *mvm = mvmvif->mvm; struct iwl_mvm *mvm = mvmvif->mvm;
struct ieee80211_vif *vif = iwl_mvm_get_bss_vif(mvm); struct ieee80211_vif *vif =
container_of((void *)mvmvif, struct ieee80211_vif, drv_priv);
mutex_lock(&mvm->mutex); mutex_lock(&mvm->mutex);
iwl_mvm_unblock_esr(mvm, vif, IWL_MVM_ESR_BLOCKED_TPT); iwl_mvm_unblock_esr(mvm, vif, IWL_MVM_ESR_BLOCKED_TPT);
...@@ -6410,11 +6412,9 @@ void iwl_mvm_sync_rx_queues_internal(struct iwl_mvm *mvm, ...@@ -6410,11 +6412,9 @@ void iwl_mvm_sync_rx_queues_internal(struct iwl_mvm *mvm,
if (sync) { if (sync) {
lockdep_assert_held(&mvm->mutex); lockdep_assert_held(&mvm->mutex);
ret = wait_event_timeout(mvm->rx_sync_waitq, ret = wait_event_timeout(mvm->rx_sync_waitq,
READ_ONCE(mvm->queue_sync_state) == 0 || READ_ONCE(mvm->queue_sync_state) == 0,
iwl_mvm_is_radio_hw_killed(mvm),
SYNC_RX_QUEUE_TIMEOUT); SYNC_RX_QUEUE_TIMEOUT);
WARN_ONCE(!ret && !iwl_mvm_is_radio_hw_killed(mvm), WARN_ONCE(!ret, "queue sync: failed to sync, state is 0x%lx, cookie %d\n",
"queue sync: failed to sync, state is 0x%lx, cookie %d\n",
mvm->queue_sync_state, mvm->queue_sync_state,
mvm->queue_sync_cookie); mvm->queue_sync_cookie);
} }
......
...@@ -153,7 +153,7 @@ static void iwl_mvm_rx_esr_mode_notif(struct iwl_mvm *mvm, ...@@ -153,7 +153,7 @@ static void iwl_mvm_rx_esr_mode_notif(struct iwl_mvm *mvm,
struct ieee80211_vif *vif = iwl_mvm_get_bss_vif(mvm); struct ieee80211_vif *vif = iwl_mvm_get_bss_vif(mvm);
/* FW recommendations is only for entering EMLSR */ /* FW recommendations is only for entering EMLSR */
if (!vif || iwl_mvm_vif_from_mac80211(vif)->esr_active) if (IS_ERR_OR_NULL(vif) || iwl_mvm_vif_from_mac80211(vif)->esr_active)
return; return;
if (le32_to_cpu(notif->action) == ESR_RECOMMEND_ENTER) if (le32_to_cpu(notif->action) == ESR_RECOMMEND_ENTER)
...@@ -1912,12 +1912,10 @@ static bool iwl_mvm_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state) ...@@ -1912,12 +1912,10 @@ static bool iwl_mvm_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state)
bool rfkill_safe_init_done = READ_ONCE(mvm->rfkill_safe_init_done); bool rfkill_safe_init_done = READ_ONCE(mvm->rfkill_safe_init_done);
bool unified = iwl_mvm_has_unified_ucode(mvm); bool unified = iwl_mvm_has_unified_ucode(mvm);
if (state) { if (state)
set_bit(IWL_MVM_STATUS_HW_RFKILL, &mvm->status); set_bit(IWL_MVM_STATUS_HW_RFKILL, &mvm->status);
wake_up(&mvm->rx_sync_waitq); else
} else {
clear_bit(IWL_MVM_STATUS_HW_RFKILL, &mvm->status); clear_bit(IWL_MVM_STATUS_HW_RFKILL, &mvm->status);
}
iwl_mvm_set_rfkill_state(mvm); iwl_mvm_set_rfkill_state(mvm);
......
...@@ -557,12 +557,10 @@ struct iwl_mvm_stat_data_all_macs { ...@@ -557,12 +557,10 @@ struct iwl_mvm_stat_data_all_macs {
}; };
static void iwl_mvm_update_link_sig(struct ieee80211_vif *vif, int sig, static void iwl_mvm_update_link_sig(struct ieee80211_vif *vif, int sig,
struct iwl_mvm_vif_link_info *link_info) struct iwl_mvm_vif_link_info *link_info,
struct ieee80211_bss_conf *bss_conf)
{ {
struct iwl_mvm *mvm = iwl_mvm_vif_from_mac80211(vif)->mvm; struct iwl_mvm *mvm = iwl_mvm_vif_from_mac80211(vif)->mvm;
struct ieee80211_bss_conf *bss_conf =
iwl_mvm_rcu_fw_link_id_to_link_conf(mvm, link_info->fw_link_id,
false);
int thold = bss_conf->cqm_rssi_thold; int thold = bss_conf->cqm_rssi_thold;
int hyst = bss_conf->cqm_rssi_hyst; int hyst = bss_conf->cqm_rssi_hyst;
int last_event; int last_event;
...@@ -670,7 +668,7 @@ static void iwl_mvm_stat_iterator(void *_data, u8 *mac, ...@@ -670,7 +668,7 @@ static void iwl_mvm_stat_iterator(void *_data, u8 *mac,
mvmvif->deflink.beacon_stats.num_beacons; mvmvif->deflink.beacon_stats.num_beacons;
/* This is used in pre-MLO API so use deflink */ /* This is used in pre-MLO API so use deflink */
iwl_mvm_update_link_sig(vif, sig, &mvmvif->deflink); iwl_mvm_update_link_sig(vif, sig, &mvmvif->deflink, &vif->bss_conf);
} }
static void iwl_mvm_stat_iterator_all_macs(void *_data, u8 *mac, static void iwl_mvm_stat_iterator_all_macs(void *_data, u8 *mac,
...@@ -705,7 +703,7 @@ static void iwl_mvm_stat_iterator_all_macs(void *_data, u8 *mac, ...@@ -705,7 +703,7 @@ static void iwl_mvm_stat_iterator_all_macs(void *_data, u8 *mac,
sig = -le32_to_cpu(mac_stats->beacon_filter_average_energy); sig = -le32_to_cpu(mac_stats->beacon_filter_average_energy);
/* This is used in pre-MLO API so use deflink */ /* This is used in pre-MLO API so use deflink */
iwl_mvm_update_link_sig(vif, sig, &mvmvif->deflink); iwl_mvm_update_link_sig(vif, sig, &mvmvif->deflink, &vif->bss_conf);
} }
static inline void static inline void
...@@ -921,7 +919,8 @@ iwl_mvm_stat_iterator_all_links(struct iwl_mvm *mvm, ...@@ -921,7 +919,8 @@ iwl_mvm_stat_iterator_all_links(struct iwl_mvm *mvm,
mvmvif->link[link_id]->beacon_stats.num_beacons; mvmvif->link[link_id]->beacon_stats.num_beacons;
sig = -le32_to_cpu(link_stats->beacon_filter_average_energy); sig = -le32_to_cpu(link_stats->beacon_filter_average_energy);
iwl_mvm_update_link_sig(bss_conf->vif, sig, link_info); iwl_mvm_update_link_sig(bss_conf->vif, sig, link_info,
bss_conf);
if (WARN_ONCE(mvmvif->id >= MAC_INDEX_AUX, if (WARN_ONCE(mvmvif->id >= MAC_INDEX_AUX,
"invalid mvmvif id: %d", mvmvif->id)) "invalid mvmvif id: %d", mvmvif->id))
...@@ -967,7 +966,7 @@ static void iwl_mvm_update_esr_mode_tpt(struct iwl_mvm *mvm) ...@@ -967,7 +966,7 @@ static void iwl_mvm_update_esr_mode_tpt(struct iwl_mvm *mvm)
lockdep_assert_held(&mvm->mutex); lockdep_assert_held(&mvm->mutex);
if (!bss_vif) if (IS_ERR_OR_NULL(bss_vif))
return; return;
mvmvif = iwl_mvm_vif_from_mac80211(bss_vif); mvmvif = iwl_mvm_vif_from_mac80211(bss_vif);
......
...@@ -382,7 +382,8 @@ wilc_parse_join_bss_param(struct cfg80211_bss *bss, ...@@ -382,7 +382,8 @@ wilc_parse_join_bss_param(struct cfg80211_bss *bss,
struct ieee80211_p2p_noa_attr noa_attr; struct ieee80211_p2p_noa_attr noa_attr;
const struct cfg80211_bss_ies *ies; const struct cfg80211_bss_ies *ies;
struct wilc_join_bss_param *param; struct wilc_join_bss_param *param;
u8 rates_len = 0, ies_len; u8 rates_len = 0;
int ies_len;
int ret; int ret;
param = kzalloc(sizeof(*param), GFP_KERNEL); param = kzalloc(sizeof(*param), GFP_KERNEL);
......
...@@ -395,7 +395,7 @@ enum ieee80211_bss_change { ...@@ -395,7 +395,7 @@ enum ieee80211_bss_change {
BSS_CHANGED_HE_OBSS_PD = 1<<28, BSS_CHANGED_HE_OBSS_PD = 1<<28,
BSS_CHANGED_HE_BSS_COLOR = 1<<29, BSS_CHANGED_HE_BSS_COLOR = 1<<29,
BSS_CHANGED_FILS_DISCOVERY = 1<<30, BSS_CHANGED_FILS_DISCOVERY = 1<<30,
BSS_CHANGED_UNSOL_BCAST_PROBE_RESP = 1<<31, BSS_CHANGED_UNSOL_BCAST_PROBE_RESP = BIT_ULL(31),
BSS_CHANGED_MLD_VALID_LINKS = BIT_ULL(33), BSS_CHANGED_MLD_VALID_LINKS = BIT_ULL(33),
BSS_CHANGED_MLD_TTLM = BIT_ULL(34), BSS_CHANGED_MLD_TTLM = BIT_ULL(34),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment