Commit 5a7f97e570fbe0ae7e6fd035f7af0cd6a1a9baa1
Committed by
Marcel Holtmann
1 parent
9e3b71f343
ieee802154: 6lowpan: fix short addr hash
The short address is unique in combination with the panid. This patch will add the panid for generating an ieee802154 address hash. Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com> Signed-off-by: Alexander Aring <aar@pengutronix.de> Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
net/ieee802154/6lowpan/6lowpan_i.h
... | ... | @@ -41,7 +41,7 @@ |
41 | 41 | return (((__force u64)a->extended_addr) >> 32) ^ |
42 | 42 | (((__force u64)a->extended_addr) & 0xffffffff); |
43 | 43 | case IEEE802154_ADDR_SHORT: |
44 | - return (__force u32)(a->short_addr); | |
44 | + return (__force u32)(a->short_addr + (a->pan_id << 16)); | |
45 | 45 | default: |
46 | 46 | return 0; |
47 | 47 | } |