| 1 |
/* |
| 2 |
* Common hostapd/wpa_supplicant HW features |
| 3 |
* Copyright (c) 2002-2013, Jouni Malinen <[email protected]> |
| 4 |
* Copyright (c) 2015, Qualcomm Atheros, Inc. |
| 5 |
* |
| 6 |
* This software may be distributed under the terms of the BSD license. |
| 7 |
* See README for more details. |
| 8 |
*/ |
| 9 |
|
| 10 |
#ifndef HW_FEATURES_COMMON_H |
| 11 |
#define HW_FEATURES_COMMON_H |
| 12 |
|
| 13 |
#include "drivers/driver.h" |
| 14 |
|
| 15 |
struct hostapd_channel_data * hw_get_channel_chan(struct hostapd_hw_modes *mode, |
| 16 |
int chan, int *freq); |
| 17 |
struct hostapd_channel_data * |
| 18 |
hw_mode_get_channel(struct hostapd_hw_modes *mode, int freq, int *chan); |
| 19 |
|
| 20 |
struct hostapd_channel_data * |
| 21 |
hw_get_channel_freq(enum hostapd_hw_mode mode, int freq, int *chan, |
| 22 |
struct hostapd_hw_modes *hw_features, int num_hw_features); |
| 23 |
|
| 24 |
int hw_get_freq(struct hostapd_hw_modes *mode, int chan); |
| 25 |
int hw_get_chan(enum hostapd_hw_mode mode, int freq, |
| 26 |
struct hostapd_hw_modes *hw_features, int num_hw_features); |
| 27 |
|
| 28 |
int allowed_ht40_channel_pair(enum hostapd_hw_mode mode, |
| 29 |
struct hostapd_channel_data *p_chan, |
| 30 |
struct hostapd_channel_data *s_chan); |
| 31 |
void get_pri_sec_chan(struct wpa_scan_res *bss, int *pri_chan, int *sec_chan); |
| 32 |
int check_40mhz_5g(struct wpa_scan_results *scan_res, |
| 33 |
struct hostapd_channel_data *pri_chan, |
| 34 |
struct hostapd_channel_data *sec_chan); |
| 35 |
int check_40mhz_2g4(struct hostapd_hw_modes *mode, |
| 36 |
struct wpa_scan_results *scan_res, int pri_chan, |
| 37 |
int sec_chan); |
| 38 |
int hostapd_set_freq_params(struct hostapd_freq_params *data, |
| 39 |
enum hostapd_hw_mode mode, |
| 40 |
int freq, int channel, int edmg, u8 edmg_channel, |
| 41 |
int ht_enabled, |
| 42 |
int vht_enabled, int he_enabled, |
| 43 |
int sec_channel_offset, |
| 44 |
int oper_chwidth, int center_segment0, |
| 45 |
int center_segment1, u32 vht_caps, |
| 46 |
struct he_capabilities *he_caps); |
| 47 |
void set_disable_ht40(struct ieee80211_ht_capabilities *htcaps, |
| 48 |
int disabled); |
| 49 |
int ieee80211ac_cap_check(u32 hw, u32 conf); |
| 50 |
|
| 51 |
u32 num_chan_to_bw(int num_chans); |
| 52 |
int chan_bw_allowed(const struct hostapd_channel_data *chan, u32 bw, |
| 53 |
int ht40_plus, int pri); |
| 54 |
int chan_pri_allowed(const struct hostapd_channel_data *chan); |
| 55 |
|
| 56 |
#endif /* HW_FEATURES_COMMON_H */ |