wl18xx.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. /* minimum FW required for driver */
  25. #define WL18XX_CHIP_VER 8
  26. #define WL18XX_IFTYPE_VER 2
  27. #define WL18XX_MAJOR_VER 0
  28. #define WL18XX_SUBTYPE_VER 0
  29. #define WL18XX_MINOR_VER 100
  30. #define WL18XX_CMD_MAX_SIZE 740
  31. struct wl18xx_priv {
  32. /* buffer for sending commands to FW */
  33. u8 cmd_buf[WL18XX_CMD_MAX_SIZE];
  34. struct wl18xx_priv_conf conf;
  35. /* Index of last released Tx desc in FW */
  36. u8 last_fw_rls_idx;
  37. /* number of VIFs requiring extra spare mem-blocks */
  38. int extra_spare_vif_count;
  39. };
  40. #define WL18XX_FW_MAX_TX_STATUS_DESC 33
  41. struct wl18xx_fw_status_priv {
  42. /*
  43. * Index in released_tx_desc for first byte that holds
  44. * released tx host desc
  45. */
  46. u8 fw_release_idx;
  47. /*
  48. * Array of host Tx descriptors, where fw_release_idx
  49. * indicated the first released idx.
  50. */
  51. u8 released_tx_desc[WL18XX_FW_MAX_TX_STATUS_DESC];
  52. u8 padding[2];
  53. };
  54. #define WL18XX_PHY_VERSION_MAX_LEN 20
  55. struct wl18xx_static_data_priv {
  56. char phy_version[WL18XX_PHY_VERSION_MAX_LEN];
  57. };
  58. struct wl18xx_clk_cfg {
  59. u32 n;
  60. u32 m;
  61. u32 p;
  62. u32 q;
  63. bool swallow;
  64. };
  65. enum {
  66. CLOCK_CONFIG_16_2_M = 1,
  67. CLOCK_CONFIG_16_368_M,
  68. CLOCK_CONFIG_16_8_M,
  69. CLOCK_CONFIG_19_2_M,
  70. CLOCK_CONFIG_26_M,
  71. CLOCK_CONFIG_32_736_M,
  72. CLOCK_CONFIG_33_6_M,
  73. CLOCK_CONFIG_38_468_M,
  74. CLOCK_CONFIG_52_M,
  75. NUM_CLOCK_CONFIGS,
  76. };
  77. #endif /* __WL18XX_PRIV_H__ */