aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-02-25 10:27:43 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-03-06 15:30:46 -0500
commit5cf121c3cdb955583bf0c5d28c992b7968a4aa1a (patch)
tree7bfd1a667f4703f3e6627d176b9a3f374c2db069 /net/mac80211/ieee80211_i.h
parent7495883bdd07e6a233f8a7f3d85c085c1618a203 (diff)
mac80211: split ieee80211_txrx_data
Split it into ieee80211_tx_data and ieee80211_rx_data to clarify usage/flag usage and remove the stupid union thing. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h86
1 files changed, 47 insertions, 39 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 7394c9b783b8..d3b5cc57af40 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -142,26 +142,51 @@ typedef unsigned __bitwise__ ieee80211_tx_result;
142#define TX_DROP ((__force ieee80211_tx_result) 1u) 142#define TX_DROP ((__force ieee80211_tx_result) 1u)
143#define TX_QUEUED ((__force ieee80211_tx_result) 2u) 143#define TX_QUEUED ((__force ieee80211_tx_result) 2u)
144 144
145#define IEEE80211_TX_FRAGMENTED BIT(0)
146#define IEEE80211_TX_UNICAST BIT(1)
147#define IEEE80211_TX_PS_BUFFERED BIT(2)
148#define IEEE80211_TX_PROBE_LAST_FRAG BIT(3)
149#define IEEE80211_TX_INJECTED BIT(4)
150
151struct ieee80211_tx_data {
152 struct sk_buff *skb;
153 struct net_device *dev;
154 struct ieee80211_local *local;
155 struct ieee80211_sub_if_data *sdata;
156 struct sta_info *sta;
157 u16 fc, ethertype;
158 struct ieee80211_key *key;
159 unsigned int flags;
160
161 struct ieee80211_tx_control *control;
162 struct ieee80211_channel *channel;
163 struct ieee80211_rate *rate;
164 /* use this rate (if set) for last fragment; rate can
165 * be set to lower rate for the first fragments, e.g.,
166 * when using CTS protection with IEEE 802.11g. */
167 struct ieee80211_rate *last_frag_rate;
168
169 /* Extra fragments (in addition to the first fragment
170 * in skb) */
171 int num_extra_frag;
172 struct sk_buff **extra_frag;
173};
174
175
145typedef unsigned __bitwise__ ieee80211_rx_result; 176typedef unsigned __bitwise__ ieee80211_rx_result;
146#define RX_CONTINUE ((__force ieee80211_rx_result) 0u) 177#define RX_CONTINUE ((__force ieee80211_rx_result) 0u)
147#define RX_DROP_UNUSABLE ((__force ieee80211_rx_result) 1u) 178#define RX_DROP_UNUSABLE ((__force ieee80211_rx_result) 1u)
148#define RX_DROP_MONITOR ((__force ieee80211_rx_result) 2u) 179#define RX_DROP_MONITOR ((__force ieee80211_rx_result) 2u)
149#define RX_QUEUED ((__force ieee80211_rx_result) 3u) 180#define RX_QUEUED ((__force ieee80211_rx_result) 3u)
150 181
151 182#define IEEE80211_RX_IN_SCAN BIT(0)
152/* flags used in struct ieee80211_txrx_data.flags */
153/* whether the MSDU was fragmented */
154#define IEEE80211_TXRXD_FRAGMENTED BIT(0)
155#define IEEE80211_TXRXD_TXUNICAST BIT(1)
156#define IEEE80211_TXRXD_TXPS_BUFFERED BIT(2)
157#define IEEE80211_TXRXD_TXPROBE_LAST_FRAG BIT(3)
158#define IEEE80211_TXRXD_RXIN_SCAN BIT(4)
159/* frame is destined to interface currently processed (incl. multicast frames) */ 183/* frame is destined to interface currently processed (incl. multicast frames) */
160#define IEEE80211_TXRXD_RXRA_MATCH BIT(5) 184#define IEEE80211_RX_RA_MATCH BIT(1)
161#define IEEE80211_TXRXD_TX_INJECTED BIT(6) 185#define IEEE80211_RX_AMSDU BIT(2)
162#define IEEE80211_TXRXD_RX_AMSDU BIT(7) 186#define IEEE80211_RX_CMNTR_REPORTED BIT(3)
163#define IEEE80211_TXRXD_RX_CMNTR_REPORTED BIT(8) 187#define IEEE80211_RX_FRAGMENTED BIT(4)
164struct ieee80211_txrx_data { 188
189struct ieee80211_rx_data {
165 struct sk_buff *skb; 190 struct sk_buff *skb;
166 struct net_device *dev; 191 struct net_device *dev;
167 struct ieee80211_local *local; 192 struct ieee80211_local *local;
@@ -170,31 +195,14 @@ struct ieee80211_txrx_data {
170 u16 fc, ethertype; 195 u16 fc, ethertype;
171 struct ieee80211_key *key; 196 struct ieee80211_key *key;
172 unsigned int flags; 197 unsigned int flags;
173 union { 198
174 struct { 199 struct ieee80211_rx_status *status;
175 struct ieee80211_tx_control *control; 200 struct ieee80211_rate *rate;
176 struct ieee80211_channel *channel; 201 int sent_ps_buffered;
177 struct ieee80211_rate *rate; 202 int queue;
178 /* use this rate (if set) for last fragment; rate can 203 int load;
179 * be set to lower rate for the first fragments, e.g., 204 u32 tkip_iv32;
180 * when using CTS protection with IEEE 802.11g. */ 205 u16 tkip_iv16;
181 struct ieee80211_rate *last_frag_rate;
182
183 /* Extra fragments (in addition to the first fragment
184 * in skb) */
185 int num_extra_frag;
186 struct sk_buff **extra_frag;
187 } tx;
188 struct {
189 struct ieee80211_rx_status *status;
190 struct ieee80211_rate *rate;
191 int sent_ps_buffered;
192 int queue;
193 int load;
194 u32 tkip_iv32;
195 u16 tkip_iv16;
196 } rx;
197 } u;
198}; 206};
199 207
200/* flags used in struct ieee80211_tx_packet_data.flags */ 208/* flags used in struct ieee80211_tx_packet_data.flags */
@@ -842,7 +850,7 @@ static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr)
842int ieee80211_hw_config(struct ieee80211_local *local); 850int ieee80211_hw_config(struct ieee80211_local *local);
843int ieee80211_if_config(struct net_device *dev); 851int ieee80211_if_config(struct net_device *dev);
844int ieee80211_if_config_beacon(struct net_device *dev); 852int ieee80211_if_config_beacon(struct net_device *dev);
845void ieee80211_tx_set_iswep(struct ieee80211_txrx_data *tx); 853void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx);
846int ieee80211_if_update_wds(struct net_device *dev, u8 *remote_addr); 854int ieee80211_if_update_wds(struct net_device *dev, u8 *remote_addr);
847void ieee80211_if_setup(struct net_device *dev); 855void ieee80211_if_setup(struct net_device *dev);
848int ieee80211_hw_config_ht(struct ieee80211_local *local, int enable_ht, 856int ieee80211_hw_config_ht(struct ieee80211_local *local, int enable_ht,