diff options
author | Frank Leipold <frank.leipold@eads.net> | 2008-10-20 09:37:53 -0400 |
---|---|---|
committer | David Vrabel <david.vrabel@csr.com> | 2008-10-20 09:37:53 -0400 |
commit | c15895ef30c2c03e99802951787183039a349d32 (patch) | |
tree | cfa8bcce5793150db930564c26b3d0f83b2bc63e /drivers/uwb/beacon.c | |
parent | 8092d7c9789581eea478c40d615a2632c3af17bb (diff) |
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>
Diffstat (limited to 'drivers/uwb/beacon.c')
-rw-r--r-- | drivers/uwb/beacon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/uwb/beacon.c b/drivers/uwb/beacon.c index c7f3c972f07d..46b18eec5026 100644 --- a/drivers/uwb/beacon.c +++ b/drivers/uwb/beacon.c | |||
@@ -207,7 +207,7 @@ struct uwb_beca_e *__uwb_beca_find_bymac(const struct uwb_mac_addr *mac_addr) | |||
207 | struct uwb_beca_e *bce, *next; | 207 | struct uwb_beca_e *bce, *next; |
208 | list_for_each_entry_safe(bce, next, &uwb_beca.list, node) { | 208 | list_for_each_entry_safe(bce, next, &uwb_beca.list, node) { |
209 | if (!memcmp(bce->mac_addr, mac_addr->data, | 209 | if (!memcmp(bce->mac_addr, mac_addr->data, |
210 | sizeof(bce->mac_addr))) | 210 | sizeof(struct uwb_mac_addr))) |
211 | goto out; | 211 | goto out; |
212 | } | 212 | } |
213 | bce = NULL; | 213 | bce = NULL; |