From patchwork Fri Oct 4 13:23:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Schmutzler X-Patchwork-Id: 11174487 X-Patchwork-Delegate: nbd@nbd.name Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F81E13BD for ; Fri, 4 Oct 2019 13:24:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 67870207FF for ; Fri, 4 Oct 2019 13:24:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388333AbfJDNX7 (ORCPT ); Fri, 4 Oct 2019 09:23:59 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:53409 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387952AbfJDNX7 (ORCPT ); Fri, 4 Oct 2019 09:23:59 -0400 Received: from buildfff.adridolf.com ([188.192.135.195]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N0Ip5-1hsX7b2DmJ-00xL5x; Fri, 04 Oct 2019 15:23:56 +0200 From: Adrian Schmutzler To: linux-wireless@vger.kernel.org Cc: Pawel Dembicki , Felix Fietkau Subject: [PATCH] mt76x0: eeprom: add support for MAC address from OF Date: Fri, 4 Oct 2019 15:23:49 +0200 Message-Id: <20191004132349.4924-1-freifunk@adrianschmutzler.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:yW/JQ6pu16OzzS6/VyGukoWRZuL/1OuANGO07xzBePOxSMbndaj xZBYAc5kQPoy1JH62iPX9IB315RNPuxCcKCgIWhOXXZGPZ8gmGwQoBc838QHUW74293g/Od JuqB4KlzOtlDyqr+G7CIR71KqXIH4W3ZNyTDHIoFBDwkimSdE5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kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Pawel Dembicki mt76x0e driver only supports MAC addresses from calibration data eeprom. Many routers however do not have a valid stock address set in this field. This patch makes it possible to take a MAC address from OF (e.g. from mtd). Cc: Felix Fietkau Signed-off-by: Pawel Dembicki [adjusted for kernel submission] Signed-off-by: Adrian Schmutzler --- drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c index 9d4426f6905f..48f61fd49c04 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c @@ -343,6 +343,7 @@ int mt76x0_eeprom_init(struct mt76x02_dev *dev) version, fae); mt76x02_mac_setaddr(dev, dev->mt76.eeprom.data + MT_EE_MAC_ADDR); + mt76_eeprom_override(&dev->mt76); mt76x0_set_chip_cap(dev); mt76x0_set_freq_offset(dev); mt76x0_set_temp_offset(dev);