Browse Source

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 <j@w1.fi>
Jouni Malinen 9 years ago
parent
commit
8f997f044f
2 changed files with 18 additions and 16 deletions
  1. 17 0
      src/fst/fst.c
  2. 1 16
      src/fst/fst_internal.h

+ 17 - 0
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;
+	}
+}

+ 1 - 16
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;