Coverage Report

Created: 2026-10-16 06:12

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: bssid_ignore.c:external_scan_running
Unexecuted instantiation: bss.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: 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: wpa_supplicant.c:external_scan_running
Unexecuted instantiation: wpas_glue.c:external_scan_running
Unexecuted instantiation: wnm.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
 * @eap_success: Whether EAP authentication was successful
729
 */
730
struct auth_802_1x_data {
731
  u16 auth_trans;
732
  u16 status;
733
  bool derive_ptk;
734
  bool pmksa_caching;
735
  bool pmkid_found;
736
  u8 pmkid[PMKID_LEN];
737
  u8 snonce[WPA_NONCE_LEN];
738
  u8 anonce[WPA_NONCE_LEN];
739
  u16 dh_group;
740
  struct crypto_ecdh *ecdh;
741
  struct wpabuf *dhss;
742
  u8 rsne[257];
743
  size_t rsne_len;
744
  u8 rsnxe[257];
745
  size_t rsnxe_len;
746
747
  bool eap_success;
748
749
#ifdef CONFIG_PQC
750
  const struct ieee80211_pqc_profile *pqc_profile;
751
  struct crypto_ml_kem *ml_kem;
752
  struct wpabuf *ml_kem_ss;
753
  struct crypto_hash *transcript;
754
  u16 last_stored_auth_transaction;
755
#endif /* CONFIG_PQC */
756
};
757
#endif /* CONFIG_IEEE8021X_AUTH */
758
759
/**
760
 * struct wpa_supplicant - Internal data for wpa_supplicant interface
761
 *
762
 * This structure contains the internal data for core wpa_supplicant code. This
763
 * should be only used directly from the core code. However, a pointer to this
764
 * data is used from other files as an arbitrary context pointer in calls to
765
 * core functions.
766
 */
767
struct wpa_supplicant {
768
  struct wpa_global *global;
769
  struct wpa_radio *radio; /* shared radio context */
770
  struct dl_list radio_list; /* list head: struct wpa_radio::ifaces */
771
  struct wpa_supplicant *parent;
772
  struct wpa_supplicant *p2pdev;
773
  struct wpa_supplicant *next;
774
  struct l2_packet_data *l2;
775
  struct l2_packet_data *l2_br;
776
  struct os_reltime roam_start;
777
  struct os_reltime roam_time;
778
  struct os_reltime session_start;
779
  struct os_reltime session_length;
780
  unsigned char own_addr[ETH_ALEN];
781
  unsigned char perm_addr[ETH_ALEN];
782
  char ifname[100];
783
  u8 hw_dfs_domain;
784
#ifdef CONFIG_MATCH_IFACE
785
  int matched;
786
#endif /* CONFIG_MATCH_IFACE */
787
#ifdef CONFIG_CTRL_IFACE_DBUS_NEW
788
  char *dbus_new_path;
789
  char *dbus_groupobj_path;
790
#ifdef CONFIG_AP
791
  char *preq_notify_peer;
792
#endif /* CONFIG_AP */
793
#endif /* CONFIG_CTRL_IFACE_DBUS_NEW */
794
#ifdef CONFIG_CTRL_IFACE_BINDER
795
  const void *binder_object_key;
796
#endif /* CONFIG_CTRL_IFACE_BINDER */
797
  char bridge_ifname[16];
798
799
  char *confname;
800
  char *confanother;
801
802
  struct wpa_config *conf;
803
  int countermeasures;
804
  struct os_reltime last_michael_mic_error;
805
  u8 bssid[ETH_ALEN];
806
  u8 pending_bssid[ETH_ALEN]; /* If wpa_state == WPA_ASSOCIATING, this
807
             * field contains the target BSSID. */
808
  int reassociate; /* reassociation requested */
809
  bool roam_in_progress; /* roam in progress */
810
  unsigned int reassoc_same_bss:1; /* reassociating to the same BSS */
811
  unsigned int reassoc_same_ess:1; /* reassociating to the same ESS */
812
  int disconnected; /* all connections disabled; i.e., do no reassociate
813
         * before this has been cleared */
814
  struct wpa_ssid *current_ssid;
815
  struct wpa_ssid *last_ssid;
816
  struct wpa_bss *current_bss;
817
  int ap_ies_from_associnfo;
818
  unsigned int assoc_freq;
819
  u8 ap_mld_addr[ETH_ALEN];
820
  u8 mlo_assoc_link_id;
821
  u16 valid_links; /* bitmap of valid MLO link IDs */
822
  struct {
823
    u8 addr[ETH_ALEN];
824
    u8 bssid[ETH_ALEN];
825
    unsigned int freq;
826
    struct wpa_bss *bss;
827
    bool disabled;
828
    struct wpabuf *ies;
829
    unsigned int max_nss_rx:4;
830
    unsigned int max_nss_tx:4;
831
    enum chan_width channel_bandwidth;
832
  } links[MAX_NUM_MLD_LINKS];
833
  u8 *last_con_fail_realm;
834
  size_t last_con_fail_realm_len;
835
  bool sta_roaming_disabled;
836
837
  /* Selected configuration (based on Beacon/ProbeResp WPA IE) */
838
  int pairwise_cipher;
839
  int deny_ptk0_rekey;
840
  int group_cipher;
841
  int key_mgmt;
842
  int wpa_proto;
843
  int mgmt_group_cipher;
844
  /*
845
   * Allowed key management suites for roaming/initial connection
846
   * when the driver's SME is in use.
847
   */
848
  int allowed_key_mgmts;
849
850
  void *drv_priv; /* private data used by driver_ops */
851
  void *global_drv_priv;
852
853
  u8 *bssid_filter;
854
  size_t bssid_filter_count;
855
856
  u8 *disallow_aps_bssid;
857
  size_t disallow_aps_bssid_count;
858
  struct wpa_ssid_value *disallow_aps_ssid;
859
  size_t disallow_aps_ssid_count;
860
861
  u32 setband_mask;
862
863
  /* Preferred network for the next connection attempt */
864
  struct wpa_ssid *next_ssid;
865
866
  /* previous scan was wildcard when interleaving between
867
   * wildcard scans and specific SSID scan when max_ssids=1 */
868
  int prev_scan_wildcard;
869
  struct wpa_ssid *prev_scan_ssid; /* previously scanned SSID;
870
            * NULL = not yet initialized (start
871
            * with wildcard SSID)
872
            * WILDCARD_SSID_SCAN = wildcard
873
            * SSID was used in the previous scan
874
            */
875
0
#define WILDCARD_SSID_SCAN ((struct wpa_ssid *) 1)
876
877
  struct wpa_ssid *prev_sched_ssid; /* last SSID used in sched scan */
878
  int sched_scan_timeout;
879
  int first_sched_scan;
880
  int sched_scan_timed_out;
881
  struct sched_scan_plan *sched_scan_plans;
882
  size_t sched_scan_plans_num;
883
884
  void (*scan_res_handler)(struct wpa_supplicant *wpa_s,
885
         struct wpa_scan_results *scan_res);
886
  void (*scan_res_fail_handler)(struct wpa_supplicant *wpa_s);
887
  struct dl_list bss; /* struct wpa_bss::list */
888
  struct dl_list bss_id; /* struct wpa_bss::list_id */
889
  size_t num_bss;
890
  unsigned int bss_update_idx;
891
  unsigned int bss_next_id;
892
893
   /*
894
    * Pointers to BSS entries in the order they were in the last scan
895
    * results.
896
    */
897
  struct wpa_bss **last_scan_res;
898
  size_t last_scan_res_used;
899
  size_t last_scan_res_size;
900
  struct os_reltime last_scan;
901
  bool last_scan_external;
902
  struct last_scan_ssid last_scan_ssids[WPAS_MAX_SCAN_SSIDS];
903
  size_t last_scan_num_ssids;
904
905
  const struct wpa_driver_ops *driver;
906
  int interface_removed; /* whether the network interface has been
907
        * removed */
908
  struct wpa_sm *wpa;
909
  struct ptksa_cache *ptksa;
910
911
  struct eapol_sm *eapol;
912
913
  struct ctrl_iface_priv *ctrl_iface;
914
915
  enum wpa_states wpa_state;
916
  struct wpa_radio_work *scan_work;
917
  int scanning;
918
  int sched_scanning;
919
  unsigned int sched_scan_stop_req:1;
920
  int new_connection;
921
922
  int eapol_received; /* number of EAPOL packets received after the
923
           * previous association event */
924
925
  u8 rsnxe[257];
926
  size_t rsnxe_len;
927
928
  /*
929
   * Security Profile element information
930
   *
931
   * sel_security_profile: Profile chosen from the
932
   *   intersection of the AP's Security Profile Bitmap and the STA's
933
   *   supported profiles. NULL means no profile selected (feature
934
   *   inactive).
935
   *
936
   * security_profile / security_profile_len: Pre-built Security
937
   *   Profile element for the selected profile, built once in
938
   *   wpa_supplicant_set_suites() after the RSNE and RSNXE are
939
   *   finalised. Appended to Authentication and (Re)Association Request
940
   *   frames by sme_send_authentication() and sme_associate(),
941
   *   respectively.
942
   */
943
  const struct security_profile_entry *sel_security_profile;
944
  u8 security_profile[32];
945
  size_t security_profile_len;
946
947
  struct scard_data *scard;
948
  char imsi[20];
949
  int mnc_len;
950
951
  unsigned char last_eapol_src[ETH_ALEN];
952
953
  unsigned int keys_cleared; /* bitfield of key indexes that the driver is
954
            * known not to be configured with a key */
955
956
  struct wpa_bssid_ignore *bssid_ignore;
957
958
  /* Number of connection failures since last successful connection */
959
  unsigned int consecutive_conn_failures;
960
961
  /**
962
   * scan_req - Type of the scan request
963
   */
964
  enum scan_req_type {
965
    /**
966
     * NORMAL_SCAN_REQ - Normal scan request
967
     *
968
     * This is used for scans initiated by wpa_supplicant to find an
969
     * AP for a connection.
970
     */
971
    NORMAL_SCAN_REQ,
972
973
    /**
974
     * INITIAL_SCAN_REQ - Initial scan request
975
     *
976
     * This is used for the first scan on an interface to force at
977
     * least one scan to be run even if the configuration does not
978
     * include any enabled networks.
979
     */
980
    INITIAL_SCAN_REQ,
981
982
    /**
983
     * MANUAL_SCAN_REQ - Manual scan request
984
     *
985
     * This is used for scans where the user request a scan or
986
     * a specific wpa_supplicant operation (e.g., WPS) requires scan
987
     * to be run.
988
     */
989
    MANUAL_SCAN_REQ
990
  } scan_req, last_scan_req;
991
  enum wpa_states scan_prev_wpa_state;
992
  struct os_reltime scan_trigger_time, scan_start_time;
993
  /* Minimum freshness requirement for connection purposes */
994
  struct os_reltime scan_min_time;
995
  int scan_runs; /* number of scan runs since WPS was started */
996
  int *next_scan_freqs;
997
  int *select_network_scan_freqs;
998
  int *manual_scan_freqs;
999
  int *manual_sched_scan_freqs;
1000
  unsigned int manual_scan_passive:1;
1001
  unsigned int manual_scan_use_id:1;
1002
  unsigned int manual_scan_only_new:1;
1003
  unsigned int own_scan_requested:1;
1004
  unsigned int own_scan_running:1;
1005
  unsigned int clear_driver_scan_cache:1;
1006
  unsigned int manual_non_coloc_6ghz:1;
1007
  unsigned int manual_scan_id;
1008
  int scan_interval; /* time in sec between scans to find suitable AP */
1009
  int normal_scans; /* normal scans run before sched_scan */
1010
  int scan_for_connection; /* whether the scan request was triggered for
1011
          * finding a connection */
1012
  /*
1013
   * A unique cookie representing the vendor scan request. This cookie is
1014
   * returned from the driver interface. 0 indicates that there is no
1015
   * pending vendor scan request.
1016
   */
1017
  u64 curr_scan_cookie;
1018
#define MAX_SCAN_ID 16
1019
  int scan_id[MAX_SCAN_ID];
1020
  unsigned int scan_id_count;
1021
  u8 next_scan_bssid[ETH_ALEN];
1022
  unsigned int next_scan_bssid_wildcard_ssid:1;
1023
1024
  struct wpa_ssid_value *ssids_from_scan_req;
1025
  unsigned int num_ssids_from_scan_req;
1026
  int *last_scan_freqs; /* int_array */
1027
  unsigned int suitable_network;
1028
  unsigned int no_suitable_network;
1029
1030
  u8 ml_probe_bssid[ETH_ALEN];
1031
  int ml_probe_mld_id;
1032
  u16 ml_probe_links;
1033
1034
  u64 drv_flags;
1035
  u64 drv_flags2;
1036
  unsigned int drv_enc;
1037
  unsigned int drv_key_mgmt;
1038
  unsigned int drv_rrm_flags;
1039
  unsigned int drv_max_acl_mac_addrs;
1040
  size_t drv_max_probe_req_ie_len;
1041
1042
  /*
1043
   * A bitmap of supported protocols for probe response offload. See
1044
   * struct wpa_driver_capa in driver.h
1045
   */
1046
  unsigned int probe_resp_offloads;
1047
1048
  /* extended capabilities supported by the driver */
1049
  const u8 *extended_capa, *extended_capa_mask;
1050
  unsigned int extended_capa_len;
1051
1052
  /* EML and MLD capabilities supported by the driver */
1053
  u16 eml_capa, mld_capa;
1054
1055
  int max_scan_ssids;
1056
  int max_sched_scan_ssids;
1057
  unsigned int max_sched_scan_plans;
1058
  unsigned int max_sched_scan_plan_interval;
1059
  unsigned int max_sched_scan_plan_iterations;
1060
  int sched_scan_supported;
1061
  unsigned int max_match_sets;
1062
  unsigned int max_remain_on_chan;
1063
  unsigned int max_stations;
1064
  unsigned int max_num_akms;
1065
1066
  int pending_mic_error_report;
1067
  int pending_mic_error_pairwise;
1068
  int mic_errors_seen; /* Michael MIC errors with the current PTK */
1069
1070
  struct wps_context *wps;
1071
  int wps_success; /* WPS success event received */
1072
  struct wps_er *wps_er;
1073
  unsigned int wps_run;
1074
  struct os_reltime wps_pin_start_time;
1075
  bool bssid_ignore_cleared;
1076
1077
  struct wpabuf *pending_eapol_rx;
1078
  struct os_reltime pending_eapol_rx_time;
1079
  u8 pending_eapol_rx_src[ETH_ALEN];
1080
  enum frame_encryption pending_eapol_encrypted;
1081
  unsigned int last_eapol_matches_bssid:1;
1082
  unsigned int eapol_failed:1;
1083
  unsigned int eap_expected_failure:1;
1084
  unsigned int reattach:1; /* reassociation to the same BSS requested */
1085
  unsigned int mac_addr_changed:1;
1086
  unsigned int added_vif:1;
1087
  unsigned int owe_transition_select:1;
1088
  unsigned int owe_transition_search:1;
1089
  unsigned int connection_set:1;
1090
  unsigned int connection_ht:1;
1091
  unsigned int connection_vht:1;
1092
  unsigned int connection_he:1;
1093
  unsigned int connection_eht:1;
1094
  unsigned int connection_uhr:1;
1095
  unsigned int disable_mbo_oce:1;
1096
1097
  enum wnmsleep_state {
1098
    WNM_SLEEP_IDLE,
1099
    WNM_SLEEP_WAIT_RESP_ENTER,
1100
    WNM_SLEEP_WAIT_RESP_EXIT,
1101
  } wnmsleep_state;
1102
1103
  u8 connection_max_nss_rx;
1104
  u8 connection_max_nss_tx;
1105
  enum chan_width connection_channel_bandwidth;
1106
1107
  struct os_reltime last_mac_addr_change;
1108
  enum wpas_mac_addr_style last_mac_addr_style;
1109
1110
  struct ibss_rsn *ibss_rsn;
1111
1112
  int set_sta_uapsd;
1113
  int sta_uapsd;
1114
  int set_ap_uapsd;
1115
  int ap_uapsd;
1116
  int auth_alg;
1117
  u16 last_owe_group;
1118
1119
#ifdef CONFIG_SME
1120
  struct {
1121
    u8 ssid[SSID_MAX_LEN];
1122
    size_t ssid_len;
1123
    int freq;
1124
    u8 assoc_req_ie[1500];
1125
    size_t assoc_req_ie_len;
1126
    int mfp;
1127
    int ft_used;
1128
    u8 mobility_domain[2];
1129
    u8 *ft_ies;
1130
    size_t ft_ies_len;
1131
    u8 prev_bssid[ETH_ALEN];
1132
    int prev_bssid_set;
1133
    int auth_alg;
1134
    int proto;
1135
1136
    int sa_query_count; /* number of pending SA Query requests;
1137
             * 0 = no SA Query in progress */
1138
    int sa_query_timed_out;
1139
    u8 *sa_query_trans_id; /* buffer of WLAN_SA_QUERY_TR_ID_LEN *
1140
          * sa_query_count octets of pending
1141
          * SA Query transaction identifiers */
1142
    struct os_reltime sa_query_start;
1143
    struct os_reltime last_unprot_disconnect;
1144
    enum { HT_SEC_CHAN_UNKNOWN,
1145
           HT_SEC_CHAN_ABOVE,
1146
           HT_SEC_CHAN_BELOW } ht_sec_chan;
1147
    u8 sched_obss_scan;
1148
    u16 obss_scan_int;
1149
    u16 bss_max_idle_period;
1150
    bool spp_amsdu;
1151
#ifdef CONFIG_SAE
1152
    struct sae_data sae;
1153
    struct wpabuf *sae_token;
1154
    int sae_group_index;
1155
    unsigned int sae_pmksa_caching:1;
1156
    u16 seq_num;
1157
    int *sae_rejected_groups;
1158
#endif /* CONFIG_SAE */
1159
    u8 ext_auth_bssid[ETH_ALEN];
1160
    unsigned int ext_auth_freq;
1161
    struct wpa_ssid *ext_auth_wpa_ssid;
1162
    u8 ext_auth_ssid[SSID_MAX_LEN];
1163
    size_t ext_auth_ssid_len;
1164
    int ext_auth_key_mgmt;
1165
    u8 ext_auth_ap_mld_addr[ETH_ALEN];
1166
    bool ext_ml_auth;
1167
    u16 assoc_auth_type;
1168
    int ext_auth_alg;
1169
    int ext_pairwise_cipher;
1170
    int ext_group_cipher;
1171
    int ext_mgmt_group_cipher;
1172
    u16 ext_rsn_capab;
1173
    u8 ext_rsnxe[257];
1174
    size_t ext_rsnxe_len;
1175
  } sme;
1176
#endif /* CONFIG_SME */
1177
1178
#ifdef CONFIG_AP
1179
  struct hostapd_iface *ap_iface;
1180
  void (*ap_configured_cb)(void *ctx, void *data);
1181
  void *ap_configured_cb_ctx;
1182
  void *ap_configured_cb_data;
1183
#endif /* CONFIG_AP */
1184
1185
  struct hostapd_iface *ifmsh;
1186
#ifdef CONFIG_MESH
1187
  struct mesh_rsn *mesh_rsn;
1188
  int mesh_if_idx;
1189
  unsigned int mesh_if_created:1;
1190
  unsigned int mesh_ht_enabled:1;
1191
  unsigned int mesh_vht_enabled:1;
1192
  unsigned int mesh_he_enabled:1;
1193
  unsigned int mesh_eht_enabled:1;
1194
  struct wpa_driver_mesh_join_params *mesh_params;
1195
#ifdef CONFIG_PMKSA_CACHE_EXTERNAL
1196
  /* struct external_pmksa_cache::list */
1197
  struct dl_list mesh_external_pmksa_cache;
1198
#endif /* CONFIG_PMKSA_CACHE_EXTERNAL */
1199
#endif /* CONFIG_MESH */
1200
1201
  unsigned int off_channel_freq;
1202
  struct wpabuf *pending_action_tx;
1203
  u8 pending_action_src[ETH_ALEN];
1204
  u8 pending_action_dst[ETH_ALEN];
1205
  u8 pending_action_bssid[ETH_ALEN];
1206
  unsigned int pending_action_freq;
1207
  int pending_action_no_cck;
1208
  int pending_action_without_roc;
1209
  unsigned int pending_action_tx_done:1;
1210
  void (*pending_action_tx_status_cb)(struct wpa_supplicant *wpa_s,
1211
              unsigned int freq, const u8 *dst,
1212
              const u8 *src, const u8 *bssid,
1213
              const u8 *data, size_t data_len,
1214
              enum offchannel_send_action_result
1215
              result);
1216
  unsigned int roc_waiting_drv_freq;
1217
  int action_tx_wait_time;
1218
  int action_tx_wait_time_used;
1219
1220
  int p2p_mgmt;
1221
1222
#ifdef CONFIG_P2P
1223
  struct p2p_go_neg_results *go_params;
1224
  struct rsn_pmksa_cache_entry *p2p_pmksa_entry;
1225
  int create_p2p_iface;
1226
  u8 pending_interface_addr[ETH_ALEN];
1227
  char pending_interface_name[100];
1228
  int pending_interface_type;
1229
  int p2p_group_idx;
1230
  unsigned int pending_listen_freq;
1231
  unsigned int pending_listen_duration;
1232
  enum {
1233
    NOT_P2P_GROUP_INTERFACE,
1234
    P2P_GROUP_INTERFACE_PENDING,
1235
    P2P_GROUP_INTERFACE_GO,
1236
    P2P_GROUP_INTERFACE_CLIENT
1237
  } p2p_group_interface;
1238
  struct p2p_group *p2p_group;
1239
  char p2p_pin[10];
1240
  int p2p_wps_method;
1241
  u8 p2p_auth_invite[ETH_ALEN];
1242
  int p2p_sd_over_ctrl_iface;
1243
  int p2p_in_provisioning;
1244
  int p2p_in_invitation;
1245
  int p2p_retry_limit;
1246
  int p2p_invite_go_freq;
1247
  bool p2p_pairing_setup;
1248
  bool p2p_pairing_cache;
1249
  int pending_invite_ssid_id;
1250
  int show_group_started;
1251
  u8 go_dev_addr[ETH_ALEN];
1252
  int pending_pd_before_join;
1253
  u8 pending_join_iface_addr[ETH_ALEN];
1254
  u8 pending_join_dev_addr[ETH_ALEN];
1255
  u8 p2p_bootstrap_dev_addr[ETH_ALEN];
1256
  int pending_join_wps_method;
1257
  char pending_join_password[100];
1258
  u8 p2p_join_ssid[SSID_MAX_LEN];
1259
  size_t p2p_join_ssid_len;
1260
  int p2p_join_scan_count;
1261
  int auto_pd_scan_retry;
1262
  int force_long_sd;
1263
  u16 pending_pd_config_methods;
1264
  enum {
1265
    NORMAL_PD, AUTO_PD_GO_NEG, AUTO_PD_JOIN, AUTO_PD_ASP
1266
  } pending_pd_use;
1267
1268
  /*
1269
   * Whether cross connection is disallowed by the AP to which this
1270
   * interface is associated (only valid if there is an association).
1271
   */
1272
  int cross_connect_disallowed;
1273
1274
  /*
1275
   * Whether this P2P group is configured to use cross connection (only
1276
   * valid if this is P2P GO interface). The actual cross connect packet
1277
   * forwarding may not be configured depending on the uplink status.
1278
   */
1279
  int cross_connect_enabled;
1280
1281
  /* Whether cross connection forwarding is in use at the moment. */
1282
  int cross_connect_in_use;
1283
1284
  /*
1285
   * Uplink interface name for cross connection
1286
   */
1287
  char cross_connect_uplink[100];
1288
1289
  unsigned int p2p_auto_join:1;
1290
  unsigned int p2p_auto_pd:1;
1291
  unsigned int p2p_go_do_acs:1;
1292
  unsigned int p2p_persistent_group:1;
1293
  unsigned int p2p_fallback_to_go_neg:1;
1294
  unsigned int p2p_pd_before_go_neg:1;
1295
  unsigned int p2p_go_ht40:1;
1296
  unsigned int p2p_go_vht:1;
1297
  unsigned int p2p_go_edmg:1;
1298
  unsigned int p2p_go_he:1;
1299
  unsigned int user_initiated_pd:1;
1300
  unsigned int p2p_go_group_formation_completed:1;
1301
  unsigned int group_formation_reported:1;
1302
  unsigned int p2p_go_no_pri_sec_switch:1;
1303
  unsigned int waiting_presence_resp;
1304
  int p2p_first_connection_timeout;
1305
  unsigned int p2p_nfc_tag_enabled:1;
1306
  unsigned int p2p_peer_oob_pk_hash_known:1;
1307
  unsigned int p2p_disable_ip_addr_req:1;
1308
  unsigned int p2ps_method_config_any:1;
1309
  unsigned int p2p_cli_probe:1;
1310
  unsigned int p2p_go_allow_dfs:1;
1311
  unsigned int p2p2:1;
1312
  u16 p2p_bootstrap;
1313
  enum hostapd_hw_mode p2p_go_acs_band;
1314
  enum wpa_p2p_mode p2p_mode;
1315
  int p2p_persistent_go_freq;
1316
  int p2p_persistent_id;
1317
  int p2p_go_intent;
1318
  int p2p_connect_freq;
1319
  struct os_reltime p2p_auto_started;
1320
  struct wpa_ssid *p2p_last_4way_hs_fail;
1321
  struct wpa_radio_work *p2p_scan_work;
1322
  struct wpa_radio_work *p2p_listen_work;
1323
  struct wpa_radio_work *p2p_send_action_work;
1324
  bool p2p_removing_listen_work;
1325
1326
  u16 p2p_oob_dev_pw_id; /* OOB Device Password Id for group formation */
1327
  struct wpabuf *p2p_oob_dev_pw; /* OOB Device Password for group
1328
          * formation */
1329
  u8 p2p_peer_oob_pubkey_hash[WPS_OOB_PUBKEY_HASH_LEN];
1330
  u8 p2p_ip_addr_info[3 * 4];
1331
1332
  /* group common frequencies */
1333
  int *p2p_group_common_freqs;
1334
  unsigned int p2p_group_common_freqs_num;
1335
  u8 p2ps_join_addr[ETH_ALEN];
1336
1337
  unsigned int p2p_go_max_oper_chwidth;
1338
  unsigned int p2p_go_vht_center_freq2;
1339
  int p2p_lo_started;
1340
  bool p2p_neg_go_setup;
1341
#endif /* CONFIG_P2P */
1342
1343
  struct wpa_ssid *bgscan_ssid;
1344
  const struct bgscan_ops *bgscan;
1345
  void *bgscan_priv;
1346
  int signal_threshold;
1347
1348
  const struct autoscan_ops *autoscan;
1349
  struct wpa_driver_scan_params *autoscan_params;
1350
  void *autoscan_priv;
1351
1352
  struct wpa_ssid *connect_without_scan;
1353
1354
  struct wps_ap_info *wps_ap;
1355
  size_t num_wps_ap;
1356
  int wps_ap_iter;
1357
1358
  int after_wps;
1359
  int known_wps_freq;
1360
  unsigned int wps_freq;
1361
  int wps_fragment_size;
1362
  int auto_reconnect_disabled;
1363
1364
   /* Channel preferences for AP/P2P GO use */
1365
  int best_24_freq;
1366
  int best_5_freq;
1367
  int best_overall_freq;
1368
1369
  struct gas_query *gas;
1370
  struct gas_server *gas_server;
1371
1372
#ifdef CONFIG_INTERWORKING
1373
  unsigned int fetch_anqp_in_progress:1;
1374
  unsigned int network_select:1;
1375
  unsigned int auto_select:1;
1376
  unsigned int auto_network_select:1;
1377
  unsigned int interworking_fast_assoc_tried:1;
1378
  unsigned int fetch_all_anqp:1;
1379
  struct wpa_bss *interworking_gas_bss;
1380
#endif /* CONFIG_INTERWORKING */
1381
  unsigned int drv_capa_known;
1382
1383
  struct {
1384
    struct hostapd_hw_modes *modes;
1385
    u16 num_modes;
1386
    u16 flags;
1387
  } hw;
1388
  unsigned int hw_capab; /* bitmap of enum local_hw_capab bits */
1389
#ifdef CONFIG_MACSEC
1390
  struct ieee802_1x_kay *kay;
1391
#endif /* CONFIG_MACSEC */
1392
1393
  int pno;
1394
  int pno_sched_pending;
1395
1396
  /* WLAN_REASON_* reason codes. Negative if locally generated. */
1397
  int disconnect_reason;
1398
1399
  /* WLAN_STATUS_* status codes from last received Authentication frame
1400
   * from the AP. */
1401
  u16 auth_status_code;
1402
1403
  /* WLAN_STATUS_* status codes from (Re)Association Response frame. */
1404
  u16 assoc_status_code;
1405
1406
  struct ext_password_data *ext_pw;
1407
1408
  struct wpabuf *last_gas_resp, *prev_gas_resp;
1409
  u8 last_gas_addr[ETH_ALEN], prev_gas_addr[ETH_ALEN];
1410
  u8 last_gas_dialog_token, prev_gas_dialog_token;
1411
1412
  unsigned int no_keep_alive:1;
1413
  unsigned int ext_mgmt_frame_handling:1;
1414
  unsigned int ext_eapol_frame_io:1;
1415
  unsigned int wmm_ac_supported:1;
1416
  unsigned int ext_work_in_progress:1;
1417
  unsigned int own_disconnect_req:1;
1418
  unsigned int own_reconnect_req:1;
1419
  unsigned int ignore_post_flush_scan_res:1;
1420
1421
0
#define MAC_ADDR_RAND_SCAN       BIT(0)
1422
0
#define MAC_ADDR_RAND_SCHED_SCAN BIT(1)
1423
0
#define MAC_ADDR_RAND_PNO        BIT(2)
1424
0
#define MAC_ADDR_RAND_ALL        (MAC_ADDR_RAND_SCAN | \
1425
0
          MAC_ADDR_RAND_SCHED_SCAN | \
1426
0
          MAC_ADDR_RAND_PNO)
1427
  unsigned int mac_addr_rand_supported;
1428
  unsigned int mac_addr_rand_enable;
1429
1430
  /* MAC Address followed by mask (2 * ETH_ALEN) */
1431
  u8 *mac_addr_scan;
1432
  u8 *mac_addr_sched_scan;
1433
  u8 *mac_addr_pno;
1434
1435
#ifdef CONFIG_WNM
1436
  bool wnm_transition_scan;
1437
  u8 wnm_dialog_token;
1438
  u8 wnm_reply;
1439
  u8 wnm_num_neighbor_report;
1440
  u8 wnm_mode;
1441
  bool wnm_link_removal;
1442
  bool wnm_disassoc_mld;
1443
  u8 wnm_disassoc_addr[ETH_ALEN];
1444
  u16 wnm_disassoc_timer;
1445
  u8 wnm_bss_termination_duration[12];
1446
  struct neighbor_report *wnm_neighbor_report_elements;
1447
  struct os_reltime wnm_cand_valid_until;
1448
  struct wpa_bss *wnm_target_bss;
1449
  enum bss_trans_mgmt_status_code bss_tm_status;
1450
  bool bss_trans_mgmt_in_progress;
1451
  u8 coloc_intf_dialog_token;
1452
  u8 coloc_intf_auto_report;
1453
  u8 coloc_intf_timeout;
1454
#ifdef CONFIG_MBO
1455
  unsigned int wnm_mbo_trans_reason_present:1;
1456
  u8 wnm_mbo_transition_reason;
1457
#endif /* CONFIG_MBO */
1458
#endif /* CONFIG_WNM */
1459
1460
#ifdef CONFIG_TESTING_GET_GTK
1461
  u8 last_gtk[32];
1462
  size_t last_gtk_len;
1463
#endif /* CONFIG_TESTING_GET_GTK */
1464
1465
  unsigned int num_multichan_concurrent;
1466
  struct wpa_radio_work *connect_work;
1467
1468
  unsigned int ext_work_id;
1469
1470
  struct wpabuf *vendor_elem[NUM_VENDOR_ELEM_FRAMES];
1471
1472
#ifdef CONFIG_TESTING_OPTIONS
1473
  struct l2_packet_data *l2_test;
1474
  unsigned int extra_roc_dur;
1475
  enum wpa_supplicant_test_failure test_failure;
1476
  char *get_pref_freq_list_override;
1477
  unsigned int reject_btm_req_reason;
1478
  unsigned int p2p_go_csa_on_inv:1;
1479
  unsigned int ignore_auth_resp:1;
1480
  unsigned int ignore_assoc_disallow:1;
1481
  unsigned int disable_sa_query:1;
1482
  unsigned int testing_resend_assoc:1;
1483
  unsigned int ignore_sae_h2e_only:1;
1484
  int ft_rsnxe_used;
1485
  struct wpabuf *sae_commit_override;
1486
  enum wpa_alg last_tk_alg;
1487
  u8 last_tk_addr[ETH_ALEN];
1488
  int last_tk_key_idx;
1489
  u8 last_tk[WPA_TK_MAX_LEN];
1490
  size_t last_tk_len;
1491
  struct wpabuf *last_assoc_req_wpa_ie;
1492
  int *extra_sae_rejected_groups;
1493
  struct wpabuf *rsne_override_eapol;
1494
  struct wpabuf *rsnxe_override_assoc;
1495
  struct wpabuf *rsnxe_override_eapol;
1496
  struct wpabuf *sec_prof_override_auth;
1497
  struct wpabuf *sec_prof_override_assoc;
1498
  struct dl_list drv_signal_override;
1499
  unsigned int oci_freq_override_eapol;
1500
  unsigned int oci_freq_override_saquery_req;
1501
  unsigned int oci_freq_override_saquery_resp;
1502
  unsigned int oci_freq_override_eapol_g2;
1503
  unsigned int oci_freq_override_ft_assoc;
1504
  unsigned int oci_freq_override_fils_assoc;
1505
  unsigned int oci_freq_override_wnm_sleep;
1506
  unsigned int disable_eapol_g2_tx;
1507
  unsigned int eapol_2_key_info_set_mask;
1508
  int test_assoc_comeback_type;
1509
  struct wpabuf *link_ies[MAX_NUM_MLD_LINKS];
1510
#endif /* CONFIG_TESTING_OPTIONS */
1511
1512
  struct wmm_ac_assoc_data *wmm_ac_assoc_info;
1513
  struct wmm_tspec_element *tspecs[WMM_AC_NUM][TS_DIR_IDX_COUNT];
1514
  struct wmm_ac_addts_request *addts_request;
1515
  u8 wmm_ac_last_dialog_token;
1516
  struct wmm_tspec_element *last_tspecs;
1517
  u8 last_tspecs_count;
1518
1519
  struct rrm_data rrm;
1520
  struct beacon_rep_data beacon_rep_data;
1521
1522
#ifdef CONFIG_FST
1523
  struct fst_iface *fst;
1524
  const struct wpabuf *fst_ies;
1525
  struct wpabuf *received_mb_ies;
1526
#endif /* CONFIG_FST */
1527
1528
#ifdef CONFIG_MBO
1529
  /* Multiband operation non-preferred channel */
1530
  struct wpa_mbo_non_pref_channel {
1531
    enum mbo_non_pref_chan_reason reason;
1532
    u8 oper_class;
1533
    u8 chan;
1534
    u8 preference;
1535
  } *non_pref_chan;
1536
  size_t non_pref_chan_num;
1537
  u8 mbo_wnm_token;
1538
  /**
1539
   * enable_oce - Enable OCE if it is enabled by user and device also
1540
   *    supports OCE.
1541
   * User can enable OCE with wpa_config's 'oce' parameter as follows -
1542
   *  - Set BIT(0) to enable OCE in non-AP STA mode.
1543
   *  - Set BIT(1) to enable OCE in STA-CFON mode.
1544
   */
1545
  u8 enable_oce;
1546
#endif /* CONFIG_MBO */
1547
1548
  /*
1549
   * This should be under CONFIG_MBO, but it is left out to allow using
1550
   * the bss_temp_disallowed list for other purposes as well.
1551
   */
1552
  struct dl_list bss_tmp_disallowed;
1553
1554
  /*
1555
   * Content of a measurement report element with type 8 (LCI),
1556
   * own location.
1557
   */
1558
  struct wpabuf *lci;
1559
  struct os_reltime lci_time;
1560
1561
  struct os_reltime beacon_rep_scan;
1562
1563
  /* FILS HLP requests (struct fils_hlp_req) */
1564
  struct dl_list fils_hlp_req;
1565
1566
  struct sched_scan_relative_params {
1567
    /**
1568
     * relative_rssi_set - Enable relatively preferred BSS reporting
1569
     *
1570
     * 0 = Disable reporting relatively preferred BSSs
1571
     * 1 = Enable reporting relatively preferred BSSs
1572
     */
1573
    int relative_rssi_set;
1574
1575
    /**
1576
     * relative_rssi - Relative RSSI for reporting better BSSs
1577
     *
1578
     * Amount of RSSI by which a BSS should be better than the
1579
     * current connected BSS so that the new BSS can be reported
1580
     * to user space. This applies to sched_scan operations.
1581
     */
1582
    int relative_rssi;
1583
1584
    /**
1585
     * relative_adjust_band - Band in which RSSI is to be adjusted
1586
     */
1587
    enum set_band relative_adjust_band;
1588
1589
    /**
1590
     * relative_adjust_rssi - RSSI adjustment
1591
     *
1592
     * An amount of relative_adjust_rssi should be added to the
1593
     * BSSs that belong to the relative_adjust_band while comparing
1594
     * with other bands for BSS reporting.
1595
     */
1596
    int relative_adjust_rssi;
1597
  } srp;
1598
1599
  /* RIC elements for FT protocol */
1600
  struct wpabuf *ric_ies;
1601
1602
  int last_auth_timeout_sec;
1603
1604
#ifdef CONFIG_DPP
1605
  struct dpp_global *dpp;
1606
  struct dpp_authentication *dpp_auth;
1607
  struct wpa_radio_work *dpp_listen_work;
1608
  unsigned int dpp_pending_listen_freq;
1609
  unsigned int dpp_listen_freq;
1610
  struct os_reltime dpp_listen_end;
1611
  u8 dpp_allowed_roles;
1612
  int dpp_qr_mutual;
1613
  int dpp_netrole;
1614
  int dpp_auth_ok_on_ack;
1615
  int dpp_in_response_listen;
1616
  bool dpp_tx_auth_resp_on_roc_stop;
1617
  bool dpp_tx_chan_change;
1618
  bool dpp_listen_on_tx_expire;
1619
  int dpp_gas_client;
1620
  int dpp_gas_server;
1621
  int dpp_gas_dialog_token;
1622
  u8 dpp_intro_bssid[ETH_ALEN];
1623
  void *dpp_intro_network;
1624
  u8 dpp_intro_peer_version;
1625
  struct dpp_pkex *dpp_pkex;
1626
  struct dpp_bootstrap_info *dpp_pkex_bi;
1627
  char *dpp_pkex_code;
1628
  size_t dpp_pkex_code_len;
1629
  char *dpp_pkex_identifier;
1630
  enum dpp_pkex_ver dpp_pkex_ver;
1631
  char *dpp_pkex_auth_cmd;
1632
  char *dpp_configurator_params;
1633
  struct os_reltime dpp_last_init;
1634
  struct os_reltime dpp_init_iter_start;
1635
  unsigned int dpp_init_max_tries;
1636
  unsigned int dpp_init_retry_time;
1637
  unsigned int dpp_resp_wait_time;
1638
  unsigned int dpp_resp_max_tries;
1639
  unsigned int dpp_resp_retry_time;
1640
  u8 dpp_last_ssid[SSID_MAX_LEN];
1641
  size_t dpp_last_ssid_len;
1642
  bool dpp_conf_backup_received;
1643
  bool dpp_pkex_wait_auth_req;
1644
#ifdef CONFIG_DPP2
1645
  struct dpp_pfs *dpp_pfs;
1646
  int dpp_pfs_fallback;
1647
  struct wpabuf *dpp_presence_announcement;
1648
  struct dpp_bootstrap_info *dpp_chirp_bi;
1649
  int dpp_chirp_freq;
1650
  int *dpp_chirp_freqs;
1651
  int dpp_chirp_iter;
1652
  int dpp_chirp_round;
1653
  int dpp_chirp_scan_done;
1654
  int dpp_chirp_listen;
1655
  struct wpa_ssid *dpp_reconfig_ssid;
1656
  int dpp_reconfig_ssid_id;
1657
  struct dpp_reconfig_id *dpp_reconfig_id;
1658
#endif /* CONFIG_DPP2 */
1659
#ifdef CONFIG_DPP3
1660
  struct os_reltime dpp_pb_time;
1661
  bool dpp_pb_configurator;
1662
  int *dpp_pb_freqs;
1663
  unsigned int dpp_pb_freq_idx;
1664
  unsigned int dpp_pb_announce_count;
1665
  struct wpabuf *dpp_pb_announcement;
1666
  struct dpp_bootstrap_info *dpp_pb_bi;
1667
  unsigned int dpp_pb_resp_freq;
1668
  u8 dpp_pb_init_hash[SHA256_MAC_LEN];
1669
  int dpp_pb_stop_iter;
1670
  bool dpp_pb_discovery_done;
1671
  u8 dpp_pb_c_nonce[DPP_MAX_NONCE_LEN];
1672
  size_t dpp_pb_c_nonce_len;
1673
  bool dpp_pb_result_indicated;
1674
  struct os_reltime dpp_pb_announce_time;
1675
  struct dpp_pb_info dpp_pb[DPP_PB_INFO_COUNT];
1676
  u8 dpp_pb_resp_hash[SHA256_MAC_LEN];
1677
  struct os_reltime dpp_pb_last_resp;
1678
  char *dpp_pb_cmd;
1679
#endif /* CONFIG_DPP3 */
1680
#ifdef CONFIG_TESTING_OPTIONS
1681
  char *dpp_config_obj_override;
1682
  char *dpp_discovery_override;
1683
  char *dpp_groups_override;
1684
  unsigned int dpp_ignore_netaccesskey_mismatch:1;
1685
  unsigned int dpp_discard_public_action:1;
1686
#endif /* CONFIG_TESTING_OPTIONS */
1687
#endif /* CONFIG_DPP */
1688
1689
#ifdef CONFIG_FILS
1690
  unsigned int disable_fils:1;
1691
#endif /* CONFIG_FILS */
1692
  unsigned int ieee80211ac:1;
1693
  unsigned int enabled_4addr_mode:1;
1694
  unsigned int multi_bss_support:1;
1695
  unsigned int drv_authorized_port:1;
1696
  unsigned int multi_ap_ie:1;
1697
  unsigned int multi_ap_backhaul:1;
1698
  unsigned int multi_ap_fronthaul:1;
1699
1700
#ifndef CONFIG_NO_ROBUST_AV
1701
  struct robust_av_data robust_av;
1702
  bool mscs_setup_done;
1703
  struct scs_robust_av_data scs_robust_av_req;
1704
  u8 scs_dialog_token;
1705
  struct dl_list active_scs_ids;
1706
  bool ongoing_scs_req;
1707
  u8 dscp_req_dialog_token;
1708
  u8 dscp_query_dialog_token;
1709
  unsigned int enable_dscp_policy_capa:1;
1710
  unsigned int connection_dscp:1;
1711
  unsigned int wait_for_dscp_req:1;
1712
#ifdef CONFIG_TESTING_OPTIONS
1713
  unsigned int disable_scs_support:1;
1714
  unsigned int disable_mscs_support:1;
1715
#endif /* CONFIG_TESTING_OPTIONS */
1716
#endif /* CONFIG_NO_ROBUST_AV */
1717
1718
  bool wps_scan_done; /* Set upon receiving scan results event */
1719
  bool supp_pbc_active; /* Set for interface when PBC is triggered */
1720
  bool wps_overlap;
1721
  bool scan_in_progress_6ghz; /* Set upon a 6 GHz scan being triggered */
1722
1723
#ifdef CONFIG_IEEE8021X_AUTH
1724
  struct auth_802_1x_data *auth_1x;
1725
#endif /* CONFIG_IEEE8021X_AUTH */
1726
1727
#ifdef CONFIG_PASN
1728
  struct pasn_data pasn;
1729
  struct wpa_radio_work *pasn_auth_work;
1730
  unsigned int pasn_count;
1731
  struct pasn_auth *pasn_params;
1732
  bool urnm_mfpr_x20;
1733
  bool disable_urnm_mfpr;
1734
#ifdef CONFIG_P2P
1735
  struct wpa_radio_work *p2p_pasn_auth_work;
1736
#endif /* CONFIG_P2P */
1737
  struct wpa_radio_work *pr_pasn_auth_work;
1738
  struct wpa_radio_work *pr_roc_work;
1739
#endif /* CONFIG_PASN */
1740
1741
  bool is_6ghz_enabled;
1742
  bool crossed_6ghz_dom;
1743
  bool last_scan_covered_6ghz;
1744
  bool last_scan_was_restricted;
1745
  bool last_scan_all_chan;
1746
  bool last_scan_non_coloc_6ghz;
1747
  bool support_6ghz;
1748
  bool allow_p2p_assisted_dfs;
1749
  char device_country[3];
1750
  bool device_country_set;
1751
  bool assisted_dfs;
1752
1753
  bool dfs_ap_connected;
1754
  int sta_connected_freq;
1755
  enum chan_width sta_connected_chan_width;
1756
1757
  struct wpa_signal_info last_signal_info;
1758
1759
  struct wpa_ssid *ml_connect_probe_ssid;
1760
  struct wpa_bss *ml_connect_probe_bss;
1761
1762
#ifdef CONFIG_OWE
1763
  /* An array of frequencies to scan for OWE transition mode BSSs when
1764
   * owe_transition_search == 1 */
1765
  int *owe_trans_scan_freq;
1766
#endif /* CONFIG_OWE */
1767
1768
#ifdef CONFIG_NAN_USD
1769
  struct nan_de *nan_de;
1770
  struct wpa_radio_work *nan_usd_listen_work;
1771
  struct wpa_radio_work *nan_usd_tx_work;
1772
#endif /* CONFIG_NAN_USD */
1773
1774
  bool ssid_verified;
1775
  bool bigtk_set;
1776
  u64 first_beacon_tsf;
1777
  unsigned int beacons_checked;
1778
  unsigned int next_beacon_check;
1779
1780
  bool scs_reconfigure;
1781
  bool ext_auth_to_same_bss; /* Whether external authentication has been
1782
            * completed successfully with the BSS that
1783
            * we are already associated with, or an
1784
            * equivalent driver-indicated roam
1785
            * authentication status (EVENT_ROAM_STATUS)
1786
            * has been received for that BSS. */
1787
1788
  bool nan_mgmt;
1789
  bool nan_data;
1790
1791
#ifdef CONFIG_NAN
1792
#define MAX_NAN_RADIOS 2
1793
  struct nan_capa nan_capa;
1794
  struct nan_data *nan;
1795
  struct nan_cluster_config nan_cluster_config;
1796
  u8 schedule_sequence_id;
1797
  struct nan_schedule_config nan_sched[MAX_NAN_RADIOS];
1798
  u16 nan_supported_csids;
1799
  struct nan_schedule_update {
1800
    struct nan_schedule_config sched;
1801
    u8 map_id;
1802
  } nan_sched_update;
1803
  struct wpabuf *nan_ulw_attr;
1804
  struct wpa_freq_range_list nan_disallowed_freqs;
1805
  u16 nan_max_bw;
1806
  struct nan_channels nan_override_potential_avail;
1807
  unsigned int nan_ndi_ndp_refcount; /* Active NDP count on this NDI */
1808
  struct nan_gtk ndi_gtk;
1809
#ifdef CONFIG_TESTING_OPTIONS
1810
  bool nan_force_conditional_sched;
1811
#endif /* CONFIG_TESTING_OPTIONS */
1812
#endif /* CONFIG_NAN */
1813
#ifdef CONFIG_ENC_ASSOC
1814
  bool assoc_resp_encrypted; /* Whether (Re)Association Response frame
1815
            * is encrypted. */
1816
#endif /* CONFIG_ENC_ASSOC */
1817
#ifdef CONFIG_PMKSA_PRIVACY
1818
  u8 pmkid_snonce[NONCE_LEN];
1819
  bool pmkid_snonce_set;
1820
  u8 pmkid_anonce[NONCE_LEN];
1821
  bool pmkid_anonce_set;
1822
#endif /* CONFIG_PMKSA_PRIVACY */
1823
  u8 pd_addr[ETH_ALEN];
1824
1825
  /**
1826
   * pr_responder_mode - Waiting for PASN M1 as responder
1827
   *
1828
   * Set when ROC has been started on this interface to listen for an
1829
   * incoming PASN Auth1 frame. Cleared once the dedicated PR interface
1830
   * is created on M1 reception.
1831
   */
1832
  bool pr_responder_mode;
1833
1834
  /**
1835
   * pr_responder_src_addr - Source MAC address used for responder ROC
1836
   *
1837
   * Stored when responder mode is activated so that the dedicated PR
1838
   * interface can be created with the same address when M1 arrives.
1839
   */
1840
  u8 pr_responder_src_addr[ETH_ALEN];
1841
};
1842
1843
1844
/* wpa_supplicant.c */
1845
void wpa_supplicant_apply_ht_overrides(
1846
  struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
1847
  struct wpa_driver_associate_params *params);
1848
void wpa_supplicant_apply_vht_overrides(
1849
  struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
1850
  struct wpa_driver_associate_params *params);
1851
void wpa_supplicant_apply_he_overrides(
1852
  struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
1853
  struct wpa_driver_associate_params *params);
1854
void wpa_supplicant_apply_eht_overrides(
1855
  struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
1856
  struct wpa_driver_associate_params *params);
1857
void wpa_supplicant_apply_uhr_overrides(
1858
  struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
1859
  struct wpa_driver_associate_params *params);
1860
1861
int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
1862
int wpa_supplicant_set_wpa_none_key(struct wpa_supplicant *wpa_s,
1863
            struct wpa_ssid *ssid);
1864
1865
int wpa_supplicant_reload_configuration(struct wpa_supplicant *wpa_s);
1866
1867
const char * wpa_supplicant_state_txt(enum wpa_states state);
1868
int wpa_supplicant_update_mac_addr(struct wpa_supplicant *wpa_s);
1869
int wpa_supplicant_driver_init(struct wpa_supplicant *wpa_s);
1870
int wpa_supplicant_update_bridge_ifname(struct wpa_supplicant *wpa_s,
1871
          const char *bridge_ifname);
1872
int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
1873
            struct wpa_bss *bss, struct wpa_ssid *ssid,
1874
            u8 *wpa_ie, size_t *wpa_ie_len,
1875
            bool skip_default_rsne);
1876
int wpas_restore_permanent_mac_addr(struct wpa_supplicant *wpa_s);
1877
void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
1878
            struct wpa_bss *bss,
1879
            struct wpa_ssid *ssid);
1880
void wpa_supplicant_set_non_wpa_policy(struct wpa_supplicant *wpa_s,
1881
               struct wpa_ssid *ssid);
1882
void wpa_supplicant_initiate_eapol(struct wpa_supplicant *wpa_s);
1883
void wpa_clear_keys(struct wpa_supplicant *wpa_s, const u8 *addr);
1884
void wpa_supplicant_req_auth_timeout(struct wpa_supplicant *wpa_s,
1885
             int sec, int usec);
1886
void wpas_auth_timeout_restart(struct wpa_supplicant *wpa_s, int sec_diff);
1887
void wpa_supplicant_reinit_autoscan(struct wpa_supplicant *wpa_s);
1888
void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
1889
            enum wpa_states state);
1890
struct wpa_ssid * wpa_supplicant_get_ssid(struct wpa_supplicant *wpa_s);
1891
const char * wpa_supplicant_get_eap_mode(struct wpa_supplicant *wpa_s);
1892
void wpa_supplicant_cancel_auth_timeout(struct wpa_supplicant *wpa_s);
1893
void wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s,
1894
           u16 reason_code);
1895
void wpa_supplicant_reconnect(struct wpa_supplicant *wpa_s);
1896
1897
struct wpa_ssid * wpa_supplicant_add_network(struct wpa_supplicant *wpa_s);
1898
int wpa_supplicant_remove_network(struct wpa_supplicant *wpa_s, int id);
1899
int wpa_supplicant_remove_all_networks(struct wpa_supplicant *wpa_s);
1900
void wpa_supplicant_enable_network(struct wpa_supplicant *wpa_s,
1901
           struct wpa_ssid *ssid);
1902
void wpa_supplicant_disable_network(struct wpa_supplicant *wpa_s,
1903
            struct wpa_ssid *ssid);
1904
void wpa_supplicant_select_network(struct wpa_supplicant *wpa_s,
1905
           struct wpa_ssid *ssid);
1906
int wpas_remove_cred(struct wpa_supplicant *wpa_s, struct wpa_cred *cred);
1907
int wpas_remove_all_creds(struct wpa_supplicant *wpa_s);
1908
int wpas_set_pkcs11_engine_and_module_path(struct wpa_supplicant *wpa_s,
1909
             const char *pkcs11_engine_path,
1910
             const char *pkcs11_module_path);
1911
int wpa_supplicant_set_ap_scan(struct wpa_supplicant *wpa_s,
1912
             int ap_scan);
1913
int wpa_supplicant_set_bss_expiration_age(struct wpa_supplicant *wpa_s,
1914
            unsigned int expire_age);
1915
int wpa_supplicant_set_bss_expiration_count(struct wpa_supplicant *wpa_s,
1916
              unsigned int expire_count);
1917
int wpa_supplicant_set_scan_interval(struct wpa_supplicant *wpa_s,
1918
             int scan_interval);
1919
int wpa_supplicant_set_debug_params(struct wpa_global *global,
1920
            int debug_level, int debug_timestamp,
1921
            int debug_show_keys);
1922
void free_hw_features(struct wpa_supplicant *wpa_s);
1923
1924
void wpa_show_license(void);
1925
1926
struct wpa_interface * wpa_supplicant_match_iface(struct wpa_global *global,
1927
              const char *ifname);
1928
struct wpa_supplicant * wpa_supplicant_add_iface(struct wpa_global *global,
1929
             struct wpa_interface *iface,
1930
             struct wpa_supplicant *parent);
1931
int wpa_supplicant_remove_iface(struct wpa_global *global,
1932
        struct wpa_supplicant *wpa_s,
1933
        int terminate);
1934
struct wpa_supplicant * wpa_supplicant_get_iface(struct wpa_global *global,
1935
             const char *ifname);
1936
struct wpa_global * wpa_supplicant_init(struct wpa_params *params);
1937
int wpa_supplicant_run(struct wpa_global *global);
1938
void wpa_supplicant_deinit(struct wpa_global *global);
1939
int wpa_supplicant_parse_config(const char *fname);
1940
1941
int wpa_supplicant_scard_init(struct wpa_supplicant *wpa_s,
1942
            struct wpa_ssid *ssid);
1943
void wpa_supplicant_terminate_proc(struct wpa_global *global);
1944
void wpa_supplicant_rx_eapol(void *ctx, const u8 *own_addr,
1945
           const u8 *buf, size_t len,
1946
           enum frame_encryption encrypted);
1947
void wpa_supplicant_update_config(struct wpa_supplicant *wpa_s);
1948
void wpa_supplicant_clear_status(struct wpa_supplicant *wpa_s);
1949
void wpas_connection_failed(struct wpa_supplicant *wpa_s, const u8 *bssid,
1950
          const u8 **link_bssids);
1951
void fils_connection_failure(struct wpa_supplicant *wpa_s);
1952
void fils_pmksa_cache_flush(struct wpa_supplicant *wpa_s);
1953
int wpas_driver_bss_selection(struct wpa_supplicant *wpa_s);
1954
bool wpas_rsn_overriding(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
1955
int wpas_is_p2p_prioritized(struct wpa_supplicant *wpa_s);
1956
void wpas_auth_failed(struct wpa_supplicant *wpa_s, const char *reason,
1957
          const u8 *bssid);
1958
void wpas_clear_temp_disabled(struct wpa_supplicant *wpa_s,
1959
            struct wpa_ssid *ssid, int clear_failures);
1960
int disallowed_bssid(struct wpa_supplicant *wpa_s, const u8 *bssid);
1961
int disallowed_ssid(struct wpa_supplicant *wpa_s, const u8 *ssid,
1962
        size_t ssid_len);
1963
void wpas_request_connection(struct wpa_supplicant *wpa_s);
1964
void wpas_request_disconnection(struct wpa_supplicant *wpa_s);
1965
int wpas_build_ext_capab(struct wpa_supplicant *wpa_s, u8 *buf, size_t buflen,
1966
       struct wpa_bss *bss);
1967
int wpas_populate_wfa_capa(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
1968
         u8 *wpa_ie, size_t wpa_ie_len,
1969
         size_t max_wpa_ie_len);
1970
int wpas_update_random_addr(struct wpa_supplicant *wpa_s,
1971
          enum wpas_mac_addr_style style,
1972
          struct wpa_ssid *ssid);
1973
int wpas_update_random_addr_disassoc(struct wpa_supplicant *wpa_s);
1974
1975
int wpas_get_op_chan_phy(int freq, const u8 *ies, size_t ies_len,
1976
       u8 *op_class, u8 *chan, u8 *phy_type);
1977
1978
int wpas_twt_send_setup(struct wpa_supplicant *wpa_s, u8 dtok, int exponent,
1979
      int mantissa, u8 min_twt, int setup_cmd, u64 twt,
1980
      bool requestor, bool trigger, bool implicit,
1981
      bool flow_type, u8 flow_id, bool protection,
1982
      u8 twt_channel, u8 control);
1983
int wpas_twt_send_teardown(struct wpa_supplicant *wpa_s, u8 flags);
1984
1985
void wpas_rrm_reset(struct wpa_supplicant *wpa_s);
1986
void wpas_rrm_process_neighbor_rep(struct wpa_supplicant *wpa_s,
1987
           const u8 *da, const u8 *sa,
1988
           const u8 *report, size_t report_len);
1989
int wpas_rrm_send_neighbor_rep_request(struct wpa_supplicant *wpa_s,
1990
               const struct wpa_ssid_value *ssid,
1991
               int lci, int civic,
1992
               void (*cb)(void *ctx,
1993
              struct wpabuf *neighbor_rep),
1994
               void *cb_ctx);
1995
void wpas_rrm_handle_radio_measurement_request(struct wpa_supplicant *wpa_s,
1996
                 const u8 *src, const u8 *dst,
1997
                 const u8 *frame, size_t len);
1998
void wpas_rrm_handle_link_measurement_request(struct wpa_supplicant *wpa_s,
1999
                const u8 *src,
2000
                const u8 *frame, size_t len,
2001
                int rssi);
2002
void wpas_rrm_refuse_request(struct wpa_supplicant *wpa_s);
2003
int wpas_beacon_rep_scan_process(struct wpa_supplicant *wpa_s,
2004
         struct wpa_scan_results *scan_res,
2005
         struct scan_info *info);
2006
void wpas_clear_beacon_rep_data(struct wpa_supplicant *wpa_s);
2007
void wpas_flush_fils_hlp_req(struct wpa_supplicant *wpa_s);
2008
void wpas_clear_disabled_interface(void *eloop_ctx, void *timeout_ctx);
2009
void wpa_supplicant_reset_bgscan(struct wpa_supplicant *wpa_s);
2010
2011
2012
/* MBO functions */
2013
int wpas_mbo_ie(struct wpa_supplicant *wpa_s, u8 *buf, size_t len,
2014
    int add_oce_capa);
2015
const u8 * mbo_attr_from_mbo_ie(const u8 *mbo_ie, enum mbo_attr_id attr);
2016
const u8 * wpas_mbo_check_assoc_disallow(struct wpa_bss *bss);
2017
void wpas_mbo_check_pmf(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
2018
      struct wpa_ssid *ssid);
2019
const u8 * mbo_get_attr_from_ies(const u8 *ies, size_t ies_len,
2020
         enum mbo_attr_id attr);
2021
int wpas_mbo_update_non_pref_chan(struct wpa_supplicant *wpa_s,
2022
          const char *non_pref_chan);
2023
void wpas_mbo_scan_ie(struct wpa_supplicant *wpa_s, struct wpabuf *ie);
2024
void wpas_mbo_ie_trans_req(struct wpa_supplicant *wpa_s, const u8 *ie,
2025
         size_t len);
2026
size_t wpas_mbo_ie_bss_trans_reject(struct wpa_supplicant *wpa_s, u8 *pos,
2027
            size_t len,
2028
            enum mbo_transition_reject_reason reason);
2029
void wpas_mbo_update_cell_capa(struct wpa_supplicant *wpa_s, u8 mbo_cell_capa);
2030
struct wpabuf * mbo_build_anqp_buf(struct wpa_supplicant *wpa_s,
2031
           struct wpa_bss *bss, u32 mbo_subtypes);
2032
void mbo_parse_rx_anqp_resp(struct wpa_supplicant *wpa_s,
2033
          struct wpa_bss *bss, const u8 *sa,
2034
          const u8 *data, size_t slen);
2035
void wpas_update_mbo_connect_params(struct wpa_supplicant *wpa_s);
2036
2037
/* op_classes.c */
2038
enum chan_allowed {
2039
  NOT_ALLOWED, NO_IR, RADAR, ALLOWED
2040
};
2041
2042
enum chan_allowed verify_channel(struct hostapd_hw_modes *mode, u8 op_class,
2043
         u8 channel, u8 bw);
2044
size_t wpas_supp_op_class_ie(struct wpa_supplicant *wpa_s,
2045
           struct wpa_ssid *ssid,
2046
           struct wpa_bss *bss, u8 *pos, size_t len);
2047
int * wpas_supp_op_classes(struct wpa_supplicant *wpa_s);
2048
2049
int wpas_enable_mac_addr_randomization(struct wpa_supplicant *wpa_s,
2050
               unsigned int type, const u8 *addr,
2051
               const u8 *mask);
2052
int wpas_disable_mac_addr_randomization(struct wpa_supplicant *wpa_s,
2053
          unsigned int type);
2054
2055
/**
2056
 * wpa_supplicant_ctrl_iface_ctrl_rsp_handle - Handle a control response
2057
 * @wpa_s: Pointer to wpa_supplicant data
2058
 * @ssid: Pointer to the network block the reply is for
2059
 * @field: field the response is a reply for
2060
 * @value: value (ie, password, etc) for @field
2061
 * Returns: 0 on success, non-zero on error
2062
 *
2063
 * Helper function to handle replies to control interface requests.
2064
 */
2065
int wpa_supplicant_ctrl_iface_ctrl_rsp_handle(struct wpa_supplicant *wpa_s,
2066
                struct wpa_ssid *ssid,
2067
                const char *field,
2068
                const char *value);
2069
2070
void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
2071
        const struct wpa_ssid *ssid,
2072
        struct hostapd_freq_params *freq);
2073
2074
/* events.c */
2075
void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s);
2076
int wpa_supplicant_connect(struct wpa_supplicant *wpa_s,
2077
         struct wpa_bss *selected,
2078
         struct wpa_ssid *ssid);
2079
void wpa_supplicant_stop_countermeasures(void *eloop_ctx, void *sock_ctx);
2080
void wpa_supplicant_delayed_mic_error_report(void *eloop_ctx, void *sock_ctx);
2081
void wnm_bss_keep_alive_deinit(struct wpa_supplicant *wpa_s);
2082
int wpa_supplicant_fast_associate(struct wpa_supplicant *wpa_s);
2083
int wpa_wps_supplicant_fast_associate(struct wpa_supplicant *wpa_s);
2084
struct wpa_bss * wpa_supplicant_pick_network(struct wpa_supplicant *wpa_s,
2085
               struct wpa_ssid **selected_ssid,
2086
               bool clear_ignorelist);
2087
int wpas_temp_disabled(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
2088
void wpa_supplicant_update_channel_list(struct wpa_supplicant *wpa_s,
2089
          struct channel_list_changed *info);
2090
int wpa_supplicant_need_to_roam_within_ess(struct wpa_supplicant *wpa_s,
2091
             struct wpa_bss *current_bss,
2092
             struct wpa_bss *selected,
2093
             bool poll_current);
2094
void wpas_reset_mlo_info(struct wpa_supplicant *wpa_s);
2095
2096
/* eap_register.c */
2097
int eap_register_methods(void);
2098
2099
/**
2100
 * Utility method to tell if a given network is for persistent group storage
2101
 * @ssid: Network object
2102
 * Returns: 1 if network is a persistent group, 0 otherwise
2103
 */
2104
static inline int network_is_persistent_group(struct wpa_ssid *ssid)
2105
0
{
2106
0
  return ssid->disabled == 2 && ssid->p2p_persistent_group;
2107
0
}
Unexecuted instantiation: bssid_ignore.c:network_is_persistent_group
Unexecuted instantiation: bss.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: 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: wpa_supplicant.c:network_is_persistent_group
Unexecuted instantiation: wpas_glue.c:network_is_persistent_group
Unexecuted instantiation: wnm.c:network_is_persistent_group
2108
2109
2110
static inline int wpas_mode_to_ieee80211_mode(enum wpas_mode mode)
2111
0
{
2112
0
  switch (mode) {
2113
0
  default:
2114
0
  case WPAS_MODE_INFRA:
2115
0
    return IEEE80211_MODE_INFRA;
2116
0
  case WPAS_MODE_IBSS:
2117
0
    return IEEE80211_MODE_IBSS;
2118
0
  case WPAS_MODE_AP:
2119
0
  case WPAS_MODE_P2P_GO:
2120
0
  case WPAS_MODE_P2P_GROUP_FORMATION:
2121
0
    return IEEE80211_MODE_AP;
2122
0
  case WPAS_MODE_MESH:
2123
0
    return IEEE80211_MODE_MESH;
2124
0
  }
2125
0
}
Unexecuted instantiation: bssid_ignore.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: bss.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: 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: wpa_supplicant.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: wpas_glue.c:wpas_mode_to_ieee80211_mode
Unexecuted instantiation: wnm.c:wpas_mode_to_ieee80211_mode
2126
2127
2128
int wpas_network_disabled(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
2129
int wpas_get_ssid_pmf(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
2130
bool sec_prof_list_has_epp(const int *numbers);
2131
bool sec_prof_list_has_sae(const int *numbers);
2132
enum sae_pwe wpas_get_ssid_sae_pwe(struct wpa_supplicant *wpa_s,
2133
           struct wpa_ssid *ssid);
2134
int pmf_in_use(struct wpa_supplicant *wpa_s, const u8 *addr);
2135
void wpa_s_setup_sae_pt(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
2136
      bool force);
2137
void wpa_s_clear_sae_rejected(struct wpa_supplicant *wpa_s);
2138
2139
bool wpas_is_sae_avoided(struct wpa_supplicant *wpa_s,
2140
      struct wpa_ssid *ssid,
2141
      const struct wpa_ie_data *ie);
2142
2143
int wpas_init_ext_pw(struct wpa_supplicant *wpa_s);
2144
2145
void dump_freq_data(struct wpa_supplicant *wpa_s, const char *title,
2146
        struct wpa_used_freq_data *freqs_data,
2147
        unsigned int len);
2148
2149
int get_shared_radio_freqs_data(struct wpa_supplicant *wpa_s,
2150
        struct wpa_used_freq_data *freqs_data,
2151
        unsigned int len, bool exclude_current);
2152
int get_shared_radio_freqs(struct wpa_supplicant *wpa_s,
2153
         int *freq_array, unsigned int len,
2154
         bool exclude_current);
2155
int disabled_freq(struct wpa_supplicant *wpa_s, int freq);
2156
2157
void wpas_network_reenabled(void *eloop_ctx, void *timeout_ctx);
2158
2159
void wpas_vendor_elem_update(struct wpa_supplicant *wpa_s);
2160
struct wpa_supplicant * wpas_vendor_elem(struct wpa_supplicant *wpa_s,
2161
           enum wpa_vendor_elem_frame frame);
2162
int wpas_vendor_elem_remove(struct wpa_supplicant *wpa_s, int frame,
2163
          const u8 *elem, size_t len);
2164
2165
#ifdef CONFIG_FST
2166
2167
struct fst_wpa_obj;
2168
2169
void fst_wpa_supplicant_fill_iface_obj(struct wpa_supplicant *wpa_s,
2170
               struct fst_wpa_obj *iface_obj);
2171
2172
#endif /* CONFIG_FST */
2173
2174
int wpas_sched_scan_plans_set(struct wpa_supplicant *wpa_s, const char *cmd);
2175
2176
struct hostapd_hw_modes * get_mode(struct hostapd_hw_modes *modes,
2177
           u16 num_modes, enum hostapd_hw_mode mode,
2178
           bool is_6ghz);
2179
struct hostapd_hw_modes * get_mode_with_freq(struct hostapd_hw_modes *modes,
2180
               u16 num_modes, int freq);
2181
2182
void wpa_bss_tmp_disallow(struct wpa_supplicant *wpa_s, const u8 *bssid,
2183
        unsigned int sec, int rssi_threshold);
2184
int wpa_is_bss_tmp_disallowed(struct wpa_supplicant *wpa_s,
2185
            struct wpa_bss *bss);
2186
void free_bss_tmp_disallowed(struct wpa_supplicant *wpa_s);
2187
2188
struct wpa_ssid * wpa_scan_res_match(struct wpa_supplicant *wpa_s,
2189
             int i, struct wpa_bss *bss,
2190
             struct wpa_ssid *group,
2191
             int only_first_ssid, int debug_print,
2192
             bool link);
2193
2194
struct wpa_bss * wpa_supplicant_select_bss(struct wpa_supplicant *wpa_s,
2195
             struct wpa_ssid *group,
2196
             struct wpa_ssid **selected_ssid,
2197
             int only_first_ssid);
2198
2199
int wpas_ctrl_iface_get_pref_freq_list_override(struct wpa_supplicant *wpa_s,
2200
            enum wpa_driver_if_type if_type,
2201
            unsigned int *num,
2202
            struct weighted_pcl *freq_list);
2203
2204
int wpa_is_fils_supported(struct wpa_supplicant *wpa_s);
2205
int wpa_is_fils_sk_pfs_supported(struct wpa_supplicant *wpa_s);
2206
2207
void wpas_clear_driver_signal_override(struct wpa_supplicant *wpa_s);
2208
2209
int wpas_send_mscs_req(struct wpa_supplicant *wpa_s);
2210
void wpas_populate_mscs_descriptor_ie(struct robust_av_data *robust_av,
2211
              struct wpabuf *buf);
2212
void wpas_handle_robust_av_recv_action(struct wpa_supplicant *wpa_s,
2213
               const u8 *dst, const u8 *src,
2214
               const u8 *buf, size_t len);
2215
void wpas_handle_assoc_resp_mscs(struct wpa_supplicant *wpa_s, const u8 *bssid,
2216
         const u8 *ies, size_t ies_len);
2217
int wpas_send_scs_req(struct wpa_supplicant *wpa_s);
2218
int wpas_scs_reconfigure(struct wpa_supplicant *wpa_s);
2219
void free_up_tclas_elem(struct scs_desc_elem *elem);
2220
void free_up_scs_desc(struct scs_robust_av_data *data);
2221
void wpas_handle_robust_av_scs_recv_action(struct wpa_supplicant *wpa_s,
2222
             const u8 *dst, const u8 *src,
2223
             const u8 *buf, size_t len);
2224
void wpas_scs_deinit(struct wpa_supplicant *wpa_s);
2225
void wpas_handle_qos_mgmt_recv_action(struct wpa_supplicant *wpa_s,
2226
              const u8 *dst, const u8 *src,
2227
              const u8 *buf, size_t len);
2228
void wpas_dscp_deinit(struct wpa_supplicant *wpa_s);
2229
int wpas_send_dscp_response(struct wpa_supplicant *wpa_s,
2230
          struct dscp_resp_data *resp_data);
2231
void wpas_handle_assoc_resp_qos_mgmt(struct wpa_supplicant *wpa_s,
2232
             const u8 *ies, size_t ies_len);
2233
int wpas_send_dscp_query(struct wpa_supplicant *wpa_s, const char *domain_name,
2234
       size_t domain_name_length);
2235
2236
int wpas_pasn_auth_start(struct wpa_supplicant *wpa_s, const u8 *own_addr,
2237
       const u8 *bssid, int akmp, int cipher,
2238
       u16 group, int network_id,
2239
       const u8 *comeback, size_t comeback_len,
2240
       unsigned int auth_alg, int group_cipher,
2241
       int group_mgmt_cipher, u16 rsn_capab,
2242
       const u8 *rsnxe_data, bool is_ml_peer,
2243
       bool ltf_keyseed_required);
2244
void wpas_pasn_auth_stop(struct wpa_supplicant *wpa_s);
2245
void wpas_pasn_free_params(struct wpa_supplicant *wpa_s);
2246
int wpas_pasn_auth_tx_status(struct wpa_supplicant *wpa_s,
2247
           const u8 *data, size_t data_len, u8 acked);
2248
int wpas_pasn_auth_rx(struct wpa_supplicant *wpa_s,
2249
          const struct ieee80211_mgmt *mgmt, size_t len);
2250
int wpas_pasn_get_group(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
2251
      struct pasn_data *pasn);
2252
2253
int wpas_pasn_deauthenticate(struct wpa_supplicant *wpa_s, const u8 *own_addr,
2254
           const u8 *bssid);
2255
void wpas_pasn_auth_trigger(struct wpa_supplicant *wpa_s,
2256
          struct pasn_auth *pasn_auth);
2257
void wpas_pasn_auth_work_done(struct wpa_supplicant *wpa_s, int status);
2258
struct sae_pt * wpas_pasn_sae_derive_pt_for_eppke(struct wpa_ssid *ssid,
2259
              int group);
2260
bool wpas_is_6ghz_supported(struct wpa_supplicant *wpa_s, bool only_enabled);
2261
2262
bool wpa_is_non_eht_scs_traffic_desc_supported(struct wpa_bss *bss);
2263
bool wpas_ap_link_address(struct wpa_supplicant *wpa_s, const u8 *addr);
2264
bool wpas_ap_supports_rsn_overriding(struct wpa_supplicant *wpa_s,
2265
             struct wpa_bss *bss);
2266
bool wpas_ap_supports_rsn_overriding_2(struct wpa_supplicant *wpa_s,
2267
               struct wpa_bss *bss);
2268
int wpas_get_owe_trans_network(const u8 *owe_ie, const u8 **bssid,
2269
             const u8 **ssid, size_t *ssid_len);
2270
void wpas_update_dfs_ap_info(struct wpa_supplicant *wpa_s, int freq,
2271
           enum chan_width ap_ch_width,
2272
           bool disconnect_evt);
2273
void wpas_configure_frame_filters(struct wpa_supplicant *wpa_s);
2274
2275
static inline bool wpas_is_nan_iface(struct wpa_supplicant *wpa_s)
2276
0
{
2277
#ifdef CONFIG_NAN
2278
  return wpa_s->nan_mgmt || wpa_s->nan_data;
2279
#else /* CONFIG_NAN */
2280
  return false;
2281
0
#endif /* CONFIG_NAN */
2282
0
}
Unexecuted instantiation: bssid_ignore.c:wpas_is_nan_iface
Unexecuted instantiation: bss.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: 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: wpa_supplicant.c:wpas_is_nan_iface
Unexecuted instantiation: wpas_glue.c:wpas_is_nan_iface
Unexecuted instantiation: wnm.c:wpas_is_nan_iface
2283
2284
bool wpas_eppke_ap_capable(struct wpa_supplicant *wpa_s,
2285
         struct wpa_bss *bss, bool unauth_eppke);
2286
bool wpas_eppke_ap_rsnx_capab(struct wpa_supplicant *wpa_s,
2287
            struct wpa_bss *bss, unsigned int capab);
2288
2289
bool wpas_security_profile_active(struct wpa_supplicant *wpa_s);
2290
2291
/*
2292
 * Security Profile element helper functions (wpa_supplicant.c).
2293
 * Used by both wpa_supplicant_set_suites() and BSS selection
2294
 * (wpa_supplicant_ssid_bss_match() in events.c).
2295
 */
2296
const struct security_profile_entry *
2297
security_profile_select_best(const u8 *sp, const int *numbers);
2298
int security_profile_get_key_mgmt(const u8 *sp, int ssid_key_mgmt);
2299
const u8 * security_profile_get_rsnx(const u8 *sp, size_t *rsnx_len);
2300
int security_profile_get_rsn_caps(const u8 *sp);
2301
bool sec_prof_list_has_eap_over_auth(const int *numbers);
2302
bool security_profile_is_enabled(const u8 *sp, int profile);
2303
2304
#endif /* WPA_SUPPLICANT_I_H */