...
 
Commits (14)
......@@ -260,6 +260,11 @@ generate_static_system() {
uci -q set "system.@system[-1].hostname=$hostname"
fi
local label_macaddr
if json_get_var label_macaddr label_macaddr; then
uci -q set "system.@system[-1].label_macaddr=$label_macaddr"
fi
if json_is_a ntpserver array; then
local keys key
json_get_keys keys ntpserver
......
......@@ -12,6 +12,17 @@ get_mac_binary() {
hexdump -v -n 6 -s $offset -e '5/1 "%02x:" 1/1 "%02x"' $path 2>/dev/null
}
get_mac_label() {
local basepath="/proc/device-tree"
local macdevice="$(cat "$basepath/aliases/label-mac-device" 2>/dev/null)"
local macaddr
[ -n "$macdevice" ] && macaddr=$(get_mac_binary "$basepath/$macdevice/mac-address" 0 2>/dev/null)
[ -n "$macaddr" ] || macaddr=$(get_mac_binary "$basepath/$macdevice/local-mac-address" 0 2>/dev/null)
[ -n "$macaddr" ] || macaddr=$(uci -q get system.@system[0].label_macaddr)
echo $macaddr
}
find_mtd_chardev() {
local INDEX=$(find_mtd_index "$1")
local PREFIX=/dev/mtd
......
......@@ -307,6 +307,14 @@ ucidef_set_interface_macaddr() {
ucidef_set_interface "$network" macaddr "$macaddr"
}
ucidef_set_label_macaddr() {
local macaddr="$1"
json_select_object system
json_add_string label_macaddr "$macaddr"
json_select ..
}
ucidef_add_atm_bridge() {
local vpi="$1"
local vci="$2"
......
......@@ -1021,3 +1021,24 @@ define KernelPackage/bnx2x/description
endef
$(eval $(call KernelPackage,bnx2x))
define KernelPackage/be2net
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Broadcom Emulex OneConnect 10Gbps NIC
DEPENDS:=@PCI_SUPPORT +kmod-hwmon-core
FILES:=$(LINUX_DIR)/drivers/net/ethernet/emulex/benet/be2net.ko
KCONFIG:= \
CONFIG_BE2NET \
CONFIG_BE2NET_BE2=y \
CONFIG_BE2NET_BE3=y \
CONFIG_BE2NET_LANCER=y \
CONFIG_BE2NET_SKYHAWK=y \
CONFIG_BE2NET_HWMON=y
AUTOLOAD:=$(call AutoProbe,be2net)
endef
define KernelPackage/be2net/description
Broadcom Emulex OneConnect 10Gbit SFP+ support, OneConnect OCe10xxx OCe11xxx OCe14xxx, LightPulse LPe12xxx
endef
$(eval $(call KernelPackage,be2net))
......@@ -124,7 +124,7 @@
* configuration. The contents of buf is printed out has hex dump.
*/
-void wpa_hexdump(int level, const char *title, const void *buf, size_t len);
+static inline void wpa_hexdump(int level, const char *title, const u8 *buf, size_t len)
+static inline void wpa_hexdump(int level, const char *title, const void *buf, size_t len)
+{
+ if (level < CONFIG_MSG_MIN_PRIORITY)
+ return;
......
--- a/wpa_supplicant/wps_supplicant.h
+++ b/wpa_supplicant/wps_supplicant.h
@@ -9,6 +9,7 @@
#ifndef WPS_SUPPLICANT_H
#define WPS_SUPPLICANT_H
+struct wpa_bss;
struct wpa_scan_results;
#ifdef CONFIG_WPS
@@ -16,8 +17,6 @@ struct wpa_scan_results;
#include "wps/wps.h"
#include "wps/wps_defs.h"
-struct wpa_bss;
-
struct wps_new_ap_settings {
const char *ssid_hex;
const char *auth;
......@@ -59,7 +59,7 @@ ARCH_UPPER=`echo $ARCH | tr '[:lower:]' '[:upper:]'`
# Conditionally create fdt information
if [ -n "${DTB}" ]; then
FDT="
FDT_NODE="
fdt@1 {
description = \"${ARCH_UPPER} OpenWrt ${DEVICE} device tree blob\";
data = /incbin/(\"${DTB}\");
......@@ -74,6 +74,7 @@ if [ -n "${DTB}" ]; then
};
};
"
FDT_PROP="fdt = \"fdt@1\";"
fi
# Create a default, fully populated DTS file
......@@ -100,9 +101,7 @@ DATA="/dts-v1/;
algo = \"sha1\";
};
};
${FDT}
${FDT_NODE}
};
configurations {
......@@ -110,7 +109,7 @@ ${FDT}
${CONFIG} {
description = \"OpenWrt\";
kernel = \"kernel@1\";
fdt = \"fdt@1\";
${FDT_PROP}
};
};
};"
......
......@@ -314,9 +314,19 @@ ath79_setup_macs()
adtran,bsap1800-v2|\
adtran,bsap1840)
lan_mac=$(mtd_get_mac_binary "Board data" 2)
label_mac=$lan_mac
;;
alfa-network,ap121f|\
ubnt,airrouter|\
ubnt,bullet-m|\
ubnt,nanostation-m|\
ubnt,rocket-m|\
ubnt,unifi)
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
;;
avm,fritz300e)
lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
;;
avm,fritz4020)
lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
......@@ -334,8 +344,13 @@ ath79_setup_macs()
dlink,dir-842-c1|\
dlink,dir-842-c2|\
dlink,dir-842-c3|\
nec,wg1200cr)
lan_mac=$(mtd_get_mac_ascii devdata "lanmac")
wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
label_mac=$lan_mac
;;
dlink,dir-859-a1|\
nec,wg1200cr|\
qihoo,c301|\
wd,mynet-n750)
lan_mac=$(mtd_get_mac_ascii devdata "lanmac")
wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
......@@ -346,12 +361,9 @@ ath79_setup_macs()
;;
engenius,ecb1750)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
label_mac=$(mtd_get_mac_ascii u-boot-env athaddr)
;;
engenius,epg5000|\
iodata,wn-ac1167dgr|\
iodata,wn-ac1600dgr|\
iodata,wn-ac1600dgr2|\
iodata,wn-ag300dgr)
engenius,epg5000)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
;;
......@@ -364,6 +376,15 @@ ath79_setup_macs()
iodata,etg3-r)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
wan_mac=$(macaddr_add "$lan_mac" -1)
label_mac=$wan_mac
;;
iodata,wn-ac1167dgr|\
iodata,wn-ac1600dgr|\
iodata,wn-ac1600dgr2|\
iodata,wn-ag300dgr)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
label_mac=$wan_mac
;;
jjplus,ja76pf2)
wan_mac=$(fconfig -s -r -d $(find_mtd_part "RedBoot config") -n alias/ethaddr)
......@@ -372,6 +393,7 @@ ath79_setup_macs()
nec,wg800hp)
lan_mac=$(mtd_get_mac_text board_data 0x280)
wan_mac=$(mtd_get_mac_text board_data 0x480)
label_mac=$wan_mac
;;
netgear,wndr3700|\
netgear,wndr3700v2|\
......@@ -382,10 +404,6 @@ ath79_setup_macs()
lan_mac=$(k2t_get_mac "lan_mac")
wan_mac=$(k2t_get_mac "wan_mac")
;;
qihoo,c301)
lan_mac=$(mtd_get_mac_ascii devdata lanmac)
wan_mac=$(mtd_get_mac_ascii devdata wanmac)
;;
rosinson,wr818)
wan_mac=$(mtd_get_mac_binary factory 0x0)
lan_mac=$(macaddr_setbit_la "$wan_mac")
......@@ -406,6 +424,7 @@ ath79_setup_macs()
trendnet,tew-823dru)
lan_mac=$(mtd_get_mac_text mac 0x4)
wan_mac=$(mtd_get_mac_text mac 0x18)
label_mac=$wan_mac
;;
ubnt,routerstation|\
ubnt,routerstation-pro)
......@@ -419,6 +438,7 @@ ath79_setup_macs()
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
}
board_config_update
......
......@@ -19,6 +19,7 @@
led-failsafe = &power_red;
led-running = &power_green;
led-upgrade = &power_green;
label-mac-device = &eth0;
};
extosc: ref {
......
......@@ -12,6 +12,7 @@
led-failsafe = &power_orange;
led-running = &power_green;
led-upgrade = &power_orange;
label-mac-device = &eth0;
};
chosen {
......
......@@ -11,6 +11,7 @@
led-failsafe = &led_system;
led-running = &led_system;
led-upgrade = &led_system;
label-mac-device = &ath9k;
};
keys {
......
......@@ -11,6 +11,7 @@
led-failsafe = &led_system;
led-running = &led_system;
led-upgrade = &led_system;
label-mac-device = &ath9k;
};
keys {
......
......@@ -15,6 +15,7 @@
led-failsafe = &led_system;
led-running = &led_system;
led-upgrade = &led_system;
label-mac-device = &ath9k;
};
keys {
......
......@@ -12,6 +12,7 @@
led-failsafe = &globe;
led-running = &globe;
led-upgrade = &globe;
label-mac-device = &wifi;
};
airrouter-leds {
......
......@@ -15,6 +15,7 @@
led-failsafe = &dome_green;
led-running = &dome_green;
led-upgrade = &dome_green;
label-mac-device = &wifi;
};
extosc: ref {
......@@ -110,7 +111,7 @@
&pcie {
status = "okay";
wifi@0,0 {
wifi: wifi@0,0 {
reg = <0x0000 0 0 0 0>;
qca,no-eeprom;
};
......
......@@ -89,7 +89,7 @@
&pcie {
status = "okay";
wifi@0,0 {
wifi: wifi@0,0 {
reg = <0x0000 0 0 0 0>;
qca,no-eeprom;
};
......
......@@ -9,6 +9,7 @@
aliases {
led-boot = &link4;
led-failsafe = &link4;
label-mac-device = &wifi;
};
leds {
......
......@@ -15,6 +15,7 @@
led-failsafe = &power;
led-running = &power;
led-upgrade = &power;
label-mac-device = &ath9k;
};
keys {
......
......@@ -10,6 +10,10 @@
compatible = "buffalo,wzr-hp-g450h", "qca,ar7242";
model = "Buffalo WZR-HP-G450H/WZR-450HP";
aliases {
label-mac-device = &eth0;
};
ath9k-leds {
compatible = "gpio-leds";
......
......@@ -15,6 +15,7 @@
led-failsafe = &system;
led-running = &system;
led-upgrade = &system;
label-mac-device = &eth0;
};
chosen {
......
......@@ -15,6 +15,7 @@
led-failsafe = &system;
led-running = &system;
led-upgrade = &system;
label-mac-device = &eth0;
};
extosc: ref {
......
......@@ -15,6 +15,7 @@
led-failsafe = &system;
led-running = &system;
led-upgrade = &system;
label-mac-device = &eth0;
};
extosc: ref {
......
......@@ -15,6 +15,7 @@
led-failsafe = &led_system;
led-running = &led_system;
led-upgrade = &led_system;
label-mac-device = &eth0;
};
keys {
......
......@@ -15,6 +15,7 @@
led-boot = &wlan;
led-failsafe = &wlan;
led-upgrade = &wlan;
label-mac-device = &eth0;
};
leds {
......
......@@ -12,6 +12,7 @@
aliases {
serial0 = &uart;
label-mac-device = &wmac;
};
leds {
......
......@@ -16,6 +16,7 @@
led-failsafe = &led_system;
led-running = &led_system;
led-upgrade = &led_system;
label-mac-device = &wmac;
};
keys {
......
......@@ -16,6 +16,7 @@
led-failsafe = &system;
led-running = &system;
led-upgrade = &system;
label-mac-device = &eth0;
};
leds {
......
......@@ -13,6 +13,7 @@
aliases {
led-boot = &led_lan;
led-failsafe = &led_lan;
label-mac-device = &eth0;
};
leds {
......
......@@ -13,6 +13,7 @@
led-failsafe = &system;
led-running = &system;
led-upgrade = &system;
label-mac-device = &eth0;
};
keys {
......
......@@ -16,6 +16,7 @@
led-failsafe = &led_system;
led-running = &led_system;
led-upgrade = &led_system;
label-mac-device = &eth0;
};
keys {
......
......@@ -16,6 +16,7 @@
led-failsafe = &system;
led-running = &system;
led-upgrade = &system;
label-mac-device = &wmac;
};
keys {
......
......@@ -13,6 +13,7 @@
led-failsafe = &system;
led-running = &system;
led-upgrade = &system;
label-mac-device = &wmac;
};
keys: keys {
......
......@@ -14,6 +14,7 @@
led-running = &system;
led-upgrade = &system;
led-failsafe = &system;
label-mac-device = &wmac;
};
leds {
......
......@@ -15,6 +15,7 @@
led-boot = &wan;
led-failsafe = &wan;
led-upgrade = &wan;
label-mac-device = &eth0;
};
leds {
......
......@@ -7,6 +7,10 @@
#include "ar9344.dtsi"
/ {
aliases {
label-mac-device = &wmac;
};
keys {
compatible = "gpio-keys";
......
......@@ -6,6 +6,10 @@
/ {
model = "TP-Link TL-WDR3500 v1";
compatible = "tplink,tl-wdr3500-v1", "qca,ar9344";
aliases {
label-mac-device = &wmac;
};
};
&leds {
......
......@@ -2,6 +2,12 @@
#include "ar9344_tplink_tl-wdrxxxx.dtsi"
/ {
aliases {
label-mac-device = &ath9k;
};
};
&leds {
usb1 {
label = "tp-link:green:usb1";
......
......@@ -10,6 +10,10 @@
compatible = "comfast,cf-e5", "qca,qca9531";
model = "COMFAST CF-E5/E7";
aliases {
label-mac-device = &eth0;
};
keys {
compatible = "gpio-keys-polled";
poll-interval = <20>;
......
......@@ -11,6 +11,7 @@
led-failsafe = &led_status;
led-running = &led_status;
led-upgrade = &led_status;
label-mac-device = &eth0;
};
keys {
......
......@@ -10,6 +10,10 @@
compatible = "glinet,gl-ar750", "qca,qca9531";
model = "GL.iNet GL-AR750";
aliases {
label-mac-device = &eth0;
};
keys {
compatible = "gpio-keys";
......
......@@ -10,6 +10,10 @@
compatible = "tplink,archer-d50-v1", "qca,qca9531";
model = "TP-Link Archer D50 v1";
aliases {
label-mac-device = &wmac;
};
chosen {
bootargs = "console=ttyS0,115200n8";
};
......
......@@ -16,6 +16,7 @@
led-failsafe = &system;
led-running = &system;
led-upgrade = &system;
label-mac-device = &eth0;
};
leds {
......
......@@ -11,6 +11,10 @@
bootargs = "console=ttyS0,115200n8";
};
aliases {
label-mac-device = &wmac;
};
gpio_leds: leds {
compatible = "gpio-leds";
......
......@@ -15,6 +15,7 @@
led-failsafe = &power_led;
led-running = &power_led;
led-upgrade = &power_led;
label-mac-device = &eth1;
};
gpio_leds: leds {
......
......@@ -10,6 +10,10 @@
compatible = "ubnt,acb-isp", "qca,qca9533";
model = "Ubiquiti airCube ISP";
aliases {
label-mac-device = &wmac;
};
keys {
compatible = "gpio-keys";
......
......@@ -16,6 +16,7 @@
led-failsafe = &led_system;
led-running = &led_system;
led-upgrade = &led_system;
label-mac-device = &eth1;
};
gpio_leds: leds {
......
......@@ -16,6 +16,7 @@
led-failsafe = &power_amber;
led-running = &power_green;
led-upgrade = &power_amber;
label-mac-device = &eth0;
};
led_spi {
......
......@@ -19,6 +19,7 @@
led-failsafe = &system;
led-running = &system;
led-upgrade = &system;
label-mac-device = &eth0;
};
leds {
......
......@@ -16,6 +16,7 @@
led-failsafe = &system;
led-running = &system;
led-upgrade = &system;
label-mac-device = &eth1;
};
gpio_leds: leds {
......
......@@ -17,6 +17,7 @@
led-running = &led_power;
led-upgrade = &led_power;
mdio-gpio0 = &mdio2;
label-mac-device = &eth0;
};
leds {
......
......@@ -19,6 +19,7 @@
led-failsafe = &led_system;
led-running = &led_system;
led-upgrade = &led_system;
label-mac-device = &eth1;
};
gpio_leds: leds {
......
......@@ -16,6 +16,7 @@
led-failsafe = &system;
led-running = &system;
led-upgrade = &system;
label-mac-device = &wmac;
};
leds {
......
......@@ -19,6 +19,7 @@
led-failsafe = &led_system;
led-running = &led_system;
led-upgrade = &led_system;
label-mac-device = &eth0;
};
leds {
......
......@@ -55,6 +55,7 @@
led-failsafe = &power;
led-running = &power;
led-upgrade = &power;
label-mac-device = &eth0;
};
leds {
......
......@@ -13,6 +13,7 @@
led-failsafe = &power;
led-running = &power;
led-upgrade = &power;
label-mac-device = &eth1;
};
chosen {
......
......@@ -19,6 +19,7 @@
led-failsafe = &system;
led-running = &system;
led-upgrade = &system;
label-mac-device = &eth0;
};
led_spi {
......
......@@ -16,6 +16,7 @@
led-failsafe = &power;
led-running = &power;
led-upgrade = &power;
label-mac-device = &eth0;
};
leds {
......
......@@ -16,6 +16,7 @@
led-failsafe = &system;
led-running = &system;
led-upgrade = &system;
label-mac-device = &eth0;
};
gpio_leds: leds {
......
......@@ -16,6 +16,7 @@
led-failsafe = &system;
led-running = &system;
led-upgrade = &system;
label-mac-device = &wmac;
};
gpio_leds: leds {
......
......@@ -2,6 +2,12 @@
#include "qca9563_ubnt_unifiac.dtsi"
/ {
aliases {
label-mac-device = &eth0;
};
};
&mdio0 {
status = "okay";
......
......@@ -2,6 +2,12 @@
#include "qca9563_ubnt_unifiac.dtsi"
/ {
aliases {
label-mac-device = &eth0;
};
};
&mdio0 {
status = "okay";
phy-mask = <0>;
......
......@@ -46,6 +46,7 @@ endef
define Device/ubnt-xm
$(Device/ubnt)
DEVICE_VARIANT := XM
DEVICE_PACKAGES += kmod-usb-ohci rssileds
UBNT_TYPE := XM
UBNT_CHIP := ar7240
......@@ -71,6 +72,7 @@ endef
define Device/ubnt-xw
$(Device/ubnt)
DEVICE_VARIANT := XW
UBNT_TYPE := XW
UBNT_CHIP := ar934x
UBNT_BOARD := XM
......@@ -96,7 +98,6 @@ TARGET_DEVICES += ubnt_bullet-m
define Device/ubnt_bullet-m-xw
$(Device/ubnt-xw)
DEVICE_MODEL := Bullet-M
DEVICE_VARIANT := XW
SUPPORTED_DEVICES += bullet-m-xw
endef
TARGET_DEVICES += ubnt_bullet-m-xw
......@@ -118,8 +119,7 @@ TARGET_DEVICES += ubnt_nanostation-m
define Device/ubnt_nanostation-m-xw
$(Device/ubnt-xw)
DEVICE_MODEL := Nanostation M
DEVICE_VARIANT := XW
SUPPORTED_DEVICES += nano-m-xw
SUPPORTED_DEVICES += nanostation-m-xw
endef
TARGET_DEVICES += ubnt_nanostation-m-xw
......
......@@ -60,8 +60,8 @@ mtdsplit_fit_parse(struct mtd_info *mtd,
hdr_len = sizeof(struct fdt_header);
/* Parse the MTD device & search for the FIT image location */
for(offset = 0; offset < mtd->size; offset += mtd->erasesize) {
ret = mtd_read(mtd, 0, hdr_len, &retlen, (void*) &hdr);
for(offset = 0; offset + hdr_len < mtd->size; offset += mtd->erasesize) {
ret = mtd_read(mtd, offset, hdr_len, &retlen, (void*) &hdr);
if (ret) {
pr_err("read error in \"%s\" at offset 0x%llx\n",
mtd->name, (unsigned long long) offset);
......
......@@ -29,6 +29,7 @@
led-failsafe = &general;
led-running = &power;
led-upgrade = &general;
label-mac-device = &gmac2;
};
chosen {
......
......@@ -34,6 +34,7 @@
led-failsafe = &power_amber;
led-running = &power_white;
led-upgrade = &power_amber;
label-mac-device = &gmac2;
};
chosen {
......
......@@ -451,7 +451,8 @@ latency_delay() {
errors() {
local lsctg
local dpctg
local ccsg
local fecsf
local fecsn
local esf
local esn
local sesf
......@@ -468,16 +469,15 @@ errors() {
local hecf
local hecn
local fecn
local fecf
lsctg=$(dsl_cmd pmlsctg 1)
fecsf=$(dsl_val "$lsctg" nFECS)
esf=$(dsl_val "$lsctg" nES)
sesf=$(dsl_val "$lsctg" nSES)
lossf=$(dsl_val "$lsctg" nLOSS)
uasf=$(dsl_val "$lsctg" nUAS)
lsctg=$(dsl_cmd pmlsctg 0)
fecsn=$(dsl_val "$lsctg" nFECS)
esn=$(dsl_val "$lsctg" nES)
sesn=$(dsl_val "$lsctg" nSES)
lossn=$(dsl_val "$lsctg" nLOSS)
......@@ -493,15 +493,9 @@ errors() {
crc_pn=$(dsl_val "$dpctg" nCRC_P)
crcp_pn=$(dsl_val "$dpctg" nCRCP_P)
ccsg=$(dsl_cmd pmccsg 0 1 0)
fecf=$(dsl_val "$ccsg" nFEC)
ccsg=$(dsl_cmd pmccsg 0 0 0)
fecn=$(dsl_val "$ccsg" nFEC)
if [ "$action" = "lucistat" ]; then
echo "dsl.errors_fec_near=${fecn:-nil}"
echo "dsl.errors_fec_far=${fecf:-nil}"
echo "dsl.errors_fecs_near=${fecsn:-nil}"
echo "dsl.errors_fecs_far=${fecsf:-nil}"
echo "dsl.errors_es_near=${esn:-nil}"
echo "dsl.errors_es_far=${esf:-nil}"
echo "dsl.errors_ses_near=${sesn:-nil}"
......@@ -517,7 +511,7 @@ errors() {
echo "dsl.errors_crcp_p_near=${crcp_pn:-nil}"
echo "dsl.errors_crcp_p_far=${crcp_pf:-nil}"
else
echo "Forward Error Correction Seconds (FECS): Near: ${fecn} / Far: ${fecf}"
echo "Forward Error Correction Seconds (FECS): Near: ${fecsn} / Far: ${fecsf}"
echo "Errored seconds (ES): Near: ${esn} / Far: ${esf}"
echo "Severely Errored Seconds (SES): Near: ${sesn} / Far: ${sesf}"
echo "Loss of Signal Seconds (LOSS): Near: ${lossn} / Far: ${lossf}"
......
......@@ -19,6 +19,7 @@
led-failsafe = &tricolor_red;
led-running = &tricolor_green;
led-upgrade = &tricolor_red;
label-mac-device = &enet0;
};
chosen {
......
......@@ -28,6 +28,7 @@
led-failsafe = &system_green;
led-running = &system_green;
led-upgrade = &system_green;
label-mac-device = &enet0;
};
memory {
......
......@@ -511,7 +511,6 @@ ramips_setup_macs()
8devices,carambola|\
alfa-network,w502u|\
arcwireless,freestation5|\
cudy,wr1000|\
lenovo,newifi-y1|\
lenovo,newifi-y1s|\
netgear,wnce2001|\
......@@ -547,7 +546,6 @@ ramips_setup_macs()
planex,vr500|\
samknows,whitebox-v8|\
youku,yk-l2|\
zbtlink,zbt-we1326|\
zbtlink,zbt-we3526)
wan_mac=$(mtd_get_mac_binary factory 0xe006)
;;
......@@ -558,6 +556,7 @@ ramips_setup_macs()
belkin,f9k1109v1)
wan_mac=$(mtd_get_mac_ascii uboot-env HW_WAN_MAC)
lan_mac=$(mtd_get_mac_ascii uboot-env HW_LAN_MAC)
label_mac=$wan_mac
;;
buffalo,wcr-1166ds|\
buffalo,wsr-1166dhp)
......@@ -574,6 +573,10 @@ ramips_setup_macs()
zyxel,keenetic-start)
# This empty case has to be kept for devices without any MAC address adjustments
;;
cudy,wr1000)
wan_mac=$(mtd_get_mac_binary factory 0x2e)
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
;;
dlink,dch-m225|\
samsung,cy-swr1100)
lan_mac=$(mtd_get_mac_ascii factory lanmac)
......@@ -587,6 +590,17 @@ ramips_setup_macs()
lava,lr-25g001)
wan_mac=$(jboot_config_read -m -i $(find_mtd_part "config") -o 0xE000)
lan_mac=$(macaddr_add "$wan_mac" 1)
label_mac=$wan_mac
;;
dlink,dir-615-d|\
dlink,dir-615-h1|\
glinet,gl-mt300a|\
glinet,gl-mt300n|\
glinet,gl-mt750|\
zbtlink,zbt-wg3526-16m|\
zbtlink,zbt-wg3526-32m)
wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
;;
dlink,dir-645)
lan_mac=$(mtd_get_mac_ascii nvram lanmac)
......@@ -595,6 +609,7 @@ ramips_setup_macs()
dlink,dir-860l-b1)
lan_mac=$(mtd_get_mac_ascii factory lanmac)
wan_mac=$(mtd_get_mac_ascii factory wanmac)
label_mac=$(cat /sys/class/ieee80211/phy1/macaddress)
;;
dovado,tiny-ac)
lan_mac=$(mtd_get_mac_ascii u-boot-env LAN_MAC_ADDR)
......@@ -616,7 +631,8 @@ ramips_setup_macs()
hiwifi,hc5861|\
hiwifi,hc5861b|\
hiwifi,hc5962)
lan_mac=`mtd_get_mac_ascii bdinfo "Vfac_mac "`
lan_mac=$(mtd_get_mac_ascii bdinfo "Vfac_mac ")
label_mac=$lan_mac
[ -n "$lan_mac" ] || lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 1)
;;
......@@ -667,13 +683,24 @@ ramips_setup_macs()
trendnet,tew-691gr)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 3)
;;
xiaomi,mir3g|\
vocore,vocore2|\
vocore,vocore2-lite)
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
;;
xiaomi,mir3g)
lan_mac=$(mtd_get_mac_binary factory 0xe006)
;;
xiaomi,mir3p)
lan_mac=$(mtd_get_mac_binary factory 0xe006)
label_mac=$lan_mac
;;
xiaomi,miwifi-mini)
lan_mac=$(macaddr_setbit_la "$(cat /sys/class/net/eth0/address)")
;;
zbtlink,zbt-we1326)
wan_mac=$(mtd_get_mac_binary factory 0xe006)
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
;;
*)
wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
;;
......@@ -681,6 +708,7 @@ ramips_setup_macs()
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
}
board_config_update
......
......@@ -14,6 +14,7 @@
led-failsafe = &led_power_green;
led-running = &led_power_green;
led-upgrade = &led_power_green;
label-mac-device = &ethernet;
};
keys {
......
......@@ -9,6 +9,10 @@
compatible = "glinet,gl-mt300a", "ralink,mt7620a-soc";
model = "GL-MT300A";
aliases {
label-mac-device = &wmac;
};
chosen {
bootargs = "console=ttyS0,115200";
};
......
......@@ -9,6 +9,10 @@
compatible = "glinet,gl-mt300n", "ralink,mt7620a-soc";
model = "GL-MT300N";
aliases {
label-mac-device = &wmac;
};
chosen {
bootargs = "console=ttyS0,115200";
};
......
......@@ -9,6 +9,10 @@
compatible = "glinet,gl-mt750", "ralink,mt7620a-soc";
model = "GL-MT750";
aliases {
label-mac-device = &wmac;
};
chosen {
bootargs = "console=ttyS0,115200";
};
......
......@@ -11,6 +11,7 @@
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &ethernet;
};
leds {
......
......@@ -11,6 +11,7 @@
led-failsafe = &led_power_blue;
led-running = &led_power_blue;
led-upgrade = &led_power_blue;
label-mac-device = &ethernet;
};
gpio_export {
......
......@@ -14,6 +14,7 @@
led-failsafe = &led_blue;
led-running = &led_blue;
led-upgrade = &led_blue;
label-mac-device = &ethernet;
};
chosen {
......
......@@ -11,6 +11,7 @@
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &ethernet;
};
keys {
......
......@@ -15,6 +15,7 @@
led-failsafe = &led_sys;
led-running = &led_sys;
led-upgrade = &led_sys;
label-mac-device = &ethernet;
};
chosen {
......
......@@ -14,6 +14,7 @@
led-failsafe = &led_power_blue;
led-running = &led_power_blue;
led-upgrade = &led_power_blue;
label-mac-device = &ethernet;
};
chosen {
......
......@@ -14,6 +14,7 @@
led-failsafe = &led_power_green;
led-running = &led_power_green;
led-upgrade = &led_power_green;
label-mac-device = &wifi1;
};
chosen {
......@@ -119,7 +120,7 @@
};
&pcie0 {
mt76@0,0 {
wifi0: mt76@0,0 {
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&radio 0x2000>;
ieee80211-freq-limit = <5000000 6000000>;
......@@ -127,7 +128,7 @@
};
&pcie1 {
mt76@0,0 {
wifi1: mt76@0,0 {
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&radio 0>;
ieee80211-freq-limit = <2400000 2500000>;
......
......@@ -14,6 +14,7 @@
led-failsafe = &led_blue;
led-running = &led_blue;
led-upgrade = &led_blue;
label-mac-device = &ethernet;
};
chosen {
......
......@@ -14,6 +14,7 @@
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &ethernet;
};
chosen {
......
......@@ -14,6 +14,7 @@
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &ethernet;
};
chosen {
......
......@@ -14,6 +14,7 @@
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &ethernet;
};
chosen {
......
......@@ -15,6 +15,7 @@
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &ethernet;
};
chosen {
......
......@@ -6,6 +6,10 @@
/ {
compatible = "ubiquiti,edgerouterx", "mediatek,mt7621-soc";
aliases {
label-mac-device = &ethernet;
};
chosen {
bootargs = "console=ttyS0,57600";
};
......
......@@ -9,6 +9,10 @@
compatible = "zbtlink,zbt-we1326", "mediatek,mt7621-soc";
model = "ZBT-WE1326";
aliases {
label-mac-device = &wifi1;
};
chosen {
bootargs = "console=ttyS0,115200";
};
......@@ -83,7 +87,7 @@
};
&pcie0 {
mt76@0,0 {
wifi0: mt76@0,0 {
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x8000>;
ieee80211-freq-limit = <5000000 6000000>;
......@@ -91,7 +95,7 @@
};
&pcie1 {
mt76@0,0 {
wifi1: mt76@0,0 {
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
ieee80211-freq-limit = <2400000 2500000>;
......
......@@ -11,6 +11,7 @@
led-failsafe = &led_status;
led-running = &led_status;
led-upgrade = &led_status;
label-mac-device = &wifi0;
};
chosen {
......@@ -92,7 +93,7 @@
};
&pcie0 {
wifi@0,0 {
wifi0: wifi@0,0 {
compatible = "pci14c3,7603";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
......@@ -100,7 +101,7 @@
};
&pcie1 {
wifi@0,0 {
wifi1: wifi@0,0 {
compatible = "pci14c3,7662";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x8000>;
......
......@@ -14,6 +14,7 @@
led-boot = &led_wps;
led-failsafe = &led_wps;
led-upgrade = &led_wps;
label-mac-device = &wmac;
};
keys {
......
......@@ -14,6 +14,7 @@
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &ethernet;
};
chosen {
......
......@@ -15,6 +15,7 @@
led-failsafe = &led_cpu;
led-running = &led_cpu;
led-upgrade = &led_cpu;
label-mac-device = &ethernet;
};
leds {
......
......@@ -14,6 +14,7 @@
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &ethernet;
};
keys {
......
......@@ -5,6 +5,10 @@
chosen {
bootargs = "console=ttyS0,115200";
};
aliases {
label-mac-device = &ethernet;
};
};
&spi0 {
......
......@@ -4,6 +4,10 @@
chosen {
bootargs = "console=ttyS0,115200";
};
aliases {
label-mac-device = &ethernet;
};
};
&spi0 {
......
......@@ -3,6 +3,10 @@
/ {
compatible = "vocore,vocore2", "mediatek,mt7628an-soc";
aliases {
label-mac-device = &wmac;
};
chosen {
bootargs = "console=ttyS2,115200";
};
......
......@@ -14,6 +14,7 @@
led-failsafe = &led_status_green;
led-running = &led_status_green;
led-upgrade = &led_status_green;
label-mac-device = &wmac;
};
cfi@1f000000 {
......
......@@ -14,6 +14,7 @@
led-failsafe = &led_status_green;
led-running = &led_status_green;
led-upgrade = &led_status_green;
label-mac-device = &wmac;
};
leds {
......