Revert "Rename all ACX_IE_* to ACX_REG_*: we talk about registers here"
[acx-mac80211.git] / acx_irq.h
bloba20230e99992c4cd9e597522d409bc2c330c43a4
1 #ifndef _ACX_IRQ_H_
2 #define _ACX_IRQ_H_
4 /*
5 * acx_irq.h: IRQ constants, top half and bottom half declarations.
7 * Copyright (c) 2008, the ACX100 project.
9 * This file is licensed under GPLv2.
12 #include "acx_struct.h"
15 * List of jobs that have to be done post interrupt.
17 * FIXME: the b43 driver uses two queues: a work_queue and a delayed_work. Maybe
18 * some of these commands may be delayed? If so, rename TASKLET to WORK/DELAYED.
20 #define ACX_TASKLET_CMD_STOP_SCAN 0x01
21 #define ACX_TASKLET_CMD_ASSOCIATE 0x02
22 #define ACX_TASKLET_CMD_RADIO_RECALIB 0x04
23 #define ACX_TASKLET_UPDATE_CARD_CFG 0x08
24 #define ACX_TASKLET_TX_CLEANUP 0x10
25 #define ACX_TASKLET_COMPLETE_SCAN 0x20
26 #define ACX_TASKLET_RESTART_SCAN 0x40
28 /* IRQ Constants
29 ** (outside of "#ifdef PCI" because USB (mis)uses HOST_INT_SCAN_COMPLETE) */
30 #define ACX_IRQ_RX_DATA 0x0001
31 #define ACX_IRQ_TX_COMPLETE 0x0002
32 #define ACX_IRQ_TX_XFER 0x0004
33 #define ACX_IRQ_RX_COMPLETE 0x0008
34 #define ACX_IRQ_DTIM 0x0010
35 #define ACX_IRQ_BEACON 0x0020
36 #define ACX_IRQ_TIMER 0x0040
37 #define ACX_IRQ_KEY_NOT_FOUND 0x0080
38 #define ACX_IRQ_IV_ICV_FAILURE 0x0100
39 #define ACX_IRQ_CMD_COMPLETE 0x0200
40 #define ACX_IRQ_INFO 0x0400
41 #define ACX_IRQ_OVERFLOW 0x0800
42 #define ACX_IRQ_PROCESS_ERROR 0x1000
43 #define ACX_IRQ_SCAN_COMPLETE 0x2000
44 #define ACX_IRQ_FCS_THRESHOLD 0x4000
45 #define ACX_IRQ_UNKNOWN 0x8000
47 #define ACX_IRQ_ALL 0xffff
50 * The default masks for ACX100 and ACX111 differ!
52 * The ACX*_DEFAULT_IRQ_MASK values define what the masks of the card should
53 * initially be set to. The ACX*_DISABLE_ALL_IRQS define what mask should be set
54 * in order to not receive anymore interrupts.
56 * FIXME: the values below are taken from the existing code, they may not be
57 * accurate. I don't have any RE skill, so I cannot really tell :/
61 * ACX111
63 #define ACX111_DEFAULT_NEGATED_IRQ_MASK ( \
64 ACX_IRQ_TX_COMPLETE | \
65 ACX_IRQ_RX_COMPLETE | \
66 ACX_IRQ_IV_ICV_FAILURE | \
67 ACX_IRQ_CMD_COMPLETE | \
68 ACX_IRQ_INFO | \
69 ACX_IRQ_SCAN_COMPLETE | \
70 ACX_IRQ_FCS_THRESHOLD \
73 #define ACX111_DEFAULT_IRQ_MASK \
74 ((u16) ~ ACX111_DEFAULT_NEGATED_IRQ_MASK )
76 #define ACX111_DISABLE_ALL_IRQS \
77 ((u16) ~ (ACX_IRQ_UNKNOWN))
80 * ACX100
82 #define ACX100_DEFAULT_NEGATED_IRQ_MASK ( \
83 ACX_IRQ_TX_COMPLETE | \
84 ACX_IRQ_RX_COMPLETE | \
85 ACX_IRQ_CMD_COMPLETE | \
86 ACX_IRQ_INFO | \
87 ACX_IRQ_SCAN_COMPLETE \
90 #define ACX100_DEFAULT_IRQ_MASK \
91 ((u16) ~ ACX100_DEFAULT_NEGATED_IRQ_MASK )
94 * About the value below: the original code said:
96 * "Or else acx100 won't signal cmd completion, right?"
98 * Also, why isn't ACX_IRQ_UNKNOWN part of that mask? Good question.
100 #define ACX100_DISABLE_ALL_IRQS \
101 ((u16) ~ (ACX_IRQ_CMD_COMPLETE))
104 * Function prototypes
108 * These two functions disable the interrupts on the card itself.
110 //void acx_enable_irqs(acx_device_t *adev, u16 mask);
111 //u16 acx_disable_irqs(acx_device_t *adev, u16 mask);
113 #endif /* _ACX_IRQ_H_ */