Search Linux Wireless

Re: [PATCH] Modify is_zero_ether_addr() to handle byte-aligned addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 12, 2016 at 8:26 PM, David Miller <davem@xxxxxxxxxxxxx> wrote:
> From: Petri Gynther <pgynther@xxxxxxxxxx>
> Date: Fri, 12 Aug 2016 17:15:30 -0700
>
>> Root cause:
>> mwifiex driver calls is_zero_ether_addr() against byte-aligned address:
>
> MAC addresses really must be 16-bit aligned to be used with any of the
> ethernet address manipulation and test interfaces.
>
> Therefore this driver should do whatever it takes to avoid passing
> a byte-aligned MAC address anywhere.
>
> We _SHOULD NOT_ add support for byte aligned addresses to these
> interfaces, nor add routines which by-name can handle them.
>

ether_addr_equal_unaligned() exists.

commit 73eaef87e98a96fe8b8a586f916b2721bf512efa
Author: Joe Perches <joe@xxxxxxxxxxx>
Date:   Fri Dec 6 14:21:01 2013 -0800

    etherdevice: Add ether_addr_equal_unaligned

    Add a generic routine to test if possibly unaligned
    to u16 Ethernet addresses are equal.

    If CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is set,
    this uses the slightly faster generic routine
    ether_addr_equal, otherwise this uses memcmp.

    Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>

> Fix this driver instead of polluting out common interfaces
> unnecessarily.
>

Amitkumar -- is this fixable in mwifiex driver and firmware? It looks
like your firmware expects u8 specific_bssid[ETH_ALEN] at byte offset
1, per struct mwifiex_scan_cmd_config definition.

I'll let Marvell take it from here.

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



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux