diff options
author | Alexander Aring <aar@pengutronix.de> | 2016-04-11 11:04:17 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2016-04-13 10:41:09 +0200 |
commit | 5a7f97e570fbe0ae7e6fd035f7af0cd6a1a9baa1 (patch) | |
tree | 04272a12f081b95585218b35e61cefc5855180ea /net/ieee802154 | |
parent | 9e3b71f3436415f917eb569cde792b223cceebc0 (diff) | |
download | linux-stable-5a7f97e570fbe0ae7e6fd035f7af0cd6a1a9baa1.tar.gz linux-stable-5a7f97e570fbe0ae7e6fd035f7af0cd6a1a9baa1.tar.bz2 linux-stable-5a7f97e570fbe0ae7e6fd035f7af0cd6a1a9baa1.zip |
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>
Diffstat (limited to 'net/ieee802154')
-rw-r--r-- | net/ieee802154/6lowpan/6lowpan_i.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ieee802154/6lowpan/6lowpan_i.h b/net/ieee802154/6lowpan/6lowpan_i.h index b4e17a7c0df0..b4092a9ff24a 100644 --- a/net/ieee802154/6lowpan/6lowpan_i.h +++ b/net/ieee802154/6lowpan/6lowpan_i.h @@ -41,7 +41,7 @@ static inline u32 ieee802154_addr_hash(const struct ieee802154_addr *a) return (((__force u64)a->extended_addr) >> 32) ^ (((__force u64)a->extended_addr) & 0xffffffff); case IEEE802154_ADDR_SHORT: - return (__force u32)(a->short_addr); + return (__force u32)(a->short_addr + (a->pan_id << 16)); default: return 0; } |