12#ifndef __WS80211_UTILS_H__
13#define __WS80211_UTILS_H__
24enum ws80211_channel_type {
27 WS80211_CHAN_HT40MINUS,
28 WS80211_CHAN_HT40PLUS,
31 WS80211_CHAN_VHT80P80,
36#define CHAN_NO_HT "NOHT"
37#define CHAN_HT20 "HT20"
38#define CHAN_HT40MINUS "HT40-"
39#define CHAN_HT40PLUS "HT40+"
40#define CHAN_HE40 "HE40"
41#define CHAN_VHT80 "VHT80"
42#define CHAN_VHT80P80 "VHT80+80"
43#define CHAN_VHT160 "VHT160"
44#define CHAN_EHT320 "EHT320"
49enum ws80211_band_type {
55enum ws80211_fcs_validation {
86 enum ws80211_channel_type current_chan_type;
87 int current_center_freq1;
88 int current_center_freq2;
89 enum ws80211_fcs_validation current_fcs_validation;
98#define WS80211_ERROR_NOT_SUPPORTED 1
99#define WS80211_ERROR 2
155int ws80211_set_freq(
const char *name, uint32_t freq,
int chan_type, uint32_t _U_ center_freq, uint32_t _U_ center_freq2);
Definition ws80211_utils.h:68
Definition ws80211_utils.h:62
Definition ws80211_utils.h:84
Definition ws80211_utils.h:74
GArray * ws80211_find_interfaces(void)
Definition ws80211_utils.c:1179
void ws80211_clear_band(struct ws80211_band *band)
Clear the frequencies array in a ws80211_band structure.
Definition ws80211_utils.c:1244
int ws80211_str_to_chan_type(const char *s)
Convert a string representation of a channel type to its corresponding enum value.
const char * ws80211_geterror(int error)
Definition ws80211_utils.c:1174
int ws80211_set_freq(const char *name, uint32_t freq, int chan_type, uint32_t _U_ center_freq, uint32_t _U_ center_freq2)
Set the frequency and channel width for an interface.
int ws80211_set_fcs_validation(const char *name, enum ws80211_fcs_validation fcs_validation)
Set the FCS validation behavior for an interface.
int ws80211_init(void)
Definition ws80211_utils.c:1169
const char * ws80211_band_type_to_str(enum ws80211_band_type type)
Convert a Wi-Fi band type to its string representation.
Definition ws80211_utils.c:1204
const char * ws80211_get_helper_path(void)
Get the path to a helper application.
Definition ws80211_utils.c:1219
int ws80211_get_iface_info(const char *name, struct ws80211_iface_info *iface_info)
Get information about a wireless interface.
const char * ws80211_chan_type_to_str(enum ws80211_channel_type type)
Convert a Wi-Fi channel type to its string representation.
Definition ws80211_utils.c:1199
int ws80211_get_center_frequency(int control_frequency, enum ws80211_channel_type channel_type)
Return center frequency of an 80M/160M/320M channel.
Definition ws80211_utils.c:1251
void ws80211_free_interfaces(GArray *interfaces)
Free an interface list.
Definition ws80211_utils.c:1227
bool ws80211_has_fcs_filter(void)
Check to see if we have FCS filtering.
Definition ws80211_utils.c:1209