]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: iwlwifi: cfg: inline HT params
authorJohannes Berg <johannes.berg@intel.com>
Tue, 6 May 2025 19:41:00 +0000 (22:41 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Fri, 9 May 2025 12:37:06 +0000 (15:37 +0300)
With just a handful of values in two bytes, the params are
smaller than the pointer to them. Inline them and save some
space.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250506194102.3407967-14-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
20 files changed:
drivers/net/wireless/intel/iwlwifi/cfg/1000.c
drivers/net/wireless/intel/iwlwifi/cfg/2000.c
drivers/net/wireless/intel/iwlwifi/cfg/22000.c
drivers/net/wireless/intel/iwlwifi/cfg/5000.c
drivers/net/wireless/intel/iwlwifi/cfg/6000.c
drivers/net/wireless/intel/iwlwifi/cfg/7000.c
drivers/net/wireless/intel/iwlwifi/cfg/8000.c
drivers/net/wireless/intel/iwlwifi/cfg/9000.c
drivers/net/wireless/intel/iwlwifi/cfg/ax210.c
drivers/net/wireless/intel/iwlwifi/cfg/bz.c
drivers/net/wireless/intel/iwlwifi/cfg/dr.c
drivers/net/wireless/intel/iwlwifi/cfg/sc.c
drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c
drivers/net/wireless/intel/iwlwifi/dvm/main.c
drivers/net/wireless/intel/iwlwifi/iwl-config.h
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
drivers/net/wireless/intel/iwlwifi/iwl-nvm-utils.c
drivers/net/wireless/intel/iwlwifi/mld/tlc.c
drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c
drivers/net/wireless/intel/iwlwifi/mvm/rs.c

index 20daa503d643b8592be90bc9b5330b3b2f421ec2..0581dc84d59b9a477b55af995fa680638aa2efdc 100644 (file)
@@ -42,12 +42,6 @@ static const struct iwl_base_params iwl1000_base_params = {
        .scd_chain_ext_wa = true,
 };
 
-static const struct iwl_ht_params iwl1000_ht_params = {
-       .ht_greenfield_support = true,
-       .use_rts_for_aggregation = true, /* use rts/cts protection */
-       .ht40_bands = BIT(NL80211_BAND_2GHZ),
-};
-
 static const struct iwl_eeprom_params iwl1000_eeprom_params = {
        .regulatory_bands = {
                EEPROM_REG_BAND_1_CHANNELS,
@@ -78,7 +72,11 @@ const struct iwl_cfg_trans_params iwl1000_trans_cfg = {
 
 const struct iwl_cfg iwl1000_bgn_cfg = {
        IWL_DEVICE_1000,
-       .ht_params = &iwl1000_ht_params,
+       .ht_params = {
+               .ht_greenfield_support = true,
+               .use_rts_for_aggregation = true, /* use rts/cts protection */
+               .ht40_bands = BIT(NL80211_BAND_2GHZ),
+       },
 };
 
 const char iwl1000_bgn_name[] = "Intel(R) Centrino(R) Wireless-N 1000 BGN";
@@ -103,7 +101,11 @@ const char iwl1000_bg_name[] = "Intel(R) Centrino(R) Wireless-N 1000 BG";
 
 const struct iwl_cfg iwl100_bgn_cfg = {
        IWL_DEVICE_100,
-       .ht_params = &iwl1000_ht_params,
+       .ht_params = {
+               .ht_greenfield_support = true,
+               .use_rts_for_aggregation = true, /* use rts/cts protection */
+               .ht40_bands = BIT(NL80211_BAND_2GHZ),
+       },
 };
 
 const char iwl100_bgn_name[] = "Intel(R) Centrino(R) Wireless-N 100 BGN";
index 22656d6ca8eef77fea8d9ab284b889578e691e4e..c2d4c8691372a31156461283d3144c702d6077b3 100644 (file)
@@ -67,12 +67,6 @@ static const struct iwl_base_params iwl2030_base_params = {
        .scd_chain_ext_wa = true,
 };
 
-static const struct iwl_ht_params iwl2000_ht_params = {
-       .ht_greenfield_support = true,
-       .use_rts_for_aggregation = true, /* use rts/cts protection */
-       .ht40_bands = BIT(NL80211_BAND_2GHZ),
-};
-
 static const struct iwl_eeprom_params iwl20x0_eeprom_params = {
        .regulatory_bands = {
                EEPROM_REG_BAND_1_CHANNELS,
@@ -105,7 +99,11 @@ const struct iwl_cfg_trans_params iwl2000_trans_cfg = {
 
 const struct iwl_cfg iwl2000_2bgn_cfg = {
        IWL_DEVICE_2000,
-       .ht_params = &iwl2000_ht_params,
+       .ht_params = {
+               .ht_greenfield_support = true,
+               .use_rts_for_aggregation = true, /* use rts/cts protection */
+               .ht40_bands = BIT(NL80211_BAND_2GHZ),
+       },
 };
 
 const char iwl2000_2bgn_name[] = "Intel(R) Centrino(R) Wireless-N 2200 BGN";
@@ -129,7 +127,11 @@ const struct iwl_cfg_trans_params iwl2030_trans_cfg = {
 
 const struct iwl_cfg iwl2030_2bgn_cfg = {
        IWL_DEVICE_2030,
-       .ht_params = &iwl2000_ht_params,
+       .ht_params = {
+               .ht_greenfield_support = true,
+               .use_rts_for_aggregation = true, /* use rts/cts protection */
+               .ht40_bands = BIT(NL80211_BAND_2GHZ),
+       },
 };
 
 const char iwl2030_2bgn_name[] = "Intel(R) Centrino(R) Wireless-N 2230 BGN";
@@ -153,7 +155,11 @@ const struct iwl_cfg_trans_params iwl105_trans_cfg = {
 
 const struct iwl_cfg iwl105_bgn_cfg = {
        IWL_DEVICE_105,
-       .ht_params = &iwl2000_ht_params,
+       .ht_params = {
+               .ht_greenfield_support = true,
+               .use_rts_for_aggregation = true, /* use rts/cts protection */
+               .ht40_bands = BIT(NL80211_BAND_2GHZ),
+       },
 };
 
 const char iwl105_bgn_name[] = "Intel(R) Centrino(R) Wireless-N 105 BGN";
@@ -178,7 +184,11 @@ const struct iwl_cfg_trans_params iwl135_trans_cfg = {
 
 const struct iwl_cfg iwl135_bgn_cfg = {
        IWL_DEVICE_135,
-       .ht_params = &iwl2000_ht_params,
+       .ht_params = {
+               .ht_greenfield_support = true,
+               .use_rts_for_aggregation = true, /* use rts/cts protection */
+               .ht40_bands = BIT(NL80211_BAND_2GHZ),
+       },
 };
 
 const char iwl135_bgn_name[] = "Intel(R) Centrino(R) Wireless-N 135 BGN";
index b62c3d1e9b3c7e588ad827e209b291e223c58f25..633fb2bffa2f4fc10e0edd9a77d69c3c66c20e86 100644 (file)
@@ -61,12 +61,6 @@ static const struct iwl_base_params iwl_22000_base_params = {
        .pcie_l1_allowed = true,
 };
 
-const struct iwl_ht_params iwl_22000_ht_params = {
-       .stbc = true,
-       .ldpc = true,
-       .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
-};
-
 #define IWL_DEVICE_22000_COMMON                                                \
        .ucode_api_min = IWL_22000_UCODE_API_MIN,                       \
        .led_mode = IWL_LED_RF_STATE,                                   \
@@ -82,7 +76,12 @@ const struct iwl_ht_params iwl_22000_ht_params = {
        .apmg_not_supported = true,                                     \
        .vht_mu_mimo_supported = true,                                  \
        .mac_addr_from_csr = 0x380,                                     \
-       .ht_params = &iwl_22000_ht_params,                              \
+       .ht_params = {                                                  \
+               .stbc = true,                                           \
+               .ldpc = true,                                           \
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) |                  \
+                             BIT(NL80211_BAND_5GHZ),                   \
+       },                                                              \
        .nvm_ver = IWL_22000_NVM_VERSION,                               \
        .nvm_type = IWL_NVM_EXT,                                        \
        .dbgc_supported = true,                                         \
index 36909f6323dbccd35da595326ca97af2065cb817..85c1adfefa93bba869f8ac4ed32e4ef4512003a3 100644 (file)
@@ -41,11 +41,6 @@ static const struct iwl_base_params iwl5000_base_params = {
        .scd_chain_ext_wa = true,
 };
 
-static const struct iwl_ht_params iwl5000_ht_params = {
-       .ht_greenfield_support = true,
-       .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
-};
-
 static const struct iwl_eeprom_params iwl5000_eeprom_params = {
        .regulatory_bands = {
                EEPROM_REG_BAND_1_CHANNELS,
@@ -79,7 +74,10 @@ const struct iwl_cfg iwl5300_agn_cfg = {
        /* at least EEPROM 0x11A has wrong info */
        .valid_tx_ant = ANT_ABC,        /* .cfg overwrite */
        .valid_rx_ant = ANT_ABC,        /* .cfg overwrite */
-       .ht_params = &iwl5000_ht_params,
+       .ht_params = {
+               .ht_greenfield_support = true,
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
 };
 
 const char iwl5300_agn_name[] = "Intel(R) Ultimate N WiFi Link 5300 AGN";
@@ -88,7 +86,10 @@ const struct iwl_cfg iwl5100_n_cfg = {
        IWL_DEVICE_5000,
        .valid_tx_ant = ANT_B,          /* .cfg overwrite */
        .valid_rx_ant = ANT_AB,         /* .cfg overwrite */
-       .ht_params = &iwl5000_ht_params,
+       .ht_params = {
+               .ht_greenfield_support = true,
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
 };
 
 const char iwl5100_bgn_name[] = "Intel(R) WiFi Link 5100 BGN";
@@ -111,7 +112,10 @@ const struct iwl_cfg iwl5350_agn_cfg = {
        .nvm_ver = EEPROM_5050_EEPROM_VERSION,
        .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION,
        .eeprom_params = &iwl5000_eeprom_params,
-       .ht_params = &iwl5000_ht_params,
+       .ht_params = {
+               .ht_greenfield_support = true,
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
        .led_mode = IWL_LED_BLINK,
        .internal_wimax_coex = true,
 };
@@ -137,8 +141,10 @@ const struct iwl_cfg_trans_params iwl5150_trans_cfg = {
 
 const struct iwl_cfg iwl5150_agn_cfg = {
        IWL_DEVICE_5150,
-       .ht_params = &iwl5000_ht_params,
-
+       .ht_params = {
+               .ht_greenfield_support = true,
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
 };
 
 const char iwl5150_agn_name[] = "Intel(R) WiMAX/WiFi Link 5150 AGN";
index 09a68712114f6907f91bcd6f0355d7eb8833696f..cb137b3fefc3b2ab129b8f55a98546bc30b01836 100644 (file)
@@ -88,12 +88,6 @@ static const struct iwl_base_params iwl6000_g2_base_params = {
        .scd_chain_ext_wa = true,
 };
 
-static const struct iwl_ht_params iwl6000_ht_params = {
-       .ht_greenfield_support = true,
-       .use_rts_for_aggregation = true, /* use rts/cts protection */
-       .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
-};
-
 static const struct iwl_eeprom_params iwl6000_eeprom_params = {
        .regulatory_bands = {
                EEPROM_REG_BAND_1_CHANNELS,
@@ -125,7 +119,11 @@ const struct iwl_cfg_trans_params iwl6005_trans_cfg = {
 
 const struct iwl_cfg iwl6005_n_cfg = {
        IWL_DEVICE_6005,
-       .ht_params = &iwl6000_ht_params,
+       .ht_params = {
+               .ht_greenfield_support = true,
+               .use_rts_for_aggregation = true, /* use rts/cts protection */
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
 };
 
 const char iwl6005_2agn_name[] = "Intel(R) Centrino(R) Advanced-N 6205 AGN";
@@ -159,7 +157,11 @@ const struct iwl_cfg_trans_params iwl6030_trans_cfg = {
 
 const struct iwl_cfg iwl6030_n_cfg = {
        IWL_DEVICE_6030,
-       .ht_params = &iwl6000_ht_params,
+       .ht_params = {
+               .ht_greenfield_support = true,
+               .use_rts_for_aggregation = true, /* use rts/cts protection */
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
 };
 
 const char iwl6030_2agn_name[] = "Intel(R) Centrino(R) Advanced-N 6230 AGN";
@@ -187,7 +189,11 @@ const char iwl6030_2bg_name[] = "Intel(R) Centrino(R) Advanced-N 6230 BG";
 
 const struct iwl_cfg iwl6035_2agn_cfg = {
        IWL_DEVICE_6035,
-       .ht_params = &iwl6000_ht_params,
+       .ht_params = {
+               .ht_greenfield_support = true,
+               .use_rts_for_aggregation = true, /* use rts/cts protection */
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
 };
 
 const char iwl6035_2agn_name[] = "Intel(R) Centrino(R) Advanced-N 6235 AGN";
@@ -195,7 +201,11 @@ const char iwl6035_2agn_sff_name[] = "Intel(R) Centrino(R) Ultimate-N 6235 AGN";
 
 const struct iwl_cfg iwl130_bgn_cfg = {
        IWL_DEVICE_6030,
-       .ht_params = &iwl6000_ht_params,
+       .ht_params = {
+               .ht_greenfield_support = true,
+               .use_rts_for_aggregation = true, /* use rts/cts protection */
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
        .rx_with_siso_diversity = true,
 };
 
@@ -231,7 +241,11 @@ const struct iwl_cfg_trans_params iwl6000i_trans_cfg = {
 
 const struct iwl_cfg iwl6000i_2agn_cfg = {
        IWL_DEVICE_6000i,
-       .ht_params = &iwl6000_ht_params,
+       .ht_params = {
+               .ht_greenfield_support = true,
+               .use_rts_for_aggregation = true, /* use rts/cts protection */
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
 };
 
 const char iwl6000i_2agn_name[] = "Intel(R) Centrino(R) Advanced-N 6200 AGN";
@@ -264,7 +278,11 @@ const struct iwl_cfg_trans_params iwl6050_trans_cfg = {
 
 const struct iwl_cfg iwl6050_2agn_cfg = {
        IWL_DEVICE_6050,
-       .ht_params = &iwl6000_ht_params,
+       .ht_params = {
+               .ht_greenfield_support = true,
+               .use_rts_for_aggregation = true, /* use rts/cts protection */
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
 };
 
 const char iwl6050_2agn_name[] = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN";
@@ -294,7 +312,11 @@ const struct iwl_cfg_trans_params iwl6150_trans_cfg = {
 
 const struct iwl_cfg iwl6150_bgn_cfg = {
        IWL_DEVICE_6150,
-       .ht_params = &iwl6000_ht_params,
+       .ht_params = {
+               .ht_greenfield_support = true,
+               .use_rts_for_aggregation = true, /* use rts/cts protection */
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
 };
 
 const char iwl6150_bgn_name[] = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN";
@@ -319,7 +341,11 @@ const struct iwl_cfg iwl6000_3agn_cfg = {
        .nvm_ver = EEPROM_6000_EEPROM_VERSION,
        .nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION,
        .eeprom_params = &iwl6000_eeprom_params,
-       .ht_params = &iwl6000_ht_params,
+       .ht_params = {
+               .ht_greenfield_support = true,
+               .use_rts_for_aggregation = true, /* use rts/cts protection */
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
        .led_mode = IWL_LED_BLINK,
 };
 
index f81036e241b5db1b47463513b5632b5d647de906..ab7933487675e8e216363d60040aa8d1db77f3f3 100644 (file)
@@ -84,11 +84,6 @@ static const struct iwl_tt_params iwl7000_high_temp_tt_params = {
        .support_tx_backoff = true,
 };
 
-static const struct iwl_ht_params iwl7000_ht_params = {
-       .stbc = true,
-       .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
-};
-
 const struct iwl_cfg_trans_params iwl7000_trans_cfg = {
        .device_family = IWL_DEVICE_FAMILY_7000,
        .base_params = &iwl7000_base_params,
@@ -138,7 +133,10 @@ const char iwl7265d_n_name[] = "Intel(R) Wireless N 7265";
 const struct iwl_cfg iwl7260_cfg = {
        .fw_name_pre = IWL7260_FW_PRE,
        IWL_DEVICE_7000,
-       .ht_params = &iwl7000_ht_params,
+       .ht_params = {
+               .stbc = true,
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
        .nvm_ver = IWL7260_NVM_VERSION,
        .host_interrupt_operation_mode = true,
        .lp_xtal_workaround = true,
@@ -148,7 +146,10 @@ const struct iwl_cfg iwl7260_cfg = {
 const struct iwl_cfg iwl7260_high_temp_cfg = {
        .fw_name_pre = IWL7260_FW_PRE,
        IWL_DEVICE_7000,
-       .ht_params = &iwl7000_ht_params,
+       .ht_params = {
+               .stbc = true,
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
        .nvm_ver = IWL7260_NVM_VERSION,
        .high_temp = true,
        .host_interrupt_operation_mode = true,
@@ -160,7 +161,10 @@ const struct iwl_cfg iwl7260_high_temp_cfg = {
 const struct iwl_cfg iwl3160_cfg = {
        .fw_name_pre = IWL3160_FW_PRE,
        IWL_DEVICE_7000,
-       .ht_params = &iwl7000_ht_params,
+       .ht_params = {
+               .stbc = true,
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
        .nvm_ver = IWL3160_NVM_VERSION,
        .host_interrupt_operation_mode = true,
        .dccm_len = IWL3160_DCCM_LEN,
@@ -177,16 +181,13 @@ static const struct iwl_pwr_tx_backoff iwl7265_pwr_tx_backoffs[] = {
        {0},
 };
 
-static const struct iwl_ht_params iwl7265_ht_params = {
-       .stbc = true,
-       .ldpc = true,
-       .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
-};
-
 const struct iwl_cfg iwl3165_2ac_cfg = {
        .fw_name_pre = IWL7265D_FW_PRE,
        IWL_DEVICE_7005D,
-       .ht_params = &iwl7000_ht_params,
+       .ht_params = {
+               .stbc = true,
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
        .nvm_ver = IWL3165_NVM_VERSION,
        .pwr_tx_backoffs = iwl7265_pwr_tx_backoffs,
        .dccm_len = IWL7265_DCCM_LEN,
@@ -195,7 +196,10 @@ const struct iwl_cfg iwl3165_2ac_cfg = {
 const struct iwl_cfg iwl3168_2ac_cfg = {
        .fw_name_pre = IWL3168_FW_PRE,
        IWL_DEVICE_3008,
-       .ht_params = &iwl7000_ht_params,
+       .ht_params = {
+               .stbc = true,
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
        .nvm_ver = IWL3168_NVM_VERSION,
        .pwr_tx_backoffs = iwl7265_pwr_tx_backoffs,
        .dccm_len = IWL7265_DCCM_LEN,
@@ -205,7 +209,11 @@ const struct iwl_cfg iwl3168_2ac_cfg = {
 const struct iwl_cfg iwl7265_cfg = {
        .fw_name_pre = IWL7265_FW_PRE,
        IWL_DEVICE_7005,
-       .ht_params = &iwl7265_ht_params,
+       .ht_params = {
+               .stbc = true,
+               .ldpc = true,
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
        .nvm_ver = IWL7265_NVM_VERSION,
        .pwr_tx_backoffs = iwl7265_pwr_tx_backoffs,
        .dccm_len = IWL7265_DCCM_LEN,
@@ -214,7 +222,11 @@ const struct iwl_cfg iwl7265_cfg = {
 const struct iwl_cfg iwl7265d_cfg = {
        .fw_name_pre = IWL7265D_FW_PRE,
        IWL_DEVICE_7005D,
-       .ht_params = &iwl7265_ht_params,
+       .ht_params = {
+               .stbc = true,
+               .ldpc = true,
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
        .nvm_ver = IWL7265D_NVM_VERSION,
        .pwr_tx_backoffs = iwl7265_pwr_tx_backoffs,
        .dccm_len = IWL7265_DCCM_LEN,
index 6f0e62a4c8fc5d2abb40d0134cf9212e31bd181f..02093a6e857a3633bb066085d4e6add048897bbf 100644 (file)
@@ -47,12 +47,6 @@ static const struct iwl_base_params iwl8000_base_params = {
        .pcie_l1_allowed = true,
 };
 
-static const struct iwl_ht_params iwl8000_ht_params = {
-       .stbc = true,
-       .ldpc = true,
-       .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
-};
-
 static const struct iwl_tt_params iwl8000_tt_params = {
        .ct_kill_entry = 115,
        .ct_kill_exit = 93,
@@ -115,14 +109,22 @@ const char iwl4165_2ac_name[] = "Intel(R) Dual Band Wireless AC 4165";
 const struct iwl_cfg iwl8260_cfg = {
        .fw_name_pre = IWL8000_FW_PRE,
        IWL_DEVICE_8260,
-       .ht_params = &iwl8000_ht_params,
+       .ht_params = {
+               .stbc = true,
+               .ldpc = true,
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
        .nvm_ver = IWL8000_NVM_VERSION,
 };
 
 const struct iwl_cfg iwl8265_cfg = {
        .fw_name_pre = IWL8265_FW_PRE,
        IWL_DEVICE_8265,
-       .ht_params = &iwl8000_ht_params,
+       .ht_params = {
+               .stbc = true,
+               .ldpc = true,
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
+       },
        .nvm_ver = IWL8000_NVM_VERSION,
        .vht_mu_mimo_supported = true,
 };
index 16bf25051dbfef494e4e9e6ffb6f6aa37620c148..af21cfdadc8fe90c3e30c26a1d12b3e8db8e2a1f 100644 (file)
@@ -45,12 +45,6 @@ static const struct iwl_base_params iwl9000_base_params = {
        .pcie_l1_allowed = true,
 };
 
-static const struct iwl_ht_params iwl9000_ht_params = {
-       .stbc = true,
-       .ldpc = true,
-       .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
-};
-
 static const struct iwl_tt_params iwl9000_tt_params = {
        .ct_kill_entry = 115,
        .ct_kill_exit = 93,
@@ -95,7 +89,12 @@ static const struct iwl_tt_params iwl9000_tt_params = {
        .min_umac_error_event_table = 0x800000,                         \
        .d3_debug_data_base_addr = 0x401000,                            \
        .d3_debug_data_length = 92 * 1024,                              \
-       .ht_params = &iwl9000_ht_params,                                \
+       .ht_params = {                                                  \
+               .stbc = true,                                           \
+               .ldpc = true,                                           \
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) |                  \
+                             BIT(NL80211_BAND_5GHZ),                   \
+       },                                                              \
        .nvm_ver = IWL9000_NVM_VERSION,                                 \
        .mon_smem_regs = {                                              \
                .write_ptr = {                                          \
index 6f081aaa5c57afe646e8911885d1fbb551494913..e7bba29fe755a689676c423017b7e28397ab9e9f 100644 (file)
@@ -74,7 +74,12 @@ static const struct iwl_base_params iwl_ax210_base_params = {
        .apmg_not_supported = true,                                     \
        .vht_mu_mimo_supported = true,                                  \
        .mac_addr_from_csr = 0x380,                                     \
-       .ht_params = &iwl_22000_ht_params,                              \
+       .ht_params = {                                                  \
+               .stbc = true,                                           \
+               .ldpc = true,                                           \
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) |                  \
+                             BIT(NL80211_BAND_5GHZ),                   \
+       },                                                              \
        .nvm_ver = IWL_AX210_NVM_VERSION,                               \
        .nvm_type = IWL_NVM_EXT,                                        \
        .dbgc_supported = true,                                         \
index 4840bb25448b1f9116c401928eff5e80caf6230c..ea2d35cbc6f3bfd1d636ada122877a0536956600 100644 (file)
@@ -55,12 +55,6 @@ static const struct iwl_base_params iwl_bz_base_params = {
        .pcie_l1_allowed = true,
 };
 
-const struct iwl_ht_params iwl_bz_ht_params = {
-       .stbc = true,
-       .ldpc = true,
-       .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
-};
-
 #define IWL_DEVICE_BZ_COMMON                                           \
        .ucode_api_max = IWL_BZ_UCODE_API_MAX,                  \
        .ucode_api_min = IWL_BZ_UCODE_API_MIN,                  \
@@ -118,7 +112,12 @@ const struct iwl_ht_params iwl_bz_ht_params = {
 
 #define IWL_DEVICE_BZ                                                  \
        IWL_DEVICE_BZ_COMMON,                                           \
-       .ht_params = &iwl_bz_ht_params
+       .ht_params = {                                                  \
+               .stbc = true,                                           \
+               .ldpc = true,                                           \
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) |                  \
+                             BIT(NL80211_BAND_5GHZ),                   \
+       }
 
 /*
  * This size was picked according to 8 MSDUs inside 512 A-MSDUs in an
index c041b9c11810e304da50ab0799dda77b35a22be5..cbac8f12e2d8d6e76dede1dc7bb952d40be84b26 100644 (file)
@@ -108,7 +108,12 @@ static const struct iwl_base_params iwl_dr_base_params = {
        .uhb_supported = true,                                          \
        .features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,           \
        .num_rbds = IWL_NUM_RBDS_DR_EHT,                                \
-       .ht_params = &iwl_bz_ht_params
+       .ht_params = {                                                  \
+               .stbc = true,                                           \
+               .ldpc = true,                                           \
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) |                  \
+                             BIT(NL80211_BAND_5GHZ),                   \
+       }
 
 /*
  * This size was picked according to 8 MSDUs inside 512 A-MSDUs in an
index 40e671e69fef84dde3a78875eaa38df33a386625..673e29f02b0066eb5ce1895b7fa5620a4fc334b9 100644 (file)
@@ -112,7 +112,12 @@ static const struct iwl_base_params iwl_sc_base_params = {
        .uhb_supported = true,                                          \
        .features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,           \
        .num_rbds = IWL_NUM_RBDS_SC_EHT,                                \
-       .ht_params = &iwl_bz_ht_params
+       .ht_params = {                                                  \
+               .stbc = true,                                           \
+               .ldpc = true,                                           \
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) |                  \
+                             BIT(NL80211_BAND_5GHZ),                   \
+       }
 
 /*
  * This size was picked according to 8 MSDUs inside 512 A-MSDUs in an
index 2ed4b6e798abe1242ffc9127d6581e16a0e8ec11..ec94c43ba28c10600bfa26a0efd7ba6d96b24724 100644 (file)
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
- * Copyright (C) 2018 Intel Corporation
+ * Copyright (C) 2018, 2025 Intel Corporation
  *****************************************************************************/
 
 #include <linux/slab.h>
@@ -2097,7 +2097,8 @@ static ssize_t iwl_dbgfs_protection_mode_read(struct file *file,
        char buf[40];
        const size_t bufsz = sizeof(buf);
 
-       if (priv->cfg->ht_params)
+       /* HT devices also have at least one HT40 band */
+       if (priv->cfg->ht_params.ht40_bands)
                pos += scnprintf(buf + pos, bufsz - pos,
                         "use %s for aggregation\n",
                         (priv->hw_params.use_rts_for_aggregation) ?
@@ -2117,7 +2118,8 @@ static ssize_t iwl_dbgfs_protection_mode_write(struct file *file,
        int buf_size;
        int rts;
 
-       if (!priv->cfg->ht_params)
+       /* HT devices also have at least one HT40 band */
+       if (!priv->cfg->ht_params.ht40_bands)
                return -EINVAL;
 
        memset(buf, 0, sizeof(buf));
index 38e66e694d528e2ec8302a4f0c8c28746ce99b90..c6276186702381d96d5a10aa5deb2403491b332d 100644 (file)
@@ -1137,9 +1137,10 @@ static void iwl_uninit_drv(struct iwl_priv *priv)
 
 static void iwl_set_hw_params(struct iwl_priv *priv)
 {
-       if (priv->cfg->ht_params)
+       /* there are no devices with HT but without HT40 on all bands */
+       if (priv->cfg->ht_params.ht40_bands)
                priv->hw_params.use_rts_for_aggregation =
-                       priv->cfg->ht_params->use_rts_for_aggregation;
+                       priv->cfg->ht_params.use_rts_for_aggregation;
 
        /* Device-specific setup */
        priv->lib->set_hw_params(priv);
@@ -1173,8 +1174,9 @@ static int iwl_eeprom_init_hw_params(struct iwl_priv *priv)
 {
        struct iwl_nvm_data *data = priv->nvm_data;
 
+       /* all HT devices also have HT40 on at least one band */
        if (data->sku_cap_11n_enable &&
-           !priv->cfg->ht_params) {
+           !priv->cfg->ht_params.ht40_bands) {
                IWL_ERR(priv, "Invalid 11n configuration\n");
                return -EINVAL;
        }
index e2ce1c7d8c90c562b48dfaad1d57ec63a48cd705..30725ed5e3bc480e2833adf0135e67a2a189a20b 100644 (file)
@@ -359,7 +359,7 @@ struct iwl_cfg {
        /* params specific to an individual device within a device family */
        const char *fw_name_pre;
        /* params likely to change within a device family */
-       const struct iwl_ht_params *ht_params;
+       const struct iwl_ht_params ht_params;
        const struct iwl_eeprom_params *eeprom_params;
        const struct iwl_pwr_tx_backoff *pwr_tx_backoffs;
        const struct iwl_tt_params *thermal_params;
@@ -655,7 +655,6 @@ extern const struct iwl_cfg iwl105_bgn_cfg;
 extern const struct iwl_cfg iwl135_bgn_cfg;
 #endif /* CONFIG_IWLDVM */
 #if IS_ENABLED(CONFIG_IWLMVM)
-extern const struct iwl_ht_params iwl_22000_ht_params;
 
 extern const struct iwl_cfg iwl7260_cfg;
 extern const struct iwl_cfg iwl7260_high_temp_cfg;
@@ -691,8 +690,6 @@ extern const struct iwl_cfg iwl_cfg_so_a0_hr_a0_80mhz;
 #endif /* CONFIG_IWLMVM */
 
 #if IS_ENABLED(CONFIG_IWLMLD)
-extern const struct iwl_ht_params iwl_bz_ht_params;
-
 extern const struct iwl_cfg iwl_cfg_bz;
 extern const struct iwl_cfg iwl_cfg_bz_160mhz;
 
index 9972929234a7b5749f544fe779b986a7754ad87a..87f927ed2c6e6bb9a7ba5a125cdbe4673164c678 100644 (file)
@@ -517,7 +517,7 @@ static void iwl_init_vht_hw_capab(struct iwl_trans *trans,
                       IEEE80211_VHT_MAX_AMPDU_1024K <<
                       IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT;
 
-       if (!trans->cfg->ht_params->stbc)
+       if (!trans->cfg->ht_params.stbc)
                vht_cap->cap &= ~IEEE80211_VHT_CAP_RXSTBC_MASK;
 
        if (data->vht160_supported)
@@ -527,7 +527,7 @@ static void iwl_init_vht_hw_capab(struct iwl_trans *trans,
        if (cfg->vht_mu_mimo_supported)
                vht_cap->cap |= IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE;
 
-       if (cfg->ht_params->ldpc)
+       if (cfg->ht_params.ldpc)
                vht_cap->cap |= IEEE80211_VHT_CAP_RXLDPC;
 
        if (data->sku_cap_mimo_disabled) {
@@ -535,7 +535,7 @@ static void iwl_init_vht_hw_capab(struct iwl_trans *trans,
                num_tx_ants = 1;
        }
 
-       if (trans->cfg->ht_params->stbc && num_tx_ants > 1)
+       if (trans->cfg->ht_params.stbc && num_tx_ants > 1)
                vht_cap->cap |= IEEE80211_VHT_CAP_TXSTBC;
        else
                vht_cap->cap |= IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN;
@@ -1087,7 +1087,7 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans,
                iftype_data->vendor_elems.len = ARRAY_SIZE(iwl_vendor_caps);
        }
 
-       if (!trans->cfg->ht_params->stbc) {
+       if (!trans->cfg->ht_params.stbc) {
                iftype_data->he_cap.he_cap_elem.phy_cap_info[2] &=
                        ~IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ;
                iftype_data->he_cap.he_cap_elem.phy_cap_info[7] &=
index b3c25acd3691bdd86ed9a14dfbc83ab06aad7134..cb8149874fcbfbc98bf66fc0e098a67333478ade 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /*
- * Copyright (C) 2005-2014, 2018-2021, 2023 Intel Corporation
+ * Copyright (C) 2005-2014, 2018-2021, 2023, 2025 Intel Corporation
  * Copyright (C) 2015 Intel Mobile Communications GmbH
  */
 #include <linux/types.h>
@@ -53,7 +53,8 @@ void iwl_init_ht_hw_capab(struct iwl_trans *trans,
 
        if (!(data->sku_cap_11n_enable) ||
            (iwlwifi_mod_params.disable_11n & IWL_DISABLE_HT_ALL) ||
-           !cfg->ht_params) {
+           /* there are no devices with HT but without HT40 entirely */
+           !cfg->ht_params.ht40_bands) {
                ht_info->ht_supported = false;
                return;
        }
@@ -64,14 +65,14 @@ void iwl_init_ht_hw_capab(struct iwl_trans *trans,
        ht_info->ht_supported = true;
        ht_info->cap = IEEE80211_HT_CAP_DSSSCCK40;
 
-       if (cfg->ht_params->stbc) {
+       if (cfg->ht_params.stbc) {
                ht_info->cap |= (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT);
 
                if (tx_chains > 1)
                        ht_info->cap |= IEEE80211_HT_CAP_TX_STBC;
        }
 
-       if (cfg->ht_params->ldpc)
+       if (cfg->ht_params.ldpc)
                ht_info->cap |= IEEE80211_HT_CAP_LDPC_CODING;
 
        if (trans->trans_cfg->mq_rx_supported ||
@@ -90,13 +91,13 @@ void iwl_init_ht_hw_capab(struct iwl_trans *trans,
        if (rx_chains >= 3)
                ht_info->mcs.rx_mask[2] = 0xFF;
 
-       if (cfg->ht_params->ht_greenfield_support)
+       if (cfg->ht_params.ht_greenfield_support)
                ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD;
        ht_info->cap |= IEEE80211_HT_CAP_SGI_20;
 
        max_bit_rate = MAX_BIT_RATE_20_MHZ;
 
-       if (cfg->ht_params->ht40_bands & BIT(band)) {
+       if (cfg->ht_params.ht40_bands & BIT(band)) {
                ht_info->cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40;
                ht_info->cap |= IEEE80211_HT_CAP_SGI_40;
                max_bit_rate = MAX_BIT_RATE_40_MHZ;
index a4679627a02757cc9104fa24134b7ee9923d4a8a..a9ca92c0455ebbf774a49eab26a08fab32224671 100644 (file)
@@ -44,7 +44,7 @@ iwl_mld_get_tlc_cmd_flags(struct iwl_mld *mld,
        u16 flags = 0;
 
        /* STBC flags */
-       if (mld->cfg->ht_params->stbc &&
+       if (mld->cfg->ht_params.stbc &&
            (hweight8(iwl_mld_get_valid_tx_ant(mld)) > 1)) {
                if (he_cap->has_he && he_cap->he_cap_elem.phy_cap_info[2] &
                                      IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ)
@@ -56,7 +56,7 @@ iwl_mld_get_tlc_cmd_flags(struct iwl_mld *mld,
        }
 
        /* LDPC */
-       if (mld->cfg->ht_params->ldpc &&
+       if (mld->cfg->ht_params.ldpc &&
            ((ht_cap->cap & IEEE80211_HT_CAP_LDPC_CODING) ||
             (has_vht && (vht_cap->cap & IEEE80211_VHT_CAP_RXLDPC))))
                flags |= IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK;
index 0360509b0827e7f285c1df3f84dfb8f0f24f10a2..89ac4c6b3e543d8566c112acfa7554ef3ac0d004 100644 (file)
@@ -72,7 +72,7 @@ static u16 rs_fw_get_config_flags(struct iwl_mvm *mvm,
        u16 flags = 0;
 
        /* get STBC flags */
-       if (mvm->cfg->ht_params->stbc &&
+       if (mvm->cfg->ht_params.stbc &&
            (num_of_ant(iwl_mvm_get_valid_tx_ant(mvm)) > 1)) {
                if (he_cap->has_he && he_cap->he_cap_elem.phy_cap_info[2] &
                                      IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ)
@@ -83,7 +83,7 @@ static u16 rs_fw_get_config_flags(struct iwl_mvm *mvm,
                        flags |= IWL_TLC_MNG_CFG_FLAGS_STBC_MSK;
        }
 
-       if (mvm->cfg->ht_params->ldpc &&
+       if (mvm->cfg->ht_params.ldpc &&
            ((ht_cap->cap & IEEE80211_HT_CAP_LDPC_CODING) ||
             (vht_ena && (vht_cap->cap & IEEE80211_VHT_CAP_RXLDPC))))
                flags |= IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK;
index 5543d0568f4f1109fb9bd3b3606757e2d62ad886..a9ff3e592a0cc21407f3f34bd0604daea1e17c89 100644 (file)
@@ -2820,11 +2820,11 @@ static void rs_ht_init(struct iwl_mvm *mvm,
        lq_sta->active_mimo2_rate &= ~((u16)0x2);
        lq_sta->active_mimo2_rate <<= IWL_FIRST_OFDM_RATE;
 
-       if (mvm->cfg->ht_params->ldpc &&
+       if (mvm->cfg->ht_params.ldpc &&
            (ht_cap->cap & IEEE80211_HT_CAP_LDPC_CODING))
                lq_sta->ldpc = true;
 
-       if (mvm->cfg->ht_params->stbc &&
+       if (mvm->cfg->ht_params.stbc &&
            (num_of_ant(iwl_mvm_get_valid_tx_ant(mvm)) > 1) &&
            (ht_cap->cap & IEEE80211_HT_CAP_RX_STBC))
                lq_sta->stbc_capable = true;
@@ -2839,11 +2839,11 @@ static void rs_vht_init(struct iwl_mvm *mvm,
 {
        rs_vht_set_enabled_rates(sta, vht_cap, lq_sta);
 
-       if (mvm->cfg->ht_params->ldpc &&
+       if (mvm->cfg->ht_params.ldpc &&
            (vht_cap->cap & IEEE80211_VHT_CAP_RXLDPC))
                lq_sta->ldpc = true;
 
-       if (mvm->cfg->ht_params->stbc &&
+       if (mvm->cfg->ht_params.stbc &&
            (num_of_ant(iwl_mvm_get_valid_tx_ant(mvm)) > 1) &&
            (vht_cap->cap & IEEE80211_VHT_CAP_RXSTBC_MASK))
                lq_sta->stbc_capable = true;