Skip to content

Commit

Permalink
net/hyperv: fix wrong length of mac address
Browse files Browse the repository at this point in the history
This patch fixed wrong mac length, it should be ETH_ALEN,
also replaced the hardcode 6 in hyperv_net.h

Signed-off-by: Amos Kong <kongjianjun@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jianjun Kong authored and David S. Miller committed Jan 19, 2013
1 parent c1acd70 commit 9a4c831
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/hyperv/hyperv_net.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ struct hv_netvsc_packet {
};

struct netvsc_device_info {
unsigned char mac_adr[6];
unsigned char mac_adr[ETH_ALEN];
bool link_state; /* 0 - link up, 1 - link down */
int ring_size;
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/hyperv/netvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 9a4c831

Please sign in to comment.