cmd.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * This file is part of wl18xx
  4. *
  5. * Copyright (C) 2011 Texas Instruments. All rights reserved.
  6. */
  7. #ifndef __WL18XX_CMD_H__
  8. #define __WL18XX_CMD_H__
  9. #include "../wlcore/wlcore.h"
  10. #include "../wlcore/acx.h"
  11. struct wl18xx_cmd_channel_switch {
  12. struct wl1271_cmd_header header;
  13. u8 role_id;
  14. /* The new serving channel */
  15. u8 channel;
  16. /* Relative time of the serving channel switch in TBTT units */
  17. u8 switch_time;
  18. /* Stop the role TX, should expect it after radar detection */
  19. u8 stop_tx;
  20. __le32 local_supported_rates;
  21. u8 channel_type;
  22. u8 band;
  23. u8 padding[2];
  24. } __packed;
  25. struct wl18xx_cmd_smart_config_start {
  26. struct wl1271_cmd_header header;
  27. __le32 group_id_bitmask;
  28. } __packed;
  29. struct wl18xx_cmd_smart_config_set_group_key {
  30. struct wl1271_cmd_header header;
  31. __le32 group_id;
  32. u8 key[16];
  33. } __packed;
  34. struct wl18xx_cmd_dfs_radar_debug {
  35. struct wl1271_cmd_header header;
  36. u8 channel;
  37. u8 padding[3];
  38. } __packed;
  39. struct wl18xx_cmd_dfs_master_restart {
  40. struct wl1271_cmd_header header;
  41. u8 role_id;
  42. u8 padding[3];
  43. } __packed;
  44. /* cac_start and cac_stop share the same params */
  45. struct wlcore_cmd_cac_start {
  46. struct wl1271_cmd_header header;
  47. u8 role_id;
  48. u8 channel;
  49. u8 band;
  50. u8 bandwidth;
  51. } __packed;
  52. int wl18xx_cmd_channel_switch(struct wl1271 *wl,
  53. struct wl12xx_vif *wlvif,
  54. struct ieee80211_channel_switch *ch_switch);
  55. int wl18xx_cmd_smart_config_start(struct wl1271 *wl, u32 group_bitmap);
  56. int wl18xx_cmd_smart_config_stop(struct wl1271 *wl);
  57. int wl18xx_cmd_smart_config_set_group_key(struct wl1271 *wl, u16 group_id,
  58. u8 key_len, u8 *key);
  59. int wl18xx_cmd_set_cac(struct wl1271 *wl, struct wl12xx_vif *wlvif, bool start);
  60. int wl18xx_cmd_radar_detection_debug(struct wl1271 *wl, u8 channel);
  61. int wl18xx_cmd_dfs_master_restart(struct wl1271 *wl, struct wl12xx_vif *wlvif);
  62. #endif