From: Alexander Aring Date: Mon, 11 Apr 2016 09:04:17 +0000 (+0200) Subject: ieee802154: 6lowpan: fix short addr hash X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5a7f97e570fbe0ae7e6fd035f7af0cd6a1a9baa1;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Alexander Aring Acked-by: Jukka Rissanen Signed-off-by: Marcel Holtmann --- 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; }