diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2009-08-13 00:04:32 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-14 09:14:08 -0400 |
commit | 1cf6873a191388ff7d06bbd70f68bbffe1d70019 (patch) | |
tree | 5eae23e5845c19efc0a54d7d5f50edc1ddea1b3f | |
parent | 1aa8e84736fb1a584c679f2893245826583a0526 (diff) |
ath9k: Remove duplicate variables
diversity_control and antenna_switch_swap are already
present in ath9k_ops_config. Remove duplicate occurrences
in ath_hw.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 16 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/phy.c | 12 |
3 files changed, 14 insertions, 21 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 6514dc7a7be7..9f1b34d9861a 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -407,7 +407,7 @@ static void ath9k_hw_init_config(struct ath_hw *ah) | |||
407 | ah->config.cck_trig_high = 200; | 407 | ah->config.cck_trig_high = 200; |
408 | ah->config.cck_trig_low = 100; | 408 | ah->config.cck_trig_low = 100; |
409 | ah->config.enable_ani = 1; | 409 | ah->config.enable_ani = 1; |
410 | ah->config.diversity_control = 0; | 410 | ah->config.diversity_control = ATH9K_ANT_VARIABLE; |
411 | ah->config.antenna_switch_swap = 0; | 411 | ah->config.antenna_switch_swap = 0; |
412 | 412 | ||
413 | for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) { | 413 | for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) { |
@@ -452,9 +452,6 @@ static void ath9k_hw_init_defaults(struct ath_hw *ah) | |||
452 | ah->regulatory.power_limit = MAX_RATE_POWER; | 452 | ah->regulatory.power_limit = MAX_RATE_POWER; |
453 | ah->regulatory.tp_scale = ATH9K_TP_SCALE_MAX; | 453 | ah->regulatory.tp_scale = ATH9K_TP_SCALE_MAX; |
454 | ah->atim_window = 0; | 454 | ah->atim_window = 0; |
455 | ah->diversity_control = ah->config.diversity_control; | ||
456 | ah->antenna_switch_swap = | ||
457 | ah->config.antenna_switch_swap; | ||
458 | ah->sta_id1_defaults = AR_STA_ID1_CRPT_MIC_ENABLE; | 455 | ah->sta_id1_defaults = AR_STA_ID1_CRPT_MIC_ENABLE; |
459 | ah->beacon_interval = 100; | 456 | ah->beacon_interval = 100; |
460 | ah->enable_32kHz_clock = DONT_USE_32KHZ; | 457 | ah->enable_32kHz_clock = DONT_USE_32KHZ; |
@@ -3891,7 +3888,7 @@ bool ath9k_hw_setantennaswitch(struct ath_hw *ah, | |||
3891 | break; | 3888 | break; |
3892 | } | 3889 | } |
3893 | } else { | 3890 | } else { |
3894 | ah->diversity_control = settings; | 3891 | ah->config.diversity_control = settings; |
3895 | } | 3892 | } |
3896 | 3893 | ||
3897 | return true; | 3894 | return true; |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 0e65873cc276..0336981a70ec 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -127,6 +127,12 @@ enum wireless_mode { | |||
127 | ATH9K_MODE_MAX, | 127 | ATH9K_MODE_MAX, |
128 | }; | 128 | }; |
129 | 129 | ||
130 | enum ath9k_ant_setting { | ||
131 | ATH9K_ANT_VARIABLE = 0, | ||
132 | ATH9K_ANT_FIXED_A, | ||
133 | ATH9K_ANT_FIXED_B | ||
134 | }; | ||
135 | |||
130 | enum ath9k_hw_caps { | 136 | enum ath9k_hw_caps { |
131 | ATH9K_HW_CAP_MIC_AESCCM = BIT(0), | 137 | ATH9K_HW_CAP_MIC_AESCCM = BIT(0), |
132 | ATH9K_HW_CAP_MIC_CKIP = BIT(1), | 138 | ATH9K_HW_CAP_MIC_CKIP = BIT(1), |
@@ -191,7 +197,7 @@ struct ath9k_ops_config { | |||
191 | u32 cck_trig_high; | 197 | u32 cck_trig_high; |
192 | u32 cck_trig_low; | 198 | u32 cck_trig_low; |
193 | u32 enable_ani; | 199 | u32 enable_ani; |
194 | u16 diversity_control; | 200 | enum ath9k_ant_setting diversity_control; |
195 | u16 antenna_switch_swap; | 201 | u16 antenna_switch_swap; |
196 | int serialize_regmode; | 202 | int serialize_regmode; |
197 | bool intr_mitigation; | 203 | bool intr_mitigation; |
@@ -330,12 +336,6 @@ enum ath9k_power_mode { | |||
330 | ATH9K_PM_UNDEFINED | 336 | ATH9K_PM_UNDEFINED |
331 | }; | 337 | }; |
332 | 338 | ||
333 | enum ath9k_ant_setting { | ||
334 | ATH9K_ANT_VARIABLE = 0, | ||
335 | ATH9K_ANT_FIXED_A, | ||
336 | ATH9K_ANT_FIXED_B | ||
337 | }; | ||
338 | |||
339 | enum ath9k_tp_scale { | 339 | enum ath9k_tp_scale { |
340 | ATH9K_TP_SCALE_MAX = 0, | 340 | ATH9K_TP_SCALE_MAX = 0, |
341 | ATH9K_TP_SCALE_50, | 341 | ATH9K_TP_SCALE_50, |
@@ -437,8 +437,6 @@ struct ath_hw { | |||
437 | u32 txurn_interrupt_mask; | 437 | u32 txurn_interrupt_mask; |
438 | bool chip_fullsleep; | 438 | bool chip_fullsleep; |
439 | u32 atim_window; | 439 | u32 atim_window; |
440 | u16 antenna_switch_swap; | ||
441 | enum ath9k_ant_setting diversity_control; | ||
442 | 440 | ||
443 | /* Calibration */ | 441 | /* Calibration */ |
444 | enum ath9k_cal_types supp_cals; | 442 | enum ath9k_cal_types supp_cals; |
diff --git a/drivers/net/wireless/ath/ath9k/phy.c b/drivers/net/wireless/ath/ath9k/phy.c index 59bb3ce1e646..63bf9a307c6a 100644 --- a/drivers/net/wireless/ath/ath9k/phy.c +++ b/drivers/net/wireless/ath/ath9k/phy.c | |||
@@ -353,18 +353,16 @@ ath9k_hw_decrease_chain_power(struct ath_hw *ah, struct ath9k_channel *chan) | |||
353 | u32 bank6SelMask; | 353 | u32 bank6SelMask; |
354 | u32 *bank6Temp = ah->bank6Temp; | 354 | u32 *bank6Temp = ah->bank6Temp; |
355 | 355 | ||
356 | switch (ah->diversity_control) { | 356 | switch (ah->config.diversity_control) { |
357 | case ATH9K_ANT_FIXED_A: | 357 | case ATH9K_ANT_FIXED_A: |
358 | bank6SelMask = | 358 | bank6SelMask = |
359 | (ah-> | 359 | (ah->config.antenna_switch_swap & ANTSWAP_AB) ? |
360 | antenna_switch_swap & ANTSWAP_AB) ? REDUCE_CHAIN_0 : | 360 | REDUCE_CHAIN_0 : REDUCE_CHAIN_1; |
361 | REDUCE_CHAIN_1; | ||
362 | break; | 361 | break; |
363 | case ATH9K_ANT_FIXED_B: | 362 | case ATH9K_ANT_FIXED_B: |
364 | bank6SelMask = | 363 | bank6SelMask = |
365 | (ah-> | 364 | (ah->config.antenna_switch_swap & ANTSWAP_AB) ? |
366 | antenna_switch_swap & ANTSWAP_AB) ? REDUCE_CHAIN_1 : | 365 | REDUCE_CHAIN_1 : REDUCE_CHAIN_0; |
367 | REDUCE_CHAIN_0; | ||
368 | break; | 366 | break; |
369 | case ATH9K_ANT_VARIABLE: | 367 | case ATH9K_ANT_VARIABLE: |
370 | return; | 368 | return; |