aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00lib.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-20 20:43:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-20 20:43:29 -0400
commitdb6d8c7a4027b48d797b369a53f8470aaeed7063 (patch)
treee140c104a89abc2154e1f41a7db8ebecbb6fa0b4 /drivers/net/wireless/rt2x00/rt2x00lib.h
parent3a533374283aea50eab3976d8a6d30532175f009 (diff)
parentfb65a7c091529bfffb1262515252c0d0f6241c5c (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.h78
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,
96void rt2x00lib_config(struct rt2x00_dev *rt2x00dev, 98void 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 */
110struct 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 */
118void 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 */
125void 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 */
132void 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 */
139int 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 */
146int 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 */
158void rt2x00queue_index_inc(struct data_queue *queue, enum queue_index index);
159
102void rt2x00queue_init_rx(struct rt2x00_dev *rt2x00dev); 160void rt2x00queue_init_rx(struct rt2x00_dev *rt2x00dev);
103void rt2x00queue_init_tx(struct rt2x00_dev *rt2x00dev); 161void rt2x00queue_init_tx(struct rt2x00_dev *rt2x00dev);
104int rt2x00queue_initialize(struct rt2x00_dev *rt2x00dev); 162int 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
129void rt2x00debug_register(struct rt2x00_dev *rt2x00dev); 187void rt2x00debug_register(struct rt2x00_dev *rt2x00dev);
130void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev); 188void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev);
131void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb); 189void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
190 enum rt2x00_dump_type type, struct sk_buff *skb);
132#else 191#else
133static inline void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) 192static 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
141static inline void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, 200static 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);
152void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev); 212void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev);
153void rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev); 213void rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev);
154void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev); 214void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev);
155void rt2x00rfkill_suspend(struct rt2x00_dev *rt2x00dev);
156void rt2x00rfkill_resume(struct rt2x00_dev *rt2x00dev);
157#else 215#else
158static inline void rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev) 216static inline void rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev)
159{ 217{
@@ -170,14 +228,6 @@ static inline void rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev)
170static inline void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev) 228static inline void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev)
171{ 229{
172} 230}
173
174static inline void rt2x00rfkill_suspend(struct rt2x00_dev *rt2x00dev)
175{
176}
177
178static 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/*