FST: Move fst_mbie_get_peer_addr() into fst_group.c
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 17 Jul 2015 13:55:08 +0000 (16:55 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 17 Jul 2015 16:06:48 +0000 (19:06 +0300)
There is no need for this function to be an inline function in a header
file since it is used only within fst_group.c.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/fst/fst_group.c
src/fst/fst_internal.h

index 8e73137..3880f5e 100644 (file)
@@ -201,6 +201,27 @@ static struct wpabuf * fst_group_create_mb_ie(struct fst_group *g,
 }
 
 
+static const u8 * fst_mbie_get_peer_addr(const struct multi_band_ie *mbie)
+{
+       const u8 *peer_addr = NULL;
+
+       switch (MB_CTRL_ROLE(mbie->mb_ctrl)) {
+       case MB_STA_ROLE_AP:
+               peer_addr = mbie->bssid;
+               break;
+       case MB_STA_ROLE_NON_PCP_NON_AP:
+               if (mbie->mb_ctrl & MB_CTRL_STA_MAC_PRESENT &&
+                   IE_BUFFER_LENGTH(mbie->len) >= sizeof(*mbie) + ETH_ALEN)
+                       peer_addr = (const u8 *) &mbie[1];
+               break;
+       default:
+               break;
+       }
+
+       return peer_addr;
+}
+
+
 static struct fst_iface *
 fst_group_get_new_iface_by_mbie_and_band_id(struct fst_group *g,
                                            const u8 *mb_ies_buff,
index 948c556..8f7b1a7 100644 (file)
@@ -48,27 +48,6 @@ fst_hw_mode_to_band(enum hostapd_hw_mode mode)
 #define IE_HEADER_SIZE               ((u8) (2 * sizeof(u8)))
 #define IE_BUFFER_LENGTH(ie_len_val) ((size_t) ((ie_len_val) + IE_HEADER_SIZE))
 
-static inline const u8 *
-fst_mbie_get_peer_addr(const struct multi_band_ie *mbie)
-{
-       const u8 *peer_addr = NULL;
-
-       switch (MB_CTRL_ROLE(mbie->mb_ctrl)) {
-       case MB_STA_ROLE_AP:
-               peer_addr = mbie->bssid;
-               break;
-       case MB_STA_ROLE_NON_PCP_NON_AP:
-               if (mbie->mb_ctrl & MB_CTRL_STA_MAC_PRESENT &&
-                   IE_BUFFER_LENGTH(mbie->len) >= sizeof(*mbie) + ETH_ALEN)
-                       peer_addr = (const u8 *) &mbie[1];
-               break;
-       default:
-               break;
-       }
-
-       return peer_addr;
-}
-
 struct fst_ctrl_handle {
        struct fst_ctrl ctrl;
        struct dl_list global_ctrls_lentry;