Blame view

kernel/linux-rt-4.4.41/drivers/net/wireless/ti/wl18xx/event.h 3.27 KB
5113f6f70   김현기   kernel add
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
  /*
   * This file is part of wl18xx
   *
   * Copyright (C) 2012 Texas Instruments. All rights reserved.
   *
   * This program is free software; you can redistribute it and/or
   * modify it under the terms of the GNU General Public License
   * version 2 as published by the Free Software Foundation.
   *
   * This program is distributed in the hope that it will be useful, but
   * WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   * General Public License for more details.
   *
   * You should have received a copy of the GNU General Public License
   * along with this program; if not, write to the Free Software
   * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
   * 02110-1301 USA
   *
   */
  
  #ifndef __WL18XX_EVENT_H__
  #define __WL18XX_EVENT_H__
  
  #include "../wlcore/wlcore.h"
  
  enum {
  	SCAN_COMPLETE_EVENT_ID                   = BIT(8),
  	RADAR_DETECTED_EVENT_ID                  = BIT(9),
  	CHANNEL_SWITCH_COMPLETE_EVENT_ID         = BIT(10),
  	BSS_LOSS_EVENT_ID                        = BIT(11),
  	MAX_TX_FAILURE_EVENT_ID                  = BIT(12),
  	DUMMY_PACKET_EVENT_ID                    = BIT(13),
  	INACTIVE_STA_EVENT_ID                    = BIT(14),
  	PEER_REMOVE_COMPLETE_EVENT_ID            = BIT(15),
  	PERIODIC_SCAN_COMPLETE_EVENT_ID          = BIT(16),
  	BA_SESSION_RX_CONSTRAINT_EVENT_ID        = BIT(17),
  	REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID      = BIT(18),
  	DFS_CHANNELS_CONFIG_COMPLETE_EVENT       = BIT(19),
  	PERIODIC_SCAN_REPORT_EVENT_ID            = BIT(20),
  	RX_BA_WIN_SIZE_CHANGE_EVENT_ID           = BIT(21),
  	SMART_CONFIG_SYNC_EVENT_ID               = BIT(22),
  	SMART_CONFIG_DECODE_EVENT_ID             = BIT(23),
  	TIME_SYNC_EVENT_ID                       = BIT(24),
  };
  
  enum wl18xx_radar_types {
  	RADAR_TYPE_NONE,
  	RADAR_TYPE_REGULAR,
  	RADAR_TYPE_CHIRP
  };
  
  struct wl18xx_event_mailbox {
  	__le32 events_vector;
  
  	u8 number_of_scan_results;
  	u8 number_of_sched_scan_results;
  
  	__le16 channel_switch_role_id_bitmap;
  
  	s8 rssi_snr_trigger_metric[NUM_OF_RSSI_SNR_TRIGGERS];
  
  	/* bitmap of removed links */
  	__le32 hlid_removed_bitmap;
  
  	/* rx ba constraint */
  	__le16 rx_ba_role_id_bitmap; /* 0xfff means any role. */
  	__le16 rx_ba_allowed_bitmap;
  
  	/* bitmap of roc completed (by role id) */
  	__le16 roc_completed_bitmap;
  
  	/* bitmap of stations (by role id) with bss loss */
  	__le16 bss_loss_bitmap;
  
  	/* bitmap of stations (by HLID) which exceeded max tx retries */
  	__le16 tx_retry_exceeded_bitmap;
  
  	/* time sync high msb*/
  	u16 time_sync_tsf_high_msb;
  
  	/* bitmap of inactive stations (by HLID) */
  	__le16 inactive_sta_bitmap;
  
  	/* time sync high lsb*/
  	u16 time_sync_tsf_high_lsb;
  
  	/* rx BA win size indicated by RX_BA_WIN_SIZE_CHANGE_EVENT_ID */
  	u8 rx_ba_role_id;
  	u8 rx_ba_link_id;
  	u8 rx_ba_win_size;
  	u8 padding;
  
  	/* smart config */
  	u8 sc_ssid_len;
  	u8 sc_pwd_len;
  	u8 sc_token_len;
  	u8 padding1;
  	u8 sc_ssid[32];
  	u8 sc_pwd[64];
  	u8 sc_token[32];
  
  	/* smart config sync channel */
  	u8 sc_sync_channel;
  	u8 sc_sync_band;
  
  	/* time sync low msb*/
  	u16 time_sync_tsf_low_msb;
  
  	/* radar detect */
  	u8 radar_channel;
  	u8 radar_type;
  
  	/* time sync low lsb*/
  	u16 time_sync_tsf_low_lsb;
  
  } __packed;
  
  int wl18xx_wait_for_event(struct wl1271 *wl, enum wlcore_wait_event event,
  			  bool *timeout);
  int wl18xx_process_mailbox_events(struct wl1271 *wl);
  
  #endif