Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp248427pxy; Wed, 21 Apr 2021 01:57:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvPgqSav3UiFj9528wIXxVTv38fzLvKo0v03gqSzFpia9hovLLwD2wVl0EKRKpY4b0nfZH X-Received: by 2002:a17:90a:c696:: with SMTP id n22mr9715001pjt.164.1618995428247; Wed, 21 Apr 2021 01:57:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618995428; cv=none; d=google.com; s=arc-20160816; b=tuB2rltGzyy/touN5ma5DuyNzug0Gutkv4CmRElN4r5J+O+gEO6tGQduTLtfhF/Sl8 xe266hIzncTk185rt9F2RsJHSIRdl+P55vBDaBhovNdeMM5pWtYv+EAxcW5O7FKJIWcR 9W8j0x2FkLp2OKOnxq06DKl2+6ONzQha9iErYYtZeEWU35T8igA+VHtpJc326Bd86QSp 8SLHlWORoztH/4LReIAPGOnhJagtWctyZjOkdtTmYBxg93YCWzh0yZ/y+l+DVNkoPpgD JxWlDV4XCQNngU3tBMr5MGp98RalxOo5l2ZLchvuxaoLP/q5z7xHkuk4Qx+p6A09AMQk S6/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=B5iUHA1kJd7Ly/z+4uXOFKbWOcj3CHlZjtp4IlxjXr4=; b=i+e10/HCzNdiZccRHU1Pl8qiQwusqR1tm8F/dQ6aTBMwZgwTnf0/UAHDNo8MDsazCQ aHgLG2cPJ+pv29Il/Ijq+PXEU1DWcn19hOq1AYwUqlpji7LV7R+7rHHi90uxIoLDZs9s Qh+wy86GRAEqnaJAe4OKtcVozVThoeR8eMmioGA9kB03PEjIP+Bg3GhsLHwoDB+x7pZ7 dkX68pNVV/sPDU4zEql2q0VbDSBM3BAqyUNFTYVGrEc0+Id84lg3Ql+RjB3Itxka332K xnCPBA/iIEXouvbnlcqHQNSoQVNePAH9q9wvRS6kvo4pWaR1HVEA5OYUA76Gt9/m3Lt+ Rl9Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e184si1739145pfe.58.2021.04.21.01.56.53; Wed, 21 Apr 2021 01:57:08 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236149AbhDUIk6 (ORCPT + 99 others); Wed, 21 Apr 2021 04:40:58 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:41456 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S231354AbhDUIk6 (ORCPT ); Wed, 21 Apr 2021 04:40:58 -0400 X-UUID: 2fadfe9f4ef04bb49288ae9e3bd9ed95-20210421 X-UUID: 2fadfe9f4ef04bb49288ae9e3bd9ed95-20210421 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 714931352; Wed, 21 Apr 2021 16:40:21 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 21 Apr 2021 16:40:18 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 21 Apr 2021 16:40:18 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , linux-mediatek , Shayne Chen Subject: [PATCH] mt76: mt7915: do not read rf value from efuse in flash mode Date: Wed, 21 Apr 2021 16:39:45 +0800 Message-ID: <20210421083945.10337-1-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 9CB6740FDC6112994172C00188E65583B1497F58073ABDC406148BBFC99349012000:8 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Do not read rf value from efuse when driver is configured to use flash mode. Tested-by: Bruce Chuang Signed-off-by: Shayne Chen --- drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c index 738ecf8..e004e51 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c @@ -8,7 +8,7 @@ static u32 mt7915_eeprom_read(struct mt7915_dev *dev, u32 offset) { u8 *data = dev->mt76.eeprom.data; - if (data[offset] == 0xff) + if (data[offset] == 0xff && !dev->flash_mode) mt7915_mcu_get_eeprom(dev, offset); return data[offset]; -- 2.18.0