aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/hw_features.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ap/hw_features.c')
-rw-r--r--src/ap/hw_features.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
index 0900e78..930d35b 100644
--- a/src/ap/hw_features.c
+++ b/src/ap/hw_features.c
@@ -796,3 +796,21 @@ int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq)
return 0;
}
+
+
+int hostapd_hw_get_channel_flag(struct hostapd_data *hapd, int chan)
+{
+ int i;
+
+ if (!hapd->iface->current_mode)
+ return 0;
+
+ for (i = 0; i < hapd->iface->current_mode->num_channels; i++) {
+ struct hostapd_channel_data *ch =
+ &hapd->iface->current_mode->channels[i];
+ if (ch->chan == chan)
+ return ch->flag;
+ }
+
+ return 0;
+}