cmd.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * This file is part of wl12xx
  4. *
  5. * Copyright (C) 1998-2009, 2011 Texas Instruments. All rights reserved.
  6. * Copyright (C) 2009 Nokia Corporation
  7. */
  8. #ifndef __WL12XX_CMD_H__
  9. #define __WL12XX_CMD_H__
  10. #include "conf.h"
  11. #define TEST_CMD_INI_FILE_RADIO_PARAM 0x19
  12. #define TEST_CMD_INI_FILE_GENERAL_PARAM 0x1E
  13. struct wl1271_general_parms_cmd {
  14. struct wl1271_cmd_header header;
  15. struct wl1271_cmd_test_header test;
  16. struct wl1271_ini_general_params general_params;
  17. u8 sr_debug_table[WL1271_INI_MAX_SMART_REFLEX_PARAM];
  18. u8 sr_sen_n_p;
  19. u8 sr_sen_n_p_gain;
  20. u8 sr_sen_nrn;
  21. u8 sr_sen_prn;
  22. u8 padding[3];
  23. } __packed;
  24. struct wl128x_general_parms_cmd {
  25. struct wl1271_cmd_header header;
  26. struct wl1271_cmd_test_header test;
  27. struct wl128x_ini_general_params general_params;
  28. u8 sr_debug_table[WL1271_INI_MAX_SMART_REFLEX_PARAM];
  29. u8 sr_sen_n_p;
  30. u8 sr_sen_n_p_gain;
  31. u8 sr_sen_nrn;
  32. u8 sr_sen_prn;
  33. u8 padding[3];
  34. } __packed;
  35. struct wl1271_radio_parms_cmd {
  36. struct wl1271_cmd_header header;
  37. struct wl1271_cmd_test_header test;
  38. /* Static radio parameters */
  39. struct wl1271_ini_band_params_2 static_params_2;
  40. struct wl1271_ini_band_params_5 static_params_5;
  41. /* Dynamic radio parameters */
  42. struct wl1271_ini_fem_params_2 dyn_params_2;
  43. u8 padding2;
  44. struct wl1271_ini_fem_params_5 dyn_params_5;
  45. u8 padding3[2];
  46. } __packed;
  47. struct wl128x_radio_parms_cmd {
  48. struct wl1271_cmd_header header;
  49. struct wl1271_cmd_test_header test;
  50. /* Static radio parameters */
  51. struct wl128x_ini_band_params_2 static_params_2;
  52. struct wl128x_ini_band_params_5 static_params_5;
  53. u8 fem_vendor_and_options;
  54. /* Dynamic radio parameters */
  55. struct wl128x_ini_fem_params_2 dyn_params_2;
  56. u8 padding2;
  57. struct wl128x_ini_fem_params_5 dyn_params_5;
  58. } __packed;
  59. #define TEST_CMD_INI_FILE_RF_EXTENDED_PARAM 0x26
  60. struct wl1271_ext_radio_parms_cmd {
  61. struct wl1271_cmd_header header;
  62. struct wl1271_cmd_test_header test;
  63. u8 tx_per_channel_power_compensation_2[CONF_TX_PWR_COMPENSATION_LEN_2];
  64. u8 tx_per_channel_power_compensation_5[CONF_TX_PWR_COMPENSATION_LEN_5];
  65. u8 padding[3];
  66. } __packed;
  67. struct wl12xx_cmd_channel_switch {
  68. struct wl1271_cmd_header header;
  69. u8 role_id;
  70. /* The new serving channel */
  71. u8 channel;
  72. /* Relative time of the serving channel switch in TBTT units */
  73. u8 switch_time;
  74. /* Stop the role TX, should expect it after radar detection */
  75. u8 stop_tx;
  76. /* The target channel tx status 1-stopped 0-open*/
  77. u8 post_switch_tx_disable;
  78. u8 padding[3];
  79. } __packed;
  80. int wl1271_cmd_general_parms(struct wl1271 *wl);
  81. int wl128x_cmd_general_parms(struct wl1271 *wl);
  82. int wl1271_cmd_radio_parms(struct wl1271 *wl);
  83. int wl128x_cmd_radio_parms(struct wl1271 *wl);
  84. int wl1271_cmd_ext_radio_parms(struct wl1271 *wl);
  85. int wl12xx_cmd_channel_switch(struct wl1271 *wl,
  86. struct wl12xx_vif *wlvif,
  87. struct ieee80211_channel_switch *ch_switch);
  88. #endif /* __WL12XX_CMD_H__ */