Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3493883pxb; Mon, 18 Oct 2021 16:52:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyryF4dvbpPCYPrnkmgzjNL0uhf3hWOQYYIRkdWEF1lH/UArwBVj0L5Pr5Gp7AIEdLwveHZ X-Received: by 2002:a17:906:1456:: with SMTP id q22mr32651570ejc.291.1634601133288; Mon, 18 Oct 2021 16:52:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634601133; cv=none; d=google.com; s=arc-20160816; b=RltccQMs0giqmQoBEt0IeBqeqXGpNpNy2owHX9bxytZurfu5AqafrWO37nwmzct9Cn nkgHig9EZdGRNVrMAOZ8Yo9p9Q1r9coLCWnUirhV/BtzSu7EZQNxCnNvfIh4xhqvNMOt QhVWJLsn9091Prt19OPNoObhU2wwFFU+JE8T9gOSbLWrbgDm2lsc45e9KjDEzJ33bERZ uFp4JaSp8BIGXV2tjwsuyMpDEFyCl3OX7uxKfVw8Q6kWh2GfTLsVHkPCVUkmVooEAQyO WWyOqYvXymhwNh+dU9nTtk5bfcqeX0rXkF023a1Mio61QYP4B+N7saoGa34rcorGvfOF RZlw== 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=QS8T7uwGUONjzZR4Cu/vZxmvqc23Lnqw2M2qb6UC7lw=; b=VkSzLw0kVNDji+qLYv/U/B3R+9cTCezzsdI1qxwL9emHMB2cSbUxyg+lBUVejsmXT7 NGs91hc4puzf7kepdMd4weWImCumglJJBVc2qwDm71lgq1pxU5NVGGmTG0MKc4zgDFpR m/CD5qbdMRPPco7gZMRLlhNhEJGQuAt+ElnmETTla2BKFpgY0tuEdXWtALsl1OwAsOX9 sn29kTw9bbMEixjJQEhgB35UbwdwfocCVGhap4tPI4SwQRaSaVXmv6kuhOjDUaIlykAd 1qcsAg3zAzpgjO+gj8HSDMUcGZITv+OldZNCpkaYj26XSYleqOW44wpzmxl1DtMHffM0 8/bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LoFGHBPG; 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 d2si20222196edy.32.2021.10.18.16.51.58; Mon, 18 Oct 2021 16:52:13 -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=LoFGHBPG; 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 S233669AbhJRXws (ORCPT + 64 others); Mon, 18 Oct 2021 19:52:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:35098 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233465AbhJRXwn (ORCPT ); Mon, 18 Oct 2021 19:52:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D55EE61263; Mon, 18 Oct 2021 23:50:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634601032; bh=FKcDdTU5soWw0lsJvOd/rPFAVLe46GuoH4+QCsmTUD0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LoFGHBPG8xx48ht+av+s5ERVVDE4oJqrhyDAddJgvfzpZN9Z6nSGCQdnqZHUjCsGb NTZGJ7DCPgcLjuT5ZCxszHdNv9ev437IfSsMMOj/b6D5544D9vShSVm3ZEeOLiMWkg /V5JZ8d6WxyPISJP4eGIXZ3EK77AxSFLNwwCzhFgvnOy5t6DPEQSrRl+3/pVJDJWeJ yNZKXbjQSndJ2I3IYtJAuEDF2IQ6jv7sR6WzsU/E9mO0Ex9dh6AZy6LOo9KhkVF3i0 SwlmVP2aWMISDY0sahfctCgSy5p3rEItIoWrpfTVGdxfS6fgtpUNy7KR3ulElkiScl EBamRJ8/fdfig== From: Jakub Kicinski To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, Jakub Kicinski Subject: [PATCH 15/15] wireless: zd1201: use eth_hw_addr_set() Date: Mon, 18 Oct 2021 16:50:21 -0700 Message-Id: <20211018235021.1279697-16-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: kvalo@codeaurora.org CC: linux-wireless@vger.kernel.org --- drivers/net/wireless/zydas/zd1201.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/zydas/zd1201.c b/drivers/net/wireless/zydas/zd1201.c index 6b735fee7b18..e64e4e579518 100644 --- a/drivers/net/wireless/zydas/zd1201.c +++ b/drivers/net/wireless/zydas/zd1201.c @@ -507,7 +507,7 @@ static int zd1201_getconfig(struct zd1201 *zd, int rid, void *riddata, * byte data[12] * total: 16 */ -static int zd1201_setconfig(struct zd1201 *zd, int rid, void *buf, int len, int wait) +static int zd1201_setconfig(struct zd1201 *zd, int rid, const void *buf, int len, int wait) { int err; unsigned char *request; @@ -1729,6 +1729,7 @@ static int zd1201_probe(struct usb_interface *interface, int err; short porttype; char buf[IW_ESSID_MAX_SIZE+2]; + u8 addr[ETH_ALEN]; usb = interface_to_usbdev(interface); @@ -1779,10 +1780,10 @@ static int zd1201_probe(struct usb_interface *interface, dev->watchdog_timeo = ZD1201_TX_TIMEOUT; strcpy(dev->name, "wlan%d"); - err = zd1201_getconfig(zd, ZD1201_RID_CNFOWNMACADDR, - dev->dev_addr, dev->addr_len); + err = zd1201_getconfig(zd, ZD1201_RID_CNFOWNMACADDR, addr, ETH_ALEN); if (err) goto err_start; + eth_hw_addr_set(dev, addr); /* Set wildcard essid to match zd->essid */ *(__le16 *)buf = cpu_to_le16(0); -- 2.31.1