diff options
Diffstat (limited to 'drivers/net/wireless/bcm43xx/bcm43xx_main.h')
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_main.h | 131 |
1 files changed, 0 insertions, 131 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.h b/drivers/net/wireless/bcm43xx/bcm43xx_main.h index d460393ed343..086136c3d01f 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.h | |||
@@ -52,134 +52,12 @@ static inline void e_aton(char *str, char *dest) | |||
52 | } | 52 | } |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | |||
56 | #define _bcm43xx_declare_plcp_hdr(size) \ | ||
57 | struct bcm43xx_plcp_hdr##size { \ | ||
58 | union { \ | ||
59 | __le32 data; \ | ||
60 | __u8 raw[size]; \ | ||
61 | } __attribute__((__packed__)); \ | ||
62 | } __attribute__((__packed__)) | ||
63 | |||
64 | /* struct bcm43xx_plcp_hdr4 */ | ||
65 | _bcm43xx_declare_plcp_hdr(4); | ||
66 | /* struct bcm430c_plcp_hdr6 */ | ||
67 | _bcm43xx_declare_plcp_hdr(6); | ||
68 | |||
69 | #undef _bcm43xx_declare_plcp_hdr | ||
70 | |||
71 | |||
72 | #define P4D_BYT3S(magic, nr_bytes) u8 __p4dding##magic[nr_bytes] | 55 | #define P4D_BYT3S(magic, nr_bytes) u8 __p4dding##magic[nr_bytes] |
73 | #define P4D_BYTES(line, nr_bytes) P4D_BYT3S(line, nr_bytes) | 56 | #define P4D_BYTES(line, nr_bytes) P4D_BYT3S(line, nr_bytes) |
74 | /* Magic helper macro to pad structures. Ignore those above. It's magic. */ | 57 | /* Magic helper macro to pad structures. Ignore those above. It's magic. */ |
75 | #define PAD_BYTES(nr_bytes) P4D_BYTES( __LINE__ , (nr_bytes)) | 58 | #define PAD_BYTES(nr_bytes) P4D_BYTES( __LINE__ , (nr_bytes)) |
76 | 59 | ||
77 | 60 | ||
78 | /* Device specific TX header. To be prepended to TX frames. */ | ||
79 | struct bcm43xx_txhdr { | ||
80 | union { | ||
81 | struct { | ||
82 | u16 flags; | ||
83 | u16 wsec_rate; | ||
84 | u16 frame_control; | ||
85 | u16 unknown_zeroed_0; | ||
86 | u16 control; | ||
87 | unsigned char wep_iv[10]; | ||
88 | unsigned char unknown_wsec_tkip_data[3]; //FIXME | ||
89 | PAD_BYTES(3); | ||
90 | unsigned char mac1[6]; | ||
91 | u16 unknown_zeroed_1; | ||
92 | struct bcm43xx_plcp_hdr4 rts_cts_fallback_plcp; | ||
93 | u16 rts_cts_dur_fallback; | ||
94 | struct bcm43xx_plcp_hdr4 fallback_plcp; | ||
95 | u16 fallback_dur_id; | ||
96 | PAD_BYTES(2); | ||
97 | u16 cookie; | ||
98 | u16 unknown_scb_stuff; //FIXME | ||
99 | struct bcm43xx_plcp_hdr6 rts_cts_plcp; | ||
100 | u16 rts_cts_frame_type; | ||
101 | u16 rts_cts_dur; | ||
102 | unsigned char rts_cts_mac1[6]; | ||
103 | unsigned char rts_cts_mac2[6]; | ||
104 | PAD_BYTES(2); | ||
105 | struct bcm43xx_plcp_hdr6 plcp; | ||
106 | } __attribute__((__packed__)); | ||
107 | |||
108 | unsigned char raw[82]; | ||
109 | } __attribute__((__packed__)); | ||
110 | } __attribute__((__packed__)); | ||
111 | |||
112 | struct sk_buff; | ||
113 | |||
114 | void bcm43xx_generate_txhdr(struct bcm43xx_private *bcm, | ||
115 | struct bcm43xx_txhdr *txhdr, | ||
116 | const unsigned char *fragment_data, | ||
117 | const unsigned int fragment_len, | ||
118 | const int is_first_fragment, | ||
119 | const u16 cookie); | ||
120 | |||
121 | /* RX header as received from the hardware. */ | ||
122 | struct bcm43xx_rxhdr { | ||
123 | /* Frame Length. Must be generated explicitely in PIO mode. */ | ||
124 | __le16 frame_length; | ||
125 | PAD_BYTES(2); | ||
126 | /* Flags field 1 */ | ||
127 | __le16 flags1; | ||
128 | u8 rssi; | ||
129 | u8 signal_quality; | ||
130 | PAD_BYTES(2); | ||
131 | /* Flags field 3 */ | ||
132 | __le16 flags3; | ||
133 | /* Flags field 2 */ | ||
134 | __le16 flags2; | ||
135 | /* Lower 16bits of the TSF at the time the frame started. */ | ||
136 | __le16 mactime; | ||
137 | PAD_BYTES(14); | ||
138 | } __attribute__((__packed__)); | ||
139 | |||
140 | #define BCM43xx_RXHDR_FLAGS1_OFDM (1 << 0) | ||
141 | /*#define BCM43xx_RXHDR_FLAGS1_SIGNAL??? (1 << 3) FIXME */ | ||
142 | #define BCM43xx_RXHDR_FLAGS1_SHORTPREAMBLE (1 << 7) | ||
143 | #define BCM43xx_RXHDR_FLAGS1_2053RSSIADJ (1 << 14) | ||
144 | |||
145 | #define BCM43xx_RXHDR_FLAGS2_INVALIDFRAME (1 << 0) | ||
146 | #define BCM43xx_RXHDR_FLAGS2_TYPE2FRAME (1 << 2) | ||
147 | /*FIXME: WEP related flags */ | ||
148 | |||
149 | #define BCM43xx_RXHDR_FLAGS3_2050RSSIADJ (1 << 10) | ||
150 | |||
151 | /* Transmit Status as received from the hardware. */ | ||
152 | struct bcm43xx_hwxmitstatus { | ||
153 | PAD_BYTES(4); | ||
154 | __le16 cookie; | ||
155 | u8 flags; | ||
156 | u8 cnt1:4, | ||
157 | cnt2:4; | ||
158 | PAD_BYTES(2); | ||
159 | __le16 seq; | ||
160 | __le16 unknown; //FIXME | ||
161 | } __attribute__((__packed__)); | ||
162 | |||
163 | /* Transmit Status in CPU byteorder. */ | ||
164 | struct bcm43xx_xmitstatus { | ||
165 | u16 cookie; | ||
166 | u8 flags; | ||
167 | u8 cnt1:4, | ||
168 | cnt2:4; | ||
169 | u16 seq; | ||
170 | u16 unknown; //FIXME | ||
171 | }; | ||
172 | |||
173 | #define BCM43xx_TXSTAT_FLAG_ACK 0x01 | ||
174 | //TODO #define BCM43xx_TXSTAT_FLAG_??? 0x02 | ||
175 | //TODO #define BCM43xx_TXSTAT_FLAG_??? 0x04 | ||
176 | //TODO #define BCM43xx_TXSTAT_FLAG_??? 0x08 | ||
177 | //TODO #define BCM43xx_TXSTAT_FLAG_??? 0x10 | ||
178 | #define BCM43xx_TXSTAT_FLAG_IGNORE 0x20 | ||
179 | //TODO #define BCM43xx_TXSTAT_FLAG_??? 0x40 | ||
180 | //TODO #define BCM43xx_TXSTAT_FLAG_??? 0x80 | ||
181 | |||
182 | |||
183 | /* Lightweight function to convert a frequency (in Mhz) to a channel number. */ | 61 | /* Lightweight function to convert a frequency (in Mhz) to a channel number. */ |
184 | static inline | 62 | static inline |
185 | u8 bcm43xx_freq_to_channel_a(int freq) | 63 | u8 bcm43xx_freq_to_channel_a(int freq) |
@@ -259,10 +137,6 @@ int bcm43xx_is_valid_channel(struct bcm43xx_private *bcm, | |||
259 | void bcm43xx_tsf_read(struct bcm43xx_private *bcm, u64 *tsf); | 137 | void bcm43xx_tsf_read(struct bcm43xx_private *bcm, u64 *tsf); |
260 | void bcm43xx_tsf_write(struct bcm43xx_private *bcm, u64 tsf); | 138 | void bcm43xx_tsf_write(struct bcm43xx_private *bcm, u64 tsf); |
261 | 139 | ||
262 | int bcm43xx_rx(struct bcm43xx_private *bcm, | ||
263 | struct sk_buff *skb, | ||
264 | struct bcm43xx_rxhdr *rxhdr); | ||
265 | |||
266 | void bcm43xx_set_iwmode(struct bcm43xx_private *bcm, | 140 | void bcm43xx_set_iwmode(struct bcm43xx_private *bcm, |
267 | int iw_mode); | 141 | int iw_mode); |
268 | 142 | ||
@@ -283,11 +157,6 @@ int bcm43xx_switch_core(struct bcm43xx_private *bcm, struct bcm43xx_coreinfo *ne | |||
283 | 157 | ||
284 | void bcm43xx_wireless_core_reset(struct bcm43xx_private *bcm, int connect_phy); | 158 | void bcm43xx_wireless_core_reset(struct bcm43xx_private *bcm, int connect_phy); |
285 | 159 | ||
286 | int bcm43xx_pci_read_config_16(struct pci_dev *pdev, u16 offset, u16 *val); | ||
287 | int bcm43xx_pci_read_config_32(struct pci_dev *pdev, u16 offset, u32 *val); | ||
288 | int bcm43xx_pci_write_config_16(struct pci_dev *pdev, int offset, u16 val); | ||
289 | int bcm43xx_pci_write_config_32(struct pci_dev *pdev, int offset, u32 val); | ||
290 | |||
291 | void bcm43xx_mac_suspend(struct bcm43xx_private *bcm); | 160 | void bcm43xx_mac_suspend(struct bcm43xx_private *bcm); |
292 | void bcm43xx_mac_enable(struct bcm43xx_private *bcm); | 161 | void bcm43xx_mac_enable(struct bcm43xx_private *bcm); |
293 | 162 | ||