diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-11-13 14:22:41 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-17 16:19:01 -0500 |
commit | c5d0855acfa4d6801c4c45bc02ddddd959262050 (patch) | |
tree | 315ff07f552fe40466e075ec1f34d3b8e7012c9c /drivers/net/wireless/ath | |
parent | 387e68846413f3dcfc5a5afca9841430057e3340 (diff) |
ath9k_hw: set default values for radar pulse detection
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar5008_phy.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_phy.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 2 |
3 files changed, 32 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c index 3686811cc8df..7303d98e4100 100644 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c | |||
@@ -1610,6 +1610,20 @@ static void ar5008_hw_set_radar_params(struct ath_hw *ah, | |||
1610 | REG_CLR_BIT(ah, AR_PHY_RADAR_EXT, AR_PHY_RADAR_EXT_ENA); | 1610 | REG_CLR_BIT(ah, AR_PHY_RADAR_EXT, AR_PHY_RADAR_EXT_ENA); |
1611 | } | 1611 | } |
1612 | 1612 | ||
1613 | static void ar5008_hw_set_radar_conf(struct ath_hw *ah) | ||
1614 | { | ||
1615 | struct ath_hw_radar_conf *conf = &ah->radar_conf; | ||
1616 | |||
1617 | conf->fir_power = -33; | ||
1618 | conf->radar_rssi = 20; | ||
1619 | conf->pulse_height = 10; | ||
1620 | conf->pulse_rssi = 24; | ||
1621 | conf->pulse_inband = 15; | ||
1622 | conf->pulse_maxlen = 255; | ||
1623 | conf->pulse_inband_step = 12; | ||
1624 | conf->radar_inband = 8; | ||
1625 | } | ||
1626 | |||
1613 | void ar5008_hw_attach_phy_ops(struct ath_hw *ah) | 1627 | void ar5008_hw_attach_phy_ops(struct ath_hw *ah) |
1614 | { | 1628 | { |
1615 | struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah); | 1629 | struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah); |
@@ -1656,5 +1670,6 @@ void ar5008_hw_attach_phy_ops(struct ath_hw *ah) | |||
1656 | priv_ops->compute_pll_control = ar5008_hw_compute_pll_control; | 1670 | priv_ops->compute_pll_control = ar5008_hw_compute_pll_control; |
1657 | 1671 | ||
1658 | ar5008_hw_set_nf_limits(ah); | 1672 | ar5008_hw_set_nf_limits(ah); |
1673 | ar5008_hw_set_radar_conf(ah); | ||
1659 | memcpy(ah->nf_regs, ar5416_cca_regs, sizeof(ah->nf_regs)); | 1674 | memcpy(ah->nf_regs, ar5416_cca_regs, sizeof(ah->nf_regs)); |
1660 | } | 1675 | } |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c index f676b21ac437..e8d6455b5948 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c | |||
@@ -1144,6 +1144,20 @@ static void ar9003_hw_set_radar_params(struct ath_hw *ah, | |||
1144 | REG_CLR_BIT(ah, AR_PHY_RADAR_EXT, AR_PHY_RADAR_EXT_ENA); | 1144 | REG_CLR_BIT(ah, AR_PHY_RADAR_EXT, AR_PHY_RADAR_EXT_ENA); |
1145 | } | 1145 | } |
1146 | 1146 | ||
1147 | static void ar9003_hw_set_radar_conf(struct ath_hw *ah) | ||
1148 | { | ||
1149 | struct ath_hw_radar_conf *conf = &ah->radar_conf; | ||
1150 | |||
1151 | conf->fir_power = -28; | ||
1152 | conf->radar_rssi = 0; | ||
1153 | conf->pulse_height = 10; | ||
1154 | conf->pulse_rssi = 24; | ||
1155 | conf->pulse_inband = 8; | ||
1156 | conf->pulse_maxlen = 255; | ||
1157 | conf->pulse_inband_step = 12; | ||
1158 | conf->radar_inband = 8; | ||
1159 | } | ||
1160 | |||
1147 | void ar9003_hw_attach_phy_ops(struct ath_hw *ah) | 1161 | void ar9003_hw_attach_phy_ops(struct ath_hw *ah) |
1148 | { | 1162 | { |
1149 | struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah); | 1163 | struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah); |
@@ -1175,6 +1189,7 @@ void ar9003_hw_attach_phy_ops(struct ath_hw *ah) | |||
1175 | priv_ops->set_radar_params = ar9003_hw_set_radar_params; | 1189 | priv_ops->set_radar_params = ar9003_hw_set_radar_params; |
1176 | 1190 | ||
1177 | ar9003_hw_set_nf_limits(ah); | 1191 | ar9003_hw_set_nf_limits(ah); |
1192 | ar9003_hw_set_radar_conf(ah); | ||
1178 | memcpy(ah->nf_regs, ar9300_cca_regs, sizeof(ah->nf_regs)); | 1193 | memcpy(ah->nf_regs, ar9300_cca_regs, sizeof(ah->nf_regs)); |
1179 | } | 1194 | } |
1180 | 1195 | ||
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index c20a5421f870..d5e68347ef72 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -782,6 +782,8 @@ struct ath_hw { | |||
782 | u8 txchainmask; | 782 | u8 txchainmask; |
783 | u8 rxchainmask; | 783 | u8 rxchainmask; |
784 | 784 | ||
785 | struct ath_hw_radar_conf radar_conf; | ||
786 | |||
785 | u32 originalGain[22]; | 787 | u32 originalGain[22]; |
786 | int initPDADC; | 788 | int initPDADC; |
787 | int PDADCdelta; | 789 | int PDADCdelta; |