}
-static struct wpabuf * fst_hostapd_get_mb_ie_cb(void *ctx, const u8 *addr)
+static const struct wpabuf * fst_hostapd_get_mb_ie_cb(void *ctx, const u8 *addr)
{
struct hostapd_data *hapd = ctx;
struct sta_info *sta = ap_get_sta(hapd, addr);
* @addr: Address of the STA
* Returns: MB IE buffer, %NULL if no MB IE received from the STA
*/
- struct wpabuf * (*get_mb_ie)(void *ctx, const u8 *addr);
+ const struct wpabuf * (*get_mb_ie)(void *ctx, const u8 *addr);
/**
* update_mb_ie - Update last MB IE received from STA
u8 peer_addr[ETH_ALEN];
struct fst_group *g;
struct fst_iface *iface = NULL;
- struct wpabuf *mbies;
+ const struct wpabuf *mbies;
if (fst_read_next_text_param(params, ifname, sizeof(ifname), &endp) ||
!*ifname)
static int print_band(unsigned num, struct fst_iface *iface, const u8 *addr,
char *buf, size_t buflen)
{
- struct wpabuf *wpabuf;
+ const struct wpabuf *wpabuf;
enum hostapd_hw_mode hw_mode;
u8 channel;
int ret = 0;
addr = fst_iface_get_peer_first(other, &ctx, TRUE);
for (; addr; addr = fst_iface_get_peer_next(other, &ctx, TRUE)) {
- struct wpabuf *mbies = fst_iface_get_peer_mb_ie(other, addr);
-
- if (mbies) {
- u8 other_iface_peer_addr[ETH_ALEN];
- struct fst_iface *other_new_iface =
- fst_group_get_new_iface_by_mbie_and_band_id(
- g,
- wpabuf_head(mbies), wpabuf_len(mbies),
- iface_band_id, other_iface_peer_addr);
- if (other_new_iface == iface &&
- os_memcmp(iface_addr, other_iface_peer_addr,
- ETH_ALEN)) {
- os_memcpy(peer_addr, addr, ETH_ALEN);
- return TRUE;
- }
+ const struct wpabuf *mbies;
+ u8 other_iface_peer_addr[ETH_ALEN];
+ struct fst_iface *other_new_iface;
+
+ mbies = fst_iface_get_peer_mb_ie(other, addr);
+ if (!mbies)
+ continue;
+
+ other_new_iface = fst_group_get_new_iface_by_mbie_and_band_id(
+ g, wpabuf_head(mbies), wpabuf_len(mbies),
+ iface_band_id, other_iface_peer_addr);
+ if (other_new_iface == iface &&
+ os_memcmp(iface_addr, other_iface_peer_addr,
+ ETH_ALEN) != 0) {
+ os_memcpy(peer_addr, addr, ETH_ALEN);
+ return TRUE;
}
}
return i->iface_obj.send_action(i->iface_obj.ctx, addr, data);
}
-static inline struct wpabuf * fst_iface_get_peer_mb_ie(struct fst_iface *i,
- const u8 *addr)
+static inline const struct wpabuf *
+fst_iface_get_peer_mb_ie(struct fst_iface *i, const u8 *addr)
{
return i->iface_obj.get_mb_ie(i->iface_obj.ctx, addr);
}
struct fst_iface *new_iface = NULL;
struct fst_group *g;
u8 new_iface_peer_addr[ETH_ALEN];
- struct wpabuf *peer_mbies;
+ const struct wpabuf *peer_mbies;
size_t plen;
if (frame_len < IEEE80211_HDRLEN + 1 + sizeof(*req)) {
}
-static struct wpabuf * wpas_fst_get_mb_ie_cb(void *ctx, const u8 *addr)
+static const struct wpabuf * wpas_fst_get_mb_ie_cb(void *ctx, const u8 *addr)
{
struct wpa_supplicant *wpa_s = ctx;