Re: [PATCH v2] net: fix wrong length of mac address

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

 



On Fri, Jan 18, 2013 at 03:51:54PM +0800, Amos Kong wrote:
> Typo, it should be ETH_ALEN.
> 
> Signed-off-by: Amos Kong <kongjianjun@xxxxxxxxx>
> ---
> v2: update commitlog, fix cc list
> ---
>  drivers/net/hyperv/netvsc_drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
> index f825a62..8264f0e 100644
> --- a/drivers/net/hyperv/netvsc_drv.c
> +++ b/drivers/net/hyperv/netvsc_drv.c
> @@ -349,7 +349,7 @@ static int netvsc_set_mac_addr(struct net_device *ndev, void *p)
>  	struct net_device_context *ndevctx = netdev_priv(ndev);
>  	struct hv_device *hdev =  ndevctx->device_ctx;
>  	struct sockaddr *addr = p;
> -	char save_adr[14];
> +	char save_adr[ETH_ALEN];
>  	unsigned char save_aatype;
>  	int err;

While you're at it, you should fix drivers/net/hyperv/hyperv_net.h:

struct netvsc_device_info {
>>>     unsigned char mac_adr[6];
        bool link_state;        /* 0 - link up, 1 - link down */
        int  ring_size;
};

Cheers,
-PJ
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux