Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3493239pxb; Mon, 18 Oct 2021 16:51:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyleL+b2/uwHJH0pdm3c2x2EfNAJcPDMhky9atwgAB73b7H/ekUQ/JrDOOdXv9TrSMSQOKd X-Received: by 2002:a17:906:cd11:: with SMTP id oz17mr34177915ejb.67.1634601074067; Mon, 18 Oct 2021 16:51:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634601074; cv=none; d=google.com; s=arc-20160816; b=xrJX46OoATXHPgpjncExCxsAo9qZEVY78/xLJKS0i+wlgBXI3vPse+6rw3bbnTFglU hj9lI0/G2uzqxAcHGkk0KrvSwwPCId5rO7gXlh6/SPiqFA+4BXaoR8IR5DjMEsHeHm7+ oBRidLY0sX8yT6jctq3fPf5bV7Pw/D+jIaQrMExjAd0gbOJjyx1bdZ5b0XHC4PL4T+WO GYEVmgRbhs0Bq2lWAFansPa3ng1VEtHG49Xt9p82EBlIcUfvccjxRGci7OvSLeRc42xB /C7EdQ2FSR/2BcFGQHigvhEEB/eEikCLAIxSVi00HOFxuOOcVA8sldjUBT5CvKsR+oUQ Pncw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=O0gcJ2Mb+vO0WAFSJaiCXUitV/I1B3w+thRANfXFZPc=; b=PUT7tG8cjXz1RZNt5yJIl8fHm4GK4BmrQRUfMZUsOfibp+1WuzjggSIX6DdPdgkkZG ygnEFDTpHdsVxGwCxS5bs5GtqxMX36G6LOQYOZD/2/NThghO7sZiRgM0DfIBs270xaR+ +I6FKtq7Uk3q92TNMhCr0kqOh4lBDu5hTOCrX50OcD6C+OTt2BzWu90HsLl3vNrPXVQI tRc6yr/KxIF3aF1Gty6v/VLyrwCgFiXZL5KgfADaweuSS12A9t5dyiOTnmmFihVRcsJu znhc3oUpEPQF0PmeDKK2Wo2TJkMdOetov2WAQyKoSodp2dIJ/imoxkaOo10HQB9GHpXj NqbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Aefl9/yN"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j26si22008714ejd.175.2021.10.18.16.50.59; Mon, 18 Oct 2021 16:51:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Aefl9/yN"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233559AbhJRXwq (ORCPT + 64 others); Mon, 18 Oct 2021 19:52:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:35060 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233395AbhJRXwm (ORCPT ); Mon, 18 Oct 2021 19:52:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A78756128A; Mon, 18 Oct 2021 23:50:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634601030; bh=5wULzODvrAyrwTGlx9z5JklV+k/oNgcKP11IvnpY3Dw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Aefl9/yNWHgSxtrBTemrGBEmfzbI3NkkTIAm9ZYQ7C1HSBLeMuQvoYMcyBlnn8aIY 0VcjbSe32K+m0YlfxBggEYdDHKaOKnu5uKORXtwsFDV9sav6dCuCJeR/CQSHDmpWFA WLELYRgeA78CwOiOgBiNfW/gGtVgSDPnF06yqB7ugyEzeBJQ4/kFnxhTSI+KXI4JeU EVyGYikajoUs/WhfQ8nSe+17FBxy1Aa5m2hHsk4T2rWzWW7R3CgB3HGLaDHFFgQdCb Oamoit96/infQOslSd6e4JJ99LP5qO/k9zUcuECP3NhQ6XFwtC1mLDtjWH3u167Wza +oCfR01532JJA== From: Jakub Kicinski To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, Jakub Kicinski , johannes@sipsolutions.net Subject: [PATCH 11/15] wireless: mac80211_hwsim: use eth_hw_addr_set() Date: Mon, 18 Oct 2021 16:50:17 -0700 Message-Id: <20211018235021.1279697-12-kuba@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211018235021.1279697-1-kuba@kernel.org> References: <20211018235021.1279697-1-kuba@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Commit 406f42fa0d3c ("net-next: When a bond have a massive amount of VLANs...") introduced a rbtree for faster Ethernet address look up. To maintain netdev->dev_addr in this tree we need to make all the writes to it got through appropriate helpers. Signed-off-by: Jakub Kicinski --- CC: johannes@sipsolutions.net CC: kvalo@codeaurora.org CC: linux-wireless@vger.kernel.org --- drivers/net/wireless/mac80211_hwsim.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 0adae76eb8df..8d0ae99eca94 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -3527,13 +3527,16 @@ static const struct net_device_ops hwsim_netdev_ops = { static void hwsim_mon_setup(struct net_device *dev) { + u8 addr[ETH_ALEN]; + dev->netdev_ops = &hwsim_netdev_ops; dev->needs_free_netdev = true; ether_setup(dev); dev->priv_flags |= IFF_NO_QUEUE; dev->type = ARPHRD_IEEE80211_RADIOTAP; - eth_zero_addr(dev->dev_addr); - dev->dev_addr[0] = 0x12; + eth_zero_addr(addr); + addr[0] = 0x12; + eth_hw_addr_set(dev, addr); } static struct mac80211_hwsim_data *get_hwsim_data_ref_from_addr(const u8 *addr) -- 2.31.1