1
0
Fork 0

uwb: wrong sizeof argument in mac address compare

In the __uwb_beca_find_bymac function the sizeof returns
the length of a pointer and not the data it is referring
to. Hence only the first 4 bytes were compared, not the
entire 6 bytes MAC address. Now the sizeof takes struct
uwb_mac_addr as argument.

Signed-off-by: Frank Leipold <frank.leipold@eads.net>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
wifi-calibration
Frank Leipold 2008-10-20 14:37:53 +01:00 committed by David Vrabel
parent 8092d7c978
commit c15895ef30
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ struct uwb_beca_e *__uwb_beca_find_bymac(const struct uwb_mac_addr *mac_addr)
struct uwb_beca_e *bce, *next;
list_for_each_entry_safe(bce, next, &uwb_beca.list, node) {
if (!memcmp(bce->mac_addr, mac_addr->data,
sizeof(bce->mac_addr)))
sizeof(struct uwb_mac_addr)))
goto out;
}
bce = NULL;