WNM: Convert BSSID Info into a u32

This is more convenient to use than u8 array.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-11-22 13:43:17 +02:00
parent 8040dc53c2
commit 4c381f0d1c
2 changed files with 5 additions and 4 deletions

View 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);

View 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;