Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
+3
-3
@@ -103,9 +103,9 @@ ifneq ($(CONFIG_USE_APK),)
|
||||
--repositories-file /dev/null --repository file://$(PACKAGE_DIR_ALL)/packages.adb \
|
||||
$(if $(CONFIG_SIGNED_PACKAGES),,--allow-untrusted) \
|
||||
$$(cat $(TMP_DIR)/apk_install_list) \
|
||||
"base-files=$(shell cat $(TMP_DIR)/base-files.version)" \
|
||||
"libc=$(shell cat $(TMP_DIR)/libc.version)" \
|
||||
"kernel=$(shell cat $(TMP_DIR)/kernel.version)"
|
||||
"base-files=$(shell cat $(STAGING_DIR)/base-files.version)" \
|
||||
"libc=$(shell cat $(STAGING_DIR)/libc.version)" \
|
||||
"kernel=$(shell cat $(STAGING_DIR)/kernel.version)"
|
||||
|
||||
rm -rf $(TARGET_DIR)/run
|
||||
else
|
||||
|
||||
@@ -256,7 +256,7 @@ ifneq ($(CONFIG_USE_APK),)
|
||||
|
||||
rm -f $(1)/etc/uci-defaults/13_fix-group-user
|
||||
rm -f $(1)/sbin/pkg_check
|
||||
echo $(PKG_RELEASE)~$(lastword $(subst -, ,$(REVISION))) >$(TMP_DIR)/base-files.version
|
||||
echo $(PKG_RELEASE)~$(lastword $(subst -, ,$(REVISION))) >$(STAGING_DIR)/base-files.version
|
||||
else
|
||||
$(if $(CONFIG_CLEAN_IPKG),, \
|
||||
mkdir -p $(1)/etc/opkg; \
|
||||
|
||||
@@ -65,7 +65,7 @@ define Package/kernel/install
|
||||
strings $(LINUX_DIR)/modules.builtin.modinfo | \
|
||||
grep -E -v "\.(file$(if CONFIG_MODULE_STRIPPED,|parmtype))=" | \
|
||||
tr '\n' '\0' > $(1)/$(MODULES_SUBDIR)/modules.builtin.modinfo
|
||||
echo $(LINUX_VERSION)~$(LINUX_VERMAGIC)-r$(LINUX_RELEASE) > $(TMP_DIR)/kernel.version
|
||||
echo $(LINUX_VERSION)~$(LINUX_VERMAGIC)-r$(LINUX_RELEASE) > $(STAGING_DIR)/kernel.version
|
||||
endef
|
||||
|
||||
define Package/kernel/extra_provides
|
||||
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu, 5 Mar 2026 17:04:11 +0000
|
||||
Subject: [PATCH] mac80211: fix crash in ieee80211_chan_bw_change for AP_VLAN
|
||||
stations
|
||||
|
||||
ieee80211_chan_bw_change() iterates all stations and accesses
|
||||
link->reserved.oper via sta->sdata->link[link_id]. For stations on
|
||||
AP_VLAN interfaces (e.g. 4addr WDS clients), sta->sdata points to
|
||||
the VLAN sdata, whose link never participates in chanctx reservations.
|
||||
This leaves link->reserved.oper zero-initialized with chan == NULL,
|
||||
causing a NULL pointer dereference in __ieee80211_sta_cap_rx_bw()
|
||||
when accessing chandef->chan->band during CSA.
|
||||
|
||||
Resolve the VLAN sdata to its parent AP sdata using get_bss_sdata()
|
||||
before accessing link data.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/chan.c
|
||||
+++ b/net/mac80211/chan.c
|
||||
@@ -441,13 +441,15 @@ static void ieee80211_chan_bw_change(str
|
||||
rcu_read_lock();
|
||||
list_for_each_entry_rcu(sta, &local->sta_list,
|
||||
list) {
|
||||
- struct ieee80211_sub_if_data *sdata = sta->sdata;
|
||||
+ struct ieee80211_sub_if_data *sdata;
|
||||
enum ieee80211_sta_rx_bandwidth new_sta_bw;
|
||||
unsigned int link_id;
|
||||
|
||||
if (!ieee80211_sdata_running(sta->sdata))
|
||||
continue;
|
||||
|
||||
+ sdata = get_bss_sdata(sta->sdata);
|
||||
+
|
||||
for (link_id = 0; link_id < ARRAY_SIZE(sta->sdata->link); link_id++) {
|
||||
struct ieee80211_link_data *link =
|
||||
rcu_dereference(sdata->link[link_id]);
|
||||
+2
-2
@@ -48,7 +48,7 @@
|
||||
if (sdata->wdev.links[link_id].cac_started)
|
||||
--- a/net/mac80211/chan.c
|
||||
+++ b/net/mac80211/chan.c
|
||||
@@ -644,10 +644,11 @@ ieee80211_find_chanctx(struct ieee80211_
|
||||
@@ -646,10 +646,11 @@ ieee80211_find_chanctx(struct ieee80211_
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
struct ieee80211_link_data *link;
|
||||
struct ieee80211_channel *chan;
|
||||
int radio_idx;
|
||||
@@ -658,14 +659,25 @@ bool ieee80211_is_radar_required(struct
|
||||
@@ -660,14 +661,25 @@ bool ieee80211_is_radar_required(struct
|
||||
return false;
|
||||
|
||||
for_each_sdata_link(local, link) {
|
||||
|
||||
@@ -578,7 +578,7 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
||||
endef
|
||||
|
||||
define Package/libc/install
|
||||
echo $(LIBC_VERSION)-r$(PKG_RELEASE) > $(TMP_DIR)/libc.version; \
|
||||
echo $(LIBC_VERSION)-r$(PKG_RELEASE) > $(STAGING_DIR)/libc.version; \
|
||||
$(call Package/$(LIBC)/install,$1)
|
||||
endef
|
||||
|
||||
@@ -698,7 +698,7 @@ else
|
||||
endef
|
||||
|
||||
define Package/libc/install
|
||||
echo $(LIBC_VERSION)-r$(PKG_RELEASE) > $(TMP_DIR)/libc.version; \
|
||||
echo $(LIBC_VERSION)-r$(PKG_RELEASE) > $(STAGING_DIR)/libc.version; \
|
||||
for file in $(call qstrip,$(CONFIG_LIBC_FILE_SPEC)); do \
|
||||
if [ '$(CONFIG_USE_GLIBC)' != '' ] ; then \
|
||||
case "$${file}" in \
|
||||
|
||||
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/omcproxy.git
|
||||
PKG_MIRROR_HASH:=4e62452e3b5a6df917e07db6e19b09e0fb67bac246b8fc3f9e6a35a12d90894b
|
||||
PKG_SOURCE_DATE:=2025-10-04
|
||||
PKG_SOURCE_VERSION:=fc2eac19ea031411ab589cd92d713961549d6a46
|
||||
PKG_MIRROR_HASH:=41d85cf544e3833df6a605827ab625a4028274ff46aadee13b8644eb25f8edae
|
||||
PKG_SOURCE_DATE:=2026-03-07
|
||||
PKG_SOURCE_VERSION:=3abb601ab77f5e914a3203e5d0c8ae7fb1579bae
|
||||
PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
|
||||
|
||||
@@ -126,9 +126,9 @@ endif
|
||||
fi
|
||||
$(SED) 's,^# REVISION:=.*,REVISION:=$(REVISION),g' $(PKG_BUILD_DIR)/include/version.mk
|
||||
$(SED) 's,^# SOURCE_DATE_EPOCH:=.*,SOURCE_DATE_EPOCH:=$(SOURCE_DATE_EPOCH),g' $(PKG_BUILD_DIR)/include/version.mk
|
||||
$(SED) 's,^# BASE_FILES_VERSION:=.*,BASE_FILES_VERSION:=$(shell cat $(TMP_DIR)/base-files.version),g' $(PKG_BUILD_DIR)/include/version.mk
|
||||
$(SED) 's,^# LIBC_VERSION:=.*,LIBC_VERSION:=$(shell cat $(TMP_DIR)/libc.version),g' $(PKG_BUILD_DIR)/include/version.mk
|
||||
$(SED) 's,^# KERNEL_VERSION:=.*,KERNEL_VERSION:=$(shell cat $(TMP_DIR)/kernel.version),g' $(PKG_BUILD_DIR)/include/version.mk
|
||||
$(SED) 's,^# BASE_FILES_VERSION:=.*,BASE_FILES_VERSION:=$(shell cat $(STAGING_DIR)/base-files.version),g' $(PKG_BUILD_DIR)/include/version.mk
|
||||
$(SED) 's,^# LIBC_VERSION:=.*,LIBC_VERSION:=$(shell cat $(STAGING_DIR)/libc.version),g' $(PKG_BUILD_DIR)/include/version.mk
|
||||
$(SED) 's,^# KERNEL_VERSION:=.*,KERNEL_VERSION:=$(shell cat $(STAGING_DIR)/kernel.version),g' $(PKG_BUILD_DIR)/include/version.mk
|
||||
$(SED) '/LINUX_VERMAGIC:=/ { s,unknown,$(LINUX_VERMAGIC),g }' $(PKG_BUILD_DIR)/include/kernel.mk
|
||||
find $(PKG_BUILD_DIR) -name CVS -o -name .git -o -name .svn \
|
||||
| $(XARGS) rm -rf
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
From patchwork Fri Mar 6 12:29:55 2026
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 8bit
|
||||
X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?=
|
||||
<noltari@gmail.com>
|
||||
X-Patchwork-Id: 14457090
|
||||
X-Patchwork-Delegate: kuba@kernel.org
|
||||
Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com
|
||||
[209.85.221.48])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
|
||||
(No client certificate requested)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF3F4386459
|
||||
for <netdev@vger.kernel.org>; Fri, 6 Mar 2026 12:52:18 +0000 (UTC)
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
arc=none smtp.client-ip=209.85.221.48
|
||||
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
|
||||
t=1772801540; cv=none;
|
||||
b=LVeywxv8ajenPZ8Kr1arieKosbrf60O9l+ouIPKPFNt5btxWDZ59pIU9BfZjv5n9ifEOyUA/UD0phxnG77+oB/k6UCd7DdGQQASZB3NHq5cvmErbgXm0XG3C8BBxVXU5pF7atPS23kBqM9ptxsv3IaeH/fDFcj6k6SH61rGEpuQ=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1772801540; c=relaxed/simple;
|
||||
bh=HAy43ssDo0xlUcBDIU7vQZtNnpxG03JPCL6Ldi51ASI=;
|
||||
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type;
|
||||
b=OBk8kI0I91psFRaIxb6nCnAzQlsc7jrXkOPW8lL7cYCosY08yfQDwAlWBFfdFs/VDuVJjD5VEdeQeMt2K4kWGgjLNXhTrRqgs6JNe7PxALDJKvt+kcJ833TRz3hKl2eb2Ft6WnKPf/6hp5Q3qm8+/Q703ixD4sF/0aDNw1BrDY4=
|
||||
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=gmail.com;
|
||||
spf=pass smtp.mailfrom=gmail.com;
|
||||
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com
|
||||
header.b=RCEse1HL; arc=none smtp.client-ip=209.85.221.48
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=gmail.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
spf=pass smtp.mailfrom=gmail.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com
|
||||
header.b="RCEse1HL"
|
||||
Received: by mail-wr1-f48.google.com with SMTP id
|
||||
ffacd0b85a97d-439b7c2788dso4008389f8f.1
|
||||
for <netdev@vger.kernel.org>; Fri, 06 Mar 2026 04:52:18 -0800 (PST)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=gmail.com; s=20230601; t=1772801537; x=1773406337;
|
||||
darn=vger.kernel.org;
|
||||
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
|
||||
:to:from:from:to:cc:subject:date:message-id:reply-to;
|
||||
bh=y8B8kg8ACcCsMXy3SgsyRYngVEpIsqkcoCsLOS/nNqQ=;
|
||||
b=RCEse1HLoUtQApOdbPXFvYItGrEKWhMZ5FH1L4npAxteGeWOhAEAekijg3Ur83ovNu
|
||||
D7j0Aio5nwazNQz3y4rO88a+svlEbLx5fyxypjkMFUV4PDnOpv7HYjT9Aw1NVdIwO6l+
|
||||
sTgZ1jssfWdVnLQwQe6naotyBRoBV2AugdTmASE0Okxrsi3juIOafyTCxnp4K0weRpaH
|
||||
XodiSWNrkHzZSWM6/wl3D42yExGGPiuDybF+9otR/5TaBWNzrcLkSb73hvP6va35kQWK
|
||||
mnp6OV+L7iHTbxYpTfTm4axD+IZ/Q/dtFxxA6XolA28oMQbRPK0SIHepheSZx4bgl64w
|
||||
FM4w==
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20230601; t=1772801537; x=1773406337;
|
||||
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
|
||||
:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
|
||||
:message-id:reply-to;
|
||||
bh=y8B8kg8ACcCsMXy3SgsyRYngVEpIsqkcoCsLOS/nNqQ=;
|
||||
b=KomubXrbvHQI4WbFxBztyfrvNNRRWm7V46yQSwx0bP8PXKIJP38kAYzK+ZKWhmcd7e
|
||||
LpS7422VcYyLywLRxlevD2YaXsF0CK6e00YpTtixakHxYs/4KxGaU21vfwYV8mRhfu7g
|
||||
HVmxKvNQ6DTdC7wAIGT6TrcZCK4VCvgCx3z9yC62hQc8C6w+9mDnnGPvXNR74ofvvXdC
|
||||
eVZjm56layRoEr4PTpR2F33OVSt8+HRikH7eBzIKtQ5n/lEKtmJKDHRaodAaCyFGWMWa
|
||||
qDVoOR8VI4NIJABfsOT6OqisXLPLf+jkKpGkCY2ioRPRKK9GzW4PgIuNcKvPQilQQkgD
|
||||
Xlnw==
|
||||
X-Forwarded-Encrypted: i=1;
|
||||
AJvYcCVcziiSg1n0cDakmiQXH3869FECP24dcIqrZzs8zKakP+vHT958hnq9Bp0alDnLeVtXgo0B8T4=@vger.kernel.org
|
||||
X-Gm-Message-State: AOJu0Yx2OF1e3PiuR4Zqpe9qXA6kz6T2CCtro6kv8eL2j4Zh2HCjWywo
|
||||
/rZTavazOZRoq7zTvc4fGZ/yupjkTT9xRPZCKRkM9pc0UuK/KDSP4pan
|
||||
X-Gm-Gg: ATEYQzx75s3OlYg8XKMgu042++2+ZPa/CZDw09DYtnwEHHBsuylQF0+eXzcFM166JtP
|
||||
EMuM6Nq/sGQx2WNTPNEyu1BRGci/SV005CzkExhd1KK52D/nC1c76MBxvAtioaI/+5tgNoyCg8v
|
||||
ZFRyiqDReKfJ6JHa3YRI213dTzMluN1sZTYNSqlWI1MwW66gaDCf0myU81ehAfiAff34wmxnm8C
|
||||
PUF0YrLYtgZl1I/ZcYM1npoL3PBOnrhaulSqhbn7S5NaZMkHLrNQm6ns1lof+7Ciju05dQpEcBe
|
||||
pumVg15Dy+PcSXQSSQt4CULH7bbuJvZ0PHJ7dS+74i/OqFSgxD4E7LCqM5ufHYdbESx0/ERaR/z
|
||||
CAyT3oTz6S1oMQCUTPevHjHjTbDOWhu74SqyTZETzwGnjZnfrPMa56ebQVRfYgOYW0bbx6j3O2M
|
||||
v3CSEBiXpdFTdaLuRcqIb56JeDryaHx87SOThqnYP6gMiu7EljKYIhr572Rpgz+UIRkrYyNjL9c
|
||||
BLmrcmhsXX4hU4X5KocoApkO04w
|
||||
X-Received: by 2002:a05:600c:8b8b:b0:483:103c:b1ee with SMTP id
|
||||
5b1f17b1804b1-48526922599mr34173745e9.8.1772801536778;
|
||||
Fri, 06 Mar 2026 04:52:16 -0800 (PST)
|
||||
Received: from skynet.lan
|
||||
(2a02-9142-4581-3c00-0000-0000-0000-0008.red-2a02-914.customerbaf.ipv6.rima-tde.net.
|
||||
[2a02:9142:4581:3c00::8])
|
||||
by smtp.gmail.com with ESMTPSA id
|
||||
5b1f17b1804b1-48527681a3esm76085715e9.4.2026.03.06.04.52.14
|
||||
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
|
||||
Fri, 06 Mar 2026 04:52:15 -0800 (PST)
|
||||
From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= <noltari@gmail.com>
|
||||
To: linux@armlinux.org.uk,
|
||||
andrew@lunn.ch,
|
||||
hkallweit1@gmail.com,
|
||||
davem@davemloft.net,
|
||||
edumazet@google.com,
|
||||
kuba@kernel.org,
|
||||
pabeni@redhat.com,
|
||||
mnhagan88@gmail.com,
|
||||
netdev@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org
|
||||
Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= <noltari@gmail.com>
|
||||
Subject: [PATCH net v3] net: sfp: improve Huawei MA5671a fixup
|
||||
Date: Fri, 6 Mar 2026 13:29:55 +0100
|
||||
Message-ID: <20260306125139.213637-1-noltari@gmail.com>
|
||||
X-Mailer: git-send-email 2.47.3
|
||||
Precedence: bulk
|
||||
X-Mailing-List: netdev@vger.kernel.org
|
||||
List-Id: <netdev.vger.kernel.org>
|
||||
List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
|
||||
List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
|
||||
MIME-Version: 1.0
|
||||
X-Patchwork-Delegate: kuba@kernel.org
|
||||
|
||||
With the current sfp_fixup_ignore_tx_fault() fixup we ignore the TX_FAULT
|
||||
signal, but we also need to apply sfp_fixup_ignore_los() in order to be
|
||||
able to communicate with the module even if the fiber isn't connected for
|
||||
configuration purposes.
|
||||
This is needed for all the MA5671a firmwares, excluding the FS modded
|
||||
firmware.
|
||||
|
||||
Fixes: 2069624dac19 ("net: sfp: Add tx-fault workaround for Huawei MA5671A SFP ONT")
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
v3: avoid using a vendor name in the function
|
||||
v2: rebase on top of net/main instead of linux/master
|
||||
|
||||
drivers/net/phy/sfp.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/phy/sfp.c
|
||||
+++ b/drivers/net/phy/sfp.c
|
||||
@@ -360,6 +360,12 @@ static void sfp_fixup_ignore_tx_fault(st
|
||||
sfp->state_ignore_mask |= SFP_F_TX_FAULT;
|
||||
}
|
||||
|
||||
+static void sfp_fixup_ignore_tx_fault_and_los(struct sfp *sfp)
|
||||
+{
|
||||
+ sfp_fixup_ignore_tx_fault(sfp);
|
||||
+ sfp_fixup_ignore_los(sfp);
|
||||
+}
|
||||
+
|
||||
static void sfp_fixup_ignore_hw(struct sfp *sfp, unsigned int mask)
|
||||
{
|
||||
sfp->state_hw_mask &= ~mask;
|
||||
@@ -523,7 +529,7 @@ static const struct sfp_quirk sfp_quirks
|
||||
// Huawei MA5671A can operate at 2500base-X, but report 1.2GBd NRZ in
|
||||
// their EEPROM
|
||||
SFP_QUIRK("HUAWEI", "MA5671A", sfp_quirk_2500basex,
|
||||
- sfp_fixup_ignore_tx_fault),
|
||||
+ sfp_fixup_ignore_tx_fault_and_los),
|
||||
|
||||
// Lantech 8330-262D-E can operate at 2500base-X, but incorrectly report
|
||||
// 2500MBd NRZ in their EEPROM
|
||||
@@ -220,17 +220,6 @@ ipq40xx_setup_macs()
|
||||
wan_mac=$(get_mac_label)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
;;
|
||||
linksys,ea6350v3|\
|
||||
linksys,ea8300|\
|
||||
linksys,mr6350|\
|
||||
linksys,mr8300)
|
||||
wan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
;;
|
||||
linksys,whw03)
|
||||
wan_mac=$(mmc_get_mac_ascii devinfo hw_mac_addr)
|
||||
lan_mac="$wan_mac"
|
||||
;;
|
||||
mikrotik,cap-ac|\
|
||||
mikrotik,hap-ac2|\
|
||||
mikrotik,hap-ac3|\
|
||||
|
||||
@@ -20,17 +20,6 @@ case "$FIRMWARE" in
|
||||
/usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \
|
||||
/usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1")
|
||||
;;
|
||||
linksys,ea8300|\
|
||||
linksys,mr6350|\
|
||||
linksys,mr8300)
|
||||
caldata_extract "ART" 0x9000 0x2f20
|
||||
# OEM assigns 4 sequential MACs
|
||||
ath10k_patch_mac $(macaddr_setbit_la $(macaddr_add "$(cat /sys/class/net/eth0/address)" 4))
|
||||
;;
|
||||
linksys,whw03)
|
||||
caldata_extract_mmc "0:ART" 0x9000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 3)
|
||||
;;
|
||||
netgear,rbr40|\
|
||||
netgear,rbs40|\
|
||||
netgear,rbr50|\
|
||||
@@ -88,16 +77,6 @@ case "$FIRMWARE" in
|
||||
caldata_extract "ART" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_ascii CFG1 RADIOADDR0)
|
||||
;;
|
||||
linksys,ea8300|\
|
||||
linksys,mr6350|\
|
||||
linksys,mr8300)
|
||||
caldata_extract "ART" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
|
||||
;;
|
||||
linksys,whw03)
|
||||
caldata_extract_mmc "0:ART" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
|
||||
;;
|
||||
mikrotik,cap-ac|\
|
||||
mikrotik,hap-ac2|\
|
||||
mikrotik,hap-ac3|\
|
||||
@@ -180,16 +159,6 @@ case "$FIRMWARE" in
|
||||
caldata_extract "ART" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_ascii CFG1 RADIOADDR1)
|
||||
;;
|
||||
linksys,ea8300|\
|
||||
linksys,mr6350|\
|
||||
linksys,mr8300)
|
||||
caldata_extract "ART" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 3)
|
||||
;;
|
||||
linksys,whw03)
|
||||
caldata_extract_mmc "0:ART" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
|
||||
;;
|
||||
mikrotik,cap-ac|\
|
||||
mikrotik,hap-ac2|\
|
||||
mikrotik,hap-ac3|\
|
||||
|
||||
@@ -19,19 +19,6 @@ preinit_set_mac_address() {
|
||||
extreme-networks,ws-ap391x)
|
||||
ip link set dev eth0 address $(mtd_get_mac_ascii CFG1 ethaddr)
|
||||
;;
|
||||
linksys,ea8300|\
|
||||
linksys,mr6350|\
|
||||
linksys,mr8300)
|
||||
base_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
||||
ip link set dev lan1 address $(macaddr_add "$base_mac" 1)
|
||||
ip link set dev eth0 address $(macaddr_setbit "$base_mac" 7)
|
||||
;;
|
||||
linksys,whw03)
|
||||
base_mac=$(mmc_get_mac_ascii devinfo hw_mac_addr)
|
||||
ip link set dev eth0 address "$base_mac"
|
||||
ip link set dev lan address "$base_mac"
|
||||
ip link set dev wan address "$base_mac"
|
||||
;;
|
||||
mikrotik,wap-ac|\
|
||||
mikrotik,wap-ac-lte|\
|
||||
mikrotik,wap-r-ac)
|
||||
|
||||
@@ -331,6 +331,7 @@ CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=4
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_LAYOUTS=y
|
||||
CONFIG_NVMEM_LAYOUT_ASCII_ENV=y
|
||||
CONFIG_NVMEM_LAYOUT_U_BOOT_ENV=y
|
||||
CONFIG_NVMEM_QCOM_QFPROM=y
|
||||
# CONFIG_NVMEM_QCOM_SEC_QFPROM is not set
|
||||
|
||||
@@ -93,11 +93,8 @@
|
||||
qcom,ath10k-calibration-variant = "linksys-ea8300-fcc";
|
||||
};
|
||||
|
||||
&pcie_bridge0 {
|
||||
wifi@0,0 {
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
ieee80211-freq-limit = <5490000 5835000>;
|
||||
qcom,ath10k-calibration-variant = "linksys-ea8300-fcc";
|
||||
};
|
||||
&wifi2 {
|
||||
status = "okay";
|
||||
ieee80211-freq-limit = <5490000 5835000>;
|
||||
qcom,ath10k-calibration-variant = "linksys-ea8300-fcc";
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
// Top panel LEDs, above Linksys logo
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
|
||||
led_blue: led-blue {
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
@@ -64,7 +64,7 @@
|
||||
reset-delay-us = <2000>;
|
||||
reset-post-delay-us = <5000>;
|
||||
};
|
||||
|
||||
|
||||
&tlmm {
|
||||
status = "okay";
|
||||
|
||||
|
||||
@@ -79,11 +79,8 @@
|
||||
qcom,ath10k-calibration-variant = "linksys-mr8300-v0-fcc";
|
||||
};
|
||||
|
||||
&pcie_bridge0 {
|
||||
wifi@0,0 {
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
ieee80211-freq-limit = <5490000 5835000>;
|
||||
qcom,ath10k-calibration-variant = "linksys-mr8300-v0-fcc";
|
||||
};
|
||||
&wifi2 {
|
||||
status = "okay";
|
||||
ieee80211-freq-limit = <5490000 5835000>;
|
||||
qcom,ath10k-calibration-variant = "linksys-mr8300-v0-fcc";
|
||||
};
|
||||
|
||||
@@ -54,14 +54,72 @@
|
||||
sd-ldo-gpios = <&tlmm 33 GPIO_ACTIVE_LOW>;
|
||||
|
||||
vqmmc-supply = <&vqmmc>;
|
||||
|
||||
card@0 {
|
||||
compatible = "mmc-card";
|
||||
reg = <0>;
|
||||
|
||||
block {
|
||||
compatible = "block-device";
|
||||
partitions {
|
||||
block-partition-art {
|
||||
partname = "art";
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
precal_art_1000: pre-calibration@1000 {
|
||||
reg = <0x1000 0x2f20>;
|
||||
};
|
||||
|
||||
precal_art_5000: pre-calibration@5000 {
|
||||
reg = <0x5000 0x2f20>;
|
||||
};
|
||||
|
||||
precal_art_9000: pre-calibration@9000 {
|
||||
reg = <0x9000 0x2f20>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
block-partition-devinfo {
|
||||
partname = "devinfo";
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "ascii-eq-delim-env";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
hw_mac_addr: hw_mac_addr {
|
||||
compatible = "mac-base";
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gmac {
|
||||
nvmem-cells = <&hw_mac_addr 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
qcom,ath10k-calibration-variant = "linksys-whw03";
|
||||
|
||||
nvmem-cells = <&precal_art_1000>, <&hw_mac_addr 1>;
|
||||
nvmem-cell-names = "pre-calibration", "mac-address";
|
||||
};
|
||||
|
||||
&wifi1 {
|
||||
qcom,ath10k-calibration-variant = "linksys-whw03";
|
||||
|
||||
nvmem-cells = <&precal_art_5000>, <&hw_mac_addr 2>;
|
||||
nvmem-cell-names = "pre-calibration", "mac-address";
|
||||
};
|
||||
|
||||
&pcie_bridge0 {
|
||||
@@ -70,5 +128,7 @@
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
ieee80211-freq-limit = <5490000 5835000>;
|
||||
qcom,ath10k-calibration-variant = "linksys-whw03";
|
||||
nvmem-cells = <&precal_art_9000>, <&hw_mac_addr 3>;
|
||||
nvmem-cell-names = "pre-calibration", "mac-address";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
ethernet0 = &gmac;
|
||||
led-boot = &led_blue;
|
||||
led-failsafe = &led_red;
|
||||
led-running = &led_blue;
|
||||
|
||||
@@ -25,12 +25,6 @@
|
||||
bootargs-append = " root=/dev/ubiblock0_0 rootfstype=squashfs ro";
|
||||
};
|
||||
|
||||
|
||||
aliases {
|
||||
// TODO: Verify if the ethernet0 alias is needed
|
||||
ethernet0 = &gmac;
|
||||
};
|
||||
|
||||
soc {
|
||||
tcsr@1949000 {
|
||||
compatible = "qcom,tcsr";
|
||||
@@ -141,6 +135,24 @@
|
||||
label = "ART";
|
||||
reg = <0x400000 0x80000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
precal_art_1000: pre-calibration@1000 {
|
||||
reg = <0x1000 0x2f20>;
|
||||
};
|
||||
|
||||
precal_art_5000: pre-calibration@5000 {
|
||||
reg = <0x5000 0x2f20>;
|
||||
};
|
||||
|
||||
precal_art_9000: pre-calibration@9000 {
|
||||
reg = <0x9000 0x2f20>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@480000 {
|
||||
@@ -165,6 +177,17 @@
|
||||
label = "devinfo";
|
||||
reg = <0x740000 0x40000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "ascii-eq-delim-env";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
hw_mac_addr: hw_mac_addr {
|
||||
compatible = "mac-base";
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@780000 {
|
||||
@@ -291,6 +314,9 @@
|
||||
|
||||
&gmac {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&hw_mac_addr 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&switch {
|
||||
@@ -315,4 +341,28 @@
|
||||
|
||||
&swport5 {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&hw_mac_addr 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
nvmem-cells = <&precal_art_1000>, <&hw_mac_addr 2>;
|
||||
nvmem-cell-names = "pre-calibration", "mac-address";
|
||||
};
|
||||
|
||||
&wifi1 {
|
||||
nvmem-cells = <&precal_art_5000>, <&hw_mac_addr 3>;
|
||||
nvmem-cell-names = "pre-calibration", "mac-address";
|
||||
};
|
||||
|
||||
&pcie_bridge0 {
|
||||
wifi2: wifi@0,0 {
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
nvmem-cells = <&precal_art_9000>, <&hw_mac_addr 4>;
|
||||
nvmem-cell-names = "pre-calibration", "mac-address";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -343,8 +343,7 @@ define Device/cilab_meshpoint-one
|
||||
DEVICE_MODEL := MeshPoint.One
|
||||
DEVICE_PACKAGES += kmod-i2c-gpio kmod-iio-bmp280-i2c kmod-hwmon-ina2xx kmod-rtc-pcf2127
|
||||
endef
|
||||
# Missing DSA Setup
|
||||
#TARGET_DEVICES += cilab_meshpoint-one
|
||||
TARGET_DEVICES += cilab_meshpoint-one
|
||||
|
||||
define Device/compex_wpj419
|
||||
$(call Device/FitImage)
|
||||
|
||||
@@ -17,10 +17,6 @@ case "$board" in
|
||||
[ "$PHYNBR" = "0" ] && echo $(mtd_get_mac_ascii CFG1 RADIOADDR0) > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" = "1" ] && echo $(mtd_get_mac_ascii CFG1 RADIOADDR1) > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
linksys,ea7500-v1|\
|
||||
linksys,ea8500)
|
||||
macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) $(($PHYNBR + 1)) > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
esac
|
||||
|
||||
OPATH=${DEVPATH##/devices/platform/}
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
wifi@0,0 {
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x10000 0 0 0 0>;
|
||||
nvmem-cells = <&precal_art_1000>;
|
||||
nvmem-cell-names = "pre-calibration";
|
||||
nvmem-cells = <&precal_art_1000>, <&hw_mac_addr 1>;
|
||||
nvmem-cell-names = "pre-calibration", "mac-address";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -71,8 +71,8 @@
|
||||
wifi@0,0 {
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x10000 0 0 0 0>;
|
||||
nvmem-cells = <&precal_art_5000>;
|
||||
nvmem-cell-names = "pre-calibration";
|
||||
nvmem-cells = <&precal_art_5000>, <&hw_mac_addr 2>;
|
||||
nvmem-cell-names = "pre-calibration", "mac-address";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
reg = <0xe105300 0x100>;
|
||||
};
|
||||
|
||||
ppe@e234000 {
|
||||
ppe: ppe@e234000 {
|
||||
compatible = "lantiq,ppe-ase";
|
||||
reg = <0xe234000 0x40000>;
|
||||
interrupt-parent = <&icu0>;
|
||||
|
||||
@@ -78,6 +78,11 @@
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&ppe {
|
||||
nvmem-cells = <&macaddr_uboot_ethaddr 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&localbus {
|
||||
flash@0 {
|
||||
compatible = "lantiq,nor";
|
||||
|
||||
@@ -57,6 +57,16 @@
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
nvmem-cells = <&macaddr_uboot_ethaddr 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&ppe {
|
||||
nvmem-cells = <&macaddr_uboot_ethaddr 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&gphy0 {
|
||||
lantiq,gphy-mode = <GPHY_MODE_GE>;
|
||||
};
|
||||
@@ -69,8 +79,6 @@
|
||||
pinctrl-0 = <&gphy0_led0_pins>, <&gphy0_led1_pins>, <&gphy0_led2_pins>,
|
||||
<&gphy1_led0_pins>, <&gphy1_led1_pins>, <&gphy1_led2_pins>;
|
||||
pinctrl-names = "default";
|
||||
nvmem-cells = <&macaddr_uboot_ethaddr 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&gswip_mdio {
|
||||
|
||||
@@ -116,6 +116,11 @@
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&ppe {
|
||||
nvmem-cells = <&macaddr_boardconfig_16 2>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&gphy0 {
|
||||
lantiq,gphy-mode = <GPHY_MODE_FE>;
|
||||
};
|
||||
|
||||
@@ -216,6 +216,8 @@
|
||||
label = "wan";
|
||||
phy-mode = "rgmii";
|
||||
phy-handle = <&phy5>;
|
||||
nvmem-cells = <&macaddr_boardconfig_16 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -314,6 +314,8 @@
|
||||
label = "wan";
|
||||
phy-mode = "internal";
|
||||
phy-handle = <&phy13>;
|
||||
nvmem-cells = <&macaddr_boardconfig_16 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
port@5 {
|
||||
reg = <5>;
|
||||
|
||||
@@ -226,11 +226,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&ppe {
|
||||
nvmem-cells = <&macaddr_caldata_110c 4>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&localbus {
|
||||
flash@1 {
|
||||
compatible = "lantiq,nand-xway";
|
||||
|
||||
@@ -106,6 +106,11 @@
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&ppe {
|
||||
nvmem-cells = <&macaddr_uboot_ethaddr 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&gphy0 {
|
||||
lantiq,gphy-mode = <GPHY_MODE_GE>;
|
||||
};
|
||||
|
||||
@@ -157,10 +157,18 @@
|
||||
<&gphy0_led1_pins>, <&gphy0_led2_pins>,
|
||||
<&gphy1_led1_pins>, <&gphy1_led2_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
ð0 {
|
||||
nvmem-cells = <&macaddr_uboot_ethaddr 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&ppe {
|
||||
nvmem-cells = <&macaddr_uboot_ethaddr 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&gswip_mdio {
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0x0>;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
label-mac-device = &gmac0;
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
@@ -212,6 +213,18 @@
|
||||
label = "devinfo";
|
||||
reg = <0x51c0000 0x40000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "ascii-eq-delim-env";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
hw_mac_addr: hw_mac_addr {
|
||||
compatible = "mac-base";
|
||||
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@5200000 {
|
||||
@@ -272,6 +285,16 @@
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
nvmem-cells = <&hw_mac_addr 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
nvmem-cells = <&hw_mac_addr 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&ssusb {
|
||||
vusb33-supply = <®_3p3v>;
|
||||
vbus-supply = <®_5v>;
|
||||
|
||||
@@ -29,11 +29,6 @@ mediatek_setup_macs()
|
||||
local board="$1"
|
||||
|
||||
case $board in
|
||||
linksys,ea7500-v3)
|
||||
lan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
||||
wan_mac=$lan_mac
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
netgear,ex6250-v2)
|
||||
lan_mac=$(mtd_get_mac_ascii Config mac)
|
||||
label_mac=$lan_mac
|
||||
|
||||
@@ -245,6 +245,7 @@ CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_LAYOUTS=y
|
||||
CONFIG_NVMEM_LAYOUT_ASCII_ENV=y
|
||||
# CONFIG_NVMEM_LAYOUT_ADTRAN is not set
|
||||
# CONFIG_NVMEM_MTK_EFUSE is not set
|
||||
CONFIG_NVMEM_SYSFS=y
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
label-mac-device = &gmac0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -116,6 +117,18 @@
|
||||
label = "devinfo";
|
||||
reg = <0x140000 0x40000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "ascii-eq-delim-env";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
hw_mac_addr: hw_mac_addr {
|
||||
compatible = "mac-base";
|
||||
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@180000 {
|
||||
@@ -155,8 +168,8 @@
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&eeprom_factory_0>;
|
||||
nvmem-cell-names = "eeprom";
|
||||
nvmem-cells = <&eeprom_factory_0>, <&hw_mac_addr 1>;
|
||||
nvmem-cell-names = "eeprom", "mac-address";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -164,15 +177,23 @@
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&eeprom_factory_8000>;
|
||||
nvmem-cell-names = "eeprom";
|
||||
nvmem-cells = <&eeprom_factory_8000>, <&hw_mac_addr 2>;
|
||||
nvmem-cell-names = "eeprom", "mac-address";
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
nvmem-cells = <&hw_mac_addr 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
phy-handle = <ðphy4>;
|
||||
|
||||
nvmem-cells = <&hw_mac_addr 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
ðphy4 {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
label-mac-device = &gmac0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -130,6 +131,18 @@
|
||||
label = "devinfo";
|
||||
reg = <0x140000 0x40000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "ascii-eq-delim-env";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
hw_mac_addr: hw_mac_addr {
|
||||
compatible = "mac-base";
|
||||
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@180000 {
|
||||
@@ -183,8 +196,8 @@
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&eeprom_factory_0>;
|
||||
nvmem-cell-names = "eeprom";
|
||||
nvmem-cells = <&eeprom_factory_0>, <&hw_mac_addr 1>;
|
||||
nvmem-cell-names = "eeprom", "mac-address";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -192,15 +205,23 @@
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&eeprom_factory_8000>;
|
||||
nvmem-cell-names = "eeprom";
|
||||
nvmem-cells = <&eeprom_factory_8000>, <&hw_mac_addr 2>;
|
||||
nvmem-cell-names = "eeprom", "mac-address";
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
nvmem-cells = <&hw_mac_addr 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
phy-handle = <ðphy0>;
|
||||
|
||||
nvmem-cells = <&hw_mac_addr 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
ðphy0 {
|
||||
|
||||
@@ -292,17 +292,6 @@ ramips_setup_macs()
|
||||
wan_mac=$lan_mac
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
linksys,e5600|\
|
||||
linksys,ea6350-v4|\
|
||||
linksys,ea7300-v1|\
|
||||
linksys,ea7300-v2|\
|
||||
linksys,ea7500-v2|\
|
||||
linksys,ea8100-v1|\
|
||||
linksys,ea8100-v2)
|
||||
lan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
||||
wan_mac=$lan_mac
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
belkin,rt1800|\
|
||||
linksys,e7350)
|
||||
lan_mac=$(mtd_get_mac_ascii Config lan_hwaddr)
|
||||
|
||||
@@ -120,17 +120,6 @@ case "$board" in
|
||||
[ "$PHYNBR" = "1" ] && \
|
||||
macaddr_setbit_la "$(mtd_get_mac_binary rf-eeprom 0x4)" > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
linksys,e5600|\
|
||||
linksys,ea6350-v4|\
|
||||
linksys,ea7300-v1|\
|
||||
linksys,ea7300-v2|\
|
||||
linksys,ea7500-v2|\
|
||||
linksys,ea8100-v1|\
|
||||
linksys,ea8100-v2)
|
||||
hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
||||
[ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
belkin,rt1800|\
|
||||
linksys,e7350)
|
||||
hw_mac_addr=$(mtd_get_mac_ascii Config wan_hwaddr)
|
||||
|
||||
@@ -200,6 +200,7 @@ CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=4
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_LAYOUTS=y
|
||||
CONFIG_NVMEM_LAYOUT_ASCII_ENV=y
|
||||
CONFIG_NVMEM_LAYOUT_MIKROTIK=y
|
||||
CONFIG_NVMEM_LAYOUT_U_BOOT_ENV=y
|
||||
CONFIG_OF=y
|
||||
|
||||
@@ -10,7 +10,7 @@ Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
|
||||
|
||||
--- a/drivers/net/phy/sfp.c
|
||||
+++ b/drivers/net/phy/sfp.c
|
||||
@@ -718,10 +718,64 @@ static int sfp_i2c_write(struct sfp *sfp
|
||||
@@ -724,10 +724,64 @@ static int sfp_i2c_write(struct sfp *sfp
|
||||
return ret == ARRAY_SIZE(msgs) ? len : 0;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
|
||||
|
||||
sfp->i2c = i2c;
|
||||
sfp->read = sfp_i2c_read;
|
||||
@@ -753,6 +807,29 @@ static int sfp_i2c_mdiobus_create(struct
|
||||
@@ -759,6 +813,29 @@ static int sfp_i2c_mdiobus_create(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
|
||||
static void sfp_i2c_mdiobus_destroy(struct sfp *sfp)
|
||||
{
|
||||
mdiobus_unregister(sfp->i2c_mii);
|
||||
@@ -1927,9 +2004,15 @@ static void sfp_sm_fault(struct sfp *sfp
|
||||
@@ -1933,9 +2010,15 @@ static void sfp_sm_fault(struct sfp *sfp
|
||||
|
||||
static int sfp_sm_add_mdio_bus(struct sfp *sfp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user