diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-20 20:43:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-20 20:43:29 -0400 |
commit | db6d8c7a4027b48d797b369a53f8470aaeed7063 (patch) | |
tree | e140c104a89abc2154e1f41a7db8ebecbb6fa0b4 /drivers/net/wireless/rt2x00/rt2x00lib.h | |
parent | 3a533374283aea50eab3976d8a6d30532175f009 (diff) | |
parent | fb65a7c091529bfffb1262515252c0d0f6241c5c (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (1232 commits)
iucv: Fix bad merging.
net_sched: Add size table for qdiscs
net_sched: Add accessor function for packet length for qdiscs
net_sched: Add qdisc_enqueue wrapper
highmem: Export totalhigh_pages.
ipv6 mcast: Omit redundant address family checks in ip6_mc_source().
net: Use standard structures for generic socket address structures.
ipv6 netns: Make several "global" sysctl variables namespace aware.
netns: Use net_eq() to compare net-namespaces for optimization.
ipv6: remove unused macros from net/ipv6.h
ipv6: remove unused parameter from ip6_ra_control
tcp: fix kernel panic with listening_get_next
tcp: Remove redundant checks when setting eff_sacks
tcp: options clean up
tcp: Fix MD5 signatures for non-linear skbs
sctp: Update sctp global memory limit allocations.
sctp: remove unnecessary byteshifting, calculate directly in big-endian
sctp: Allow only 1 listening socket with SO_REUSEADDR
sctp: Do not leak memory on multiple listen() calls
sctp: Support ipv6only AF_INET6 sockets.
...
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00lib.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00lib.h | 78 |
1 files changed, 64 insertions, 14 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h index 41ee02cd2825..f2c9b0e79b5f 100644 --- a/drivers/net/wireless/rt2x00/rt2x00lib.h +++ b/drivers/net/wireless/rt2x00/rt2x00lib.h | |||
@@ -26,12 +26,14 @@ | |||
26 | #ifndef RT2X00LIB_H | 26 | #ifndef RT2X00LIB_H |
27 | #define RT2X00LIB_H | 27 | #define RT2X00LIB_H |
28 | 28 | ||
29 | #include "rt2x00dump.h" | ||
30 | |||
29 | /* | 31 | /* |
30 | * Interval defines | 32 | * Interval defines |
31 | * Both the link tuner as the rfkill will be called once per second. | 33 | * Both the link tuner as the rfkill will be called once per second. |
32 | */ | 34 | */ |
33 | #define LINK_TUNE_INTERVAL ( round_jiffies_relative(HZ) ) | 35 | #define LINK_TUNE_INTERVAL ( round_jiffies_relative(HZ) ) |
34 | #define RFKILL_POLL_INTERVAL ( 1000 ) | 36 | #define RFKILL_POLL_INTERVAL ( round_jiffies_relative(HZ) ) |
35 | 37 | ||
36 | /* | 38 | /* |
37 | * rt2x00_rate: Per rate device information | 39 | * rt2x00_rate: Per rate device information |
@@ -96,9 +98,65 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev, | |||
96 | void rt2x00lib_config(struct rt2x00_dev *rt2x00dev, | 98 | void rt2x00lib_config(struct rt2x00_dev *rt2x00dev, |
97 | struct ieee80211_conf *conf, const int force_config); | 99 | struct ieee80211_conf *conf, const int force_config); |
98 | 100 | ||
99 | /* | 101 | /** |
100 | * Queue handlers. | 102 | * DOC: Queue handlers |
103 | */ | ||
104 | |||
105 | /** | ||
106 | * rt2x00queue_alloc_rxskb - allocate a skb for RX purposes. | ||
107 | * @rt2x00dev: Pointer to &struct rt2x00_dev. | ||
108 | * @queue: The queue for which the skb will be applicable. | ||
109 | */ | ||
110 | struct sk_buff *rt2x00queue_alloc_rxskb(struct rt2x00_dev *rt2x00dev, | ||
111 | struct queue_entry *entry); | ||
112 | |||
113 | /** | ||
114 | * rt2x00queue_unmap_skb - Unmap a skb from DMA. | ||
115 | * @rt2x00dev: Pointer to &struct rt2x00_dev. | ||
116 | * @skb: The skb to unmap. | ||
117 | */ | ||
118 | void rt2x00queue_unmap_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb); | ||
119 | |||
120 | /** | ||
121 | * rt2x00queue_free_skb - free a skb | ||
122 | * @rt2x00dev: Pointer to &struct rt2x00_dev. | ||
123 | * @skb: The skb to free. | ||
124 | */ | ||
125 | void rt2x00queue_free_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb); | ||
126 | |||
127 | /** | ||
128 | * rt2x00queue_free_skb - free a skb | ||
129 | * @rt2x00dev: Pointer to &struct rt2x00_dev. | ||
130 | * @skb: The skb to free. | ||
131 | */ | ||
132 | void rt2x00queue_free_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb); | ||
133 | |||
134 | /** | ||
135 | * rt2x00queue_write_tx_frame - Write TX frame to hardware | ||
136 | * @queue: Queue over which the frame should be send | ||
137 | * @skb: The skb to send | ||
138 | */ | ||
139 | int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb); | ||
140 | |||
141 | /** | ||
142 | * rt2x00queue_update_beacon - Send new beacon from mac80211 to hardware | ||
143 | * @rt2x00dev: Pointer to &struct rt2x00_dev. | ||
144 | * @vif: Interface for which the beacon should be updated. | ||
101 | */ | 145 | */ |
146 | int rt2x00queue_update_beacon(struct rt2x00_dev *rt2x00dev, | ||
147 | struct ieee80211_vif *vif); | ||
148 | |||
149 | /** | ||
150 | * rt2x00queue_index_inc - Index incrementation function | ||
151 | * @queue: Queue (&struct data_queue) to perform the action on. | ||
152 | * @index: Index type (&enum queue_index) to perform the action on. | ||
153 | * | ||
154 | * This function will increase the requested index on the queue, | ||
155 | * it will grab the appropriate locks and handle queue overflow events by | ||
156 | * resetting the index to the start of the queue. | ||
157 | */ | ||
158 | void rt2x00queue_index_inc(struct data_queue *queue, enum queue_index index); | ||
159 | |||
102 | void rt2x00queue_init_rx(struct rt2x00_dev *rt2x00dev); | 160 | void rt2x00queue_init_rx(struct rt2x00_dev *rt2x00dev); |
103 | void rt2x00queue_init_tx(struct rt2x00_dev *rt2x00dev); | 161 | void rt2x00queue_init_tx(struct rt2x00_dev *rt2x00dev); |
104 | int rt2x00queue_initialize(struct rt2x00_dev *rt2x00dev); | 162 | int rt2x00queue_initialize(struct rt2x00_dev *rt2x00dev); |
@@ -128,7 +186,8 @@ static inline void rt2x00lib_free_firmware(struct rt2x00_dev *rt2x00dev) | |||
128 | #ifdef CONFIG_RT2X00_LIB_DEBUGFS | 186 | #ifdef CONFIG_RT2X00_LIB_DEBUGFS |
129 | void rt2x00debug_register(struct rt2x00_dev *rt2x00dev); | 187 | void rt2x00debug_register(struct rt2x00_dev *rt2x00dev); |
130 | void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev); | 188 | void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev); |
131 | void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb); | 189 | void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, |
190 | enum rt2x00_dump_type type, struct sk_buff *skb); | ||
132 | #else | 191 | #else |
133 | static inline void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) | 192 | static inline void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) |
134 | { | 193 | { |
@@ -139,6 +198,7 @@ static inline void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev) | |||
139 | } | 198 | } |
140 | 199 | ||
141 | static inline void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, | 200 | static inline void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, |
201 | enum rt2x00_dump_type type, | ||
142 | struct sk_buff *skb) | 202 | struct sk_buff *skb) |
143 | { | 203 | { |
144 | } | 204 | } |
@@ -152,8 +212,6 @@ void rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev); | |||
152 | void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev); | 212 | void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev); |
153 | void rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev); | 213 | void rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev); |
154 | void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev); | 214 | void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev); |
155 | void rt2x00rfkill_suspend(struct rt2x00_dev *rt2x00dev); | ||
156 | void rt2x00rfkill_resume(struct rt2x00_dev *rt2x00dev); | ||
157 | #else | 215 | #else |
158 | static inline void rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev) | 216 | static inline void rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev) |
159 | { | 217 | { |
@@ -170,14 +228,6 @@ static inline void rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev) | |||
170 | static inline void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev) | 228 | static inline void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev) |
171 | { | 229 | { |
172 | } | 230 | } |
173 | |||
174 | static inline void rt2x00rfkill_suspend(struct rt2x00_dev *rt2x00dev) | ||
175 | { | ||
176 | } | ||
177 | |||
178 | static inline void rt2x00rfkill_resume(struct rt2x00_dev *rt2x00dev) | ||
179 | { | ||
180 | } | ||
181 | #endif /* CONFIG_RT2X00_LIB_RFKILL */ | 231 | #endif /* CONFIG_RT2X00_LIB_RFKILL */ |
182 | 232 | ||
183 | /* | 233 | /* |