aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-06 16:30:56 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-07 13:56:32 -0500
commit6794f3ee1dc4a2f7ebed99a4c075f00bbebbcfdc (patch)
tree90814b7afc0b9b116b1d390c4aa3326d123aacd9
parentb9ad70da6a7ed166539b188a95e0aef119555e14 (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>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-1000.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-2000.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c11
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-shared.h6
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
160static struct iwl_base_params iwl1000_base_params = { 160static 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};
175static struct iwl_ht_params iwl1000_ht_params = { 175
176static 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
178static struct iwl_base_params iwl2000_base_params = { 178static 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
197static struct iwl_base_params iwl2030_base_params = { 197static 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
215static struct iwl_ht_params iwl2000_ht_params = { 215static 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
220static struct iwl_bt_params iwl2030_bt_params = { 220static 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
313static struct iwl_base_params iwl5000_base_params = { 313static 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};
326static struct iwl_ht_params iwl5000_ht_params = { 326
327static 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
274static struct iwl_base_params iwl6000_base_params = { 274static 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
291static struct iwl_base_params iwl6050_base_params = { 291static 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};
307static struct iwl_base_params iwl6000_g2_base_params = { 307
308static 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
324static struct iwl_ht_params iwl6000_ht_params = { 325static 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
329static struct iwl_bt_params iwl6000_bt_params = { 330static 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;