wl18xx.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * This file is part of wl18xx
  3. *
  4. * Copyright (C) 2011 Texas Instruments Inc.
  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_PRIV_H__
  22. #define __WL18XX_PRIV_H__
  23. #include "conf.h"
  24. #define WL18XX_CMD_MAX_SIZE 740
  25. struct wl18xx_priv {
  26. /* buffer for sending commands to FW */
  27. u8 cmd_buf[WL18XX_CMD_MAX_SIZE];
  28. struct wl18xx_priv_conf conf;
  29. /* Index of last released Tx desc in FW */
  30. u8 last_fw_rls_idx;
  31. /* number of VIFs requiring extra spare mem-blocks */
  32. int extra_spare_vif_count;
  33. };
  34. #define WL18XX_FW_MAX_TX_STATUS_DESC 33
  35. struct wl18xx_fw_status_priv {
  36. /*
  37. * Index in released_tx_desc for first byte that holds
  38. * released tx host desc
  39. */
  40. u8 fw_release_idx;
  41. /*
  42. * Array of host Tx descriptors, where fw_release_idx
  43. * indicated the first released idx.
  44. */
  45. u8 released_tx_desc[WL18XX_FW_MAX_TX_STATUS_DESC];
  46. u8 padding[2];
  47. };
  48. #define WL18XX_PHY_VERSION_MAX_LEN 20
  49. struct wl18xx_static_data_priv {
  50. char phy_version[WL18XX_PHY_VERSION_MAX_LEN];
  51. };
  52. struct wl18xx_clk_cfg {
  53. u32 n;
  54. u32 m;
  55. u32 p;
  56. u32 q;
  57. bool swallow;
  58. };
  59. enum {
  60. CLOCK_CONFIG_16_2_M = 1,
  61. CLOCK_CONFIG_16_368_M,
  62. CLOCK_CONFIG_16_8_M,
  63. CLOCK_CONFIG_19_2_M,
  64. CLOCK_CONFIG_26_M,
  65. CLOCK_CONFIG_32_736_M,
  66. CLOCK_CONFIG_33_6_M,
  67. CLOCK_CONFIG_38_468_M,
  68. CLOCK_CONFIG_52_M,
  69. NUM_CLOCK_CONFIGS,
  70. };
  71. #endif /* __WL18XX_PRIV_H__ */