ampdu.h 2.0 KB

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