Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1572230
| From | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] net: ethernet: bgmac: mac address change bug |
| Date | 2017-02-02 11:00 +0100 |
| Message-ID | <t6mlk-2a2-5@gated-at.bofh.it> (permalink) |
| References | <t6bJf-3KV-15@gated-at.bofh.it> <t6bSV-3Oo-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/2] net: ethernet: bgmac: bug fixes Jon Mason <jon.mason@broadcom.com> - 2017-02-01 23:40 +0100
[PATCH 1/2] net: ethernet: bgmac: init sequence bug Jon Mason <jon.mason@broadcom.com> - 2017-02-01 23:40 +0100
Re: [PATCH 1/2] net: ethernet: bgmac: init sequence bug Rafał Miłecki <rafal@milecki.pl> - 2017-02-02 00:50 +0100
Re: [PATCH 1/2] net: ethernet: bgmac: init sequence bug Zac Schroff <zachary.schroff@broadcom.com> - 2017-02-02 01:40 +0100
Re: [PATCH 1/2] net: ethernet: bgmac: init sequence bug Jon Mason <jon.mason@broadcom.com> - 2017-02-02 21:30 +0100
Re: [PATCH 1/2] net: ethernet: bgmac: init sequence bug Rafał Miłecki <rafal@milecki.pl> - 2017-02-03 03:20 +0100
Re: [PATCH 1/2] net: ethernet: bgmac: init sequence bug Jon Mason <jon.mason@broadcom.com> - 2017-02-02 20:00 +0100
Re: [PATCH 1/2] net: ethernet: bgmac: init sequence bug Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2017-02-02 10:50 +0100
[PATCH 2/2] net: ethernet: bgmac: mac address change bug Jon Mason <jon.mason@broadcom.com> - 2017-02-01 23:50 +0100
Re: [PATCH 2/2] net: ethernet: bgmac: mac address change bug Rafał Miłecki <rafal@milecki.pl> - 2017-02-02 01:30 +0100
Re: [PATCH 2/2] net: ethernet: bgmac: mac address change bug Jon Mason <jon.mason@broadcom.com> - 2017-02-02 19:20 +0100
Re: [PATCH 2/2] net: ethernet: bgmac: mac address change bug Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2017-02-02 11:00 +0100
csiph-web