aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-01-31 13:48:20 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:37:01 -0500
commit9ae54c8463691b64ca6e6d8680787a6527810984 (patch)
tree02ace411ce3ba8eb8d1862852f52ff042fd59290 /net/mac80211/ieee80211_i.h
parent78330fddec4e326af5e6aede0fc97824c690ba1d (diff)
mac80211: split ieee80211_txrx_result
The _DROP result will need to be split in the RX path but not in the TX path, so for preparation split up the type into two types, one for RX and one for TX. Also make sure (via sparse) that they cannot be confused. 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.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index ac802feb7655..36ea4fbdf950 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -108,9 +108,16 @@ struct ieee80211_sta_bss {
108}; 108};
109 109
110 110
111typedef enum { 111typedef unsigned __bitwise__ ieee80211_tx_result;
112 TXRX_CONTINUE, TXRX_DROP, TXRX_QUEUED 112#define TX_CONTINUE ((__force ieee80211_tx_result) 0u)
113} ieee80211_txrx_result; 113#define TX_DROP ((__force ieee80211_tx_result) 1u)
114#define TX_QUEUED ((__force ieee80211_tx_result) 2u)
115
116typedef unsigned __bitwise__ ieee80211_rx_result;
117#define RX_CONTINUE ((__force ieee80211_rx_result) 0u)
118#define RX_DROP ((__force ieee80211_rx_result) 1u)
119#define RX_QUEUED ((__force ieee80211_rx_result) 2u)
120
114 121
115/* flags used in struct ieee80211_txrx_data.flags */ 122/* flags used in struct ieee80211_txrx_data.flags */
116/* whether the MSDU was fragmented */ 123/* whether the MSDU was fragmented */
@@ -182,10 +189,10 @@ struct ieee80211_tx_stored_packet {
182 unsigned int last_frag_rate_ctrl_probe; 189 unsigned int last_frag_rate_ctrl_probe;
183}; 190};
184 191
185typedef ieee80211_txrx_result (*ieee80211_tx_handler) 192typedef ieee80211_tx_result (*ieee80211_tx_handler)
186(struct ieee80211_txrx_data *tx); 193(struct ieee80211_txrx_data *tx);
187 194
188typedef ieee80211_txrx_result (*ieee80211_rx_handler) 195typedef ieee80211_rx_result (*ieee80211_rx_handler)
189(struct ieee80211_txrx_data *rx); 196(struct ieee80211_txrx_data *rx);
190 197
191struct beacon_data { 198struct beacon_data {
@@ -729,9 +736,9 @@ int ieee80211_sta_req_scan(struct net_device *dev, u8 *ssid, size_t ssid_len);
729void ieee80211_sta_req_auth(struct net_device *dev, 736void ieee80211_sta_req_auth(struct net_device *dev,
730 struct ieee80211_if_sta *ifsta); 737 struct ieee80211_if_sta *ifsta);
731int ieee80211_sta_scan_results(struct net_device *dev, char *buf, size_t len); 738int ieee80211_sta_scan_results(struct net_device *dev, char *buf, size_t len);
732ieee80211_txrx_result ieee80211_sta_rx_scan(struct net_device *dev, 739ieee80211_rx_result ieee80211_sta_rx_scan(
733 struct sk_buff *skb, 740 struct net_device *dev, struct sk_buff *skb,
734 struct ieee80211_rx_status *rx_status); 741 struct ieee80211_rx_status *rx_status);
735void ieee80211_rx_bss_list_init(struct net_device *dev); 742void ieee80211_rx_bss_list_init(struct net_device *dev);
736void ieee80211_rx_bss_list_deinit(struct net_device *dev); 743void ieee80211_rx_bss_list_deinit(struct net_device *dev);
737int ieee80211_sta_set_extra_ie(struct net_device *dev, char *ie, size_t len); 744int ieee80211_sta_set_extra_ie(struct net_device *dev, char *ie, size_t len);