1 /***********************************************************************
2 ** Copyright (C) 2003 ACX100 Open Source Project
4 ** The contents of this file are subject to the Mozilla Public
5 ** License Version 1.1 (the "License"); you may not use this file
6 ** except in compliance with the License. You may obtain a copy of
7 ** the License at http://www.mozilla.org/MPL/
9 ** Software distributed under the License is distributed on an "AS
10 ** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
11 ** implied. See the License for the specific language governing
12 ** rights and limitations under the License.
14 ** Alternatively, the contents of this file may be used under the
15 ** terms of the GNU Public License version 2 (the "GPL"), in which
16 ** case the provisions of the GPL are applicable instead of the
17 ** above. If you wish to allow the use of your version of this file
18 ** only under the terms of the GPL and not to allow others to use
19 ** your version of this file under the MPL, indicate your decision
20 ** by deleting the provisions above and replace them with the notice
21 ** and other provisions required by the GPL. If you do not delete
22 ** the provisions above, a recipient may use your version of this
23 ** file under either the MPL or the GPL.
24 ** ---------------------------------------------------------------------
25 ** Inquiries regarding the ACX100 Open Source Project can be
28 ** acx100-users@lists.sf.net
29 ** http://acx100.sf.net
30 ** ---------------------------------------------------------------------
34 /***********************************************************************
37 ** - Avoid SHOUTING needlessly. Avoid excessive verbosity.
38 ** Gradually remove messages which are old debugging aids.
40 ** - Use printk() for messages which are to be always logged.
41 ** Supply either 'acx:' or '<devname>:' prefix so that user
42 ** can figure out who's speaking among other kernel chatter.
43 ** acx: is for general issues (e.g. "acx: no firmware image!")
44 ** while <devname>: is related to a particular device
45 ** (think about multi-card setup). Double check that message
46 ** is not confusing to the average user.
48 ** - use printk KERN_xxx level only if message is not a WARNING
49 ** but is INFO, ERR etc.
51 ** - Use printk_ratelimited() for messages which may flood
52 ** (e.g. "rx DUP pkt!").
54 ** - Use log() for messages which may be omitted (and they
55 ** _will_ be omitted in non-debug builds). Note that
56 ** message levels may be disabled at compile-time selectively,
57 ** thus select them wisely. Example: L_DEBUG is the lowest
58 ** (most likely to be compiled out) -> use for less important stuff.
60 ** - Do not print important stuff with log(), or else people
61 ** will never build non-debug driver.
64 ** hex: capital letters, zero filled (e.g. 0x02AC)
65 ** str: dont start from capitals, no trailing periods ("tx: queue is stopped")
69 void log_fn_enter(const char *funcname
);
70 void log_fn_exit(const char *funcname
);
71 void log_fn_exit_v(const char *funcname
, int v
);
75 if (unlikely(acx_debug & L_FUNC)) { \
76 log_fn_enter(__func__); \
82 if (unlikely(acx_debug & L_FUNC)) { \
83 log_fn_exit_v(__func__, v); \
88 if (unlikely(acx_debug & L_FUNC)) { \
89 log_fn_exit(__func__); \
99 #endif /* ACX_DEBUG > 1 */
104 #define log(chan, args...) \
106 if (acx_debug & (chan)) \
109 #define printk_ratelimited(args...) printk(args)
111 #else /* Non-debug build: */
113 #define log(chan, args...)
114 /* Standard way of log flood prevention */
115 #define printk_ratelimited(args...) \
117 if (printk_ratelimit()) \
121 #endif /* ACX_DEBUG */
123 void acx_print_mac(const char *head
, const u8
*mac
, const char *tail
);
125 /* Optimized out to nothing in non-debug build */
127 acxlog_mac(int level
, const char *head
, const u8
*mac
, const char *tail
)
129 if (acx_debug
& level
) {
130 acx_print_mac(head
, mac
, tail
);
135 /***********************************************************************
136 ** MAC address helpers
139 MAC_COPY(u8
*mac
, const u8
*src
)
141 *(u32
*)mac
= *(u32
*)src
;
142 ((u16
*)mac
)[2] = ((u16
*)src
)[2];
143 /* kernel's memcpy will do the same: memcpy(dst, src, ETH_ALEN); */
147 MAC_FILL(u8
*mac
, u8 val
)
149 memset(mac
, val
, ETH_ALEN
);
155 ((u16
*)mac
)[2] = *(u32
*)mac
= -1;
161 ((u16
*)mac
)[2] = *(u32
*)mac
= 0;
165 mac_is_equal(const u8
*a
, const u8
*b
)
167 /* can't beat this */
168 return memcmp(a
, b
, ETH_ALEN
) == 0;
172 mac_is_bcast(const u8
*mac
)
174 /* AND together 4 first bytes with sign-extended 2 last bytes
175 ** Only bcast address gives 0xffffffff. +1 gives 0 */
176 return ( *(s32
*)mac
& ((s16
*)mac
)[2] ) + 1 == 0;
180 mac_is_zero(const u8
*mac
)
182 return ( *(u32
*)mac
| ((u16
*)mac
)[2] ) == 0;
186 mac_is_directed(const u8
*mac
)
188 return (mac
[0] & 1)==0;
192 mac_is_mcast(const u8
*mac
)
194 return (mac
[0] & 1) && !mac_is_bcast(mac
);
197 #define MACSTR "%02X:%02X:%02X:%02X:%02X:%02X"
198 #define MAC(bytevector) \
199 ((unsigned char *)bytevector)[0], \
200 ((unsigned char *)bytevector)[1], \
201 ((unsigned char *)bytevector)[2], \
202 ((unsigned char *)bytevector)[3], \
203 ((unsigned char *)bytevector)[4], \
204 ((unsigned char *)bytevector)[5]
207 /***********************************************************************
210 #define TO_STRING(x) #x
211 #define STRING(x) TO_STRING(x)
213 #define CLEAR_BIT(val, mask) ((val) &= ~(mask))
214 #define SET_BIT(val, mask) ((val) |= (mask))
216 /* undefined if v==0 */
217 static inline unsigned int
221 while (!(v
& 0xf)) { v
>>=4; n
+=4; }
222 while (!(v
& 1)) { v
>>=1; n
++; }
226 /* undefined if v==0 */
227 static inline unsigned int
231 while (v
>0xf) { v
>>=4; n
+=4; }
232 while (v
>1) { v
>>=1; n
++; }
236 /* undefined if v==0 */
238 has_only_one_bit(u16 v
)
240 return ((v
-1) ^ v
) >= v
;
244 /***********************************************************************
246 ** We have adev->sem and adev->lock.
248 ** We employ following naming convention in order to get locking right:
250 ** acx_e_xxxx - external entry points called from process context.
251 ** It is okay to sleep. adev->sem is to be taken on entry.
252 ** acx_i_xxxx - external entry points possibly called from atomic context.
253 ** Sleeping is not allowed (and thus down(sem) is not legal!)
254 ** acx_s_xxxx - potentially sleeping functions. Do not ever call under lock!
255 ** acx_l_xxxx - functions which expect lock to be already taken.
256 ** rest - non-sleeping functions which do not require locking
257 ** but may be run under lock
259 ** A small number of local helpers do not have acx_[eisl]_ prefix.
260 ** They are always close to caller and are to be reviewed locally.
262 ** Theory of operation:
264 ** All process-context entry points (_e_ functions) take sem
265 ** immediately. IRQ handler and other 'atomic-context' entry points
266 ** (_i_ functions) take lock immediately on entry, but dont take sem
267 ** because that might sleep.
269 ** Thus *all* code is either protected by sem or lock, or both.
271 ** Code which must not run concurrently with IRQ takes lock.
272 ** Such code is marked with _l_.
274 ** This results in the following rules of thumb useful in code review:
276 ** + If a function calls _s_ fn, it must be an _s_ itself.
277 ** + You can call _l_ fn only (a) from another _l_ fn
278 ** or (b) from _s_, _e_ or _i_ fn by taking lock, calling _l_,
279 ** and dropping lock.
280 ** + All IRQ code runs under lock.
281 ** + Any _s_ fn is running under sem.
282 ** + Code under sem can race only with IRQ code.
283 ** + Code under sem+lock cannot race with anything.
286 /* These functions *must* be inline or they will break horribly on SPARC, due
287 * to its weird semantics for save/restore flags */
289 #if defined(PARANOID_LOCKING) /* Lock debugging */
291 void acx_lock_debug(acx_device_t
*adev
, const char* where
);
292 void acx_unlock_debug(acx_device_t
*adev
, const char* where
);
293 void acx_down_debug(acx_device_t
*adev
, const char* where
);
294 void acx_up_debug(acx_device_t
*adev
, const char* where
);
295 void acx_lock_unhold(void);
296 void acx_sem_unhold(void);
299 acx_lock_helper(acx_device_t
*adev
, unsigned long *fp
, const char* where
)
301 acx_lock_debug(adev
, where
);
302 spin_lock_irqsave(&adev
->lock
, *fp
);
305 acx_unlock_helper(acx_device_t
*adev
, unsigned long *fp
, const char* where
)
307 acx_unlock_debug(adev
, where
);
308 spin_unlock_irqrestore(&adev
->lock
, *fp
);
311 acx_down_helper(acx_device_t
*adev
, const char* where
)
313 acx_down_debug(adev
, where
);
316 acx_up_helper(acx_device_t
*adev
, const char* where
)
318 acx_up_debug(adev
, where
);
320 #define acx_lock(adev, flags) acx_lock_helper(adev, &(flags), __FILE__ ":" STRING(__LINE__))
321 #define acx_unlock(adev, flags) acx_unlock_helper(adev, &(flags), __FILE__ ":" STRING(__LINE__))
322 #define acx_sem_lock(adev) acx_down_helper(adev, __FILE__ ":" STRING(__LINE__))
323 #define acx_sem_unlock(adev) acx_up_helper(adev, __FILE__ ":" STRING(__LINE__))
325 #elif defined(DO_LOCKING)
327 #define acx_lock(adev, flags) spin_lock_irqsave(&adev->lock, flags)
328 #define acx_unlock(adev, flags) spin_unlock_irqrestore(&adev->lock, flags)
329 #define acx_sem_lock(adev) down(&adev->sem)
330 #define acx_sem_unlock(adev) up(&adev->sem)
331 #define acx_lock_unhold() ((void)0)
332 #define acx_sem_unhold() ((void)0)
334 #else /* no locking! :( */
336 #define acx_lock(adev, flags) ((void)0)
337 #define acx_unlock(adev, flags) ((void)0)
338 #define acx_sem_lock(adev) ((void)0)
339 #define acx_sem_unlock(adev) ((void)0)
340 #define acx_lock_unhold() ((void)0)
341 #define acx_sem_unhold() ((void)0)
346 /***********************************************************************
349 /* Can race with rx path (which is not protected by sem):
350 ** rx -> process_[re]assocresp() -> set_status(ASSOCIATED) -> wake_queue()
351 ** Can race with tx_complete IRQ:
352 ** IRQ -> acxpci_l_clean_txdesc -> acx_wake_queue
353 ** Review carefully all callsites */
355 acx_stop_queue(struct net_device
*ndev
, const char *msg
)
357 if (netif_queue_stopped(ndev
))
360 netif_stop_queue(ndev
);
362 log(L_BUFT
, "tx: stop queue %s\n", msg
);
366 acx_queue_stopped(struct net_device
*ndev
)
368 return netif_queue_stopped(ndev
);
373 acx_start_queue(struct net_device *ndev, const char *msg)
375 netif_start_queue(ndev);
377 log(L_BUFT, "tx: start queue %s\n", msg);
382 acx_wake_queue(struct net_device
*ndev
, const char *msg
)
384 netif_wake_queue(ndev
);
386 log(L_BUFT
, "tx: wake queue %s\n", msg
);
390 acx_carrier_off(struct net_device
*ndev
, const char *msg
)
392 netif_carrier_off(ndev
);
394 log(L_BUFT
, "tx: carrier off %s\n", msg
);
398 acx_carrier_on(struct net_device
*ndev
, const char *msg
)
400 netif_carrier_on(ndev
);
402 log(L_BUFT
, "tx: carrier on %s\n", msg
);
405 /* This function does not need locking UNLESS you call it
406 ** as acx_set_status(ACX_STATUS_4_ASSOCIATED), bacause this can
407 ** wake queue. This can race with stop_queue elsewhere. */
408 void acx_set_status(acx_device_t
*adev
, u16 status
);
411 /***********************************************************************
412 ** Communication with firmware
414 #define CMD_TIMEOUT_MS(n) (n)
415 #define ACX_CMD_TIMEOUT_DEFAULT CMD_TIMEOUT_MS(50)
419 /* We want to log cmd names */
420 int acxpci_s_issue_cmd_timeo_debug(acx_device_t
*adev
, unsigned cmd
, void *param
, unsigned len
, unsigned timeout
, const char* cmdstr
);
421 int acxmem_s_issue_cmd_timeo_debug(acx_device_t
*adev
, unsigned cmd
, void *param
, unsigned len
, unsigned timeout
, const char* cmdstr
);
422 int acxusb_s_issue_cmd_timeo_debug(acx_device_t
*adev
, unsigned cmd
, void *param
, unsigned len
, unsigned timeout
, const char* cmdstr
);
424 acx_s_issue_cmd_timeo_debug(acx_device_t
*adev
, unsigned cmd
, void *param
, unsigned len
, unsigned timeout
, const char* cmdstr
)
427 return acxmem_s_issue_cmd_timeo_debug(adev
, cmd
, param
, len
, timeout
, cmdstr
);
429 return acxpci_s_issue_cmd_timeo_debug(adev
, cmd
, param
, len
, timeout
, cmdstr
);
430 return acxusb_s_issue_cmd_timeo_debug(adev
, cmd
, param
, len
, timeout
, cmdstr
);
432 #define acx_s_issue_cmd(adev,cmd,param,len) \
433 acx_s_issue_cmd_timeo_debug(adev,cmd,param,len,ACX_CMD_TIMEOUT_DEFAULT,#cmd)
434 #define acx_s_issue_cmd_timeo(adev,cmd,param,len,timeo) \
435 acx_s_issue_cmd_timeo_debug(adev,cmd,param,len,timeo,#cmd)
436 int acx_s_configure_debug(acx_device_t
*adev
, void *pdr
, int type
, const char* str
);
437 #define acx_s_configure(adev,pdr,type) \
438 acx_s_configure_debug(adev,pdr,type,#type)
439 int acx_s_interrogate_debug(acx_device_t
*adev
, void *pdr
, int type
, const char* str
);
440 #define acx_s_interrogate(adev,pdr,type) \
441 acx_s_interrogate_debug(adev,pdr,type,#type)
445 int acxpci_s_issue_cmd_timeo(acx_device_t
*adev
, unsigned cmd
, void *param
, unsigned len
, unsigned timeout
);
446 int acxmem_s_issue_cmd_timeo(acx_device_t
*adev
, unsigned cmd
, void *param
, unsigned len
, unsigned timeout
);
447 int acxusb_s_issue_cmd_timeo(acx_device_t
*adev
, unsigned cmd
, void *param
, unsigned len
, unsigned timeout
);
449 acx_s_issue_cmd_timeo(acx_device_t
*adev
, unsigned cmd
, void *param
, unsigned len
, unsigned timeout
)
452 return acxmem_s_issue_cmd_timeo(adev
, cmd
, param
, len
, timeout
);
454 return acxpci_s_issue_cmd_timeo(adev
, cmd
, param
, len
, timeout
);
455 return acxusb_s_issue_cmd_timeo(adev
, cmd
, param
, len
, timeout
);
458 acx_s_issue_cmd(acx_device_t
*adev
, unsigned cmd
, void *param
, unsigned len
)
461 return acxmem_s_issue_cmd_timeo(adev
, cmd
, param
, len
, ACX_CMD_TIMEOUT_DEFAULT
);
463 return acxpci_s_issue_cmd_timeo(adev
, cmd
, param
, len
, ACX_CMD_TIMEOUT_DEFAULT
);
464 return acxusb_s_issue_cmd_timeo(adev
, cmd
, param
, len
, ACX_CMD_TIMEOUT_DEFAULT
);
466 int acx_s_configure(acx_device_t
*adev
, void *pdr
, int type
);
467 int acx_s_interrogate(acx_device_t
*adev
, void *pdr
, int type
);
471 void acx_s_cmd_start_scan(acx_device_t
*adev
);
474 /***********************************************************************
478 acx111pci_ioctl_info(
479 struct net_device
*ndev
,
480 struct iw_request_info
*info
,
481 struct iw_param
*vwrq
,
484 acx100pci_ioctl_set_phy_amp_bias(
485 struct net_device
*ndev
,
486 struct iw_request_info
*info
,
487 struct iw_param
*vwrq
,
490 acx100mem_ioctl_set_phy_amp_bias(
491 struct net_device
*ndev
,
492 struct iw_request_info
*info
,
493 struct iw_param
*vwrq
,
497 /***********************************************************************
500 #ifdef CONFIG_PROC_FS
501 int acx_proc_register_entries(const struct net_device
*ndev
);
502 int acx_proc_unregister_entries(const struct net_device
*ndev
);
505 acx_proc_register_entries(const struct net_device
*ndev
) { return OK
; }
507 acx_proc_unregister_entries(const struct net_device
*ndev
) { return OK
; }
511 /***********************************************************************
513 firmware_image_t
*acx_s_read_fw(struct device
*dev
, const char *file
, u32
*size
);
514 int acxpci_s_upload_radio(acx_device_t
*adev
);
515 int acxmem_s_upload_radio(acx_device_t
*adev
);
518 /***********************************************************************
521 int acxpci_s_read_phy_reg(acx_device_t
*adev
, u32 reg
, u8
*charbuf
);
522 int acxmem_s_read_phy_reg(acx_device_t
*adev
, u32 reg
, u8
*charbuf
);
523 int acxusb_s_read_phy_reg(acx_device_t
*adev
, u32 reg
, u8
*charbuf
);
525 acx_s_read_phy_reg(acx_device_t
*adev
, u32 reg
, u8
*charbuf
)
528 return acxmem_s_read_phy_reg(adev
, reg
, charbuf
);
530 return acxpci_s_read_phy_reg(adev
, reg
, charbuf
);
531 return acxusb_s_read_phy_reg(adev
, reg
, charbuf
);
534 int acxpci_s_write_phy_reg(acx_device_t
*adev
, u32 reg
, u8 value
);
535 int acxmem_s_write_phy_reg(acx_device_t
*adev
, u32 reg
, u8 value
);
536 int acxusb_s_write_phy_reg(acx_device_t
*adev
, u32 reg
, u8 value
);
538 acx_s_write_phy_reg(acx_device_t
*adev
, u32 reg
, u8 value
)
541 return acxmem_s_write_phy_reg(adev
, reg
, value
);
543 return acxpci_s_write_phy_reg(adev
, reg
, value
);
544 return acxusb_s_write_phy_reg(adev
, reg
, value
);
547 tx_t
* acxpci_l_alloc_tx(acx_device_t
*adev
);
548 tx_t
* acxmem_l_alloc_tx(acx_device_t
*adev
);
549 tx_t
* acxusb_l_alloc_tx(acx_device_t
*adev
);
551 acx_l_alloc_tx(acx_device_t
*adev
)
554 return acxmem_l_alloc_tx(adev
);
556 return acxpci_l_alloc_tx(adev
);
557 return acxusb_l_alloc_tx(adev
);
560 void acxusb_l_dealloc_tx(tx_t
*tx_opaque
);
561 void acxmem_l_dealloc_tx(acx_device_t
*adev
, tx_t
*tx_opaque
);
563 acx_l_dealloc_tx(acx_device_t
*adev
, tx_t
*tx_opaque
)
566 acxmem_l_dealloc_tx (adev
, tx_opaque
);
569 acxusb_l_dealloc_tx(tx_opaque
);
573 void* acxpci_l_get_txbuf(acx_device_t
*adev
, tx_t
*tx_opaque
);
574 void* acxmem_l_get_txbuf(acx_device_t
*adev
, tx_t
*tx_opaque
);
575 void* acxusb_l_get_txbuf(acx_device_t
*adev
, tx_t
*tx_opaque
);
577 acx_l_get_txbuf(acx_device_t
*adev
, tx_t
*tx_opaque
)
579 #if defined (ACX_MEM)
580 return acxmem_l_get_txbuf(adev
, tx_opaque
);
583 return acxpci_l_get_txbuf(adev
, tx_opaque
);
584 return acxusb_l_get_txbuf(adev
, tx_opaque
);
588 void acxpci_l_tx_data(acx_device_t
*adev
, tx_t
*tx_opaque
, int len
);
589 void acxmem_l_tx_data(acx_device_t
*adev
, tx_t
*tx_opaque
, int len
);
590 void acxusb_l_tx_data(acx_device_t
*adev
, tx_t
*tx_opaque
, int len
);
592 acx_l_tx_data(acx_device_t
*adev
, tx_t
*tx_opaque
, int len
)
594 #if defined (ACX_MEM)
595 acxmem_l_tx_data(adev
, tx_opaque
, len
);
598 acxpci_l_tx_data(adev
, tx_opaque
, len
);
600 acxusb_l_tx_data(adev
, tx_opaque
, len
);
604 static inline wlan_hdr_t
*
605 acx_get_wlan_hdr(acx_device_t
*adev
, const rxbuffer_t
*rxbuf
)
607 return (wlan_hdr_t
*)((u8
*)&rxbuf
->hdr_a3
+ adev
->phy_header_len
);
610 void acxpci_l_power_led(acx_device_t
*adev
, int enable
);
611 int acxpci_read_eeprom_byte(acx_device_t
*adev
, u32 addr
, u8
*charbuf
);
612 unsigned int acxpci_l_clean_txdesc(acx_device_t
*adev
);
613 void acxpci_l_clean_txdesc_emergency(acx_device_t
*adev
);
614 int acxpci_s_create_hostdesc_queues(acx_device_t
*adev
);
615 void acxpci_create_desc_queues(acx_device_t
*adev
, u32 tx_queue_start
, u32 rx_queue_start
);
616 void acxpci_free_desc_queues(acx_device_t
*adev
);
617 char* acxpci_s_proc_diag_output(char *p
, acx_device_t
*adev
);
618 int acxpci_proc_eeprom_output(char *p
, acx_device_t
*adev
);
619 void acxpci_set_interrupt_mask(acx_device_t
*adev
);
620 int acx100pci_s_set_tx_level(acx_device_t
*adev
, u8 level_dbm
);
622 void acxmem_l_power_led(acx_device_t
*adev
, int enable
);
623 int acxmem_read_eeprom_byte(acx_device_t
*adev
, u32 addr
, u8
*charbuf
);
624 unsigned int acxmem_l_clean_txdesc(acx_device_t
*adev
);
625 void acxmem_l_clean_txdesc_emergency(acx_device_t
*adev
);
626 int acxmem_s_create_hostdesc_queues(acx_device_t
*adev
);
627 void acxmem_create_desc_queues(acx_device_t
*adev
, u32 tx_queue_start
, u32 rx_queue_start
);
628 void acxmem_free_desc_queues(acx_device_t
*adev
);
629 char* acxmem_s_proc_diag_output(char *p
, acx_device_t
*adev
);
630 int acxmem_proc_eeprom_output(char *p
, acx_device_t
*adev
);
631 void acxmem_set_interrupt_mask(acx_device_t
*adev
);
632 int acx100mem_s_set_tx_level(acx_device_t
*adev
, u8 level_dbm
);
634 void acx_s_msleep(int ms
);
635 int acx_s_init_mac(acx_device_t
*adev
);
636 void acx_set_reg_domain(acx_device_t
*adev
, unsigned char reg_dom_id
);
637 void acx_set_timer(acx_device_t
*adev
, int timeout_us
);
638 void acx_update_capabilities(acx_device_t
*adev
);
639 void acx_s_start(acx_device_t
*adev
);
641 void acx_s_update_card_settings(acx_device_t
*adev
);
642 void acx_s_parse_configoption(acx_device_t
*adev
, const acx111_ie_configoption_t
*pcfg
);
643 void acx_l_update_ratevector(acx_device_t
*adev
);
645 void acx_init_task_scheduler(acx_device_t
*adev
);
646 void acx_schedule_task(acx_device_t
*adev
, unsigned int set_flag
);
648 int acx_e_ioctl_old(struct net_device
*ndev
, struct ifreq
*ifr
, int cmd
);
650 client_t
*acx_l_sta_list_get(acx_device_t
*adev
, const u8
*address
);
651 void acx_l_sta_list_del(acx_device_t
*adev
, client_t
*clt
);
653 int acx_l_transmit_disassoc(acx_device_t
*adev
, client_t
*clt
);
654 void acx_i_timer(unsigned long a
);
655 int acx_s_complete_scan(acx_device_t
*adev
);
657 struct sk_buff
*acx_rxbuf_to_ether(acx_device_t
*adev
, rxbuffer_t
*rxbuf
);
658 int acx_ether_to_txbuf(acx_device_t
*adev
, void *txbuf
, const struct sk_buff
*skb
);
660 u8
acx_signal_determine_quality(u8 signal
, u8 noise
);
662 void acx_l_process_rxbuf(acx_device_t
*adev
, rxbuffer_t
*rxbuf
);
663 void acx_l_handle_txrate_auto(acx_device_t
*adev
, struct client
*txc
,
664 u16 intended_rate
, u8 rate100
, u16 rate111
, u8 error
,
667 void acx_dump_bytes(const void *, int);
668 void acx_log_bad_eid(wlan_hdr_t
* hdr
, int len
, wlan_ie_t
* ie_ptr
);
670 u8
acx_rate111to100(u16
);
672 void acx_s_set_defaults(acx_device_t
*adev
);
675 static inline const char* acx_get_packet_type_string(u16 fc
) { return ""; }
677 const char* acx_get_packet_type_string(u16 fc
);
679 const char* acx_cmd_status_str(unsigned int state
);
681 int acx_i_start_xmit(struct sk_buff
*skb
, struct net_device
*ndev
);
683 void great_inquisitor(acx_device_t
*adev
);
685 void acx_s_get_firmware_version(acx_device_t
*adev
);
686 void acx_display_hardware_details(acx_device_t
*adev
);
688 int acx_e_change_mtu(struct net_device
*ndev
, int mtu
);
689 struct net_device_stats
* acx_e_get_stats(struct net_device
*ndev
);
690 struct iw_statistics
* acx_e_get_wireless_stats(struct net_device
*ndev
);
693 int __init
acxmem_e_init_module(void);
694 void __exit
acxmem_e_cleanup_module(void);
695 void acxmem_e_release(struct device
*dev
);
697 int __init
acxpci_e_init_module(void);
698 int __init
acxusb_e_init_module(void);
699 void __exit
acxpci_e_cleanup_module(void);
700 void __exit
acxusb_e_cleanup_module(void);