]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: iwlwifi: mld: Handle rate selection for NAN interface
authorIlan Peer <ilan.peer@intel.com>
Mon, 10 Nov 2025 16:08:46 +0000 (18:08 +0200)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:20:26 +0000 (07:20 -0500)
[ Upstream commit dbbeebece03050cd510073ce89fee83844e06b00 ]

Frames transmitted over a NAN interface might not have channel
information assigned to them. In such cases assign the lowest
OFDM to the frame.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20251110180612.72046f98f878.Ib784931fffd0747acd9d7bb22eabbbec5282733e@changeid
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/mld/tx.c

index 3b4b575aadaa5d79faa74d89998355c2c15c8948..e3fb4fc4f452e29744b4d31e6173c5e0173f44b5 100644 (file)
@@ -345,6 +345,11 @@ u8 iwl_mld_get_lowest_rate(struct iwl_mld *mld,
 
        iwl_mld_get_basic_rates_and_band(mld, vif, info, &basic_rates, &band);
 
+       if (band >= NUM_NL80211_BANDS) {
+               WARN_ON(vif->type != NL80211_IFTYPE_NAN);
+               return IWL_FIRST_OFDM_RATE;
+       }
+
        sband = mld->hw->wiphy->bands[band];
        for_each_set_bit(i, &basic_rates, BITS_PER_LONG) {
                u16 hw = sband->bitrates[i].hw_value;