Patchwork net: fix wrong length of mac address

login
register
mail settings
Submitter Jianjun Kong
Date Jan. 18, 2013, 2:15 a.m.
Message ID <1358475321-3406-1-git-send-email-kongjianjun@gmail.com>
Download mbox | patch
Permalink /patch/213431/
State Superseded
Delegated to: David Miller
Headers show

Comments

Jianjun Kong - Jan. 18, 2013, 2:15 a.m.
Replace hardcode 14 with defined ETN_ALEN.

Signed-off-by: Amos Kong <kongjianjun@gmail.com>
---
 drivers/net/hyperv/netvsc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Dan Carpenter - Jan. 18, 2013, 7:14 a.m.
You should still CC Haiyang Zhang and KY (as well as netdev).  Use
./scripts/get_maintainer.pl -f drivers/net/hyperv/netvsc_drv.c
to find out where to send patches.

On Fri, Jan 18, 2013 at 10:15:21AM +0800, Amos Kong wrote:
> Replace hardcode 14 with defined ETN_ALEN.
                                     ^
Typo.  It should be ETH_ALEN.

regards,
dan carpenter

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

Patch

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;