aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/tx.h
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2011-05-05 13:32:35 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-05-05 13:32:35 -0400
commita70171dce9cd44cb06c7d299eba9fa87a8933045 (patch)
tree5425df5f33fadc617c7dec99578d06f0d933578e /drivers/net/wireless/wl12xx/tx.h
parent5a412ad7f4c95bb5b756aa12b52646e857e7c75d (diff)
parenteaef6a93bd52a2cc47b9fce201310010707afdb4 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts: drivers/net/wireless/libertas/if_cs.c drivers/net/wireless/rtlwifi/pci.c net/bluetooth/l2cap_sock.c
Diffstat (limited to 'drivers/net/wireless/wl12xx/tx.h')
-rw-r--r--drivers/net/wireless/wl12xx/tx.h60
1 files changed, 50 insertions, 10 deletions
diff --git a/drivers/net/wireless/wl12xx/tx.h b/drivers/net/wireless/wl12xx/tx.h
index 02f07fa66e82..fc7835c4cf63 100644
--- a/drivers/net/wireless/wl12xx/tx.h
+++ b/drivers/net/wireless/wl12xx/tx.h
@@ -25,7 +25,6 @@
25#ifndef __TX_H__ 25#ifndef __TX_H__
26#define __TX_H__ 26#define __TX_H__
27 27
28#define TX_HW_BLOCK_SPARE 2
29#define TX_HW_BLOCK_SIZE 252 28#define TX_HW_BLOCK_SIZE 252
30 29
31#define TX_HW_MGMT_PKT_LIFETIME_TU 2000 30#define TX_HW_MGMT_PKT_LIFETIME_TU 2000
@@ -41,6 +40,7 @@
41 BIT(8) | BIT(9)) 40 BIT(8) | BIT(9))
42#define TX_HW_ATTR_LAST_WORD_PAD (BIT(10) | BIT(11)) 41#define TX_HW_ATTR_LAST_WORD_PAD (BIT(10) | BIT(11))
43#define TX_HW_ATTR_TX_CMPLT_REQ BIT(12) 42#define TX_HW_ATTR_TX_CMPLT_REQ BIT(12)
43#define TX_HW_ATTR_TX_DUMMY_REQ BIT(13)
44 44
45#define TX_HW_ATTR_OFST_SAVE_RETRIES 0 45#define TX_HW_ATTR_OFST_SAVE_RETRIES 0
46#define TX_HW_ATTR_OFST_HEADER_PAD 1 46#define TX_HW_ATTR_OFST_HEADER_PAD 1
@@ -55,20 +55,60 @@
55#define WL1271_TX_ALIGN_TO 4 55#define WL1271_TX_ALIGN_TO 4
56#define WL1271_TKIP_IV_SPACE 4 56#define WL1271_TKIP_IV_SPACE 4
57 57
58/* Used for management frames and dummy packets */
59#define WL1271_TID_MGMT 7
60
61struct wl127x_tx_mem {
62 /*
63 * Number of extra memory blocks to allocate for this packet
64 * in addition to the number of blocks derived from the packet
65 * length.
66 */
67 u8 extra_blocks;
68 /*
69 * Total number of memory blocks allocated by the host for
70 * this packet. Must be equal or greater than the actual
71 * blocks number allocated by HW.
72 */
73 u8 total_mem_blocks;
74} __packed;
75
76struct wl128x_tx_mem {
77 /*
78 * Total number of memory blocks allocated by the host for
79 * this packet.
80 */
81 u8 total_mem_blocks;
82 /*
83 * Number of extra bytes, at the end of the frame. the host
84 * uses this padding to complete each frame to integer number
85 * of SDIO blocks.
86 */
87 u8 extra_bytes;
88} __packed;
89
90/*
91 * On wl128x based devices, when TX packets are aggregated, each packet
92 * size must be aligned to the SDIO block size. The maximum block size
93 * is bounded by the type of the padded bytes field that is sent to the
94 * FW. Currently the type is u8, so the maximum block size is 256 bytes.
95 */
96#define WL12XX_BUS_BLOCK_SIZE min(512u, \
97 (1u << (8 * sizeof(((struct wl128x_tx_mem *) 0)->extra_bytes))))
98
58struct wl1271_tx_hw_descr { 99struct wl1271_tx_hw_descr {
59 /* Length of packet in words, including descriptor+header+data */ 100 /* Length of packet in words, including descriptor+header+data */
60 __le16 length; 101 __le16 length;
61 /* Number of extra memory blocks to allocate for this packet in 102 union {
62 addition to the number of blocks derived from the packet length */ 103 struct wl127x_tx_mem wl127x_mem;
63 u8 extra_mem_blocks; 104 struct wl128x_tx_mem wl128x_mem;
64 /* Total number of memory blocks allocated by the host for this packet. 105 } __packed;
65 Must be equal or greater than the actual blocks number allocated by
66 HW!! */
67 u8 total_mem_blocks;
68 /* Device time (in us) when the packet arrived to the driver */ 106 /* Device time (in us) when the packet arrived to the driver */
69 __le32 start_time; 107 __le32 start_time;
70 /* Max delay in TUs until transmission. The last device time the 108 /*
71 packet can be transmitted is: startTime+(1024*LifeTime) */ 109 * Max delay in TUs until transmission. The last device time the
110 * packet can be transmitted is: start_time + (1024 * life_time)
111 */
72 __le16 life_time; 112 __le16 life_time;
73 /* Bitwise fields - see TX_ATTR... definitions above. */ 113 /* Bitwise fields - see TX_ATTR... definitions above. */
74 __le16 tx_attr; 114 __le16 tx_attr;