mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
rockchip: add workaroud for usb wlan up at firstboot
This commit is contained in:
parent
caf69dd94b
commit
68da7390fb
@ -1,7 +1,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=mt76
|
PKG_NAME:=mt76
|
||||||
PKG_RELEASE=4
|
PKG_RELEASE=5
|
||||||
|
|
||||||
PKG_LICENSE:=GPLv2
|
PKG_LICENSE:=GPLv2
|
||||||
PKG_LICENSE_FILES:=
|
PKG_LICENSE_FILES:=
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
From b450c426085843114e443fd63c342f52544d00f3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: W_Y_CPP <383152993@qq.com>
|
|
||||||
Date: Mon, 28 Feb 2022 21:19:03 -0500
|
|
||||||
Subject: [PATCH] fix mt76 driver build with kernel 5.15
|
|
||||||
|
|
||||||
---
|
|
||||||
eeprom.c | 9 +++++++--
|
|
||||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/eeprom.c b/eeprom.c
|
|
||||||
index cc74c372d..975a0c0bd 100644
|
|
||||||
--- a/eeprom.c
|
|
||||||
+++ b/eeprom.c
|
|
||||||
@@ -95,10 +95,15 @@ mt76_eeprom_override(struct mt76_phy *phy)
|
|
||||||
struct device_node *np = dev->dev->of_node;
|
|
||||||
const u8 *mac = NULL;
|
|
||||||
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
|
||||||
+ if (np)
|
|
||||||
+ of_get_mac_address(np, phy->macaddr);
|
|
||||||
+#else
|
|
||||||
if (np)
|
|
||||||
mac = of_get_mac_address(np);
|
|
||||||
- if (!IS_ERR_OR_NULL(mac))
|
|
||||||
- ether_addr_copy(phy->macaddr, mac);
|
|
||||||
+ if (!IS_ERR_OR_NULL(mac))
|
|
||||||
+ ether_addr_copy(phy->macaddr, mac);
|
|
||||||
+#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!is_valid_ether_addr(phy->macaddr)) {
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -18,7 +18,7 @@ include $(INCLUDE_DIR)/target.mk
|
|||||||
|
|
||||||
DEFAULT_PACKAGES += uboot-envtools partx-utils e2fsprogs mkf2fs kmod-gpio-button-hotplug \
|
DEFAULT_PACKAGES += uboot-envtools partx-utils e2fsprogs mkf2fs kmod-gpio-button-hotplug \
|
||||||
automount autocore-arm autosamba fdisk cfdisk e2fsprogs ethtool haveged htop \
|
automount autocore-arm autosamba fdisk cfdisk e2fsprogs ethtool haveged htop \
|
||||||
luci-app-zerotier luci-app-ipsec-vpnd
|
luci-app-zerotier luci-app-ipsec-vpnd wpad-openssl kmod-mt76x2u usbutils
|
||||||
|
|
||||||
KERNELNAME:=Image dtbs
|
KERNELNAME:=Image dtbs
|
||||||
|
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
sleep 10
|
||||||
|
[ -n "$(cat /proc/net/wireless | grep wlan)" ] && wifi config && wifi
|
Loading…
Reference in New Issue
Block a user