]>
git.ipfire.org Git - thirdparty/hostap.git/blob - src/common/hw_features_common.c
2 * Common hostapd/wpa_supplicant HW features
3 * Copyright (c) 2002-2013, Jouni Malinen <j@w1.fi>
4 * Copyright (c) 2015, Qualcomm Atheros, Inc.
6 * This software may be distributed under the terms of the BSD license.
7 * See README for more details.
14 #include "hw_features_common.h"
17 struct hostapd_channel_data
* hw_get_channel_chan(struct hostapd_hw_modes
*mode
,
28 for (i
= 0; i
< mode
->num_channels
; i
++) {
29 struct hostapd_channel_data
*ch
= &mode
->channels
[i
];
30 if (ch
->chan
== chan
) {
41 struct hostapd_channel_data
* hw_get_channel_freq(struct hostapd_hw_modes
*mode
,
52 for (i
= 0; i
< mode
->num_channels
; i
++) {
53 struct hostapd_channel_data
*ch
= &mode
->channels
[i
];
54 if (ch
->freq
== freq
) {
65 int hw_get_freq(struct hostapd_hw_modes
*mode
, int chan
)
69 hw_get_channel_chan(mode
, chan
, &freq
);
75 int hw_get_chan(struct hostapd_hw_modes
*mode
, int freq
)
79 hw_get_channel_freq(mode
, freq
, &chan
);