diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-12-11 16:03:03 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-12-11 16:03:03 -0500 |
commit | ecbbec2eb093d2ef205de371af986f0360fca539 (patch) | |
tree | 57ab3b0c684f957aee568230fadb32995e00da6b /drivers/net/wireless/iwlwifi/pcie | |
parent | 36b07d15a656b657beaf9e6357a341768192fad2 (diff) | |
parent | 25a172655f837bdb032e451f95441bb4acec51bb (diff) |
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
Diffstat (limited to 'drivers/net/wireless/iwlwifi/pcie')
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/1000.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/2000.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/5000.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/6000.c | 28 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/drv.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/rx.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/trans.c | 18 |
7 files changed, 69 insertions, 38 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/1000.c b/drivers/net/wireless/iwlwifi/pcie/1000.c index 81b83f484f08..f8620ecae6b4 100644 --- a/drivers/net/wireless/iwlwifi/pcie/1000.c +++ b/drivers/net/wireless/iwlwifi/pcie/1000.c | |||
@@ -94,8 +94,8 @@ static const struct iwl_eeprom_params iwl1000_eeprom_params = { | |||
94 | .device_family = IWL_DEVICE_FAMILY_1000, \ | 94 | .device_family = IWL_DEVICE_FAMILY_1000, \ |
95 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ | 95 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
96 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ | 96 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ |
97 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, \ | 97 | .nvm_ver = EEPROM_1000_EEPROM_VERSION, \ |
98 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ | 98 | .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ |
99 | .base_params = &iwl1000_base_params, \ | 99 | .base_params = &iwl1000_base_params, \ |
100 | .eeprom_params = &iwl1000_eeprom_params, \ | 100 | .eeprom_params = &iwl1000_eeprom_params, \ |
101 | .led_mode = IWL_LED_BLINK | 101 | .led_mode = IWL_LED_BLINK |
@@ -119,8 +119,8 @@ const struct iwl_cfg iwl1000_bg_cfg = { | |||
119 | .device_family = IWL_DEVICE_FAMILY_100, \ | 119 | .device_family = IWL_DEVICE_FAMILY_100, \ |
120 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ | 120 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
121 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ | 121 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ |
122 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, \ | 122 | .nvm_ver = EEPROM_1000_EEPROM_VERSION, \ |
123 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ | 123 | .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ |
124 | .base_params = &iwl1000_base_params, \ | 124 | .base_params = &iwl1000_base_params, \ |
125 | .eeprom_params = &iwl1000_eeprom_params, \ | 125 | .eeprom_params = &iwl1000_eeprom_params, \ |
126 | .led_mode = IWL_LED_RF_STATE, \ | 126 | .led_mode = IWL_LED_RF_STATE, \ |
diff --git a/drivers/net/wireless/iwlwifi/pcie/2000.c b/drivers/net/wireless/iwlwifi/pcie/2000.c index 9fbde32f7559..244019cec3e1 100644 --- a/drivers/net/wireless/iwlwifi/pcie/2000.c +++ b/drivers/net/wireless/iwlwifi/pcie/2000.c | |||
@@ -138,8 +138,8 @@ static const struct iwl_eeprom_params iwl20x0_eeprom_params = { | |||
138 | .device_family = IWL_DEVICE_FAMILY_2000, \ | 138 | .device_family = IWL_DEVICE_FAMILY_2000, \ |
139 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | 139 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
140 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 140 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
141 | .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ | 141 | .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ |
142 | .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | 142 | .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ |
143 | .base_params = &iwl2000_base_params, \ | 143 | .base_params = &iwl2000_base_params, \ |
144 | .eeprom_params = &iwl20x0_eeprom_params, \ | 144 | .eeprom_params = &iwl20x0_eeprom_params, \ |
145 | .need_temp_offset_calib = true, \ | 145 | .need_temp_offset_calib = true, \ |
@@ -166,8 +166,8 @@ const struct iwl_cfg iwl2000_2bgn_d_cfg = { | |||
166 | .device_family = IWL_DEVICE_FAMILY_2030, \ | 166 | .device_family = IWL_DEVICE_FAMILY_2030, \ |
167 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | 167 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
168 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 168 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
169 | .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ | 169 | .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ |
170 | .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | 170 | .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ |
171 | .base_params = &iwl2030_base_params, \ | 171 | .base_params = &iwl2030_base_params, \ |
172 | .bt_params = &iwl2030_bt_params, \ | 172 | .bt_params = &iwl2030_bt_params, \ |
173 | .eeprom_params = &iwl20x0_eeprom_params, \ | 173 | .eeprom_params = &iwl20x0_eeprom_params, \ |
@@ -190,8 +190,8 @@ const struct iwl_cfg iwl2030_2bgn_cfg = { | |||
190 | .device_family = IWL_DEVICE_FAMILY_105, \ | 190 | .device_family = IWL_DEVICE_FAMILY_105, \ |
191 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | 191 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
192 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 192 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
193 | .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ | 193 | .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ |
194 | .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | 194 | .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ |
195 | .base_params = &iwl2000_base_params, \ | 195 | .base_params = &iwl2000_base_params, \ |
196 | .eeprom_params = &iwl20x0_eeprom_params, \ | 196 | .eeprom_params = &iwl20x0_eeprom_params, \ |
197 | .need_temp_offset_calib = true, \ | 197 | .need_temp_offset_calib = true, \ |
@@ -220,8 +220,8 @@ const struct iwl_cfg iwl105_bgn_d_cfg = { | |||
220 | .device_family = IWL_DEVICE_FAMILY_135, \ | 220 | .device_family = IWL_DEVICE_FAMILY_135, \ |
221 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | 221 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
222 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 222 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
223 | .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ | 223 | .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ |
224 | .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | 224 | .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ |
225 | .base_params = &iwl2030_base_params, \ | 225 | .base_params = &iwl2030_base_params, \ |
226 | .bt_params = &iwl2030_bt_params, \ | 226 | .bt_params = &iwl2030_bt_params, \ |
227 | .eeprom_params = &iwl20x0_eeprom_params, \ | 227 | .eeprom_params = &iwl20x0_eeprom_params, \ |
diff --git a/drivers/net/wireless/iwlwifi/pcie/5000.c b/drivers/net/wireless/iwlwifi/pcie/5000.c index d1665fa6d15a..83ca40321ff1 100644 --- a/drivers/net/wireless/iwlwifi/pcie/5000.c +++ b/drivers/net/wireless/iwlwifi/pcie/5000.c | |||
@@ -92,8 +92,8 @@ static const struct iwl_eeprom_params iwl5000_eeprom_params = { | |||
92 | .device_family = IWL_DEVICE_FAMILY_5000, \ | 92 | .device_family = IWL_DEVICE_FAMILY_5000, \ |
93 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ | 93 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
94 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ | 94 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ |
95 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, \ | 95 | .nvm_ver = EEPROM_5000_EEPROM_VERSION, \ |
96 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, \ | 96 | .nvm_calib_ver = EEPROM_5000_TX_POWER_VERSION, \ |
97 | .base_params = &iwl5000_base_params, \ | 97 | .base_params = &iwl5000_base_params, \ |
98 | .eeprom_params = &iwl5000_eeprom_params, \ | 98 | .eeprom_params = &iwl5000_eeprom_params, \ |
99 | .led_mode = IWL_LED_BLINK | 99 | .led_mode = IWL_LED_BLINK |
@@ -139,8 +139,8 @@ const struct iwl_cfg iwl5350_agn_cfg = { | |||
139 | .device_family = IWL_DEVICE_FAMILY_5000, | 139 | .device_family = IWL_DEVICE_FAMILY_5000, |
140 | .max_inst_size = IWLAGN_RTC_INST_SIZE, | 140 | .max_inst_size = IWLAGN_RTC_INST_SIZE, |
141 | .max_data_size = IWLAGN_RTC_DATA_SIZE, | 141 | .max_data_size = IWLAGN_RTC_DATA_SIZE, |
142 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, | 142 | .nvm_ver = EEPROM_5050_EEPROM_VERSION, |
143 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, | 143 | .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, |
144 | .base_params = &iwl5000_base_params, | 144 | .base_params = &iwl5000_base_params, |
145 | .eeprom_params = &iwl5000_eeprom_params, | 145 | .eeprom_params = &iwl5000_eeprom_params, |
146 | .ht_params = &iwl5000_ht_params, | 146 | .ht_params = &iwl5000_ht_params, |
@@ -156,8 +156,8 @@ const struct iwl_cfg iwl5350_agn_cfg = { | |||
156 | .device_family = IWL_DEVICE_FAMILY_5150, \ | 156 | .device_family = IWL_DEVICE_FAMILY_5150, \ |
157 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ | 157 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
158 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ | 158 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ |
159 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, \ | 159 | .nvm_ver = EEPROM_5050_EEPROM_VERSION, \ |
160 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, \ | 160 | .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, \ |
161 | .base_params = &iwl5000_base_params, \ | 161 | .base_params = &iwl5000_base_params, \ |
162 | .eeprom_params = &iwl5000_eeprom_params, \ | 162 | .eeprom_params = &iwl5000_eeprom_params, \ |
163 | .no_xtal_calib = true, \ | 163 | .no_xtal_calib = true, \ |
diff --git a/drivers/net/wireless/iwlwifi/pcie/6000.c b/drivers/net/wireless/iwlwifi/pcie/6000.c index 4a57624afc40..d4df976d4709 100644 --- a/drivers/net/wireless/iwlwifi/pcie/6000.c +++ b/drivers/net/wireless/iwlwifi/pcie/6000.c | |||
@@ -160,8 +160,8 @@ static const struct iwl_eeprom_params iwl6000_eeprom_params = { | |||
160 | .device_family = IWL_DEVICE_FAMILY_6005, \ | 160 | .device_family = IWL_DEVICE_FAMILY_6005, \ |
161 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | 161 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
162 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 162 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
163 | .eeprom_ver = EEPROM_6005_EEPROM_VERSION, \ | 163 | .nvm_ver = EEPROM_6005_EEPROM_VERSION, \ |
164 | .eeprom_calib_ver = EEPROM_6005_TX_POWER_VERSION, \ | 164 | .nvm_calib_ver = EEPROM_6005_TX_POWER_VERSION, \ |
165 | .base_params = &iwl6000_g2_base_params, \ | 165 | .base_params = &iwl6000_g2_base_params, \ |
166 | .eeprom_params = &iwl6000_eeprom_params, \ | 166 | .eeprom_params = &iwl6000_eeprom_params, \ |
167 | .need_temp_offset_calib = true, \ | 167 | .need_temp_offset_calib = true, \ |
@@ -215,8 +215,8 @@ const struct iwl_cfg iwl6005_2agn_mow2_cfg = { | |||
215 | .device_family = IWL_DEVICE_FAMILY_6030, \ | 215 | .device_family = IWL_DEVICE_FAMILY_6030, \ |
216 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | 216 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
217 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 217 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
218 | .eeprom_ver = EEPROM_6030_EEPROM_VERSION, \ | 218 | .nvm_ver = EEPROM_6030_EEPROM_VERSION, \ |
219 | .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \ | 219 | .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \ |
220 | .base_params = &iwl6000_g2_base_params, \ | 220 | .base_params = &iwl6000_g2_base_params, \ |
221 | .bt_params = &iwl6000_bt_params, \ | 221 | .bt_params = &iwl6000_bt_params, \ |
222 | .eeprom_params = &iwl6000_eeprom_params, \ | 222 | .eeprom_params = &iwl6000_eeprom_params, \ |
@@ -254,8 +254,8 @@ const struct iwl_cfg iwl6030_2bg_cfg = { | |||
254 | .device_family = IWL_DEVICE_FAMILY_6030, \ | 254 | .device_family = IWL_DEVICE_FAMILY_6030, \ |
255 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | 255 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
256 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 256 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
257 | .eeprom_ver = EEPROM_6030_EEPROM_VERSION, \ | 257 | .nvm_ver = EEPROM_6030_EEPROM_VERSION, \ |
258 | .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \ | 258 | .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \ |
259 | .base_params = &iwl6000_g2_base_params, \ | 259 | .base_params = &iwl6000_g2_base_params, \ |
260 | .bt_params = &iwl6000_bt_params, \ | 260 | .bt_params = &iwl6000_bt_params, \ |
261 | .eeprom_params = &iwl6000_eeprom_params, \ | 261 | .eeprom_params = &iwl6000_eeprom_params, \ |
@@ -306,8 +306,8 @@ const struct iwl_cfg iwl130_bg_cfg = { | |||
306 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 306 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
307 | .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \ | 307 | .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \ |
308 | .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \ | 308 | .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \ |
309 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, \ | 309 | .nvm_ver = EEPROM_6000_EEPROM_VERSION, \ |
310 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, \ | 310 | .nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION, \ |
311 | .base_params = &iwl6000_base_params, \ | 311 | .base_params = &iwl6000_base_params, \ |
312 | .eeprom_params = &iwl6000_eeprom_params, \ | 312 | .eeprom_params = &iwl6000_eeprom_params, \ |
313 | .led_mode = IWL_LED_BLINK | 313 | .led_mode = IWL_LED_BLINK |
@@ -337,8 +337,8 @@ const struct iwl_cfg iwl6000i_2bg_cfg = { | |||
337 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 337 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
338 | .valid_tx_ant = ANT_AB, /* .cfg overwrite */ \ | 338 | .valid_tx_ant = ANT_AB, /* .cfg overwrite */ \ |
339 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ \ | 339 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ \ |
340 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, \ | 340 | .nvm_ver = EEPROM_6050_EEPROM_VERSION, \ |
341 | .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, \ | 341 | .nvm_calib_ver = EEPROM_6050_TX_POWER_VERSION, \ |
342 | .base_params = &iwl6050_base_params, \ | 342 | .base_params = &iwl6050_base_params, \ |
343 | .eeprom_params = &iwl6000_eeprom_params, \ | 343 | .eeprom_params = &iwl6000_eeprom_params, \ |
344 | .led_mode = IWL_LED_BLINK, \ | 344 | .led_mode = IWL_LED_BLINK, \ |
@@ -362,8 +362,8 @@ const struct iwl_cfg iwl6050_2abg_cfg = { | |||
362 | .device_family = IWL_DEVICE_FAMILY_6150, \ | 362 | .device_family = IWL_DEVICE_FAMILY_6150, \ |
363 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | 363 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
364 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 364 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
365 | .eeprom_ver = EEPROM_6150_EEPROM_VERSION, \ | 365 | .nvm_ver = EEPROM_6150_EEPROM_VERSION, \ |
366 | .eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION, \ | 366 | .nvm_calib_ver = EEPROM_6150_TX_POWER_VERSION, \ |
367 | .base_params = &iwl6050_base_params, \ | 367 | .base_params = &iwl6050_base_params, \ |
368 | .eeprom_params = &iwl6000_eeprom_params, \ | 368 | .eeprom_params = &iwl6000_eeprom_params, \ |
369 | .led_mode = IWL_LED_BLINK, \ | 369 | .led_mode = IWL_LED_BLINK, \ |
@@ -389,8 +389,8 @@ const struct iwl_cfg iwl6000_3agn_cfg = { | |||
389 | .device_family = IWL_DEVICE_FAMILY_6000, | 389 | .device_family = IWL_DEVICE_FAMILY_6000, |
390 | .max_inst_size = IWL60_RTC_INST_SIZE, | 390 | .max_inst_size = IWL60_RTC_INST_SIZE, |
391 | .max_data_size = IWL60_RTC_DATA_SIZE, | 391 | .max_data_size = IWL60_RTC_DATA_SIZE, |
392 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | 392 | .nvm_ver = EEPROM_6000_EEPROM_VERSION, |
393 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, | 393 | .nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
394 | .base_params = &iwl6000_base_params, | 394 | .base_params = &iwl6000_base_params, |
395 | .eeprom_params = &iwl6000_eeprom_params, | 395 | .eeprom_params = &iwl6000_eeprom_params, |
396 | .ht_params = &iwl6000_ht_params, | 396 | .ht_params = &iwl6000_ht_params, |
diff --git a/drivers/net/wireless/iwlwifi/pcie/drv.c b/drivers/net/wireless/iwlwifi/pcie/drv.c index 2b7e8a0b1cd4..c2e141af353c 100644 --- a/drivers/net/wireless/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/iwlwifi/pcie/drv.c | |||
@@ -267,6 +267,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
267 | const struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data); | 267 | const struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data); |
268 | struct iwl_trans *iwl_trans; | 268 | struct iwl_trans *iwl_trans; |
269 | struct iwl_trans_pcie *trans_pcie; | 269 | struct iwl_trans_pcie *trans_pcie; |
270 | int ret; | ||
270 | 271 | ||
271 | iwl_trans = iwl_trans_pcie_alloc(pdev, ent, cfg); | 272 | iwl_trans = iwl_trans_pcie_alloc(pdev, ent, cfg); |
272 | if (iwl_trans == NULL) | 273 | if (iwl_trans == NULL) |
@@ -276,11 +277,15 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
276 | 277 | ||
277 | trans_pcie = IWL_TRANS_GET_PCIE_TRANS(iwl_trans); | 278 | trans_pcie = IWL_TRANS_GET_PCIE_TRANS(iwl_trans); |
278 | trans_pcie->drv = iwl_drv_start(iwl_trans, cfg); | 279 | trans_pcie->drv = iwl_drv_start(iwl_trans, cfg); |
279 | if (!trans_pcie->drv) | 280 | |
281 | if (IS_ERR_OR_NULL(trans_pcie->drv)) { | ||
282 | ret = PTR_ERR(trans_pcie->drv); | ||
280 | goto out_free_trans; | 283 | goto out_free_trans; |
284 | } | ||
281 | 285 | ||
282 | /* register transport layer debugfs here */ | 286 | /* register transport layer debugfs here */ |
283 | if (iwl_trans_dbgfs_register(iwl_trans, iwl_trans->dbgfs_dir)) | 287 | ret = iwl_trans_dbgfs_register(iwl_trans, iwl_trans->dbgfs_dir); |
288 | if (ret) | ||
284 | goto out_free_drv; | 289 | goto out_free_drv; |
285 | 290 | ||
286 | return 0; | 291 | return 0; |
@@ -290,7 +295,7 @@ out_free_drv: | |||
290 | out_free_trans: | 295 | out_free_trans: |
291 | iwl_trans_pcie_free(iwl_trans); | 296 | iwl_trans_pcie_free(iwl_trans); |
292 | pci_set_drvdata(pdev, NULL); | 297 | pci_set_drvdata(pdev, NULL); |
293 | return -EFAULT; | 298 | return ret; |
294 | } | 299 | } |
295 | 300 | ||
296 | static void iwl_pci_remove(struct pci_dev *pdev) | 301 | static void iwl_pci_remove(struct pci_dev *pdev) |
diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c index bb32510fdd62..dad4c4aad91f 100644 --- a/drivers/net/wireless/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/iwlwifi/pcie/rx.c | |||
@@ -717,7 +717,7 @@ static void iwl_pcie_rx_handle(struct iwl_trans *trans) | |||
717 | 717 | ||
718 | /* uCode's read index (stored in shared DRAM) indicates the last Rx | 718 | /* uCode's read index (stored in shared DRAM) indicates the last Rx |
719 | * buffer that the driver may process (last buffer filled by ucode). */ | 719 | * buffer that the driver may process (last buffer filled by ucode). */ |
720 | r = le16_to_cpu(rxq->rb_stts->closed_rb_num) & 0x0FFF; | 720 | r = le16_to_cpu(ACCESS_ONCE(rxq->rb_stts->closed_rb_num)) & 0x0FFF; |
721 | i = rxq->read; | 721 | i = rxq->read; |
722 | 722 | ||
723 | /* Rx interrupt, but nothing sent from uCode */ | 723 | /* Rx interrupt, but nothing sent from uCode */ |
@@ -1122,12 +1122,20 @@ static irqreturn_t iwl_pcie_isr(int irq, void *data) | |||
1122 | * back-to-back ISRs and sporadic interrupts from our NIC. | 1122 | * back-to-back ISRs and sporadic interrupts from our NIC. |
1123 | * If we have something to service, the tasklet will re-enable ints. | 1123 | * If we have something to service, the tasklet will re-enable ints. |
1124 | * If we *don't* have something, we'll re-enable before leaving here. */ | 1124 | * If we *don't* have something, we'll re-enable before leaving here. */ |
1125 | inta_mask = iwl_read32(trans, CSR_INT_MASK); /* just for debug */ | 1125 | inta_mask = iwl_read32(trans, CSR_INT_MASK); |
1126 | iwl_write32(trans, CSR_INT_MASK, 0x00000000); | 1126 | iwl_write32(trans, CSR_INT_MASK, 0x00000000); |
1127 | 1127 | ||
1128 | /* Discover which interrupts are active/pending */ | 1128 | /* Discover which interrupts are active/pending */ |
1129 | inta = iwl_read32(trans, CSR_INT); | 1129 | inta = iwl_read32(trans, CSR_INT); |
1130 | 1130 | ||
1131 | if (inta & (~inta_mask)) { | ||
1132 | IWL_DEBUG_ISR(trans, | ||
1133 | "We got a masked interrupt (0x%08x)...Ack and ignore\n", | ||
1134 | inta & (~inta_mask)); | ||
1135 | iwl_write32(trans, CSR_INT, inta & (~inta_mask)); | ||
1136 | inta &= inta_mask; | ||
1137 | } | ||
1138 | |||
1131 | /* Ignore interrupt if there's nothing in NIC to service. | 1139 | /* Ignore interrupt if there's nothing in NIC to service. |
1132 | * This may be due to IRQ shared with another device, | 1140 | * This may be due to IRQ shared with another device, |
1133 | * or due to sporadic interrupts thrown from our NIC. */ | 1141 | * or due to sporadic interrupts thrown from our NIC. */ |
@@ -1209,7 +1217,7 @@ irqreturn_t iwl_pcie_isr_ict(int irq, void *data) | |||
1209 | * If we have something to service, the tasklet will re-enable ints. | 1217 | * If we have something to service, the tasklet will re-enable ints. |
1210 | * If we *don't* have something, we'll re-enable before leaving here. | 1218 | * If we *don't* have something, we'll re-enable before leaving here. |
1211 | */ | 1219 | */ |
1212 | inta_mask = iwl_read32(trans, CSR_INT_MASK); /* just for debug */ | 1220 | inta_mask = iwl_read32(trans, CSR_INT_MASK); |
1213 | iwl_write32(trans, CSR_INT_MASK, 0x00000000); | 1221 | iwl_write32(trans, CSR_INT_MASK, 0x00000000); |
1214 | 1222 | ||
1215 | /* Ignore interrupt if there's nothing in NIC to service. | 1223 | /* Ignore interrupt if there's nothing in NIC to service. |
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index f6c21e7edaf2..d66cad4a7d6a 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c | |||
@@ -633,6 +633,8 @@ static void iwl_trans_pcie_stop_hw(struct iwl_trans *trans, | |||
633 | iwl_disable_interrupts(trans); | 633 | iwl_disable_interrupts(trans); |
634 | spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); | 634 | spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); |
635 | 635 | ||
636 | iwl_pcie_disable_ict(trans); | ||
637 | |||
636 | if (!op_mode_leaving) { | 638 | if (!op_mode_leaving) { |
637 | /* | 639 | /* |
638 | * Even if we stop the HW, we still want the RF kill | 640 | * Even if we stop the HW, we still want the RF kill |
@@ -666,6 +668,20 @@ static u32 iwl_trans_pcie_read32(struct iwl_trans *trans, u32 ofs) | |||
666 | return readl(IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs); | 668 | return readl(IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs); |
667 | } | 669 | } |
668 | 670 | ||
671 | static u32 iwl_trans_pcie_read_prph(struct iwl_trans *trans, u32 reg) | ||
672 | { | ||
673 | iwl_trans_pcie_write32(trans, HBUS_TARG_PRPH_RADDR, reg | (3 << 24)); | ||
674 | return iwl_trans_pcie_read32(trans, HBUS_TARG_PRPH_RDAT); | ||
675 | } | ||
676 | |||
677 | static void iwl_trans_pcie_write_prph(struct iwl_trans *trans, u32 addr, | ||
678 | u32 val) | ||
679 | { | ||
680 | iwl_trans_pcie_write32(trans, HBUS_TARG_PRPH_WADDR, | ||
681 | ((addr & 0x0000FFFF) | (3 << 24))); | ||
682 | iwl_trans_pcie_write32(trans, HBUS_TARG_PRPH_WDAT, val); | ||
683 | } | ||
684 | |||
669 | static void iwl_trans_pcie_configure(struct iwl_trans *trans, | 685 | static void iwl_trans_pcie_configure(struct iwl_trans *trans, |
670 | const struct iwl_trans_config *trans_cfg) | 686 | const struct iwl_trans_config *trans_cfg) |
671 | { | 687 | { |
@@ -1221,6 +1237,8 @@ static const struct iwl_trans_ops trans_ops_pcie = { | |||
1221 | .write8 = iwl_trans_pcie_write8, | 1237 | .write8 = iwl_trans_pcie_write8, |
1222 | .write32 = iwl_trans_pcie_write32, | 1238 | .write32 = iwl_trans_pcie_write32, |
1223 | .read32 = iwl_trans_pcie_read32, | 1239 | .read32 = iwl_trans_pcie_read32, |
1240 | .read_prph = iwl_trans_pcie_read_prph, | ||
1241 | .write_prph = iwl_trans_pcie_write_prph, | ||
1224 | .configure = iwl_trans_pcie_configure, | 1242 | .configure = iwl_trans_pcie_configure, |
1225 | .set_pmi = iwl_trans_pcie_set_pmi, | 1243 | .set_pmi = iwl_trans_pcie_set_pmi, |
1226 | }; | 1244 | }; |