]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WNM: Convert BSSID Info into a u32
authorJouni Malinen <j@w1.fi>
Sat, 22 Nov 2014 11:43:17 +0000 (13:43 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 22 Nov 2014 15:03:15 +0000 (17:03 +0200)
This is more convenient to use than u8 array.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/wnm_sta.c
wpa_supplicant/wnm_sta.h

index 48f1be4b973f8e2395aae5e16ea641537a688da7..732179fe6df5cd6862ee89bc4749a757261b1440 100644 (file)
@@ -448,7 +448,7 @@ static void wnm_parse_neighbor_report(struct wpa_supplicant *wpa_s,
        }
 
        os_memcpy(rep->bssid, pos, ETH_ALEN);
-       os_memcpy(rep->bssid_information, pos + ETH_ALEN, 4);
+       rep->bssid_info = WPA_GET_LE32(pos + ETH_ALEN);
        rep->regulatory_class = *(pos + 10);
        rep->channel_number = *(pos + 11);
        rep->phy_type = *(pos + 12);
@@ -628,8 +628,9 @@ static void wnm_dump_cand_list(struct wpa_supplicant *wpa_s)
 
                nei = &wpa_s->wnm_neighbor_report_elements[i];
                wpa_printf(MSG_DEBUG, "%u: " MACSTR
-                          " op_class=%u chan=%u phy=%u pref=%d",
-                          i, MAC2STR(nei->bssid), nei->regulatory_class,
+                          " info=0x%x op_class=%u chan=%u phy=%u pref=%d",
+                          i, MAC2STR(nei->bssid), nei->bssid_info,
+                          nei->regulatory_class,
                           nei->channel_number, nei->phy_type,
                           nei->bss_tran_can ? nei->bss_tran_can->preference :
                           -1);
index d2eb96dd38b942ea3ab96b0631f37cddaae56142..22a0730fa704e5a1cb3e2169cc66bc881a604a5d 100644 (file)
@@ -48,7 +48,7 @@ struct multiple_bssid {
 
 struct neighbor_report {
        u8 bssid[ETH_ALEN];
-       u8 bssid_information[4];
+       u32 bssid_info;
        u8 regulatory_class;
        u8 channel_number;
        u8 phy_type;