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 <jouni@qca.qualcomm.com>
This commit is contained in:
parent
b7a07937ee
commit
2bb51eddad
2 changed files with 21 additions and 21 deletions
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue