diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2009-11-16 01:10:53 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-18 17:09:12 -0500 |
commit | 201cd6cce4f67ccead6240eb04ffa2f311661174 (patch) | |
tree | 5db351d6aca775d3390f1f813b5e93a3ae2bd3bb | |
parent | 7c82a186b48882c2a21a3eda25f3dab2d6040a09 (diff) |
ath9k: Remove a few unused functions
ATH9K_ANT_VARIABLE is the default diversity control used.
Consequently ath9k_hw_decrease_chain_power() does nothing.
ath9k_hw_setantennaswitch() is unused too.
Also, gbeacon_rate is unused.
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 | 53 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 23 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/phy.c | 90 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/phy.h | 3 |
4 files changed, 0 insertions, 169 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index b25eedf67e0b..ffcc4f039fa2 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -390,8 +390,6 @@ static void ath9k_hw_init_config(struct ath_hw *ah) | |||
390 | ah->config.cck_trig_high = 200; | 390 | ah->config.cck_trig_high = 200; |
391 | ah->config.cck_trig_low = 100; | 391 | ah->config.cck_trig_low = 100; |
392 | ah->config.enable_ani = 1; | 392 | ah->config.enable_ani = 1; |
393 | ah->config.diversity_control = ATH9K_ANT_VARIABLE; | ||
394 | ah->config.antenna_switch_swap = 0; | ||
395 | 393 | ||
396 | for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) { | 394 | for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) { |
397 | ah->config.spurchans[i][0] = AR_NO_SPUR; | 395 | ah->config.spurchans[i][0] = AR_NO_SPUR; |
@@ -446,9 +444,6 @@ static void ath9k_hw_init_defaults(struct ath_hw *ah) | |||
446 | ah->acktimeout = (u32) -1; | 444 | ah->acktimeout = (u32) -1; |
447 | ah->ctstimeout = (u32) -1; | 445 | ah->ctstimeout = (u32) -1; |
448 | ah->globaltxtimeout = (u32) -1; | 446 | ah->globaltxtimeout = (u32) -1; |
449 | |||
450 | ah->gbeacon_rate = 0; | ||
451 | |||
452 | ah->power_mode = ATH9K_PM_UNDEFINED; | 447 | ah->power_mode = ATH9K_PM_UNDEFINED; |
453 | } | 448 | } |
454 | 449 | ||
@@ -2056,9 +2051,6 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, | |||
2056 | ah->ath9k_hw_spur_mitigate_freq(ah, chan); | 2051 | ah->ath9k_hw_spur_mitigate_freq(ah, chan); |
2057 | ah->eep_ops->set_board_values(ah, chan); | 2052 | ah->eep_ops->set_board_values(ah, chan); |
2058 | 2053 | ||
2059 | if (AR_SREV_5416(ah)) | ||
2060 | ath9k_hw_decrease_chain_power(ah, chan); | ||
2061 | |||
2062 | REG_WRITE(ah, AR_STA_ID0, get_unaligned_le32(common->macaddr)); | 2054 | REG_WRITE(ah, AR_STA_ID0, get_unaligned_le32(common->macaddr)); |
2063 | REG_WRITE(ah, AR_STA_ID1, get_unaligned_le16(common->macaddr + 4) | 2055 | REG_WRITE(ah, AR_STA_ID1, get_unaligned_le16(common->macaddr + 4) |
2064 | | macStaId1 | 2056 | | macStaId1 |
@@ -3518,51 +3510,6 @@ void ath9k_hw_setantenna(struct ath_hw *ah, u32 antenna) | |||
3518 | } | 3510 | } |
3519 | EXPORT_SYMBOL(ath9k_hw_setantenna); | 3511 | EXPORT_SYMBOL(ath9k_hw_setantenna); |
3520 | 3512 | ||
3521 | bool ath9k_hw_setantennaswitch(struct ath_hw *ah, | ||
3522 | enum ath9k_ant_setting settings, | ||
3523 | struct ath9k_channel *chan, | ||
3524 | u8 *tx_chainmask, | ||
3525 | u8 *rx_chainmask, | ||
3526 | u8 *antenna_cfgd) | ||
3527 | { | ||
3528 | static u8 tx_chainmask_cfg, rx_chainmask_cfg; | ||
3529 | |||
3530 | if (AR_SREV_9280(ah)) { | ||
3531 | if (!tx_chainmask_cfg) { | ||
3532 | |||
3533 | tx_chainmask_cfg = *tx_chainmask; | ||
3534 | rx_chainmask_cfg = *rx_chainmask; | ||
3535 | } | ||
3536 | |||
3537 | switch (settings) { | ||
3538 | case ATH9K_ANT_FIXED_A: | ||
3539 | *tx_chainmask = ATH9K_ANTENNA0_CHAINMASK; | ||
3540 | *rx_chainmask = ATH9K_ANTENNA0_CHAINMASK; | ||
3541 | *antenna_cfgd = true; | ||
3542 | break; | ||
3543 | case ATH9K_ANT_FIXED_B: | ||
3544 | if (ah->caps.tx_chainmask > | ||
3545 | ATH9K_ANTENNA1_CHAINMASK) { | ||
3546 | *tx_chainmask = ATH9K_ANTENNA1_CHAINMASK; | ||
3547 | } | ||
3548 | *rx_chainmask = ATH9K_ANTENNA1_CHAINMASK; | ||
3549 | *antenna_cfgd = true; | ||
3550 | break; | ||
3551 | case ATH9K_ANT_VARIABLE: | ||
3552 | *tx_chainmask = tx_chainmask_cfg; | ||
3553 | *rx_chainmask = rx_chainmask_cfg; | ||
3554 | *antenna_cfgd = true; | ||
3555 | break; | ||
3556 | default: | ||
3557 | break; | ||
3558 | } | ||
3559 | } else { | ||
3560 | ah->config.diversity_control = settings; | ||
3561 | } | ||
3562 | |||
3563 | return true; | ||
3564 | } | ||
3565 | |||
3566 | /*********************/ | 3513 | /*********************/ |
3567 | /* General Operation */ | 3514 | /* General Operation */ |
3568 | /*********************/ | 3515 | /*********************/ |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index abaa2f09a3bc..f8f5e997162c 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -148,21 +148,6 @@ enum wireless_mode { | |||
148 | ATH9K_MODE_MAX, | 148 | ATH9K_MODE_MAX, |
149 | }; | 149 | }; |
150 | 150 | ||
151 | /** | ||
152 | * ath9k_ant_setting - transmit antenna settings | ||
153 | * | ||
154 | * Configures the antenna setting to use for transmit. | ||
155 | * | ||
156 | * @ATH9K_ANT_VARIABLE: this means transmit on all active antennas | ||
157 | * @ATH9K_ANT_FIXED_A: this means transmit on the first antenna only | ||
158 | * @ATH9K_ANT_FIXED_B: this means transmit on the second antenna only | ||
159 | */ | ||
160 | enum ath9k_ant_setting { | ||
161 | ATH9K_ANT_VARIABLE = 0, | ||
162 | ATH9K_ANT_FIXED_A, | ||
163 | ATH9K_ANT_FIXED_B | ||
164 | }; | ||
165 | |||
166 | enum ath9k_hw_caps { | 151 | enum ath9k_hw_caps { |
167 | ATH9K_HW_CAP_MIC_AESCCM = BIT(0), | 152 | ATH9K_HW_CAP_MIC_AESCCM = BIT(0), |
168 | ATH9K_HW_CAP_MIC_CKIP = BIT(1), | 153 | ATH9K_HW_CAP_MIC_CKIP = BIT(1), |
@@ -226,8 +211,6 @@ struct ath9k_ops_config { | |||
226 | u32 cck_trig_high; | 211 | u32 cck_trig_high; |
227 | u32 cck_trig_low; | 212 | u32 cck_trig_low; |
228 | u32 enable_ani; | 213 | u32 enable_ani; |
229 | enum ath9k_ant_setting diversity_control; | ||
230 | u16 antenna_switch_swap; | ||
231 | int serialize_regmode; | 214 | int serialize_regmode; |
232 | bool intr_mitigation; | 215 | bool intr_mitigation; |
233 | #define SPUR_DISABLE 0 | 216 | #define SPUR_DISABLE 0 |
@@ -572,7 +555,6 @@ struct ath_hw { | |||
572 | u32 acktimeout; | 555 | u32 acktimeout; |
573 | u32 ctstimeout; | 556 | u32 ctstimeout; |
574 | u32 globaltxtimeout; | 557 | u32 globaltxtimeout; |
575 | u8 gbeacon_rate; | ||
576 | 558 | ||
577 | /* ANI */ | 559 | /* ANI */ |
578 | u32 proc_phyerr; | 560 | u32 proc_phyerr; |
@@ -659,11 +641,6 @@ void ath9k_hw_cfg_output(struct ath_hw *ah, u32 gpio, | |||
659 | void ath9k_hw_set_gpio(struct ath_hw *ah, u32 gpio, u32 val); | 641 | void ath9k_hw_set_gpio(struct ath_hw *ah, u32 gpio, u32 val); |
660 | u32 ath9k_hw_getdefantenna(struct ath_hw *ah); | 642 | u32 ath9k_hw_getdefantenna(struct ath_hw *ah); |
661 | void ath9k_hw_setantenna(struct ath_hw *ah, u32 antenna); | 643 | void ath9k_hw_setantenna(struct ath_hw *ah, u32 antenna); |
662 | bool ath9k_hw_setantennaswitch(struct ath_hw *ah, | ||
663 | enum ath9k_ant_setting settings, | ||
664 | struct ath9k_channel *chan, | ||
665 | u8 *tx_chainmask, u8 *rx_chainmask, | ||
666 | u8 *antenna_cfgd); | ||
667 | 644 | ||
668 | /* General Operation */ | 645 | /* General Operation */ |
669 | bool ath9k_hw_wait(struct ath_hw *ah, u32 reg, u32 mask, u32 val, u32 timeout); | 646 | bool ath9k_hw_wait(struct ath_hw *ah, u32 reg, u32 mask, u32 val, u32 timeout); |
diff --git a/drivers/net/wireless/ath/ath9k/phy.c b/drivers/net/wireless/ath/ath9k/phy.c index 13ab4d7eb7aa..c3b59390fe38 100644 --- a/drivers/net/wireless/ath/ath9k/phy.c +++ b/drivers/net/wireless/ath/ath9k/phy.c | |||
@@ -528,95 +528,6 @@ static void ath9k_hw_force_bias(struct ath_hw *ah, u16 synth_freq) | |||
528 | } | 528 | } |
529 | 529 | ||
530 | /** | 530 | /** |
531 | * ath9k_hw_decrease_chain_power() | ||
532 | * | ||
533 | * @ah: atheros hardware structure | ||
534 | * @chan: | ||
535 | * | ||
536 | * Only used on the AR5416 and AR5418 with the external AR2133/AR5133 radios. | ||
537 | * | ||
538 | * Sets a chain internal RF path to the lowest output power. Any | ||
539 | * further writes to bank6 after this setting will override these | ||
540 | * changes. Thus this function must be the last function in the | ||
541 | * sequence to modify bank 6. | ||
542 | * | ||
543 | * This function must be called after ar5416SetRfRegs() which is | ||
544 | * called from ath9k_hw_process_ini() due to swizzling of bank 6. | ||
545 | * Depends on ah->analogBank6Data being initialized by | ||
546 | * ath9k_hw_set_rf_regs() | ||
547 | * | ||
548 | * Additional additive reduction in power - | ||
549 | * change chain's switch table so chain's tx state is actually the rx | ||
550 | * state value. May produce different results in 2GHz/5GHz as well as | ||
551 | * board to board but in general should be a reduction. | ||
552 | * | ||
553 | * Activated by #ifdef ALTER_SWITCH. Not tried yet. If so, must be | ||
554 | * called after ah->eep_ops->set_board_values() due to RMW of | ||
555 | * PHY_SWITCH_CHAIN_0. | ||
556 | */ | ||
557 | void ath9k_hw_decrease_chain_power(struct ath_hw *ah, | ||
558 | struct ath9k_channel *chan) | ||
559 | { | ||
560 | int i, regWrites = 0; | ||
561 | u32 bank6SelMask; | ||
562 | u32 *bank6Temp = ah->bank6Temp; | ||
563 | |||
564 | BUG_ON(AR_SREV_9280_10_OR_LATER(ah)); | ||
565 | |||
566 | switch (ah->config.diversity_control) { | ||
567 | case ATH9K_ANT_FIXED_A: | ||
568 | bank6SelMask = | ||
569 | (ah->config.antenna_switch_swap & ANTSWAP_AB) ? | ||
570 | REDUCE_CHAIN_0 : /* swapped, reduce chain 0 */ | ||
571 | REDUCE_CHAIN_1; /* normal, select chain 1/2 to reduce */ | ||
572 | break; | ||
573 | case ATH9K_ANT_FIXED_B: | ||
574 | bank6SelMask = | ||
575 | (ah->config.antenna_switch_swap & ANTSWAP_AB) ? | ||
576 | REDUCE_CHAIN_1 : /* swapped, reduce chain 1/2 */ | ||
577 | REDUCE_CHAIN_0; /* normal, select chain 0 to reduce */ | ||
578 | break; | ||
579 | case ATH9K_ANT_VARIABLE: | ||
580 | return; /* do not change anything */ | ||
581 | break; | ||
582 | default: | ||
583 | return; /* do not change anything */ | ||
584 | break; | ||
585 | } | ||
586 | |||
587 | for (i = 0; i < ah->iniBank6.ia_rows; i++) | ||
588 | bank6Temp[i] = ah->analogBank6Data[i]; | ||
589 | |||
590 | /* Write Bank 5 to switch Bank 6 write to selected chain only */ | ||
591 | REG_WRITE(ah, AR_PHY_BASE + 0xD8, bank6SelMask); | ||
592 | |||
593 | /* | ||
594 | * Modify Bank6 selected chain to use lowest amplification. | ||
595 | * Modifies the parameters to a value of 1. | ||
596 | * Depends on existing bank 6 values to be cached in | ||
597 | * ah->analogBank6Data | ||
598 | */ | ||
599 | ath9k_phy_modify_rx_buffer(bank6Temp, 1, 1, 189, 0); | ||
600 | ath9k_phy_modify_rx_buffer(bank6Temp, 1, 1, 190, 0); | ||
601 | ath9k_phy_modify_rx_buffer(bank6Temp, 1, 1, 191, 0); | ||
602 | ath9k_phy_modify_rx_buffer(bank6Temp, 1, 1, 192, 0); | ||
603 | ath9k_phy_modify_rx_buffer(bank6Temp, 1, 1, 193, 0); | ||
604 | ath9k_phy_modify_rx_buffer(bank6Temp, 1, 1, 222, 0); | ||
605 | ath9k_phy_modify_rx_buffer(bank6Temp, 1, 1, 245, 0); | ||
606 | ath9k_phy_modify_rx_buffer(bank6Temp, 1, 1, 246, 0); | ||
607 | ath9k_phy_modify_rx_buffer(bank6Temp, 1, 1, 247, 0); | ||
608 | |||
609 | REG_WRITE_RF_ARRAY(&ah->iniBank6, bank6Temp, regWrites); | ||
610 | |||
611 | REG_WRITE(ah, AR_PHY_BASE + 0xD8, 0x00000053); | ||
612 | #ifdef ALTER_SWITCH | ||
613 | REG_WRITE(ah, PHY_SWITCH_CHAIN_0, | ||
614 | (REG_READ(ah, PHY_SWITCH_CHAIN_0) & ~0x38) | ||
615 | | ((REG_READ(ah, PHY_SWITCH_CHAIN_0) >> 3) & 0x38)); | ||
616 | #endif | ||
617 | } | ||
618 | |||
619 | /** | ||
620 | * ath9k_hw_set_channel - tune to a channel on the external AR2133/AR5133 radios | 531 | * ath9k_hw_set_channel - tune to a channel on the external AR2133/AR5133 radios |
621 | * @ah: atheros hardware stucture | 532 | * @ah: atheros hardware stucture |
622 | * @chan: | 533 | * @chan: |
@@ -687,7 +598,6 @@ int ath9k_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan) | |||
687 | } | 598 | } |
688 | 599 | ||
689 | ath9k_hw_force_bias(ah, freq); | 600 | ath9k_hw_force_bias(ah, freq); |
690 | ath9k_hw_decrease_chain_power(ah, chan); | ||
691 | 601 | ||
692 | reg32 = | 602 | reg32 = |
693 | (channelSel << 8) | (aModeRefSel << 2) | (bModeSynth << 1) | | 603 | (channelSel << 8) | (aModeRefSel << 2) | (bModeSynth << 1) | |
diff --git a/drivers/net/wireless/ath/ath9k/phy.h b/drivers/net/wireless/ath/ath9k/phy.h index dc145a135dc7..31de27dc0c4a 100644 --- a/drivers/net/wireless/ath/ath9k/phy.h +++ b/drivers/net/wireless/ath/ath9k/phy.h | |||
@@ -35,9 +35,6 @@ bool ath9k_hw_set_rf_regs(struct ath_hw *ah, | |||
35 | struct ath9k_channel *chan, | 35 | struct ath9k_channel *chan, |
36 | u16 modesIndex); | 36 | u16 modesIndex); |
37 | 37 | ||
38 | void ath9k_hw_decrease_chain_power(struct ath_hw *ah, | ||
39 | struct ath9k_channel *chan); | ||
40 | |||
41 | #define AR_PHY_BASE 0x9800 | 38 | #define AR_PHY_BASE 0x9800 |
42 | #define AR_PHY(_n) (AR_PHY_BASE + ((_n)<<2)) | 39 | #define AR_PHY(_n) (AR_PHY_BASE + ((_n)<<2)) |
43 | 40 | ||