Received: by 10.223.164.221 with SMTP id h29csp1896641wrb; Thu, 2 Nov 2017 02:39:36 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QJcm4+O16YpOKUeqoplEqeUcUQVTyTu+PCvXlUSfkgycKa/6plm1UdlfTrctLblyMZN86m X-Received: by 10.84.129.2 with SMTP id 2mr2635338plb.270.1509615576397; Thu, 02 Nov 2017 02:39:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509615576; cv=none; d=google.com; s=arc-20160816; b=a+W+aOhUaN9/Gqky0pstU1GIuVp+Bn8FD4BsxKrgjmWPrrLjVb8nhpiYi2tPNo1MGD rZ3hWgLKNfG56hzRsSMrao4KMkdK9/YuM4dLZu6nhmZHRMxIMYmbCS0ra+vlCwyOFq+K B8W34vX7vtGwCYe71rPbONDjw5FQyf4rJTD9zynQLX5S2KCw4sbsnai5DEFEesOiPijb txkDdJJ3axnFXZNNvrVbrx5s/nxUOq7oEptARdSNiVu4yBppJRkYxd49bRTN22UuaHKU CX7XxyNntodZcWU4Ng3xBjJEZronZrCi+iJliJsHCeq6LyJ5VvOsi/QRB5PKBeSdvI7Z tpKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=PPe19mEQpfSetizClriyakBAF0ofSLQKDTOqgOAeDoc=; b=B2dwLC27N8u4PhIb/LnZgRsyzckT87mZNB2eInJPT3HaBccb46CMDn3BF6WgUztx3T H+3ncv7rT6WpA2WRJ4tMwIlyhHf5C8IobIng6bcCAcIo/s9VL9dAMeHDHpC08XL0TWnM Tc/8+NShndzD38yPcSdMLwSiImBUDuxyRkbPaQ2z8iem2ajG0Xn5Q/q/UZnrNSLHXVV4 jhwMPAs0P9wCT0VYX6+dIHnsKX1GvC5uKbPflSHCZ4k1FAp58oe3WndxMUBLxM3HOsb0 nqKoXR/KJ9lytaYB7s5Qpvwf6n9C8+ROq8tNFZTwIi+Lg39LO2k0MlF/UpZ7wEDtMnLR 27jA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x18si3256765pge.118.2017.11.02.02.39.21; Thu, 02 Nov 2017 02:39:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933473AbdKBJhO (ORCPT + 99 others); Thu, 2 Nov 2017 05:37:14 -0400 Received: from aibo.runbox.com ([91.220.196.211]:46048 "EHLO aibo.runbox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933294AbdKBJhN (ORCPT ); Thu, 2 Nov 2017 05:37:13 -0400 Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1eABvr-0002g9-8z; Thu, 02 Nov 2017 10:37:03 +0100 Received: from 93.89.113.32.ip.vitnett.no ([93.89.113.32] helo=localhost.localdomain) by mailfront10.runbox.com with esmtpsa (uid:646232 ) (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1eABvf-00020j-V7; Thu, 02 Nov 2017 10:36:51 +0100 From: Egil Hjelmeland To: andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com, rafal@milecki.pl, stephen@networkplumber.org, bridge@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Egil Hjelmeland Subject: [PATCH net-next] net: Define eth_stp_addr in linux/etherdevice.h Date: Thu, 2 Nov 2017 10:36:48 +0100 Message-Id: <20171102093648.4141-1-privat@egil-hjelmeland.no> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Why: The lan9303 driver defines eth_stp_addr as a synonym to eth_reserved_addr_base to get the STP ethernet address 01:80:c2:00:00:00. eth_reserved_addr_base is also used to define the start of Bridge Reserved ethernet address range, which happen to be the STP address. br_dev_setup refer to eth_reserved_addr_base as a definition of STP address. Clean up by: - Move the eth_stp_addr definition to linux/etherdevice.h - Use eth_stp_addr instead of eth_reserved_addr_base in br_dev_setup. Signed-off-by: Egil Hjelmeland --- include/linux/dsa/lan9303.h | 2 -- include/linux/etherdevice.h | 1 + net/bridge/br_device.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/linux/dsa/lan9303.h b/include/linux/dsa/lan9303.h index b2110e69630f..05d8d136baab 100644 --- a/include/linux/dsa/lan9303.h +++ b/include/linux/dsa/lan9303.h @@ -34,5 +34,3 @@ struct lan9303 { **/ struct lan9303_alr_cache_entry alr_cache[LAN9303_NUM_ALR_RECORDS]; }; - -#define eth_stp_addr eth_reserved_addr_base diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 2d9f80848d4b..263dbcad22fc 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h @@ -66,6 +66,7 @@ int eth_gro_complete(struct sk_buff *skb, int nhoff); /* Reserved Ethernet Addresses per IEEE 802.1Q */ static const u8 eth_reserved_addr_base[ETH_ALEN] __aligned(2) = { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x00 }; +#define eth_stp_addr eth_reserved_addr_base /** * is_link_local_ether_addr - Determine if given Ethernet address is link-local diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index 28bb22186fa0..af5b8c87f590 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c @@ -421,7 +421,7 @@ void br_dev_setup(struct net_device *dev) br->bridge_id.prio[0] = 0x80; br->bridge_id.prio[1] = 0x00; - ether_addr_copy(br->group_addr, eth_reserved_addr_base); + ether_addr_copy(br->group_addr, eth_stp_addr); br->stp_enabled = BR_NO_STP; br->group_fwd_mask = BR_GROUPFWD_DEFAULT; -- 2.11.0 From 1583031544739927237@xxx Fri Nov 03 08:08:46 +0000 2017 X-GM-THRID: 1583031544739927237 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread