• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Neighbor Awareness Networking
3  *
4  * Copyright (C) 1999-2019, Broadcom.
5  *
6  *      Unless you and Broadcom execute a separate written software license
7  * agreement governing use of this software, this software is licensed to you
8  * under the terms of the GNU General Public License version 2 (the "GPL"),
9  * available at http://www.broadcom.com/licenses/GPLv2.php, with the
10  * following added to such license:
11  *
12  *      As a special exception, the copyright holders of this software give you
13  * permission to link this software with independent modules, and to copy and
14  * distribute the resulting executable under terms of your choice, provided that
15  * you also meet, for each linked independent module, the terms and conditions
16  * of the license of that module.  An independent module is a module which is
17  * not derived from this software.  The special exception does not apply to any
18  * modifications of the software.
19  *
20  *      Notwithstanding the above, under no circumstances may you combine this
21  * software in any way with any other Broadcom software provided under a license
22  * other than the GPL, without Broadcom's express prior written consent.
23  *
24  *
25  * <<Broadcom-WL-IPTag/Open:>>
26  *
27  * $Id: wl_cfgnan.h 825970 2019-06-18 05:28:31Z $
28  */
29 
30 #ifndef _wl_cfgnan_h_
31 #define _wl_cfgnan_h_
32 
33 /* NAN structs versioning b/w DHD and HAL
34  * define new version if any change in any of the shared structs
35  */
36 #define NAN_HAL_VERSION_1 0x2
37 
38 #define NAN_EVENT_BUFFER_SIZE_LARGE 1024u
39 
40 #define NAN_RANGE_EXT_CANCEL_SUPPORT_VER 2
41 #define WL_NAN_IOV_BATCH_VERSION 0x8000
42 #define WL_NAN_AVAIL_REPEAT_INTVL 0x0200
43 #define WL_NAN_AVAIL_START_INTVL 160
44 #define WL_NAN_AVAIL_DURATION_INTVL 336
45 #define NAN_IOCTL_BUF_SIZE 256u
46 #define NAN_IOCTL_BUF_SIZE_MED 512u
47 #define NAN_IOCTL_BUF_SIZE_LARGE 1024u
48 #define NAN_EVENT_NAME_MAX_LEN 40u
49 #define NAN_RTT_IOVAR_BUF_SIZE 1024u
50 #define WL_NAN_EVENT_CLEAR_BIT 32
51 #define NAN_EVENT_MASK_ALL 0x7fffffff
52 #define NAN_MAX_AWAKE_DW_INTERVAL 5
53 #define NAN_MAXIMUM_ID_NUMBER 255
54 #define NAN_MAXIMUM_MASTER_PREFERENCE 254
55 #define NAN_ID_RESERVED 0
56 #define NAN_ID_MIN 1
57 #define NAN_ID_MAX 255
58 #define NAN_DEF_SOCIAL_CHAN_2G 6
59 #define NAN_DEF_SOCIAL_CHAN_5G 149
60 #define NAN_DEF_SEC_SOCIAL_CHAN_5G 44
61 #define NAN_MAX_SOCIAL_CHANNELS 3
62 /* Keeping RSSI threshold value to be -70dBm */
63 #define NAN_DEF_RSSI_NOTIF_THRESH -70
64 /* Keeping default RSSI mid value to be -70dBm */
65 #define NAN_DEF_RSSI_MID -75
66 /* Keeping default RSSI close value to be -60dBm */
67 #define NAN_DEF_RSSI_CLOSE -60
68 #define WL_AVAIL_BIT_MAP                                                       \
69     "1111111111111111111111111111111100000000000000000000000000000000"
70 #define WL_5G_AVAIL_BIT_MAP                                                    \
71     "0000000011111111111111111111111111111111000000000000000000000000"
72 #define WL_AVAIL_CHANNEL_2G 6
73 #define WL_AVAIL_BANDWIDTH_2G WL_CHANSPEC_BW_20
74 #define WL_AVAIL_CHANNEL_5G 149
75 #define WL_AVAIL_BANDWIDTH_5G WL_CHANSPEC_BW_80
76 #define NAN_RANGING_PERIOD WL_AVAIL_PERIOD_1024
77 #define NAN_SYNC_DEF_AWAKE_DW 1
78 #define NAN_RNG_TERM_FLAG_NONE 0
79 
80 #define NAN_BLOOM_LENGTH_DEFAULT 240u
81 #define NAN_SRF_MAX_MAC (NAN_BLOOM_LENGTH_DEFAULT / ETHER_ADDR_LEN)
82 #define NAN_SRF_CTRL_FIELD_LEN 1u
83 
84 #define MAX_IF_ADD_WAIT_TIME 1000
85 #define NAN_DP_ROLE_INITIATOR 0x0001
86 #define NAN_DP_ROLE_RESPONDER 0x0002
87 
88 #define WL_NAN_OBUF_DATA_OFFSET                                                \
89     (OFFSETOF(bcm_iov_batch_buf_t, cmds[0]) +                                  \
90      OFFSETOF(bcm_iov_batch_subcmd_t, data[0]))
91 #define NAN_INVALID_ROLE(role) (role > WL_NAN_ROLE_ANCHOR_MASTER)
92 #define NAN_INVALID_CHANSPEC(chanspec)                                         \
93     ((chanspec == INVCHANSPEC) || (chanspec == 0))
94 #define NAN_INVALID_EVENT(num)                                                 \
95     ((num < WL_NAN_EVENT_START) || (num >= WL_NAN_EVENT_INVALID))
96 #define NAN_INVALID_PROXD_EVENT(num) (num != WLC_E_PROXD_NAN_EVENT)
97 #define NAN_EVENT_BIT(event) (1U << (event - WL_NAN_EVENT_START))
98 #define NAN_EVENT_MAP(event) ((event)-WL_NAN_EVENT_START)
99 #define NAME_TO_STR(name) #name
100 #define NAN_ID_CTRL_SIZE ((NAN_MAXIMUM_ID_NUMBER / 8) + 1)
101 
102 #define tolower(c) bcm_tolower(c)
103 
104 #define NMR2STR(a)                                                             \
105     (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5], (a)[6], (a)[7]
106 #define NMRSTR "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x"
107 
108 #define NAN_DBG_ENTER()                                                        \
109     {                                                                          \
110         WL_DBG(("Enter: %s\n", __FUNCTION__));                                 \
111     }
112 #define NAN_DBG_EXIT()                                                         \
113     {                                                                          \
114         WL_DBG(("Exit: %s\n", __FUNCTION__));                                  \
115     }
116 
117 /* Service Control Type length */
118 #define NAN_SVC_CONTROL_TYPE_MASK ((1 << NAN_SVC_CONTROL_TYPE_LEN) - 1)
119 
120 #ifndef strtoul
121 #define strtoul(nptr, endptr, base) bcm_strtoul((nptr), (endptr), (base))
122 #endif // endif
123 
124 #define NAN_MAC_ADDR_LEN 6u
125 #define NAN_DP_MAX_APP_INFO_LEN 512u
126 
127 #define NAN_SDE_CF_DP_REQUIRED (1 << 2)
128 #define NAN_SDE_CF_DP_TYPE (1 << 3)
129 #define NAN_SDE_CF_MULTICAST_TYPE (1 << 4)
130 #define NAN_SDE_CF_SECURITY_REQUIRED (1 << 6)
131 #define NAN_SDE_CF_RANGING_REQUIRED (1 << 7)
132 #define NAN_SDE_CF_RANGE_PRESENT (1 << 8)
133 
134 #define CHECK_BIT(m, n) ((m >> n) & 1) ? 1 : 0
135 #define WL_NAN_EVENT_DIC_MAC_ADDR_BIT 0
136 #define WL_NAN_EVENT_START_EVENT 1
137 #define WL_NAN_EVENT_JOIN_EVENT 2
138 
139 /* Disabling svc specific(as per part of sub & pub calls) events based on below
140  * bits */
141 #define WL_NAN_EVENT_SUPPRESS_TERMINATE_BIT 0
142 #define WL_NAN_EVENT_SUPPRESS_MATCH_EXP_BIT 1
143 #define WL_NAN_EVENT_SUPPRESS_RECEIVE_BIT 2
144 #define WL_NAN_EVENT_SUPPRESS_REPLIED_BIT 3
145 
146 /* Disabling tranmsit followup events based on below bit */
147 #define WL_NAN_EVENT_SUPPRESS_FOLLOWUP_RECEIVE_BIT 0
148 
149 #define C2S(x)                                                                 \
150     case x:                                                                    \
151         return #x;
152 #define NAN_BLOOM_LENGTH_DEFAULT 240u
153 #define NAN_SRF_MAX_MAC (NAN_BLOOM_LENGTH_DEFAULT / ETHER_ADDR_LEN)
154 #define NAN_MAX_PMK_LEN 32u
155 #define NAN_ERROR_STR_LEN 255u
156 
157 /* NAN related Capabilities */
158 #define MAX_CONCURRENT_NAN_CLUSTERS 1
159 #define MAX_PUBLISHES 8u
160 #define MAX_SUBSCRIBES 8u
161 #define MAX_SVC_NAME_LEN 255u
162 #define MAX_MATCH_FILTER_LEN 255u
163 #define MAX_TOTAL_MATCH_FILTER_LEN 510u
164 #define NAN_MAX_SERVICE_SPECIFIC_INFO_LEN 255u
165 #define MAX_NDI_INTERFACES 1
166 #define MAX_NDP_SESSIONS 5
167 #define MAX_APP_INFO_LEN 255u
168 #define MAX_QUEUED_TX_FOLLOUP_MSGS 10
169 #define MAX_SDEA_SVC_INFO_LEN 255u
170 #define MAX_SUBSCRIBE_ADDRESS 10
171 #define CIPHER_SUITE_SUPPORTED 1
172 #define MAX_SCID_LEN 0
173 #define IS_NDP_SECURITY_SUPPORTED true
174 #define NDP_SUPPORTED_BANDS 2
175 #define NAN_MAX_RANGING_INST 8u
176 #define NAN_MAX_RANGING_SSN_ALLOWED 1u
177 #define NAN_MAX_SVC_INST (MAX_PUBLISHES + MAX_SUBSCRIBES)
178 #define NAN_SVC_INST_SIZE 32u
179 #define NAN_START_STOP_TIMEOUT 5000
180 #define NAN_MAX_NDP_PEER 8u
181 #define NAN_DISABLE_CMD_DELAY_TIMER 4000u
182 
183 #ifdef WL_NAN_DEBUG
184 #define NAN_MUTEX_LOCK()                                                       \
185     {                                                                          \
186         WL_DBG(("Mutex Lock: Enter: %s\n", __FUNCTION__));                     \
187         mutex_lock(&cfg->nancfg.nan_sync);                                     \
188     }
189 #define NAN_MUTEX_UNLOCK()                                                     \
190     {                                                                          \
191         mutex_unlock(&cfg->nancfg.nan_sync);                                   \
192         WL_DBG(("Mutex Unlock: Exit: %s\n", __FUNCTION__));                    \
193     }
194 #else
195 #define NAN_MUTEX_LOCK()                                                       \
196     {                                                                          \
197         mutex_lock(&cfg->nancfg.nan_sync);                                     \
198     }
199 #define NAN_MUTEX_UNLOCK()                                                     \
200     {                                                                          \
201         mutex_unlock(&cfg->nancfg.nan_sync);                                   \
202     }
203 #endif /* WL_NAN_DEBUG */
204 #define NAN_ATTR_SUPPORT_2G_CONFIG (1 << 0)
205 #define NAN_ATTR_SYNC_DISC_2G_BEACON_CONFIG (1 << 1)
206 #define NAN_ATTR_SDF_2G_SUPPORT_CONFIG (1 << 2)
207 #define NAN_ATTR_SUPPORT_5G_CONFIG (1 << 3)
208 #define NAN_ATTR_SYNC_DISC_5G_BEACON_CONFIG (1 << 4)
209 #define NAN_ATTR_SDF_5G_SUPPORT_CONFIG (1 << 5)
210 #define NAN_ATTR_2G_DW_CONFIG (1 << 6)
211 #define NAN_ATTR_5G_DW_CONFIG (1 << 7)
212 #define NAN_ATTR_2G_CHAN_CONFIG (1 << 8)
213 #define NAN_ATTR_5G_CHAN_CONFIG (1 << 9)
214 #define NAN_ATTR_2G_DWELL_TIME_CONFIG (1 << 10)
215 #define NAN_ATTR_5G_DWELL_TIME_CONFIG (1 << 11)
216 #define NAN_ATTR_2G_SCAN_PERIOD_CONFIG (1 << 12)
217 #define NAN_ATTR_5G_SCAN_PERIOD_CONFIG (1 << 13)
218 #define NAN_ATTR_RSSI_CLOSE_CONFIG (1 << 14)
219 #define NAN_ATTR_RSSI_MIDDLE_2G_CONFIG (1 << 15)
220 #define NAN_ATTR_RSSI_PROXIMITY_2G_CONFIG (1 << 16)
221 #define NAN_ATTR_RSSI_CLOSE_5G_CONFIG (1 << 17)
222 #define NAN_ATTR_RSSI_MIDDLE_5G_CONFIG (1 << 18)
223 #define NAN_ATTR_RSSI_PROXIMITY_5G_CONFIG (1 << 19)
224 #define NAN_ATTR_RSSI_WINDOW_SIZE_CONFIG (1 << 20)
225 #define NAN_ATTR_HOP_COUNT_LIMIT_CONFIG (1 << 21)
226 #define NAN_ATTR_SID_BEACON_CONFIG (1 << 22)
227 #define NAN_ATTR_HOP_COUNT_FORCE_CONFIG (1 << 23)
228 #define NAN_ATTR_RAND_FACTOR_CONFIG (1 << 24)
229 #define NAN_ATTR_CLUSTER_VAL_CONFIG (1 << 25)
230 #define NAN_ATTR_IF_ADDR_CONFIG (1 << 26)
231 #define NAN_ATTR_OUI_CONFIG (1 << 27)
232 #define NAN_ATTR_SUB_SID_BEACON_CONFIG (1 << 28)
233 #define NAN_IOVAR_NAME_SIZE 4u
234 #define NAN_XTLV_ID_LEN_SIZE OFFSETOF(bcm_xtlv_t, data)
235 #define NAN_RANGING_INDICATE_CONTINUOUS_MASK 0x01
236 #define NAN_RANGE_REQ_CMD 0
237 #define NAN_RNG_REQ_ACCEPTED_BY_HOST 1
238 #define NAN_RNG_REQ_REJECTED_BY_HOST 0
239 
240 #define NAN_RNG_GEOFENCE_MAX_RETRY_CNT 3u
241 
242 typedef uint32 nan_data_path_id;
243 
244 typedef enum nan_stop_reason_code {
245     NAN_CONCURRENCY_CONFLICT = 0,
246     NAN_USER_INITIATED = 1,
247     NAN_BUS_IS_DOWN = 2,
248     NAN_DEINITIALIZED = 3,
249     NAN_COUNTRY_CODE_CHANGE = 4
250 } nan_stop_reason_code_t;
251 
252 typedef enum nan_range_status {
253     NAN_RANGING_INVALID = 0,
254     NAN_RANGING_REQUIRED = 1,
255     NAN_RANGING_IN_PROGRESS = 2
256 } nan_range_status_t;
257 
258 typedef enum nan_range_role {
259     NAN_RANGING_ROLE_INVALID = 0,
260     NAN_RANGING_ROLE_INITIATOR = 1,
261     NAN_RANGING_ROLE_RESPONDER = 2
262 } nan_range_role_t;
263 
264 typedef struct nan_svc_inst {
265     uint8 inst_id;   /* publisher/subscriber id */
266     uint8 inst_type; /* publisher/subscriber */
267 } nan_svc_inst_t;
268 
269 /* Range Status Flag bits for svc info */
270 #define SVC_RANGE_REP_EVENT_ONCE 0x01
271 
272 /* Range Status Flag bits for svc info */
273 #define SVC_RANGE_REP_EVENT_ONCE 0x01
274 
275 typedef struct nan_svc_info {
276     bool valid;
277     nan_data_path_id ndp_id[NAN_MAX_SVC_INST];
278     uint8 svc_hash[WL_NAN_SVC_HASH_LEN]; /* service hash */
279     uint8 svc_id;
280     uint8 ranging_required;
281     uint8 ranging_ind;
282     uint8 status;
283     uint32 ranging_interval;
284     uint32 ingress_limit;
285     uint32 egress_limit;
286     uint32 flags;
287     uint8 tx_match_filter[MAX_MATCH_FILTER_LEN]; /* TX match filter */
288     uint8 tx_match_filter_len;
289     uint8 svc_range_status; /* For managing any svc range status flags */
290 } nan_svc_info_t;
291 
292 /* NAN Peer DP state */
293 typedef enum {
294     NAN_PEER_DP_NOT_CONNECTED = 0,
295     NAN_PEER_DP_CONNECTING = 1,
296     NAN_PEER_DP_CONNECTED = 2
297 } nan_peer_dp_state_t;
298 
299 typedef struct nan_ndp_peer {
300     uint8 peer_dp_state;
301     uint8 dp_count;
302     struct ether_addr peer_addr;
303 } nan_ndp_peer_t;
304 
305 #define INVALID_DISTANCE 0xFFFFFFFF
306 typedef struct nan_ranging_inst {
307     uint8 range_id;
308     nan_range_status_t range_status;
309     struct ether_addr peer_addr;
310     int range_type;
311     uint8 num_svc_ctx;
312     nan_svc_info_t *svc_idx[MAX_SUBSCRIBES];
313     uint32 prev_distance_mm;
314     nan_range_role_t range_role;
315     bool in_use;
316     uint8 geof_retry_count;
317 } nan_ranging_inst_t;
318 
319 #define DUMP_NAN_RTT_INST(inst)                                                \
320     {                                                                          \
321         printf("svc instance ID %d", (inst)->svc_inst_id);                     \
322         printf("Range ID %d", (inst)->range_id);                               \
323         printf("range_status %d", (inst)->range_status);                       \
324         printf("Range Type %d", (inst)->range_type);                           \
325         printf("Peer MAC " MACDBG "\n", MAC2STRDBG((inst)->peer_addr.octet));  \
326     }
327 
328 #define DUMP_NAN_RTT_RPT(rpt)                                                  \
329     {                                                                          \
330         printf("Range ID %d", (rpt)->rng_id);                                  \
331         printf("Distance in MM %d", (rpt)->dist_mm);                           \
332         printf("range_indication %d", (rpt)->indication);                      \
333         printf("Peer MAC " MACDBG "\n", MAC2STRDBG((rpt)->peer_m_addr.octet)); \
334     }
335 /*
336  * Data request Initiator/Responder
337  * app/service related info
338  */
339 typedef struct nan_data_path_app_info {
340     uint16 ndp_app_info_len;
341     uint8 ndp_app_info[NAN_DP_MAX_APP_INFO_LEN];
342 } nan_data_path_app_info_t;
343 
344 /* QoS configuration */
345 typedef enum {
346     NAN_DP_CONFIG_NO_QOS = 0,
347     NAN_DP_CONFIG_QOS
348 } nan_data_path_qos_cfg_t;
349 
350 /* Data request Responder's response */
351 typedef enum {
352     NAN_DP_REQUEST_ACCEPT = 0,
353     NAN_DP_REQUEST_REJECT
354 } nan_data_path_response_code_t;
355 
356 /* NAN DP security Configuration */
357 typedef enum {
358     NAN_DP_CONFIG_NO_SECURITY = 0,
359     NAN_DP_CONFIG_SECURITY
360 } nan_data_path_security_cfg_status_t;
361 
362 /* NAN Security Key Input Type */
363 typedef enum {
364     NAN_SECURITY_KEY_INPUT_PMK = 1,
365     NAN_SECURITY_KEY_INPUT_PASSPHRASE
366 } nan_security_key_input_type;
367 
368 /* Configuration params of Data request Initiator/Responder */
369 typedef struct nan_data_path_cfg {
370     /* Status Indicating Security/No Security */
371     nan_data_path_security_cfg_status_t security_cfg;
372     nan_data_path_qos_cfg_t qos_cfg;
373 } nan_data_path_cfg_t;
374 
375 enum nan_dp_states { NAN_DP_STATE_DISABLED = 0, NAN_DP_STATE_ENABLED = 1 };
376 
377 enum { SRF_TYPE_BLOOM_FILTER = 0, SRF_TYPE_SEQ_MAC_ADDR = 1 };
378 
379 /* NAN Match indication type */
380 typedef enum {
381     NAN_MATCH_ALG_MATCH_ONCE = 0,
382     NAN_MATCH_ALG_MATCH_CONTINUOUS = 1,
383     NAN_MATCH_ALG_MATCH_NEVER = 2
384 } nan_match_alg;
385 
386 typedef struct nan_str_data {
387     uint32 dlen;
388     uint8 *data;
389 } nan_str_data_t;
390 
391 typedef struct nan_mac_list {
392     uint32 num_mac_addr;
393     uint8 *list;
394 } nan_mac_list_t;
395 
396 typedef struct wl_nan_sid_beacon_tune {
397     uint8 sid_enable; /* flag for sending service id in beacon */
398     uint8 sid_count;  /* Limit for number of SIDs to be included in Beacons */
399     uint8 sub_sid_enable; /* flag for sending subscribe service id in beacon */
400     uint8 sub_sid_count;  /* Limit for number of SUb SIDs to be included in
401                              Beacons */
402 } wl_nan_sid_beacon_ctrl_t;
403 
404 typedef struct nan_avail_cmd_data {
405     chanspec_t chanspec[NAN_MAX_SOCIAL_CHANNELS]; /* channel */
406     uint32 bmap;                                  /* bitmap */
407     uint8 duration;
408     uint8 avail_period;
409     /* peer mac address reqd for ranging avail type */
410     struct ether_addr peer_nmi;
411     bool no_config_avail;
412 } nan_avail_cmd_data;
413 
414 typedef struct nan_discover_cmd_data {
415     nan_str_data_t svc_info;     /* service information */
416     nan_str_data_t sde_svc_info; /* extended service information */
417     nan_str_data_t svc_hash;     /* service hash */
418     nan_str_data_t rx_match;     /* matching filter rx */
419     nan_str_data_t tx_match;     /* matching filter tx */
420     nan_str_data_t key;          /* Security key information */
421     nan_str_data_t scid;         /* security context information */
422     nan_data_path_cfg_t ndp_cfg;
423     struct ether_addr mac_addr;     /* mac address */
424     nan_mac_list_t mac_list;        /* mac list */
425     wl_nan_instance_id_t pub_id;    /* publisher id */
426     wl_nan_instance_id_t sub_id;    /* subscriber id */
427     wl_nan_instance_id_t local_id;  /* Local id */
428     wl_nan_instance_id_t remote_id; /* Remote id */
429     uint32 status;
430     uint32 ttl;              /* time to live */
431     uint32 period;           /* publish period */
432     uint32 flags;            /* Flag bits */
433     bool sde_control_config; /* whether sde_control present */
434     uint16 sde_control_flag;
435     uint16 token;                         /* transmit fup token id */
436     uint8 csid;                           /* cipher suite type */
437     nan_security_key_input_type key_type; /* cipher suite type */
438     uint8 priority;                       /* Priority of Transmit */
439     uint8 life_count;                     /* life count of the instance */
440     uint8 srf_type;                       /* SRF type */
441     uint8 srf_include;                    /* SRF include */
442     uint8 use_srf;                        /* use SRF */
443     uint8 recv_ind_flag;                  /* Receive Indication Flag */
444     uint8 disc_ind_cfg;                   /* Discovery Ind cfg */
445     uint8 ranging_indication;
446     uint32 ranging_intvl_msec; /* ranging interval in msec */
447     uint32 ingress_limit;
448     uint32 egress_limit;
449     bool response;
450     uint8 service_responder_policy;
451     bool svc_update;
452 } nan_discover_cmd_data_t;
453 
454 typedef struct nan_datapath_cmd_data {
455     nan_avail_cmd_data avail_params; /* Avail config params */
456     nan_str_data_t svc_hash;         /* service hash */
457     nan_str_data_t svc_info;         /* service information */
458     nan_str_data_t key;              /* security key information */
459     nan_data_path_response_code_t rsp_code;
460     nan_data_path_id ndp_instance_id;
461     nan_data_path_cfg_t ndp_cfg;
462     wl_nan_instance_id_t pub_id;                  /* publisher id */
463     nan_security_key_input_type key_type;         /* cipher suite type */
464     struct ether_addr if_addr;                    /* if addr */
465     struct ether_addr mac_addr;                   /* mac address */
466     chanspec_t chanspec[NAN_MAX_SOCIAL_CHANNELS]; /* channel */
467     uint32 status;
468     uint32 bmap; /* bitmap */
469     uint16 service_instance_id;
470     uint16 sde_control_flag;
471     uint8 csid; /* cipher suite type */
472     uint8 peer_disc_mac_addr[ETHER_ADDR_LEN];
473     uint8 peer_ndi_mac_addr[ETHER_ADDR_LEN];
474     uint8 num_ndp_instances;
475     uint8 duration;
476     char ndp_iface[IFNAMSIZ + 1];
477 } nan_datapath_cmd_data_t;
478 
479 typedef struct nan_rssi_cmd_data {
480     int8 rssi_middle_2dot4g_val;
481     int8 rssi_close_2dot4g_val;
482     int8 rssi_proximity_2dot4g_val;
483     int8 rssi_proximity_5g_val;
484     int8 rssi_middle_5g_val;
485     int8 rssi_close_5g_val;
486     uint16 rssi_window_size; /* Window size over which rssi calculated */
487 } nan_rssi_cmd_data_t;
488 
489 typedef struct election_metrics {
490     uint8 random_factor; /* Configured random factor */
491     uint8 master_pref;   /* configured master preference */
492 } election_metrics_t;
493 
494 typedef struct nan_awake_dws {
495     uint8 dw_interval_2g; /* 2G DW interval */
496     uint8 dw_interval_5g; /* 5G DW interval */
497 } nan_awake_dws_t;
498 
499 typedef struct nan_config_cmd_data {
500     nan_rssi_cmd_data_t rssi_attr; /* RSSI related data */
501     election_metrics_t metrics;
502     nan_awake_dws_t awake_dws;           /* Awake DWs */
503     nan_avail_cmd_data avail_params;     /* Avail config params */
504     nan_str_data_t p2p_info;             /* p2p information */
505     nan_str_data_t scid;                 /* security context information */
506     struct ether_addr clus_id;           /* cluster id */
507     struct ether_addr mac_addr;          /* mac address */
508     wl_nan_sid_beacon_ctrl_t sid_beacon; /* sending service id in beacon */
509     chanspec_t chanspec[NAN_MAX_SOCIAL_CHANNELS]; /* channel */
510     uint32 status;
511     uint32 bmap;        /* bitmap */
512     uint32 nan_oui;     /* configured nan oui */
513     uint32 warmup_time; /* Warm up time */
514     uint8 duration;
515     uint8 hop_count_limit; /* hop count limit */
516     uint8 support_5g;      /* To decide dual band support */
517     uint8 support_2g;      /* To decide dual band support */
518     uint8 beacon_2g_val;
519     uint8 beacon_5g_val;
520     uint8 sdf_2g_val;
521     uint8 sdf_5g_val;
522     uint8 dwell_time[NAN_MAX_SOCIAL_CHANNELS];
523     uint8 scan_period[NAN_MAX_SOCIAL_CHANNELS];
524     uint8 config_cluster_val;
525     uint8 disc_ind_cfg;    /* Discovery Ind cfg */
526     uint8 csid;            /* cipher suite type */
527     uint32 nmi_rand_intvl; /* nmi randomization interval */
528 } nan_config_cmd_data_t;
529 
530 typedef struct nan_event_hdr {
531     uint32 flags; /* future use */
532     uint16 event_subtype;
533 } nan_event_hdr_t;
534 
535 typedef struct nan_event_data {
536     uint8 svc_name[WL_NAN_SVC_HASH_LEN]; /* service name */
537     uint8 enabled;                       /* NAN Enabled */
538     uint8 nan_de_evt_type;               /* DE event type */
539     uint8 status;                        /* status */
540     uint8 ndp_id;                        /* data path instance id */
541     uint8 security;                      /* data path security */
542     uint8 type;
543     uint8 attr_num;
544     uint8 reason;                       /* reason */
545     wl_nan_instance_id_t pub_id;        /* publisher id */
546     wl_nan_instance_id_t sub_id;        /* subscriber id */
547     wl_nan_instance_id_t local_inst_id; /* local instance id */
548     wl_nan_instance_id_t requestor_id;  /* Requestor instance id */
549     int publish_rssi;                   /* discovery rssi value */
550     int sub_rssi;                       /* Sub rssi value */
551     int fup_rssi;                       /* followup rssi */
552     uint16 attr_list_len;            /* sizeof attributes attached to payload */
553     nan_str_data_t svc_info;         /* service info */
554     nan_str_data_t vend_info;        /* vendor info */
555     nan_str_data_t sde_svc_info;     /* extended service information */
556     nan_str_data_t tx_match_filter;  /* tx match filter */
557     nan_str_data_t rx_match_filter;  /* rx match filter */
558     struct ether_addr local_nmi;     /* local nmi */
559     struct ether_addr clus_id;       /* cluster id */
560     struct ether_addr remote_nmi;    /* remote nmi */
561     struct ether_addr initiator_ndi; /* initiator_ndi */
562     struct ether_addr responder_ndi; /* responder_ndi */
563     uint16 token;                    /* transmit fup token id */
564     uint8 peer_cipher_suite;         /* peer cipher suite type */
565     nan_str_data_t scid;             /* security context information */
566     char nan_reason[NAN_ERROR_STR_LEN]; /* Describe the NAN reason type */
567     uint16 sde_control_flag;
568     uint8 ranging_result_present;
569     uint32 range_measurement_cm;
570     uint32 ranging_ind;
571     uint8 rng_id;
572 } nan_event_data_t;
573 
574 /*
575  *   Various NAN Protocol Response code
576  */
577 typedef enum {
578     /* NAN Protocol Response Codes */
579     NAN_STATUS_SUCCESS = 0,
580     /*  NAN Discovery Engine/Host driver failures */
581     NAN_STATUS_INTERNAL_FAILURE = 1,
582     /*  NAN OTA failures */
583     NAN_STATUS_PROTOCOL_FAILURE = 2,
584     /* if the publish/subscribe id is invalid */
585     NAN_STATUS_INVALID_PUBLISH_SUBSCRIBE_ID = 3,
586     /* If we run out of resources allocated */
587     NAN_STATUS_NO_RESOURCE_AVAILABLE = 4,
588     /* if invalid params are passed */
589     NAN_STATUS_INVALID_PARAM = 5,
590     /*  if the requestor instance id is invalid */
591     NAN_STATUS_INVALID_REQUESTOR_INSTANCE_ID = 6,
592     /*  if the ndp id is invalid */
593     NAN_STATUS_INVALID_NDP_ID = 7,
594     /* if NAN is enabled when wifi is turned off */
595     NAN_STATUS_NAN_NOT_ALLOWED = 8,
596     /* if over the air ack is not received */
597     NAN_STATUS_NO_OTA_ACK = 9,
598     /* If NAN is already enabled and we are try to re-enable the same */
599     NAN_STATUS_ALREADY_ENABLED = 10,
600     /* If followup message internal queue is full */
601     NAN_STATUS_FOLLOWUP_QUEUE_FULL = 11,
602     /* Unsupported concurrency session enabled, NAN disabled notified */
603     NAN_STATUS_UNSUPPORTED_CONCURRENCY_NAN_DISABLED = 12
604 } nan_status_type_t;
605 
606 typedef struct {
607     nan_status_type_t status;
608     char nan_reason[NAN_ERROR_STR_LEN]; /* Describe the NAN reason type */
609 } nan_hal_status_t;
610 
611 typedef struct nan_parse_event_ctx {
612     struct bcm_cfg80211 *cfg;
613     nan_event_data_t *nan_evt_data;
614 } nan_parse_event_ctx_t;
615 
616 /* Capabilities info supported by FW */
617 typedef struct nan_hal_capabilities {
618     uint32 max_concurrent_nan_clusters;
619     uint32 max_publishes;
620     uint32 max_subscribes;
621     uint32 max_service_name_len;
622     uint32 max_match_filter_len;
623     uint32 max_total_match_filter_len;
624     uint32 max_service_specific_info_len;
625     uint32 max_vsa_data_len;
626     uint32 max_mesh_data_len;
627     uint32 max_ndi_interfaces;
628     uint32 max_ndp_sessions;
629     uint32 max_app_info_len;
630     uint32 max_queued_transmit_followup_msgs;
631     uint32 ndp_supported_bands;
632     uint32 cipher_suites_supported;
633     uint32 max_scid_len;
634     bool is_ndp_security_supported;
635     uint32 max_sdea_service_specific_info_len;
636     uint32 max_subscribe_address;
637     uint32 ndpe_attr_supported;
638 } nan_hal_capabilities_t;
639 
640 typedef struct _nan_hal_resp {
641     uint16 instance_id;
642     uint16 subcmd;
643     int32 status;
644     int32 value;
645     /* Identifier for the instance of the NDP */
646     uint16 ndp_instance_id;
647     /* Publisher NMI */
648     uint8 pub_nmi[NAN_MAC_ADDR_LEN];
649     /* SVC_HASH */
650     uint8 svc_hash[WL_NAN_SVC_HASH_LEN];
651     char nan_reason[NAN_ERROR_STR_LEN]; /* Describe the NAN reason type */
652     char pad[3];
653     nan_hal_capabilities_t capabilities;
654 } nan_hal_resp_t;
655 
656 typedef struct wl_nan_iov {
657     uint16 nan_iov_len;
658     uint8 *nan_iov_buf;
659 } wl_nan_iov_t;
660 
661 #ifdef WL_NAN_DISC_CACHE
662 
663 #define NAN_MAX_CACHE_DISC_RESULT 16
664 typedef struct {
665     bool valid;
666     wl_nan_instance_id_t pub_id;
667     wl_nan_instance_id_t sub_id;
668     uint8 svc_hash[WL_NAN_SVC_HASH_LEN];
669     struct ether_addr peer;
670     int8 publish_rssi;
671     uint8 peer_cipher_suite;
672     uint8 security;
673     nan_str_data_t svc_info;        /* service info */
674     nan_str_data_t vend_info;       /* vendor info */
675     nan_str_data_t sde_svc_info;    /* extended service information */
676     nan_str_data_t tx_match_filter; /* tx match filter */
677     uint16 sde_control_flag;
678 } nan_disc_result_cache;
679 
680 typedef struct nan_datapath_sec_info {
681     nan_data_path_id ndp_instance_id;
682     wl_nan_instance_id_t pub_id; /* publisher id */
683     struct ether_addr mac_addr;  /* mac address */
684 } nan_datapath_sec_info_cmd_data_t;
685 #endif /* WL_NAN_DISC_CACHE */
686 
687 typedef enum {
688     NAN_RANGING_AUTO_RESPONSE_ENABLE = 0,
689     NAN_RANGING_AUTO_RESPONSE_DISABLE
690 } NanRangingAutoResponseCfg;
691 
692 extern int wl_cfgnan_set_vars_cbfn(void *ctx, const uint8 *tlv_buf, uint16 type,
693                                    uint16 len);
694 extern int wl_cfgnan_config_eventmask(struct net_device *ndev,
695                                       struct bcm_cfg80211 *cfg,
696                                       uint8 event_ind_flag,
697                                       bool disable_events);
698 extern int wl_cfgnan_start_handler(struct net_device *ndev,
699                                    struct bcm_cfg80211 *cfg,
700                                    nan_config_cmd_data_t *cmd_data,
701                                    uint32 nan_attr_mask);
702 extern int wl_cfgnan_stop_handler(struct net_device *ndev,
703                                   struct bcm_cfg80211 *cfg);
704 extern void wl_cfgnan_delayed_disable(struct work_struct *work);
705 extern int wl_cfgnan_config_handler(struct net_device *ndev,
706                                     struct bcm_cfg80211 *cfg,
707                                     nan_config_cmd_data_t *cmd_data,
708                                     uint32 nan_attr_mask);
709 extern int wl_cfgnan_support_handler(struct net_device *ndev,
710                                      struct bcm_cfg80211 *cfg,
711                                      nan_config_cmd_data_t *cmd_data);
712 extern int wl_cfgnan_status_handler(struct net_device *ndev,
713                                     struct bcm_cfg80211 *cfg,
714                                     nan_config_cmd_data_t *cmd_data);
715 extern int wl_cfgnan_publish_handler(struct net_device *ndev,
716                                      struct bcm_cfg80211 *cfg,
717                                      nan_discover_cmd_data_t *cmd_data);
718 extern int wl_cfgnan_subscribe_handler(struct net_device *ndev,
719                                        struct bcm_cfg80211 *cfg,
720                                        nan_discover_cmd_data_t *cmd_data);
721 extern int wl_cfgnan_cancel_pub_handler(struct net_device *ndev,
722                                         struct bcm_cfg80211 *cfg,
723                                         nan_discover_cmd_data_t *cmd_data);
724 extern int wl_cfgnan_cancel_sub_handler(struct net_device *ndev,
725                                         struct bcm_cfg80211 *cfg,
726                                         nan_discover_cmd_data_t *cmd_data);
727 extern int wl_cfgnan_transmit_handler(struct net_device *ndev,
728                                       struct bcm_cfg80211 *cfg,
729                                       nan_discover_cmd_data_t *cmd_data);
730 extern s32 wl_cfgnan_notify_nan_status(struct bcm_cfg80211 *cfg,
731                                        bcm_struct_cfgdev *cfgdev,
732                                        const wl_event_msg_t *e, void *data);
733 extern int wl_cfgnan_generate_inst_id(struct bcm_cfg80211 *cfg,
734                                       uint8 *p_inst_id);
735 extern int wl_cfgnan_remove_inst_id(struct bcm_cfg80211 *cfg, uint8 inst_id);
736 extern int bcm_xtlv_size_for_data(int dlen, bcm_xtlv_opts_t opts);
737 extern int
738 wl_cfgnan_get_capablities_handler(struct net_device *ndev,
739                                   struct bcm_cfg80211 *cfg,
740                                   nan_hal_capabilities_t *capabilities);
741 
742 extern int wl_cfgnan_data_path_iface_create_delete_handler(
743     struct net_device *ndev, struct bcm_cfg80211 *cfg, char *ifname,
744     uint16 type, uint8 busstate);
745 extern int wl_cfgnan_data_path_request_handler(
746     struct net_device *ndev, struct bcm_cfg80211 *cfg,
747     nan_datapath_cmd_data_t *cmd_data, uint8 *ndp_instance_id);
748 extern int
749 wl_cfgnan_data_path_response_handler(struct net_device *ndev,
750                                      struct bcm_cfg80211 *cfg,
751                                      nan_datapath_cmd_data_t *cmd_data);
752 extern int wl_cfgnan_data_path_end_handler(struct net_device *ndev,
753                                            struct bcm_cfg80211 *cfg,
754                                            nan_data_path_id ndp_instance_id,
755                                            int *status);
756 
757 #ifdef WL_NAN_DISC_CACHE
758 extern int
759 wl_cfgnan_sec_info_handler(struct bcm_cfg80211 *cfg,
760                            nan_datapath_sec_info_cmd_data_t *cmd_data,
761                            nan_hal_resp_t *nan_req_resp);
762 /* ranging quest and response iovar handler */
763 extern int wl_cfgnan_trigger_ranging(struct net_device *ndev,
764                                      struct bcm_cfg80211 *cfg, void *event_data,
765                                      nan_svc_info_t *svc, uint8 range_req,
766                                      bool accept_req);
767 #endif /* WL_NAN_DISC_CACHE */
768 void wl_cfgnan_disable_cleanup(struct bcm_cfg80211 *cfg);
769 void wl_cfgnan_deinit_cleanup(struct bcm_cfg80211 *cfg);
770 
771 extern bool wl_cfgnan_is_dp_active(struct net_device *ndev);
772 extern s32 wl_cfgnan_get_ndi_idx(struct bcm_cfg80211 *cfg);
773 extern s32 wl_cfgnan_add_ndi_data(struct bcm_cfg80211 *cfg, s32 idx,
774                                   char *name);
775 extern s32 wl_cfgnan_del_ndi_data(struct bcm_cfg80211 *cfg, char *name);
776 extern struct wl_ndi_data *wl_cfgnan_get_ndi_data(struct bcm_cfg80211 *cfg,
777                                                   char *name);
778 extern int wl_cfgnan_disable(struct bcm_cfg80211 *cfg);
779 extern nan_ranging_inst_t *
780 wl_cfgnan_get_ranging_inst(struct bcm_cfg80211 *cfg, struct ether_addr *peer,
781                            nan_range_role_t range_role);
782 extern nan_ranging_inst_t *wl_cfgnan_check_for_ranging(struct bcm_cfg80211 *cfg,
783                                                        struct ether_addr *peer);
784 #ifdef RTT_SUPPORT
785 extern int wl_cfgnan_trigger_geofencing_ranging(struct net_device *dev,
786                                                 struct ether_addr *peer_addr);
787 #endif /* RTT_SUPPORT */
788 extern int wl_cfgnan_suspend_geofence_rng_session(struct net_device *ndev,
789                                                   struct ether_addr *peer,
790                                                   int suspend_reason,
791                                                   u8 cancel_flags);
792 extern nan_ndp_peer_t *wl_cfgnan_data_get_peer(struct bcm_cfg80211 *cfg,
793                                                struct ether_addr *peer_addr);
794 bool wl_cfgnan_data_dp_exists(struct bcm_cfg80211 *cfg);
795 bool wl_cfgnan_data_dp_exists_with_peer(struct bcm_cfg80211 *cfg,
796                                         struct ether_addr *peer_addr);
797 extern s32 wl_cfgnan_delete_ndp(struct bcm_cfg80211 *cfg,
798                                 struct net_device *nan_ndev);
799 void wl_cfgnan_data_set_peer_dp_state(struct bcm_cfg80211 *cfg,
800                                       struct ether_addr *peer_addr,
801                                       nan_peer_dp_state_t state);
802 #ifdef RTT_SUPPORT
803 int wl_cfgnan_terminate_directed_rtt_sessions(struct net_device *ndev,
804                                               struct bcm_cfg80211 *cfg);
805 void wl_cfgnan_reset_geofence_ranging(struct bcm_cfg80211 *cfg,
806                                       nan_ranging_inst_t *rng_inst,
807                                       int sched_reason);
808 void wl_cfgnan_process_range_report(struct bcm_cfg80211 *cfg,
809                                     wl_nan_ev_rng_rpt_ind_t *range_res);
810 #endif /* RTT_SUPPORT */
811 int wl_cfgnan_cancel_ranging(struct net_device *ndev, struct bcm_cfg80211 *cfg,
812                              uint8 range_id, uint8 flags, uint32 *status);
813 bool wl_cfgnan_ranging_allowed(struct bcm_cfg80211 *cfg);
814 uint8 wl_cfgnan_cancel_rng_responders(struct net_device *ndev,
815                                       struct bcm_cfg80211 *cfg);
816 extern int wl_cfgnan_get_status(struct net_device *ndev,
817                                 wl_nan_conf_status_t *nan_status);
818 extern void wl_cfgnan_update_dp_info(struct bcm_cfg80211 *cfg, bool add,
819                                      nan_data_path_id ndp_id);
820 nan_status_type_t wl_cfgvendor_brcm_to_nanhal_status(int32 vendor_status);
821 
822 typedef enum {
823     NAN_ATTRIBUTE_HEADER = 100,
824     NAN_ATTRIBUTE_HANDLE = 101,
825     NAN_ATTRIBUTE_TRANSAC_ID = 102,
826 
827     /* NAN Enable request attributes */
828     NAN_ATTRIBUTE_2G_SUPPORT = 103,
829     NAN_ATTRIBUTE_5G_SUPPORT = 104,
830     NAN_ATTRIBUTE_CLUSTER_LOW = 105,
831     NAN_ATTRIBUTE_CLUSTER_HIGH = 106,
832     NAN_ATTRIBUTE_SID_BEACON = 107,
833     NAN_ATTRIBUTE_SYNC_DISC_2G_BEACON = 108,
834     NAN_ATTRIBUTE_SYNC_DISC_5G_BEACON = 109,
835     NAN_ATTRIBUTE_SDF_2G_SUPPORT = 110,
836     NAN_ATTRIBUTE_SDF_5G_SUPPORT = 111,
837     NAN_ATTRIBUTE_RSSI_CLOSE = 112,
838     NAN_ATTRIBUTE_RSSI_MIDDLE = 113,
839     NAN_ATTRIBUTE_RSSI_PROXIMITY = 114,
840     NAN_ATTRIBUTE_HOP_COUNT_LIMIT = 115,
841     NAN_ATTRIBUTE_RANDOM_TIME = 116,
842     NAN_ATTRIBUTE_MASTER_PREF = 117,
843     NAN_ATTRIBUTE_PERIODIC_SCAN_INTERVAL = 118,
844 
845     /* Nan Publish/Subscribe request attributes */
846     NAN_ATTRIBUTE_PUBLISH_ID = 119,
847     NAN_ATTRIBUTE_TTL = 120,
848     NAN_ATTRIBUTE_PERIOD = 121,
849     NAN_ATTRIBUTE_REPLIED_EVENT_FLAG = 122,
850     NAN_ATTRIBUTE_PUBLISH_TYPE = 123,
851     NAN_ATTRIBUTE_TX_TYPE = 124,
852     NAN_ATTRIBUTE_PUBLISH_COUNT = 125,
853     NAN_ATTRIBUTE_SERVICE_NAME_LEN = 126,
854     NAN_ATTRIBUTE_SERVICE_NAME = 127,
855     NAN_ATTRIBUTE_SERVICE_SPECIFIC_INFO_LEN = 128,
856     NAN_ATTRIBUTE_SERVICE_SPECIFIC_INFO = 129,
857     NAN_ATTRIBUTE_RX_MATCH_FILTER_LEN = 130,
858     NAN_ATTRIBUTE_RX_MATCH_FILTER = 131,
859     NAN_ATTRIBUTE_TX_MATCH_FILTER_LEN = 132,
860     NAN_ATTRIBUTE_TX_MATCH_FILTER = 133,
861     NAN_ATTRIBUTE_SUBSCRIBE_ID = 134,
862     NAN_ATTRIBUTE_SUBSCRIBE_TYPE = 135,
863     NAN_ATTRIBUTE_SERVICERESPONSEFILTER = 136,
864     NAN_ATTRIBUTE_SERVICERESPONSEINCLUDE = 137,
865     NAN_ATTRIBUTE_USESERVICERESPONSEFILTER = 138,
866     NAN_ATTRIBUTE_SSIREQUIREDFORMATCHINDICATION = 139,
867     NAN_ATTRIBUTE_SUBSCRIBE_MATCH = 140,
868     NAN_ATTRIBUTE_SUBSCRIBE_COUNT = 141,
869     NAN_ATTRIBUTE_MAC_ADDR = 142,
870     NAN_ATTRIBUTE_MAC_ADDR_LIST = 143,
871     NAN_ATTRIBUTE_MAC_ADDR_LIST_NUM_ENTRIES = 144,
872     NAN_ATTRIBUTE_PUBLISH_MATCH = 145,
873 
874     /* Nan Event attributes */
875     NAN_ATTRIBUTE_ENABLE_STATUS = 146,
876     NAN_ATTRIBUTE_JOIN_STATUS = 147,
877     NAN_ATTRIBUTE_ROLE = 148,
878     NAN_ATTRIBUTE_MASTER_RANK = 149,
879     NAN_ATTRIBUTE_ANCHOR_MASTER_RANK = 150,
880     NAN_ATTRIBUTE_CNT_PEND_TXFRM = 151,
881     NAN_ATTRIBUTE_CNT_BCN_TX = 152,
882     NAN_ATTRIBUTE_CNT_BCN_RX = 153,
883     NAN_ATTRIBUTE_CNT_SVC_DISC_TX = 154,
884     NAN_ATTRIBUTE_CNT_SVC_DISC_RX = 155,
885     NAN_ATTRIBUTE_AMBTT = 156,
886     NAN_ATTRIBUTE_CLUSTER_ID = 157,
887     NAN_ATTRIBUTE_INST_ID = 158,
888     NAN_ATTRIBUTE_OUI = 159,
889     NAN_ATTRIBUTE_STATUS = 160,
890     NAN_ATTRIBUTE_DE_EVENT_TYPE = 161,
891     NAN_ATTRIBUTE_MERGE = 162,
892     NAN_ATTRIBUTE_IFACE = 163,
893     NAN_ATTRIBUTE_CHANNEL = 164,
894     NAN_ATTRIBUTE_PEER_ID = 165,
895     NAN_ATTRIBUTE_NDP_ID = 167,
896     NAN_ATTRIBUTE_SECURITY = 168,
897     NAN_ATTRIBUTE_QOS = 169,
898     NAN_ATTRIBUTE_RSP_CODE = 170,
899     NAN_ATTRIBUTE_INST_COUNT = 171,
900     NAN_ATTRIBUTE_PEER_DISC_MAC_ADDR = 172,
901     NAN_ATTRIBUTE_PEER_NDI_MAC_ADDR = 173,
902     NAN_ATTRIBUTE_IF_ADDR = 174,
903     NAN_ATTRIBUTE_WARMUP_TIME = 175,
904     NAN_ATTRIBUTE_RECV_IND_CFG = 176,
905     NAN_ATTRIBUTE_RSSI_CLOSE_5G = 177,
906     NAN_ATTRIBUTE_RSSI_MIDDLE_5G = 178,
907     NAN_ATTRIBUTE_RSSI_PROXIMITY_5G = 179,
908     NAN_ATTRIBUTE_CONNMAP = 180,
909     NAN_ATTRIBUTE_24G_CHANNEL = 181,
910     NAN_ATTRIBUTE_5G_CHANNEL = 182,
911     NAN_ATTRIBUTE_DWELL_TIME = 183,
912     NAN_ATTRIBUTE_SCAN_PERIOD = 184,
913     NAN_ATTRIBUTE_RSSI_WINDOW_SIZE = 185,
914     NAN_ATTRIBUTE_CONF_CLUSTER_VAL = 186,
915     NAN_ATTRIBUTE_AVAIL_BIT_MAP = 187,
916     NAN_ATTRIBUTE_ENTRY_CONTROL = 188,
917     NAN_ATTRIBUTE_CIPHER_SUITE_TYPE = 189,
918     NAN_ATTRIBUTE_KEY_TYPE = 190,
919     NAN_ATTRIBUTE_KEY_LEN = 191,
920     NAN_ATTRIBUTE_SCID = 192,
921     NAN_ATTRIBUTE_SCID_LEN = 193,
922     NAN_ATTRIBUTE_SDE_CONTROL_CONFIG_DP = 194,
923     NAN_ATTRIBUTE_SDE_CONTROL_SECURITY = 195,
924     NAN_ATTRIBUTE_SDE_CONTROL_DP_TYPE = 196,
925     NAN_ATTRIBUTE_SDE_CONTROL_RANGE_SUPPORT = 197,
926     NAN_ATTRIBUTE_NO_CONFIG_AVAIL = 198,
927     NAN_ATTRIBUTE_2G_AWAKE_DW = 199,
928     NAN_ATTRIBUTE_5G_AWAKE_DW = 200,
929     NAN_ATTRIBUTE_RANGING_INTERVAL = 201,
930     NAN_ATTRIBUTE_RANGING_INDICATION = 202,
931     NAN_ATTRIBUTE_RANGING_INGRESS_LIMIT = 203,
932     NAN_ATTRIBUTE_RANGING_EGRESS_LIMIT = 204,
933     NAN_ATTRIBUTE_RANGING_AUTO_ACCEPT = 205,
934     NAN_ATTRIBUTE_RANGING_RESULT = 206,
935     NAN_ATTRIBUTE_DISC_IND_CFG = 207,
936     NAN_ATTRIBUTE_RSSI_THRESHOLD_FLAG = 208,
937     NAN_ATTRIBUTE_KEY_DATA = 209,
938     NAN_ATTRIBUTE_SDEA_SERVICE_SPECIFIC_INFO_LEN = 210,
939     NAN_ATTRIBUTE_SDEA_SERVICE_SPECIFIC_INFO = 211,
940     NAN_ATTRIBUTE_REASON = 212,
941     NAN_ATTRIBUTE_DWELL_TIME_5G = 215,
942     NAN_ATTRIBUTE_SCAN_PERIOD_5G = 216,
943     NAN_ATTRIBUTE_SVC_RESPONDER_POLICY = 217,
944     NAN_ATTRIBUTE_EVENT_MASK = 218,
945     NAN_ATTRIBUTE_SUB_SID_BEACON = 219,
946     NAN_ATTRIBUTE_RANDOMIZATION_INTERVAL = 220,
947     NAN_ATTRIBUTE_CMD_RESP_DATA = 221
948 } NAN_ATTRIBUTE;
949 
950 enum geofence_suspend_reason {
951     RTT_GEO_SUSPN_HOST_DIR_RTT_TRIG = 0,
952     RTT_GEO_SUSPN_PEER_RTT_TRIGGER = 1,
953     RTT_GEO_SUSPN_HOST_NDP_TRIGGER = 2,
954     RTT_GEO_SUSPN_PEER_NDP_TRIGGER = 3,
955     RTT_GEO_SUSPN_RANGE_RES_REPORTED = 4
956 };
957 #endif /* _wl_cfgnan_h_ */
958