diff options
Diffstat (limited to 'drivers/net/wireless/ath5k/base.h')
-rw-r--r-- | drivers/net/wireless/ath5k/base.h | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/drivers/net/wireless/ath5k/base.h b/drivers/net/wireless/ath5k/base.h index bb4b26d523ab..47f414b09e67 100644 --- a/drivers/net/wireless/ath5k/base.h +++ b/drivers/net/wireless/ath5k/base.h | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/list.h> | 45 | #include <linux/list.h> |
46 | #include <linux/wireless.h> | 46 | #include <linux/wireless.h> |
47 | #include <linux/if_ether.h> | 47 | #include <linux/if_ether.h> |
48 | #include <linux/leds.h> | ||
48 | 49 | ||
49 | #include "ath5k.h" | 50 | #include "ath5k.h" |
50 | #include "debug.h" | 51 | #include "debug.h" |
@@ -79,6 +80,19 @@ struct ath5k_txq { | |||
79 | bool setup; | 80 | bool setup; |
80 | }; | 81 | }; |
81 | 82 | ||
83 | #define ATH5K_LED_MAX_NAME_LEN 31 | ||
84 | |||
85 | /* | ||
86 | * State for LED triggers | ||
87 | */ | ||
88 | struct ath5k_led | ||
89 | { | ||
90 | char name[ATH5K_LED_MAX_NAME_LEN + 1]; /* name of the LED in sysfs */ | ||
91 | struct ath5k_softc *sc; /* driver state */ | ||
92 | struct led_classdev led_dev; /* led classdev */ | ||
93 | }; | ||
94 | |||
95 | |||
82 | #if CHAN_DEBUG | 96 | #if CHAN_DEBUG |
83 | #define ATH_CHAN_MAX (26+26+26+200+200) | 97 | #define ATH_CHAN_MAX (26+26+26+200+200) |
84 | #else | 98 | #else |
@@ -118,13 +132,11 @@ struct ath5k_softc { | |||
118 | size_t desc_len; /* size of TX/RX descriptors */ | 132 | size_t desc_len; /* size of TX/RX descriptors */ |
119 | u16 cachelsz; /* cache line size */ | 133 | u16 cachelsz; /* cache line size */ |
120 | 134 | ||
121 | DECLARE_BITMAP(status, 6); | 135 | DECLARE_BITMAP(status, 4); |
122 | #define ATH_STAT_INVALID 0 /* disable hardware accesses */ | 136 | #define ATH_STAT_INVALID 0 /* disable hardware accesses */ |
123 | #define ATH_STAT_MRRETRY 1 /* multi-rate retry support */ | 137 | #define ATH_STAT_MRRETRY 1 /* multi-rate retry support */ |
124 | #define ATH_STAT_PROMISC 2 | 138 | #define ATH_STAT_PROMISC 2 |
125 | #define ATH_STAT_LEDBLINKING 3 /* LED blink operation active */ | 139 | #define ATH_STAT_LEDSOFT 3 /* enable LED gpio status */ |
126 | #define ATH_STAT_LEDENDBLINK 4 /* finish LED blink operation */ | ||
127 | #define ATH_STAT_LEDSOFT 5 /* enable LED gpio status */ | ||
128 | 140 | ||
129 | unsigned int filter_flags; /* HW flags, AR5K_RX_FILTER_* */ | 141 | unsigned int filter_flags; /* HW flags, AR5K_RX_FILTER_* */ |
130 | unsigned int curmode; /* current phy mode */ | 142 | unsigned int curmode; /* current phy mode */ |
@@ -132,13 +144,6 @@ struct ath5k_softc { | |||
132 | 144 | ||
133 | struct ieee80211_vif *vif; | 145 | struct ieee80211_vif *vif; |
134 | 146 | ||
135 | struct { | ||
136 | u8 rxflags; /* radiotap rx flags */ | ||
137 | u8 txflags; /* radiotap tx flags */ | ||
138 | u16 ledon; /* softled on time */ | ||
139 | u16 ledoff; /* softled off time */ | ||
140 | } hwmap[32]; /* h/w rate ix mappings */ | ||
141 | |||
142 | enum ath5k_int imask; /* interrupt mask copy */ | 147 | enum ath5k_int imask; /* interrupt mask copy */ |
143 | 148 | ||
144 | DECLARE_BITMAP(keymap, AR5K_KEYCACHE_SIZE); /* key use bit map */ | 149 | DECLARE_BITMAP(keymap, AR5K_KEYCACHE_SIZE); /* key use bit map */ |
@@ -148,9 +153,6 @@ struct ath5k_softc { | |||
148 | unsigned int led_pin, /* GPIO pin for driving LED */ | 153 | unsigned int led_pin, /* GPIO pin for driving LED */ |
149 | led_on, /* pin setting for LED on */ | 154 | led_on, /* pin setting for LED on */ |
150 | led_off; /* off time for current blink */ | 155 | led_off; /* off time for current blink */ |
151 | struct timer_list led_tim; /* led off timer */ | ||
152 | u8 led_rxrate; /* current rx rate for LED */ | ||
153 | u8 led_txrate; /* current tx rate for LED */ | ||
154 | 156 | ||
155 | struct tasklet_struct restq; /* reset tasklet */ | 157 | struct tasklet_struct restq; /* reset tasklet */ |
156 | 158 | ||
@@ -159,6 +161,7 @@ struct ath5k_softc { | |||
159 | spinlock_t rxbuflock; | 161 | spinlock_t rxbuflock; |
160 | u32 *rxlink; /* link ptr in last RX desc */ | 162 | u32 *rxlink; /* link ptr in last RX desc */ |
161 | struct tasklet_struct rxtq; /* rx intr tasklet */ | 163 | struct tasklet_struct rxtq; /* rx intr tasklet */ |
164 | struct ath5k_led rx_led; /* rx led */ | ||
162 | 165 | ||
163 | struct list_head txbuf; /* transmit buffer */ | 166 | struct list_head txbuf; /* transmit buffer */ |
164 | spinlock_t txbuflock; | 167 | spinlock_t txbuflock; |
@@ -167,6 +170,7 @@ struct ath5k_softc { | |||
167 | 170 | ||
168 | struct ath5k_txq *txq; /* beacon and tx*/ | 171 | struct ath5k_txq *txq; /* beacon and tx*/ |
169 | struct tasklet_struct txtq; /* tx intr tasklet */ | 172 | struct tasklet_struct txtq; /* tx intr tasklet */ |
173 | struct ath5k_led tx_led; /* tx led */ | ||
170 | 174 | ||
171 | struct ath5k_buf *bbuf; /* beacon buffer */ | 175 | struct ath5k_buf *bbuf; /* beacon buffer */ |
172 | unsigned int bhalq, /* SW q for outgoing beacons */ | 176 | unsigned int bhalq, /* SW q for outgoing beacons */ |