event.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * This file is part of wl18xx
  4. *
  5. * Copyright (C) 2012 Texas Instruments. All rights reserved.
  6. */
  7. #ifndef __WL18XX_EVENT_H__
  8. #define __WL18XX_EVENT_H__
  9. #include "../wlcore/wlcore.h"
  10. enum {
  11. SCAN_COMPLETE_EVENT_ID = BIT(8),
  12. RADAR_DETECTED_EVENT_ID = BIT(9),
  13. CHANNEL_SWITCH_COMPLETE_EVENT_ID = BIT(10),
  14. BSS_LOSS_EVENT_ID = BIT(11),
  15. MAX_TX_FAILURE_EVENT_ID = BIT(12),
  16. DUMMY_PACKET_EVENT_ID = BIT(13),
  17. INACTIVE_STA_EVENT_ID = BIT(14),
  18. PEER_REMOVE_COMPLETE_EVENT_ID = BIT(15),
  19. PERIODIC_SCAN_COMPLETE_EVENT_ID = BIT(16),
  20. BA_SESSION_RX_CONSTRAINT_EVENT_ID = BIT(17),
  21. REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID = BIT(18),
  22. DFS_CHANNELS_CONFIG_COMPLETE_EVENT = BIT(19),
  23. PERIODIC_SCAN_REPORT_EVENT_ID = BIT(20),
  24. RX_BA_WIN_SIZE_CHANGE_EVENT_ID = BIT(21),
  25. SMART_CONFIG_SYNC_EVENT_ID = BIT(22),
  26. SMART_CONFIG_DECODE_EVENT_ID = BIT(23),
  27. TIME_SYNC_EVENT_ID = BIT(24),
  28. FW_LOGGER_INDICATION = BIT(25),
  29. };
  30. enum wl18xx_radar_types {
  31. RADAR_TYPE_NONE,
  32. RADAR_TYPE_REGULAR,
  33. RADAR_TYPE_CHIRP
  34. };
  35. struct wl18xx_event_mailbox {
  36. __le32 events_vector;
  37. u8 number_of_scan_results;
  38. u8 number_of_sched_scan_results;
  39. __le16 channel_switch_role_id_bitmap;
  40. s8 rssi_snr_trigger_metric[NUM_OF_RSSI_SNR_TRIGGERS];
  41. /* bitmap of removed links */
  42. __le32 hlid_removed_bitmap;
  43. /* rx ba constraint */
  44. __le16 rx_ba_role_id_bitmap; /* 0xfff means any role. */
  45. __le16 rx_ba_allowed_bitmap;
  46. /* bitmap of roc completed (by role id) */
  47. __le16 roc_completed_bitmap;
  48. /* bitmap of stations (by role id) with bss loss */
  49. __le16 bss_loss_bitmap;
  50. /* bitmap of stations (by HLID) which exceeded max tx retries */
  51. __le16 tx_retry_exceeded_bitmap;
  52. /* time sync high msb*/
  53. __le16 time_sync_tsf_high_msb;
  54. /* bitmap of inactive stations (by HLID) */
  55. __le16 inactive_sta_bitmap;
  56. /* time sync high lsb*/
  57. __le16 time_sync_tsf_high_lsb;
  58. /* rx BA win size indicated by RX_BA_WIN_SIZE_CHANGE_EVENT_ID */
  59. u8 rx_ba_role_id;
  60. u8 rx_ba_link_id;
  61. u8 rx_ba_win_size;
  62. u8 padding;
  63. /* smart config */
  64. u8 sc_ssid_len;
  65. u8 sc_pwd_len;
  66. u8 sc_token_len;
  67. u8 padding1;
  68. u8 sc_ssid[32];
  69. u8 sc_pwd[64];
  70. u8 sc_token[32];
  71. /* smart config sync channel */
  72. u8 sc_sync_channel;
  73. u8 sc_sync_band;
  74. /* time sync low msb*/
  75. __le16 time_sync_tsf_low_msb;
  76. /* radar detect */
  77. u8 radar_channel;
  78. u8 radar_type;
  79. /* time sync low lsb*/
  80. __le16 time_sync_tsf_low_lsb;
  81. } __packed;
  82. int wl18xx_wait_for_event(struct wl1271 *wl, enum wlcore_wait_event event,
  83. bool *timeout);
  84. int wl18xx_process_mailbox_events(struct wl1271 *wl);
  85. #endif