Skip to content

Commit eec5969

Browse files
committed
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/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents e367197 + 4130c67 commit eec5969

File tree

5 files changed

+20
-22
lines changed

5 files changed

+20
-22
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
654654
hw->wiphy->features |= NL80211_FEATURE_WFA_TPC_IE_IN_PROBES;
655655

656656
if (iwl_fw_lookup_cmd_ver(mvm->fw, WOWLAN_KEK_KCK_MATERIAL,
657-
IWL_FW_CMD_VER_UNKNOWN) == 3)
657+
IWL_FW_CMD_VER_UNKNOWN) >= 3)
658658
hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK;
659659

660660
if (fw_has_api(&mvm->fw->ucode_capa,
@@ -1656,7 +1656,8 @@ static void iwl_mvm_prevent_esr_done_wk(struct wiphy *wiphy,
16561656
struct iwl_mvm_vif *mvmvif =
16571657
container_of(wk, struct iwl_mvm_vif, prevent_esr_done_wk.work);
16581658
struct iwl_mvm *mvm = mvmvif->mvm;
1659-
struct ieee80211_vif *vif = iwl_mvm_get_bss_vif(mvm);
1659+
struct ieee80211_vif *vif =
1660+
container_of((void *)mvmvif, struct ieee80211_vif, drv_priv);
16601661

16611662
mutex_lock(&mvm->mutex);
16621663
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)
16821683
struct iwl_mvm_vif *mvmvif =
16831684
container_of(wk, struct iwl_mvm_vif, unblock_esr_tpt_wk);
16841685
struct iwl_mvm *mvm = mvmvif->mvm;
1685-
struct ieee80211_vif *vif = iwl_mvm_get_bss_vif(mvm);
1686+
struct ieee80211_vif *vif =
1687+
container_of((void *)mvmvif, struct ieee80211_vif, drv_priv);
16861688

16871689
mutex_lock(&mvm->mutex);
16881690
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,
64106412
if (sync) {
64116413
lockdep_assert_held(&mvm->mutex);
64126414
ret = wait_event_timeout(mvm->rx_sync_waitq,
6413-
READ_ONCE(mvm->queue_sync_state) == 0 ||
6414-
iwl_mvm_is_radio_hw_killed(mvm),
6415+
READ_ONCE(mvm->queue_sync_state) == 0,
64156416
SYNC_RX_QUEUE_TIMEOUT);
6416-
WARN_ONCE(!ret && !iwl_mvm_is_radio_hw_killed(mvm),
6417-
"queue sync: failed to sync, state is 0x%lx, cookie %d\n",
6417+
WARN_ONCE(!ret, "queue sync: failed to sync, state is 0x%lx, cookie %d\n",
64186418
mvm->queue_sync_state,
64196419
mvm->queue_sync_cookie);
64206420
}

drivers/net/wireless/intel/iwlwifi/mvm/ops.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ static void iwl_mvm_rx_esr_mode_notif(struct iwl_mvm *mvm,
153153
struct ieee80211_vif *vif = iwl_mvm_get_bss_vif(mvm);
154154

155155
/* FW recommendations is only for entering EMLSR */
156-
if (!vif || iwl_mvm_vif_from_mac80211(vif)->esr_active)
156+
if (IS_ERR_OR_NULL(vif) || iwl_mvm_vif_from_mac80211(vif)->esr_active)
157157
return;
158158

159159
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)
19121912
bool rfkill_safe_init_done = READ_ONCE(mvm->rfkill_safe_init_done);
19131913
bool unified = iwl_mvm_has_unified_ucode(mvm);
19141914

1915-
if (state) {
1915+
if (state)
19161916
set_bit(IWL_MVM_STATUS_HW_RFKILL, &mvm->status);
1917-
wake_up(&mvm->rx_sync_waitq);
1918-
} else {
1917+
else
19191918
clear_bit(IWL_MVM_STATUS_HW_RFKILL, &mvm->status);
1920-
}
19211919

19221920
iwl_mvm_set_rfkill_state(mvm);
19231921

drivers/net/wireless/intel/iwlwifi/mvm/rx.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -557,12 +557,10 @@ struct iwl_mvm_stat_data_all_macs {
557557
};
558558

559559
static void iwl_mvm_update_link_sig(struct ieee80211_vif *vif, int sig,
560-
struct iwl_mvm_vif_link_info *link_info)
560+
struct iwl_mvm_vif_link_info *link_info,
561+
struct ieee80211_bss_conf *bss_conf)
561562
{
562563
struct iwl_mvm *mvm = iwl_mvm_vif_from_mac80211(vif)->mvm;
563-
struct ieee80211_bss_conf *bss_conf =
564-
iwl_mvm_rcu_fw_link_id_to_link_conf(mvm, link_info->fw_link_id,
565-
false);
566564
int thold = bss_conf->cqm_rssi_thold;
567565
int hyst = bss_conf->cqm_rssi_hyst;
568566
int last_event;
@@ -670,7 +668,7 @@ static void iwl_mvm_stat_iterator(void *_data, u8 *mac,
670668
mvmvif->deflink.beacon_stats.num_beacons;
671669

672670
/* This is used in pre-MLO API so use deflink */
673-
iwl_mvm_update_link_sig(vif, sig, &mvmvif->deflink);
671+
iwl_mvm_update_link_sig(vif, sig, &mvmvif->deflink, &vif->bss_conf);
674672
}
675673

676674
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,
705703
sig = -le32_to_cpu(mac_stats->beacon_filter_average_energy);
706704

707705
/* This is used in pre-MLO API so use deflink */
708-
iwl_mvm_update_link_sig(vif, sig, &mvmvif->deflink);
706+
iwl_mvm_update_link_sig(vif, sig, &mvmvif->deflink, &vif->bss_conf);
709707
}
710708

711709
static inline void
@@ -921,7 +919,8 @@ iwl_mvm_stat_iterator_all_links(struct iwl_mvm *mvm,
921919
mvmvif->link[link_id]->beacon_stats.num_beacons;
922920

923921
sig = -le32_to_cpu(link_stats->beacon_filter_average_energy);
924-
iwl_mvm_update_link_sig(bss_conf->vif, sig, link_info);
922+
iwl_mvm_update_link_sig(bss_conf->vif, sig, link_info,
923+
bss_conf);
925924

926925
if (WARN_ONCE(mvmvif->id >= MAC_INDEX_AUX,
927926
"invalid mvmvif id: %d", mvmvif->id))
@@ -967,7 +966,7 @@ static void iwl_mvm_update_esr_mode_tpt(struct iwl_mvm *mvm)
967966

968967
lockdep_assert_held(&mvm->mutex);
969968

970-
if (!bss_vif)
969+
if (IS_ERR_OR_NULL(bss_vif))
971970
return;
972971

973972
mvmvif = iwl_mvm_vif_from_mac80211(bss_vif);

drivers/net/wireless/microchip/wilc1000/hif.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ wilc_parse_join_bss_param(struct cfg80211_bss *bss,
382382
struct ieee80211_p2p_noa_attr noa_attr;
383383
const struct cfg80211_bss_ies *ies;
384384
struct wilc_join_bss_param *param;
385-
u8 rates_len = 0, ies_len;
385+
u8 rates_len = 0;
386+
int ies_len;
386387
int ret;
387388

388389
param = kzalloc(sizeof(*param), GFP_KERNEL);

include/net/mac80211.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ enum ieee80211_bss_change {
395395
BSS_CHANGED_HE_OBSS_PD = 1<<28,
396396
BSS_CHANGED_HE_BSS_COLOR = 1<<29,
397397
BSS_CHANGED_FILS_DISCOVERY = 1<<30,
398-
BSS_CHANGED_UNSOL_BCAST_PROBE_RESP = 1<<31,
398+
BSS_CHANGED_UNSOL_BCAST_PROBE_RESP = BIT_ULL(31),
399399
BSS_CHANGED_MLD_VALID_LINKS = BIT_ULL(33),
400400
BSS_CHANGED_MLD_TTLM = BIT_ULL(34),
401401

0 commit comments

Comments
 (0)