* [PATCH v2] net: fix wrong length of mac address
@ 2013-01-18 7:51 Amos Kong
2013-01-18 9:00 ` Waskiewicz Jr, Peter P
[not found] ` <20130118083031.GA2303@ppwaskie-mobl2.amr.corp.intel.com>
0 siblings, 2 replies; 6+ messages in thread
From: Amos Kong @ 2013-01-18 7:51 UTC (permalink / raw)
To: davem, kys, haiyangz; +Cc: netdev, Amos Kong, devel
Typo, it should be ETH_ALEN.
Signed-off-by: Amos Kong <kongjianjun@gmail.com>
---
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;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v2] net: fix wrong length of mac address
2013-01-18 7:51 [PATCH v2] net: fix wrong length of mac address Amos Kong
@ 2013-01-18 9:00 ` Waskiewicz Jr, Peter P
[not found] ` <20130118083031.GA2303@ppwaskie-mobl2.amr.corp.intel.com>
1 sibling, 0 replies; 6+ messages in thread
From: Waskiewicz Jr, Peter P @ 2013-01-18 9:00 UTC (permalink / raw)
To: Amos Kong; +Cc: davem, kys, haiyangz, netdev, devel
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@gmail.com>
> ---
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <20130118083031.GA2303@ppwaskie-mobl2.amr.corp.intel.com>]
* Re: [PATCH v2] net: fix wrong length of mac address
[not found] ` <20130118083031.GA2303@ppwaskie-mobl2.amr.corp.intel.com>
@ 2013-01-18 19:36 ` David Miller
2013-01-19 2:52 ` [PATCH v3] net/hyperv: " Amos Kong
1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2013-01-18 19:36 UTC (permalink / raw)
To: WaskiewiczJr; +Cc: kongjianjun, kys, haiyangz, netdev, devel
From: PJ Waskiewicz <WaskiewiczJr@ppwaskie-mobl2>
Date: Fri, 18 Jan 2013 00:30:32 -0800
> 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@gmail.com>
>> ---
>> 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 also update drivers/net/hyperv/hyperv_net.h
> to also fix the mac_adr definition in struct netvsc_device_info:
>
> struct netvsc_device_info {
>>>> unsigned char mac_adr[6];
Agreed.
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH v3] net/hyperv: fix wrong length of mac address
[not found] ` <20130118083031.GA2303@ppwaskie-mobl2.amr.corp.intel.com>
2013-01-18 19:36 ` David Miller
@ 2013-01-19 2:52 ` Amos Kong
2013-01-19 15:07 ` Haiyang Zhang
1 sibling, 1 reply; 6+ messages in thread
From: Amos Kong @ 2013-01-19 2:52 UTC (permalink / raw)
To: davem, kys, haiyangz; +Cc: netdev, devel, Amos Kong
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>
---
v2: update commitlog, fix cc list
v3: fix hardcode length in hyperv_net.h
---
drivers/net/hyperv/hyperv_net.h | 2 +-
drivers/net/hyperv/netvsc_drv.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 5fd6f46..e6fe0d8 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -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;
};
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;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 6+ messages in thread* RE: [PATCH v3] net/hyperv: fix wrong length of mac address
2013-01-19 2:52 ` [PATCH v3] net/hyperv: " Amos Kong
@ 2013-01-19 15:07 ` Haiyang Zhang
2013-01-19 16:02 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Haiyang Zhang @ 2013-01-19 15:07 UTC (permalink / raw)
To: Amos Kong, davem@davemloft.net, KY Srinivasan
Cc: netdev@vger.kernel.org, devel@linuxdriverproject.org
> From: Amos Kong
> Sent: Friday, January 18, 2013 9:52 PM
> To: davem@davemloft.net; KY Srinivasan; Haiyang Zhang
> Cc: netdev@vger.kernel.org; devel@linuxdriverproject.org; Amos Kong
> Subject: [PATCH v3] 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: Amos Kong <kongjianjun@gmail.com>
> ---
> v2: update commitlog, fix cc list
> v3: fix hardcode length in hyperv_net.h
> ---
Acked-by: Haiyang Zhang <haiyangz@microsoft.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] net/hyperv: fix wrong length of mac address
2013-01-19 15:07 ` Haiyang Zhang
@ 2013-01-19 16:02 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2013-01-19 16:02 UTC (permalink / raw)
To: haiyangz; +Cc: kongjianjun, kys, netdev, devel
From: Haiyang Zhang <haiyangz@microsoft.com>
Date: Sat, 19 Jan 2013 15:07:14 +0000
>> From: Amos Kong
>
>> Sent: Friday, January 18, 2013 9:52 PM
>> To: davem@davemloft.net; KY Srinivasan; Haiyang Zhang
>> Cc: netdev@vger.kernel.org; devel@linuxdriverproject.org; Amos Kong
>> Subject: [PATCH v3] 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: Amos Kong <kongjianjun@gmail.com>
>> ---
>> v2: update commitlog, fix cc list
>> v3: fix hardcode length in hyperv_net.h
>> ---
>
> Acked-by: Haiyang Zhang <haiyangz@microsoft.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-01-19 16:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-18 7:51 [PATCH v2] net: fix wrong length of mac address Amos Kong
2013-01-18 9:00 ` Waskiewicz Jr, Peter P
[not found] ` <20130118083031.GA2303@ppwaskie-mobl2.amr.corp.intel.com>
2013-01-18 19:36 ` David Miller
2013-01-19 2:52 ` [PATCH v3] net/hyperv: " Amos Kong
2013-01-19 15:07 ` Haiyang Zhang
2013-01-19 16:02 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox