diff options
Diffstat (limited to 'drivers/net/wireless/b43/b43.h')
-rw-r--r-- | drivers/net/wireless/b43/b43.h | 52 |
1 files changed, 40 insertions, 12 deletions
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index 8674a99356af..25a78cfb7d15 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h | |||
@@ -153,6 +153,19 @@ | |||
153 | #define B43_BFH_FEM_BT 0x0040 /* has FEM and switch to share antenna | 153 | #define B43_BFH_FEM_BT 0x0040 /* has FEM and switch to share antenna |
154 | * with bluetooth */ | 154 | * with bluetooth */ |
155 | 155 | ||
156 | /* SPROM boardflags2_lo values */ | ||
157 | #define B43_BFL2_RXBB_INT_REG_DIS 0x0001 /* external RX BB regulator present */ | ||
158 | #define B43_BFL2_APLL_WAR 0x0002 /* alternative A-band PLL settings implemented */ | ||
159 | #define B43_BFL2_TXPWRCTRL_EN 0x0004 /* permits enabling TX Power Control */ | ||
160 | #define B43_BFL2_2X4_DIV 0x0008 /* 2x4 diversity switch */ | ||
161 | #define B43_BFL2_5G_PWRGAIN 0x0010 /* supports 5G band power gain */ | ||
162 | #define B43_BFL2_PCIEWAR_OVR 0x0020 /* overrides ASPM and Clkreq settings */ | ||
163 | #define B43_BFL2_CAESERS_BRD 0x0040 /* is Caesers board (unused) */ | ||
164 | #define B43_BFL2_BTC3WIRE 0x0080 /* used 3-wire bluetooth coexist */ | ||
165 | #define B43_BFL2_SKWRKFEM_BRD 0x0100 /* 4321mcm93 uses Skyworks FEM */ | ||
166 | #define B43_BFL2_SPUR_WAR 0x0200 /* has a workaround for clock-harmonic spurs */ | ||
167 | #define B43_BFL2_GPLL_WAR 0x0400 /* altenative G-band PLL settings implemented */ | ||
168 | |||
156 | /* GPIO register offset, in both ChipCommon and PCI core. */ | 169 | /* GPIO register offset, in both ChipCommon and PCI core. */ |
157 | #define B43_GPIO_CONTROL 0x6c | 170 | #define B43_GPIO_CONTROL 0x6c |
158 | 171 | ||
@@ -186,7 +199,8 @@ enum { | |||
186 | #define B43_SHM_SH_PHYTXNOI 0x006E /* PHY noise directly after TX (lower 8bit only) */ | 199 | #define B43_SHM_SH_PHYTXNOI 0x006E /* PHY noise directly after TX (lower 8bit only) */ |
187 | #define B43_SHM_SH_RFRXSP1 0x0072 /* RF RX SP Register 1 */ | 200 | #define B43_SHM_SH_RFRXSP1 0x0072 /* RF RX SP Register 1 */ |
188 | #define B43_SHM_SH_CHAN 0x00A0 /* Current channel (low 8bit only) */ | 201 | #define B43_SHM_SH_CHAN 0x00A0 /* Current channel (low 8bit only) */ |
189 | #define B43_SHM_SH_CHAN_5GHZ 0x0100 /* Bit set, if 5Ghz channel */ | 202 | #define B43_SHM_SH_CHAN_5GHZ 0x0100 /* Bit set, if 5 Ghz channel */ |
203 | #define B43_SHM_SH_CHAN_40MHZ 0x0200 /* Bit set, if 40 Mhz channel width */ | ||
190 | #define B43_SHM_SH_BCMCFIFOID 0x0108 /* Last posted cookie to the bcast/mcast FIFO */ | 204 | #define B43_SHM_SH_BCMCFIFOID 0x0108 /* Last posted cookie to the bcast/mcast FIFO */ |
191 | /* TSSI information */ | 205 | /* TSSI information */ |
192 | #define B43_SHM_SH_TSSI_CCK 0x0058 /* TSSI for last 4 CCK frames (32bit) */ | 206 | #define B43_SHM_SH_TSSI_CCK 0x0058 /* TSSI for last 4 CCK frames (32bit) */ |
@@ -402,10 +416,10 @@ enum { | |||
402 | 416 | ||
403 | /* 802.11 core specific TM State Low (SSB_TMSLOW) flags */ | 417 | /* 802.11 core specific TM State Low (SSB_TMSLOW) flags */ |
404 | #define B43_TMSLOW_GMODE 0x20000000 /* G Mode Enable */ | 418 | #define B43_TMSLOW_GMODE 0x20000000 /* G Mode Enable */ |
405 | #define B43_TMSLOW_PHYCLKSPEED 0x00C00000 /* PHY clock speed mask (N-PHY only) */ | 419 | #define B43_TMSLOW_PHY_BANDWIDTH 0x00C00000 /* PHY band width and clock speed mask (N-PHY only) */ |
406 | #define B43_TMSLOW_PHYCLKSPEED_40MHZ 0x00000000 /* 40 MHz PHY */ | 420 | #define B43_TMSLOW_PHY_BANDWIDTH_10MHZ 0x00000000 /* 10 MHz bandwidth, 40 MHz PHY */ |
407 | #define B43_TMSLOW_PHYCLKSPEED_80MHZ 0x00400000 /* 80 MHz PHY */ | 421 | #define B43_TMSLOW_PHY_BANDWIDTH_20MHZ 0x00400000 /* 20 MHz bandwidth, 80 MHz PHY */ |
408 | #define B43_TMSLOW_PHYCLKSPEED_160MHZ 0x00800000 /* 160 MHz PHY */ | 422 | #define B43_TMSLOW_PHY_BANDWIDTH_40MHZ 0x00800000 /* 40 MHz bandwidth, 160 MHz PHY */ |
409 | #define B43_TMSLOW_PLLREFSEL 0x00200000 /* PLL Frequency Reference Select (rev >= 5) */ | 423 | #define B43_TMSLOW_PLLREFSEL 0x00200000 /* PLL Frequency Reference Select (rev >= 5) */ |
410 | #define B43_TMSLOW_MACPHYCLKEN 0x00100000 /* MAC PHY Clock Control Enable (rev >= 5) */ | 424 | #define B43_TMSLOW_MACPHYCLKEN 0x00100000 /* MAC PHY Clock Control Enable (rev >= 5) */ |
411 | #define B43_TMSLOW_PHYRESET 0x00080000 /* PHY Reset */ | 425 | #define B43_TMSLOW_PHYRESET 0x00080000 /* PHY Reset */ |
@@ -553,6 +567,8 @@ struct b43_dma { | |||
553 | struct b43_dmaring *tx_ring_mcast; /* Multicast */ | 567 | struct b43_dmaring *tx_ring_mcast; /* Multicast */ |
554 | 568 | ||
555 | struct b43_dmaring *rx_ring; | 569 | struct b43_dmaring *rx_ring; |
570 | |||
571 | u32 translation; /* Routing bits */ | ||
556 | }; | 572 | }; |
557 | 573 | ||
558 | struct b43_pio_txqueue; | 574 | struct b43_pio_txqueue; |
@@ -634,8 +650,8 @@ struct b43_request_fw_context { | |||
634 | char errors[B43_NR_FWTYPES][128]; | 650 | char errors[B43_NR_FWTYPES][128]; |
635 | /* Temporary buffer for storing the firmware name. */ | 651 | /* Temporary buffer for storing the firmware name. */ |
636 | char fwname[64]; | 652 | char fwname[64]; |
637 | /* A fatal error occured while requesting. Firmware reqest | 653 | /* A fatal error occurred while requesting. Firmware request |
638 | * can not continue, as any other reqest will also fail. */ | 654 | * can not continue, as any other request will also fail. */ |
639 | int fatal_failure; | 655 | int fatal_failure; |
640 | }; | 656 | }; |
641 | 657 | ||
@@ -691,7 +707,7 @@ enum { | |||
691 | 707 | ||
692 | /* Data structure for one wireless device (802.11 core) */ | 708 | /* Data structure for one wireless device (802.11 core) */ |
693 | struct b43_wldev { | 709 | struct b43_wldev { |
694 | struct ssb_device *dev; | 710 | struct ssb_device *sdev; |
695 | struct b43_wl *wl; | 711 | struct b43_wl *wl; |
696 | 712 | ||
697 | /* The device initialization status. | 713 | /* The device initialization status. |
@@ -865,22 +881,34 @@ static inline enum ieee80211_band b43_current_band(struct b43_wl *wl) | |||
865 | 881 | ||
866 | static inline u16 b43_read16(struct b43_wldev *dev, u16 offset) | 882 | static inline u16 b43_read16(struct b43_wldev *dev, u16 offset) |
867 | { | 883 | { |
868 | return ssb_read16(dev->dev, offset); | 884 | return ssb_read16(dev->sdev, offset); |
869 | } | 885 | } |
870 | 886 | ||
871 | static inline void b43_write16(struct b43_wldev *dev, u16 offset, u16 value) | 887 | static inline void b43_write16(struct b43_wldev *dev, u16 offset, u16 value) |
872 | { | 888 | { |
873 | ssb_write16(dev->dev, offset, value); | 889 | ssb_write16(dev->sdev, offset, value); |
874 | } | 890 | } |
875 | 891 | ||
876 | static inline u32 b43_read32(struct b43_wldev *dev, u16 offset) | 892 | static inline u32 b43_read32(struct b43_wldev *dev, u16 offset) |
877 | { | 893 | { |
878 | return ssb_read32(dev->dev, offset); | 894 | return ssb_read32(dev->sdev, offset); |
879 | } | 895 | } |
880 | 896 | ||
881 | static inline void b43_write32(struct b43_wldev *dev, u16 offset, u32 value) | 897 | static inline void b43_write32(struct b43_wldev *dev, u16 offset, u32 value) |
882 | { | 898 | { |
883 | ssb_write32(dev->dev, offset, value); | 899 | ssb_write32(dev->sdev, offset, value); |
900 | } | ||
901 | |||
902 | static inline void b43_block_read(struct b43_wldev *dev, void *buffer, | ||
903 | size_t count, u16 offset, u8 reg_width) | ||
904 | { | ||
905 | ssb_block_read(dev->sdev, buffer, count, offset, reg_width); | ||
906 | } | ||
907 | |||
908 | static inline void b43_block_write(struct b43_wldev *dev, const void *buffer, | ||
909 | size_t count, u16 offset, u8 reg_width) | ||
910 | { | ||
911 | ssb_block_write(dev->sdev, buffer, count, offset, reg_width); | ||
884 | } | 912 | } |
885 | 913 | ||
886 | static inline bool b43_using_pio_transfers(struct b43_wldev *dev) | 914 | static inline bool b43_using_pio_transfers(struct b43_wldev *dev) |