acx.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * This file is part of wl18xx
  3. *
  4. * Copyright (C) 2011 Texas Instruments. All rights reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * version 2 as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  18. * 02110-1301 USA
  19. *
  20. */
  21. #ifndef __WL18XX_ACX_H__
  22. #define __WL18XX_ACX_H__
  23. #include "../wlcore/wlcore.h"
  24. /* numbers of bits the length field takes (add 1 for the actual number) */
  25. #define WL18XX_HOST_IF_LEN_SIZE_FIELD 15
  26. struct wl18xx_acx_host_config_bitmap {
  27. struct acx_header header;
  28. __le32 host_cfg_bitmap;
  29. __le32 host_sdio_block_size;
  30. /* extra mem blocks per frame in TX. */
  31. __le32 extra_mem_blocks;
  32. /*
  33. * number of bits of the length field in the first TX word
  34. * (up to 15 - for using the entire 16 bits).
  35. */
  36. __le32 length_field_size;
  37. } __packed;
  38. enum {
  39. CHECKSUM_OFFLOAD_DISABLED = 0,
  40. CHECKSUM_OFFLOAD_ENABLED = 1,
  41. CHECKSUM_OFFLOAD_FAKE_RX = 2,
  42. CHECKSUM_OFFLOAD_INVALID = 0xFF
  43. };
  44. struct wl18xx_acx_checksum_state {
  45. struct acx_header header;
  46. /* enum acx_checksum_state */
  47. u8 checksum_state;
  48. u8 pad[3];
  49. } __packed;
  50. int wl18xx_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap,
  51. u32 sdio_blk_size, u32 extra_mem_blks,
  52. u32 len_field_size);
  53. int wl18xx_acx_set_checksum_state(struct wl1271 *wl);
  54. #endif /* __WL12XX_ACX_H__ */