2015-01-08 12:48:29 +01:00
|
|
|
/*
|
|
|
|
* Common hostapd/wpa_supplicant HW features
|
|
|
|
* Copyright (c) 2002-2013, Jouni Malinen <j@w1.fi>
|
|
|
|
* Copyright (c) 2015, Qualcomm Atheros, Inc.
|
|
|
|
*
|
|
|
|
* This software may be distributed under the terms of the BSD license.
|
|
|
|
* See README for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef HW_FEATURES_COMMON_H
|
|
|
|
#define HW_FEATURES_COMMON_H
|
|
|
|
|
|
|
|
#include "drivers/driver.h"
|
|
|
|
|
|
|
|
struct hostapd_channel_data * hw_get_channel_chan(struct hostapd_hw_modes *mode,
|
|
|
|
int chan, int *freq);
|
2019-11-18 07:30:06 +01:00
|
|
|
struct hostapd_channel_data *
|
|
|
|
hw_get_channel_freq(enum hostapd_hw_mode mode, int freq, int *chan,
|
|
|
|
struct hostapd_hw_modes *hw_features, int num_hw_features);
|
2015-01-08 12:48:29 +01:00
|
|
|
|
|
|
|
int hw_get_freq(struct hostapd_hw_modes *mode, int chan);
|
2019-11-18 07:30:06 +01:00
|
|
|
int hw_get_chan(enum hostapd_hw_mode mode, int freq,
|
|
|
|
struct hostapd_hw_modes *hw_features, int num_hw_features);
|
2015-01-08 12:48:29 +01:00
|
|
|
|
2015-01-08 12:48:31 +01:00
|
|
|
int allowed_ht40_channel_pair(struct hostapd_hw_modes *mode, int pri_chan,
|
|
|
|
int sec_chan);
|
2015-01-08 12:48:32 +01:00
|
|
|
void get_pri_sec_chan(struct wpa_scan_res *bss, int *pri_chan, int *sec_chan);
|
2015-01-08 12:48:33 +01:00
|
|
|
int check_40mhz_5g(struct hostapd_hw_modes *mode,
|
|
|
|
struct wpa_scan_results *scan_res, int pri_chan,
|
|
|
|
int sec_chan);
|
2015-01-08 12:48:35 +01:00
|
|
|
int check_40mhz_2g4(struct hostapd_hw_modes *mode,
|
|
|
|
struct wpa_scan_results *scan_res, int pri_chan,
|
|
|
|
int sec_chan);
|
2015-02-19 07:15:47 +01:00
|
|
|
int hostapd_set_freq_params(struct hostapd_freq_params *data,
|
|
|
|
enum hostapd_hw_mode mode,
|
2019-09-11 11:03:07 +02:00
|
|
|
int freq, int channel, int edmg, u8 edmg_channel,
|
|
|
|
int ht_enabled,
|
2019-05-20 09:55:09 +02:00
|
|
|
int vht_enabled, int he_enabled,
|
|
|
|
int sec_channel_offset,
|
2019-05-20 09:55:07 +02:00
|
|
|
int oper_chwidth, int center_segment0,
|
2019-05-20 09:55:09 +02:00
|
|
|
int center_segment1, u32 vht_caps,
|
|
|
|
struct he_capabilities *he_caps);
|
2017-01-27 05:43:19 +01:00
|
|
|
void set_disable_ht40(struct ieee80211_ht_capabilities *htcaps,
|
|
|
|
int disabled);
|
2017-02-14 06:13:42 +01:00
|
|
|
int ieee80211ac_cap_check(u32 hw, u32 conf);
|
2015-01-08 12:48:31 +01:00
|
|
|
|
2018-03-01 12:49:27 +01:00
|
|
|
u32 num_chan_to_bw(int num_chans);
|
|
|
|
int chan_bw_allowed(const struct hostapd_channel_data *chan, u32 bw,
|
|
|
|
int ht40_plus, int pri);
|
|
|
|
int chan_pri_allowed(const struct hostapd_channel_data *chan);
|
|
|
|
|
2015-01-08 12:48:29 +01:00
|
|
|
#endif /* HW_FEATURES_COMMON_H */
|