mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Jon Mason <jon.mason@broadcom.com>, David Miller <davem@davemloft.net>
Cc: rafal@milecki.pl, bcm-kernel-feedback-list@broadcom.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Hari Vyas <hariv@broadcom.com>
Subject: Re: [PATCH 2/2] net: ethernet: bgmac: mac address change bug
Date: Thu, 2 Feb 2017 12:49:59 +0300	[thread overview]
Message-ID: <bb8075a0-a8cb-f3a2-19bb-d36e473ec509@cogentembedded.com> (raw)
In-Reply-To: <1485988752-21030-3-git-send-email-jon.mason@broadcom.com>

On 2/2/2017 1:39 AM, Jon Mason wrote:

> From: Hari Vyas <hariv@broadcom.com>
>
> ndo_set_mac_address() passes struct sockaddr * as 2nd parameter to
> bgmac_set_mac_address() but code assumed u8 *.  This caused two bytes
> chopping and the wrong mac address was configured.
>
> Signed-off-by: Hari Vyas <hariv@broadcom.com>
> Signed-off-by: Jon Mason <jon.mason@broadcom.com>
> Fixes: 4e209001b86 ("bgmac: write mac address to hardware in ndo_set_mac_address")
> ---
>  drivers/net/ethernet/broadcom/bgmac.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
> index 0e066dc6..ea24072 100644
> --- a/drivers/net/ethernet/broadcom/bgmac.c
> +++ b/drivers/net/ethernet/broadcom/bgmac.c
> @@ -1222,11 +1222,15 @@ static int bgmac_set_mac_address(struct net_device *net_dev, void *addr)
>  {
>  	struct bgmac *bgmac = netdev_priv(net_dev);
>  	int ret;
> +	struct sockaddr *sa = addr;

    DaveM prefers the declarations to be arranged from longest to shortest.

[...]

MBR, Sergei

      parent reply	other threads:[~2017-02-02  9:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-01 22:39 [PATCH 0/2] net: ethernet: bgmac: bug fixes Jon Mason
2017-02-01 22:39 ` [PATCH 1/2] net: ethernet: bgmac: init sequence bug Jon Mason
2017-02-01 23:06   ` Rafał Miłecki
2017-02-02  0:31     ` Zac Schroff
2017-02-02 20:15       ` Rafał Miłecki
2017-02-02 20:20         ` Jon Mason
2017-02-02 18:54     ` Jon Mason
2017-02-02  9:47   ` Sergei Shtylyov
2017-02-01 22:39 ` [PATCH 2/2] net: ethernet: bgmac: mac address change bug Jon Mason
2017-02-01 23:12   ` Rafał Miłecki
2017-02-02 18:13     ` Jon Mason
2017-02-02  9:49   ` Sergei Shtylyov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bb8075a0-a8cb-f3a2-19bb-d36e473ec509@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=hariv@broadcom.com \
    --cc=jon.mason@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rafal@milecki.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®