aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h59
1 files changed, 9 insertions, 50 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 52d8e9688219..6842464dcf3e 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -44,7 +44,7 @@
44/* 44/*
45 * Module information. 45 * Module information.
46 */ 46 */
47#define DRV_VERSION "2.1.7" 47#define DRV_VERSION "2.1.8"
48#define DRV_PROJECT "http://rt2x00.serialmonkey.com" 48#define DRV_PROJECT "http://rt2x00.serialmonkey.com"
49 49
50/* 50/*
@@ -111,33 +111,6 @@
111#define EIFS ( SIFS + (8 * (IEEE80211_HEADER + ACK_SIZE)) ) 111#define EIFS ( SIFS + (8 * (IEEE80211_HEADER + ACK_SIZE)) )
112 112
113/* 113/*
114 * IEEE802.11 header defines
115 */
116static inline int is_rts_frame(u16 fc)
117{
118 return (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) &&
119 ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_RTS));
120}
121
122static inline int is_cts_frame(u16 fc)
123{
124 return (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) &&
125 ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_CTS));
126}
127
128static inline int is_probe_resp(u16 fc)
129{
130 return (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) &&
131 ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PROBE_RESP));
132}
133
134static inline int is_beacon(u16 fc)
135{
136 return (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) &&
137 ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_BEACON));
138}
139
140/*
141 * Chipset identification 114 * Chipset identification
142 * The chipset on the device is composed of a RT and RF chip. 115 * The chipset on the device is composed of a RT and RF chip.
143 * The chipset combination is important for determining device capabilities. 116 * The chipset combination is important for determining device capabilities.
@@ -628,6 +601,7 @@ enum rt2x00_flags {
628 DRIVER_REQUIRE_BEACON_GUARD, 601 DRIVER_REQUIRE_BEACON_GUARD,
629 DRIVER_REQUIRE_ATIM_QUEUE, 602 DRIVER_REQUIRE_ATIM_QUEUE,
630 DRIVER_REQUIRE_SCHEDULED, 603 DRIVER_REQUIRE_SCHEDULED,
604 DRIVER_REQUIRE_DMA,
631 605
632 /* 606 /*
633 * Driver configuration 607 * Driver configuration
@@ -652,11 +626,7 @@ struct rt2x00_dev {
652 * When accessing this variable, the rt2x00dev_{pci,usb} 626 * When accessing this variable, the rt2x00dev_{pci,usb}
653 * macro's should be used for correct typecasting. 627 * macro's should be used for correct typecasting.
654 */ 628 */
655 void *dev; 629 struct device *dev;
656#define rt2x00dev_pci(__dev) ( (struct pci_dev *)(__dev)->dev )
657#define rt2x00dev_usb(__dev) ( (struct usb_interface *)(__dev)->dev )
658#define rt2x00dev_usb_dev(__dev)\
659 ( (struct usb_device *)interface_to_usbdev(rt2x00dev_usb(__dev)) )
660 630
661 /* 631 /*
662 * Callback functions. 632 * Callback functions.
@@ -931,10 +901,11 @@ static inline u16 get_duration_res(const unsigned int size, const u8 rate)
931} 901}
932 902
933/** 903/**
934 * rt2x00queue_alloc_rxskb - allocate a skb for RX purposes. 904 * rt2x00queue_map_txskb - Map a skb into DMA for TX purposes.
935 * @queue: The queue for which the skb will be applicable. 905 * @rt2x00dev: Pointer to &struct rt2x00_dev.
906 * @skb: The skb to map.
936 */ 907 */
937struct sk_buff *rt2x00queue_alloc_rxskb(struct data_queue *queue); 908void rt2x00queue_map_txskb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb);
938 909
939/** 910/**
940 * rt2x00queue_create_tx_descriptor - Create TX descriptor from mac80211 input 911 * rt2x00queue_create_tx_descriptor - Create TX descriptor from mac80211 input
@@ -985,26 +956,14 @@ struct data_queue *rt2x00queue_get_queue(struct rt2x00_dev *rt2x00dev,
985struct queue_entry *rt2x00queue_get_entry(struct data_queue *queue, 956struct queue_entry *rt2x00queue_get_entry(struct data_queue *queue,
986 enum queue_index index); 957 enum queue_index index);
987 958
988/**
989 * rt2x00queue_index_inc - Index incrementation function
990 * @queue: Queue (&struct data_queue) to perform the action on.
991 * @index: Index type (&enum queue_index) to perform the action on.
992 *
993 * This function will increase the requested index on the queue,
994 * it will grab the appropriate locks and handle queue overflow events by
995 * resetting the index to the start of the queue.
996 */
997void rt2x00queue_index_inc(struct data_queue *queue, enum queue_index index);
998
999
1000/* 959/*
1001 * Interrupt context handlers. 960 * Interrupt context handlers.
1002 */ 961 */
1003void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev); 962void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev);
1004void rt2x00lib_txdone(struct queue_entry *entry, 963void rt2x00lib_txdone(struct queue_entry *entry,
1005 struct txdone_entry_desc *txdesc); 964 struct txdone_entry_desc *txdesc);
1006void rt2x00lib_rxdone(struct queue_entry *entry, 965void rt2x00lib_rxdone(struct rt2x00_dev *rt2x00dev,
1007 struct rxdone_entry_desc *rxdesc); 966 struct queue_entry *entry);
1008 967
1009/* 968/*
1010 * mac80211 handlers. 969 * mac80211 handlers.