diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2011-08-14 17:27:30 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-24 14:41:41 -0400 |
commit | 7ed88528884bd477bddef367e8676b9e5ff99668 (patch) | |
tree | 7ced7c38fbaa9bbc69c72f15ca7f736af9be32d7 /drivers/net | |
parent | ba356b569f7c0ff5cdf6c1abb8a9b789e5eeed22 (diff) |
b43: LCN-PHY: switch analog
Analog is switched on right after reading PHY version:
read16 0xfaafc3e0 -> 0xa801
phy_read(0x043b) -> 0x0000
phy_write(0x043b) <- 0x0000
Switched off after after killing radio:
>>> Switch Radio(OFF) end
phy_read(0x043c) -> 0x0000
phy_write(0x043c) <- 0x0007
phy_read(0x043b) -> 0x0000
phy_write(0x043b) <- 0x0007
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/b43/phy_lcn.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy_lcn.h | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/phy_lcn.c b/drivers/net/wireless/b43/phy_lcn.c index 69a93b5586c8..0fd72c194a25 100644 --- a/drivers/net/wireless/b43/phy_lcn.c +++ b/drivers/net/wireless/b43/phy_lcn.c | |||
@@ -81,6 +81,16 @@ static void b43_phy_lcn_op_software_rfkill(struct b43_wldev *dev, | |||
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
84 | static void b43_phy_lcn_op_switch_analog(struct b43_wldev *dev, bool on) | ||
85 | { | ||
86 | if (on) { | ||
87 | b43_phy_mask(dev, B43_PHY_LCN_AFE_CTL1, ~0x7); | ||
88 | } else { | ||
89 | b43_phy_set(dev, B43_PHY_LCN_AFE_CTL2, 0x7); | ||
90 | b43_phy_set(dev, B43_PHY_LCN_AFE_CTL1, 0x7); | ||
91 | } | ||
92 | } | ||
93 | |||
84 | static unsigned int b43_phy_lcn_op_get_default_chan(struct b43_wldev *dev) | 94 | static unsigned int b43_phy_lcn_op_get_default_chan(struct b43_wldev *dev) |
85 | { | 95 | { |
86 | if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) | 96 | if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) |
@@ -115,8 +125,8 @@ const struct b43_phy_operations b43_phyops_lcn = { | |||
115 | .radio_write = b43_phy_lcn_op_radio_write, | 125 | .radio_write = b43_phy_lcn_op_radio_write, |
116 | */ | 126 | */ |
117 | .software_rfkill = b43_phy_lcn_op_software_rfkill, | 127 | .software_rfkill = b43_phy_lcn_op_software_rfkill, |
118 | /* | ||
119 | .switch_analog = b43_phy_lcn_op_switch_analog, | 128 | .switch_analog = b43_phy_lcn_op_switch_analog, |
129 | /* | ||
120 | .switch_channel = b43_phy_lcn_op_switch_channel, | 130 | .switch_channel = b43_phy_lcn_op_switch_channel, |
121 | */ | 131 | */ |
122 | .get_default_chan = b43_phy_lcn_op_get_default_chan, | 132 | .get_default_chan = b43_phy_lcn_op_get_default_chan, |
diff --git a/drivers/net/wireless/b43/phy_lcn.h b/drivers/net/wireless/b43/phy_lcn.h index 89f13b2e3370..371e07d2be3b 100644 --- a/drivers/net/wireless/b43/phy_lcn.h +++ b/drivers/net/wireless/b43/phy_lcn.h | |||
@@ -4,6 +4,8 @@ | |||
4 | #include "phy_common.h" | 4 | #include "phy_common.h" |
5 | 5 | ||
6 | 6 | ||
7 | #define B43_PHY_LCN_AFE_CTL1 B43_PHY_OFDM(0x03B) | ||
8 | #define B43_PHY_LCN_AFE_CTL2 B43_PHY_OFDM(0x03C) | ||
7 | #define B43_PHY_LCN_RF_CTL1 B43_PHY_OFDM(0x04C) | 9 | #define B43_PHY_LCN_RF_CTL1 B43_PHY_OFDM(0x04C) |
8 | #define B43_PHY_LCN_RF_CTL2 B43_PHY_OFDM(0x04D) | 10 | #define B43_PHY_LCN_RF_CTL2 B43_PHY_OFDM(0x04D) |
9 | #define B43_PHY_LCN_RF_CTL3 B43_PHY_OFDM(0x0B0) | 11 | #define B43_PHY_LCN_RF_CTL3 B43_PHY_OFDM(0x0B0) |