developer | 091dbc3 | 2024-03-21 17:16:35 +0800 | [diff] [blame^] | 1 | From 153d95998a8ae64588aa3edabed2f052e1dfca09 Mon Sep 17 00:00:00 2001 |
| 2 | From: Evelyn Tsai <evelyn.tsai@mediatek.com> |
| 3 | Date: Wed, 20 Mar 2024 07:17:31 +0800 |
| 4 | Subject: [PATCH 02/69] backport: hostapd: export hostapd_is_usable_chans |
| 5 | utility routine |
| 6 | |
| 7 | This is a preliminary patch to introduce AFC support. |
| 8 | |
| 9 | Tested-by: Allen Ye <allen.ye@mediatek.com> |
| 10 | Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> |
| 11 | --- |
| 12 | src/ap/hw_features.c | 2 +- |
| 13 | src/ap/hw_features.h | 6 ++++++ |
| 14 | 2 files changed, 7 insertions(+), 1 deletion(-) |
| 15 | |
| 16 | diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c |
| 17 | index fd401d78a..e652d7504 100644 |
| 18 | --- a/src/ap/hw_features.c |
| 19 | +++ b/src/ap/hw_features.c |
| 20 | @@ -995,7 +995,7 @@ static bool hostapd_is_usable_punct_bitmap(struct hostapd_iface *iface) |
| 21 | * 0 = not usable |
| 22 | * -1 = not currently usable due to 6 GHz NO-IR |
| 23 | */ |
| 24 | -static int hostapd_is_usable_chans(struct hostapd_iface *iface) |
| 25 | +int hostapd_is_usable_chans(struct hostapd_iface *iface) |
| 26 | { |
| 27 | int secondary_freq; |
| 28 | struct hostapd_channel_data *pri_chan; |
| 29 | diff --git a/src/ap/hw_features.h b/src/ap/hw_features.h |
| 30 | index c682c6d20..eeffb1abd 100644 |
| 31 | --- a/src/ap/hw_features.h |
| 32 | +++ b/src/ap/hw_features.h |
| 33 | @@ -30,6 +30,7 @@ void hostapd_stop_setup_timers(struct hostapd_iface *iface); |
| 34 | int hostapd_hw_skip_mode(struct hostapd_iface *iface, |
| 35 | struct hostapd_hw_modes *mode); |
| 36 | int hostapd_determine_mode(struct hostapd_iface *iface); |
| 37 | +int hostapd_is_usable_chans(struct hostapd_iface *iface); |
| 38 | #else /* NEED_AP_MLME */ |
| 39 | static inline void |
| 40 | hostapd_free_hw_features(struct hostapd_hw_modes *hw_features, |
| 41 | @@ -103,6 +104,11 @@ static inline int hostapd_determine_mode(struct hostapd_iface *iface) |
| 42 | return 0; |
| 43 | } |
| 44 | |
| 45 | +static inline int hostapd_is_usable_chans(struct hostapd_iface *iface) |
| 46 | +{ |
| 47 | + return 1; |
| 48 | +} |
| 49 | + |
| 50 | #endif /* NEED_AP_MLME */ |
| 51 | |
| 52 | #endif /* HW_FEATURES_H */ |
| 53 | -- |
| 54 | 2.39.2 |
| 55 | |