aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/b43.h
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/wireless/b43/b43.h
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/wireless/b43/b43.h')
-rw-r--r--drivers/net/wireless/b43/b43.h39
1 files changed, 15 insertions, 24 deletions
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
index 660716214d49..b8807fb12c92 100644
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -26,8 +26,6 @@
26# define B43_DEBUG 0 26# define B43_DEBUG 0
27#endif 27#endif
28 28
29#define B43_RX_MAX_SSI 60
30
31/* MMIO offsets */ 29/* MMIO offsets */
32#define B43_MMIO_DMA0_REASON 0x20 30#define B43_MMIO_DMA0_REASON 0x20
33#define B43_MMIO_DMA0_IRQ_MASK 0x24 31#define B43_MMIO_DMA0_IRQ_MASK 0x24
@@ -117,6 +115,7 @@
117#define B43_MMIO_TSF_2 0x636 /* core rev < 3 only */ 115#define B43_MMIO_TSF_2 0x636 /* core rev < 3 only */
118#define B43_MMIO_TSF_3 0x638 /* core rev < 3 only */ 116#define B43_MMIO_TSF_3 0x638 /* core rev < 3 only */
119#define B43_MMIO_RNG 0x65A 117#define B43_MMIO_RNG 0x65A
118#define B43_MMIO_IFSSLOT 0x684 /* Interframe slot time */
120#define B43_MMIO_IFSCTL 0x688 /* Interframe space control */ 119#define B43_MMIO_IFSCTL 0x688 /* Interframe space control */
121#define B43_MMIO_IFSCTL_USE_EDCF 0x0004 120#define B43_MMIO_IFSCTL_USE_EDCF 0x0004
122#define B43_MMIO_POWERUP_DELAY 0x6A8 121#define B43_MMIO_POWERUP_DELAY 0x6A8
@@ -255,6 +254,14 @@ enum {
255#define B43_SHM_SH_MAXBFRAMES 0x0080 /* Maximum number of frames in a burst */ 254#define B43_SHM_SH_MAXBFRAMES 0x0080 /* Maximum number of frames in a burst */
256#define B43_SHM_SH_SPUWKUP 0x0094 /* pre-wakeup for synth PU in us */ 255#define B43_SHM_SH_SPUWKUP 0x0094 /* pre-wakeup for synth PU in us */
257#define B43_SHM_SH_PRETBTT 0x0096 /* pre-TBTT in us */ 256#define B43_SHM_SH_PRETBTT 0x0096 /* pre-TBTT in us */
257/* SHM_SHARED tx iq workarounds */
258#define B43_SHM_SH_NPHY_TXIQW0 0x0700
259#define B43_SHM_SH_NPHY_TXIQW1 0x0702
260#define B43_SHM_SH_NPHY_TXIQW2 0x0704
261#define B43_SHM_SH_NPHY_TXIQW3 0x0706
262/* SHM_SHARED tx pwr ctrl */
263#define B43_SHM_SH_NPHY_TXPWR_INDX0 0x0708
264#define B43_SHM_SH_NPHY_TXPWR_INDX1 0x070E
258 265
259/* SHM_SCRATCH offsets */ 266/* SHM_SCRATCH offsets */
260#define B43_SHM_SC_MINCONT 0x0003 /* Minimum contention window */ 267#define B43_SHM_SC_MINCONT 0x0003 /* Minimum contention window */
@@ -695,6 +702,7 @@ struct b43_wldev {
695 bool radio_hw_enable; /* saved state of radio hardware enabled state */ 702 bool radio_hw_enable; /* saved state of radio hardware enabled state */
696 bool qos_enabled; /* TRUE, if QoS is used. */ 703 bool qos_enabled; /* TRUE, if QoS is used. */
697 bool hwcrypto_enabled; /* TRUE, if HW crypto acceleration is enabled. */ 704 bool hwcrypto_enabled; /* TRUE, if HW crypto acceleration is enabled. */
705 bool use_pio; /* TRUE if next init should use PIO */
698 706
699 /* PHY/Radio device. */ 707 /* PHY/Radio device. */
700 struct b43_phy phy; 708 struct b43_phy phy;
@@ -749,12 +757,6 @@ struct b43_wldev {
749#endif 757#endif
750}; 758};
751 759
752/*
753 * Include goes here to avoid a dependency problem.
754 * A better fix would be to integrate xmit.h into b43.h.
755 */
756#include "xmit.h"
757
758/* Data structure for the WLAN parts (802.11 cores) of the b43 chip. */ 760/* Data structure for the WLAN parts (802.11 cores) of the b43 chip. */
759struct b43_wl { 761struct b43_wl {
760 /* Pointer to the active wireless device on this chip */ 762 /* Pointer to the active wireless device on this chip */
@@ -829,15 +831,9 @@ struct b43_wl {
829 /* The device LEDs. */ 831 /* The device LEDs. */
830 struct b43_leds leds; 832 struct b43_leds leds;
831 833
832#ifdef CONFIG_B43_PIO 834 /* Kmalloc'ed scratch space for PIO TX/RX. Protected by wl->mutex. */
833 /* 835 u8 pio_scratchspace[110] __attribute__((__aligned__(8)));
834 * RX/TX header/tail buffers used by the frame transmit functions. 836 u8 pio_tailspace[4] __attribute__((__aligned__(8)));
835 */
836 struct b43_rxhdr_fw4 rxhdr;
837 struct b43_txhdr txhdr;
838 u8 rx_tail[4];
839 u8 tx_tail[4];
840#endif /* CONFIG_B43_PIO */
841}; 837};
842 838
843static inline struct b43_wl *hw_to_b43_wl(struct ieee80211_hw *hw) 839static inline struct b43_wl *hw_to_b43_wl(struct ieee80211_hw *hw)
@@ -888,20 +884,15 @@ static inline void b43_write32(struct b43_wldev *dev, u16 offset, u32 value)
888 884
889static inline bool b43_using_pio_transfers(struct b43_wldev *dev) 885static inline bool b43_using_pio_transfers(struct b43_wldev *dev)
890{ 886{
891#ifdef CONFIG_B43_PIO
892 return dev->__using_pio_transfers; 887 return dev->__using_pio_transfers;
893#else
894 return 0;
895#endif
896} 888}
897 889
898#ifdef CONFIG_B43_FORCE_PIO 890#ifdef CONFIG_B43_FORCE_PIO
899# define B43_FORCE_PIO 1 891# define B43_PIO_DEFAULT 1
900#else 892#else
901# define B43_FORCE_PIO 0 893# define B43_PIO_DEFAULT 0
902#endif 894#endif
903 895
904
905/* Message printing */ 896/* Message printing */
906void b43info(struct b43_wl *wl, const char *fmt, ...) 897void b43info(struct b43_wl *wl, const char *fmt, ...)
907 __attribute__ ((format(printf, 2, 3))); 898 __attribute__ ((format(printf, 2, 3)));