From 8f997f044f4d024cd2b775614da1b9fe13f43c38 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 26 Jul 2015 16:34:35 +0300 Subject: [PATCH] FST: Make fst_hw_mode_to_band() non-inline function There is no need for using an inline function for this. Save a bit in binary size by using a normal function. Signed-off-by: Jouni Malinen --- src/fst/fst.c | 17 +++++++++++++++++ src/fst/fst_internal.h | 17 +---------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/fst/fst.c b/src/fst/fst.c index a65b41c54..288087021 100644 --- a/src/fst/fst.c +++ b/src/fst/fst.c @@ -206,3 +206,20 @@ Boolean fst_are_ifaces_aggregated(struct fst_iface *iface1, { return fst_iface_get_group(iface1) == fst_iface_get_group(iface2); } + + +enum mb_band_id fst_hw_mode_to_band(enum hostapd_hw_mode mode) +{ + switch (mode) { + case HOSTAPD_MODE_IEEE80211B: + case HOSTAPD_MODE_IEEE80211G: + return MB_BAND_ID_WIFI_2_4GHZ; + case HOSTAPD_MODE_IEEE80211A: + return MB_BAND_ID_WIFI_5GHZ; + case HOSTAPD_MODE_IEEE80211AD: + return MB_BAND_ID_WIFI_60GHZ; + default: + WPA_ASSERT(0); + return MB_BAND_ID_WIFI_2_4GHZ; + } +} diff --git a/src/fst/fst_internal.h b/src/fst/fst_internal.h index d5a875faa..9fe32b854 100644 --- a/src/fst/fst_internal.h +++ b/src/fst/fst_internal.h @@ -28,22 +28,7 @@ fst_printf_group(fst_iface_get_group(iface), (level), "%s: " format, \ fst_iface_get_name(iface), ##__VA_ARGS__) -static inline enum mb_band_id -fst_hw_mode_to_band(enum hostapd_hw_mode mode) -{ - switch (mode) { - case HOSTAPD_MODE_IEEE80211B: - case HOSTAPD_MODE_IEEE80211G: - return MB_BAND_ID_WIFI_2_4GHZ; - case HOSTAPD_MODE_IEEE80211A: - return MB_BAND_ID_WIFI_5GHZ; - case HOSTAPD_MODE_IEEE80211AD: - return MB_BAND_ID_WIFI_60GHZ; - default: - WPA_ASSERT(0); - return MB_BAND_ID_WIFI_2_4GHZ; - } -} +enum mb_band_id fst_hw_mode_to_band(enum hostapd_hw_mode mode); struct fst_ctrl_handle { struct fst_ctrl ctrl;