On Mon, 2015-02-23 at 22:52 +0100, Johannes Berg wrote:

> We also can't rely on 4-byte alignment though, so perhaps we should do
> something like
> 
> u32 sta_info_hash(void *addr, u32 len, u32 seed)
> {
>       u16 *a = addr;
> 
>       return jhash_3words(a[0], a[1], a[2], seed);
> }

Or better do

        return jhash_2words(addr[0], (addr[1] << 16) | addr[2], seed);

since I have no idea how the missing high 16 bits would behave.
(we can rely on 2-byte alignment, but not 4-byte)

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to