From 2bb51eddad7d877566e42a17368f2767b3aab0a0 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 17 Jul 2015 16:55:08 +0300 Subject: [PATCH] FST: Move fst_mbie_get_peer_addr() into fst_group.c 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 --- src/fst/fst_group.c | 21 +++++++++++++++++++++ src/fst/fst_internal.h | 21 --------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/fst/fst_group.c b/src/fst/fst_group.c index 8e731375f..3880f5e9c 100644 --- a/src/fst/fst_group.c +++ b/src/fst/fst_group.c @@ -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, diff --git a/src/fst/fst_internal.h b/src/fst/fst_internal.h index 948c5568e..8f7b1a7a9 100644 --- a/src/fst/fst_internal.h +++ b/src/fst/fst_internal.h @@ -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;