diff options
Diffstat (limited to 'drivers/net/wireless/b43/b43.h')
| -rw-r--r-- | drivers/net/wireless/b43/b43.h | 77 |
1 files changed, 56 insertions, 21 deletions
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index c818b0bc88ec..37110dfd2c96 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h | |||
| @@ -17,11 +17,6 @@ | |||
| 17 | #include "phy_common.h" | 17 | #include "phy_common.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | /* The unique identifier of the firmware that's officially supported by | ||
| 21 | * this driver version. */ | ||
| 22 | #define B43_SUPPORTED_FIRMWARE_ID "FW13" | ||
| 23 | |||
| 24 | |||
| 25 | #ifdef CONFIG_B43_DEBUG | 20 | #ifdef CONFIG_B43_DEBUG |
| 26 | # define B43_DEBUG 1 | 21 | # define B43_DEBUG 1 |
| 27 | #else | 22 | #else |
| @@ -112,21 +107,61 @@ | |||
| 112 | #define B43_MMIO_RADIO_HWENABLED_LO 0x49A | 107 | #define B43_MMIO_RADIO_HWENABLED_LO 0x49A |
| 113 | #define B43_MMIO_GPIO_CONTROL 0x49C | 108 | #define B43_MMIO_GPIO_CONTROL 0x49C |
| 114 | #define B43_MMIO_GPIO_MASK 0x49E | 109 | #define B43_MMIO_GPIO_MASK 0x49E |
| 110 | #define B43_MMIO_TXE0_CTL 0x500 | ||
| 111 | #define B43_MMIO_TXE0_AUX 0x502 | ||
| 112 | #define B43_MMIO_TXE0_TS_LOC 0x504 | ||
| 113 | #define B43_MMIO_TXE0_TIME_OUT 0x506 | ||
| 114 | #define B43_MMIO_TXE0_WM_0 0x508 | ||
| 115 | #define B43_MMIO_TXE0_WM_1 0x50A | ||
| 116 | #define B43_MMIO_TXE0_PHYCTL 0x50C | ||
| 117 | #define B43_MMIO_TXE0_STATUS 0x50E | ||
| 118 | #define B43_MMIO_TXE0_MMPLCP0 0x510 | ||
| 119 | #define B43_MMIO_TXE0_MMPLCP1 0x512 | ||
| 120 | #define B43_MMIO_TXE0_PHYCTL1 0x514 | ||
| 121 | #define B43_MMIO_XMTFIFODEF 0x520 | ||
| 122 | #define B43_MMIO_XMTFIFO_FRAME_CNT 0x522 /* core rev>= 16 only */ | ||
| 123 | #define B43_MMIO_XMTFIFO_BYTE_CNT 0x524 /* core rev>= 16 only */ | ||
| 124 | #define B43_MMIO_XMTFIFO_HEAD 0x526 /* core rev>= 16 only */ | ||
| 125 | #define B43_MMIO_XMTFIFO_RD_PTR 0x528 /* core rev>= 16 only */ | ||
| 126 | #define B43_MMIO_XMTFIFO_WR_PTR 0x52A /* core rev>= 16 only */ | ||
| 127 | #define B43_MMIO_XMTFIFODEF1 0x52C /* core rev>= 16 only */ | ||
| 128 | #define B43_MMIO_XMTFIFOCMD 0x540 | ||
| 129 | #define B43_MMIO_XMTFIFOFLUSH 0x542 | ||
| 130 | #define B43_MMIO_XMTFIFOTHRESH 0x544 | ||
| 131 | #define B43_MMIO_XMTFIFORDY 0x546 | ||
| 132 | #define B43_MMIO_XMTFIFOPRIRDY 0x548 | ||
| 133 | #define B43_MMIO_XMTFIFORQPRI 0x54A | ||
| 134 | #define B43_MMIO_XMTTPLATETXPTR 0x54C | ||
| 135 | #define B43_MMIO_XMTTPLATEPTR 0x550 | ||
| 136 | #define B43_MMIO_SMPL_CLCT_STRPTR 0x552 /* core rev>= 22 only */ | ||
| 137 | #define B43_MMIO_SMPL_CLCT_STPPTR 0x554 /* core rev>= 22 only */ | ||
| 138 | #define B43_MMIO_SMPL_CLCT_CURPTR 0x556 /* core rev>= 22 only */ | ||
| 139 | #define B43_MMIO_XMTTPLATEDATALO 0x560 | ||
| 140 | #define B43_MMIO_XMTTPLATEDATAHI 0x562 | ||
| 141 | #define B43_MMIO_XMTSEL 0x568 | ||
| 142 | #define B43_MMIO_XMTTXCNT 0x56A | ||
| 143 | #define B43_MMIO_XMTTXSHMADDR 0x56C | ||
| 115 | #define B43_MMIO_TSF_CFP_START_LOW 0x604 | 144 | #define B43_MMIO_TSF_CFP_START_LOW 0x604 |
| 116 | #define B43_MMIO_TSF_CFP_START_HIGH 0x606 | 145 | #define B43_MMIO_TSF_CFP_START_HIGH 0x606 |
| 117 | #define B43_MMIO_TSF_CFP_PRETBTT 0x612 | 146 | #define B43_MMIO_TSF_CFP_PRETBTT 0x612 |
| 147 | #define B43_MMIO_TSF_CLK_FRAC_LOW 0x62E | ||
| 148 | #define B43_MMIO_TSF_CLK_FRAC_HIGH 0x630 | ||
| 118 | #define B43_MMIO_TSF_0 0x632 /* core rev < 3 only */ | 149 | #define B43_MMIO_TSF_0 0x632 /* core rev < 3 only */ |
| 119 | #define B43_MMIO_TSF_1 0x634 /* core rev < 3 only */ | 150 | #define B43_MMIO_TSF_1 0x634 /* core rev < 3 only */ |
| 120 | #define B43_MMIO_TSF_2 0x636 /* core rev < 3 only */ | 151 | #define B43_MMIO_TSF_2 0x636 /* core rev < 3 only */ |
| 121 | #define B43_MMIO_TSF_3 0x638 /* core rev < 3 only */ | 152 | #define B43_MMIO_TSF_3 0x638 /* core rev < 3 only */ |
| 122 | #define B43_MMIO_RNG 0x65A | 153 | #define B43_MMIO_RNG 0x65A |
| 123 | #define B43_MMIO_IFSSLOT 0x684 /* Interframe slot time */ | 154 | #define B43_MMIO_IFSSLOT 0x684 /* Interframe slot time */ |
| 124 | #define B43_MMIO_IFSCTL 0x688 /* Interframe space control */ | 155 | #define B43_MMIO_IFSCTL 0x688 /* Interframe space control */ |
| 156 | #define B43_MMIO_IFSSTAT 0x690 | ||
| 157 | #define B43_MMIO_IFSMEDBUSYCTL 0x692 | ||
| 158 | #define B43_MMIO_IFTXDUR 0x694 | ||
| 125 | #define B43_MMIO_IFSCTL_USE_EDCF 0x0004 | 159 | #define B43_MMIO_IFSCTL_USE_EDCF 0x0004 |
| 126 | #define B43_MMIO_POWERUP_DELAY 0x6A8 | 160 | #define B43_MMIO_POWERUP_DELAY 0x6A8 |
| 127 | #define B43_MMIO_BTCOEX_CTL 0x6B4 /* Bluetooth Coexistence Control */ | 161 | #define B43_MMIO_BTCOEX_CTL 0x6B4 /* Bluetooth Coexistence Control */ |
| 128 | #define B43_MMIO_BTCOEX_STAT 0x6B6 /* Bluetooth Coexistence Status */ | 162 | #define B43_MMIO_BTCOEX_STAT 0x6B6 /* Bluetooth Coexistence Status */ |
| 129 | #define B43_MMIO_BTCOEX_TXCTL 0x6B8 /* Bluetooth Coexistence Transmit Control */ | 163 | #define B43_MMIO_BTCOEX_TXCTL 0x6B8 /* Bluetooth Coexistence Transmit Control */ |
| 164 | #define B43_MMIO_WEPCTL 0x7C0 | ||
| 130 | 165 | ||
| 131 | /* SPROM boardflags_lo values */ | 166 | /* SPROM boardflags_lo values */ |
| 132 | #define B43_BFL_BTCOEXIST 0x0001 /* implements Bluetooth coexistance */ | 167 | #define B43_BFL_BTCOEXIST 0x0001 /* implements Bluetooth coexistance */ |
| @@ -594,6 +629,7 @@ struct b43_dma { | |||
| 594 | struct b43_dmaring *rx_ring; | 629 | struct b43_dmaring *rx_ring; |
| 595 | 630 | ||
| 596 | u32 translation; /* Routing bits */ | 631 | u32 translation; /* Routing bits */ |
| 632 | bool translation_in_low; /* Should translation bit go into low addr? */ | ||
| 597 | bool parity; /* Check for parity */ | 633 | bool parity; /* Check for parity */ |
| 598 | }; | 634 | }; |
| 599 | 635 | ||
| @@ -694,6 +730,12 @@ struct b43_firmware_file { | |||
| 694 | enum b43_firmware_file_type type; | 730 | enum b43_firmware_file_type type; |
| 695 | }; | 731 | }; |
| 696 | 732 | ||
| 733 | enum b43_firmware_hdr_format { | ||
| 734 | B43_FW_HDR_598, | ||
| 735 | B43_FW_HDR_410, | ||
| 736 | B43_FW_HDR_351, | ||
| 737 | }; | ||
| 738 | |||
| 697 | /* Pointers to the firmware data and meta information about it. */ | 739 | /* Pointers to the firmware data and meta information about it. */ |
| 698 | struct b43_firmware { | 740 | struct b43_firmware { |
| 699 | /* Microcode */ | 741 | /* Microcode */ |
| @@ -710,6 +752,9 @@ struct b43_firmware { | |||
| 710 | /* Firmware patchlevel */ | 752 | /* Firmware patchlevel */ |
| 711 | u16 patch; | 753 | u16 patch; |
| 712 | 754 | ||
| 755 | /* Format of header used by firmware */ | ||
| 756 | enum b43_firmware_hdr_format hdr_format; | ||
| 757 | |||
| 713 | /* Set to true, if we are using an opensource firmware. | 758 | /* Set to true, if we are using an opensource firmware. |
| 714 | * Use this to check for proprietary vs opensource. */ | 759 | * Use this to check for proprietary vs opensource. */ |
| 715 | bool opensource; | 760 | bool opensource; |
| @@ -875,7 +920,7 @@ struct b43_wl { | |||
| 875 | struct b43_leds leds; | 920 | struct b43_leds leds; |
| 876 | 921 | ||
| 877 | /* Kmalloc'ed scratch space for PIO TX/RX. Protected by wl->mutex. */ | 922 | /* Kmalloc'ed scratch space for PIO TX/RX. Protected by wl->mutex. */ |
| 878 | u8 pio_scratchspace[110] __attribute__((__aligned__(8))); | 923 | u8 pio_scratchspace[118] __attribute__((__aligned__(8))); |
| 879 | u8 pio_tailspace[4] __attribute__((__aligned__(8))); | 924 | u8 pio_tailspace[4] __attribute__((__aligned__(8))); |
| 880 | }; | 925 | }; |
| 881 | 926 | ||
| @@ -965,21 +1010,11 @@ static inline bool b43_using_pio_transfers(struct b43_wldev *dev) | |||
| 965 | return dev->__using_pio_transfers; | 1010 | return dev->__using_pio_transfers; |
| 966 | } | 1011 | } |
| 967 | 1012 | ||
| 968 | #ifdef CONFIG_B43_FORCE_PIO | ||
| 969 | # define B43_PIO_DEFAULT 1 | ||
| 970 | #else | ||
| 971 | # define B43_PIO_DEFAULT 0 | ||
| 972 | #endif | ||
| 973 | |||
| 974 | /* Message printing */ | 1013 | /* Message printing */ |
| 975 | void b43info(struct b43_wl *wl, const char *fmt, ...) | 1014 | __printf(2, 3) void b43info(struct b43_wl *wl, const char *fmt, ...); |
| 976 | __attribute__ ((format(printf, 2, 3))); | 1015 | __printf(2, 3) void b43err(struct b43_wl *wl, const char *fmt, ...); |
| 977 | void b43err(struct b43_wl *wl, const char *fmt, ...) | 1016 | __printf(2, 3) void b43warn(struct b43_wl *wl, const char *fmt, ...); |
| 978 | __attribute__ ((format(printf, 2, 3))); | 1017 | __printf(2, 3) void b43dbg(struct b43_wl *wl, const char *fmt, ...); |
| 979 | void b43warn(struct b43_wl *wl, const char *fmt, ...) | ||
| 980 | __attribute__ ((format(printf, 2, 3))); | ||
| 981 | void b43dbg(struct b43_wl *wl, const char *fmt, ...) | ||
| 982 | __attribute__ ((format(printf, 2, 3))); | ||
| 983 | 1018 | ||
| 984 | 1019 | ||
| 985 | /* A WARN_ON variant that vanishes when b43 debugging is disabled. | 1020 | /* A WARN_ON variant that vanishes when b43 debugging is disabled. |
