cmd.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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_CMD_H__
  22. #define __WL18XX_CMD_H__
  23. #include "../wlcore/wlcore.h"
  24. #include "../wlcore/acx.h"
  25. struct wl18xx_cmd_channel_switch {
  26. struct wl1271_cmd_header header;
  27. u8 role_id;
  28. /* The new serving channel */
  29. u8 channel;
  30. /* Relative time of the serving channel switch in TBTT units */
  31. u8 switch_time;
  32. /* Stop the role TX, should expect it after radar detection */
  33. u8 stop_tx;
  34. __le32 local_supported_rates;
  35. u8 channel_type;
  36. u8 band;
  37. u8 padding[2];
  38. } __packed;
  39. struct wl18xx_cmd_smart_config_start {
  40. struct wl1271_cmd_header header;
  41. __le32 group_id_bitmask;
  42. } __packed;
  43. struct wl18xx_cmd_smart_config_set_group_key {
  44. struct wl1271_cmd_header header;
  45. __le32 group_id;
  46. u8 key[16];
  47. } __packed;
  48. struct wl18xx_cmd_dfs_radar_debug {
  49. struct wl1271_cmd_header header;
  50. u8 channel;
  51. u8 padding[3];
  52. } __packed;
  53. struct wl18xx_cmd_dfs_master_restart {
  54. struct wl1271_cmd_header header;
  55. u8 role_id;
  56. u8 padding[3];
  57. } __packed;
  58. /* cac_start and cac_stop share the same params */
  59. struct wlcore_cmd_cac_start {
  60. struct wl1271_cmd_header header;
  61. u8 role_id;
  62. u8 channel;
  63. u8 band;
  64. u8 bandwidth;
  65. } __packed;
  66. int wl18xx_cmd_channel_switch(struct wl1271 *wl,
  67. struct wl12xx_vif *wlvif,
  68. struct ieee80211_channel_switch *ch_switch);
  69. int wl18xx_cmd_smart_config_start(struct wl1271 *wl, u32 group_bitmap);
  70. int wl18xx_cmd_smart_config_stop(struct wl1271 *wl);
  71. int wl18xx_cmd_smart_config_set_group_key(struct wl1271 *wl, u16 group_id,
  72. u8 key_len, u8 *key);
  73. int wl18xx_cmd_set_cac(struct wl1271 *wl, struct wl12xx_vif *wlvif, bool start);
  74. int wl18xx_cmd_radar_detection_debug(struct wl1271 *wl, u8 channel);
  75. int wl18xx_cmd_dfs_master_restart(struct wl1271 *wl, struct wl12xx_vif *wlvif);
  76. #endif