Coverage Report

Created: 2026-09-14 06:11

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/hostap/wpa_supplicant/wpa_supplicant_i.h
Line
Count
Source
1
/*
2
 * wpa_supplicant - Internal definitions
3
 * Copyright (c) 2003-2024, Jouni Malinen <j@w1.fi>
4
 *
5
 * This software may be distributed under the terms of the BSD license.
6
 * See README for more details.
7
 */
8
9
#ifndef WPA_SUPPLICANT_I_H
10
#define WPA_SUPPLICANT_I_H
11
12
#include "utils/bitfield.h"
13
#include "utils/list.h"
14
#include "common/defs.h"
15
#include "common/sae.h"
16
#include "common/wpa_ctrl.h"
17
#include "common/dpp.h"
18
#include "crypto/sha384.h"
19
#include "eapol_supp/eapol_supp_sm.h"
20
#include "wps/wps_defs.h"
21
#include "config_ssid.h"
22
#include "wmm_ac.h"
23
#include "pasn/pasn_common.h"
24
#include "nan/nan.h"
25
26
extern const char *const wpa_supplicant_version;
27
extern const char *const wpa_supplicant_license;
28
#ifndef CONFIG_NO_STDOUT_DEBUG
29
extern const char *const wpa_supplicant_full_license1;
30
extern const char *const wpa_supplicant_full_license2;
31
extern const char *const wpa_supplicant_full_license3;
32
extern const char *const wpa_supplicant_full_license4;
33
extern const char *const wpa_supplicant_full_license5;
34
#endif /* CONFIG_NO_STDOUT_DEBUG */
35
36
struct wpa_sm;
37
struct wpa_supplicant;
38
struct ibss_rsn;
39
struct scan_info;
40
struct wpa_bss;
41
struct wpa_scan_results;
42
struct hostapd_hw_modes;
43
struct wpa_driver_associate_params;
44
struct wpa_cred;
45
46
/*
47
 * Forward declarations of private structures used within the ctrl_iface
48
 * backends. Other parts of wpa_supplicant do not have access to data stored in
49
 * these structures.
50
 */
51
struct ctrl_iface_priv;
52
struct ctrl_iface_global_priv;
53
struct wpas_dbus_priv;
54
struct wpas_binder_priv;
55
56
/**
57
 * struct wpa_interface - Parameters for wpa_supplicant_add_iface()
58
 */
59
struct wpa_interface {
60
  /**
61
   * confname - Configuration name (file or profile) name
62
   *
63
   * This can also be %NULL when a configuration file is not used. In
64
   * that case, ctrl_interface must be set to allow the interface to be
65
   * configured.
66
   */
67
  const char *confname;
68
69
  /**
70
   * confanother - Additional configuration name (file or profile) name
71
   *
72
   * This can also be %NULL when the additional configuration file is not
73
   * used.
74
   */
75
  const char *confanother;
76
77
  /**
78
   * ctrl_interface - Control interface parameter
79
   *
80
   * If a configuration file is not used, this variable can be used to
81
   * set the ctrl_interface parameter that would have otherwise been read
82
   * from the configuration file. If both confname and ctrl_interface are
83
   * set, ctrl_interface is used to override the value from configuration
84
   * file.
85
   */
86
  const char *ctrl_interface;
87
88
  /**
89
   * driver - Driver interface name, or %NULL to use the default driver
90
   */
91
  const char *driver;
92
93
  /**
94
   * driver_param - Driver interface parameters
95
   *
96
   * If a configuration file is not used, this variable can be used to
97
   * set the driver_param parameters that would have otherwise been read
98
   * from the configuration file. If both confname and driver_param are
99
   * set, driver_param is used to override the value from configuration
100
   * file.
101
   */
102
  const char *driver_param;
103
104
  /**
105
   * ifname - Interface name
106
   */
107
  const char *ifname;
108
109
  /**
110
   * bridge_ifname - Optional bridge interface name
111
   *
112
   * If the driver interface (ifname) is included in a Linux bridge
113
   * device, the bridge interface may need to be used for receiving EAPOL
114
   * frames. This can be enabled by setting this variable to enable
115
   * receiving of EAPOL frames from an additional interface.
116
   */
117
  const char *bridge_ifname;
118
119
  /**
120
   * p2p_mgmt - Interface used for P2P management (P2P Device operations)
121
   *
122
   * Indicates whether wpas_p2p_init() must be called for this interface.
123
   * This is used only when the driver supports a dedicated P2P Device
124
   * interface that is not a network interface.
125
   */
126
  int p2p_mgmt;
127
128
#ifdef CONFIG_MATCH_IFACE
129
  /**
130
   * matched - Interface was matched rather than specified
131
   *
132
   */
133
  enum {
134
    WPA_IFACE_NOT_MATCHED,
135
    WPA_IFACE_MATCHED_NULL,
136
    WPA_IFACE_MATCHED
137
  } matched;
138
#endif /* CONFIG_MATCH_IFACE */
139
140
  /**
141
   * nan_mgmt - Interface used for NAN management (NAN Device operations)
142
   */
143
  bool nan_mgmt;
144
145
  /**
146
   * nan_data - Interface used for NAN data path operations
147
   */
148
  bool nan_data;
149
};
150
151
/**
152
 * struct wpa_params - Parameters for wpa_supplicant_init()
153
 */
154
struct wpa_params {
155
  /**
156
   * daemonize - Run %wpa_supplicant in the background
157
   */
158
  int daemonize;
159
160
  /**
161
   * wait_for_monitor - Wait for a monitor program before starting
162
   */
163
  int wait_for_monitor;
164
165
  /**
166
   * pid_file - Path to a PID (process ID) file
167
   *
168
   * If this and daemonize are set, process ID of the background process
169
   * will be written to the specified file.
170
   */
171
  char *pid_file;
172
173
  /**
174
   * wpa_debug_level - Debugging verbosity level (e.g., MSG_INFO)
175
   */
176
  int wpa_debug_level;
177
178
  /**
179
   * wpa_debug_show_keys - Whether keying material is included in debug
180
   *
181
   * This parameter can be used to allow keying material to be included
182
   * in debug messages. This is a security risk and this option should
183
   * not be enabled in normal configuration. If needed during
184
   * development or while troubleshooting, this option can provide more
185
   * details for figuring out what is happening.
186
   */
187
  int wpa_debug_show_keys;
188
189
  /**
190
   * wpa_debug_timestamp - Whether to include timestamp in debug messages
191
   */
192
  int wpa_debug_timestamp;
193
194
  /**
195
   * ctrl_interface - Global ctrl_iface path/parameter
196
   */
197
  char *ctrl_interface;
198
199
  /**
200
   * ctrl_interface_group - Global ctrl_iface group
201
   */
202
  char *ctrl_interface_group;
203
204
  /**
205
   * dbus_ctrl_interface - Enable the DBus control interface
206
   */
207
  int dbus_ctrl_interface;
208
209
  /**
210
   * wpa_debug_file_path - Path of debug file or %NULL to use stdout
211
   */
212
  const char *wpa_debug_file_path;
213
214
  /**
215
   * wpa_debug_syslog - Enable log output through syslog
216
   */
217
  int wpa_debug_syslog;
218
219
  /**
220
   * wpa_debug_tracing - Enable log output through Linux tracing
221
   */
222
  int wpa_debug_tracing;
223
224
  /**
225
   * override_driver - Optional driver parameter override
226
   *
227
   * This parameter can be used to override the driver parameter in
228
   * dynamic interface addition to force a specific driver wrapper to be
229
   * used instead.
230
   */
231
  char *override_driver;
232
233
  /**
234
   * override_ctrl_interface - Optional ctrl_interface override
235
   *
236
   * This parameter can be used to override the ctrl_interface parameter
237
   * in dynamic interface addition to force a control interface to be
238
   * created.
239
   */
240
  char *override_ctrl_interface;
241
242
  /**
243
   * entropy_file - Optional entropy file
244
   *
245
   * This parameter can be used to configure wpa_supplicant to maintain
246
   * its internal entropy store over restarts.
247
   */
248
  char *entropy_file;
249
250
#ifdef CONFIG_P2P
251
  /**
252
   * conf_p2p_dev - Configuration file used to hold the
253
   * P2P Device configuration parameters.
254
   *
255
   * This can also be %NULL. In such a case, if a P2P Device dedicated
256
   * interfaces is created, the main configuration file will be used.
257
   */
258
  char *conf_p2p_dev;
259
#endif /* CONFIG_P2P */
260
261
#ifdef CONFIG_MATCH_IFACE
262
  /**
263
   * match_ifaces - Interface descriptions to match
264
   */
265
  struct wpa_interface *match_ifaces;
266
267
  /**
268
   * match_iface_count - Number of defined matching interfaces
269
   */
270
  int match_iface_count;
271
#endif /* CONFIG_MATCH_IFACE */
272
273
  /**
274
   * show_details - Whether to show config parsing details in debug log
275
   */
276
  bool show_details;
277
278
  /**
279
   * proc_coord_dir - Process coordination directory
280
   */
281
  const char *proc_coord_dir;
282
283
  /**
284
   * conf_file_prefix - Required configuration file name prefix
285
   */
286
  const char *conf_file_prefix;
287
};
288
289
struct p2p_srv_bonjour {
290
  struct dl_list list;
291
  struct wpabuf *query;
292
  struct wpabuf *resp;
293
};
294
295
struct p2p_srv_upnp {
296
  struct dl_list list;
297
  u8 version;
298
  char *service;
299
};
300
301
/**
302
 * struct wpa_global - Internal, global data for all %wpa_supplicant interfaces
303
 *
304
 * This structure is initialized by calling wpa_supplicant_init() when starting
305
 * %wpa_supplicant.
306
 */
307
struct wpa_global {
308
  struct wpa_supplicant *ifaces;
309
  struct wpa_params params;
310
  struct ctrl_iface_global_priv *ctrl_iface;
311
  struct wpas_dbus_priv *dbus;
312
  struct wpas_binder_priv *binder;
313
  void **drv_priv;
314
  size_t drv_count;
315
  struct os_time suspend_time;
316
  struct p2p_data *p2p;
317
  struct pr_data *pr;
318
  struct wpa_supplicant *p2p_init_wpa_s;
319
  struct wpa_supplicant *p2p_group_formation;
320
  struct wpa_supplicant *p2p_invite_group;
321
  struct wpa_supplicant *pr_init_wpa_s;
322
  u8 p2p_dev_addr[ETH_ALEN];
323
  struct os_reltime p2p_go_wait_client;
324
  struct dl_list p2p_srv_bonjour; /* struct p2p_srv_bonjour */
325
  struct dl_list p2p_srv_upnp; /* struct p2p_srv_upnp */
326
  int p2p_disabled;
327
  int cross_connection;
328
  int p2p_long_listen; /* remaining time in long Listen state in ms */
329
  struct wpa_freq_range_list p2p_disallow_freq;
330
  struct wpa_freq_range_list p2p_go_avoid_freq;
331
  enum wpa_conc_pref {
332
    WPA_CONC_PREF_NOT_SET,
333
    WPA_CONC_PREF_STA,
334
    WPA_CONC_PREF_P2P
335
  } conc_pref;
336
  unsigned int p2p_per_sta_psk:1;
337
  unsigned int p2p_fail_on_wps_complete:1;
338
  unsigned int p2p_24ghz_social_channels:1;
339
  unsigned int pending_p2ps_group:1;
340
  unsigned int pending_group_iface_for_p2ps:1;
341
  unsigned int pending_p2ps_group_freq;
342
343
#ifdef CONFIG_WIFI_DISPLAY
344
  int wifi_display;
345
#define MAX_WFD_SUBELEMS 12
346
  struct wpabuf *wfd_subelem[MAX_WFD_SUBELEMS];
347
#endif /* CONFIG_WIFI_DISPLAY */
348
349
  struct psk_list_entry *add_psk; /* From group formation */
350
351
#ifdef CONFIG_PROCESS_COORDINATION
352
  struct proc_coord *pc;
353
#endif /* CONFIG_PROCESS_COORDINATION */
354
};
355
356
357
/**
358
 * struct wpa_radio - Internal data for per-radio information
359
 *
360
 * This structure is used to share data about configured interfaces
361
 * (struct wpa_supplicant) that share the same physical radio, e.g., to allow
362
 * better coordination of offchannel operations.
363
 */
364
struct wpa_radio {
365
  char name[16]; /* from driver_ops get_radio_name() or empty if not
366
      * available */
367
  /** NULL if no external scan running. */
368
  struct wpa_supplicant *external_scan_req_interface;
369
  unsigned int num_active_works;
370
  struct dl_list ifaces; /* struct wpa_supplicant::radio_list entries */
371
  struct dl_list work; /* struct wpa_radio_work::list entries */
372
};
373
374
/**
375
 * Checks whether an external scan is running on a given radio.
376
 * @radio: Pointer to radio struct
377
 * Returns: true if an external scan is running, false otherwise.
378
 */
379
static inline bool external_scan_running(struct wpa_radio *radio)
380
0
{
381
0
  return radio && radio->external_scan_req_interface;
382
0
}
Unexecuted instantiation: bss.c:external_scan_running
Unexecuted instantiation: bssid_ignore.c:external_scan_running
Unexecuted instantiation: eap_register.c:external_scan_running
Unexecuted instantiation: events.c:external_scan_running
Unexecuted instantiation: gas_query.c:external_scan_running
Unexecuted instantiation: hs20_supplicant.c:external_scan_running
Unexecuted instantiation: interworking.c:external_scan_running
Unexecuted instantiation: mbo.c:external_scan_running
Unexecuted instantiation: notify.c:external_scan_running
Unexecuted instantiation: offchannel.c:external_scan_running
Unexecuted instantiation: op_classes.c:external_scan_running
Unexecuted instantiation: robust_av.c:external_scan_running
Unexecuted instantiation: rrm.c:external_scan_running
Unexecuted instantiation: scan.c:external_scan_running
Unexecuted instantiation: wmm_ac.c:external_scan_running
Unexecuted instantiation: wnm_sta.c:external_scan_running
Unexecuted instantiation: wpas_glue.c:external_scan_running
Unexecuted instantiation: wpa_supplicant.c:external_scan_running
Unexecuted instantiation: wps_supplicant.c:external_scan_running
Unexecuted instantiation: scan-res.c:external_scan_running
383
384
0
#define MAX_ACTIVE_WORKS 2
385
386
387
/**
388
 * struct wpa_radio_work - Radio work item
389
 */
390
struct wpa_radio_work {
391
  struct dl_list list;
392
  unsigned int freq; /* known frequency (MHz) or 0 for multiple/unknown */
393
  const char *type;
394
  struct wpa_supplicant *wpa_s;
395
  void (*cb)(struct wpa_radio_work *work, int deinit);
396
  void *ctx;
397
  unsigned int started:1;
398
  struct os_reltime time;
399
  unsigned int bands;
400
};
401
402
struct wpa_radio_work *
403
radio_add_work(struct wpa_supplicant *wpa_s, unsigned int freq,
404
         const char *type, int next,
405
         void (*cb)(struct wpa_radio_work *work, int deinit),
406
         void *ctx);
407
void radio_work_done(struct wpa_radio_work *work);
408
void radio_remove_work(struct wpa_supplicant *wpa_s,
409
           struct wpa_radio_work *work);
410
void radio_remove_works(struct wpa_supplicant *wpa_s,
411
      const char *type, int remove_all);
412
void radio_work_check_next(struct wpa_supplicant *wpa_s);
413
struct wpa_radio_work *
414
radio_work_pending(struct wpa_supplicant *wpa_s, const char *type);
415
416
struct wpa_connect_work {
417
  unsigned int sme:1;
418
  unsigned int bss_removed:1;
419
  struct wpa_bss *bss;
420
  struct wpa_ssid *ssid;
421
};
422
423
int wpas_valid_bss_ssid(struct wpa_supplicant *wpa_s, struct wpa_bss *test_bss,
424
      struct wpa_ssid *test_ssid);
425
void wpas_connect_work_free(struct wpa_connect_work *cwork);
426
void wpas_connect_work_done(struct wpa_supplicant *wpa_s);
427
428
struct wpa_external_work {
429
  unsigned int id;
430
  char type[100];
431
  unsigned int timeout;
432
};
433
434
enum wpa_radio_work_band wpas_freq_to_band(int freq);
435
unsigned int wpas_get_bands(struct wpa_supplicant *wpa_s, const int *freqs);
436
437
/**
438
 * offchannel_send_action_result - Result of offchannel send Action frame
439
 */
440
enum offchannel_send_action_result {
441
  OFFCHANNEL_SEND_ACTION_SUCCESS /**< Frame was send and acknowledged */,
442
  OFFCHANNEL_SEND_ACTION_NO_ACK /**< Frame was sent, but not acknowledged
443
               */,
444
  OFFCHANNEL_SEND_ACTION_FAILED /**< Frame was not sent due to a failure
445
               */
446
};
447
448
struct wps_ap_info {
449
  u8 bssid[ETH_ALEN];
450
  enum wps_ap_info_type {
451
    WPS_AP_NOT_SEL_REG,
452
    WPS_AP_SEL_REG,
453
    WPS_AP_SEL_REG_OUR
454
  } type;
455
  unsigned int tries;
456
  struct os_reltime last_attempt;
457
  unsigned int pbc_active;
458
  u8 uuid[WPS_UUID_LEN];
459
};
460
461
0
#define WPA_FREQ_USED_BY_INFRA_STATION BIT(0)
462
0
#define WPA_FREQ_USED_BY_P2P_CLIENT BIT(1)
463
464
struct wpa_used_freq_data {
465
  int freq;
466
  unsigned int flags;
467
};
468
469
0
#define RRM_NEIGHBOR_REPORT_TIMEOUT 1 /* 1 second for AP to send a report */
470
471
/*
472
 * struct rrm_data - Data used for managing RRM features
473
 */
474
struct rrm_data {
475
  /* rrm_used - indication regarding the current connection */
476
  unsigned int rrm_used:1;
477
478
  /*
479
   * notify_neighbor_rep - Callback for notifying report requester
480
   */
481
  void (*notify_neighbor_rep)(void *ctx, struct wpabuf *neighbor_rep);
482
483
  /*
484
   * neighbor_rep_cb_ctx - Callback context
485
   * Received in the callback registration, and sent to the callback
486
   * function as a parameter.
487
   */
488
  void *neighbor_rep_cb_ctx;
489
490
  /* next_neighbor_rep_token - Next request's dialog token */
491
  u8 next_neighbor_rep_token;
492
493
  /* token - Dialog token of the current radio measurement */
494
  u8 token;
495
496
  /* destination address of the current radio measurement request */
497
  u8 dst_addr[ETH_ALEN];
498
};
499
500
enum wpa_supplicant_test_failure {
501
  WPAS_TEST_FAILURE_NONE,
502
  WPAS_TEST_FAILURE_SCAN_TRIGGER,
503
};
504
505
struct wpa_bss_tmp_disallowed {
506
  struct dl_list list;
507
  u8 bssid[ETH_ALEN];
508
  int rssi_threshold;
509
};
510
511
struct beacon_rep_data {
512
  u8 token;
513
  u8 last_indication;
514
  struct wpa_driver_scan_params scan_params;
515
  u8 ssid[SSID_MAX_LEN];
516
  size_t ssid_len;
517
  u8 bssid[ETH_ALEN];
518
  enum beacon_report_detail report_detail;
519
  struct bitfield *eids;
520
  struct bitfield *ext_eids;
521
};
522
523
524
struct external_pmksa_cache {
525
  struct dl_list list;
526
  void *pmksa_cache;
527
};
528
529
struct fils_hlp_req {
530
  struct dl_list list;
531
  u8 dst[ETH_ALEN];
532
  struct wpabuf *pkt;
533
};
534
535
struct driver_signal_override {
536
  struct dl_list list;
537
  u8 bssid[ETH_ALEN];
538
  int si_current_signal;
539
  int si_avg_signal;
540
  int si_avg_beacon_signal;
541
  int si_current_noise;
542
  int scan_level;
543
};
544
545
struct robust_av_data {
546
  u8 dialog_token;
547
  enum scs_request_type request_type;
548
  u8 up_bitmap;
549
  u8 up_limit;
550
  u32 stream_timeout;
551
  u8 frame_classifier[48];
552
  size_t frame_classifier_len;
553
  bool valid_config;
554
};
555
556
struct dscp_policy_status {
557
  u8 id;
558
  u8 status;
559
};
560
561
struct dscp_resp_data {
562
  bool more;
563
  bool reset;
564
  bool solicited;
565
  struct dscp_policy_status *policy;
566
  int num_policies;
567
};
568
569
enum ip_version {
570
  IPV4 = 4,
571
  IPV6 = 6,
572
};
573
574
575
struct ipv4_params {
576
  struct in_addr src_ip;
577
  struct in_addr dst_ip;
578
  u16 src_port;
579
  u16 dst_port;
580
  u8 dscp;
581
  u8 protocol;
582
};
583
584
585
struct ipv6_params {
586
  struct in6_addr src_ip;
587
  struct in6_addr dst_ip;
588
  u16 src_port;
589
  u16 dst_port;
590
  u8 dscp;
591
  u8 next_header;
592
  u8 flow_label[3];
593
};
594
595
596
struct type4_params {
597
  u8 classifier_mask;
598
  enum ip_version ip_version;
599
  union {
600
    struct ipv4_params v4;
601
    struct ipv6_params v6;
602
  } ip_params;
603
};
604
605
606
struct type10_params {
607
  u8 prot_instance;
608
  u8 prot_number;
609
  u8 *filter_value;
610
  u8 *filter_mask;
611
  size_t filter_len;
612
};
613
614
615
struct tclas_element {
616
  u8 user_priority;
617
  u8 classifier_type;
618
  union {
619
    struct type4_params type4_param;
620
    struct type10_params type10_param;
621
  } frame_classifier;
622
};
623
624
625
struct qos_characteristics {
626
  bool available;
627
628
  /* Control Info Direction */
629
  u8 direction;
630
  /* Presence Bitmap Of Additional Parameters */
631
  u16 mask;
632
  /* Minimum Service Interval */
633
  u32 min_si;
634
  /* Maximum Service Interval */
635
  u32 max_si;
636
  /* Minimum Data Rate */
637
  u32 min_data_rate;
638
  /* Delay Bound */
639
  u32 delay_bound;
640
  /* Maximum MSDU Size */
641
  u16 max_msdu_size;
642
  /* Service Start Time */
643
  u32 service_start_time;
644
  /* Service Start Time LinkID */
645
  u8 service_start_time_link_id;
646
  /* Mean Data Rate */
647
  u32 mean_data_rate;
648
  /* Delayed Bounded Burst Size */
649
  u32 burst_size;
650
  /* MSDU Lifetime */
651
  u16 msdu_lifetime;
652
  /* MSDU Delivery Info */
653
  u8 msdu_delivery_info;
654
  /* Medium Time */
655
  u16 medium_time;
656
};
657
658
659
struct scs_desc_elem {
660
  u8 scs_id;
661
  enum scs_request_type request_type;
662
  u8 intra_access_priority;
663
  bool scs_up_avail;
664
  struct tclas_element *tclas_elems;
665
  unsigned int num_tclas_elem;
666
  u8 tclas_processing;
667
  struct qos_characteristics qos_char_elem;
668
};
669
670
671
struct scs_robust_av_data {
672
  struct scs_desc_elem *scs_desc_elems;
673
  unsigned int num_scs_desc;
674
};
675
676
677
enum scs_response_status {
678
  SCS_DESC_SENT = 0,
679
  SCS_DESC_SUCCESS = 1,
680
};
681
682
683
struct active_scs_elem {
684
  struct dl_list list;
685
  u8 scs_id;
686
  enum scs_response_status status;
687
  struct scs_desc_elem desc_elem;
688
};
689
690
691
struct ml_sta_link_info {
692
  u8 link_id;
693
  u8 bssid[ETH_ALEN];
694
  u16 status;
695
};
696
697
698
enum local_hw_capab {
699
  CAPAB_HT,
700
  CAPAB_VHT,
701
  CAPAB_HE,
702
  CAPAB_EHT,
703
};
704
705
struct last_scan_ssid {
706
  u8 ssid[SSID_MAX_LEN];
707
  size_t ssid_len;
708
};
709
710
#ifdef CONFIG_IEEE8021X_AUTH
711
/**
712
 * struct auth_802_1x_data - Data for IEEE 802.1X Authentication algorithm
713
 * @auth_trans: Authentication transaction sequence number
714
 * @status: Status code
715
 * @derive_ptk: Whether to derive a PTK for association
716
 * @pmksa_caching: Whether PMKSA caching is being used
717
 * @pmkid_found: Whether PMKID is identified by AP
718
 * @pmkid: PMKID for PMKSA caching
719
 * @snonce: SNonce
720
 * @anonce: ANonce
721
 * @dh_group: DH group for key exchange
722
 * @ecdh: ECDH context
723
 * @dhss: DH shared secret
724
 * @rsne: RSNE
725
 * @rsne_len: Length of RSNE
726
 * @rsnxe: RSNXE
727
 * @rsnxe_len: Length of RSNXE
728
 */
729
struct auth_802_1x_data {
730
  u16 auth_trans;
731
  u16 status;
732
  bool derive_ptk;
733
  bool pmksa_caching;
734
  bool pmkid_found;
735
  u8 pmkid[PMKID_LEN];
736
  u8 snonce[WPA_NONCE_LEN];
737
  u8 anonce[WPA_NONCE_LEN];
738
  u16 dh_group;
739
  struct crypto_ecdh *ecdh;
740
  struct wpabuf *dhss;
741
  u8 rsne[257];
742
  size_t rsne_len;
743
  u8 rsnxe[257];
744
  size_t rsnxe_len;
745
};
746
#endif /* CONFIG_IEEE8021X_AUTH */
747
748
/**
749
 * struct wpa_supplicant - Internal data for wpa_supplicant interface
750
 *
751
 * This structure contains the internal data for core wpa_supplicant code. This
752
 * should be only used directly from the core code. However, a pointer to this
753
 * data is used from other files as an arbitrary context pointer in calls to
754
 * core functions.
755
 */
756
struct wpa_supplicant {
757
  struct wpa_global *global;
758
  struct wpa_radio *radio; /* shared radio context */
759
  struct dl_list radio_list; /* list head: struct wpa_radio::ifaces */
760
  struct wpa_supplicant *parent;
761
  struct wpa_supplicant *p2pdev;
762
  struct wpa_supplicant *next;
763
  struct l2_packet_data *l2;
764
  struct l2_packet_data *l2_br;
765
  struct os_reltime roam_start;
766
  struct os_reltime roam_time;
767
  struct os_reltime session_start;
768
  struct os_reltime session_length;
769
  unsigned char own_addr[ETH_ALEN];
770
  unsigned char perm_addr[ETH_ALEN];
771
  char ifname[100];
772
  u8 hw_dfs_domain;
773
#ifdef CONFIG_MATCH_IFACE
774
  int matched;
775
#endif /* CONFIG_MATCH_IFACE */
776
#ifdef CONFIG_CTRL_IFACE_DBUS_NEW
777
  char *dbus_new_path;
778
  char *dbus_groupobj_path;
779
#ifdef CONFIG_AP
780
  char *preq_notify_peer;
781
#endif /* CONFIG_AP */
782
#endif /* CONFIG_CTRL_IFACE_DBUS_NEW */
783
#ifdef CONFIG_CTRL_IFACE_BINDER
784
  const void *binder_object_key;
785
#endif /* CONFIG_CTRL_IFACE_BINDER */
786
  char bridge_ifname[16];
787
788
  char *confname;
789
  char *confanother;
790
791
  struct wpa_config *conf;
792
  int countermeasures;
793
  struct os_reltime last_michael_mic_error;
794
  u8 bssid[ETH_ALEN];
795
  u8 pending_bssid[ETH_ALEN]; /* If wpa_state == WPA_ASSOCIATING, this
796
             * field contains the target BSSID. */
797
  int reassociate; /* reassociation requested */
798
  bool roam_in_progress; /* roam in progress */
799
  unsigned int reassoc_same_bss:1; /* reassociating to the same BSS */
800
  unsigned int reassoc_same_ess:1; /* reassociating to the same ESS */
801
  int disconnected; /* all connections disabled; i.e., do no reassociate
802
         * before this has been cleared */
803
  struct wpa_ssid *current_ssid;
804
  struct wpa_ssid *last_ssid;
805
  struct wpa_bss *current_bss;
806
  int ap_ies_from_associnfo;
807
  unsigned int assoc_freq;
808
  u8 ap_mld_addr[ETH_ALEN];
809
  u8 mlo_assoc_link_id;
810
  u16 valid_links; /* bitmap of valid MLO link IDs */
811
  struct {
812
    u8 addr[ETH_ALEN];
813
    u8 bssid[ETH_ALEN];
814
    unsigned int freq;
815
    struct wpa_bss *bss;
816
    bool disabled;
817
    struct wpabuf *ies;
818
    unsigned int max_nss_rx:4;
819
    unsigned int max_nss_tx:4;
820
    enum chan_width channel_bandwidth;
821
  } links[MAX_NUM_MLD_LINKS];
822
  u8 *last_con_fail_realm;
823
  size_t last_con_fail_realm_len;
824
  bool sta_roaming_disabled;
825
826
  /* Selected configuration (based on Beacon/ProbeResp WPA IE) */
827
  int pairwise_cipher;
828
  int deny_ptk0_rekey;
829
  int group_cipher;
830
  int key_mgmt;
831
  int wpa_proto;
832
  int mgmt_group_cipher;
833
  /*
834
   * Allowed key management suites for roaming/initial connection
835
   * when the driver's SME is in use.
836
   */
837
  int allowed_key_mgmts;
838
839
  void *drv_priv; /* private data used by driver_ops */
840
  void *global_drv_priv;
841
842
  u8 *bssid_filter;
843
  size_t bssid_filter_count;
844
845
  u8 *disallow_aps_bssid;
846
  size_t disallow_aps_bssid_count;
847
  struct wpa_ssid_value *disallow_aps_ssid;
848
  size_t disallow_aps_ssid_count;
849
850
  u32 setband_mask;
851
852
  /* Preferred network for the next connection attempt */
853
  struct wpa_ssid *next_ssid;
854
855
  /* previous scan was wildcard when interleaving between
856
   * wildcard scans and specific SSID scan when max_ssids=1 */
857
  int prev_scan_wildcard;
858
  struct wpa_ssid *prev_scan_ssid; /* previously scanned SSID;
859
            * NULL = not yet initialized (start
860
            * with wildcard SSID)
861
            * WILDCARD_SSID_SCAN = wildcard
862
            * SSID was used in the previous scan
863
            */
864
0
#define WILDCARD_SSID_SCAN ((struct wpa_ssid *) 1)
865
866
  struct wpa_ssid *prev_sched_ssid; /* last SSID used in sched scan */
867
  int sched_scan_timeout;
868
  int first_sched_scan;
869
  int sched_scan_timed_out;
870
  struct sched_scan_plan *sched_scan_plans;
871
  size_t sched_scan_plans_num;
872
873
  void (*scan_res_handler)(struct wpa_supplicant *wpa_s,
874
         struct wpa_scan_results *scan_res);
875
  void (*scan_res_fail_handler)(struct wpa_supplicant *wpa_s);
876
  struct dl_list bss; /* struct wpa_bss::list */
877
  struct dl_list bss_id; /* struct wpa_bss::list_id */
878
  size_t num_bss;
879
  unsigned int bss_update_idx;
880
  unsigned int bss_next_id;
881
882
   /*
883
    * Pointers to BSS entries in the order they were in the last scan
884
    * results.
885
    */
886
  struct wpa_bss **last_scan_res;
887
  size_t last_scan_res_used;
888
  size_t last_scan_res_size;
889
  struct os_reltime last_scan;
890
  bool last_scan_external;
891
  struct last_scan_ssid last_scan_ssids[WPAS_MAX_SCAN_SSIDS];
892
  size_t last_scan_num_ssids;
893
894
  const struct wpa_driver_ops *driver;
895
  int interface_removed; /* whether the network interface has been
896
        * removed */
897
  struct wpa_sm *wpa;
898
  struct ptksa_cache *ptksa;
899
900
  struct eapol_sm *eapol;
901
902
  struct ctrl_iface_priv *ctrl_iface;
903
904
  enum wpa_states wpa_state;
905
  struct wpa_radio_work *scan_work;
906
  int scanning;
907
  int sched_scanning;
908
  unsigned int sched_scan_stop_req:1;
909
  int new_connection;
910
911
  int eapol_received; /* number of EAPOL packets received after the
912
           * previous association event */
913
914
  u8 rsnxe[257];
915
  size_t rsnxe_len;
916
917
  /*
918
   * Security Profile element information
919
   *
920
   * sel_security_profile: Profile chosen from the
921
   *   intersection of the AP's Security Profile Bitmap and the STA's
922
   *   supported profiles. NULL means no profile selected (feature
923
   *   inactive).
924
   *
925
   * security_profile / security_profile_len: Pre-built Security
926
   *   Profile element for the selected profile, built once in
927
   *   wpa_supplicant_set_suites() after the RSNE and RSNXE are
928
   *   finalised. Appended to Authentication and (Re)Association Request
929
   *   frames by sme_send_authentication() and sme_associate(),
930
   *   respectively.
931
   */
932
  const struct security_profile_entry *sel_security_profile;
933
  u8 security_profile[32];
934
  size_t security_profile_len;
935
936
  struct scard_data *scard;
937
  char imsi[20];
938
  int mnc_len;
939
940
  unsigned char last_eapol_src[ETH_ALEN];
941
942
  unsigned int keys_cleared; /* bitfield of key indexes that the driver is
943
            * known not to be configured with a key */
944
945
  struct wpa_bssid_ignore *bssid_ignore;
946
947
  /* Number of connection failures since last successful connection */
948
  unsigned int consecutive_conn_failures;
949
950
  /**
951
   * scan_req - Type of the scan request
952
   */
953
  enum scan_req_type {
954
    /**
955
     * NORMAL_SCAN_REQ - Normal scan request
956
     *
957
     * This is used for scans initiated by wpa_supplicant to find an
958
     * AP for a connection.
959
     */
960
    NORMAL_SCAN_REQ,
961
962
    /**
963
     * INITIAL_SCAN_REQ - Initial scan request
964
     *
965
     * This is used for the first scan on an interface to force at
966
     * least one scan to be run even if the configuration does not
967
     * include any enabled networks.
968
     */
969
    INITIAL_SCAN_REQ,
970
971
    /**
972
     * MANUAL_SCAN_REQ - Manual scan request
973
     *
974
     * This is used for scans where the user request a scan or
975
     * a specific wpa_supplicant operation (e.g., WPS) requires scan
976
     * to be run.
977
     */
978
    MANUAL_SCAN_REQ
979
  } scan_req, last_scan_req;
980
  enum wpa_states scan_prev_wpa_state;
981
  struct os_reltime scan_trigger_time, scan_start_time;
982
  /* Minimum freshness requirement for connection purposes */
983
  struct os_reltime scan_min_time;
984
  int scan_runs; /* number of scan runs since WPS was started */
985
  int *next_scan_freqs;
986
  int *select_network_scan_freqs;
987
  int *manual_scan_freqs;
988
  int *manual_sched_scan_freqs;
989
  unsigned int manual_scan_passive:1;
990
  unsigned int manual_scan_use_id:1;
991
  unsigned int manual_scan_only_new:1;
992
  unsigned int own_scan_requested:1;
993
  unsigned int own_scan_running:1;
994
  unsigned int clear_driver_scan_cache:1;
995
  unsigned int manual_non_coloc_6ghz:1;
996
  unsigned int manual_scan_id;
997
  int scan_interval; /* time in sec between scans to find suitable AP */
998
  int normal_scans; /* normal scans run before sched_scan */
999
  int scan_for_connection; /* whether the scan request was triggered for
1000
          * finding a connection */
1001
  /*
1002
   * A unique cookie representing the vendor scan request. This cookie is
1003
   * returned from the driver interface. 0 indicates that there is no
1004
   * pending vendor scan request.
1005
   */
1006
  u64 curr_scan_cookie;
1007
#define MAX_SCAN_ID 16
1008
  int scan_id[MAX_SCAN_ID];
1009
  unsigned int scan_id_count;
1010
  u8 next_scan_bssid[ETH_ALEN];
1011
  unsigned int next_scan_bssid_wildcard_ssid:1;
1012
1013
  struct wpa_ssid_value *ssids_from_scan_req;
1014
  unsigned int num_ssids_from_scan_req;
1015
  int *last_scan_freqs; /* int_array */
1016
  unsigned int suitable_network;
1017
  unsigned int no_suitable_network;
1018
1019
  u8 ml_probe_bssid[ETH_ALEN];
1020
  int ml_probe_mld_id;
1021
  u16 ml_probe_links;
1022
1023
  u64 drv_flags;
1024
  u64 drv_flags2;
1025
  unsigned int drv_enc;
1026
  unsigned int drv_key_mgmt;
1027
  unsigned int drv_rrm_flags;
1028
  unsigned int drv_max_acl_mac_addrs;
1029
  size_t drv_max_probe_req_ie_len;
1030
1031
  /*
1032
   * A bitmap of supported protocols for probe response offload. See
1033
   * struct wpa_driver_capa in driver.h
1034
   */
1035
  unsigned int probe_resp_offloads;
1036
1037
  /* extended capabilities supported by the driver */
1038
  const u8 *extended_capa, *extended_capa_mask;
1039
  unsigned int extended_capa_len;
1040
1041
  /* EML and MLD capabilities supported by the driver */
1042
  u16 eml_capa, mld_capa;
1043
1044
  int max_scan_ssids;
1045
  int max_sched_scan_ssids;
1046
  unsigned int max_sched_scan_plans;
1047
  unsigned int max_sched_scan_plan_interval;
1048
  unsigned int max_sched_scan_plan_iterations;
1049
  int sched_scan_supported;
1050
  unsigned int max_match_sets;
1051
  unsigned int max_remain_on_chan;
1052
  unsigned int max_stations;
1053
  unsigned int max_num_akms;
1054
1055
  int pending_mic_error_report;
1056
  int pending_mic_error_pairwise;
1057
  int mic_errors_seen; /* Michael MIC errors with the current PTK */
1058
1059
  struct wps_context *wps;
1060
  int wps_success; /* WPS success event received */
1061
  struct wps_er *wps_er;
1062
  unsigned int wps_run;
1063
  struct os_reltime wps_pin_start_time;
1064
  bool bssid_ignore_cleared;
1065
1066
  struct wpabuf *pending_eapol_rx;
1067
  struct os_reltime pending_eapol_rx_time;
1068
  u8 pending_eapol_rx_src[ETH_ALEN];
1069
  enum frame_encryption pending_eapol_encrypted;
1070
  unsigned int last_eapol_matches_bssid:1;
1071
  unsigned int eapol_failed:1;
1072
  unsigned int eap_expected_failure:1;
1073
  unsigned int reattach:1; /* reassociation to the same BSS requested */
1074
  unsigned int mac_addr_changed:1;
1075
  unsigned int added_vif:1;
1076
  unsigned int owe_transition_select:1;
1077
  unsigned int owe_transition_search:1;
1078
  unsigned int connection_set:1;
1079
  unsigned int connection_ht:1;
1080
  unsigned int connection_vht:1;
1081
  unsigned int connection_he:1;
1082
  unsigned int connection_eht:1;
1083
  unsigned int connection_uhr:1;
1084
  unsigned int disable_mbo_oce:1;
1085
1086
  enum wnmsleep_state {
1087
    WNM_SLEEP_IDLE,
1088
    WNM_SLEEP_WAIT_RESP_ENTER,
1089
    WNM_SLEEP_WAIT_RESP_EXIT,
1090
  } wnmsleep_state;
1091
1092
  u8 connection_max_nss_rx;
1093
  u8 connection_max_nss_tx;
1094
  enum chan_width connection_channel_bandwidth;
1095
1096
  struct os_reltime last_mac_addr_change;
1097
  enum wpas_mac_addr_style last_mac_addr_style;
1098
1099
  struct ibss_rsn *ibss_rsn;
1100
1101
  int set_sta_uapsd;
1102
  int sta_uapsd;
1103
  int set_ap_uapsd;
1104
  int ap_uapsd;
1105
  int auth_alg;
1106
  u16 last_owe_group;
1107
1108
#ifdef CONFIG_SME
1109
  struct {
1110
    u8 ssid[SSID_MAX_LEN];
1111
    size_t ssid_len;
1112
    int freq;
1113
    u8 assoc_req_ie[1500];
1114
    size_t assoc_req_ie_len;
1115
    int mfp;
1116
    int ft_used;
1117
    u8 mobility_domain[2];
1118
    u8 *ft_ies;
1119
    size_t ft_ies_len;
1120
    u8 prev_bssid[ETH_ALEN];
1121
    int prev_bssid_set;
1122
    int auth_alg;
1123
    int proto;
1124
1125
    int sa_query_count; /* number of pending SA Query requests;
1126
             * 0 = no SA Query in progress */
1127
    int sa_query_timed_out;
1128
    u8 *sa_query_trans_id; /* buffer of WLAN_SA_QUERY_TR_ID_LEN *
1129
          * sa_query_count octets of pending
1130
          * SA Query transaction identifiers */
1131
    struct os_reltime sa_query_start;
1132
    struct os_reltime last_unprot_disconnect;
1133
    enum { HT_SEC_CHAN_UNKNOWN,
1134
           HT_SEC_CHAN_ABOVE,
1135
           HT_SEC_CHAN_BELOW } ht_sec_chan;
1136
    u8 sched_obss_scan;
1137
    u16 obss_scan_int;
1138
    u16 bss_max_idle_period;
1139
    bool spp_amsdu;
1140
#ifdef CONFIG_SAE
1141
    struct sae_data sae;
1142
    struct wpabuf *sae_token;
1143
    int sae_group_index;
1144
    unsigned int sae_pmksa_caching:1;
1145
    u16 seq_num;
1146
    int *sae_rejected_groups;
1147
#endif /* CONFIG_SAE */
1148
    u8 ext_auth_bssid[ETH_ALEN];
1149
    unsigned int ext_auth_freq;
1150
    struct wpa_ssid *ext_auth_wpa_ssid;
1151
    u8 ext_auth_ssid[SSID_MAX_LEN];
1152
    size_t ext_auth_ssid_len;
1153
    int ext_auth_key_mgmt;
1154
    u8 ext_auth_ap_mld_addr[ETH_ALEN];
1155
    bool ext_ml_auth;
1156
    u16 assoc_auth_type;
1157
    int ext_auth_alg;
1158
    int ext_pairwise_cipher;
1159
    int ext_group_cipher;
1160
    int ext_mgmt_group_cipher;
1161
    u16 ext_rsn_capab;
1162
    u8 ext_rsnxe[257];
1163
    size_t ext_rsnxe_len;
1164
  } sme;
1165
#endif /* CONFIG_SME */
1166
1167
#ifdef CONFIG_AP
1168
  struct hostapd_iface *ap_iface;
1169
  void (*ap_configured_cb)(void *ctx, void *data);
1170
  void *ap_configured_cb_ctx;
1171
  void *ap_configured_cb_data;
1172
#endif /* CONFIG_AP */
1173
1174
  struct hostapd_iface *ifmsh;
1175
#ifdef CONFIG_MESH
1176
  struct mesh_rsn *mesh_rsn;
1177
  int mesh_if_idx;
1178
  unsigned int mesh_if_created:1;
1179
  unsigned int mesh_ht_enabled:1;
1180
  unsigned int mesh_vht_enabled:1;
1181
  unsigned int mesh_he_enabled:1;
1182
  unsigned int mesh_eht_enabled:1;
1183
  struct wpa_driver_mesh_join_params *mesh_params;
1184
#ifdef CONFIG_PMKSA_CACHE_EXTERNAL
1185
  /* struct external_pmksa_cache::list */
1186
  struct dl_list mesh_external_pmksa_cache;
1187
#endif /* CONFIG_PMKSA_CACHE_EXTERNAL */
1188
#endif /* CONFIG_MESH */
1189
1190
  unsigned int off_channel_freq;
1191
  struct wpabuf *pending_action_tx;
1192
  u8 pending_action_src[ETH_ALEN];
1193
  u8 pending_action_dst[ETH_ALEN];
1194
  u8 pending_action_bssid[ETH_ALEN];
1195
  unsigned int pending_action_freq;
1196
  int pending_action_no_cck;
1197
  int pending_action_without_roc;
1198
  unsigned int pending_action_tx_done:1;
1199
  void (*pending_action_tx_status_cb)(struct wpa_supplicant *wpa_s,
1200
              unsigned int freq, const u8 *dst,
1201
              const u8 *src, const u8 *bssid,
1202
              const u8 *data, size_t data_len,
1203
              enum offchannel_send_action_result
1204
              result);
1205
  unsigned int roc_waiting_drv_freq;
1206
  int action_tx_wait_time;
1207
  int action_tx_wait_time_used;
1208
1209
  int p2p_mgmt;
1210
1211
#ifdef CONFIG_P2P
1212
  struct p2p_go_neg_results *go_params;
1213
  struct rsn_pmksa_cache_entry *p2p_pmksa_entry;
1214
  int create_p2p_iface;
1215
  u8 pending_interface_addr[ETH_ALEN];
1216
  char pending_interface_name[100];
1217
  int pending_interface_type;
1218
  int p2p_group_idx;
1219
  unsigned int pending_listen_freq;
1220
  unsigned int pending_listen_duration;
1221
  enum {
1222
    NOT_P2P_GROUP_INTERFACE,
1223
    P2P_GROUP_INTERFACE_PENDING,
1224
    P2P_GROUP_INTERFACE_GO,
1225
    P2P_GROUP_INTERFACE_CLIENT
1226
  } p2p_group_interface;
1227
  struct p2p_group *p2p_group;
1228
  char p2p_pin[10];
1229
  int p2p_wps_method;
1230
  u8 p2p_auth_invite[ETH_ALEN];
1231
  int p2p_sd_over_ctrl_iface;
1232
  int p2p_in_provisioning;
1233
  int p2p_in_invitation;
1234
  int p2p_retry_limit;
1235
  int p2p_invite_go_freq;
1236
  bool p2p_pairing_setup;
1237
  bool p2p_pairing_cache;
1238
  int pending_invite_ssid_id;
1239
  int show_group_started;
1240
  u8 go_dev_addr[ETH_ALEN];
1241
  int pending_pd_before_join;
1242
  u8 pending_join_iface_addr[ETH_ALEN];
1243
  u8 pending_join_dev_addr[ETH_ALEN];
1244
  u8 p2p_bootstrap_dev_addr[ETH_ALEN];
1245
  int pending_join_wps_method;
1246
  char pending_join_password[100];
1247
  u8 p2p_join_ssid[SSID_MAX_LEN];
1248
  size_t p2p_join_ssid_len;
1249
  int p2p_join_scan_count;
1250
  int auto_pd_scan_retry;
1251
  int force_long_sd;
1252
  u16 pending_pd_config_methods;
1253
  enum {
1254
    NORMAL_PD, AUTO_PD_GO_NEG, AUTO_PD_JOIN, AUTO_PD_ASP
1255
  } pending_pd_use;
1256
1257
  /*
1258
   * Whether cross connection is disallowed by the AP to which this
1259
   * interface is associated (only valid if there is an association).
1260
   */
1261
  int cross_connect_disallowed;
1262
1263
  /*
1264
   * Whether this P2P group is configured to use cross connection (only
1265
   * valid if this is P2P GO interface). The actual cross connect packet
1266
   * forwarding may not be configured depending on the uplink status.
1267
   */
1268
  int cross_connect_enabled;
1269
1270
  /* Whether cross connection forwarding is in use at the moment. */
1271
  int cross_connect_in_use;
1272
1273
  /*
1274
   * Uplink interface name for cross connection
1275
   */
1276
  char cross_connect_uplink[100];
1277
1278
  unsigned int p2p_auto_join:1;
1279
  unsigned int p2p_auto_pd:1;
1280
  unsigned int p2p_go_do_acs:1;
1281
  unsigned int p2p_persistent_group:1;
1282
  unsigned int p2p_fallback_to_go_neg:1;
1283
  unsigned int p2p_pd_before_go_neg:1;
1284
  unsigned int p2p_go_ht40:1;
1285
  unsigned int p2p_go_vht:1;
1286
  unsigned int p2p_go_edmg:1;
1287
  unsigned int p2p_go_he:1;
1288
  unsigned int user_initiated_pd:1;
1289
  unsigned int p2p_go_group_formation_completed:1;
1290
  unsigned int group_formation_reported:1;
1291
  unsigned int p2p_go_no_pri_sec_switch:1;
1292
  unsigned int waiting_presence_resp;
1293
  int p2p_first_connection_timeout;
1294
  unsigned int p2p_nfc_tag_enabled:1;
1295
  unsigned int p2p_peer_oob_pk_hash_known:1;
1296
  unsigned int p2p_disable_ip_addr_req:1;
1297
  unsigned int p2ps_method_config_any:1;
1298
  unsigned int p2p_cli_probe:1;
1299
  unsigned int p2p_go_allow_dfs:1;
1300
  unsigned int p2p2:1;
1301
  u16 p2p_bootstrap;
1302
  enum hostapd_hw_mode p2p_go_acs_band;
1303
  enum wpa_p2p_mode p2p_mode;
1304
  int p2p_persistent_go_freq;
1305
  int p2p_persistent_id;
1306
  int p2p_go_intent;
1307
  int p2p_connect_freq;
1308
  struct os_reltime p2p_auto_started;
1309
  struct wpa_ssid *p2p_last_4way_hs_fail;
1310
  struct wpa_radio_work *p2p_scan_work;
1311
  struct wpa_radio_work *p2p_listen_work;
1312
  struct wpa_radio_work *p2p_send_action_work;
1313
  bool p2p_removing_listen_work;
1314
1315
  u16 p2p_oob_dev_pw_id; /* OOB Device Password Id for group formation */
1316
  struct wpabuf *p2p_oob_dev_pw; /* OOB Device Password for group
1317
          * formation */
1318
  u8 p2p_peer_oob_pubkey_hash[WPS_OOB_PUBKEY_HASH_LEN];
1319
  u8 p2p_ip_addr_info[3 * 4];
1320
1321
  /* group common frequencies */
1322
  int *p2p_group_common_freqs;
1323
  unsigned int p2p_group_common_freqs_num;
1324
  u8 p2ps_join_addr[ETH_ALEN];
1325
1326
  unsigned int p2p_go_max_oper_chwidth;
1327
  unsigned int p2p_go_vht_center_freq2;
1328
  int p2p_lo_started;
1329
  bool p2p_neg_go_setup;
1330
#endif /* CONFIG_P2P */
1331
1332
  struct wpa_ssid *bgscan_ssid;
1333
  const struct bgscan_ops *bgscan;
1334
  void *bgscan_priv;
1335
  int signal_threshold;
1336
1337
  const struct autoscan_ops *autoscan;
1338
  struct wpa_driver_scan_params *autoscan_params;
1339
  void *autoscan_priv;
1340
1341
  struct wpa_ssid *connect_without_scan;
1342
1343
  struct wps_ap_info *wps_ap;
1344
  size_t num_wps_ap;
1345
  int wps_ap_iter;
1346
1347
  int after_wps;
1348
  int known_wps_freq;
1349
  unsigned int wps_freq;
1350
  int wps_fragment_size;
1351
  int auto_reconnect_disabled;
1352
1353
   /* Channel preferences for AP/P2P GO use */
1354
  int best_24_freq;
1355
  int best_5_freq;
1356
  int best_overall_freq;
1357
1358
  struct gas_query *gas;
1359
  struct gas_server *gas_server;
1360
1361
#ifdef CONFIG_INTERWORKING
1362
  unsigned int fetch_anqp_in_progress:1;
1363
  unsigned int network_select:1;
1364
  unsigned int auto_select:1;
1365
  unsigned int auto_network_select:1;
1366
  unsigned int interworking_fast_assoc_tried:1;
1367
  unsigned int fetch_all_anqp:1;
1368
  struct wpa_bss *interworking_gas_bss;
1369
#endif /* CONFIG_INTERWORKING */
1370
  unsigned int drv_capa_known;
1371
1372
  struct {
1373
    struct hostapd_hw_modes *modes;
1374
    u16 num_modes;
1375
    u16 flags;
1376
  } hw;
1377
  unsigned int hw_capab; /* bitmap of enum local_hw_capab bits */
1378
#ifdef CONFIG_MACSEC
1379
  struct ieee802_1x_kay *kay;
1380
#endif /* CONFIG_MACSEC */
1381
1382
  int pno;
1383
  int pno_sched_pending;
1384
1385
  /* WLAN_REASON_* reason codes. Negative if locally generated. */
1386
  int disconnect_reason;
1387
1388
  /* WLAN_STATUS_* status codes from last received Authentication frame
1389
   * from the AP. */
1390
  u16 auth_status_code;
1391
1392
  /* WLAN_STATUS_* status codes from (Re)Association Response frame. */
1393
  u16 assoc_status_code;
1394
1395
  struct ext_password_data *ext_pw;
1396
1397
  struct wpabuf *last_gas_resp, *prev_gas_resp;
1398
  u8 last_gas_addr[ETH_ALEN], prev_gas_addr[ETH_ALEN];
1399
  u8 last_gas_dialog_token, prev_gas_dialog_token;
1400
1401
  unsigned int no_keep_alive:1;
1402
  unsigned int ext_mgmt_frame_handling:1;
1403
  unsigned int ext_eapol_frame_io:1;
1404
  unsigned int wmm_ac_supported:1;
1405
  unsigned int ext_work_in_progress:1;
1406
  unsigned int own_disconnect_req:1;
1407
  unsigned int own_reconnect_req:1;
1408
  unsigned int ignore_post_flush_scan_res:1;
1409
1410
0
#define MAC_ADDR_RAND_SCAN       BIT(0)
1411
0
#define MAC_ADDR_RAND_SCHED_SCAN BIT(1)
1412
0
#define MAC_ADDR_RAND_PNO        BIT(2)
1413
0
#define MAC_ADDR_RAND_ALL        (MAC_ADDR_RAND_SCAN | \
1414
0
          MAC_ADDR_RAND_SCHED_SCAN | \
1415
0
          MAC_ADDR_RAND_PNO)
1416
  unsigned int mac_addr_rand_supported;
1417
  unsigned int mac_addr_rand_enable;
1418
1419
  /* MAC Address followed by mask (2 * ETH_ALEN) */
1420
  u8 *mac_addr_scan;
1421
  u8 *mac_addr_sched_scan;
1422
  u8 *mac_addr_pno;
1423
1424
#ifdef CONFIG_WNM
1425
  bool wnm_transition_scan;
1426
  u8 wnm_dialog_token;
1427
  u8 wnm_reply;
1428
  u8 wnm_num_neighbor_report;
1429
  u8 wnm_mode;
1430
  bool wnm_link_removal;
1431
  bool wnm_disassoc_mld;
1432
  u8 wnm_disassoc_addr[ETH_ALEN];
1433
  u16 wnm_disassoc_timer;
1434
  u8 wnm_bss_termination_duration[12];
1435
  struct neighbor_report *wnm_neighbor_report_elements;
1436
  struct os_reltime wnm_cand_valid_until;
1437
  struct wpa_bss *wnm_target_bss;
1438
  enum bss_trans_mgmt_status_code bss_tm_status;
1439
  bool bss_trans_mgmt_in_progress;
1440
  u8 coloc_intf_dialog_token;
1441
  u8 coloc_intf_auto_report;
1442
  u8 coloc_intf_timeout;
1443
#ifdef CONFIG_MBO
1444
  unsigned int wnm_mbo_trans_reason_present:1;
1445
  u8 wnm_mbo_transition_reason;
1446
#endif /* CONFIG_MBO */
1447
#endif /* CONFIG_WNM */
1448
1449
#ifdef CONFIG_TESTING_GET_GTK
1450
  u8 last_gtk[32];
1451
  size_t last_gtk_len;
1452
#endif /* CONFIG_TESTING_GET_GTK */
1453
1454
  unsigned int num_multichan_concurrent;
1455
  struct wpa_radio_work *connect_work;
1456
1457
  unsigned int ext_work_id;
1458
1459
  struct wpabuf *vendor_elem[NUM_VENDOR_ELEM_FRAMES];
1460
1461
#ifdef CONFIG_TESTING_OPTIONS
1462
  struct l2_packet_data *l2_test;
1463
  unsigned int extra_roc_dur;
1464
  enum wpa_supplicant_test_failure test_failure;
1465
  char *get_pref_freq_list_override;
1466
  unsigned int reject_btm_req_reason;
1467
  unsigned int p2p_go_csa_on_inv:1;
1468
  unsigned int ignore_auth_resp:1;
1469
  unsigned int ignore_assoc_disallow:1;
1470
  unsigned int disable_sa_query:1;
1471
  unsigned int testing_resend_assoc:1;
1472
  unsigned int ignore_sae_h2e_only:1;
1473
  int ft_rsnxe_used;
1474
  struct wpabuf *sae_commit_override;
1475
  enum wpa_alg last_tk_alg;
1476
  u8 last_tk_addr[ETH_ALEN];
1477
  int last_tk_key_idx;
1478
  u8 last_tk[WPA_TK_MAX_LEN];
1479
  size_t last_tk_len;
1480
  struct wpabuf *last_assoc_req_wpa_ie;
1481
  int *extra_sae_rejected_groups;
1482
  struct wpabuf *rsne_override_eapol;
1483
  struct wpabuf *rsnxe_override_assoc;
1484
  struct wpabuf *rsnxe_override_eapol;
1485
  struct wpabuf *sec_prof_override_auth;
1486
  struct wpabuf *sec_prof_override_assoc;
1487
  struct dl_list drv_signal_override;
1488
  unsigned int oci_freq_override_eapol;
1489
  unsigned int oci_freq_override_saquery_req;
1490
  unsigned int oci_freq_override_saquery_resp;
1491
  unsigned int oci_freq_override_eapol_g2;
1492
  unsigned int oci_freq_override_ft_assoc;
1493
  unsigned int oci_freq_override_fils_assoc;
1494
  unsigned int oci_freq_override_wnm_sleep;
1495
  unsigned int disable_eapol_g2_tx;
1496
  unsigned int eapol_2_key_info_set_mask;
1497
  int test_assoc_comeback_type;
1498
  struct wpabuf *link_ies[MAX_NUM_MLD_LINKS];
1499
#endif /* CONFIG_TESTING_OPTIONS */
1500
1501
  struct wmm_ac_assoc_data *wmm_ac_assoc_info;
1502
  struct wmm_tspec_element *tspecs[WMM_AC_NUM][TS_DIR_IDX_COUNT];
1503
  struct wmm_ac_addts_request *addts_request;
1504
  u8 wmm_ac_last_dialog_token;
1505
  struct wmm_tspec_element *last_tspecs;
1506
  u8 last_tspecs_count;
1507
1508
  struct rrm_data rrm;
1509
  struct beacon_rep_data beacon_rep_data;
1510
1511
#ifdef CONFIG_FST
1512
  struct fst_iface *fst;
1513
  const struct wpabuf *fst_ies;
1514
  struct wpabuf *received_mb_ies;
1515
#endif /* CONFIG_FST */
1516
1517
#ifdef CONFIG_MBO
1518
  /* Multiband operation non-preferred channel */
1519
  struct wpa_mbo_non_pref_channel {
1520
    enum mbo_non_pref_chan_reason reason;
1521
    u8 oper_class;
1522
    u8 chan;
1523
    u8 preference;
1524
  } *non_pref_chan;
1525
  size_t non_pref_chan_num;
1526
  u8 mbo_wnm_token;
1527
  /**
1528
   * enable_oce - Enable OCE if it is enabled by user and device also
1529
   *    supports OCE.
1530
   * User can enable OCE with wpa_config's 'oce' parameter as follows -
1531
   *  - Set BIT(0) to enable OCE in non-AP STA mode.
1532
   *  - Set BIT(1) to enable OCE in STA-CFON mode.
1533
   */
1534
  u8 enable_oce;
1535
#endif /* CONFIG_MBO */
1536
1537
  /*
1538
   * This should be under CONFIG_MBO, but it is left out to allow using
1539
   * the bss_temp_disallowed list for other purposes as well.
1540
   */
1541
  struct dl_list bss_tmp_disallowed;
1542
1543
  /*
1544
   * Content of a measurement report element with type 8 (LCI),
1545
   * own location.
1546
   */
1547
  struct wpabuf *lci;
1548
  struct os_reltime lci_time;
1549
1550
  struct os_reltime beacon_rep_scan;
1551
1552
  /* FILS HLP requests (struct fils_hlp_req) */
1553
  struct dl_list fils_hlp_req;
1554
1555
  struct sched_scan_relative_params {
1556
    /**
1557
     * relative_rssi_set - Enable relatively preferred BSS reporting
1558
     *
1559
     * 0 = Disable reporting relatively preferred BSSs
1560
     * 1 = Enable reporting relatively preferred BSSs
1561
     */
1562
    int relative_rssi_set;
1563
1564
    /**
1565
     * relative_rssi - Relative RSSI for reporting better BSSs
1566
     *
1567
     * Amount of RSSI by which a BSS should be better than the
1568
     * current connected BSS so that the new BSS can be reported
1569
     * to user space. This applies to sched_scan operations.
1570
     */
1571
    int relative_rssi;
1572
1573
    /**
1574
     * relative_adjust_band - Band in which RSSI is to be adjusted
1575
     */
1576
    enum set_band relative_adjust_band;
1577
1578
    /**
1579
     * relative_adjust_rssi - RSSI adjustment
1580
     *
1581
     * An amount of relative_adjust_rssi should be added to the
1582
     * BSSs that belong to the relative_adjust_band while comparing
1583
     * with other bands for BSS reporting.
1584
     */
1585
    int relative_adjust_rssi;
1586
  } srp;
1587
1588
  /* RIC elements for FT protocol */
1589
  struct wpabuf *ric_ies;
1590
1591
  int last_auth_timeout_sec;
1592
1593
#ifdef CONFIG_DPP
1594
  struct dpp_global *dpp;
1595
  struct dpp_authentication *dpp_auth;
1596
  struct wpa_radio_work *dpp_listen_work;
1597
  unsigned int dpp_pending_listen_freq;
1598
  unsigned int dpp_listen_freq;
1599
  struct os_reltime dpp_listen_end;
1600
  u8 dpp_allowed_roles;
1601
  int dpp_qr_mutual;
1602
  int dpp_netrole;
1603
  int dpp_auth_ok_on_ack;
1604
  int dpp_in_response_listen;
1605
  bool dpp_tx_auth_resp_on_roc_stop;
1606
  bool dpp_tx_chan_change;
1607
  bool dpp_listen_on_tx_expire;
1608
  int dpp_gas_client;
1609
  int dpp_gas_server;
1610
  int dpp_gas_dialog_token;
1611
  u8 dpp_intro_bssid[ETH_ALEN];
1612
  void *dpp_intro_network;
1613
  u8 dpp_intro_peer_version;
1614
  struct dpp_pkex *dpp_pkex;
1615
  struct dpp_bootstrap_info *dpp_pkex_bi;
1616
  char *dpp_pkex_code;
1617
  size_t dpp_pkex_code_len;
1618
  char *dpp_pkex_identifier;
1619
  enum dpp_pkex_ver dpp_pkex_ver;
1620
  char *dpp_pkex_auth_cmd;
1621
  char *dpp_configurator_params;
1622
  struct os_reltime dpp_last_init;
1623
  struct os_reltime dpp_init_iter_start;
1624
  unsigned int dpp_init_max_tries;
1625
  unsigned int dpp_init_retry_time;
1626
  unsigned int dpp_resp_wait_time;
1627
  unsigned int dpp_resp_max_tries;
1628
  unsigned int dpp_resp_retry_time;
1629
  u8 dpp_last_ssid[SSID_MAX_LEN];
1630
  size_t dpp_last_ssid_len;
1631
  bool dpp_conf_backup_received;
1632
  bool dpp_pkex_wait_auth_req;
1633
#ifdef CONFIG_DPP2
1634
  struct dpp_pfs *dpp_pfs;
1635
  int dpp_pfs_fallback;
1636
  struct wpabuf *dpp_presence_announcement;
1637
  struct dpp_bootstrap_info *dpp_chirp_bi;
1638
  int dpp_chirp_freq;
1639
  int *dpp_chirp_freqs;
1640
  int dpp_chirp_iter;
1641
  int dpp_chirp_round;
1642
  int dpp_chirp_scan_done;
1643
  int dpp_chirp_listen;
1644
  struct wpa_ssid *dpp_reconfig_ssid;
1645
  int dpp_reconfig_ssid_id;
1646
  struct dpp_reconfig_id *dpp_reconfig_id;
1647
#endif /* CONFIG_DPP2 */
1648
#ifdef CONFIG_DPP3
1649
  struct os_reltime dpp_pb_time;
1650
  bool dpp_pb_configurator;
1651
  int *dpp_pb_freqs;
1652
  unsigned int dpp_pb_freq_idx;
1653
  unsigned int dpp_pb_announce_count;
1654
  struct wpabuf *dpp_pb_announcement;
1655
  struct dpp_bootstrap_info *dpp_pb_bi;
1656
  unsigned int dpp_pb_resp_freq;
1657
  u8 dpp_pb_init_hash[SHA256_MAC_LEN];
1658
  int dpp_pb_stop_iter;
1659
  bool dpp_pb_discovery_done;
1660
  u8 dpp_pb_c_nonce[DPP_MAX_NONCE_LEN];
1661
  size_t dpp_pb_c_nonce_len;
1662
  bool dpp_pb_result_indicated;
1663
  struct os_reltime dpp_pb_announce_time;
1664
  struct dpp_pb_info dpp_pb[DPP_PB_INFO_COUNT];
1665
  u8 dpp_pb_resp_hash[SHA256_MAC_LEN];
1666
  struct os_reltime dpp_pb_last_resp;
1667
  char *dpp_pb_cmd;
1668
#endif /* CONFIG_DPP3 */
1669
#ifdef CONFIG_TESTING_OPTIONS
1670
  char *dpp_config_obj_override;
1671
  char *dpp_discovery_override;
1672
  char *dpp_groups_override;
1673
  unsigned int dpp_ignore_netaccesskey_mismatch:1;
1674
  unsigned int dpp_discard_public_action:1;
1675
#endif /* CONFIG_TESTING_OPTIONS */
1676
#endif /* CONFIG_DPP */
1677
1678
#ifdef CONFIG_FILS
1679
  unsigned int disable_fils:1;
1680
#endif /* CONFIG_FILS */
1681
  unsigned int ieee80211ac:1;
1682
  unsigned int enabled_4addr_mode:1;
1683
  unsigned int multi_bss_support:1;
1684
  unsigned int drv_authorized_port:1;
1685
  unsigned int multi_ap_ie:1;
1686
  unsigned int multi_ap_backhaul:1;
1687
  unsigned int multi_ap_fronthaul:1;
1688
1689
#ifndef CONFIG_NO_ROBUST_AV
1690
  struct robust_av_data robust_av;
1691
  bool mscs_setup_done;
1692
  struct scs_robust_av_data scs_robust_av_req;
1693
  u8 scs_dialog_token;
1694
  struct dl_list active_scs_ids;
1695
  bool ongoing_scs_req;
1696
  u8 dscp_req_dialog_token;
1697
  u8 dscp_query_dialog_token;
1698
  unsigned int enable_dscp_policy_capa:1;
1699
  unsigned int connection_dscp:1;
1700
  unsigned int wait_for_dscp_req:1;
1701
#ifdef CONFIG_TESTING_OPTIONS
1702
  unsigned int disable_scs_support:1;
1703
  unsigned int disable_mscs_support:1;
1704
#endif /* CONFIG_TESTING_OPTIONS */
1705
#endif /* CONFIG_NO_ROBUST_AV */
1706
1707
  bool wps_scan_done; /* Set upon receiving scan results event */
1708
  bool supp_pbc_active; /* Set for interface when PBC is triggered */
1709
  bool wps_overlap;
1710
  bool scan_in_progress_6ghz; /* Set upon a 6 GHz scan being triggered */
1711
1712
#ifdef CONFIG_IEEE8021X_AUTH
1713
  struct auth_802_1x_data *auth_1x;
1714
#endif /* CONFIG_IEEE8021X_AUTH */
1715
1716
#ifdef CONFIG_PASN
1717
  struct pasn_data pasn;
1718
  struct wpa_radio_work *pasn_auth_work;
1719
  unsigned int pasn_count;
1720
  struct pasn_auth *pasn_params;
1721
  bool urnm_mfpr_x20;
1722
  bool disable_urnm_mfpr;
1723
#ifdef CONFIG_P2P
1724
  struct wpa_radio_work *p2p_pasn_auth_work;
1725
#endif /* CONFIG_P2P */
1726
  struct wpa_radio_work *pr_pasn_auth_work;
1727
  struct wpa_radio_work *pr_roc_work;
1728
#endif /* CONFIG_PASN */
1729
1730
  bool is_6ghz_enabled;
1731
  bool crossed_6ghz_dom;
1732
  bool last_scan_all_chan;
1733
  bool last_scan_non_coloc_6ghz;
1734
  bool support_6ghz;
1735
  bool allow_p2p_assisted_dfs;
1736
  char device_country[3];
1737
  bool device_country_set;
1738
  bool assisted_dfs;
1739
1740
  bool dfs_ap_connected;
1741
  int sta_connected_freq;
1742
  enum chan_width sta_connected_chan_width;
1743
1744
  struct wpa_signal_info last_signal_info;
1745
1746
  struct wpa_ssid *ml_connect_probe_ssid;
1747
  struct wpa_bss *ml_connect_probe_bss;
1748
1749
#ifdef CONFIG_OWE
1750
  /* An array of frequencies to scan for OWE transition mode BSSs when
1751
   * owe_transition_search == 1 */
1752
  int *owe_trans_scan_freq;
1753
#endif /* CONFIG_OWE */
1754
1755
#ifdef CONFIG_NAN_USD
1756
  struct nan_de *nan_de;
1757
  struct wpa_radio_work *nan_usd_listen_work;
1758
  struct wpa_radio_work *nan_usd_tx_work;
1759
#endif /* CONFIG_NAN_USD */
1760
1761
  bool ssid_verified;
1762
  bool bigtk_set;
1763
  u64 first_beacon_tsf;
1764
  unsigned int beacons_checked;
1765
  unsigned int next_beacon_check;
1766
1767
  bool scs_reconfigure;
1768
  bool ext_auth_to_same_bss; /* Whether external authentication has been
1769
            * completed successfully with the BSS that
1770
            * we are already associated with, or an
1771
            * equivalent driver-indicated roam
1772
            * authentication status (EVENT_ROAM_STATUS)
1773
            * has been received for that BSS. */
1774
1775
  bool nan_mgmt;
1776
  bool nan_data;
1777
1778
#ifdef CONFIG_NAN
1779
#define MAX_NAN_RADIOS 2
1780
  struct nan_capa nan_capa;
1781
  struct nan_data *nan;
1782
  struct nan_cluster_config nan_cluster_config;
1783
  u8 schedule_sequence_id;
1784
  struct nan_schedule_config nan_sched[MAX_NAN_RADIOS];
1785
  u16 nan_supported_csids;
1786
  struct nan_schedule_update {
1787
    struct nan_schedule_config sched;
1788
    u8 map_id;
1789
  } nan_sched_update;
1790
  struct wpabuf *nan_ulw_attr;
1791
  struct wpa_freq_range_list nan_disallowed_freqs;
1792
  u16 nan_max_bw;
1793
  struct nan_channels nan_override_potential_avail;
1794
  unsigned int nan_ndi_ndp_refcount; /* Active NDP count on this NDI */
1795
  struct nan_gtk ndi_gtk;
1796
#ifdef CONFIG_TESTING_OPTIONS
1797
  bool nan_force_conditional_sched;
1798
#endif /* CONFIG_TESTING_OPTIONS */
1799
#endif /* CONFIG_NAN */
1800
#ifdef CONFIG_ENC_ASSOC
1801
  bool assoc_resp_encrypted; /* Whether (Re)Association Response frame
1802
            * is encrypted. */
1803
#endif /* CONFIG_ENC_ASSOC */
1804
#ifdef CONFIG_PMKSA_PRIVACY
1805
  u8 pmkid_snonce[NONCE_LEN];
1806
  bool pmkid_snonce_set;
1807
  u8 pmkid_anonce[NONCE_LEN];
1808
  bool pmkid_anonce_set;
1809
#endif /* CONFIG_PMKSA_PRIVACY */
1810
  u8 pd_addr[ETH_ALEN];
1811
1812
  /**
1813
   * pr_responder_mode - Waiting for PASN M1 as responder
1814
   *
1815
   * Set when ROC has been started on this interface to listen for an
1816
   * incoming PASN Auth1 frame. Cleared once the dedicated PR interface
1817
   * is created on M1 reception.
1818
   */
1819
  bool pr_responder_mode;
1820
1821
  /**
1822
   * pr_responder_src_addr - Source MAC address used for responder ROC
1823
   *
1824
   * Stored when responder mode is activated so that the dedicated PR
1825
   * interface can be created with the same address when M1 arrives.
1826
   */
1827
  u8 pr_responder_src_addr[ETH_ALEN];
1828
};
1829
1830
1831
/* wpa_supplicant.c */
1832
void wpa_supplicant_apply_ht_overrides(
1833
  struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
1834
  struct wpa_driver_associate_params *params);
1835
void wpa_supplicant_apply_vht_overrides(
1836
  struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
1837
  struct wpa_driver_associate_params *params);
1838
void wpa_supplicant_apply_he_overrides(
1839
  struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
1840
  struct wpa_driver_associate_params *params);
1841
void wpa_supplicant_apply_eht_overrides(
1842
  struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
1843
  struct wpa_driver_associate_params *params);
1844
void wpa_supplicant_apply_uhr_overrides(
1845
  struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
1846
  struct wpa_driver_associate_params *params);
1847
1848
int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
1849
int wpa_supplicant_set_wpa_none_key(struct wpa_supplicant *wpa_s,
1850
            struct wpa_ssid *ssid);
1851
1852
int wpa_supplicant_reload_configuration(struct wpa_supplicant *wpa_s);
1853
1854
const char * wpa_supplicant_state_txt(enum wpa_states state);
1855
int wpa_supplicant_update_mac_addr(struct wpa_supplicant *wpa_s);
1856
int wpa_supplicant_driver_init(struct wpa_supplicant *wpa_s);
1857
int wpa_supplicant_update_bridge_ifname(struct wpa_supplicant *wpa_s,
1858
          const char *bridge_ifname);
1859
int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
1860
            struct wpa_bss *bss, struct wpa_ssid *ssid,
1861
            u8 *wpa_ie, size_t *wpa_ie_len,
1862
            bool skip_default_rsne);
1863
int wpas_restore_permanent_mac_addr(struct wpa_supplicant *wpa_s);
1864
void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
1865
            struct wpa_bss *bss,
1866
            struct wpa_ssid *ssid);
1867
void wpa_supplicant_set_non_wpa_policy(struct wpa_supplicant *wpa_s,
1868
               struct wpa_ssid *ssid);
1869
void wpa_supplicant_initiate_eapol(struct wpa_supplicant *wpa_s);
1870
void wpa_clear_keys(struct wpa_supplicant *wpa_s, const u8 *addr);
1871
void wpa_supplicant_req_auth_timeout(struct wpa_supplicant *wpa_s,
1872
             int sec, int usec);
1873
void wpas_auth_timeout_restart(struct wpa_supplicant *wpa_s, int sec_diff);
1874
void wpa_supplicant_reinit_autoscan(struct wpa_supplicant *wpa_s);
1875
void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
1876
            enum wpa_states state);
1877
struct wpa_ssid * wpa_supplicant_get_ssid(struct wpa_supplicant *wpa_s);
1878
const char * wpa_supplicant_get_eap_mode(struct wpa_supplicant *wpa_s);
1879
void wpa_supplicant_cancel_auth_timeout(struct wpa_supplicant *wpa_s);
1880
void wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s,
1881
           u16 reason_code);
1882
void wpa_supplicant_reconnect(struct wpa_supplicant *wpa_s);
1883
1884
struct wpa_ssid * wpa_supplicant_add_network(struct wpa_supplicant *wpa_s);
1885
int wpa_supplicant_remove_network(struct wpa_supplicant *wpa_s, int id);
1886
int wpa_supplicant_remove_all_networks(struct wpa_supplicant *wpa_s);
1887
void wpa_supplicant_enable_network(struct wpa_supplicant *wpa_s,
1888
           struct wpa_ssid *ssid);
1889
void wpa_supplicant_disable_network(struct wpa_supplicant *wpa_s,
1890
            struct wpa_ssid *ssid);
1891
void wpa_supplicant_select_network(struct wpa_supplicant *wpa_s,
1892
           struct wpa_ssid *ssid);
1893
int wpas_remove_cred(struct wpa_supplicant *wpa_s, struct wpa_cred *cred);
1894
int wpas_remove_all_creds(struct wpa_supplicant *wpa_s);
1895
int wpas_set_pkcs11_engine_and_module_path(struct wpa_supplicant *wpa_s,
1896
             const char *pkcs11_engine_path,
1897
             const char *pkcs11_module_path);
1898
int wpa_supplicant_set_ap_scan(struct wpa_supplicant *wpa_s,
1899
             int ap_scan);
1900
int wpa_supplicant_set_bss_expiration_age(struct wpa_supplicant *wpa_s,
1901
            unsigned int expire_age);
1902
int wpa_supplicant_set_bss_expiration_count(struct wpa_supplicant *wpa_s,
1903
              unsigned int expire_count);
1904
int wpa_supplicant_set_scan_interval(struct wpa_supplicant *wpa_s,
1905
             int scan_interval);
1906
int wpa_supplicant_set_debug_params(struct wpa_global *global,
1907
            int debug_level, int debug_timestamp,
1908
            int debug_show_keys);
1909
void free_hw_features(struct wpa_supplicant *wpa_s);
1910
1911
void wpa_show_license(void);
1912
1913
struct wpa_interface * wpa_supplicant_match_iface(struct wpa_global *global,
1914
              const char *ifname);
1915
struct wpa_supplicant * wpa_supplicant_add_iface(struct wpa_global *global,
1916
             struct wpa_interface *iface,
1917
             struct wpa_supplicant *parent);
1918
int wpa_supplicant_remove_iface(struct wpa_global *global,
1919
        struct wpa_supplicant *wpa_s,
1920
        int terminate);
1921
struct wpa_supplicant * wpa_supplicant_get_iface(struct wpa_global *global,
1922
             const char *ifname);
1923
struct wpa_global * wpa_supplicant_init(struct wpa_params *params);
1924
int wpa_supplicant_run(struct wpa_global *global);
1925
void wpa_supplicant_deinit(struct wpa_global *global);
1926
int wpa_supplicant_parse_config(const char *fname);
1927
1928
int wpa_supplicant_scard_init(struct wpa_supplicant *wpa_s,
1929
            struct wpa_ssid *ssid);
1930
void wpa_supplicant_terminate_proc(struct wpa_global *global);
1931
void wpa_supplicant_rx_eapol(void *ctx, const u8 *own_addr,
1932
           const u8 *buf, size_t len,
1933
           enum frame_encryption encrypted);
1934
void wpa_supplicant_update_config(struct wpa_supplicant *wpa_s);
1935
void wpa_supplicant_clear_status(struct wpa_supplicant *wpa_s);
1936
void wpas_connection_failed(struct wpa_supplicant *wpa_s, const u8 *bssid,
1937
          const u8 **link_bssids);
1938
void fils_connection_failure(struct wpa_supplicant *wpa_s);
1939
void fils_pmksa_cache_flush(struct wpa_supplicant *wpa_s);
1940
int wpas_driver_bss_selection(struct wpa_supplicant *wpa_s);
1941
bool wpas_rsn_overriding(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
1942
int wpas_is_p2p_prioritized(struct wpa_supplicant *wpa_s);
1943
void wpas_auth_failed(struct wpa_supplicant *wpa_s, const char *reason,
1944
          const u8 *bssid);
1945
void wpas_clear_temp_disabled(struct wpa_supplicant *wpa_s,
1946
            struct wpa_ssid *ssid, int clear_failures);
1947
int disallowed_bssid(struct wpa_supplicant *wpa_s, const u8 *bssid);
1948
int disallowed_ssid(struct wpa_supplicant *wpa_s, const u8 *ssid,
1949
        size_t ssid_len);
1950
void wpas_request_connection(struct wpa_supplicant *wpa_s);
1951
void wpas_request_disconnection(struct wpa_supplicant *wpa_s);
1952
int wpas_build_ext_capab(struct wpa_supplicant *wpa_s, u8 *buf, size_t buflen,
1953
       struct wpa_bss *bss);
1954
int wpas_populate_wfa_capa(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
1955
         u8 *wpa_ie, size_t wpa_ie_len,
1956
         size_t max_wpa_ie_len);
1957
int wpas_update_random_addr(struct wpa_supplicant *wpa_s,
1958
          enum wpas_mac_addr_style style,
1959
          struct wpa_ssid *ssid);
1960
int wpas_update_random_addr_disassoc(struct wpa_supplicant *wpa_s);
1961
1962
int wpas_get_op_chan_phy(int freq, const u8 *ies, size_t ies_len,
1963
       u8 *op_class, u8 *chan, u8 *phy_type);
1964
1965
int wpas_twt_send_setup(struct wpa_supplicant *wpa_s, u8 dtok, int exponent,
1966
      int mantissa, u8 min_twt, int setup_cmd, u64 twt,
1967
      bool requestor, bool trigger, bool implicit,
1968
      bool flow_type, u8 flow_id, bool protection,
1969
      u8 twt_channel, u8 control);
1970
int wpas_twt_send_teardown(struct wpa_supplicant *wpa_s, u8 flags);
1971
1972
void wpas_rrm_reset(struct wpa_supplicant *wpa_s);
1973
void wpas_rrm_process_neighbor_rep(struct wpa_supplicant *wpa_s,
1974
           const u8 *da, const u8 *sa,
1975
           const u8 *report, size_t report_len);
1976
int wpas_rrm_send_neighbor_rep_request(struct wpa_supplicant *wpa_s,
1977
               const struct wpa_ssid_value *ssid,
1978
               int lci, int civic,
1979
               void (*cb)(void *ctx,
1980
              struct wpabuf *neighbor_rep),
1981
               void *cb_ctx);
1982
void wpas_rrm_handle_radio_measurement_request(struct wpa_supplicant *wpa_s,
1983
                 const u8 *src, const u8 *dst,
1984
                 const u8 *frame, size_t len);
1985
void wpas_rrm_handle_link_measurement_request(struct wpa_supplicant *wpa_s,
1986
                const u8 *src,
1987
                const u8 *frame, size_t len,
1988
                int rssi);
1989
void wpas_rrm_refuse_request(struct wpa_supplicant *wpa_s);
1990
int wpas_beacon_rep_scan_process(struct wpa_supplicant *wpa_s,
1991
         struct wpa_scan_results *scan_res,
1992
         struct scan_info *info);
1993
void wpas_clear_beacon_rep_data(struct wpa_supplicant *wpa_s);
1994
void wpas_flush_fils_hlp_req(struct wpa_supplicant *wpa_s);
1995
void wpas_clear_disabled_interface(void *eloop_ctx, void *timeout_ctx);
1996
void wpa_supplicant_reset_bgscan(struct wpa_supplicant *wpa_s);
1997
1998
1999
/* MBO functions */
2000
int wpas_mbo_ie(struct wpa_supplicant *wpa_s, u8 *buf, size_t len,
2001
    int add_oce_capa);
2002
const u8 * mbo_attr_from_mbo_ie(const u8 *mbo_ie, enum mbo_attr_id attr);
2003
const u8 * wpas_mbo_check_assoc_disallow(struct wpa_bss *bss);
2004
void wpas_mbo_check_pmf(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
2005
      struct wpa_ssid *ssid);
2006
const u8 * mbo_get_attr_from_ies(const u8 *ies, size_t ies_len,
2007
         enum mbo_attr_id attr);
2008
int wpas_mbo_update_non_pref_chan(struct wpa_supplicant *wpa_s,
2009
          const char *non_pref_chan);
2010
void wpas_mbo_scan_ie(struct wpa_supplicant *wpa_s, struct wpabuf *ie);
2011
void wpas_mbo_ie_trans_req(struct wpa_supplicant *wpa_s, const u8 *ie,
2012
         size_t len);
2013
size_t wpas_mbo_ie_bss_trans_reject(struct wpa_supplicant *wpa_s, u8 *pos,
2014
            size_t len,
2015
            enum mbo_transition_reject_reason reason);
2016
void wpas_mbo_update_cell_capa(struct wpa_supplicant *wpa_s, u8 mbo_cell_capa);
2017
struct wpabuf * mbo_build_anqp_buf(struct wpa_supplicant *wpa_s,
2018
           struct wpa_bss *bss, u32 mbo_subtypes);
2019
void mbo_parse_rx_anqp_resp(struct wpa_supplicant *wpa_s,
2020
          struct wpa_bss *bss, const u8 *sa,
2021
          const u8 *data, size_t slen);
2022
void wpas_update_mbo_connect_params(struct wpa_supplicant *wpa_s);
2023
2024
/* op_classes.c */
2025
enum chan_allowed {
2026
  NOT_ALLOWED, NO_IR, RADAR, ALLOWED
2027
};
2028
2029
enum chan_allowed verify_channel(struct hostapd_hw_modes *mode, u8 op_class,
2030
         u8 channel, u8 bw);
2031
size_t wpas_supp_op_class_ie(struct wpa_supplicant *wpa_s,
2032
           struct wpa_ssid *ssid,
2033
           struct wpa_bss *bss, u8 *pos, size_t len);
2034
int * wpas_supp_op_classes(struct wpa_supplicant *wpa_s);
2035
2036
int wpas_enable_mac_addr_randomization(struct wpa_supplicant *wpa_s,
2037
               unsigned int type, const u8 *addr,
2038
               const u8 *mask);
2039
int wpas_disable_mac_addr_randomization(struct wpa_supplicant *wpa_s,
2040
          unsigned int type);
2041
2042
/**
2043
 * wpa_supplicant_ctrl_iface_ctrl_rsp_handle - Handle a control response
2044
 * @wpa_s: Pointer to wpa_supplicant data
2045
 * @ssid: Pointer to the network block the reply is for
2046
 * @field: field the response is a reply for
2047
 * @value: value (ie, password, etc) for @field
2048
 * Returns: 0 on success, non-zero on error
2049
 *
2050
 * Helper function to handle replies to control interface requests.
2051
 */
2052
int wpa_supplicant_ctrl_iface_ctrl_rsp_handle(struct wpa_supplicant *wpa_s,
2053
                struct wpa_ssid *ssid,
2054
                const char *field,
2055
                const char *value);
2056
2057
void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
2058
        const struct wpa_ssid *ssid,
2059
        struct hostapd_freq_params *freq);
2060
2061
/* events.c */
2062
void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s);
2063
int wpa_supplicant_connect(struct wpa_supplicant *wpa_s,
2064
         struct wpa_bss *selected,
2065
         struct wpa_ssid *ssid);
2066
void wpa_supplicant_stop_countermeasures(void *eloop_ctx, void *sock_ctx);
2067
void wpa_supplicant_delayed_mic_error_report(void *eloop_ctx, void *sock_ctx);
2068
void wnm_bss_keep_alive_deinit(struct wpa_supplicant *wpa_s);
2069
int wpa_supplicant_fast_associate(struct wpa_supplicant *wpa_s);
2070
int wpa_wps_supplicant_fast_associate(struct wpa_supplicant *wpa_s);
2071
struct wpa_bss * wpa_supplicant_pick_network(struct wpa_supplicant *wpa_s,
2072
               struct wpa_ssid **selected_ssid,
2073
               bool clear_ignorelist);
2074
int wpas_temp_disabled(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
2075
void wpa_supplicant_update_channel_list(struct wpa_supplicant *wpa_s,
2076
          struct channel_list_changed *info);
2077
int wpa_supplicant_need_to_roam_within_ess(struct wpa_supplicant *wpa_s,
2078
             struct wpa_bss *current_bss,
2079
             struct wpa_bss *selected,
2080
             bool poll_current);
2081
void wpas_reset_mlo_info(struct wpa_supplicant *wpa_s);
2082
2083
/* eap_register.c */
2084
int eap_register_methods(void);
2085
2086
/**
2087
 * Utility method to tell if a given network is for persistent group storage
2088
 * @ssid: Network object
2089
 * Returns: 1 if network is a persistent group, 0 otherwise
2090
 */
2091
static inline int network_is_persistent_group(struct wpa_ssid *ssid)
2092
0
{
2093
0
  return ssid->disabled == 2 && ssid->p2p_persistent_group;
2094
0
}
Unexecuted instantiation: bss.c:network_is_persistent_group
Unexecuted instantiation: bssid_ignore.c:network_is_persistent_group
Unexecuted instantiation: eap_register.c:network_is_persistent_group
Unexecuted instantiation: events.c:network_is_persistent_group
Unexecuted instantiation: gas_query.c:network_is_persistent_group
Unexecuted instantiation: hs20_supplicant.c:network_is_persistent_group
Unexecuted instantiation: interworking.c:network_is_persistent_group
Unexecuted instantiation: mbo.c:network_is_persistent_group
Unexecuted instantiation: notify.c:network_is_persistent_group
Unexecuted instantiation: offchannel.c:network_is_persistent_group
Unexecuted instantiation: op_classes.c:network_is_persistent_group
Unexecuted instantiation: robust_av.c:network_is_persistent_group
Unexecuted instantiation: rrm.c:network_is_persistent_group
Unexecuted instantiation: scan.c:network_is_persistent_group
Unexecuted instantiation: wmm_ac.c:network_is_persistent_group
Unexecuted instantiation: wnm_sta.c:network_is_persistent_group
Unexecuted instantiation: wpas_glue.c:network_is_persistent_group
Unexecuted instantiation: wpa_supplicant.c:network_is_persistent_group
Unexecuted instantiation: wps_supplicant.c:network_is_persistent_group
Unexecuted instantiation: scan-res.c:network_is_persistent_group
2095
2096
2097
static inline int wpas_mode_to_ieee80211_mode(enum wpas_mode mode)
2098
0
{
2099
0
  switch (mode) {
2100
0
  default:
2101
0
  case WPAS_MODE_INFRA:
2102
0
    return IEEE80211_MODE_INFRA;
2103
0
  case WPAS_MODE_IBSS:
2104
0
    return IEEE80211_MODE_IBSS;
2105
0
  case WPAS_MODE_AP:
2106
0
  case WPAS_MODE_P2P_GO:
2107
0
  case WPAS_MODE_P2P_GROUP_FORMATION:
2108
0
    return IEEE80211_MODE_AP;
2109
0
  case WPAS_MODE_MESH:
2110
0
    return IEEE80211_MODE_MESH;
2111
0
  }
2112
0
}
Unexecuted instantiation: bss.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: bssid_ignore.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: eap_register.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: events.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: gas_query.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: hs20_supplicant.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: interworking.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: mbo.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: notify.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: offchannel.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: op_classes.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: robust_av.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: rrm.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: scan.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: wmm_ac.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: wnm_sta.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: wpas_glue.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: wpa_supplicant.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: wps_supplicant.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: scan-res.c:wpas_mode_to_ieee80211_mode
2113
2114
2115
int wpas_network_disabled(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
2116
int wpas_get_ssid_pmf(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
2117
bool sec_prof_list_has_sae(const int *numbers);
2118
enum sae_pwe wpas_get_ssid_sae_pwe(struct wpa_supplicant *wpa_s,
2119
           struct wpa_ssid *ssid);
2120
int pmf_in_use(struct wpa_supplicant *wpa_s, const u8 *addr);
2121
void wpa_s_setup_sae_pt(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
2122
      bool force);
2123
void wpa_s_clear_sae_rejected(struct wpa_supplicant *wpa_s);
2124
2125
bool wpas_is_sae_avoided(struct wpa_supplicant *wpa_s,
2126
      struct wpa_ssid *ssid,
2127
      const struct wpa_ie_data *ie);
2128
2129
int wpas_init_ext_pw(struct wpa_supplicant *wpa_s);
2130
2131
void dump_freq_data(struct wpa_supplicant *wpa_s, const char *title,
2132
        struct wpa_used_freq_data *freqs_data,
2133
        unsigned int len);
2134
2135
int get_shared_radio_freqs_data(struct wpa_supplicant *wpa_s,
2136
        struct wpa_used_freq_data *freqs_data,
2137
        unsigned int len, bool exclude_current);
2138
int get_shared_radio_freqs(struct wpa_supplicant *wpa_s,
2139
         int *freq_array, unsigned int len,
2140
         bool exclude_current);
2141
int disabled_freq(struct wpa_supplicant *wpa_s, int freq);
2142
2143
void wpas_network_reenabled(void *eloop_ctx, void *timeout_ctx);
2144
2145
void wpas_vendor_elem_update(struct wpa_supplicant *wpa_s);
2146
struct wpa_supplicant * wpas_vendor_elem(struct wpa_supplicant *wpa_s,
2147
           enum wpa_vendor_elem_frame frame);
2148
int wpas_vendor_elem_remove(struct wpa_supplicant *wpa_s, int frame,
2149
          const u8 *elem, size_t len);
2150
2151
#ifdef CONFIG_FST
2152
2153
struct fst_wpa_obj;
2154
2155
void fst_wpa_supplicant_fill_iface_obj(struct wpa_supplicant *wpa_s,
2156
               struct fst_wpa_obj *iface_obj);
2157
2158
#endif /* CONFIG_FST */
2159
2160
int wpas_sched_scan_plans_set(struct wpa_supplicant *wpa_s, const char *cmd);
2161
2162
struct hostapd_hw_modes * get_mode(struct hostapd_hw_modes *modes,
2163
           u16 num_modes, enum hostapd_hw_mode mode,
2164
           bool is_6ghz);
2165
struct hostapd_hw_modes * get_mode_with_freq(struct hostapd_hw_modes *modes,
2166
               u16 num_modes, int freq);
2167
2168
void wpa_bss_tmp_disallow(struct wpa_supplicant *wpa_s, const u8 *bssid,
2169
        unsigned int sec, int rssi_threshold);
2170
int wpa_is_bss_tmp_disallowed(struct wpa_supplicant *wpa_s,
2171
            struct wpa_bss *bss);
2172
void free_bss_tmp_disallowed(struct wpa_supplicant *wpa_s);
2173
2174
struct wpa_ssid * wpa_scan_res_match(struct wpa_supplicant *wpa_s,
2175
             int i, struct wpa_bss *bss,
2176
             struct wpa_ssid *group,
2177
             int only_first_ssid, int debug_print,
2178
             bool link);
2179
2180
struct wpa_bss * wpa_supplicant_select_bss(struct wpa_supplicant *wpa_s,
2181
             struct wpa_ssid *group,
2182
             struct wpa_ssid **selected_ssid,
2183
             int only_first_ssid);
2184
2185
int wpas_ctrl_iface_get_pref_freq_list_override(struct wpa_supplicant *wpa_s,
2186
            enum wpa_driver_if_type if_type,
2187
            unsigned int *num,
2188
            struct weighted_pcl *freq_list);
2189
2190
int wpa_is_fils_supported(struct wpa_supplicant *wpa_s);
2191
int wpa_is_fils_sk_pfs_supported(struct wpa_supplicant *wpa_s);
2192
2193
void wpas_clear_driver_signal_override(struct wpa_supplicant *wpa_s);
2194
2195
int wpas_send_mscs_req(struct wpa_supplicant *wpa_s);
2196
void wpas_populate_mscs_descriptor_ie(struct robust_av_data *robust_av,
2197
              struct wpabuf *buf);
2198
void wpas_handle_robust_av_recv_action(struct wpa_supplicant *wpa_s,
2199
               const u8 *dst, const u8 *src,
2200
               const u8 *buf, size_t len);
2201
void wpas_handle_assoc_resp_mscs(struct wpa_supplicant *wpa_s, const u8 *bssid,
2202
         const u8 *ies, size_t ies_len);
2203
int wpas_send_scs_req(struct wpa_supplicant *wpa_s);
2204
int wpas_scs_reconfigure(struct wpa_supplicant *wpa_s);
2205
void free_up_tclas_elem(struct scs_desc_elem *elem);
2206
void free_up_scs_desc(struct scs_robust_av_data *data);
2207
void wpas_handle_robust_av_scs_recv_action(struct wpa_supplicant *wpa_s,
2208
             const u8 *dst, const u8 *src,
2209
             const u8 *buf, size_t len);
2210
void wpas_scs_deinit(struct wpa_supplicant *wpa_s);
2211
void wpas_handle_qos_mgmt_recv_action(struct wpa_supplicant *wpa_s,
2212
              const u8 *dst, const u8 *src,
2213
              const u8 *buf, size_t len);
2214
void wpas_dscp_deinit(struct wpa_supplicant *wpa_s);
2215
int wpas_send_dscp_response(struct wpa_supplicant *wpa_s,
2216
          struct dscp_resp_data *resp_data);
2217
void wpas_handle_assoc_resp_qos_mgmt(struct wpa_supplicant *wpa_s,
2218
             const u8 *ies, size_t ies_len);
2219
int wpas_send_dscp_query(struct wpa_supplicant *wpa_s, const char *domain_name,
2220
       size_t domain_name_length);
2221
2222
int wpas_pasn_auth_start(struct wpa_supplicant *wpa_s, const u8 *own_addr,
2223
       const u8 *bssid, int akmp, int cipher,
2224
       u16 group, int network_id,
2225
       const u8 *comeback, size_t comeback_len,
2226
       unsigned int auth_alg, int group_cipher,
2227
       int group_mgmt_cipher, u16 rsn_capab,
2228
       const u8 *rsnxe_data, bool is_ml_peer);
2229
void wpas_pasn_auth_stop(struct wpa_supplicant *wpa_s);
2230
void wpas_pasn_free_params(struct wpa_supplicant *wpa_s);
2231
int wpas_pasn_auth_tx_status(struct wpa_supplicant *wpa_s,
2232
           const u8 *data, size_t data_len, u8 acked);
2233
int wpas_pasn_auth_rx(struct wpa_supplicant *wpa_s,
2234
          const struct ieee80211_mgmt *mgmt, size_t len);
2235
int wpas_pasn_get_group(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
2236
      struct pasn_data *pasn);
2237
2238
int wpas_pasn_deauthenticate(struct wpa_supplicant *wpa_s, const u8 *own_addr,
2239
           const u8 *bssid);
2240
void wpas_pasn_auth_trigger(struct wpa_supplicant *wpa_s,
2241
          struct pasn_auth *pasn_auth);
2242
void wpas_pasn_auth_work_done(struct wpa_supplicant *wpa_s, int status);
2243
struct sae_pt * wpas_pasn_sae_derive_pt_for_eppke(struct wpa_ssid *ssid,
2244
              int group);
2245
bool wpas_is_6ghz_supported(struct wpa_supplicant *wpa_s, bool only_enabled);
2246
2247
bool wpa_is_non_eht_scs_traffic_desc_supported(struct wpa_bss *bss);
2248
bool wpas_ap_link_address(struct wpa_supplicant *wpa_s, const u8 *addr);
2249
bool wpas_ap_supports_rsn_overriding(struct wpa_supplicant *wpa_s,
2250
             struct wpa_bss *bss);
2251
bool wpas_ap_supports_rsn_overriding_2(struct wpa_supplicant *wpa_s,
2252
               struct wpa_bss *bss);
2253
int wpas_get_owe_trans_network(const u8 *owe_ie, const u8 **bssid,
2254
             const u8 **ssid, size_t *ssid_len);
2255
void wpas_update_dfs_ap_info(struct wpa_supplicant *wpa_s, int freq,
2256
           enum chan_width ap_ch_width,
2257
           bool disconnect_evt);
2258
void wpas_configure_frame_filters(struct wpa_supplicant *wpa_s);
2259
2260
static inline bool wpas_is_nan_iface(struct wpa_supplicant *wpa_s)
2261
0
{
2262
#ifdef CONFIG_NAN
2263
  return wpa_s->nan_mgmt || wpa_s->nan_data;
2264
#else /* CONFIG_NAN */
2265
  return false;
2266
0
#endif /* CONFIG_NAN */
2267
0
}
Unexecuted instantiation: bss.c:wpas_is_nan_iface
Unexecuted instantiation: bssid_ignore.c:wpas_is_nan_iface
Unexecuted instantiation: eap_register.c:wpas_is_nan_iface
Unexecuted instantiation: events.c:wpas_is_nan_iface
Unexecuted instantiation: gas_query.c:wpas_is_nan_iface
Unexecuted instantiation: hs20_supplicant.c:wpas_is_nan_iface
Unexecuted instantiation: interworking.c:wpas_is_nan_iface
Unexecuted instantiation: mbo.c:wpas_is_nan_iface
Unexecuted instantiation: notify.c:wpas_is_nan_iface
Unexecuted instantiation: offchannel.c:wpas_is_nan_iface
Unexecuted instantiation: op_classes.c:wpas_is_nan_iface
Unexecuted instantiation: robust_av.c:wpas_is_nan_iface
Unexecuted instantiation: rrm.c:wpas_is_nan_iface
Unexecuted instantiation: scan.c:wpas_is_nan_iface
Unexecuted instantiation: wmm_ac.c:wpas_is_nan_iface
Unexecuted instantiation: wnm_sta.c:wpas_is_nan_iface
Unexecuted instantiation: wpas_glue.c:wpas_is_nan_iface
Unexecuted instantiation: wpa_supplicant.c:wpas_is_nan_iface
Unexecuted instantiation: wps_supplicant.c:wpas_is_nan_iface
Unexecuted instantiation: scan-res.c:wpas_is_nan_iface
2268
2269
bool wpas_eppke_ap_capable(struct wpa_supplicant *wpa_s,
2270
         struct wpa_bss *bss, bool unauth_eppke);
2271
bool wpas_eppke_ap_rsnx_capab(struct wpa_supplicant *wpa_s,
2272
            struct wpa_bss *bss, unsigned int capab);
2273
2274
bool wpas_security_profile_active(struct wpa_supplicant *wpa_s);
2275
2276
/*
2277
 * Security Profile element helper functions (wpa_supplicant.c).
2278
 * Used by both wpa_supplicant_set_suites() and BSS selection
2279
 * (wpa_supplicant_ssid_bss_match() in events.c).
2280
 */
2281
const struct security_profile_entry *
2282
security_profile_select_best(const u8 *sp, const int *numbers);
2283
int security_profile_get_key_mgmt(const u8 *sp, int ssid_key_mgmt);
2284
const u8 * security_profile_get_rsnx(const u8 *sp, size_t *rsnx_len);
2285
int security_profile_get_rsn_caps(const u8 *sp);
2286
bool sec_prof_list_has_eap_over_auth(const int *numbers);
2287
2288
#endif /* WPA_SUPPLICANT_I_H */