Skip to content

Commit 79b6c8f

Browse files
committed
iwlwifi: separate elements from cfg that are needed by trans_alloc
In order to be able to select the cfg depending on the HW revision or on the RF ID, we need to set up the trans before selecting the cfg. To do so, move the elements from cfg that are needed by iwl_trans_alloc() to a separate struct at the top of the cfg, so it can be used by other cfg types as well, before selecting the rest of the configuration. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
1 parent cd6de83 commit 79b6c8f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+407
-365
lines changed

drivers/net/wireless/intel/iwlwifi/cfg/1000.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/******************************************************************************
33
*
44
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
5-
* Copyright(c) 2018 Intel Corporation
5+
* Copyright(c) 2018 - 2019 Intel Corporation
66
*
77
* Contact Information:
88
* Intel Linux Wireless <linuxwifi@intel.com>
@@ -69,16 +69,16 @@ static const struct iwl_eeprom_params iwl1000_eeprom_params = {
6969
.fw_name_pre = IWL1000_FW_PRE, \
7070
.ucode_api_max = IWL1000_UCODE_API_MAX, \
7171
.ucode_api_min = IWL1000_UCODE_API_MIN, \
72-
.device_family = IWL_DEVICE_FAMILY_1000, \
72+
.trans.device_family = IWL_DEVICE_FAMILY_1000, \
7373
.max_inst_size = IWLAGN_RTC_INST_SIZE, \
7474
.max_data_size = IWLAGN_RTC_DATA_SIZE, \
7575
.nvm_ver = EEPROM_1000_EEPROM_VERSION, \
7676
.nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \
77-
.base_params = &iwl1000_base_params, \
77+
.trans.base_params = &iwl1000_base_params, \
7878
.eeprom_params = &iwl1000_eeprom_params, \
7979
.led_mode = IWL_LED_BLINK, \
8080
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
81-
.csr = &iwl_csr_v1
81+
.trans.csr = &iwl_csr_v1
8282

8383
const struct iwl_cfg iwl1000_bgn_cfg = {
8484
.name = "Intel(R) Centrino(R) Wireless-N 1000 BGN",
@@ -95,17 +95,17 @@ const struct iwl_cfg iwl1000_bg_cfg = {
9595
.fw_name_pre = IWL100_FW_PRE, \
9696
.ucode_api_max = IWL100_UCODE_API_MAX, \
9797
.ucode_api_min = IWL100_UCODE_API_MIN, \
98-
.device_family = IWL_DEVICE_FAMILY_100, \
98+
.trans.device_family = IWL_DEVICE_FAMILY_100, \
9999
.max_inst_size = IWLAGN_RTC_INST_SIZE, \
100100
.max_data_size = IWLAGN_RTC_DATA_SIZE, \
101101
.nvm_ver = EEPROM_1000_EEPROM_VERSION, \
102102
.nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \
103-
.base_params = &iwl1000_base_params, \
103+
.trans.base_params = &iwl1000_base_params, \
104104
.eeprom_params = &iwl1000_eeprom_params, \
105105
.led_mode = IWL_LED_RF_STATE, \
106106
.rx_with_siso_diversity = true, \
107107
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
108-
.csr = &iwl_csr_v1
108+
.trans.csr = &iwl_csr_v1
109109

110110
const struct iwl_cfg iwl100_bgn_cfg = {
111111
.name = "Intel(R) Centrino(R) Wireless-N 100 BGN",

drivers/net/wireless/intel/iwlwifi/cfg/2000.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/******************************************************************************
33
*
44
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
5-
* Copyright(c) 2018 Intel Corporation
5+
* Copyright(c) 2018 - 2019 Intel Corporation
66
*
77
* Contact Information:
88
* Intel Linux Wireless <linuxwifi@intel.com>
@@ -95,16 +95,16 @@ static const struct iwl_eeprom_params iwl20x0_eeprom_params = {
9595
.fw_name_pre = IWL2000_FW_PRE, \
9696
.ucode_api_max = IWL2000_UCODE_API_MAX, \
9797
.ucode_api_min = IWL2000_UCODE_API_MIN, \
98-
.device_family = IWL_DEVICE_FAMILY_2000, \
98+
.trans.device_family = IWL_DEVICE_FAMILY_2000, \
9999
.max_inst_size = IWL60_RTC_INST_SIZE, \
100100
.max_data_size = IWL60_RTC_DATA_SIZE, \
101101
.nvm_ver = EEPROM_2000_EEPROM_VERSION, \
102102
.nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
103-
.base_params = &iwl2000_base_params, \
103+
.trans.base_params = &iwl2000_base_params, \
104104
.eeprom_params = &iwl20x0_eeprom_params, \
105105
.led_mode = IWL_LED_RF_STATE, \
106106
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
107-
.csr = &iwl_csr_v1
107+
.trans.csr = &iwl_csr_v1
108108

109109

110110
const struct iwl_cfg iwl2000_2bgn_cfg = {
@@ -123,16 +123,16 @@ const struct iwl_cfg iwl2000_2bgn_d_cfg = {
123123
.fw_name_pre = IWL2030_FW_PRE, \
124124
.ucode_api_max = IWL2030_UCODE_API_MAX, \
125125
.ucode_api_min = IWL2030_UCODE_API_MIN, \
126-
.device_family = IWL_DEVICE_FAMILY_2030, \
126+
.trans.device_family = IWL_DEVICE_FAMILY_2030, \
127127
.max_inst_size = IWL60_RTC_INST_SIZE, \
128128
.max_data_size = IWL60_RTC_DATA_SIZE, \
129129
.nvm_ver = EEPROM_2000_EEPROM_VERSION, \
130130
.nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
131-
.base_params = &iwl2030_base_params, \
131+
.trans.base_params = &iwl2030_base_params, \
132132
.eeprom_params = &iwl20x0_eeprom_params, \
133133
.led_mode = IWL_LED_RF_STATE, \
134134
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
135-
.csr = &iwl_csr_v1
135+
.trans.csr = &iwl_csr_v1
136136

137137
const struct iwl_cfg iwl2030_2bgn_cfg = {
138138
.name = "Intel(R) Centrino(R) Wireless-N 2230 BGN",
@@ -144,17 +144,17 @@ const struct iwl_cfg iwl2030_2bgn_cfg = {
144144
.fw_name_pre = IWL105_FW_PRE, \
145145
.ucode_api_max = IWL105_UCODE_API_MAX, \
146146
.ucode_api_min = IWL105_UCODE_API_MIN, \
147-
.device_family = IWL_DEVICE_FAMILY_105, \
147+
.trans.device_family = IWL_DEVICE_FAMILY_105, \
148148
.max_inst_size = IWL60_RTC_INST_SIZE, \
149149
.max_data_size = IWL60_RTC_DATA_SIZE, \
150150
.nvm_ver = EEPROM_2000_EEPROM_VERSION, \
151151
.nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
152-
.base_params = &iwl2000_base_params, \
152+
.trans.base_params = &iwl2000_base_params, \
153153
.eeprom_params = &iwl20x0_eeprom_params, \
154154
.led_mode = IWL_LED_RF_STATE, \
155155
.rx_with_siso_diversity = true, \
156156
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
157-
.csr = &iwl_csr_v1
157+
.trans.csr = &iwl_csr_v1
158158

159159
const struct iwl_cfg iwl105_bgn_cfg = {
160160
.name = "Intel(R) Centrino(R) Wireless-N 105 BGN",
@@ -172,17 +172,17 @@ const struct iwl_cfg iwl105_bgn_d_cfg = {
172172
.fw_name_pre = IWL135_FW_PRE, \
173173
.ucode_api_max = IWL135_UCODE_API_MAX, \
174174
.ucode_api_min = IWL135_UCODE_API_MIN, \
175-
.device_family = IWL_DEVICE_FAMILY_135, \
175+
.trans.device_family = IWL_DEVICE_FAMILY_135, \
176176
.max_inst_size = IWL60_RTC_INST_SIZE, \
177177
.max_data_size = IWL60_RTC_DATA_SIZE, \
178178
.nvm_ver = EEPROM_2000_EEPROM_VERSION, \
179179
.nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
180-
.base_params = &iwl2030_base_params, \
180+
.trans.base_params = &iwl2030_base_params, \
181181
.eeprom_params = &iwl20x0_eeprom_params, \
182182
.led_mode = IWL_LED_RF_STATE, \
183183
.rx_with_siso_diversity = true, \
184184
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
185-
.csr = &iwl_csr_v1
185+
.trans.csr = &iwl_csr_v1
186186

187187
const struct iwl_cfg iwl135_bgn_cfg = {
188188
.name = "Intel(R) Centrino(R) Wireless-N 135 BGN",

drivers/net/wireless/intel/iwlwifi/cfg/22000.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,15 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
169169
.smem_len = IWL_22000_SMEM_LEN, \
170170
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
171171
.apmg_not_supported = true, \
172-
.mq_rx_supported = true, \
172+
.trans.mq_rx_supported = true, \
173173
.vht_mu_mimo_supported = true, \
174174
.mac_addr_from_csr = true, \
175175
.ht_params = &iwl_22000_ht_params, \
176176
.nvm_ver = IWL_22000_NVM_VERSION, \
177177
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
178-
.use_tfh = true, \
179-
.rf_id = true, \
180-
.gen2 = true, \
178+
.trans.use_tfh = true, \
179+
.trans.rf_id = true, \
180+
.trans.gen2 = true, \
181181
.nvm_type = IWL_NVM_EXT, \
182182
.dbgc_supported = true, \
183183
.min_umac_error_event_table = 0x400000, \
@@ -190,23 +190,23 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
190190

191191
#define IWL_DEVICE_22500 \
192192
IWL_DEVICE_22000_COMMON, \
193-
.device_family = IWL_DEVICE_FAMILY_22000, \
194-
.base_params = &iwl_22000_base_params, \
195-
.csr = &iwl_csr_v1, \
193+
.trans.device_family = IWL_DEVICE_FAMILY_22000, \
194+
.trans.base_params = &iwl_22000_base_params, \
195+
.trans.csr = &iwl_csr_v1, \
196196
.gp2_reg_addr = 0xa02c68
197197

198198
#define IWL_DEVICE_22560 \
199199
IWL_DEVICE_22000_COMMON, \
200-
.device_family = IWL_DEVICE_FAMILY_22560, \
201-
.base_params = &iwl_22560_base_params, \
202-
.csr = &iwl_csr_v2
200+
.trans.device_family = IWL_DEVICE_FAMILY_22560, \
201+
.trans.base_params = &iwl_22560_base_params, \
202+
.trans.csr = &iwl_csr_v2
203203

204204
#define IWL_DEVICE_AX210 \
205205
IWL_DEVICE_22000_COMMON, \
206-
.umac_prph_offset = 0x300000, \
207-
.device_family = IWL_DEVICE_FAMILY_AX210, \
208-
.base_params = &iwl_22560_base_params, \
209-
.csr = &iwl_csr_v1, \
206+
.trans.umac_prph_offset = 0x300000, \
207+
.trans.device_family = IWL_DEVICE_FAMILY_AX210, \
208+
.trans.base_params = &iwl_22560_base_params, \
209+
.trans.csr = &iwl_csr_v1, \
210210
.min_txq_size = 128, \
211211
.gp2_reg_addr = 0xd02c68, \
212212
.min_256_ba_txq_size = 512
@@ -336,7 +336,7 @@ const struct iwl_cfg iwl_ax200_cfg_cc = {
336336
* HT size; mac80211 would otherwise pick the HE max (256) by default.
337337
*/
338338
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
339-
.bisr_workaround = 1,
339+
.trans.bisr_workaround = 1,
340340
};
341341

342342
const struct iwl_cfg killer1650x_2ax_cfg = {
@@ -349,7 +349,7 @@ const struct iwl_cfg killer1650x_2ax_cfg = {
349349
* HT size; mac80211 would otherwise pick the HE max (256) by default.
350350
*/
351351
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
352-
.bisr_workaround = 1,
352+
.trans.bisr_workaround = 1,
353353
};
354354

355355
const struct iwl_cfg killer1650w_2ax_cfg = {
@@ -362,7 +362,7 @@ const struct iwl_cfg killer1650w_2ax_cfg = {
362362
* HT size; mac80211 would otherwise pick the HE max (256) by default.
363363
*/
364364
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
365-
.bisr_workaround = 1,
365+
.trans.bisr_workaround = 1,
366366
};
367367

368368
/*

drivers/net/wireless/intel/iwlwifi/cfg/5000.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,16 @@ static const struct iwl_eeprom_params iwl5000_eeprom_params = {
6767
.fw_name_pre = IWL5000_FW_PRE, \
6868
.ucode_api_max = IWL5000_UCODE_API_MAX, \
6969
.ucode_api_min = IWL5000_UCODE_API_MIN, \
70-
.device_family = IWL_DEVICE_FAMILY_5000, \
70+
.trans.device_family = IWL_DEVICE_FAMILY_5000, \
7171
.max_inst_size = IWLAGN_RTC_INST_SIZE, \
7272
.max_data_size = IWLAGN_RTC_DATA_SIZE, \
7373
.nvm_ver = EEPROM_5000_EEPROM_VERSION, \
7474
.nvm_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
75-
.base_params = &iwl5000_base_params, \
75+
.trans.base_params = &iwl5000_base_params, \
7676
.eeprom_params = &iwl5000_eeprom_params, \
7777
.led_mode = IWL_LED_BLINK, \
7878
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
79-
.csr = &iwl_csr_v1
79+
.trans.csr = &iwl_csr_v1
8080

8181
const struct iwl_cfg iwl5300_agn_cfg = {
8282
.name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
@@ -115,34 +115,34 @@ const struct iwl_cfg iwl5350_agn_cfg = {
115115
.fw_name_pre = IWL5000_FW_PRE,
116116
.ucode_api_max = IWL5000_UCODE_API_MAX,
117117
.ucode_api_min = IWL5000_UCODE_API_MIN,
118-
.device_family = IWL_DEVICE_FAMILY_5000,
118+
.trans.device_family = IWL_DEVICE_FAMILY_5000,
119119
.max_inst_size = IWLAGN_RTC_INST_SIZE,
120120
.max_data_size = IWLAGN_RTC_DATA_SIZE,
121121
.nvm_ver = EEPROM_5050_EEPROM_VERSION,
122122
.nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION,
123-
.base_params = &iwl5000_base_params,
123+
.trans.base_params = &iwl5000_base_params,
124124
.eeprom_params = &iwl5000_eeprom_params,
125125
.ht_params = &iwl5000_ht_params,
126126
.led_mode = IWL_LED_BLINK,
127127
.internal_wimax_coex = true,
128-
.csr = &iwl_csr_v1,
128+
.trans.csr = &iwl_csr_v1,
129129
};
130130

131131
#define IWL_DEVICE_5150 \
132132
.fw_name_pre = IWL5150_FW_PRE, \
133133
.ucode_api_max = IWL5150_UCODE_API_MAX, \
134134
.ucode_api_min = IWL5150_UCODE_API_MIN, \
135-
.device_family = IWL_DEVICE_FAMILY_5150, \
135+
.trans.device_family = IWL_DEVICE_FAMILY_5150, \
136136
.max_inst_size = IWLAGN_RTC_INST_SIZE, \
137137
.max_data_size = IWLAGN_RTC_DATA_SIZE, \
138138
.nvm_ver = EEPROM_5050_EEPROM_VERSION, \
139139
.nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
140-
.base_params = &iwl5000_base_params, \
140+
.trans.base_params = &iwl5000_base_params, \
141141
.eeprom_params = &iwl5000_eeprom_params, \
142142
.led_mode = IWL_LED_BLINK, \
143143
.internal_wimax_coex = true, \
144144
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
145-
.csr = &iwl_csr_v1
145+
.trans.csr = &iwl_csr_v1
146146

147147
const struct iwl_cfg iwl5150_agn_cfg = {
148148
.name = "Intel(R) WiMAX/WiFi Link 5150 AGN",

0 commit comments

Comments
 (0)