Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
wifi_utils.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12
13#ifndef ZEPHYR_INCLUDE_NET_WIFI_UTILS_H_
14#define ZEPHYR_INCLUDE_NET_WIFI_UTILS_H_
15
16#include <zephyr/net/wifi.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
27
34
36#define WIFI_UTILS_MAX_BAND_STR_LEN 3
37
39#define WIFI_UTILS_MAX_CHAN_STR_LEN 4
40
63int wifi_utils_parse_scan_bands(char *scan_bands_str, uint8_t *band_map);
64
65
76int wifi_utils_parse_scan_ssids(char *scan_ssids_str,
77 const char *ssids[],
78 uint8_t num_ssids);
79
80
109int wifi_utils_parse_scan_chan(char *scan_chan_str,
110 struct wifi_band_channel *chan,
111 uint8_t max_channels);
112
113
124 uint16_t chan);
125
135
145
155
171
175
179
180#ifdef __cplusplus
181}
182#endif
183#endif /* ZEPHYR_INCLUDE_NET_WIFI_UTILS_H_ */
wifi_frequency_bands
IEEE 802.11 operational frequency bands (not exhaustive).
Definition wifi.h:298
bool wifi_utils_validate_chan_6g(uint16_t chan)
Validate a channel against the 6 GHz band.
int wifi_utils_parse_scan_ssids(char *scan_ssids_str, const char *ssids[], uint8_t num_ssids)
Append a string containing an SSID to an array of SSID strings.
int wifi_utils_parse_scan_bands(char *scan_bands_str, uint8_t *band_map)
Convert a band specification string to a bitmap representing the bands.
enum wifi_frequency_bands wifi_utils_chan_to_band(uint16_t chan)
Get the frequency band a channel belongs to.
int wifi_utils_parse_scan_chan(char *scan_chan_str, struct wifi_band_channel *chan, uint8_t max_channels)
Convert a string containing a specification of scan channels to an array.
bool wifi_utils_validate_chan_5g(uint16_t chan)
Validate a channel against the 5 GHz band.
bool wifi_utils_validate_chan(uint8_t band, uint16_t chan)
Validate a channel against a band.
bool wifi_utils_validate_chan_2g(uint16_t chan)
Validate a channel against the 2.4 GHz band.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Wi-Fi structure to uniquely identify a band-channel pair.
Definition wifi_mgmt.h:602
IEEE 802.11 protocol and general Wi-Fi definitions.
WiFi L2 stack public header.