18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright (c) 2010 Broadcom Corporation 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any 58c2ecf20Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above 68c2ecf20Sopenharmony_ci * copyright notice and this permission notice appear in all copies. 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 98c2ecf20Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 108c2ecf20Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 118c2ecf20Sopenharmony_ci * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 128c2ecf20Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 138c2ecf20Sopenharmony_ci * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 148c2ecf20Sopenharmony_ci * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 158c2ecf20Sopenharmony_ci */ 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#ifndef _BRCM_AMPDU_H_ 188c2ecf20Sopenharmony_ci#define _BRCM_AMPDU_H_ 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci/* 218c2ecf20Sopenharmony_ci * Data structure representing an in-progress session for accumulating 228c2ecf20Sopenharmony_ci * frames for AMPDU. 238c2ecf20Sopenharmony_ci * 248c2ecf20Sopenharmony_ci * wlc: pointer to common driver data 258c2ecf20Sopenharmony_ci * skb_list: queue of skb's for AMPDU 268c2ecf20Sopenharmony_ci * max_ampdu_len: maximum length for this AMPDU 278c2ecf20Sopenharmony_ci * max_ampdu_frames: maximum number of frames for this AMPDU 288c2ecf20Sopenharmony_ci * ampdu_len: total number of bytes accumulated for this AMPDU 298c2ecf20Sopenharmony_ci * dma_len: DMA length of this AMPDU 308c2ecf20Sopenharmony_ci */ 318c2ecf20Sopenharmony_cistruct brcms_ampdu_session { 328c2ecf20Sopenharmony_ci struct brcms_c_info *wlc; 338c2ecf20Sopenharmony_ci struct sk_buff_head skb_list; 348c2ecf20Sopenharmony_ci unsigned max_ampdu_len; 358c2ecf20Sopenharmony_ci u16 max_ampdu_frames; 368c2ecf20Sopenharmony_ci u16 ampdu_len; 378c2ecf20Sopenharmony_ci u16 dma_len; 388c2ecf20Sopenharmony_ci}; 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_civoid brcms_c_ampdu_reset_session(struct brcms_ampdu_session *session, 418c2ecf20Sopenharmony_ci struct brcms_c_info *wlc); 428c2ecf20Sopenharmony_ciint brcms_c_ampdu_add_frame(struct brcms_ampdu_session *session, 438c2ecf20Sopenharmony_ci struct sk_buff *p); 448c2ecf20Sopenharmony_civoid brcms_c_ampdu_finalize(struct brcms_ampdu_session *session); 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_cistruct ampdu_info *brcms_c_ampdu_attach(struct brcms_c_info *wlc); 478c2ecf20Sopenharmony_civoid brcms_c_ampdu_detach(struct ampdu_info *ampdu); 488c2ecf20Sopenharmony_civoid brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb, 498c2ecf20Sopenharmony_ci struct sk_buff *p, struct tx_status *txs); 508c2ecf20Sopenharmony_civoid brcms_c_ampdu_macaddr_upd(struct brcms_c_info *wlc); 518c2ecf20Sopenharmony_civoid brcms_c_ampdu_shm_upd(struct ampdu_info *ampdu); 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci#endif /* _BRCM_AMPDU_H_ */ 54