Daniel Drake | 66bb42f | 2007-11-19 16:20:12 +0000 | [diff] [blame] | 1 | /* ZD1211 USB-WLAN driver for Linux |
| 2 | * |
| 3 | * Copyright (C) 2005-2007 Ulrich Kunitz <kune@deine-taler.de> |
| 4 | * Copyright (C) 2006-2007 Daniel Drake <dsd@gentoo.org> |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
Jeff Kirsher | f47cdae | 2013-12-06 03:32:10 -0800 | [diff] [blame] | 17 | * along with this program; if not, see <http://www.gnu.org/licenses/>. |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 18 | */ |
| 19 | |
| 20 | #ifndef _ZD_MAC_H |
| 21 | #define _ZD_MAC_H |
| 22 | |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 23 | #include <linux/kernel.h> |
Daniel Drake | 459c51a | 2007-11-19 15:00:29 +0000 | [diff] [blame] | 24 | #include <net/mac80211.h> |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 25 | |
| 26 | #include "zd_chip.h" |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 27 | |
| 28 | struct zd_ctrlset { |
| 29 | u8 modulation; |
| 30 | __le16 tx_length; |
| 31 | u8 control; |
| 32 | /* stores only the difference to tx_length on ZD1211B */ |
| 33 | __le16 packet_length; |
| 34 | __le16 current_length; |
| 35 | u8 service; |
| 36 | __le16 next_frame_length; |
Eric Dumazet | ba2d358 | 2010-06-02 18:10:09 +0000 | [diff] [blame] | 37 | } __packed; |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 38 | |
| 39 | #define ZD_CS_RESERVED_SIZE 25 |
| 40 | |
Ulrich Kunitz | 64f222c | 2007-08-06 01:24:31 +0100 | [diff] [blame] | 41 | /* The field modulation of struct zd_ctrlset controls the bit rate, the use |
| 42 | * of short or long preambles in 802.11b (CCK mode) or the use of 802.11a or |
| 43 | * 802.11g in OFDM mode. |
| 44 | * |
| 45 | * The term zd-rate is used for the combination of the modulation type flag |
| 46 | * and the "pure" rate value. |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 47 | */ |
Ulrich Kunitz | 64f222c | 2007-08-06 01:24:31 +0100 | [diff] [blame] | 48 | #define ZD_PURE_RATE_MASK 0x0f |
| 49 | #define ZD_MODULATION_TYPE_MASK 0x10 |
| 50 | #define ZD_RATE_MASK (ZD_PURE_RATE_MASK|ZD_MODULATION_TYPE_MASK) |
| 51 | #define ZD_PURE_RATE(modulation) ((modulation) & ZD_PURE_RATE_MASK) |
| 52 | #define ZD_MODULATION_TYPE(modulation) ((modulation) & ZD_MODULATION_TYPE_MASK) |
| 53 | #define ZD_RATE(modulation) ((modulation) & ZD_RATE_MASK) |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 54 | |
Ulrich Kunitz | 64f222c | 2007-08-06 01:24:31 +0100 | [diff] [blame] | 55 | /* The two possible modulation types. Notify that 802.11b doesn't use the CCK |
| 56 | * codeing for the 1 and 2 MBit/s rate. We stay with the term here to remain |
| 57 | * consistent with uses the term at other places. |
Daniel Drake | 459c51a | 2007-11-19 15:00:29 +0000 | [diff] [blame] | 58 | */ |
Ulrich Kunitz | 64f222c | 2007-08-06 01:24:31 +0100 | [diff] [blame] | 59 | #define ZD_CCK 0x00 |
| 60 | #define ZD_OFDM 0x10 |
| 61 | |
| 62 | /* The ZD1211 firmware uses proprietary encodings of the 802.11b (CCK) rates. |
| 63 | * For OFDM the PLCP rate encodings are used. We combine these "pure" rates |
| 64 | * with the modulation type flag and call the resulting values zd-rates. |
| 65 | */ |
| 66 | #define ZD_CCK_RATE_1M (ZD_CCK|0x00) |
| 67 | #define ZD_CCK_RATE_2M (ZD_CCK|0x01) |
| 68 | #define ZD_CCK_RATE_5_5M (ZD_CCK|0x02) |
| 69 | #define ZD_CCK_RATE_11M (ZD_CCK|0x03) |
| 70 | #define ZD_OFDM_RATE_6M (ZD_OFDM|ZD_OFDM_PLCP_RATE_6M) |
| 71 | #define ZD_OFDM_RATE_9M (ZD_OFDM|ZD_OFDM_PLCP_RATE_9M) |
| 72 | #define ZD_OFDM_RATE_12M (ZD_OFDM|ZD_OFDM_PLCP_RATE_12M) |
| 73 | #define ZD_OFDM_RATE_18M (ZD_OFDM|ZD_OFDM_PLCP_RATE_18M) |
| 74 | #define ZD_OFDM_RATE_24M (ZD_OFDM|ZD_OFDM_PLCP_RATE_24M) |
| 75 | #define ZD_OFDM_RATE_36M (ZD_OFDM|ZD_OFDM_PLCP_RATE_36M) |
| 76 | #define ZD_OFDM_RATE_48M (ZD_OFDM|ZD_OFDM_PLCP_RATE_48M) |
| 77 | #define ZD_OFDM_RATE_54M (ZD_OFDM|ZD_OFDM_PLCP_RATE_54M) |
| 78 | |
| 79 | /* The bit 5 of the zd_ctrlset modulation field controls the preamble in CCK |
| 80 | * mode or the 802.11a/802.11g selection in OFDM mode. |
| 81 | */ |
| 82 | #define ZD_CCK_PREA_LONG 0x00 |
| 83 | #define ZD_CCK_PREA_SHORT 0x20 |
| 84 | #define ZD_OFDM_MODE_11G 0x00 |
| 85 | #define ZD_OFDM_MODE_11A 0x20 |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 86 | |
| 87 | /* zd_ctrlset control field */ |
| 88 | #define ZD_CS_NEED_RANDOM_BACKOFF 0x01 |
Gábor Stefanik | 13bdcd9 | 2009-05-14 17:34:59 +0000 | [diff] [blame] | 89 | #define ZD_CS_NO_ACK 0x02 |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 90 | |
| 91 | #define ZD_CS_FRAME_TYPE_MASK 0x0c |
| 92 | #define ZD_CS_DATA_FRAME 0x00 |
| 93 | #define ZD_CS_PS_POLL_FRAME 0x04 |
| 94 | #define ZD_CS_MANAGEMENT_FRAME 0x08 |
| 95 | #define ZD_CS_NO_SEQUENCE_CTL_FRAME 0x0c |
| 96 | |
| 97 | #define ZD_CS_WAKE_DESTINATION 0x10 |
| 98 | #define ZD_CS_RTS 0x20 |
| 99 | #define ZD_CS_ENCRYPT 0x40 |
| 100 | #define ZD_CS_SELF_CTS 0x80 |
| 101 | |
| 102 | /* Incoming frames are prepended by a PLCP header */ |
| 103 | #define ZD_PLCP_HEADER_SIZE 5 |
| 104 | |
| 105 | struct rx_length_info { |
| 106 | __le16 length[3]; |
| 107 | __le16 tag; |
Eric Dumazet | ba2d358 | 2010-06-02 18:10:09 +0000 | [diff] [blame] | 108 | } __packed; |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 109 | |
| 110 | #define RX_LENGTH_INFO_TAG 0x697e |
| 111 | |
| 112 | struct rx_status { |
Ulrich Kunitz | db888ae | 2006-08-29 23:50:29 +0100 | [diff] [blame] | 113 | u8 signal_quality_cck; |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 114 | /* rssi */ |
| 115 | u8 signal_strength; |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 116 | u8 signal_quality_ofdm; |
| 117 | u8 decryption_type; |
| 118 | u8 frame_status; |
Eric Dumazet | ba2d358 | 2010-06-02 18:10:09 +0000 | [diff] [blame] | 119 | } __packed; |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 120 | |
| 121 | /* rx_status field decryption_type */ |
| 122 | #define ZD_RX_NO_WEP 0 |
| 123 | #define ZD_RX_WEP64 1 |
| 124 | #define ZD_RX_TKIP 2 |
| 125 | #define ZD_RX_AES 4 |
| 126 | #define ZD_RX_WEP128 5 |
| 127 | #define ZD_RX_WEP256 6 |
| 128 | |
| 129 | /* rx_status field frame_status */ |
| 130 | #define ZD_RX_FRAME_MODULATION_MASK 0x01 |
| 131 | #define ZD_RX_CCK 0x00 |
| 132 | #define ZD_RX_OFDM 0x01 |
| 133 | |
| 134 | #define ZD_RX_TIMEOUT_ERROR 0x02 |
| 135 | #define ZD_RX_FIFO_OVERRUN_ERROR 0x04 |
| 136 | #define ZD_RX_DECRYPTION_ERROR 0x08 |
| 137 | #define ZD_RX_CRC32_ERROR 0x10 |
| 138 | #define ZD_RX_NO_ADDR1_MATCH_ERROR 0x20 |
| 139 | #define ZD_RX_CRC16_ERROR 0x40 |
| 140 | #define ZD_RX_ERROR 0x80 |
| 141 | |
Benoit PAPILLAULT | 7f4013f | 2009-10-22 12:04:52 +0200 | [diff] [blame] | 142 | struct tx_retry_rate { |
| 143 | int count; /* number of valid element in rate[] array */ |
| 144 | int rate[10]; /* retry rates, described by an index in zd_rates[] */ |
| 145 | }; |
| 146 | |
| 147 | struct tx_status { |
| 148 | u8 type; /* must always be 0x01 : USB_INT_TYPE */ |
| 149 | u8 id; /* must always be 0xa0 : USB_INT_ID_RETRY_FAILED */ |
| 150 | u8 rate; |
| 151 | u8 pad; |
| 152 | u8 mac[ETH_ALEN]; |
| 153 | u8 retry; |
| 154 | u8 failure; |
Eric Dumazet | ba2d358 | 2010-06-02 18:10:09 +0000 | [diff] [blame] | 155 | } __packed; |
Benoit PAPILLAULT | 7f4013f | 2009-10-22 12:04:52 +0200 | [diff] [blame] | 156 | |
Daniel Drake | 459c51a | 2007-11-19 15:00:29 +0000 | [diff] [blame] | 157 | enum mac_flags { |
| 158 | MAC_FIXED_CHANNEL = 0x01, |
| 159 | }; |
| 160 | |
Ulrich Kunitz | 583afd1e | 2006-09-13 02:42:38 +0100 | [diff] [blame] | 161 | struct housekeeping { |
David Howells | c402895 | 2006-11-22 14:57:56 +0000 | [diff] [blame] | 162 | struct delayed_work link_led_work; |
Ulrich Kunitz | 583afd1e | 2006-09-13 02:42:38 +0100 | [diff] [blame] | 163 | }; |
| 164 | |
Jussi Kivilinna | 9be2325 | 2011-01-31 20:48:55 +0200 | [diff] [blame] | 165 | struct beacon { |
| 166 | struct delayed_work watchdog_work; |
Jussi Kivilinna | f762d8c | 2011-06-20 14:42:39 +0300 | [diff] [blame] | 167 | struct sk_buff *cur_beacon; |
Jussi Kivilinna | 9be2325 | 2011-01-31 20:48:55 +0200 | [diff] [blame] | 168 | unsigned long last_update; |
| 169 | u16 interval; |
| 170 | u8 period; |
| 171 | }; |
| 172 | |
| 173 | enum zd_device_flags { |
| 174 | ZD_DEVICE_RUNNING, |
| 175 | }; |
| 176 | |
Ulrich Kunitz | db888ae | 2006-08-29 23:50:29 +0100 | [diff] [blame] | 177 | #define ZD_MAC_STATS_BUFFER_SIZE 16 |
| 178 | |
Benoit PAPILLAULT | 7f4013f | 2009-10-22 12:04:52 +0200 | [diff] [blame] | 179 | #define ZD_MAC_MAX_ACK_WAITERS 50 |
Daniel Drake | 459c51a | 2007-11-19 15:00:29 +0000 | [diff] [blame] | 180 | |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 181 | struct zd_mac { |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 182 | struct zd_chip chip; |
| 183 | spinlock_t lock; |
Luis Carlos Cobo | 72e77a8 | 2008-03-03 12:32:15 -0800 | [diff] [blame] | 184 | spinlock_t intr_lock; |
Daniel Drake | 459c51a | 2007-11-19 15:00:29 +0000 | [diff] [blame] | 185 | struct ieee80211_hw *hw; |
Jussi Kivilinna | c2fadcb | 2011-01-31 20:48:06 +0200 | [diff] [blame] | 186 | struct ieee80211_vif *vif; |
Ulrich Kunitz | 583afd1e | 2006-09-13 02:42:38 +0100 | [diff] [blame] | 187 | struct housekeeping housekeeping; |
Jussi Kivilinna | 9be2325 | 2011-01-31 20:48:55 +0200 | [diff] [blame] | 188 | struct beacon beacon; |
Daniel Drake | 459c51a | 2007-11-19 15:00:29 +0000 | [diff] [blame] | 189 | struct work_struct set_rts_cts_work; |
Luis Carlos Cobo | 72e77a8 | 2008-03-03 12:32:15 -0800 | [diff] [blame] | 190 | struct work_struct process_intr; |
Ulrich Kunitz | 9cdac96 | 2006-12-01 00:58:07 +0000 | [diff] [blame] | 191 | struct zd_mc_hash multicast_hash; |
Luis Carlos Cobo | 72e77a8 | 2008-03-03 12:32:15 -0800 | [diff] [blame] | 192 | u8 intr_buffer[USB_MAX_EP_INT_BUFFER]; |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 193 | u8 regdomain; |
| 194 | u8 default_regdomain; |
Jussi Kivilinna | 212e1a5 | 2011-01-31 20:49:43 +0200 | [diff] [blame] | 195 | u8 channel; |
Daniel Drake | 459c51a | 2007-11-19 15:00:29 +0000 | [diff] [blame] | 196 | int type; |
| 197 | int associated; |
Jussi Kivilinna | 9be2325 | 2011-01-31 20:48:55 +0200 | [diff] [blame] | 198 | unsigned long flags; |
Daniel Drake | 459c51a | 2007-11-19 15:00:29 +0000 | [diff] [blame] | 199 | struct sk_buff_head ack_wait_queue; |
| 200 | struct ieee80211_channel channels[14]; |
| 201 | struct ieee80211_rate rates[12]; |
Johannes Berg | 8318d78 | 2008-01-24 19:38:38 +0100 | [diff] [blame] | 202 | struct ieee80211_supported_band band; |
Daniel Drake | b1382ed | 2006-11-22 00:06:48 +0000 | [diff] [blame] | 203 | |
| 204 | /* Short preamble (used for RTS/CTS) */ |
| 205 | unsigned int short_preamble:1; |
| 206 | |
Daniel Drake | 459c51a | 2007-11-19 15:00:29 +0000 | [diff] [blame] | 207 | /* whether to pass frames with CRC errors to stack */ |
| 208 | unsigned int pass_failed_fcs:1; |
| 209 | |
| 210 | /* whether to pass control frames to stack */ |
| 211 | unsigned int pass_ctrl:1; |
Benoit PAPILLAULT | 7f4013f | 2009-10-22 12:04:52 +0200 | [diff] [blame] | 212 | |
| 213 | /* whether we have received a 802.11 ACK that is pending */ |
| 214 | unsigned int ack_pending:1; |
| 215 | |
| 216 | /* signal strength of the last 802.11 ACK received */ |
| 217 | int ack_signal; |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 218 | }; |
| 219 | |
Luis R. Rodriguez | e83a107 | 2008-09-09 23:19:49 -0700 | [diff] [blame] | 220 | #define ZD_REGDOMAIN_FCC 0x10 |
| 221 | #define ZD_REGDOMAIN_IC 0x20 |
| 222 | #define ZD_REGDOMAIN_ETSI 0x30 |
| 223 | #define ZD_REGDOMAIN_SPAIN 0x31 |
| 224 | #define ZD_REGDOMAIN_FRANCE 0x32 |
John W. Linville | 3d3b33b | 2010-06-16 14:41:36 -0400 | [diff] [blame] | 225 | #define ZD_REGDOMAIN_JAPAN_2 0x40 |
Luis R. Rodriguez | e83a107 | 2008-09-09 23:19:49 -0700 | [diff] [blame] | 226 | #define ZD_REGDOMAIN_JAPAN 0x41 |
John W. Linville | 3d3b33b | 2010-06-16 14:41:36 -0400 | [diff] [blame] | 227 | #define ZD_REGDOMAIN_JAPAN_3 0x49 |
Luis R. Rodriguez | e83a107 | 2008-09-09 23:19:49 -0700 | [diff] [blame] | 228 | |
| 229 | enum { |
| 230 | MIN_CHANNEL24 = 1, |
| 231 | MAX_CHANNEL24 = 14, |
| 232 | }; |
| 233 | |
| 234 | #define ZD_PLCP_SERVICE_LENGTH_EXTENSION 0x80 |
| 235 | |
| 236 | struct ofdm_plcp_header { |
| 237 | u8 prefix[3]; |
| 238 | __le16 service; |
Eric Dumazet | ba2d358 | 2010-06-02 18:10:09 +0000 | [diff] [blame] | 239 | } __packed; |
Luis R. Rodriguez | e83a107 | 2008-09-09 23:19:49 -0700 | [diff] [blame] | 240 | |
| 241 | static inline u8 zd_ofdm_plcp_header_rate(const struct ofdm_plcp_header *header) |
| 242 | { |
| 243 | return header->prefix[0] & 0xf; |
| 244 | } |
| 245 | |
| 246 | /* The following defines give the encoding of the 4-bit rate field in the |
| 247 | * OFDM (802.11a/802.11g) PLCP header. Notify that these values are used to |
| 248 | * define the zd-rate values for OFDM. |
| 249 | * |
| 250 | * See the struct zd_ctrlset definition in zd_mac.h. |
| 251 | */ |
| 252 | #define ZD_OFDM_PLCP_RATE_6M 0xb |
| 253 | #define ZD_OFDM_PLCP_RATE_9M 0xf |
| 254 | #define ZD_OFDM_PLCP_RATE_12M 0xa |
| 255 | #define ZD_OFDM_PLCP_RATE_18M 0xe |
| 256 | #define ZD_OFDM_PLCP_RATE_24M 0x9 |
| 257 | #define ZD_OFDM_PLCP_RATE_36M 0xd |
| 258 | #define ZD_OFDM_PLCP_RATE_48M 0x8 |
| 259 | #define ZD_OFDM_PLCP_RATE_54M 0xc |
| 260 | |
| 261 | struct cck_plcp_header { |
| 262 | u8 signal; |
| 263 | u8 service; |
| 264 | __le16 length; |
| 265 | __le16 crc16; |
Eric Dumazet | ba2d358 | 2010-06-02 18:10:09 +0000 | [diff] [blame] | 266 | } __packed; |
Luis R. Rodriguez | e83a107 | 2008-09-09 23:19:49 -0700 | [diff] [blame] | 267 | |
| 268 | static inline u8 zd_cck_plcp_header_signal(const struct cck_plcp_header *header) |
| 269 | { |
| 270 | return header->signal; |
| 271 | } |
| 272 | |
| 273 | /* These defines give the encodings of the signal field in the 802.11b PLCP |
| 274 | * header. The signal field gives the bit rate of the following packet. Even |
| 275 | * if technically wrong we use CCK here also for the 1 MBit/s and 2 MBit/s |
| 276 | * rate to stay consistent with Zydas and our use of the term. |
| 277 | * |
| 278 | * Notify that these values are *not* used in the zd-rates. |
| 279 | */ |
| 280 | #define ZD_CCK_PLCP_SIGNAL_1M 0x0a |
| 281 | #define ZD_CCK_PLCP_SIGNAL_2M 0x14 |
| 282 | #define ZD_CCK_PLCP_SIGNAL_5M5 0x37 |
| 283 | #define ZD_CCK_PLCP_SIGNAL_11M 0x6e |
| 284 | |
Daniel Drake | 459c51a | 2007-11-19 15:00:29 +0000 | [diff] [blame] | 285 | static inline struct zd_mac *zd_hw_mac(struct ieee80211_hw *hw) |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 286 | { |
Daniel Drake | 459c51a | 2007-11-19 15:00:29 +0000 | [diff] [blame] | 287 | return hw->priv; |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 288 | } |
| 289 | |
| 290 | static inline struct zd_mac *zd_chip_to_mac(struct zd_chip *chip) |
| 291 | { |
| 292 | return container_of(chip, struct zd_mac, chip); |
| 293 | } |
| 294 | |
| 295 | static inline struct zd_mac *zd_usb_to_mac(struct zd_usb *usb) |
| 296 | { |
| 297 | return zd_chip_to_mac(zd_usb_to_chip(usb)); |
| 298 | } |
| 299 | |
Daniel Drake | 459c51a | 2007-11-19 15:00:29 +0000 | [diff] [blame] | 300 | static inline u8 *zd_mac_get_perm_addr(struct zd_mac *mac) |
| 301 | { |
| 302 | return mac->hw->wiphy->perm_addr; |
| 303 | } |
| 304 | |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 305 | #define zd_mac_dev(mac) (zd_chip_dev(&(mac)->chip)) |
| 306 | |
Daniel Drake | 459c51a | 2007-11-19 15:00:29 +0000 | [diff] [blame] | 307 | struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf); |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 308 | void zd_mac_clear(struct zd_mac *mac); |
| 309 | |
Daniel Drake | 459c51a | 2007-11-19 15:00:29 +0000 | [diff] [blame] | 310 | int zd_mac_preinit_hw(struct ieee80211_hw *hw); |
| 311 | int zd_mac_init_hw(struct ieee80211_hw *hw); |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 312 | |
Daniel Drake | 459c51a | 2007-11-19 15:00:29 +0000 | [diff] [blame] | 313 | int zd_mac_rx(struct ieee80211_hw *hw, const u8 *buffer, unsigned int length); |
Benoit PAPILLAULT | 7f4013f | 2009-10-22 12:04:52 +0200 | [diff] [blame] | 314 | void zd_mac_tx_failed(struct urb *urb); |
Daniel Drake | 459c51a | 2007-11-19 15:00:29 +0000 | [diff] [blame] | 315 | void zd_mac_tx_to_dev(struct sk_buff *skb, int error); |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 316 | |
Jussi Kivilinna | a0fd751 | 2011-01-31 20:49:52 +0200 | [diff] [blame] | 317 | int zd_op_start(struct ieee80211_hw *hw); |
| 318 | void zd_op_stop(struct ieee80211_hw *hw); |
Jussi Kivilinna | 212e1a5 | 2011-01-31 20:49:43 +0200 | [diff] [blame] | 319 | int zd_restore_settings(struct zd_mac *mac); |
| 320 | |
Daniel Drake | e85d091 | 2006-06-02 17:11:32 +0100 | [diff] [blame] | 321 | #ifdef DEBUG |
| 322 | void zd_dump_rx_status(const struct rx_status *status); |
| 323 | #else |
| 324 | #define zd_dump_rx_status(status) |
| 325 | #endif /* DEBUG */ |
| 326 | |
| 327 | #endif /* _ZD_MAC_H */ |