Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2832641ybt; Mon, 22 Jun 2020 08:07:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYKl3Cb8f7xHheKOhgGo3y72TOaGUZlzX5zIHcRdqBw30zyDApzOtgm/iB2VL0DsKXHLOZ X-Received: by 2002:a17:906:1196:: with SMTP id n22mr15803063eja.33.1592838470723; Mon, 22 Jun 2020 08:07:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592838470; cv=none; d=google.com; s=arc-20160816; b=nw9QUBgL4MztvfKlb9q7G0Amk2Weef4Ngro8n+r+v5iZBi6rNk08v0YnEc8FchbPVw L8VOYfPxh3emgpFhricFQP+K5LQfb88XjMf0DmrQ3G06qMP3i7o0AobSGg0K8I6DfK22 7J3P+/xAn8ppfhbanBs5idx6vG9I2Ww1ubiPEcHL8z6EJgRTKw09rpDmAW0luOL7V8hq yRucqhKZTyjJdZ25F3T1pxod7jXU0Z+wS8pOm4RivPnfbo4/69RL3G1Fr1aXriYTBENY O0gxCFG8B9+c71iZpOz2RwN4ef6N5Tdw4Y9X0cjJZiyY1VqJR0+AqTTQ+yxN03GKRwXQ 42rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=8FUGe1O/+1aaK4afcdRrpn/XUymGR8qR+S3r+t1pabw=; b=xy+vIMEuTCC8FojxQzuPxyL5FACglIXyNd8+9DKRHpaQULLWA605Tskf6dfAZC2Ft2 togNQbNBH+tUOGEtXWbiixnPqL7PrfPKIEIISyiFzb8BVy0aAqiITPp5VTMhavoPzH+y jHgpWkrlmPhfPlAAtRmy5HV75NhV74irecN750XIeD270siNT+fI8Gwo7QlD6YqiatjE 862rD3h7G1/1iJiHfREZHa4wxJMeZIfnWhwTZEpZjySlMmpCdMddGcFbVLh/IxWrHi48 A6DZ9USqWWHlsW4aRMw+Y3SDpFdIjDdTCs8wxj3T5TzRnofKrbKVY48fdv0UfTQJXy1x 5TXw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r6si3129674edl.422.2020.06.22.08.07.26; Mon, 22 Jun 2020 08:07:50 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729211AbgFVPHS (ORCPT + 99 others); Mon, 22 Jun 2020 11:07:18 -0400 Received: from p54ae948c.dip0.t-ipconnect.de ([84.174.148.140]:63977 "EHLO maeck.local" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728070AbgFVPHR (ORCPT ); Mon, 22 Jun 2020 11:07:17 -0400 Received: by maeck.local (Postfix, from userid 501) id 510068EDC3DE; Mon, 22 Jun 2020 17:07:16 +0200 (CEST) From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: kvalo@codeaurora.org Subject: [PATCH 5.8] mt76: mt7615: fix EEPROM buffer size Date: Mon, 22 Jun 2020 17:07:16 +0200 Message-Id: <20200622150716.49622-1-nbd@nbd.name> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Avoid adding MT7615_EEPROM_SIZE twice. Rename MT7615_EEPROM_EXTRA_DATA to MT7615_EEPROM_FULL_SIZE, since it already includes MT7615_EEPROM_SIZE Fixes: ad380ad1ebbe ("mt76: mt7615: add support for applying DC offset calibration from EEPROM") Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c | 3 +-- drivers/net/wireless/mediatek/mt76/mt7615/eeprom.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c index edac37e7847b..22e4eabe6578 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c @@ -72,8 +72,7 @@ static int mt7615_eeprom_load(struct mt7615_dev *dev, u32 addr) { int ret; - ret = mt76_eeprom_init(&dev->mt76, MT7615_EEPROM_SIZE + - MT7615_EEPROM_EXTRA_DATA); + ret = mt76_eeprom_init(&dev->mt76, MT7615_EEPROM_FULL_SIZE); if (ret < 0) return ret; diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.h b/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.h index 40fed7adc58a..a024dee10362 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.h +++ b/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.h @@ -17,7 +17,7 @@ #define MT7615_EEPROM_TXDPD_SIZE 216 #define MT7615_EEPROM_TXDPD_COUNT (44 + 3) -#define MT7615_EEPROM_EXTRA_DATA (MT7615_EEPROM_TXDPD_OFFSET + \ +#define MT7615_EEPROM_FULL_SIZE (MT7615_EEPROM_TXDPD_OFFSET + \ MT7615_EEPROM_TXDPD_COUNT * \ MT7615_EEPROM_TXDPD_SIZE) -- 2.24.0