aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
diff options
context:
space:
mode:
authorJohannes Berg <[email protected]>2025-05-02 12:56:20 +0000
committerMiri Korenblit <[email protected]>2025-05-06 19:22:12 +0000
commitac1ee8130a2297593ddee0466f8bfc0e679f8f1b (patch)
treea53e56f4eba37f811f3d6f7782b7fa3d90dd48b0 /drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
parentwifi: iwlwifi: tests: check transport configs are not duplicated (diff)
downloadkernel-ac1ee8130a2297593ddee0466f8bfc0e679f8f1b.tar.gz
kernel-ac1ee8130a2297593ddee0466f8bfc0e679f8f1b.zip
wifi: iwlwifi: cfg: clean up BW limit and subdev matching
The BW limit, cores and RF ID are matched in the subdevice ID, so it doesn't really make sense to have both SUBDEV() match and a match on any of those three. In particular, for Killer devices the subdevice ID doesn't even follow the layout, so no matching should be on those three values at all, only with SUBDEV(). Change the logic around the BW limit to have it more like all the other things: only a bw_limit match in the dev_info, and put the actual bandwidth into struct iwl_cfg. This duplicates a number of those values, but that way the logic is clearer. Add a test that checks that the three matches mentioned above are not used in conjunction with SUBDEV(), and check that if the bw_limit is matched, a BW limit is provided in the config. Also check that the "Killer" devices have a SUBDEV() match. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250502155404.a185eac2736c.I87ee87300c92518a1d3296d3eda9fd4163e9085e@changeid
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
index 018752b8c4d8..b0b42e024766 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
@@ -949,7 +949,7 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans,
break;
case NL80211_BAND_6GHZ:
if (!trans->reduced_cap_sku &&
- trans->bw_limit >= 320) {
+ (!trans->cfg->bw_limit || trans->cfg->bw_limit >= 320)) {
iftype_data->eht_cap.eht_cap_elem.phy_cap_info[0] |=
IEEE80211_EHT_PHY_CAP0_320MHZ_IN_6GHZ;
iftype_data->eht_cap.eht_cap_elem.phy_cap_info[1] |=
@@ -1099,11 +1099,12 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans,
iftype_data->eht_cap.eht_mcs_nss_supp.bw._320.rx_tx_mcs13_max_nss = 0;
}
- if (trans->bw_limit < 160)
+ if (trans->cfg->bw_limit && trans->cfg->bw_limit < 160)
iftype_data->he_cap.he_cap_elem.phy_cap_info[0] &=
~IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G;
- if (trans->bw_limit < 320 || trans->reduced_cap_sku) {
+ if ((trans->cfg->bw_limit && trans->cfg->bw_limit < 320) ||
+ trans->reduced_cap_sku) {
memset(&iftype_data->eht_cap.eht_mcs_nss_supp.bw._320, 0,
sizeof(iftype_data->eht_cap.eht_mcs_nss_supp.bw._320));
iftype_data->eht_cap.eht_cap_elem.phy_cap_info[2] &=