diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-03-06 16:30:56 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-07 13:56:32 -0500 |
commit | 6794f3ee1dc4a2f7ebed99a4c075f00bbebbcfdc (patch) | |
tree | 90814b7afc0b9b116b1d390c4aa3326d123aacd9 /drivers | |
parent | b9ad70da6a7ed166539b188a95e0aef119555e14 (diff) |
iwlwifi: constify remaining config data
The HW configuration settings base_params, ht_params
and bt_params all should be const, make it so.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-1000.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-2000.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-shared.h | 6 |
5 files changed, 19 insertions, 16 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index 5039a9a4776..5abebc355f7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -157,7 +157,7 @@ static struct iwl_lib_ops iwl1000_lib = { | |||
157 | .temperature = iwlagn_temperature, | 157 | .temperature = iwlagn_temperature, |
158 | }; | 158 | }; |
159 | 159 | ||
160 | static struct iwl_base_params iwl1000_base_params = { | 160 | static const struct iwl_base_params iwl1000_base_params = { |
161 | .num_of_queues = IWLAGN_NUM_QUEUES, | 161 | .num_of_queues = IWLAGN_NUM_QUEUES, |
162 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | 162 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
163 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 163 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
@@ -172,7 +172,8 @@ static struct iwl_base_params iwl1000_base_params = { | |||
172 | .max_event_log_size = 128, | 172 | .max_event_log_size = 128, |
173 | .wd_disable = true, | 173 | .wd_disable = true, |
174 | }; | 174 | }; |
175 | static struct iwl_ht_params iwl1000_ht_params = { | 175 | |
176 | static const struct iwl_ht_params iwl1000_ht_params = { | ||
176 | .ht_greenfield_support = true, | 177 | .ht_greenfield_support = true, |
177 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | 178 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
178 | .smps_mode = IEEE80211_SMPS_DYNAMIC, | 179 | .smps_mode = IEEE80211_SMPS_DYNAMIC, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c index c1739626aeb..446d010dfe8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-2000.c +++ b/drivers/net/wireless/iwlwifi/iwl-2000.c | |||
@@ -175,7 +175,7 @@ static struct iwl_lib_ops iwl2030_lib = { | |||
175 | .temperature = iwlagn_temperature, | 175 | .temperature = iwlagn_temperature, |
176 | }; | 176 | }; |
177 | 177 | ||
178 | static struct iwl_base_params iwl2000_base_params = { | 178 | static const struct iwl_base_params iwl2000_base_params = { |
179 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 179 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
180 | .num_of_queues = IWLAGN_NUM_QUEUES, | 180 | .num_of_queues = IWLAGN_NUM_QUEUES, |
181 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | 181 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
@@ -194,7 +194,7 @@ static struct iwl_base_params iwl2000_base_params = { | |||
194 | }; | 194 | }; |
195 | 195 | ||
196 | 196 | ||
197 | static struct iwl_base_params iwl2030_base_params = { | 197 | static const struct iwl_base_params iwl2030_base_params = { |
198 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 198 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
199 | .num_of_queues = IWLAGN_NUM_QUEUES, | 199 | .num_of_queues = IWLAGN_NUM_QUEUES, |
200 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | 200 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
@@ -212,12 +212,12 @@ static struct iwl_base_params iwl2030_base_params = { | |||
212 | .hd_v2 = true, | 212 | .hd_v2 = true, |
213 | }; | 213 | }; |
214 | 214 | ||
215 | static struct iwl_ht_params iwl2000_ht_params = { | 215 | static const struct iwl_ht_params iwl2000_ht_params = { |
216 | .ht_greenfield_support = true, | 216 | .ht_greenfield_support = true, |
217 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | 217 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
218 | }; | 218 | }; |
219 | 219 | ||
220 | static struct iwl_bt_params iwl2030_bt_params = { | 220 | static const struct iwl_bt_params iwl2030_bt_params = { |
221 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | 221 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
222 | .advanced_bt_coexist = true, | 222 | .advanced_bt_coexist = true, |
223 | .agg_time_limit = BT_AGG_THRESHOLD_DEF, | 223 | .agg_time_limit = BT_AGG_THRESHOLD_DEF, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index fc6ec07de87..821ed3a36e5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -310,7 +310,7 @@ static struct iwl_lib_ops iwl5150_lib = { | |||
310 | .temperature = iwl5150_temperature, | 310 | .temperature = iwl5150_temperature, |
311 | }; | 311 | }; |
312 | 312 | ||
313 | static struct iwl_base_params iwl5000_base_params = { | 313 | static const struct iwl_base_params iwl5000_base_params = { |
314 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, | 314 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, |
315 | .num_of_queues = IWLAGN_NUM_QUEUES, | 315 | .num_of_queues = IWLAGN_NUM_QUEUES, |
316 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | 316 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
@@ -323,7 +323,8 @@ static struct iwl_base_params iwl5000_base_params = { | |||
323 | .no_idle_support = true, | 323 | .no_idle_support = true, |
324 | .wd_disable = true, | 324 | .wd_disable = true, |
325 | }; | 325 | }; |
326 | static struct iwl_ht_params iwl5000_ht_params = { | 326 | |
327 | static const struct iwl_ht_params iwl5000_ht_params = { | ||
327 | .ht_greenfield_support = true, | 328 | .ht_greenfield_support = true, |
328 | }; | 329 | }; |
329 | 330 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index a64f0f28124..d2e24824fc0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -271,7 +271,7 @@ static struct iwl_lib_ops iwl6030_lib = { | |||
271 | .temperature = iwlagn_temperature, | 271 | .temperature = iwlagn_temperature, |
272 | }; | 272 | }; |
273 | 273 | ||
274 | static struct iwl_base_params iwl6000_base_params = { | 274 | static const struct iwl_base_params iwl6000_base_params = { |
275 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 275 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
276 | .num_of_queues = IWLAGN_NUM_QUEUES, | 276 | .num_of_queues = IWLAGN_NUM_QUEUES, |
277 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | 277 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
@@ -288,7 +288,7 @@ static struct iwl_base_params iwl6000_base_params = { | |||
288 | .shadow_reg_enable = true, | 288 | .shadow_reg_enable = true, |
289 | }; | 289 | }; |
290 | 290 | ||
291 | static struct iwl_base_params iwl6050_base_params = { | 291 | static const struct iwl_base_params iwl6050_base_params = { |
292 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 292 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
293 | .num_of_queues = IWLAGN_NUM_QUEUES, | 293 | .num_of_queues = IWLAGN_NUM_QUEUES, |
294 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | 294 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
@@ -304,7 +304,8 @@ static struct iwl_base_params iwl6050_base_params = { | |||
304 | .max_event_log_size = 1024, | 304 | .max_event_log_size = 1024, |
305 | .shadow_reg_enable = true, | 305 | .shadow_reg_enable = true, |
306 | }; | 306 | }; |
307 | static struct iwl_base_params iwl6000_g2_base_params = { | 307 | |
308 | static const struct iwl_base_params iwl6000_g2_base_params = { | ||
308 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 309 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
309 | .num_of_queues = IWLAGN_NUM_QUEUES, | 310 | .num_of_queues = IWLAGN_NUM_QUEUES, |
310 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | 311 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
@@ -321,12 +322,12 @@ static struct iwl_base_params iwl6000_g2_base_params = { | |||
321 | .shadow_reg_enable = true, | 322 | .shadow_reg_enable = true, |
322 | }; | 323 | }; |
323 | 324 | ||
324 | static struct iwl_ht_params iwl6000_ht_params = { | 325 | static const struct iwl_ht_params iwl6000_ht_params = { |
325 | .ht_greenfield_support = true, | 326 | .ht_greenfield_support = true, |
326 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | 327 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
327 | }; | 328 | }; |
328 | 329 | ||
329 | static struct iwl_bt_params iwl6000_bt_params = { | 330 | static const struct iwl_bt_params iwl6000_bt_params = { |
330 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | 331 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
331 | .advanced_bt_coexist = true, | 332 | .advanced_bt_coexist = true, |
332 | .agg_time_limit = BT_AGG_THRESHOLD_DEF, | 333 | .agg_time_limit = BT_AGG_THRESHOLD_DEF, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-shared.h b/drivers/net/wireless/iwlwifi/iwl-shared.h index 7c9502703e8..5a67fa14174 100644 --- a/drivers/net/wireless/iwlwifi/iwl-shared.h +++ b/drivers/net/wireless/iwlwifi/iwl-shared.h | |||
@@ -366,10 +366,10 @@ struct iwl_cfg { | |||
366 | const struct iwl_lib_ops *lib; | 366 | const struct iwl_lib_ops *lib; |
367 | void (*additional_nic_config)(struct iwl_priv *priv); | 367 | void (*additional_nic_config)(struct iwl_priv *priv); |
368 | /* params not likely to change within a device family */ | 368 | /* params not likely to change within a device family */ |
369 | struct iwl_base_params *base_params; | 369 | const struct iwl_base_params *base_params; |
370 | /* params likely to change within a device family */ | 370 | /* params likely to change within a device family */ |
371 | struct iwl_ht_params *ht_params; | 371 | const struct iwl_ht_params *ht_params; |
372 | struct iwl_bt_params *bt_params; | 372 | const struct iwl_bt_params *bt_params; |
373 | enum iwl_pa_type pa_type; /* if used set to IWL_PA_SYSTEM */ | 373 | enum iwl_pa_type pa_type; /* if used set to IWL_PA_SYSTEM */ |
374 | const bool need_temp_offset_calib; /* if used set to true */ | 374 | const bool need_temp_offset_calib; /* if used set to true */ |
375 | const bool no_xtal_calib; | 375 | const bool no_xtal_calib; |