15b435de0d786869c95d1962121af0d7df2542009Arend van Spriel/* 25b435de0d786869c95d1962121af0d7df2542009Arend van Spriel * Copyright (c) 2010 Broadcom Corporation 35b435de0d786869c95d1962121af0d7df2542009Arend van Spriel * 45b435de0d786869c95d1962121af0d7df2542009Arend van Spriel * Permission to use, copy, modify, and/or distribute this software for any 55b435de0d786869c95d1962121af0d7df2542009Arend van Spriel * purpose with or without fee is hereby granted, provided that the above 65b435de0d786869c95d1962121af0d7df2542009Arend van Spriel * copyright notice and this permission notice appear in all copies. 75b435de0d786869c95d1962121af0d7df2542009Arend van Spriel * 85b435de0d786869c95d1962121af0d7df2542009Arend van Spriel * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 95b435de0d786869c95d1962121af0d7df2542009Arend van Spriel * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 105b435de0d786869c95d1962121af0d7df2542009Arend van Spriel * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 115b435de0d786869c95d1962121af0d7df2542009Arend van Spriel * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 125b435de0d786869c95d1962121af0d7df2542009Arend van Spriel * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 135b435de0d786869c95d1962121af0d7df2542009Arend van Spriel * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 145b435de0d786869c95d1962121af0d7df2542009Arend van Spriel * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 155b435de0d786869c95d1962121af0d7df2542009Arend van Spriel */ 165b435de0d786869c95d1962121af0d7df2542009Arend van Spriel 175b435de0d786869c95d1962121af0d7df2542009Arend van Spriel#ifndef _BRCM_AMPDU_H_ 185b435de0d786869c95d1962121af0d7df2542009Arend van Spriel#define _BRCM_AMPDU_H_ 195b435de0d786869c95d1962121af0d7df2542009Arend van Spriel 20ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee/* 21ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee * Data structure representing an in-progress session for accumulating 22ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee * frames for AMPDU. 23ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee * 24ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee * wlc: pointer to common driver data 25ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee * skb_list: queue of skb's for AMPDU 26ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee * max_ampdu_len: maximum length for this AMPDU 27ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee * max_ampdu_frames: maximum number of frames for this AMPDU 28ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee * ampdu_len: total number of bytes accumulated for this AMPDU 29ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee * dma_len: DMA length of this AMPDU 30ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee */ 31ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forsheestruct brcms_ampdu_session { 32ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee struct brcms_c_info *wlc; 33ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee struct sk_buff_head skb_list; 34ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee unsigned max_ampdu_len; 35ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee u16 max_ampdu_frames; 36ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee u16 ampdu_len; 37ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee u16 dma_len; 38ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee}; 39ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee 409bd91f3c00bd8dd54339499a9253b31c6bac7c7bJoe Perchesvoid brcms_c_ampdu_reset_session(struct brcms_ampdu_session *session, 419bd91f3c00bd8dd54339499a9253b31c6bac7c7bJoe Perches struct brcms_c_info *wlc); 429bd91f3c00bd8dd54339499a9253b31c6bac7c7bJoe Perchesint brcms_c_ampdu_add_frame(struct brcms_ampdu_session *session, 439bd91f3c00bd8dd54339499a9253b31c6bac7c7bJoe Perches struct sk_buff *p); 449bd91f3c00bd8dd54339499a9253b31c6bac7c7bJoe Perchesvoid brcms_c_ampdu_finalize(struct brcms_ampdu_session *session); 45ef2c0512bbf43440a78a6471059e19641eab1e83Seth Forshee 469bd91f3c00bd8dd54339499a9253b31c6bac7c7bJoe Perchesstruct ampdu_info *brcms_c_ampdu_attach(struct brcms_c_info *wlc); 479bd91f3c00bd8dd54339499a9253b31c6bac7c7bJoe Perchesvoid brcms_c_ampdu_detach(struct ampdu_info *ampdu); 489bd91f3c00bd8dd54339499a9253b31c6bac7c7bJoe Perchesvoid brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb, 499bd91f3c00bd8dd54339499a9253b31c6bac7c7bJoe Perches struct sk_buff *p, struct tx_status *txs); 509bd91f3c00bd8dd54339499a9253b31c6bac7c7bJoe Perchesvoid brcms_c_ampdu_macaddr_upd(struct brcms_c_info *wlc); 519bd91f3c00bd8dd54339499a9253b31c6bac7c7bJoe Perchesvoid brcms_c_ampdu_shm_upd(struct ampdu_info *ampdu); 525b435de0d786869c95d1962121af0d7df2542009Arend van Spriel 535b435de0d786869c95d1962121af0d7df2542009Arend van Spriel#endif /* _BRCM_AMPDU_H_ */ 54