1*b4c3e9b5SBjoern A. Zeeb /* 2*b4c3e9b5SBjoern A. Zeeb * Copyright (c) 2010 Broadcom Corporation 3*b4c3e9b5SBjoern A. Zeeb * 4*b4c3e9b5SBjoern A. Zeeb * Permission to use, copy, modify, and/or distribute this software for any 5*b4c3e9b5SBjoern A. Zeeb * purpose with or without fee is hereby granted, provided that the above 6*b4c3e9b5SBjoern A. Zeeb * copyright notice and this permission notice appear in all copies. 7*b4c3e9b5SBjoern A. Zeeb * 8*b4c3e9b5SBjoern A. Zeeb * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9*b4c3e9b5SBjoern A. Zeeb * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10*b4c3e9b5SBjoern A. Zeeb * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 11*b4c3e9b5SBjoern A. Zeeb * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12*b4c3e9b5SBjoern A. Zeeb * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 13*b4c3e9b5SBjoern A. Zeeb * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 14*b4c3e9b5SBjoern A. Zeeb * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15*b4c3e9b5SBjoern A. Zeeb */ 16*b4c3e9b5SBjoern A. Zeeb 17*b4c3e9b5SBjoern A. Zeeb #ifndef _BRCM_AMPDU_H_ 18*b4c3e9b5SBjoern A. Zeeb #define _BRCM_AMPDU_H_ 19*b4c3e9b5SBjoern A. Zeeb 20*b4c3e9b5SBjoern A. Zeeb /* 21*b4c3e9b5SBjoern A. Zeeb * Data structure representing an in-progress session for accumulating 22*b4c3e9b5SBjoern A. Zeeb * frames for AMPDU. 23*b4c3e9b5SBjoern A. Zeeb * 24*b4c3e9b5SBjoern A. Zeeb * wlc: pointer to common driver data 25*b4c3e9b5SBjoern A. Zeeb * skb_list: queue of skb's for AMPDU 26*b4c3e9b5SBjoern A. Zeeb * max_ampdu_len: maximum length for this AMPDU 27*b4c3e9b5SBjoern A. Zeeb * max_ampdu_frames: maximum number of frames for this AMPDU 28*b4c3e9b5SBjoern A. Zeeb * ampdu_len: total number of bytes accumulated for this AMPDU 29*b4c3e9b5SBjoern A. Zeeb * dma_len: DMA length of this AMPDU 30*b4c3e9b5SBjoern A. Zeeb */ 31*b4c3e9b5SBjoern A. Zeeb struct brcms_ampdu_session { 32*b4c3e9b5SBjoern A. Zeeb struct brcms_c_info *wlc; 33*b4c3e9b5SBjoern A. Zeeb struct sk_buff_head skb_list; 34*b4c3e9b5SBjoern A. Zeeb unsigned max_ampdu_len; 35*b4c3e9b5SBjoern A. Zeeb u16 max_ampdu_frames; 36*b4c3e9b5SBjoern A. Zeeb u16 ampdu_len; 37*b4c3e9b5SBjoern A. Zeeb u16 dma_len; 38*b4c3e9b5SBjoern A. Zeeb }; 39*b4c3e9b5SBjoern A. Zeeb 40*b4c3e9b5SBjoern A. Zeeb void brcms_c_ampdu_reset_session(struct brcms_ampdu_session *session, 41*b4c3e9b5SBjoern A. Zeeb struct brcms_c_info *wlc); 42*b4c3e9b5SBjoern A. Zeeb int brcms_c_ampdu_add_frame(struct brcms_ampdu_session *session, 43*b4c3e9b5SBjoern A. Zeeb struct sk_buff *p); 44*b4c3e9b5SBjoern A. Zeeb void brcms_c_ampdu_finalize(struct brcms_ampdu_session *session); 45*b4c3e9b5SBjoern A. Zeeb 46*b4c3e9b5SBjoern A. Zeeb struct ampdu_info *brcms_c_ampdu_attach(struct brcms_c_info *wlc); 47*b4c3e9b5SBjoern A. Zeeb void brcms_c_ampdu_detach(struct ampdu_info *ampdu); 48*b4c3e9b5SBjoern A. Zeeb void brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb, 49*b4c3e9b5SBjoern A. Zeeb struct sk_buff *p, struct tx_status *txs); 50*b4c3e9b5SBjoern A. Zeeb void brcms_c_ampdu_macaddr_upd(struct brcms_c_info *wlc); 51*b4c3e9b5SBjoern A. Zeeb void brcms_c_ampdu_shm_upd(struct ampdu_info *ampdu); 52*b4c3e9b5SBjoern A. Zeeb 53*b4c3e9b5SBjoern A. Zeeb #endif /* _BRCM_AMPDU_H_ */ 54