summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/mac.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-09-14 21:24:21 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-09-16 16:45:39 -0400
commit2b63a41d14245345d6c498506c5634613afa80c0 (patch)
tree57fd8b8779ded0436c29a495cb522c30ffc91ae4 /drivers/net/wireless/ath/ath9k/mac.h
parent60f8cc60fa41b8c44662a3a4d99862e3b81cfa6f (diff)
downloadop-kernel-dev-2b63a41d14245345d6c498506c5634613afa80c0.zip
op-kernel-dev-2b63a41d14245345d6c498506c5634613afa80c0.tar.gz
ath9k_hw: add a new API for setting tx descriptors
Instead of using lots of different functions with long argument lists, pull all the necessary information from one struct. This makes the code easier to read and eliminates the need for copying data between multiple linked descriptors. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/mac.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/mac.h40
1 files changed, 39 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h
index 2a52370..ca71bb4 100644
--- a/drivers/net/wireless/ath/ath9k/mac.h
+++ b/drivers/net/wireless/ath/ath9k/mac.h
@@ -263,7 +263,11 @@ struct ath_desc {
#define ATH9K_TXDESC_VMF 0x0100
#define ATH9K_TXDESC_FRAG_IS_ON 0x0200
#define ATH9K_TXDESC_LOWRXCHAIN 0x0400
-#define ATH9K_TXDESC_LDPC 0x00010000
+#define ATH9K_TXDESC_LDPC 0x0800
+#define ATH9K_TXDESC_CLRDMASK 0x1000
+
+#define ATH9K_TXDESC_PAPRD 0x70000
+#define ATH9K_TXDESC_PAPRD_S 16
#define ATH9K_RXDESC_INTREQ 0x0020
@@ -660,6 +664,13 @@ struct ath9k_11n_rate_series {
u32 RateFlags;
};
+enum aggr_type {
+ AGGR_BUF_NONE,
+ AGGR_BUF_FIRST,
+ AGGR_BUF_MIDDLE,
+ AGGR_BUF_LAST,
+};
+
enum ath9k_key_type {
ATH9K_KEY_TYPE_CLEAR,
ATH9K_KEY_TYPE_WEP,
@@ -667,6 +678,33 @@ enum ath9k_key_type {
ATH9K_KEY_TYPE_TKIP,
};
+struct ath_tx_info {
+ u8 qcu;
+
+ bool is_first;
+ bool is_last;
+
+ enum aggr_type aggr;
+ u8 ndelim;
+ u16 aggr_len;
+
+ dma_addr_t link;
+ int pkt_len;
+ u32 flags;
+
+ dma_addr_t buf_addr[4];
+ int buf_len[4];
+
+ struct ath9k_11n_rate_series rates[4];
+ u8 rtscts_rate;
+ bool dur_update;
+
+ enum ath9k_pkt_type type;
+ enum ath9k_key_type keytype;
+ u8 keyix;
+ u8 txpower;
+};
+
struct ath_hw;
struct ath9k_channel;
enum ath9k_int;
OpenPOWER on IntegriCloud