cmd.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /*
  2. * This file is part of wl12xx
  3. *
  4. * Copyright (C) 1998-2009, 2011 Texas Instruments. All rights reserved.
  5. * Copyright (C) 2009 Nokia Corporation
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * version 2 as published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  19. * 02110-1301 USA
  20. *
  21. */
  22. #ifndef __WL12XX_CMD_H__
  23. #define __WL12XX_CMD_H__
  24. #include "conf.h"
  25. #define TEST_CMD_INI_FILE_RADIO_PARAM 0x19
  26. #define TEST_CMD_INI_FILE_GENERAL_PARAM 0x1E
  27. struct wl1271_general_parms_cmd {
  28. struct wl1271_cmd_header header;
  29. struct wl1271_cmd_test_header test;
  30. struct wl1271_ini_general_params general_params;
  31. u8 sr_debug_table[WL1271_INI_MAX_SMART_REFLEX_PARAM];
  32. u8 sr_sen_n_p;
  33. u8 sr_sen_n_p_gain;
  34. u8 sr_sen_nrn;
  35. u8 sr_sen_prn;
  36. u8 padding[3];
  37. } __packed;
  38. struct wl128x_general_parms_cmd {
  39. struct wl1271_cmd_header header;
  40. struct wl1271_cmd_test_header test;
  41. struct wl128x_ini_general_params general_params;
  42. u8 sr_debug_table[WL1271_INI_MAX_SMART_REFLEX_PARAM];
  43. u8 sr_sen_n_p;
  44. u8 sr_sen_n_p_gain;
  45. u8 sr_sen_nrn;
  46. u8 sr_sen_prn;
  47. u8 padding[3];
  48. } __packed;
  49. struct wl1271_radio_parms_cmd {
  50. struct wl1271_cmd_header header;
  51. struct wl1271_cmd_test_header test;
  52. /* Static radio parameters */
  53. struct wl1271_ini_band_params_2 static_params_2;
  54. struct wl1271_ini_band_params_5 static_params_5;
  55. /* Dynamic radio parameters */
  56. struct wl1271_ini_fem_params_2 dyn_params_2;
  57. u8 padding2;
  58. struct wl1271_ini_fem_params_5 dyn_params_5;
  59. u8 padding3[2];
  60. } __packed;
  61. struct wl128x_radio_parms_cmd {
  62. struct wl1271_cmd_header header;
  63. struct wl1271_cmd_test_header test;
  64. /* Static radio parameters */
  65. struct wl128x_ini_band_params_2 static_params_2;
  66. struct wl128x_ini_band_params_5 static_params_5;
  67. u8 fem_vendor_and_options;
  68. /* Dynamic radio parameters */
  69. struct wl128x_ini_fem_params_2 dyn_params_2;
  70. u8 padding2;
  71. struct wl128x_ini_fem_params_5 dyn_params_5;
  72. } __packed;
  73. #define TEST_CMD_INI_FILE_RF_EXTENDED_PARAM 0x26
  74. struct wl1271_ext_radio_parms_cmd {
  75. struct wl1271_cmd_header header;
  76. struct wl1271_cmd_test_header test;
  77. u8 tx_per_channel_power_compensation_2[CONF_TX_PWR_COMPENSATION_LEN_2];
  78. u8 tx_per_channel_power_compensation_5[CONF_TX_PWR_COMPENSATION_LEN_5];
  79. u8 padding[3];
  80. } __packed;
  81. struct wl12xx_cmd_channel_switch {
  82. struct wl1271_cmd_header header;
  83. u8 role_id;
  84. /* The new serving channel */
  85. u8 channel;
  86. /* Relative time of the serving channel switch in TBTT units */
  87. u8 switch_time;
  88. /* Stop the role TX, should expect it after radar detection */
  89. u8 stop_tx;
  90. /* The target channel tx status 1-stopped 0-open*/
  91. u8 post_switch_tx_disable;
  92. u8 padding[3];
  93. } __packed;
  94. int wl1271_cmd_general_parms(struct wl1271 *wl);
  95. int wl128x_cmd_general_parms(struct wl1271 *wl);
  96. int wl1271_cmd_radio_parms(struct wl1271 *wl);
  97. int wl128x_cmd_radio_parms(struct wl1271 *wl);
  98. int wl1271_cmd_ext_radio_parms(struct wl1271 *wl);
  99. int wl12xx_cmd_channel_switch(struct wl1271 *wl,
  100. struct wl12xx_vif *wlvif,
  101. struct ieee80211_channel_switch *ch_switch);
  102. #endif /* __WL12XX_CMD_H__ */