diff options
author | Seth Forshee <seth.forshee@canonical.com> | 2012-11-15 09:07:51 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-11-20 14:03:06 -0500 |
commit | ef2c0512bbf43440a78a6471059e19641eab1e83 (patch) | |
tree | d1df3c2350070ff3a62ba49c65e799f40e551fbf /drivers/net/wireless/brcm80211/brcmsmac/ampdu.h | |
parent | cb675f5ff39e12836591246e730e11ce648048d2 (diff) |
brcmsmac: Introduce AMPDU sessions for assembling AMPDUs
AMPDU session allows MPDUs to be temporarily queued until either a full
AMPDU has been collected or circumstances dictate that transmission
should start with a partial AMPDU. Packets are added to the session by
calling brcms_c_ampdu_add_frame(). brcms_c_ampdu_finalize() should be
called to fix up the tx headers in the first and last packet before
adding the packets to the DMA ring. brmcs_c_sendampdu() is converted to
using AMPDU sessions.
This patch has no real value on it's own, but is needed in preparation
for elimination of the tx packet queue from brcmsmac.
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac/ampdu.h')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/ampdu.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.h b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.h index 421f4ba7c63c..9a94923f850e 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.h +++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.h | |||
@@ -17,6 +17,32 @@ | |||
17 | #ifndef _BRCM_AMPDU_H_ | 17 | #ifndef _BRCM_AMPDU_H_ |
18 | #define _BRCM_AMPDU_H_ | 18 | #define _BRCM_AMPDU_H_ |
19 | 19 | ||
20 | /* | ||
21 | * Data structure representing an in-progress session for accumulating | ||
22 | * frames for AMPDU. | ||
23 | * | ||
24 | * wlc: pointer to common driver data | ||
25 | * skb_list: queue of skb's for AMPDU | ||
26 | * max_ampdu_len: maximum length for this AMPDU | ||
27 | * max_ampdu_frames: maximum number of frames for this AMPDU | ||
28 | * ampdu_len: total number of bytes accumulated for this AMPDU | ||
29 | * dma_len: DMA length of this AMPDU | ||
30 | */ | ||
31 | struct brcms_ampdu_session { | ||
32 | struct brcms_c_info *wlc; | ||
33 | struct sk_buff_head skb_list; | ||
34 | unsigned max_ampdu_len; | ||
35 | u16 max_ampdu_frames; | ||
36 | u16 ampdu_len; | ||
37 | u16 dma_len; | ||
38 | }; | ||
39 | |||
40 | extern void brcms_c_ampdu_reset_session(struct brcms_ampdu_session *session, | ||
41 | struct brcms_c_info *wlc); | ||
42 | extern int brcms_c_ampdu_add_frame(struct brcms_ampdu_session *session, | ||
43 | struct sk_buff *p); | ||
44 | extern void brcms_c_ampdu_finalize(struct brcms_ampdu_session *session); | ||
45 | |||
20 | extern struct ampdu_info *brcms_c_ampdu_attach(struct brcms_c_info *wlc); | 46 | extern struct ampdu_info *brcms_c_ampdu_attach(struct brcms_c_info *wlc); |
21 | extern void brcms_c_ampdu_detach(struct ampdu_info *ampdu); | 47 | extern void brcms_c_ampdu_detach(struct ampdu_info *ampdu); |
22 | extern int brcms_c_sendampdu(struct ampdu_info *ampdu, | 48 | extern int brcms_c_sendampdu(struct ampdu_info *ampdu, |