Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a4c831e authored by Jianjun Kong's avatar Jianjun Kong Committed by David S. Miller
Browse files

net/hyperv: fix wrong length of mac address



This patch fixed wrong mac length, it should be ETH_ALEN,
also replaced the hardcode 6 in hyperv_net.h

Signed-off-by: default avatarAmos Kong <kongjianjun@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c1acd709
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -84,7 +84,7 @@ struct hv_netvsc_packet {
};
};


struct netvsc_device_info {
struct netvsc_device_info {
	unsigned char mac_adr[6];
	unsigned char mac_adr[ETH_ALEN];
	bool link_state;	/* 0 - link up, 1 - link down */
	bool link_state;	/* 0 - link up, 1 - link down */
	int  ring_size;
	int  ring_size;
};
};
+1 −1
Original line number Original line Diff line number Diff line
@@ -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 net_device_context *ndevctx = netdev_priv(ndev);
	struct hv_device *hdev =  ndevctx->device_ctx;
	struct hv_device *hdev =  ndevctx->device_ctx;
	struct sockaddr *addr = p;
	struct sockaddr *addr = p;
	char save_adr[14];
	char save_adr[ETH_ALEN];
	unsigned char save_aatype;
	unsigned char save_aatype;
	int err;
	int err;