b43: N-PHY: update switching analog on/off
PATCH 1/2 b43: N-PHY: update switching analog on/off
Specs were recently updated.
Signed-off-by Rafał Miłecki <[email protected]>
--- drivers/net/wireless/b43/phy_n.c | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-)
drivers/net/wireless/b43/phy_n.c +17 -4
@@ -4025,11 +4025,24 @@ static void b43_nphy_op_software_rfkill(struct b43_wldev *dev,/* http://bcm-v4.sipsolutions.net/802.11/PHY/Anacore */ static void b43_nphy_op_switch_analog (struct b43_wldev *dev,bool on) { -u16 val = on ?0 :0x7FFF ; +u16 override = on ?0x0 :0x7FFF ; +u16 core = on ?0xD :0x00FD ; -if (dev->phy.rev >=3 ) -b43_phy_write (dev,B43_NPHY_AFECTL_OVER1 , val); -b43_phy_write (dev,B43_NPHY_AFECTL_OVER , val); +if (dev->phy.rev >=3 ) { +if (on) { +b43_phy_write (dev,B43_NPHY_AFECTL_C1 , core); +b43_phy_write (dev,B43_NPHY_AFECTL_OVER1 , override); +b43_phy_write (dev,B43_NPHY_AFECTL_C2 , core); +b43_phy_write (dev,B43_NPHY_AFECTL_OVER , override); + }else { +b43_phy_write (dev,B43_NPHY_AFECTL_OVER1 , override); +b43_phy_write (dev,B43_NPHY_AFECTL_C1 , core); +b43_phy_write (dev,B43_NPHY_AFECTL_OVER , override); +b43_phy_write (dev,B43_NPHY_AFECTL_C2 , core); + } + }else { +b43_phy_write (dev,B43_NPHY_AFECTL_OVER , override); + } } static int b43_nphy_op_switch_channel(struct b43_wldev *dev,
Signature · 1 line
1.7.3.4
PATCH 2/2 b43: N-PHY: move declarations of chantables functions to correct files
Signed-off-by Rafał Miłecki <[email protected]>
--- drivers/net/wireless/b43/radio_2055.h | 5 +++++ drivers/net/wireless/b43/radio_2056.h | 5 +++++ drivers/net/wireless/b43/tables_nphy.h | 8 -------- 3 files changed, 10 insertions(+), 8 deletions(-)
drivers/net/wireless/b43/radio_2055.h +5 -0
@@ -251,4 +251,9 @@ struct b43_nphy_channeltab_entry_rev2 {void b2055_upload_inittab (struct b43_wldev *dev,bool ghz5,bool ignore_uploadflag); +/* Get the NPHY Channel Switch Table entry for a channel. +* Returns NULL on failure to find an entry. */ +const struct b43_nphy_channeltab_entry_rev2 * +b43_nphy_get_chantabent_rev2 (struct b43_wldev *dev,u8 channel); +#endif /* B43_RADIO_2055_H_ */
drivers/net/wireless/b43/radio_2056.h +5 -0
@@ -1117,4 +1117,9 @@ struct b43_nphy_channeltab_entry_rev3 {void b2056_upload_inittabs (struct b43_wldev *dev,bool ghz5,bool ignore_uploadflag); +/* Get the NPHY Channel Switch Table entry for a channel. +* Returns NULL on failure to find an entry. */ +const struct b43_nphy_channeltab_entry_rev3 * +b43_nphy_get_chantabent_rev3 (struct b43_wldev *dev,u16 freq); +#endif /* B43_RADIO_2056_H_ */
drivers/net/wireless/b43/tables_nphy.h +0 -8
@@ -60,16 +60,8 @@ struct nphy_gain_ctl_workaround_entry {struct nphy_gain_ctl_workaround_entry *b43_nphy_get_gain_ctl_workaround_ent (struct b43_wldev *dev,bool ghz5,bool ext_lna); -/* Get the NPHY Channel Switch Table entry for a channel. -* Returns NULL on failure to find an entry. */ -const struct b43_nphy_channeltab_entry_rev2 * -b43_nphy_get_chantabent_rev2 (struct b43_wldev *dev,u8 channel); -const struct b43_nphy_channeltab_entry_rev3 * -b43_nphy_get_chantabent_rev3 (struct b43_wldev *dev,u16 freq); -/* The N-PHY tables. */ -#define B43_NTAB_TYPEMASK 0xF0000000#define B43_NTAB_8BIT 0x10000000#define B43_NTAB_16BIT 0x20000000
Signature · 1 line
1.7.3.4