Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp238068ybl; Sun, 1 Dec 2019 01:20:40 -0800 (PST) X-Google-Smtp-Source: APXvYqziBOrgBtSyyMy6lOmc3yBIonAYRgmYyvjq7FS27FMy6uAsh1EQfgFpo9Wfu66NoRx+kY7r X-Received: by 2002:aa7:d711:: with SMTP id t17mr3437764edq.41.1575192040769; Sun, 01 Dec 2019 01:20:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575192040; cv=none; d=google.com; s=arc-20160816; b=cb3elLhIlHmQpzOwhgXdNWdsjPvvHBsHUb6G6/v0PeT5OZ9c1X4KD3W5TPrf/zU3rM +4TTLvpIFLeFyInKU2pvElVYyTXVzZKUUPnXcWsfaP9NxJpED8333wS0BkZ51yYyzGal FIL/56zGT+GdDmSXZsAoqrG7ETg2q6ZVL5L/O1KRhdOnBDC9H+uoybPWYHLhsEQ3jhMU zNjz+ob6O8udlqYCaFz7/UEI+097eA6RWzeBCRhtl3yMHX+nRd/dh/waf83djjjxkVmg i3Dy7TyuoOG7TvLO5Fuaoqkl6PKZuq/KM1BKQs9lhfFKCo80lFfh9NwzZfnlCqvvBHzc 9oIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=OMr/yoUW+qA9/ZLoCyPJd3pj9rzPVzSNyn8/mH2kBKk=; b=x/EQlddo+zpDeFP2pydLcAmcjg0uRaUMb0oimpOtw6NDKyUYEf8gfM6xqg8wCyu9tb 7cllsDMyYyg2UVs2J5jIsq+pFdjp/ZmuxsUcq5PliDS55sp+AGWflEG4xCO823VZM+ox 3JXT6qJDfAmyQxHof3aOOdE9ICFirEXpc8e0rri8JyhK7eCu3X1TukcQm7pChIdd9dQF vvijkcjo2Lrd4QyWSS2juqQT9w9WnVM7Ol/wmPX08UP00P4jMxt3VRD5KvOOZkN8tT4u 9Rg3XTObbC/JJIfv1Sb2HLqVsbWKbP9uiaHQfSvkKYRy/3e45pEzMHRybz0TzyarlQkM e5lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VEBpOJTf; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id x10si8669146edj.318.2019.12.01.01.19.59; Sun, 01 Dec 2019 01:20:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VEBpOJTf; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 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 S1725987AbfLAJOr (ORCPT + 99 others); Sun, 1 Dec 2019 04:14:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:54594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725847AbfLAJOr (ORCPT ); Sun, 1 Dec 2019 04:14:47 -0500 Received: from localhost.localdomain (unknown [77.139.212.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D52F120715; Sun, 1 Dec 2019 09:14:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575191687; bh=JoyaiuUsM+xLd5WZYj0oK4m58UMyFNE5xffDaWaFS1E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VEBpOJTfK/rBZPKpxpZ3ZwJXvMRVelgRIIRtH+TVXx06IBgvM36MklOUnZ37Yo5Cg PEvr2tVrWR3FTdJzOj+8/oP1Ei6m5ylm0oMLOUViaev3wb8gV1QdXzWZJ77lbvOgoF t9rkde+bNHnZf01TUPSa+0/LAg1rjcRIsqtwgyVI= Date: Sun, 1 Dec 2019 11:14:39 +0200 From: Lorenzo Bianconi To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com, kevin.patrick.schmidt@googlemail.com, paweldembicki@gmail.com, freifunk@adrianschmutzler.de, nbd@nbd.name Subject: Re: [PATCH] mt76: mt76x0: fix default mac address overwrite Message-ID: <20191201091439.GA5150@localhost.localdomain> References: <567a7cda15f641acb6eab5970370c9bfac96793e.1574548832.git.lorenzo@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline In-Reply-To: <567a7cda15f641acb6eab5970370c9bfac96793e.1574548832.git.lorenzo@kernel.org> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > Current implementation always use default eeprom mac address to > configure device registers even if it is updated using > mt76_eeprom_override. Fix it initializing macaddr filed of mt76_dev data > structure with eeprom mac address and running mt76_eeprom_override > before mt76x02_mac_setaddr >=20 > Fixes: d1bc9bf2072c ("mt76: mt76x0: eeprom: add support for MAC address f= rom OF") > Tested-by: Kevin Schmidt > Signed-off-by: Lorenzo Bianconi Hi Kalle, since the commit d1bc9bf2072c is already in Linus's tree and multiple users reported regression due this commit, could you please apply this patch in wireless-drivers tree? Regards, Lorenzo > --- > drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c b/drivers= /net/wireless/mediatek/mt76/mt76x0/eeprom.c > index a03e2d01fba7..d1405528b504 100644 > --- a/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c > +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c > @@ -342,8 +342,11 @@ int mt76x0_eeprom_init(struct mt76x02_dev *dev) > dev_info(dev->mt76.dev, "EEPROM ver:%02hhx fae:%02hhx\n", > version, fae); > =20 > - mt76x02_mac_setaddr(dev, dev->mt76.eeprom.data + MT_EE_MAC_ADDR); > + memcpy(dev->mt76.macaddr, (u8 *)dev->mt76.eeprom.data + MT_EE_MAC_ADDR, > + ETH_ALEN); > mt76_eeprom_override(&dev->mt76); > + mt76x02_mac_setaddr(dev, dev->mt76.macaddr); > + > mt76x0_set_chip_cap(dev); > mt76x0_set_freq_offset(dev); > mt76x0_set_temp_offset(dev); > --=20 > 2.21.0 >=20 --LQksG6bCIzRHxTLp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCXeOEfAAKCRA6cBh0uS2t rNDlAP9xaiCs/G9RuxAkyZJmgMPie3H/UIuNCVLfS/HR6OSQ5AD+OHq3p3EkKdJg SrqEPEpZbt7JGfejN38yPEDkfQhy+gw= =p39k -----END PGP SIGNATURE----- --LQksG6bCIzRHxTLp--