From fc7ff015761e4b6124c8fca486dfee8e9f06fa39 Mon Sep 17 00:00:00 2001 From: CN_SZTL <22235437+1715173329@users.noreply.github.com> Date: Thu, 23 Apr 2020 10:47:31 +0800 Subject: [PATCH 01/38] openssl: bump to 1.1.1g (#4415) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes NULL dereference in SSL_check_chain() for TLS 1.3, marked with high severity, assigned CVE-2020-1967. Ref: https://www.openssl.org/news/secadv/20200421.txt Cherry-pick from openwrt/openwrt@3773ae1. Also add mirror for mainland China user in this commit. Signed-off-by: Petr Štetiar Signed-off-by: CN_SZTL Co-authored-by: Petr Štetiar --- package/libs/openssl/Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index e2f2661566..0db051b6ee 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssl PKG_BASE:=1.1.1 -PKG_BUGFIX:=f +PKG_BUGFIX:=g PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) PKG_RELEASE:=1 PKG_USE_MIPS16:=0 @@ -19,12 +19,13 @@ PKG_BUILD_PARALLEL:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:= \ - http://ftp.fi.muni.cz/pub/openssl/source/ \ - http://ftp.linux.hr/pub/openssl/source/ \ + https://mirrors.cloud.tencent.com/openssl/source/ \ + https://mirrors.cloud.tencent.com/openssl/source/old/$(PKG_BASE)/ \ + https://ftp.fi.muni.cz/pub/openssl/source/ \ ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \ - http://www.openssl.org/source/ \ - http://www.openssl.org/source/old/$(PKG_BASE)/ -PKG_HASH:=186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35 + https://www.openssl.org/source/ \ + https://www.openssl.org/source/old/$(PKG_BASE)/ +PKG_HASH:=ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46 PKG_LICENSE:=OpenSSL PKG_LICENSE_FILES:=LICENSE From 463b6ac0508de4788a6e41335471ced0a255e1cd Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:42:46 +0800 Subject: [PATCH 02/38] mac80211: fixed slow wireless startup (#4420) * hostapd: reduce to a single instance per service * mac80211: sync upstream source code * iw: bump to 5.4 --- package/base-files/files/sbin/wifi | 2 +- package/kernel/mac80211/Makefile | 2 +- .../files/lib/netifd/wireless/mac80211.sh | 42 +- ...ta-frames-without-key-on-encrypted-l.patch | 148 +++++ package/network/services/hostapd/Makefile | 13 +- .../services/hostapd/files/hostapd.hotplug | 46 -- .../network/services/hostapd/files/wpad.init | 25 + .../hostapd/patches/600-ubus_support.patch | 66 +- .../hostapd/patches/700-wifi-reload.patch | 58 +- .../services/hostapd/src/src/ap/ubus.c | 14 +- .../hostapd/src/wpa_supplicant/ubus.c | 17 +- package/network/utils/iw/Makefile | 5 +- .../utils/iw/patches/001-nl80211_h_sync.patch | 626 +----------------- .../utils/iw/patches/120-antenna_gain.patch | 8 +- .../iw/patches/130-survey-bss-rx-time.patch | 12 + .../utils/iw/patches/200-reduce_size.patch | 118 ++-- 16 files changed, 349 insertions(+), 853 deletions(-) create mode 100644 package/kernel/mac80211/patches/subsys/314-mac80211-drop-data-frames-without-key-on-encrypted-l.patch delete mode 100644 package/network/services/hostapd/files/hostapd.hotplug create mode 100644 package/network/services/hostapd/files/wpad.init create mode 100644 package/network/utils/iw/patches/130-survey-bss-rx-time.patch diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi index 261d2fb500..a8b4451c60 100755 --- a/package/base-files/files/sbin/wifi +++ b/package/base-files/files/sbin/wifi @@ -6,7 +6,7 @@ usage() { cat </dev/null 2>&1 rc="$?" [ "$rc" = 233 ] && { # Device might have just been deleted, give the kernel some time to finish cleaning it up sleep 1 - iw phy "$phy" interface add "$ifname" type "$type" $wdsflag + iw phy "$phy" interface add "$ifname" type "$type" $wdsflag >/dev/null 2>&1 rc="$?" } [ "$rc" = 233 ] && { # Keep matching pre-existing interface [ -d "/sys/class/ieee80211/${phy}/device/net/${ifname}" ] && \ - case "$(iw dev wlan0 info | grep "^\ttype" | cut -d' ' -f2- 2>/dev/null)" in + case "$(iw dev $ifname info | grep "^\ttype" | cut -d' ' -f2- 2>/dev/null)" in "AP") [ "$type" = "__ap" ] && rc=0 ;; @@ -475,17 +476,26 @@ mac80211_iw_interface_add() { } [ "$rc" = 233 ] && { - iw dev "$ifname" del - sleep 1 + iw dev "$ifname" del >/dev/null 2>&1 + [ "$?" = 0 ] && { + sleep 1 - iw phy "$phy" interface add "$ifname" type "$type" $wdsflag - rc="$?" + iw phy "$phy" interface add "$ifname" type "$type" $wdsflag >/dev/null 2>&1 + rc="$?" + } } - [ "$rc" = 233 ] && { + [ "$rc" != 0 ] && { # Device might not support virtual interfaces, so the interface never got deleted in the first place. # Check if the interface already exists, and avoid failing in this case. - ip link show dev "$ifname" >/dev/null 2>/dev/null && rc=0 + [ -d "/sys/class/ieee80211/${phy}/device/net/${ifname}" ] && rc=0 + } + + [ "$rc" != 0 ] && { + # Device doesn't support virtual interfaces and may have existing interface other than ifname. + oldifname="$(basename "/sys/class/ieee80211/${phy}/device/net"/* 2>/dev/null)" + [ "$oldifname" ] && ip link set "$oldifname" name "$ifname" 1>/dev/null 2>&1 + rc="$?" } [ "$rc" != 0 ] && wireless_setup_failed INTERFACE_CREATION_FAILED @@ -594,11 +604,11 @@ mac80211_setup_supplicant() { NEWSPLIST="${NEWSPLIST}$ifname " if [ "${NEWAPLIST%% *}" != "${OLDAPLIST%% *}" ]; then - [ "$spobj" ] && ubus call wpa_supplicant.${phy} config_del "{\"iface\":\"$ifname\"}" + [ "$spobj" ] && ubus call wpa_supplicant config_remove "{\"iface\":\"$ifname\"}" add_sp=1 fi [ "$enable" = 0 ] && { - ubus call wpa_supplicant.${phy} config_del "{\"iface\":\"$ifname\"}" + ubus call wpa_supplicant config_remove "{\"iface\":\"$ifname\"}" ip link set dev "$ifname" down return 0 } @@ -623,7 +633,7 @@ mac80211_setup_supplicant_noctl() { NEWSPLIST="${NEWSPLIST}$ifname " [ "$enable" = 0 ] && { - ubus call wpa_supplicant.${phy} config_del "{\"iface\":\"$ifname\"}" + ubus call wpa_supplicant config_remove "{\"iface\":\"$ifname\"}" ip link set dev "$ifname" down return 0 } @@ -814,7 +824,7 @@ mac80211_vap_cleanup() { local vaps="$2" for wdev in $vaps; do - [ "$service" != "none" ] && ubus call ${service}.${phy} config_remove "{\"iface\":\"$wdev\"}" + [ "$service" != "none" ] && ubus call ${service} config_remove "{\"iface\":\"$wdev\"}" ip link set dev "$wdev" down 2>/dev/null iw dev "$wdev" del done @@ -962,9 +972,9 @@ drv_mac80211_setup() { fi if [ "$no_reload" != "0" ]; then add_ap=1 - ubus wait_for hostapd.$phy - ubus call hostapd.${phy} config_add "{\"iface\":\"$primary_ap\", \"config\":\"${hostapd_conf_file}\"}" - local hostapd_pid=$(ubus call service list '{"name": "hostapd"}' | jsonfilter -l 1 -e "@['hostapd'].instances['hostapd-${phy}'].pid") + ubus wait_for hostapd + ubus call hostapd config_add "{\"iface\":\"$primary_ap\", \"config\":\"${hostapd_conf_file}\"}" + local hostapd_pid=$(ubus call service list '{"name": "hostapd"}' | jsonfilter -l 1 -e "@['hostapd'].instances['hostapd'].pid") wireless_add_process "$hostapd_pid" "/usr/sbin/hostapd" 1 fi ret="$?" diff --git a/package/kernel/mac80211/patches/subsys/314-mac80211-drop-data-frames-without-key-on-encrypted-l.patch b/package/kernel/mac80211/patches/subsys/314-mac80211-drop-data-frames-without-key-on-encrypted-l.patch new file mode 100644 index 0000000000..54e09af3b3 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/314-mac80211-drop-data-frames-without-key-on-encrypted-l.patch @@ -0,0 +1,148 @@ +From a0761a301746ec2d92d7fcb82af69c0a6a4339aa Mon Sep 17 00:00:00 2001 +From: Johannes Berg +Date: Thu, 26 Mar 2020 15:09:42 +0200 +Subject: mac80211: drop data frames without key on encrypted links + +If we know that we have an encrypted link (based on having had +a key configured for TX in the past) then drop all data frames +in the key selection handler if there's no key anymore. + +This fixes an issue with mac80211 internal TXQs - there we can +buffer frames for an encrypted link, but then if the key is no +longer there when they're dequeued, the frames are sent without +encryption. This happens if a station is disconnected while the +frames are still on the TXQ. + +Detecting that a link should be encrypted based on a first key +having been configured for TX is fine as there are no use cases +for a connection going from with encryption to no encryption. +With extended key IDs, however, there is a case of having a key +configured for only decryption, so we can't just trigger this +behaviour on a key being configured. + +Cc: stable@vger.kernel.org +Reported-by: Jouni Malinen +Signed-off-by: Johannes Berg +Signed-off-by: Luca Coelho +--- + net/mac80211/debugfs_sta.c | 3 ++- + net/mac80211/key.c | 20 ++++++++++++-------- + net/mac80211/sta_info.h | 1 + + net/mac80211/tx.c | 12 +++++++++--- + 4 files changed, 24 insertions(+), 12 deletions(-) + +--- a/net/mac80211/debugfs_sta.c ++++ b/net/mac80211/debugfs_sta.c +@@ -5,7 +5,7 @@ + * Copyright 2007 Johannes Berg + * Copyright 2013-2014 Intel Mobile Communications GmbH + * Copyright(c) 2016 Intel Deutschland GmbH +- * Copyright (C) 2018 - 2019 Intel Corporation ++ * Copyright (C) 2018 - 2020 Intel Corporation + */ + + #include +@@ -78,6 +78,7 @@ static const char * const sta_flag_names + FLAG(MPSP_OWNER), + FLAG(MPSP_RECIPIENT), + FLAG(PS_DELIVER), ++ FLAG(USES_ENCRYPTION), + #undef FLAG + }; + +--- a/net/mac80211/key.c ++++ b/net/mac80211/key.c +@@ -6,7 +6,7 @@ + * Copyright 2007-2008 Johannes Berg + * Copyright 2013-2014 Intel Mobile Communications GmbH + * Copyright 2015-2017 Intel Deutschland GmbH +- * Copyright 2018-2019 Intel Corporation ++ * Copyright 2018-2020 Intel Corporation + */ + + #include +@@ -262,22 +262,29 @@ static void ieee80211_key_disable_hw_acc + sta ? sta->sta.addr : bcast_addr, ret); + } + +-int ieee80211_set_tx_key(struct ieee80211_key *key) ++static int _ieee80211_set_tx_key(struct ieee80211_key *key, bool force) + { + struct sta_info *sta = key->sta; + struct ieee80211_local *local = key->local; + + assert_key_lock(local); + ++ set_sta_flag(sta, WLAN_STA_USES_ENCRYPTION); ++ + sta->ptk_idx = key->conf.keyidx; + +- if (!ieee80211_hw_check(&local->hw, AMPDU_KEYBORDER_SUPPORT)) ++ if (force || !ieee80211_hw_check(&local->hw, AMPDU_KEYBORDER_SUPPORT)) + clear_sta_flag(sta, WLAN_STA_BLOCK_BA); + ieee80211_check_fast_xmit(sta); + + return 0; + } + ++int ieee80211_set_tx_key(struct ieee80211_key *key) ++{ ++ return _ieee80211_set_tx_key(key, false); ++} ++ + static void ieee80211_pairwise_rekey(struct ieee80211_key *old, + struct ieee80211_key *new) + { +@@ -441,11 +448,8 @@ static int ieee80211_key_replace(struct + if (pairwise) { + rcu_assign_pointer(sta->ptk[idx], new); + if (new && +- !(new->conf.flags & IEEE80211_KEY_FLAG_NO_AUTO_TX)) { +- sta->ptk_idx = idx; +- clear_sta_flag(sta, WLAN_STA_BLOCK_BA); +- ieee80211_check_fast_xmit(sta); +- } ++ !(new->conf.flags & IEEE80211_KEY_FLAG_NO_AUTO_TX)) ++ _ieee80211_set_tx_key(new, true); + } else { + rcu_assign_pointer(sta->gtk[idx], new); + } +--- a/net/mac80211/sta_info.h ++++ b/net/mac80211/sta_info.h +@@ -98,6 +98,7 @@ enum ieee80211_sta_info_flags { + WLAN_STA_MPSP_OWNER, + WLAN_STA_MPSP_RECIPIENT, + WLAN_STA_PS_DELIVER, ++ WLAN_STA_USES_ENCRYPTION, + + NUM_WLAN_STA_FLAGS, + }; +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c +@@ -590,10 +590,13 @@ ieee80211_tx_h_select_key(struct ieee802 + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); + struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; + +- if (unlikely(info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT)) ++ if (unlikely(info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT)) { + tx->key = NULL; +- else if (tx->sta && +- (key = rcu_dereference(tx->sta->ptk[tx->sta->ptk_idx]))) ++ return TX_CONTINUE; ++ } ++ ++ if (tx->sta && ++ (key = rcu_dereference(tx->sta->ptk[tx->sta->ptk_idx]))) + tx->key = key; + else if (ieee80211_is_group_privacy_action(tx->skb) && + (key = rcu_dereference(tx->sdata->default_multicast_key))) +@@ -654,6 +657,9 @@ ieee80211_tx_h_select_key(struct ieee802 + if (!skip_hw && tx->key && + tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) + info->control.hw_key = &tx->key->conf; ++ } else if (!ieee80211_is_mgmt(hdr->frame_control) && tx->sta && ++ test_sta_flag(tx->sta, WLAN_STA_USES_ENCRYPTION)) { ++ return TX_DROP; + } + + return TX_CONTINUE; diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 2d7470e741..aa57d2121a 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -130,6 +130,7 @@ DRV_DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny define Package/hostapd/Default SECTION:=net CATEGORY:=Network + SUBMENU:=WirelessAPD TITLE:=IEEE 802.1x Authenticator URL:=http://hostap.epitest.fi/ DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus @@ -191,6 +192,7 @@ endef define Package/wpad/Default SECTION:=net CATEGORY:=Network + SUBMENU:=WirelessAPD TITLE:=IEEE 802.1x Authenticator/Supplicant DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus URL:=http://hostap.epitest.fi/ @@ -280,6 +282,7 @@ Package/wpad-mesh-wolfssl/description = $(Package/wpad-mesh/description) define Package/wpa-supplicant/Default SECTION:=net CATEGORY:=Network + SUBMENU:=WirelessAPD TITLE:=WPA Supplicant URL:=http://hostap.epitest.fi/wpa_supplicant/ DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus @@ -352,11 +355,13 @@ define Package/hostapd-common TITLE:=hostapd/wpa_supplicant common support files SECTION:=net CATEGORY:=Network + SUBMENU:=WirelessAPD endef define Package/hostapd-utils SECTION:=net CATEGORY:=Network + SUBMENU:=WirelessAPD TITLE:=IEEE 802.1x Authenticator (utils) URL:=http://hostap.epitest.fi/ DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(HOSTAPD_PROVIDERS),PACKAGE_$(pkg))) @@ -370,6 +375,7 @@ endef define Package/wpa-cli SECTION:=net CATEGORY:=Network + SUBMENU:=WirelessAPD DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(SUPPLICANT_PROVIDERS),PACKAGE_$(pkg))) TITLE:=WPA Supplicant command line control utility endef @@ -377,6 +383,7 @@ endef define Package/eapol-test TITLE:=802.1x authentication test utility SECTION:=net + SUBMENU:=WirelessAPD CATEGORY:=Network VARIANT:=supplicant-full-internal DEPENDS:=$(DRV_DEPENDS) +libubus @@ -386,6 +393,7 @@ define Package/eapol-test-openssl TITLE:=802.1x authentication test utility SECTION:=net CATEGORY:=Network + SUBMENU:=WirelessAPD VARIANT:=supplicant-full-openssl CONFLICTS:=$(filter-out eapol-test-openssl ,$(EAPOL_TEST_PROVIDERS)) DEPENDS:=$(DRV_DEPENDS) +libubus +libopenssl @@ -396,6 +404,7 @@ define Package/eapol-test-wolfssl TITLE:=802.1x authentication test utility SECTION:=net CATEGORY:=Network + SUBMENU:=WirelessAPD VARIANT:=supplicant-full-wolfssl CONFLICTS:=$(filter-out eapol-test-openssl ,$(filter-out eapol-test-wolfssl ,$(EAPOL_TEST_PROVIDERS))) DEPENDS:=$(DRV_DEPENDS) +libubus +libwolfssl @@ -517,9 +526,9 @@ define Install/supplicant endef define Package/hostapd-common/install - $(INSTALL_DIR) $(1)/lib/netifd $(1)/etc/rc.button $(1)/etc/hotplug.d/ieee80211 + $(INSTALL_DIR) $(1)/lib/netifd $(1)/etc/rc.button $(1)/etc/hotplug.d/ieee80211 $(1)/etc/init.d $(INSTALL_DATA) ./files/hostapd.sh $(1)/lib/netifd/hostapd.sh - $(INSTALL_BIN) ./files/hostapd.hotplug $(1)/etc/hotplug.d/ieee80211/20-hostapd + $(INSTALL_BIN) ./files/wpad.init $(1)/etc/init.d/wpad $(INSTALL_BIN) ./files/wps-hotplug.sh $(1)/etc/rc.button/wps endef diff --git a/package/network/services/hostapd/files/hostapd.hotplug b/package/network/services/hostapd/files/hostapd.hotplug deleted file mode 100644 index 2c936fde75..0000000000 --- a/package/network/services/hostapd/files/hostapd.hotplug +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -initscript="$0" - -. /lib/functions.sh -. /lib/functions/procd.sh - -cd /sys/class/ieee80211 - -procd_lock() { - return 0 -} - -service_triggers() { - return 0 -} - -service_data() { - return 0 -} - -procd_open_service hostapd - -for phy in *; do - [ -d "$phy" ] || continue - - mkdir -p /var/run/wpa_supplicant-$phy /var/run/hostapd-$phy - - if [ -x "/usr/sbin/hostapd" ]; then - procd_open_instance hostapd-$phy - procd_set_param command /usr/sbin/hostapd -s -n $phy -g /var/run/hostapd-${phy}/global - procd_set_param CREATE_TIME="$(date -r $phy)" # force restart on recreated phy - procd_set_param respawn - procd_close_instance - fi - - if [ -x "/usr/sbin/wpa_supplicant" ]; then - procd_open_instance supplicant-$phy - procd_set_param command /usr/sbin/wpa_supplicant -s -n $phy -g /var/run/wpa_supplicant-${phy}/global - procd_set_param CREATE_TIME="$(date -r $phy)" # force restart on recreated phy - procd_set_param respawn - procd_close_instance - fi -done - -procd_close_service set diff --git a/package/network/services/hostapd/files/wpad.init b/package/network/services/hostapd/files/wpad.init new file mode 100644 index 0000000000..3198e9801f --- /dev/null +++ b/package/network/services/hostapd/files/wpad.init @@ -0,0 +1,25 @@ +#!/bin/sh /etc/rc.common + +START=19 +STOP=21 + +USE_PROCD=1 +NAME=wpad + +start_service() { + if [ -x "/usr/sbin/hostapd" ]; then + mkdir -p /var/run/hostapd + procd_open_instance hostapd + procd_set_param command /usr/sbin/hostapd -s -g /var/run/hostapd/global + procd_set_param respawn + procd_close_instance + fi + + if [ -x "/usr/sbin/wpa_supplicant" ]; then + mkdir -p /var/run/wpa_supplicant + procd_open_instance supplicant + procd_set_param command /usr/sbin/wpa_supplicant -n -s -g /var/run/wpa_supplicant/global + procd_set_param respawn + procd_close_instance + fi +} diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch index b2860780eb..cc49ae3b24 100644 --- a/package/network/services/hostapd/patches/600-ubus_support.patch +++ b/package/network/services/hostapd/patches/600-ubus_support.patch @@ -22,16 +22,15 @@ #define OCE_STA_CFON_ENABLED(hapd) \ ((hapd->conf->oce & OCE_STA_CFON) && \ -@@ -72,6 +73,8 @@ struct hapd_interfaces { +@@ -72,6 +73,7 @@ struct hapd_interfaces { #ifdef CONFIG_DPP struct dpp_global *dpp; #endif /* CONFIG_DPP */ + struct ubus_object ubus; -+ char *name; }; enum hostapd_chan_status { -@@ -145,6 +148,7 @@ struct hostapd_data { +@@ -145,6 +147,7 @@ struct hostapd_data { struct hostapd_iface *iface; struct hostapd_config *iconf; struct hostapd_bss_config *conf; @@ -39,7 +38,7 @@ int interface_added; /* virtual interface added for this BSS */ unsigned int started:1; unsigned int disabled:1; -@@ -580,6 +584,7 @@ hostapd_alloc_bss_data(struct hostapd_if +@@ -580,6 +583,7 @@ hostapd_alloc_bss_data(struct hostapd_if struct hostapd_bss_config *bss); int hostapd_setup_interface(struct hostapd_iface *iface); int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err); @@ -315,16 +314,7 @@ /* Remove interface from the global list of interfaces */ prev = global->ifaces; if (prev == wpa_s) { -@@ -6520,6 +6524,8 @@ struct wpa_global * wpa_supplicant_init( - if (params->override_ctrl_interface) - global->params.override_ctrl_interface = - os_strdup(params->override_ctrl_interface); -+ if (params->name) -+ global->params.name = os_strdup(params->name); - #ifdef CONFIG_MATCH_IFACE - global->params.match_iface_count = params->match_iface_count; - if (params->match_iface_count) { -@@ -6626,8 +6632,12 @@ int wpa_supplicant_run(struct wpa_global +@@ -6626,8 +6630,12 @@ int wpa_supplicant_run(struct wpa_global eloop_register_signal_terminate(wpa_supplicant_terminate, global); eloop_register_signal_reconfig(wpa_supplicant_reconfig, global); @@ -337,14 +327,6 @@ return 0; } -@@ -6687,6 +6697,7 @@ void wpa_supplicant_deinit(struct wpa_gl - #ifdef CONFIG_MATCH_IFACE - os_free(global->params.match_ifaces); - #endif /* CONFIG_MATCH_IFACE */ -+ os_free(global->params.name); - #ifdef CONFIG_P2P - os_free(global->params.conf_p2p_dev); - #endif /* CONFIG_P2P */ --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h @@ -17,6 +17,7 @@ @@ -355,16 +337,7 @@ extern const char *const wpa_supplicant_version; extern const char *const wpa_supplicant_license; -@@ -246,6 +247,8 @@ struct wpa_params { - */ - int match_iface_count; - #endif /* CONFIG_MATCH_IFACE */ -+ -+ char *name; - }; - - struct p2p_srv_bonjour { -@@ -306,6 +309,8 @@ struct wpa_global { +@@ -306,6 +307,8 @@ struct wpa_global { #endif /* CONFIG_WIFI_DISPLAY */ struct psk_list_entry *add_psk; /* From group formation */ @@ -373,7 +346,7 @@ }; -@@ -506,6 +511,7 @@ struct wpa_supplicant { +@@ -506,6 +509,7 @@ struct wpa_supplicant { unsigned char own_addr[ETH_ALEN]; unsigned char perm_addr[ETH_ALEN]; char ifname[100]; @@ -402,25 +375,7 @@ --- a/hostapd/main.c +++ b/hostapd/main.c -@@ -688,7 +688,7 @@ int main(int argc, char *argv[]) - wpa_supplicant_event = hostapd_wpa_event; - wpa_supplicant_event_global = hostapd_wpa_event_global; - for (;;) { -- c = getopt(argc, argv, "b:Bde:f:hi:KP:sSTtu:g:G:v::"); -+ c = getopt(argc, argv, "b:Bde:f:hi:KP:sSTtu:g:G:n:v::"); - if (c < 0) - break; - switch (c) { -@@ -763,6 +763,8 @@ int main(int argc, char *argv[]) - if (hostapd_get_interface_names(&if_names, - &if_names_size, optarg)) - goto out; -+ case 'n': -+ interfaces.name = optarg; - break; - default: - usage(); -@@ -894,6 +896,7 @@ int main(int argc, char *argv[]) +@@ -894,6 +894,7 @@ int main(int argc, char *argv[]) } hostapd_global_ctrl_iface_init(&interfaces); @@ -428,7 +383,7 @@ if (hostapd_global_run(&interfaces, daemonize, pid_file)) { wpa_printf(MSG_ERROR, "Failed to start eloop"); -@@ -903,6 +906,7 @@ int main(int argc, char *argv[]) +@@ -903,6 +904,7 @@ int main(int argc, char *argv[]) ret = 0; out: @@ -443,16 +398,15 @@ for (;;) { c = getopt(argc, argv, - "b:Bc:C:D:de:f:g:G:hH:i:I:KLMm:No:O:p:P:qsTtuv::W"); -+ "b:Bc:C:D:de:f:g:G:hH:i:I:KLMm:n:No:O:p:P:qsTtuv::W"); ++ "b:Bc:C:D:de:f:g:G:hH:i:I:KLMm:nNo:O:p:P:qsTtuv::W"); if (c < 0) break; switch (c) { -@@ -271,6 +271,10 @@ int main(int argc, char *argv[]) +@@ -271,6 +271,9 @@ int main(int argc, char *argv[]) params.conf_p2p_dev = optarg; break; #endif /* CONFIG_P2P */ + case 'n': -+ params.name = optarg; + iface_count = 0; + break; case 'o': diff --git a/package/network/services/hostapd/patches/700-wifi-reload.patch b/package/network/services/hostapd/patches/700-wifi-reload.patch index fa557b76c6..e89d21d580 100644 --- a/package/network/services/hostapd/patches/700-wifi-reload.patch +++ b/package/network/services/hostapd/patches/700-wifi-reload.patch @@ -1,7 +1,5 @@ -Index: hostapd-2019-08-08-ca8c2bd2/hostapd/config_file.c -=================================================================== ---- hostapd-2019-08-08-ca8c2bd2.orig/hostapd/config_file.c -+++ hostapd-2019-08-08-ca8c2bd2/hostapd/config_file.c +--- a/hostapd/config_file.c ++++ b/hostapd/config_file.c @@ -2470,6 +2470,8 @@ static int hostapd_config_fill(struct ho bss->isolate = atoi(pos); } else if (os_strcmp(buf, "ap_max_inactivity") == 0) { @@ -20,10 +18,8 @@ Index: hostapd-2019-08-08-ca8c2bd2/hostapd/config_file.c } else if (os_strcmp(buf, "channel") == 0) { if (os_strcmp(pos, "acs_survey") == 0) { #ifndef CONFIG_ACS -Index: hostapd-2019-08-08-ca8c2bd2/src/ap/ap_config.c -=================================================================== ---- hostapd-2019-08-08-ca8c2bd2.orig/src/ap/ap_config.c -+++ hostapd-2019-08-08-ca8c2bd2/src/ap/ap_config.c +--- a/src/ap/ap_config.c ++++ b/src/ap/ap_config.c @@ -698,6 +698,7 @@ void hostapd_config_free_bss(struct host os_free(conf->radius_req_attr_sqlite); os_free(conf->rsn_preauth_interfaces); @@ -40,10 +36,8 @@ Index: hostapd-2019-08-08-ca8c2bd2/src/ap/ap_config.c os_free(conf->bss); os_free(conf->supported_rates); os_free(conf->basic_rates); -Index: hostapd-2019-08-08-ca8c2bd2/src/ap/ap_config.h -=================================================================== ---- hostapd-2019-08-08-ca8c2bd2.orig/src/ap/ap_config.h -+++ hostapd-2019-08-08-ca8c2bd2/src/ap/ap_config.h +--- a/src/ap/ap_config.h ++++ b/src/ap/ap_config.h @@ -829,6 +829,7 @@ struct hostapd_bss_config { */ u8 mka_psk_set; @@ -60,10 +54,8 @@ Index: hostapd-2019-08-08-ca8c2bd2/src/ap/ap_config.h }; -Index: hostapd-2019-08-08-ca8c2bd2/src/ap/hostapd.c -=================================================================== ---- hostapd-2019-08-08-ca8c2bd2.orig/src/ap/hostapd.c -+++ hostapd-2019-08-08-ca8c2bd2/src/ap/hostapd.c +--- a/src/ap/hostapd.c ++++ b/src/ap/hostapd.c @@ -206,6 +206,10 @@ static int hostapd_iface_conf_changed(st { size_t i; @@ -150,10 +142,8 @@ Index: hostapd-2019-08-08-ca8c2bd2/src/ap/hostapd.c if (conf) hapd->driver = conf->driver; hapd->ctrl_sock = -1; -Index: hostapd-2019-08-08-ca8c2bd2/src/ap/hostapd.h -=================================================================== ---- hostapd-2019-08-08-ca8c2bd2.orig/src/ap/hostapd.h -+++ hostapd-2019-08-08-ca8c2bd2/src/ap/hostapd.h +--- a/src/ap/hostapd.h ++++ b/src/ap/hostapd.h @@ -42,7 +42,7 @@ struct mesh_conf; struct hostapd_iface; @@ -163,7 +153,7 @@ Index: hostapd-2019-08-08-ca8c2bd2/src/ap/hostapd.h struct hostapd_config * (*config_read_cb)(const char *config_fname); int (*ctrl_iface_init)(struct hostapd_data *hapd); void (*ctrl_iface_deinit)(struct hostapd_data *hapd); -@@ -149,6 +149,7 @@ struct hostapd_data { +@@ -148,6 +148,7 @@ struct hostapd_data { struct hostapd_config *iconf; struct hostapd_bss_config *conf; struct hostapd_ubus_bss ubus; @@ -171,7 +161,7 @@ Index: hostapd-2019-08-08-ca8c2bd2/src/ap/hostapd.h int interface_added; /* virtual interface added for this BSS */ unsigned int started:1; unsigned int disabled:1; -@@ -576,7 +577,7 @@ struct hostapd_iface { +@@ -575,7 +576,7 @@ struct hostapd_iface { int hostapd_for_each_interface(struct hapd_interfaces *interfaces, int (*cb)(struct hostapd_iface *iface, void *ctx), void *ctx); @@ -180,10 +170,8 @@ Index: hostapd-2019-08-08-ca8c2bd2/src/ap/hostapd.h void hostapd_reconfig_encryption(struct hostapd_data *hapd); struct hostapd_data * hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface, -Index: hostapd-2019-08-08-ca8c2bd2/src/drivers/driver_nl80211.c -=================================================================== ---- hostapd-2019-08-08-ca8c2bd2.orig/src/drivers/driver_nl80211.c -+++ hostapd-2019-08-08-ca8c2bd2/src/drivers/driver_nl80211.c +--- a/src/drivers/driver_nl80211.c ++++ b/src/drivers/driver_nl80211.c @@ -4295,6 +4295,9 @@ static int wpa_driver_nl80211_set_ap(voi if (ret) { wpa_printf(MSG_DEBUG, "nl80211: Beacon set failed: %d (%s)", @@ -194,10 +182,8 @@ Index: hostapd-2019-08-08-ca8c2bd2/src/drivers/driver_nl80211.c } else { bss->beacon_set = 1; nl80211_set_bss(bss, params->cts_protect, params->preamble, -Index: hostapd-2019-08-08-ca8c2bd2/hostapd/ctrl_iface.c -=================================================================== ---- hostapd-2019-08-08-ca8c2bd2.orig/hostapd/ctrl_iface.c -+++ hostapd-2019-08-08-ca8c2bd2/hostapd/ctrl_iface.c +--- a/hostapd/ctrl_iface.c ++++ b/hostapd/ctrl_iface.c @@ -182,7 +182,7 @@ static int hostapd_ctrl_iface_update(str iface->interfaces->config_read_cb = hostapd_ctrl_iface_config_read; reload_opts = txt; @@ -207,10 +193,8 @@ Index: hostapd-2019-08-08-ca8c2bd2/hostapd/ctrl_iface.c iface->interfaces->config_read_cb = config_read_cb; } -Index: hostapd-2019-08-08-ca8c2bd2/hostapd/main.c -=================================================================== ---- hostapd-2019-08-08-ca8c2bd2.orig/hostapd/main.c -+++ hostapd-2019-08-08-ca8c2bd2/hostapd/main.c +--- a/hostapd/main.c ++++ b/hostapd/main.c @@ -320,7 +320,7 @@ static void handle_term(int sig, void *s static int handle_reload_iface(struct hostapd_iface *iface, void *ctx) @@ -220,10 +204,8 @@ Index: hostapd-2019-08-08-ca8c2bd2/hostapd/main.c wpa_printf(MSG_WARNING, "Failed to read new configuration " "file - continuing with old."); } -Index: hostapd-2019-08-08-ca8c2bd2/src/ap/wps_hostapd.c -=================================================================== ---- hostapd-2019-08-08-ca8c2bd2.orig/src/ap/wps_hostapd.c -+++ hostapd-2019-08-08-ca8c2bd2/src/ap/wps_hostapd.c +--- a/src/ap/wps_hostapd.c ++++ b/src/ap/wps_hostapd.c @@ -275,7 +275,7 @@ static void wps_reload_config(void *eloo wpa_printf(MSG_DEBUG, "WPS: Reload configuration data"); diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c index 011c32a8b1..aeea310594 100644 --- a/package/network/services/hostapd/src/src/ap/ubus.c +++ b/package/network/services/hostapd/src/src/ap/ubus.c @@ -1115,24 +1115,12 @@ static struct ubus_object_type daemon_object_type = void hostapd_ubus_add(struct hapd_interfaces *interfaces) { struct ubus_object *obj = &interfaces->ubus; - char *name; - int name_len; int ret; if (!hostapd_ubus_init()) return; - name_len = strlen("hostapd") + 1; - if (interfaces->name) - name_len += strlen(interfaces->name) + 1; - - name = malloc(name_len); - strcpy(name, "hostapd"); - if (interfaces->name) { - strcat(name, "."); - strcat(name, interfaces->name); - } - obj->name = name; + obj->name = strdup("hostapd"); obj->type = &daemon_object_type; obj->methods = daemon_object_type.methods; diff --git a/package/network/services/hostapd/src/wpa_supplicant/ubus.c b/package/network/services/hostapd/src/wpa_supplicant/ubus.c index 5450b24476..4bb92a7b66 100644 --- a/package/network/services/hostapd/src/wpa_supplicant/ubus.c +++ b/package/network/services/hostapd/src/wpa_supplicant/ubus.c @@ -322,27 +322,12 @@ static struct ubus_object_type wpas_daemon_object_type = void wpas_ubus_add(struct wpa_global *global) { struct ubus_object *obj = &global->ubus_global; - char *name; - int name_len; int ret; if (!wpas_ubus_init()) return; - name_len = strlen("wpa_supplicant") + 1; - if (global->params.name) - name_len += strlen(global->params.name) + 1; - - name = malloc(name_len); - strcpy(name, "wpa_supplicant"); - - if (global->params.name) - { - strcat(name, "."); - strcat(name, global->params.name); - } - - obj->name = name; + obj->name = strdup("wpa_supplicant"); obj->type = &wpas_daemon_object_type; obj->methods = wpas_daemon_object_type.methods; diff --git a/package/network/utils/iw/Makefile b/package/network/utils/iw/Makefile index ef39ee6724..7abf93e01e 100644 --- a/package/network/utils/iw/Makefile +++ b/package/network/utils/iw/Makefile @@ -8,14 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iw -PKG_VERSION:=4.14 +PKG_VERSION:=5.4 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/network/iw -PKG_HASH:=f01671c0074bfdec082a884057edba1b9efd35c89eda554638496f03b769ad89 +PKG_HASH:=a2469f677088d7b1070a7fbb28f3c747041697e8f6ec70783339cb1bc27a395f -PKG_BUILD_DIR:=$(BUILD_DIR)/iw-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/iw/patches/001-nl80211_h_sync.patch b/package/network/utils/iw/patches/001-nl80211_h_sync.patch index 4fd37579a9..6b65f61846 100644 --- a/package/network/utils/iw/patches/001-nl80211_h_sync.patch +++ b/package/network/utils/iw/patches/001-nl80211_h_sync.patch @@ -1,629 +1,41 @@ -diff --git a/nl80211.h b/nl80211.h -index c587a61..255a971 100644 --- a/nl80211.h +++ b/nl80211.h -@@ -11,6 +11,7 @@ - * Copyright 2008 Jouni Malinen - * Copyright 2008 Colin McCabe - * Copyright 2015-2017 Intel Deutschland GmbH -+ * Copyright (C) 2018 Intel Corporation +@@ -2373,6 +2373,9 @@ enum nl80211_commands { + * the allowed channel bandwidth configurations. (u8 attribute) + * Defined by IEEE P802.11ay/D4.0 section 9.4.2.251, Table 13. * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above -@@ -203,7 +204,8 @@ - * FILS shared key authentication offload should be able to construct the - * authentication and association frames for FILS shared key authentication and - * eventually do a key derivation as per IEEE 802.11ai. The below additional -- * parameters should be given to driver in %NL80211_CMD_CONNECT. -+ * parameters should be given to driver in %NL80211_CMD_CONNECT and/or in -+ * %NL80211_CMD_UPDATE_CONNECT_PARAMS. - * %NL80211_ATTR_FILS_ERP_USERNAME - used to construct keyname_nai - * %NL80211_ATTR_FILS_ERP_REALM - used to construct keyname_nai - * %NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM - used to construct erp message -@@ -214,7 +216,8 @@ - * as specified in IETF RFC 6696. - * - * When FILS shared key authentication is completed, driver needs to provide the -- * below additional parameters to userspace. -+ * below additional parameters to userspace, which can be either after setting -+ * up a connection or after roaming. - * %NL80211_ATTR_FILS_KEK - used for key renewal - * %NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM - used in further EAP-RP exchanges - * %NL80211_ATTR_PMKID - used to identify the PMKSA used/generated -@@ -542,7 +545,8 @@ - * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP, - * %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT, - * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE, -- * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT, %NL80211_ATTR_MAC_HINT, and -+ * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT, -+ * %NL80211_ATTR_CONTROL_PORT_OVER_NL80211, %NL80211_ATTR_MAC_HINT, and - * %NL80211_ATTR_WIPHY_FREQ_HINT. - * If included, %NL80211_ATTR_MAC and %NL80211_ATTR_WIPHY_FREQ are - * restrictions on BSS selection, i.e., they effectively prevent roaming -@@ -977,21 +981,58 @@ - * only the %NL80211_ATTR_IE data is used and updated with this command. - * - * @NL80211_CMD_SET_PMK: For offloaded 4-Way handshake, set the PMK or PMK-R0 -- * for the given authenticator address (specified with &NL80211_ATTR_MAC). -- * When &NL80211_ATTR_PMKR0_NAME is set, &NL80211_ATTR_PMK specifies the -+ * for the given authenticator address (specified with %NL80211_ATTR_MAC). -+ * When %NL80211_ATTR_PMKR0_NAME is set, %NL80211_ATTR_PMK specifies the - * PMK-R0, otherwise it specifies the PMK. - * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously - * configured PMK for the authenticator address identified by -- * &NL80211_ATTR_MAC. -+ * %NL80211_ATTR_MAC. - * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates that the 4 way - * handshake was completed successfully by the driver. The BSSID is -- * specified with &NL80211_ATTR_MAC. Drivers that support 4 way handshake -+ * specified with %NL80211_ATTR_MAC. Drivers that support 4 way handshake - * offload should send this event after indicating 802.11 association with -- * &NL80211_CMD_CONNECT or &NL80211_CMD_ROAM. If the 4 way handshake failed -- * &NL80211_CMD_DISCONNECT should be indicated instead. -+ * %NL80211_CMD_CONNECT or %NL80211_CMD_ROAM. If the 4 way handshake failed -+ * %NL80211_CMD_DISCONNECT should be indicated instead. -+ * -+ * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request -+ * and RX notification. This command is used both as a request to transmit -+ * a control port frame and as a notification that a control port frame -+ * has been received. %NL80211_ATTR_FRAME is used to specify the -+ * frame contents. The frame is the raw EAPoL data, without ethernet or -+ * 802.11 headers. -+ * When used as an event indication %NL80211_ATTR_CONTROL_PORT_ETHERTYPE, -+ * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT and %NL80211_ATTR_MAC are added -+ * indicating the protocol type of the received frame; whether the frame -+ * was received unencrypted and the MAC address of the peer respectively. - * - * @NL80211_CMD_RELOAD_REGDB: Request that the regdb firmware file is reloaded. - * -+ * @NL80211_CMD_EXTERNAL_AUTH: This interface is exclusively defined for host -+ * drivers that do not define separate commands for authentication and -+ * association, but rely on user space for the authentication to happen. -+ * This interface acts both as the event request (driver to user space) -+ * to trigger the authentication and command response (userspace to -+ * driver) to indicate the authentication status. -+ * -+ * User space uses the %NL80211_CMD_CONNECT command to the host driver to -+ * trigger a connection. The host driver selects a BSS and further uses -+ * this interface to offload only the authentication part to the user -+ * space. Authentication frames are passed between the driver and user -+ * space through the %NL80211_CMD_FRAME interface. Host driver proceeds -+ * further with the association after getting successful authentication -+ * status. User space indicates the authentication status through -+ * %NL80211_ATTR_STATUS_CODE attribute in %NL80211_CMD_EXTERNAL_AUTH -+ * command interface. -+ * -+ * Host driver reports this status on an authentication failure to the -+ * user space through the connect result as the user space would have -+ * initiated the connection through the connect request. -+ * -+ * @NL80211_CMD_STA_OPMODE_CHANGED: An event that notify station's -+ * ht opmode or vht opmode changes using any of %NL80211_ATTR_SMPS_MODE, -+ * %NL80211_ATTR_CHANNEL_WIDTH,%NL80211_ATTR_NSS attributes with its -+ * address(specified in %NL80211_ATTR_MAC). -+ * - * @NL80211_CMD_MAX: highest used command number - * @__NL80211_CMD_AFTER_LAST: internal use - */ -@@ -1198,6 +1239,12 @@ enum nl80211_commands { - - NL80211_CMD_RELOAD_REGDB, - -+ NL80211_CMD_EXTERNAL_AUTH, -+ -+ NL80211_CMD_STA_OPMODE_CHANGED, -+ -+ NL80211_CMD_CONTROL_PORT_FRAME, -+ - /* add new commands above here */ - - /* used to define NL80211_CMD_MAX below */ -@@ -1445,6 +1492,15 @@ enum nl80211_commands { - * @NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT: When included along with - * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE, indicates that the custom - * ethertype frames used for key negotiation must not be encrypted. -+ * @NL80211_ATTR_CONTROL_PORT_OVER_NL80211: A flag indicating whether control -+ * port frames (e.g. of type given in %NL80211_ATTR_CONTROL_PORT_ETHERTYPE) -+ * will be sent directly to the network interface or sent via the NL80211 -+ * socket. If this attribute is missing, then legacy behavior of sending -+ * control port frames directly to the network interface is used. If the -+ * flag is included, then control port frames are sent over NL80211 instead -+ * using %CMD_CONTROL_PORT_FRAME. If control port routing over NL80211 is -+ * to be used then userspace must also use the %NL80211_ATTR_SOCKET_OWNER -+ * flag. - * - * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver. - * We recommend using nested, driver-specific attributes within this. -@@ -1932,6 +1988,12 @@ enum nl80211_commands { - * multicast group. - * If set during %NL80211_CMD_ASSOCIATE or %NL80211_CMD_CONNECT the - * station will deauthenticate when the socket is closed. -+ * If set during %NL80211_CMD_JOIN_IBSS the IBSS will be automatically -+ * torn down when the socket is closed. -+ * If set during %NL80211_CMD_JOIN_MESH the mesh setup will be -+ * automatically torn down when the socket is closed. -+ * If set during %NL80211_CMD_START_AP the AP will be automatically -+ * disabled when the socket is closed. - * - * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is - * the TDLS link initiator. -@@ -2153,6 +2215,35 @@ enum nl80211_commands { - * @NL80211_ATTR_PMKR0_NAME: PMK-R0 Name for offloaded FT. - * @NL80211_ATTR_PORT_AUTHORIZED: (reserved) - * -+ * @NL80211_ATTR_EXTERNAL_AUTH_ACTION: Identify the requested external -+ * authentication operation (u32 attribute with an -+ * &enum nl80211_external_auth_action value). This is used with the -+ * %NL80211_CMD_EXTERNAL_AUTH request event. -+ * @NL80211_ATTR_EXTERNAL_AUTH_SUPPORT: Flag attribute indicating that the user -+ * space supports external authentication. This attribute shall be used -+ * only with %NL80211_CMD_CONNECT request. The driver may offload -+ * authentication processing to user space if this capability is indicated -+ * in NL80211_CMD_CONNECT requests from the user space. -+ * -+ * @NL80211_ATTR_NSS: Station's New/updated RX_NSS value notified using this -+ * u8 attribute. This is used with %NL80211_CMD_STA_OPMODE_CHANGED. -+ * -+ * @NL80211_ATTR_TXQ_STATS: TXQ statistics (nested attribute, see &enum -+ * nl80211_txq_stats) -+ * @NL80211_ATTR_TXQ_LIMIT: Total packet limit for the TXQ queues for this phy. -+ * The smaller of this and the memory limit is enforced. -+ * @NL80211_ATTR_TXQ_MEMORY_LIMIT: Total memory memory limit (in bytes) for the -+ * TXQ queues for this phy. The smaller of this and the packet limit is -+ * enforced. -+ * @NL80211_ATTR_TXQ_QUANTUM: TXQ scheduler quantum (bytes). Number of bytes -+ * a flow is assigned on each round of the DRR scheduler. -+ * @NL80211_ATTR_HE_CAPABILITY: HE Capability information element (from -+ * association request when used with NL80211_CMD_NEW_STATION). Can be set -+ * only if %NL80211_STA_FLAG_WME is set. -+ * + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce + * transmit power to stay within regulatory limits. u32, dBi. + * * @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NL80211_ATTR_MAX: highest attribute number currently defined * @__NL80211_ATTR_AFTER_LAST: internal use -@@ -2579,6 +2670,23 @@ enum nl80211_attrs { - NL80211_ATTR_PMKR0_NAME, - NL80211_ATTR_PORT_AUTHORIZED, +@@ -2835,6 +2838,8 @@ enum nl80211_attrs { + NL80211_ATTR_WIPHY_EDMG_CHANNELS, + NL80211_ATTR_WIPHY_EDMG_BW_CONFIG, -+ NL80211_ATTR_EXTERNAL_AUTH_ACTION, -+ NL80211_ATTR_EXTERNAL_AUTH_SUPPORT, -+ -+ NL80211_ATTR_NSS, -+ NL80211_ATTR_ACK_SIGNAL, -+ -+ NL80211_ATTR_CONTROL_PORT_OVER_NL80211, -+ -+ NL80211_ATTR_TXQ_STATS, -+ NL80211_ATTR_TXQ_LIMIT, -+ NL80211_ATTR_TXQ_MEMORY_LIMIT, -+ NL80211_ATTR_TXQ_QUANTUM, -+ -+ NL80211_ATTR_HE_CAPABILITY, -+ + NL80211_ATTR_WIPHY_ANTENNA_GAIN, + /* add attributes here, update the policy in nl80211.c */ __NL80211_ATTR_AFTER_LAST, -@@ -2618,6 +2726,8 @@ enum nl80211_attrs { - #define NL80211_ATTR_KEYS NL80211_ATTR_KEYS - #define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS - -+#define NL80211_WIPHY_NAME_MAXLEN 64 -+ - #define NL80211_MAX_SUPP_RATES 32 - #define NL80211_MAX_SUPP_HT_RATES 77 - #define NL80211_MAX_SUPP_REG_RULES 64 -@@ -2626,7 +2736,8 @@ enum nl80211_attrs { - #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 - #define NL80211_HT_CAPABILITY_LEN 26 - #define NL80211_VHT_CAPABILITY_LEN 12 -- -+#define NL80211_HE_MIN_CAPABILITY_LEN 16 -+#define NL80211_HE_MAX_CAPABILITY_LEN 51 - #define NL80211_MAX_NR_CIPHER_SUITES 5 - #define NL80211_MAX_NR_AKM_SUITES 2 - -@@ -2754,6 +2865,38 @@ struct nl80211_sta_flag_update { - } __attribute__((packed)); - - /** -+ * enum nl80211_he_gi - HE guard interval -+ * @NL80211_RATE_INFO_HE_GI_0_8: 0.8 usec -+ * @NL80211_RATE_INFO_HE_GI_1_6: 1.6 usec -+ * @NL80211_RATE_INFO_HE_GI_3_2: 3.2 usec -+ */ -+enum nl80211_he_gi { -+ NL80211_RATE_INFO_HE_GI_0_8, -+ NL80211_RATE_INFO_HE_GI_1_6, -+ NL80211_RATE_INFO_HE_GI_3_2, -+}; -+ -+/** -+ * enum nl80211_he_ru_alloc - HE RU allocation values -+ * @NL80211_RATE_INFO_HE_RU_ALLOC_26: 26-tone RU allocation -+ * @NL80211_RATE_INFO_HE_RU_ALLOC_52: 52-tone RU allocation -+ * @NL80211_RATE_INFO_HE_RU_ALLOC_106: 106-tone RU allocation -+ * @NL80211_RATE_INFO_HE_RU_ALLOC_242: 242-tone RU allocation -+ * @NL80211_RATE_INFO_HE_RU_ALLOC_484: 484-tone RU allocation -+ * @NL80211_RATE_INFO_HE_RU_ALLOC_996: 996-tone RU allocation -+ * @NL80211_RATE_INFO_HE_RU_ALLOC_2x996: 2x996-tone RU allocation -+ */ -+enum nl80211_he_ru_alloc { -+ NL80211_RATE_INFO_HE_RU_ALLOC_26, -+ NL80211_RATE_INFO_HE_RU_ALLOC_52, -+ NL80211_RATE_INFO_HE_RU_ALLOC_106, -+ NL80211_RATE_INFO_HE_RU_ALLOC_242, -+ NL80211_RATE_INFO_HE_RU_ALLOC_484, -+ NL80211_RATE_INFO_HE_RU_ALLOC_996, -+ NL80211_RATE_INFO_HE_RU_ALLOC_2x996, -+}; -+ -+/** - * enum nl80211_rate_info - bitrate information +@@ -5484,6 +5489,10 @@ enum nl80211_feature_flags { + * @NL80211_EXT_FEATURE_SAE_OFFLOAD: Device wants to do SAE authentication in + * station mode (SAE password is passed as part of the connect command). * - * These attribute types are used with %NL80211_STA_INFO_TXRATE -@@ -2785,6 +2928,13 @@ struct nl80211_sta_flag_update { - * @NL80211_RATE_INFO_5_MHZ_WIDTH: 5 MHz width - note that this is - * a legacy rate and will be reported as the actual bitrate, i.e. - * a quarter of the base (20 MHz) rate -+ * @NL80211_RATE_INFO_HE_MCS: HE MCS index (u8, 0-11) -+ * @NL80211_RATE_INFO_HE_NSS: HE NSS value (u8, 1-8) -+ * @NL80211_RATE_INFO_HE_GI: HE guard interval identifier -+ * (u8, see &enum nl80211_he_gi) -+ * @NL80211_RATE_INFO_HE_DCM: HE DCM value (u8, 0/1) -+ * @NL80211_RATE_INFO_RU_ALLOC: HE RU allocation, if not present then -+ * non-OFDMA was used (u8, see &enum nl80211_he_ru_alloc) - * @__NL80211_RATE_INFO_AFTER_LAST: internal use - */ - enum nl80211_rate_info { -@@ -2801,6 +2951,11 @@ enum nl80211_rate_info { - NL80211_RATE_INFO_160_MHZ_WIDTH, - NL80211_RATE_INFO_10_MHZ_WIDTH, - NL80211_RATE_INFO_5_MHZ_WIDTH, -+ NL80211_RATE_INFO_HE_MCS, -+ NL80211_RATE_INFO_HE_NSS, -+ NL80211_RATE_INFO_HE_GI, -+ NL80211_RATE_INFO_HE_DCM, -+ NL80211_RATE_INFO_HE_RU_ALLOC, - - /* keep last */ - __NL80211_RATE_INFO_AFTER_LAST, -@@ -2899,6 +3054,9 @@ enum nl80211_sta_bss_param { - * @NL80211_STA_INFO_RX_DURATION: aggregate PPDU duration for all frames - * received from the station (u64, usec) - * @NL80211_STA_INFO_PAD: attribute used for padding for 64-bit alignment -+ * @NL80211_STA_INFO_ACK_SIGNAL: signal strength of the last ACK frame(u8, dBm) -+ * @NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG: avg signal strength of (data) -+ * ACK frame (s8, dBm) - * @__NL80211_STA_INFO_AFTER_LAST: internal - * @NL80211_STA_INFO_MAX: highest possible station info attribute - */ -@@ -2937,6 +3095,8 @@ enum nl80211_sta_info { - NL80211_STA_INFO_TID_STATS, - NL80211_STA_INFO_RX_DURATION, - NL80211_STA_INFO_PAD, -+ NL80211_STA_INFO_ACK_SIGNAL, -+ NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG, - - /* keep last */ - __NL80211_STA_INFO_AFTER_LAST, -@@ -2954,6 +3114,7 @@ enum nl80211_sta_info { - * @NL80211_TID_STATS_TX_MSDU_FAILED: number of failed transmitted - * MSDUs (u64) - * @NL80211_TID_STATS_PAD: attribute used for padding for 64-bit alignment -+ * @NL80211_TID_STATS_TXQ_STATS: TXQ stats (nested attribute) - * @NUM_NL80211_TID_STATS: number of attributes here - * @NL80211_TID_STATS_MAX: highest numbered attribute here - */ -@@ -2964,6 +3125,7 @@ enum nl80211_tid_stats { - NL80211_TID_STATS_TX_MSDU_RETRIES, - NL80211_TID_STATS_TX_MSDU_FAILED, - NL80211_TID_STATS_PAD, -+ NL80211_TID_STATS_TXQ_STATS, - - /* keep last */ - NUM_NL80211_TID_STATS, -@@ -2971,6 +3133,44 @@ enum nl80211_tid_stats { - }; - - /** -+ * enum nl80211_txq_stats - per TXQ statistics attributes -+ * @__NL80211_TXQ_STATS_INVALID: attribute number 0 is reserved -+ * @NUM_NL80211_TXQ_STATS: number of attributes here -+ * @NL80211_TXQ_STATS_BACKLOG_BYTES: number of bytes currently backlogged -+ * @NL80211_TXQ_STATS_BACKLOG_PACKETS: number of packets currently -+ * backlogged -+ * @NL80211_TXQ_STATS_FLOWS: total number of new flows seen -+ * @NL80211_TXQ_STATS_DROPS: total number of packet drops -+ * @NL80211_TXQ_STATS_ECN_MARKS: total number of packet ECN marks -+ * @NL80211_TXQ_STATS_OVERLIMIT: number of drops due to queue space overflow -+ * @NL80211_TXQ_STATS_OVERMEMORY: number of drops due to memory limit overflow -+ * (only for per-phy stats) -+ * @NL80211_TXQ_STATS_COLLISIONS: number of hash collisions -+ * @NL80211_TXQ_STATS_TX_BYTES: total number of bytes dequeued from TXQ -+ * @NL80211_TXQ_STATS_TX_PACKETS: total number of packets dequeued from TXQ -+ * @NL80211_TXQ_STATS_MAX_FLOWS: number of flow buckets for PHY -+ * @NL80211_TXQ_STATS_MAX: highest numbered attribute here -+ */ -+enum nl80211_txq_stats { -+ __NL80211_TXQ_STATS_INVALID, -+ NL80211_TXQ_STATS_BACKLOG_BYTES, -+ NL80211_TXQ_STATS_BACKLOG_PACKETS, -+ NL80211_TXQ_STATS_FLOWS, -+ NL80211_TXQ_STATS_DROPS, -+ NL80211_TXQ_STATS_ECN_MARKS, -+ NL80211_TXQ_STATS_OVERLIMIT, -+ NL80211_TXQ_STATS_OVERMEMORY, -+ NL80211_TXQ_STATS_COLLISIONS, -+ NL80211_TXQ_STATS_TX_BYTES, -+ NL80211_TXQ_STATS_TX_PACKETS, -+ NL80211_TXQ_STATS_MAX_FLOWS, -+ -+ /* keep last */ -+ NUM_NL80211_TXQ_STATS, -+ NL80211_TXQ_STATS_MAX = NUM_NL80211_TXQ_STATS - 1 -+}; -+ -+/** - * enum nl80211_mpath_flags - nl80211 mesh path flags - * - * @NL80211_MPATH_FLAG_ACTIVE: the mesh path is active -@@ -3022,6 +3222,38 @@ enum nl80211_mpath_info { - }; - - /** -+ * enum nl80211_band_iftype_attr - Interface type data attributes ++ * @NL80211_EXT_FEATURE_AQL: The driver supports the Airtime Queue Limit (AQL) ++ * feature, which prevents bufferbloat by using the expected transmission ++ * time to limit the amount of data buffered in the hardware. + * -+ * @__NL80211_BAND_IFTYPE_ATTR_INVALID: attribute number 0 is reserved -+ * @NL80211_BAND_IFTYPE_ATTR_IFTYPES: nested attribute containing a flag attribute -+ * for each interface type that supports the band data -+ * @NL80211_BAND_IFTYPE_ATTR_HE_CAP_MAC: HE MAC capabilities as in HE -+ * capabilities IE -+ * @NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY: HE PHY capabilities as in HE -+ * capabilities IE -+ * @NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET: HE supported NSS/MCS as in HE -+ * capabilities IE -+ * @NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE: HE PPE thresholds information as -+ * defined in HE capabilities IE -+ * @NL80211_BAND_IFTYPE_ATTR_MAX: highest band HE capability attribute currently -+ * defined -+ * @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use -+ */ -+enum nl80211_band_iftype_attr { -+ __NL80211_BAND_IFTYPE_ATTR_INVALID, -+ -+ NL80211_BAND_IFTYPE_ATTR_IFTYPES, -+ NL80211_BAND_IFTYPE_ATTR_HE_CAP_MAC, -+ NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY, -+ NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET, -+ NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE, -+ -+ /* keep last */ -+ __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST, -+ NL80211_BAND_IFTYPE_ATTR_MAX = __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST - 1 -+}; -+ -+/** - * enum nl80211_band_attr - band attributes - * @__NL80211_BAND_ATTR_INVALID: attribute number 0 is reserved - * @NL80211_BAND_ATTR_FREQS: supported frequencies in this band, -@@ -3036,6 +3268,8 @@ enum nl80211_mpath_info { - * @NL80211_BAND_ATTR_VHT_MCS_SET: 32-byte attribute containing the MCS set as - * defined in 802.11ac - * @NL80211_BAND_ATTR_VHT_CAPA: VHT capabilities, as in the HT information IE -+ * @NL80211_BAND_ATTR_IFTYPE_DATA: nested array attribute, with each entry using -+ * attributes from &enum nl80211_band_iftype_attr - * @NL80211_BAND_ATTR_MAX: highest band attribute currently defined - * @__NL80211_BAND_ATTR_AFTER_LAST: internal use - */ -@@ -3051,6 +3285,7 @@ enum nl80211_band_attr { - - NL80211_BAND_ATTR_VHT_MCS_SET, - NL80211_BAND_ATTR_VHT_CAPA, -+ NL80211_BAND_ATTR_IFTYPE_DATA, - - /* keep last */ - __NL80211_BAND_ATTR_AFTER_LAST, -@@ -3060,6 +3295,29 @@ enum nl80211_band_attr { - #define NL80211_BAND_ATTR_HT_CAPA NL80211_BAND_ATTR_HT_CAPA - - /** -+ * enum nl80211_wmm_rule - regulatory wmm rule -+ * -+ * @__NL80211_WMMR_INVALID: attribute number 0 is reserved -+ * @NL80211_WMMR_CW_MIN: Minimum contention window slot. -+ * @NL80211_WMMR_CW_MAX: Maximum contention window slot. -+ * @NL80211_WMMR_AIFSN: Arbitration Inter Frame Space. -+ * @NL80211_WMMR_TXOP: Maximum allowed tx operation time. -+ * @nl80211_WMMR_MAX: highest possible wmm rule. -+ * @__NL80211_WMMR_LAST: Internal use. -+ */ -+enum nl80211_wmm_rule { -+ __NL80211_WMMR_INVALID, -+ NL80211_WMMR_CW_MIN, -+ NL80211_WMMR_CW_MAX, -+ NL80211_WMMR_AIFSN, -+ NL80211_WMMR_TXOP, -+ -+ /* keep last */ -+ __NL80211_WMMR_LAST, -+ NL80211_WMMR_MAX = __NL80211_WMMR_LAST - 1 -+}; -+ -+/** - * enum nl80211_frequency_attr - frequency attributes - * @__NL80211_FREQUENCY_ATTR_INVALID: attribute number 0 is reserved - * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz -@@ -3108,6 +3366,9 @@ enum nl80211_band_attr { - * on this channel in current regulatory domain. - * @NL80211_FREQUENCY_ATTR_NO_10MHZ: 10 MHz operation is not allowed - * on this channel in current regulatory domain. -+ * @NL80211_FREQUENCY_ATTR_WMM: this channel has wmm limitations. -+ * This is a nested attribute that contains the wmm limitation per AC. -+ * (see &enum nl80211_wmm_rule) - * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number - * currently defined - * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use -@@ -3136,6 +3397,7 @@ enum nl80211_frequency_attr { - NL80211_FREQUENCY_ATTR_IR_CONCURRENT, - NL80211_FREQUENCY_ATTR_NO_20MHZ, - NL80211_FREQUENCY_ATTR_NO_10MHZ, -+ NL80211_FREQUENCY_ATTR_WMM, - - /* keep last */ - __NL80211_FREQUENCY_ATTR_AFTER_LAST, -@@ -3319,7 +3581,7 @@ enum nl80211_sched_scan_match_attr { - * @NL80211_RRF_AUTO_BW: maximum available bandwidth should be calculated - * base on contiguous rules and wider channels will be allowed to cross - * multiple contiguous/overlapping frequency ranges. -- * @NL80211_RRF_IR_CONCURRENT: See &NL80211_FREQUENCY_ATTR_IR_CONCURRENT -+ * @NL80211_RRF_IR_CONCURRENT: See %NL80211_FREQUENCY_ATTR_IR_CONCURRENT - * @NL80211_RRF_NO_HT40MINUS: channels can't be used in HT40- operation - * @NL80211_RRF_NO_HT40PLUS: channels can't be used in HT40+ operation - * @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed -@@ -4945,6 +5207,27 @@ enum nl80211_feature_flags { - * probe request tx deferral and suppression - * @NL80211_EXT_FEATURE_MFP_OPTIONAL: Driver supports the %NL80211_MFP_OPTIONAL - * value in %NL80211_ATTR_USE_MFP. -+ * @NL80211_EXT_FEATURE_LOW_SPAN_SCAN: Driver supports low span scan. -+ * @NL80211_EXT_FEATURE_LOW_POWER_SCAN: Driver supports low power scan. -+ * @NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN: Driver supports high accuracy scan. -+ * @NL80211_EXT_FEATURE_DFS_OFFLOAD: HW/driver will offload DFS actions. -+ * Device or driver will do all DFS-related actions by itself, -+ * informing user-space about CAC progress, radar detection event, -+ * channel change triggered by radar detection event. -+ * No need to start CAC from user-space, no need to react to -+ * "radar detected" event. -+ * @NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211: Driver supports sending and -+ * receiving control port frames over nl80211 instead of the netdevice. -+ * @NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT: This Driver support data ack -+ * rssi if firmware support, this flag is to intimate about ack rssi -+ * support to nl80211. -+ * @NL80211_EXT_FEATURE_TXQS: Driver supports FQ-CoDel-enabled intermediate -+ * TXQs. -+ * @NL80211_EXT_FEATURE_SCAN_RANDOM_SN: Driver/device supports randomizing the -+ * SN in probe request frames if requested by %NL80211_SCAN_FLAG_RANDOM_SN. -+ * @NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT: Driver/device can omit all data -+ * except for supported rates from the probe request content if requested -+ * by the %NL80211_SCAN_FLAG_MIN_PREQ_CONTENT flag. - * * @NUM_NL80211_EXT_FEATURES: number of extended features. * @MAX_NL80211_EXT_FEATURES: highest extended feature index. -@@ -4972,6 +5255,15 @@ enum nl80211_ext_feature_index { - NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE, - NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION, - NL80211_EXT_FEATURE_MFP_OPTIONAL, -+ NL80211_EXT_FEATURE_LOW_SPAN_SCAN, -+ NL80211_EXT_FEATURE_LOW_POWER_SCAN, -+ NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN, -+ NL80211_EXT_FEATURE_DFS_OFFLOAD, -+ NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211, -+ NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT, -+ NL80211_EXT_FEATURE_TXQS, -+ NL80211_EXT_FEATURE_SCAN_RANDOM_SN, -+ NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT, + */ +@@ -5529,6 +5538,8 @@ enum nl80211_ext_feature_index { + NL80211_EXT_FEATURE_EXT_KEY_ID, + NL80211_EXT_FEATURE_STA_TX_PWR, + NL80211_EXT_FEATURE_SAE_OFFLOAD, ++ NL80211_EXT_FEATURE_VLAN_OFFLOAD, ++ NL80211_EXT_FEATURE_AQL, /* add new features before the definition below */ NUM_NL80211_EXT_FEATURES, -@@ -5032,6 +5324,10 @@ enum nl80211_timeout_reason { - * of NL80211_CMD_TRIGGER_SCAN and NL80211_CMD_START_SCHED_SCAN - * requests. - * -+ * NL80211_SCAN_FLAG_LOW_SPAN, NL80211_SCAN_FLAG_LOW_POWER, and -+ * NL80211_SCAN_FLAG_HIGH_ACCURACY flags are exclusive of each other, i.e., only -+ * one of them can be used in the request. -+ * - * @NL80211_SCAN_FLAG_LOW_PRIORITY: scan request has low priority - * @NL80211_SCAN_FLAG_FLUSH: flush cache before scanning - * @NL80211_SCAN_FLAG_AP: force a scan even if the interface is configured -@@ -5059,7 +5355,26 @@ enum nl80211_timeout_reason { - * and suppression (if it has received a broadcast Probe Response frame, - * Beacon frame or FILS Discovery frame from an AP that the STA considers - * a suitable candidate for (re-)association - suitable in terms of -- * SSID and/or RSSI -+ * SSID and/or RSSI. -+ * @NL80211_SCAN_FLAG_LOW_SPAN: Span corresponds to the total time taken to -+ * accomplish the scan. Thus, this flag intends the driver to perform the -+ * scan request with lesser span/duration. It is specific to the driver -+ * implementations on how this is accomplished. Scan accuracy may get -+ * impacted with this flag. -+ * @NL80211_SCAN_FLAG_LOW_POWER: This flag intends the scan attempts to consume -+ * optimal possible power. Drivers can resort to their specific means to -+ * optimize the power. Scan accuracy may get impacted with this flag. -+ * @NL80211_SCAN_FLAG_HIGH_ACCURACY: Accuracy here intends to the extent of scan -+ * results obtained. Thus HIGH_ACCURACY scan flag aims to get maximum -+ * possible scan results. This flag hints the driver to use the best -+ * possible scan configuration to improve the accuracy in scanning. -+ * Latency and power use may get impacted with this flag. -+ * @NL80211_SCAN_FLAG_RANDOM_SN: randomize the sequence number in probe -+ * request frames from this scan to avoid correlation/tracking being -+ * possible. -+ * @NL80211_SCAN_FLAG_MIN_PREQ_CONTENT: minimize probe request content to -+ * only have supported rates and no additional capabilities (unless -+ * added by userspace explicitly.) - */ - enum nl80211_scan_flags { - NL80211_SCAN_FLAG_LOW_PRIORITY = 1<<0, -@@ -5070,6 +5385,11 @@ enum nl80211_scan_flags { - NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP = 1<<5, - NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE = 1<<6, - NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION = 1<<7, -+ NL80211_SCAN_FLAG_LOW_SPAN = 1<<8, -+ NL80211_SCAN_FLAG_LOW_POWER = 1<<9, -+ NL80211_SCAN_FLAG_HIGH_ACCURACY = 1<<10, -+ NL80211_SCAN_FLAG_RANDOM_SN = 1<<11, -+ NL80211_SCAN_FLAG_MIN_PREQ_CONTENT = 1<<12, - }; - - /** -@@ -5127,6 +5447,8 @@ enum nl80211_smps_mode { - * non-operating channel is expired and no longer valid. New CAC must - * be done on this channel before starting the operation. This is not - * applicable for ETSI dfs domain where pre-CAC is valid for ever. -+ * @NL80211_RADAR_CAC_STARTED: Channel Availability Check has been started, -+ * should be generated by HW if NL80211_EXT_FEATURE_DFS_OFFLOAD is enabled. - */ - enum nl80211_radar_event { - NL80211_RADAR_DETECTED, -@@ -5134,6 +5456,7 @@ enum nl80211_radar_event { - NL80211_RADAR_CAC_ABORTED, - NL80211_RADAR_NOP_FINISHED, - NL80211_RADAR_PRE_CAC_EXPIRED, -+ NL80211_RADAR_CAC_STARTED, - }; - - /** -@@ -5425,11 +5748,11 @@ enum nl80211_nan_func_attributes { - * @NL80211_NAN_SRF_INCLUDE: present if the include bit of the SRF set. - * This is a flag. - * @NL80211_NAN_SRF_BF: Bloom Filter. Present if and only if -- * &NL80211_NAN_SRF_MAC_ADDRS isn't present. This attribute is binary. -+ * %NL80211_NAN_SRF_MAC_ADDRS isn't present. This attribute is binary. - * @NL80211_NAN_SRF_BF_IDX: index of the Bloom Filter. Mandatory if -- * &NL80211_NAN_SRF_BF is present. This is a u8. -+ * %NL80211_NAN_SRF_BF is present. This is a u8. - * @NL80211_NAN_SRF_MAC_ADDRS: list of MAC addresses for the SRF. Present if -- * and only if &NL80211_NAN_SRF_BF isn't present. This is a nested -+ * and only if %NL80211_NAN_SRF_BF isn't present. This is a nested - * attribute. Each nested attribute is a MAC address. - * @NUM_NL80211_NAN_SRF_ATTR: internal - * @NL80211_NAN_SRF_ATTR_MAX: highest NAN SRF attribute -@@ -5469,4 +5792,15 @@ enum nl80211_nan_match_attributes { - NL80211_NAN_MATCH_ATTR_MAX = NUM_NL80211_NAN_MATCH_ATTR - 1 - }; - -+/** -+ * nl80211_external_auth_action - Action to perform with external -+ * authentication request. Used by NL80211_ATTR_EXTERNAL_AUTH_ACTION. -+ * @NL80211_EXTERNAL_AUTH_START: Start the authentication. -+ * @NL80211_EXTERNAL_AUTH_ABORT: Abort the ongoing authentication. -+ */ -+enum nl80211_external_auth_action { -+ NL80211_EXTERNAL_AUTH_START, -+ NL80211_EXTERNAL_AUTH_ABORT, -+}; -+ - #endif /* __LINUX_NL80211_H */ diff --git a/package/network/utils/iw/patches/120-antenna_gain.patch b/package/network/utils/iw/patches/120-antenna_gain.patch index 27ba390c7f..f8d537fe1e 100644 --- a/package/network/utils/iw/patches/120-antenna_gain.patch +++ b/package/network/utils/iw/patches/120-antenna_gain.patch @@ -1,9 +1,9 @@ --- a/phy.c +++ b/phy.c -@@ -727,3 +727,30 @@ COMMAND(set, antenna, " | all | - NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_antenna, - "Set a bitmap of allowed antennas to use for TX and RX.\n" - "The driver may reject antenna configurations it cannot support."); +@@ -855,3 +855,30 @@ static int handle_get_txq(struct nl80211 + COMMAND(get, txq, "", + NL80211_CMD_GET_WIPHY, 0, CIB_PHY, handle_get_txq, + "Get TXQ parameters."); + +static int handle_antenna_gain(struct nl80211_state *state, + struct nl_msg *msg, diff --git a/package/network/utils/iw/patches/130-survey-bss-rx-time.patch b/package/network/utils/iw/patches/130-survey-bss-rx-time.patch new file mode 100644 index 0000000000..d488c141c9 --- /dev/null +++ b/package/network/utils/iw/patches/130-survey-bss-rx-time.patch @@ -0,0 +1,12 @@ +--- a/survey.c ++++ b/survey.c +@@ -60,6 +60,9 @@ static int print_survey_handler(struct n + if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_RX]) + printf("\tchannel receive time:\t\t%llu ms\n", + (unsigned long long)nla_get_u64(sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_RX])); ++ if (sinfo[NL80211_SURVEY_INFO_TIME_BSS_RX]) ++ printf("\tchannel BSS receive time:\t%llu ms\n", ++ (unsigned long long)nla_get_u64(sinfo[NL80211_SURVEY_INFO_TIME_BSS_RX])); + if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_TX]) + printf("\tchannel transmit time:\t\t%llu ms\n", + (unsigned long long)nla_get_u64(sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_TX])); diff --git a/package/network/utils/iw/patches/200-reduce_size.patch b/package/network/utils/iw/patches/200-reduce_size.patch index 5f4bce6a8b..58613d59a0 100644 --- a/package/network/utils/iw/patches/200-reduce_size.patch +++ b/package/network/utils/iw/patches/200-reduce_size.patch @@ -1,6 +1,6 @@ --- a/event.c +++ b/event.c -@@ -342,6 +342,7 @@ static int print_event(struct nl_msg *ms +@@ -699,6 +699,7 @@ static int print_event(struct nl_msg *ms } switch (gnlh->cmd) { @@ -8,7 +8,7 @@ case NL80211_CMD_NEW_WIPHY: printf("renamed to %s\n", nla_get_string(tb[NL80211_ATTR_WIPHY_NAME])); break; -@@ -376,6 +377,7 @@ static int print_event(struct nl_msg *ms +@@ -734,6 +735,7 @@ static int print_event(struct nl_msg *ms case NL80211_CMD_SCHED_SCAN_RESULTS: printf("got scheduled scan results\n"); break; @@ -16,7 +16,7 @@ case NL80211_CMD_REG_CHANGE: printf("regulatory domain change: "); -@@ -454,6 +456,7 @@ static int print_event(struct nl_msg *ms +@@ -812,6 +814,7 @@ static int print_event(struct nl_msg *ms mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); printf("del station %s\n", macbuf); break; @@ -24,10 +24,10 @@ case NL80211_CMD_JOIN_IBSS: mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); printf("IBSS %s joined\n", macbuf); -@@ -618,9 +621,9 @@ static int print_event(struct nl_msg *ms - case NL80211_CMD_DEL_WIPHY: - printf("delete wiphy\n"); +@@ -989,9 +992,9 @@ static int print_event(struct nl_msg *ms + parse_nan_match(tb); break; + } +#endif default: - printf("unknown event %d (%s)\n", @@ -38,7 +38,23 @@ --- a/info.c +++ b/info.c -@@ -197,6 +197,7 @@ next: +@@ -164,6 +164,7 @@ static int print_phy_handler(struct nl_m + tb_band[NL80211_BAND_ATTR_VHT_MCS_SET]) + print_vht_info(nla_get_u32(tb_band[NL80211_BAND_ATTR_VHT_CAPA]), + nla_data(tb_band[NL80211_BAND_ATTR_VHT_MCS_SET])); ++#ifdef IW_FULL + if (tb_band[NL80211_BAND_ATTR_IFTYPE_DATA]) { + struct nlattr *nl_iftype; + int rem_band; +@@ -171,6 +172,7 @@ static int print_phy_handler(struct nl_m + nla_for_each_nested(nl_iftype, tb_band[NL80211_BAND_ATTR_IFTYPE_DATA], rem_band) + print_he_info(nl_iftype); + } ++#endif + if (tb_band[NL80211_BAND_ATTR_FREQS]) { + if (!band_had_freq) { + printf("\t\tFrequencies:\n"); +@@ -213,6 +215,7 @@ next: } } @@ -46,7 +62,7 @@ if (tb_band[NL80211_BAND_ATTR_RATES]) { printf("\t\tBitrates (non-HT):\n"); nla_for_each_nested(nl_rate, tb_band[NL80211_BAND_ATTR_RATES], rem_rate) { -@@ -213,6 +214,7 @@ next: +@@ -229,6 +232,7 @@ next: printf("\n"); } } @@ -54,7 +70,7 @@ } } -@@ -278,6 +280,7 @@ next: +@@ -294,6 +298,7 @@ next: printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage); } @@ -62,7 +78,7 @@ if (tb_msg[NL80211_ATTR_CIPHER_SUITES]) { int num = nla_len(tb_msg[NL80211_ATTR_CIPHER_SUITES]) / sizeof(__u32); int i; -@@ -289,6 +292,7 @@ next: +@@ -305,6 +310,7 @@ next: cipher_name(ciphers[i])); } } @@ -70,7 +86,7 @@ if (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX] && tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX]) -@@ -308,11 +312,13 @@ next: +@@ -324,11 +330,13 @@ next: printf("\t\t * %s\n", iftype_name(nla_type(nl_mode))); } @@ -84,7 +100,7 @@ if (tb_msg[NL80211_ATTR_INTERFACE_COMBINATIONS]) { struct nlattr *nl_combi; -@@ -409,6 +415,7 @@ broken_combination: +@@ -425,6 +433,7 @@ broken_combination: printf("\tinterface combinations are not supported\n"); } @@ -92,7 +108,7 @@ if (tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS]) { printf("\tSupported commands:\n"); nla_for_each_nested(nl_cmd, tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS], rem_cmd) -@@ -506,6 +513,7 @@ broken_combination: +@@ -522,6 +531,7 @@ broken_combination: printf("\t\t * wake up on TCP connection\n"); } } @@ -100,7 +116,7 @@ if (tb_msg[NL80211_ATTR_ROAM_SUPPORT]) printf("\tDevice supports roaming.\n"); -@@ -544,6 +552,7 @@ broken_combination: +@@ -560,6 +570,7 @@ broken_combination: } } @@ -108,15 +124,15 @@ if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) { unsigned int features = nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]); -@@ -602,6 +611,7 @@ broken_combination: - if (features & NL80211_FEATURE_TDLS_CHANNEL_SWITCH) - printf("\tDevice supports TDLS channel switching\n"); +@@ -624,6 +635,7 @@ broken_combination: + if (features & NL80211_FEATURE_ND_RANDOM_MAC_ADDR) + printf("\tDevice supports randomizing MAC-addr in net-detect scans.\n"); } +#endif - if (tb_msg[NL80211_ATTR_EXT_FEATURES]) { - struct nlattr *tb = tb_msg[NL80211_ATTR_EXT_FEATURES]; -@@ -658,6 +668,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP + if (tb_msg[NL80211_ATTR_TDLS_SUPPORT]) + printf("\tDevice supports T-DLS.\n"); +@@ -732,6 +744,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP "List all wireless devices and their capabilities."); TOPLEVEL(phy, NULL, NL80211_CMD_GET_WIPHY, NLM_F_DUMP, CIB_NONE, handle_info, NULL); @@ -124,7 +140,7 @@ static int handle_commands(struct nl80211_state *state, struct nl_msg *msg, int argc, char **argv, enum id_input id) { -@@ -669,6 +680,7 @@ static int handle_commands(struct nl8021 +@@ -743,6 +756,7 @@ static int handle_commands(struct nl8021 } TOPLEVEL(commands, NULL, NL80211_CMD_GET_WIPHY, 0, CIB_NONE, handle_commands, "list all known commands and their decimal & hex value"); @@ -134,15 +150,17 @@ { --- a/scan.c +++ b/scan.c -@@ -1170,6 +1170,7 @@ static void print_ht_op(const uint8_t ty +@@ -1195,6 +1195,9 @@ static void print_ht_op(const uint8_t ty printf("\t\t * secondary channel offset: %s\n", ht_secondary_offset[data[1] & 0x3]); printf("\t\t * STA channel width: %s\n", sta_chan_width[(data[1] & 0x4)>>2]); ++#ifndef IW_FULL + return; ++#endif printf("\t\t * RIFS: %d\n", (data[1] & 0x8)>>3); printf("\t\t * HT protection: %s\n", protection[data[2] & 0x3]); printf("\t\t * non-GF present: %d\n", (data[2] & 0x4) >> 2); -@@ -1497,6 +1498,14 @@ static void print_ie(const struct ie_pri +@@ -1522,6 +1525,14 @@ static void print_ie(const struct ie_pri static const struct ie_print ieprinters[] = { [0] = { "SSID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), }, @@ -157,7 +175,7 @@ [1] = { "Supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), }, [3] = { "DS Parameter set", print_ds, 1, 1, BIT(PRINT_SCAN), }, [5] = { "TIM", print_tim, 4, 255, BIT(PRINT_SCAN), }, -@@ -1506,21 +1515,15 @@ static const struct ie_print ieprinters[ +@@ -1531,21 +1542,15 @@ static const struct ie_print ieprinters[ [32] = { "Power constraint", print_powerconstraint, 1, 1, BIT(PRINT_SCAN), }, [35] = { "TPC report", print_tpcreport, 2, 2, BIT(PRINT_SCAN), }, [42] = { "ERP", print_erp, 1, 255, BIT(PRINT_SCAN), }, @@ -180,7 +198,7 @@ }; static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data, -@@ -1968,6 +1971,7 @@ void print_ies(unsigned char *ie, int ie +@@ -2024,6 +2029,7 @@ void print_ies(unsigned char *ie, int ie ieprinters[ie[0]].flags & BIT(ptype)) { print_ie(&ieprinters[ie[0]], ie[0], ie[1], ie + 2, &ie_buffer); @@ -188,7 +206,7 @@ } else if (ie[0] == 221 /* vendor */) { print_vendor(ie[1], ie + 2, unknown, ptype); } else if (unknown) { -@@ -1977,6 +1981,7 @@ void print_ies(unsigned char *ie, int ie +@@ -2033,6 +2039,7 @@ void print_ies(unsigned char *ie, int ie for (i=0; i [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons ] [block-tx]\n" -@@ -715,3 +718,4 @@ COMMAND(switch, freq, +@@ -727,3 +730,4 @@ COMMAND(switch, freq, "Switch the operating channel by sending a channel switch announcement (CSA)."); COMMAND(switch, channel, " [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons ] [block-tx]", NL80211_CMD_CHANNEL_SWITCH, 0, CIB_NETDEV, handle_chan, NULL); +#endif --- a/phy.c +++ b/phy.c -@@ -359,6 +359,7 @@ static int handle_cac(struct nl80211_sta - - return 0; +@@ -369,6 +369,7 @@ err_out: + free(cac_trigger_argv); + return err; } +#ifdef IW_FULL TOPLEVEL(cac, "channel [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz]\n" "freq [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz]\n" "freq [5|10|20|40|80|80+80|160] [ []]", -@@ -370,6 +371,7 @@ COMMAND(cac, trigger, +@@ -380,6 +381,7 @@ COMMAND(cac, trigger, NL80211_CMD_RADAR_DETECT, 0, CIB_NETDEV, handle_cac_trigger, "Start or trigger a channel availability check (CAC) looking to look for\n" "radars on the given channel."); From a7664194db91776bed0d21ff80094fe814fa50c0 Mon Sep 17 00:00:00 2001 From: R3pl4c3r <30682790+R3pl4c3r@users.noreply.github.com> Date: Sat, 25 Apr 2020 11:08:22 +0800 Subject: [PATCH 03/38] README.md: Add dependent package for Ubuntu 20.04 (#4432) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f8408d311..abd7f7b048 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Welcome to Lean's git source of OpenWrt and packages 2. 命令行输入 `sudo apt-get update` ,然后输入 ` -sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3.5 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib antlr3 gperf +sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3.5 python2.7 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib antlr3 gperf ` 3. 使用 `git clone https://github.com/coolsnowwolf/lede` 命令下载好源代码,然后 `cd lede` 进入目录 From c5b7a0d3a480950573800e84567f15d6043c6046 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sat, 25 Apr 2020 11:55:38 +0800 Subject: [PATCH 04/38] package: lantiq/layerscape: sync upstream source code --- package/firmware/layerscape/ls-rcw/Makefile | 6 + .../patches/0001-Disable-byte-swapping.patch | 44 ++ ...ort-byte-swapping-without-tclsh-tool.patch | 82 --- .../patches/0002-Convert-to-python3.patch | 504 ++++++++++++++++++ package/kernel/lantiq/ltq-adsl-fw/Makefile | 6 +- package/kernel/lantiq/ltq-adsl-mei/Makefile | 1 - package/kernel/lantiq/ltq-adsl/Config.in | 6 +- package/kernel/lantiq/ltq-adsl/Makefile | 9 +- .../ltq-adsl/patches/100-dsl_compat.patch | 27 +- .../ltq-adsl/patches/120-platform.patch | 15 +- .../ltq-adsl/patches/130-linux3.8.patch | 20 +- package/kernel/lantiq/ltq-atm/Makefile | 1 - .../ltq-atm/src/ifxmips_atm_amazon_se.c | 9 +- .../lantiq/ltq-atm/src/ifxmips_atm_ar9.c | 9 +- .../lantiq/ltq-atm/src/ifxmips_atm_core.h | 2 +- .../lantiq/ltq-atm/src/ifxmips_atm_danube.c | 9 +- .../lantiq/ltq-atm/src/ifxmips_atm_vr9.c | 45 +- package/kernel/lantiq/ltq-atm/src/ltq_atm.c | 10 +- package/kernel/lantiq/ltq-deu/Makefile | 1 - .../kernel/lantiq/ltq-deu/src/ifxmips_md5.c | 2 +- .../lantiq/ltq-deu/src/ifxmips_md5_hmac.c | 2 +- .../kernel/lantiq/ltq-deu/src/ifxmips_sha1.c | 2 +- .../lantiq/ltq-deu/src/ifxmips_sha1_hmac.c | 2 +- package/kernel/lantiq/ltq-ifxos/Makefile | 1 - ...ion-failure-from-inclusion-of-wrong-.patch | 2 +- package/kernel/lantiq/ltq-ptm/Makefile | 3 +- .../lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c | 38 +- .../lantiq/ltq-ptm/src/ifxmips_ptm_adsl.h | 2 +- .../ltq-ptm/src/ifxmips_ptm_amazon_se.c | 10 +- .../lantiq/ltq-ptm/src/ifxmips_ptm_ar9.c | 10 +- .../lantiq/ltq-ptm/src/ifxmips_ptm_danube.c | 10 +- .../lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c | 40 +- .../lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h | 2 +- .../lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c | 61 ++- package/kernel/lantiq/ltq-tapi/Makefile | 1 - .../ltq-tapi/patches/010-fix-compile.patch | 2 +- .../ltq-tapi/patches/400-linux-415.patch | 48 ++ package/kernel/lantiq/ltq-vdsl-fw/Makefile | 2 +- .../lantiq/ltq-vdsl-fw/src/vdsl_fw_install.sh | 6 +- .../lantiq/ltq-vdsl-fw/src/w921v_fw_cutter.c | 4 +- package/kernel/lantiq/ltq-vdsl-mei/Makefile | 10 +- package/kernel/lantiq/ltq-vdsl/Makefile | 1 - .../lantiq/ltq-vdsl/patches/100-compat.patch | 27 +- package/kernel/lantiq/ltq-vmmc/Makefile | 1 - 44 files changed, 887 insertions(+), 208 deletions(-) create mode 100644 package/firmware/layerscape/ls-rcw/patches/0001-Disable-byte-swapping.patch delete mode 100644 package/firmware/layerscape/ls-rcw/patches/0001-rcw-support-byte-swapping-without-tclsh-tool.patch create mode 100644 package/firmware/layerscape/ls-rcw/patches/0002-Convert-to-python3.patch create mode 100644 package/kernel/lantiq/ltq-tapi/patches/400-linux-415.patch diff --git a/package/firmware/layerscape/ls-rcw/Makefile b/package/firmware/layerscape/ls-rcw/Makefile index 5bcbff5bc4..ddef58fa0b 100644 --- a/package/firmware/layerscape/ls-rcw/Makefile +++ b/package/firmware/layerscape/ls-rcw/Makefile @@ -28,6 +28,11 @@ define Package/layerscape-rcw/Config endef endef +define Package/layerscape-rcw/ls1012afrdm + TITLE:=NXP LS1012AFRDM RCW binary + CONFIG:=ls1012afrdm/N_SSNP_3305/rcw_800.bin +endef + define Package/layerscape-rcw/ls1012ardb TITLE:=NXP LS1012ARDB RCW binary CONFIG:=ls1012ardb/R_SPNH_3508/rcw_1000_default.bin @@ -86,6 +91,7 @@ define Package/layerscape-rcw/Install endef RCWS := \ + ls1012afrdm \ ls1012ardb \ ls1012afrwy \ ls1043ardb \ diff --git a/package/firmware/layerscape/ls-rcw/patches/0001-Disable-byte-swapping.patch b/package/firmware/layerscape/ls-rcw/patches/0001-Disable-byte-swapping.patch new file mode 100644 index 0000000000..2ea260bfd4 --- /dev/null +++ b/package/firmware/layerscape/ls-rcw/patches/0001-Disable-byte-swapping.patch @@ -0,0 +1,44 @@ +From ef78dc0683a7f5ae80b27878a8a2f91d504e3290 Mon Sep 17 00:00:00 2001 +From: Yangbo Lu +Date: Wed, 19 Jun 2019 10:50:29 +0800 +Subject: [PATCH 1/2] Disable byte swapping + +Because TF-A had already handled rcw byte swapping, the +byte swapping in rcw could be dropped. + +Signed-off-by: Yangbo Lu +--- + Makefile | 4 ---- + Makefile.inc | 1 - + 2 files changed, 5 deletions(-) + +diff --git a/Makefile b/Makefile +index f697241..837b69e 100644 +--- a/Makefile ++++ b/Makefile +@@ -14,10 +14,6 @@ TCLSH := $(shell command -v tclsh 2> /dev/null) + VER = $(shell git describe --tags) + + all install clean: +-ifndef TCLSH +- $(error "tclsh is not available. please install it.") +- exit 1 +-endif + @for board in $(BOARDS); do \ + $(MAKE) -C $$board $@ DESTDIR=$(DESTDIR)/$$board; \ + done +diff --git a/Makefile.inc b/Makefile.inc +index 87639bc..7d9a3d3 100644 +--- a/Makefile.inc ++++ b/Makefile.inc +@@ -17,7 +17,6 @@ targets = $(txt_sources:.txt=.bin) $(rcw_sources:.rcw=.bin) $(swap_sources) + $(RCW) -i $< -o $@ + + all: $(targets) +- $(QSPI_SWAP_SCRIPT) $(QSPI_SWAP_LIST) + + install: $(targets) + $(INSTALL) -d $(DESTDIR) +-- +2.7.4 + diff --git a/package/firmware/layerscape/ls-rcw/patches/0001-rcw-support-byte-swapping-without-tclsh-tool.patch b/package/firmware/layerscape/ls-rcw/patches/0001-rcw-support-byte-swapping-without-tclsh-tool.patch deleted file mode 100644 index 08492dd479..0000000000 --- a/package/firmware/layerscape/ls-rcw/patches/0001-rcw-support-byte-swapping-without-tclsh-tool.patch +++ /dev/null @@ -1,82 +0,0 @@ -From c87a500c45f36ad248b1298d63e590d1d7e74f12 Mon Sep 17 00:00:00 2001 -From: Yangbo Lu -Date: Tue, 3 Jul 2018 11:06:47 +0800 -Subject: [PATCH] rcw: support byte swapping without tclsh tool - -Signed-off-by: Yangbo Lu ---- - Makefile | 4 ---- - byte_swap.py | 32 ++++++++++++++++++++++++++++++++ - qspi_swap.sh | 2 +- - 3 files changed, 33 insertions(+), 5 deletions(-) - create mode 100755 byte_swap.py - -diff --git a/Makefile b/Makefile -index 9f0587e..393bb2c 100644 ---- a/Makefile -+++ b/Makefile -@@ -13,10 +13,6 @@ TCLSH := $(shell command -v tclsh 2> /dev/null) - VER = $(shell git describe --tags) - - all install clean: --ifndef TCLSH -- $(error "tclsh is not available. please install it.") -- exit 1 --endif - @for board in $(BOARDS); do \ - $(MAKE) -C $$board $@ DESTDIR=$(DESTDIR)/$$board; \ - done -diff --git a/byte_swap.py b/byte_swap.py -new file mode 100755 -index 0000000..386310e ---- /dev/null -+++ b/byte_swap.py -@@ -0,0 +1,32 @@ -+#!/usr/bin/env python -+""" -+Swap the 4/8 bytes endian except for PBI CRC -+2016-10-9: Initial version -+ -+Usage: -+ ./byte_swap.py -+""" -+import sys -+ -+try: -+ file_name = sys.argv[1] -+ byte = int(sys.argv[2]) -+except: -+ print("Usage: ./byte_swap.py ") -+ print("E.g.: ./byte_swap.py rcw_1600.bin 8\n") -+ exit -+ -+with open(file_name,'rb') as file: -+ tmp = file.read() -+file.close() -+ -+with open(file_name + '.swapped','wb') as file: -+ for i in range(0, len(tmp) - 1, byte): -+ if(tmp[i:i+4].encode('hex')) == "08610040": -+ #print("PBI CRC command") -+ file.write(tmp[i:i+8]) -+ break -+ file.write(tmp[i:i+byte][::-1]) -+file.close() -+ -+print("Swapped file: " + file_name + '.swapped') -diff --git a/qspi_swap.sh b/qspi_swap.sh -index 0b58e44..d23fd8b 100755 ---- a/qspi_swap.sh -+++ b/qspi_swap.sh -@@ -9,7 +9,7 @@ do - if [ "$board_name" = "$current_dir" ]; then - if [ -e $filename ]; then - swapped_file="$filename.swapped" -- tclsh ../tools/byte_swap.tcl $filename $swapped_file 8 -+ ../byte_swap.py $filename 8 - fi - fi - done < $1 --- -1.7.1 - diff --git a/package/firmware/layerscape/ls-rcw/patches/0002-Convert-to-python3.patch b/package/firmware/layerscape/ls-rcw/patches/0002-Convert-to-python3.patch new file mode 100644 index 0000000000..8aa629dd85 --- /dev/null +++ b/package/firmware/layerscape/ls-rcw/patches/0002-Convert-to-python3.patch @@ -0,0 +1,504 @@ +From 7bd43eb9e5cdf2035793d50a31bf13052eb9812a Mon Sep 17 00:00:00 2001 +From: Yangbo Lu +Date: Wed, 19 Jun 2019 10:25:41 +0800 +Subject: [PATCH 2/2] Convert to python3 + +Python 2.7 will not be maintained past 2020. Let's convert +to python3 for rcw. Below were the changes of this patch. +- Adapted print usage +- Didn't use tab anymore +- Handled str and bytes type separately +- Other minor changes + +Signed-off-by: Yangbo Lu +--- + Makefile.inc | 2 +- + rcw.py | 144 +++++++++++++++++++++++++++++------------------------------ + 2 files changed, 73 insertions(+), 73 deletions(-) + +diff --git a/Makefile.inc b/Makefile.inc +index 7d9a3d3..8bee2be 100644 +--- a/Makefile.inc ++++ b/Makefile.inc +@@ -1,6 +1,6 @@ + DESTDIR = $(shell basename $(CURDIR)) + INSTALL = install +-PYTHON ?= python2 ++PYTHON ?= python3 + RCW = $(PYTHON) ../rcw.py + QSPI_SWAP_LIST = $(shell pwd)/../qspi_swap_list.txt + QSPI_SWAP_SCRIPT=$(shell pwd)/../qspi_swap.sh +diff --git a/rcw.py b/rcw.py +index e5cd28b..619770a 100755 +--- a/rcw.py ++++ b/rcw.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python2 ++#!/usr/bin/env python3 + + # rcw.py -- compiles an RCW source file into an PBL/RCW binary + +@@ -95,7 +95,7 @@ from optparse import OptionParser, OptionGroup + class ordered_dict(dict): + def __init__(self, *args, **kwargs): + dict.__init__(self, *args, **kwargs) +- self._order = self.keys() ++ self._order = list(self.keys()) + + def __setitem__(self, key, value): + dict.__setitem__(self, key, value) +@@ -132,7 +132,7 @@ def crc32(data): + + crc = 0xffffffff + for i in data: +- crc = (crc << 8) ^ table[(crc >> 24) ^ ord(i)] ++ crc = (crc << 8) ^ table[(crc >> 24) ^ int(i)] + crc = crc & 0xffffffff + + return crc +@@ -187,7 +187,7 @@ def command_line(): + options.output = '/dev/stdout' + + if options.reverse and not options.rcwi: +- print "Error: -r option requires --rcw" ++ print("Error: -r option requires --rcw") + sys.exit(1) + + # Checks if the bits for the given field overlap those of another field that +@@ -196,27 +196,27 @@ def check_for_overlap(name, begin, end): + global symbols + + if name in symbols: +- print 'Error: Duplicate bitfield definition for', name ++ print('Error: Duplicate bitfield definition for', name) + return + + # Iterate over the list of symbols that have already been defined +- for n, [b, e] in symbols.iteritems(): ++ for n, [b, e] in symbols.items(): + # check if either 'begin' or 'end' is inside an bitfield range + if (b <= begin <= e) or (b <= end <= e): +- print 'Error: Bitfield', name, 'overlaps with', n ++ print('Error: Bitfield', name, 'overlaps with', n) + + # + # Build a u-boot PBI section for SPI/SD/NAND boot +-# refer: Chapter 10, u-boot of QorIQ_SDK_Infocenter.pdf ++# refer: Chapter 10, u-boot of QorIQ_SDK_Infocenter.pdf + # + # pre-cond 1: u-boot.xxd should be created + # how to create u-boot.xxd +-# xxd u-boot.bin > u-boot.xxd1 && cut -d " " -f1-10 u-boot.xxd1 > u-boot.xxd && rm -f u-boot.xxd1 ++# xxd u-boot.bin > u-boot.xxd1 && cut -d " " -f1-10 u-boot.xxd1 > u-boot.xxd && rm -f u-boot.xxd1 + # + # rcw file should include spi_boot.rcw as well + # + def build_pbi_uboot(lines): +- subsection = '' ++ subsection = b'' + cnt = 1 + l_tmp = [] + +@@ -224,55 +224,55 @@ def build_pbi_uboot(lines): + for l in lines: + # prepare 0x40 per lines except the last one + # add flush at the end +- lstr = l.split() +- addr = int(lstr[0][:-1], 16) ++ lstr = l.split() ++ addr = int(lstr[0][:-1], 16) + + # print l + # + # last two lines take 0x20 numbers + # +- if ((cnt % 2 == 0) and (cnt > len(lines) -4)): ++ if ((cnt % 2 == 0) and (cnt > len(lines) -4)): + l_tmp.append(l) + b = [] + +- for t in l_tmp: ++ for t in l_tmp: + lstr = t.split() + +- for i in range(1, len(lstr)): ++ for i in range(1, len(lstr)): + b.append(int(lstr[i], 16)) + + subsection += struct.pack('>LHHHHHHHHHHHHHHHH',\ +- 0x0C1F80000 + (addr - 0x10),\ +- b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7],\ +- b[8], b[9], b[10], b[11], b[12], b[13], b[14], b[15]) ++ 0x0C1F80000 + (addr - 0x10),\ ++ b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7],\ ++ b[8], b[9], b[10], b[11], b[12], b[13], b[14], b[15]) + l_tmp = [] + # + # the rest of lines take 0x40 numbers + elif (cnt % 4 == 0): + l_tmp.append(l) +- b = [] +- for t in l_tmp: ++ b = [] ++ for t in l_tmp: + lstr = t.split() +- for i in range(1, len(lstr)): ++ for i in range(1, len(lstr)): + b.append(int(lstr[i], 16)) + + subsection += struct.pack('>LHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH',\ +- 0x081F80000 + (addr - 0x30),\ +- b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7],\ +- b[8], b[9], b[10], b[11], b[12], b[13], b[14], b[15],\ +- b[16], b[17], b[18], b[19], b[20], b[21], b[22], b[23], \ +- b[24], b[25], b[26], b[27], b[28], b[29], b[30], b[31]) ++ 0x081F80000 + (addr - 0x30),\ ++ b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7],\ ++ b[8], b[9], b[10], b[11], b[12], b[13], b[14], b[15],\ ++ b[16], b[17], b[18], b[19], b[20], b[21], b[22], b[23], \ ++ b[24], b[25], b[26], b[27], b[28], b[29], b[30], b[31]) + l_tmp = [] + else: + l_tmp.append(l) + +- cnt = cnt + 1 ++ cnt = cnt + 1 + + return subsection + + # Build a PBI section + def build_pbi(lines): +- subsection = '' ++ subsection = b'' + global vars + + if 'pbiformat' in vars: +@@ -286,9 +286,9 @@ def build_pbi(lines): + for l in lines: + # Check for an instruction without 0-2 parameters + # The + ' ' is a hack to make the regex work for just 'flush' +- m = re.match(r'\s*([a-z]+)(|\.b1|\.b2|\.b4|\.short|\.long)\s*(?<=\s)([^,]*),?([^,]*),?([^,]*),?([^,]*)', l + ' ') ++ m = re.match(r'\s*([a-z]+)(|\.b1|\.b2|\.b4|\.short|\.long)\s*(?<=\s)([^,]*),?([^,]*),?([^,]*),?([^,]*)', l.decode("ascii") + ' ') + if not m: +- print 'Unknown PBI subsection command "%s"' % l ++ print('Unknown PBI subsection command "%s"' % l) + return '' + op = m.group(1) + opsize = m.group(2) +@@ -306,7 +306,7 @@ def build_pbi(lines): + p4 = eval(p4, {"__builtins__":None}, {}) if len(p4) else None + if op == 'wait': + if p1 == None: +- print 'Error: "wait" instruction requires one parameter' ++ print('Error: "wait" instruction requires one parameter') + return '' + if pbiformat == 2: + v1 = struct.pack(endianess + 'L', 0x80820000 | p1) +@@ -318,7 +318,7 @@ def build_pbi(lines): + subsection += v2 + elif op == 'write': + if p1 == None or p2 == None: +- print 'Error: "write" instruction requires two parameters' ++ print('Error: "write" instruction requires two parameters') + return '' + if pbiformat == 2: + v1 = struct.pack(endianess + 'L', (opsizebytes << 28) | p1) +@@ -329,7 +329,7 @@ def build_pbi(lines): + subsection += v2 + elif op == 'awrite': + if p1 == None or p2 == None: +- print 'Error: "awrite" instruction requires two parameters' ++ print('Error: "awrite" instruction requires two parameters') + return '' + if pbiformat == 2: + v1 = struct.pack(endianess + 'L', 0x80000000 + (opsizebytes << 26) + p1) +@@ -340,10 +340,10 @@ def build_pbi(lines): + subsection += v2 + elif op == 'poll': + if pbiformat != 2: +- print 'Error: "poll" not support for old PBI format' ++ print('Error: "poll" not support for old PBI format') + return '' + if p1 == None or p2 == None or p3 == None: +- print 'Error: "poll" instruction requires three parameters' ++ print('Error: "poll" instruction requires three parameters') + return '' + if opsize == '.long': + cmd = 0x81 +@@ -357,19 +357,19 @@ def build_pbi(lines): + subsection += v3 + elif op == 'loadacwindow': + if pbiformat != 2: +- print 'Error: "loadacwindow" not supported for old PBI format' ++ print('Error: "loadacwindow" not supported for old PBI format') + return '' + if p1 == None: +- print 'Error: "loadacwindow" instruction requires one parameter' ++ print('Error: "loadacwindow" instruction requires one parameter') + return '' + v1 = struct.pack(endianess + 'L', 0x80120000 + p1) + subsection += v1 + elif op == 'blockcopy': + if pbiformat != 2: +- print 'Error: "blockcopy" not supported for old PBI format' ++ print('Error: "blockcopy" not supported for old PBI format') + return '' + if p1 == None or p2 == None or p3 == None or p4 == None: +- print 'Error: "blockcopy" instruction requires four parameters' ++ print('Error: "blockcopy" instruction requires four parameters') + return '' + v1 = struct.pack(endianess + 'L', 0x80000000 + (p1 & 0xff)) + v2 = struct.pack(endianess + 'L', p2) +@@ -382,7 +382,7 @@ def build_pbi(lines): + elif op == 'flush': + subsection += struct.pack('>LL', 0x09000000 | (int(vars['pbladdr'], 16) & 0x00ffff00), 0) + else: +- print 'Unknown PBI subsection command "%s"' % l ++ print('Unknown PBI subsection command "%s"' % l) + return '' + + return subsection +@@ -394,7 +394,7 @@ def parse_subsection(header, lines): + elif header == "uboot": + return build_pbi_uboot(lines) + +- print 'Error: unknown subsection "%s"' % header ++ print('Error: unknown subsection "%s"' % header) + return '' + + # Parse the .rcw file, one line at a time +@@ -408,10 +408,10 @@ def parse_source_file(source): + symbols = ordered_dict() + + in_subsection = False # True == we're in a subsection +- pbi = '' ++ pbi = b'' + + for l2 in source: +- l = re.sub(r'\s+', '', l2) # Remove all whitespace ++ l = re.sub(r'\s+', '', l2.decode("ascii")) # Remove all whitespace + + if not len(l): # Skip blank or comment-only lines + continue +@@ -466,14 +466,14 @@ def parse_source_file(source): + (name, value) = m.groups() + value = int(value, 0) + if not name in symbols: +- print 'Error: Unknown bitfield', name ++ print('Error: Unknown bitfield', name) + else: + if options.warnings and (name in assignments): +- print 'Warning: Duplicate assignment for bitfield', name ++ print('Warning: Duplicate assignment for bitfield', name) + assignments[name] = value + continue + +- print 'Error: unknown command', ' '.join(l2) ++ print('Error: unknown command', ' '.join(l2)) + + # Parse the -D command line parameter for additional bitfield assignments + def parse_cmdline_bitfields(): +@@ -484,12 +484,12 @@ def parse_cmdline_bitfields(): + # This is the same regex as used in parse_source_file() + m = re.search(r'([A-Z0-9_]+)=([0-9a-zA-Z]+)', l) + if not m: +- print 'Unrecognized command-line bitfield:', l ++ print('Unrecognized command-line bitfield:', l) + else: + (name, value) = m.groups() + value = int(value, 0) + if not name in symbols: +- print 'Error: Unknown bitfield', name ++ print('Error: Unknown bitfield', name) + else: + # Don't bother printing a warning, since the command-line will + # normally be used to overwrite values in the .rcw file +@@ -510,7 +510,7 @@ def read_source_file(filename): + global options + + if not find_program('gcc'): +- print 'Could not find gcc in PATH' ++ print('Could not find gcc in PATH') + return None + + i = ['-I', '.'] # Always look in the current directory +@@ -521,7 +521,7 @@ def read_source_file(filename): + shell=False, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + ret = p.communicate() + if p.returncode != 0: +- print ret[1], ++ print(ret[1],) + return None + + return ret[0].splitlines() +@@ -532,13 +532,13 @@ def check_vars(): + global options + + if not 'size' in vars: +- print 'Error: "%size" variable must be specified' ++ print('Error: "%size" variable must be specified') + sys.exit(1) + + if options.pbl: + if 'pbiformat' in vars and int(vars['pbiformat'], 0) == 2: + if 'sysaddr' in vars: +- print 'Error: PBL format does not use %sysaddr' ++ print('Error: PBL format does not use %sysaddr') + sys.exit(1) + #if 'pbladdr' in vars: + # print 'Error: PBL format does not use %pbladdr' +@@ -546,7 +546,7 @@ def check_vars(): + else: + # If we want the PBL header/footer, the vars for those must be defined + if not 'sysaddr' in vars: +- print 'Error: PBL format requires %sysaddr to be defined' ++ print('Error: PBL format requires %sysaddr to be defined') + sys.exit(1) + + # Create a .bin file +@@ -581,7 +581,7 @@ def create_binary(): + dont64bswapcrc = 0 + if 'dont64bswapcrc' in vars and int(vars['dont64bswapcrc'], 0): + dont64bswapcrc = 1 +- bits = 0L ++ bits = 0 + + # Magic hack. If a pbi is specified and we didn't set the size, + # set it for the new format! +@@ -593,7 +593,7 @@ def create_binary(): + pbilen += 2 + assignments['PBI_LENGTH'] = pbilen + +- for n, v in assignments.iteritems(): ++ for n, v in assignments.items(): + # n = name of symbol + # v = value to assign + bb, ee = symbols[n] # First bit and last bit +@@ -603,13 +603,13 @@ def create_binary(): + + # Make sure it's not too large + if v >= (1 << s): +- print 'Error: Value', v, 'is too large for field', n ++ print('Error: Value', v, 'is too large for field', n) + continue + + # If we treat the bitfield as "classic" numbered, reverse + # the value before adding it! + if b != bb: +- v = int(bin(v)[2:].zfill(s)[::-1], 2) ++ v = int(bin(int(v))[2:].zfill(s)[::-1], 2) + + # Set the bits. We assume that bits [b:e] are already zero. They can be + # non-zero only if we have overlapping bitfield definitions, which we +@@ -617,7 +617,7 @@ def create_binary(): + bits += v << ((size - 1) - e) + + # Generate the binary. First, apply the preamble, if requested +- binary = '' ++ binary = b'' + if options.pbl: + # Starting with LS2, we have a larger field and a different + # format. +@@ -626,7 +626,7 @@ def create_binary(): + # Load RCW command + binary += struct.pack(endianess + 'L', 0x80100000) + else: +- length_byte = (((size / 8) & 63) << 1) | 1 ++ length_byte = (((size // 8) & 63) << 1) | 1 + binary += struct.pack(endianess + 'L', (length_byte << 24) | (int(vars['sysaddr'], 16) & 0x00ffffff)) + + # Then convert 'bits' into an array of bytes +@@ -634,7 +634,7 @@ def create_binary(): + byte = bits >> i & 0xff + if classicbitnumbers: + byte = int(bin(byte)[2:].zfill(8)[::-1], 2) +- binary += chr(byte) ++ binary += bytes([byte]) + + if options.pbl: + if pbiformat == 2: +@@ -672,11 +672,11 @@ def create_binary(): + # Precise bit any byte ordering of the CRC calculation is + # not clearly specified. This is empirical. + if classicbitnumbers: +- newcrcbinary = '' ++ newcrcbinary = b'' + for c in crcbinary: +- byte = ord(c) ++ byte = int(c) + byte = int(bin(byte)[2:].zfill(8)[::-1], 2) +- newcrcbinary += chr(byte) ++ newcrcbinary += bytes([byte]) + crcbinary = newcrcbinary + + # Calculate and add the CRC +@@ -693,7 +693,7 @@ def create_binary(): + l = len(binary) + if dont64bswapcrc and options.pbl: + l -= 8 +- newbinary = '' ++ newbinary = b'' + for i in range(0, l, 8): + x64 = struct.unpack('>Q', binary[i:i + 8])[0] + newbinary += struct.pack(' 0: + l = len(pbi) +@@ -953,7 +953,7 @@ def create_source(): + if cnt == 0: + cnt = 64 + if i + cnt >= l: +- print 'Error in write 0x%08x at offset %d within PBI\n' % (word, i) ++ print('Error in write 0x%08x at offset %d within PBI\n' % (word, i)) + if (addr & 0x00ffff00 == pbladdr): + arg1 = struct.unpack(endianess + 'L', pbi[i:i+4])[0] + i += 4 +@@ -986,8 +986,8 @@ def create_source(): + + return source + +-if (sys.version_info < (2,6)) or (sys.version_info >= (3,0)): +- print 'Only Python versions 2.6 or 2.7 are supported.' ++if (sys.version_info < (3,0)): ++ print('Only Python versions 3.0+ are supported.') + sys.exit(1) + + # Make all 'print' statements output to stderr instead of stdout +-- +2.7.4 + diff --git a/package/kernel/lantiq/ltq-adsl-fw/Makefile b/package/kernel/lantiq/ltq-adsl-fw/Makefile index 5775d0cf50..66f91a991e 100644 --- a/package/kernel/lantiq/ltq-adsl-fw/Makefile +++ b/package/kernel/lantiq/ltq-adsl-fw/Makefile @@ -13,7 +13,7 @@ PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/ltq-dsl-fw-$(PKG_VERSION) PKG_SOURCE:=ltq-dsl-fw-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/ +PKG_SOURCE_URL:=https://sources.openwrt.org/ PKG_HASH:=28676d41c4b76e5bf7a2c5eae106a61fb96b93eabc0cb71120575fff9997269f PKG_MAINTAINER:=John Crispin @@ -45,8 +45,8 @@ endef define Package/kmod-ltq-adsl-$(BUILD_VARIANT)/install $(INSTALL_DIR) $(1)/lib/firmware/ - $(CP) $(PKG_BUILD_DIR)/$(FW_NAME)/ltq-dsl-fw-$(ANNEX)-$(SOC).bin $(1)/lib/firmware/ - ln -s /lib/firmware/$(FW_NAME)/ltq-dsl-fw-$(ANNEX)-$(SOC).bin $(1)/lib/firmware/adsl.bin + $(CP) $(PKG_BUILD_DIR)/ltq-dsl-fw-$(ANNEX)-$(SOC).bin $(1)/lib/firmware/ + ln -s /lib/firmware/ltq-dsl-fw-$(ANNEX)-$(SOC).bin $(1)/lib/firmware/adsl.bin endef $(eval $(call BuildPackage,kmod-ltq-adsl-danube-fw-a)) diff --git a/package/kernel/lantiq/ltq-adsl-mei/Makefile b/package/kernel/lantiq/ltq-adsl-mei/Makefile index 08e5775771..31e671e53f 100644 --- a/package/kernel/lantiq/ltq-adsl-mei/Makefile +++ b/package/kernel/lantiq/ltq-adsl-mei/Makefile @@ -8,7 +8,6 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ltq-adsl-mei PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/ltq-adsl-mei-$(BUILD_VARIANT)/ PKG_MAINTAINER:=John Crispin PKG_CHECK_FORMAT_SECURITY:=0 diff --git a/package/kernel/lantiq/ltq-adsl/Config.in b/package/kernel/lantiq/ltq-adsl/Config.in index 6d9caf4419..8ae65d373a 100644 --- a/package/kernel/lantiq/ltq-adsl/Config.in +++ b/package/kernel/lantiq/ltq-adsl/Config.in @@ -1,5 +1,5 @@ -config LANTIQ_DSL_DEBUG +config LANTIQ_ADSL_DEBUG bool "verbose debugging" - depends on PACKAGE_kmod-ltq-dsl + depends on PACKAGE_kmod-ltq-adsl help - Say Y, if you need ltq-dsl to display debug messages. + Say Y, if you need ltq-adsl to display debug messages. diff --git a/package/kernel/lantiq/ltq-adsl/Makefile b/package/kernel/lantiq/ltq-adsl/Makefile index 0fbda34ff9..1a9128fc58 100644 --- a/package/kernel/lantiq/ltq-adsl/Makefile +++ b/package/kernel/lantiq/ltq-adsl/Makefile @@ -10,15 +10,14 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ltq-adsl PKG_VERSION:=3.24.4.4 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=drv_dsl_cpe_api_danube-$(PKG_VERSION).tar.gz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/ltq-dsl-$(BUILD_VARIANT)/drv_dsl_cpe_api-$(PKG_VERSION) -PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/ +PKG_SOURCE_URL:=https://mirror2.openwrt.org/sources/ PKG_HASH:=eb2ed59715d3bf4e8a1460bbbe2f1660039e0a9f9d72afb1b2b16590094eb33c PKG_MAINTAINER:=John Crispin PKG_CHECK_FORMAT_SECURITY:=0 -PKG_ASLR_PIE:=0 PKG_FIXUP:=autoreconf include $(INCLUDE_DIR)/package.mk @@ -39,7 +38,7 @@ KernelPackage/ltq-adsl-danube=$(call KernelPackage/ltq-adsl-template,danube,(TAR KernelPackage/ltq-adsl-ar9=$(call KernelPackage/ltq-adsl-template,ar9,TARGET_lantiq_xway) KernelPackage/ltq-adsl-ase=$(call KernelPackage/ltq-adsl-template,ase,TARGET_lantiq_ase) -define KernelPackage/ltq-dsl/config +define KernelPackage/ltq-adsl/config source "$(SOURCE)/Config.in" endef @@ -76,7 +75,7 @@ CONFIGURE_ARGS += --enable-add-drv-cflags="-DMODULE -DCONFIG_$(CONFIG_TAG_$(BUIL CONFIGURE_ARGS += --enable-danube -ifeq ($(CONFIG_LANTIQ_DSL_DEBUG),y) +ifeq ($(CONFIG_LANTIQ_ADSL_DEBUG),y) CONFIGURE_ARGS += \ --enable-debug=yes \ --enable-debug-prints=yes diff --git a/package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch b/package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch index 431ccb6ebc..1e860010e9 100644 --- a/package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch +++ b/package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch @@ -82,7 +82,28 @@ if ( (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API) || (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API_G997) || (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API_PM) || -@@ -1058,6 +1065,7 @@ static void DSL_DRV_DebugInit(void) +@@ -828,12 +835,19 @@ DSL_int32_t DSL_DRV_ThreadShutdown( + + DSL_uint32_t DSL_DRV_SysTimeGet(DSL_uint32_t nOffset) + { +- struct timeval tv; + DSL_uint32_t nTime = 0; ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)) ++ struct timeval tv; + + memset(&tv, 0, sizeof(tv)); + do_gettimeofday(&tv); + nTime = (DSL_uint32_t)tv.tv_sec; ++#else ++ struct timespec64 now; ++ ++ ktime_get_real_ts64(&now); ++ nTime = (DSL_uint32_t)now.tv_sec; ++#endif + + if ( (nOffset == 0) || (nOffset > nTime) ) + { +@@ -1058,6 +1072,7 @@ static void DSL_DRV_DebugInit(void) /* Entry point of driver */ int __init DSL_ModuleInit(void) { @@ -90,7 +111,7 @@ DSL_int_t i; printk(DSL_DRV_CRLF DSL_DRV_CRLF "Infineon CPE API Driver version: %s" DSL_DRV_CRLF, -@@ -1104,7 +1112,8 @@ int __init DSL_ModuleInit(void) +@@ -1104,7 +1119,8 @@ int __init DSL_ModuleInit(void) } DSL_DRV_DevNodeInit(); @@ -137,7 +158,7 @@ #ifdef INCLUDE_DSL_CPE_API_IFXOS_SUPPORT /** IFXOS includes*/ --- /dev/null -+++ b/src/ifxmips_mei_interface.h ++++ b/src/include/ifxmips_mei_interface.h @@ -0,0 +1,702 @@ +/****************************************************************************** + diff --git a/package/kernel/lantiq/ltq-adsl/patches/120-platform.patch b/package/kernel/lantiq/ltq-adsl/patches/120-platform.patch index 20c1ccf471..e1dc254ec0 100644 --- a/package/kernel/lantiq/ltq-adsl/patches/120-platform.patch +++ b/package/kernel/lantiq/ltq-adsl/patches/120-platform.patch @@ -1,14 +1,15 @@ --- a/src/common/drv_dsl_cpe_os_linux.c +++ b/src/common/drv_dsl_cpe_os_linux.c -@@ -12,6 +12,7 @@ +@@ -11,7 +11,7 @@ + #ifdef __LINUX__ #define DSL_INTERN - #include -+#include +-#include ++#include #include "drv_dsl_cpe_api.h" #include "drv_dsl_cpe_api_ioctl.h" -@@ -1063,7 +1064,7 @@ static void DSL_DRV_DebugInit(void) +@@ -1070,7 +1070,7 @@ static void DSL_DRV_DebugInit(void) #endif /* Entry point of driver */ @@ -17,7 +18,7 @@ { struct class *dsl_class; DSL_int_t i; -@@ -1117,7 +1118,7 @@ int __init DSL_ModuleInit(void) +@@ -1124,7 +1124,7 @@ int __init DSL_ModuleInit(void) return 0; } @@ -26,7 +27,7 @@ { printk("Module will be unloaded"DSL_DRV_CRLF); -@@ -1132,7 +1133,7 @@ void __exit DSL_ModuleCleanup(void) +@@ -1139,7 +1139,7 @@ void __exit DSL_ModuleCleanup(void) (DSL_uint8_t**)&g_BndFpgaBase); #endif /* defined(INCLUDE_DSL_CPE_API_VINAX) && defined(INCLUDE_DSL_BONDING)*/ @@ -35,7 +36,7 @@ } #ifndef _lint -@@ -1148,8 +1149,30 @@ module_param(debug_level, byte, 0); +@@ -1155,8 +1155,30 @@ module_param(debug_level, byte, 0); MODULE_PARM_DESC(debug_level, "set to get more (1) or fewer (4) debug outputs"); #endif /* #ifndef DSL_DEBUG_DISABLE*/ diff --git a/package/kernel/lantiq/ltq-adsl/patches/130-linux3.8.patch b/package/kernel/lantiq/ltq-adsl/patches/130-linux3.8.patch index 3e2d8dcc2a..93c2f67796 100644 --- a/package/kernel/lantiq/ltq-adsl/patches/130-linux3.8.patch +++ b/package/kernel/lantiq/ltq-adsl/patches/130-linux3.8.patch @@ -5,10 +5,10 @@ #define DSL_INTERN +#include - #include - #include + #include -@@ -40,7 +41,7 @@ static DSL_ssize_t DSL_DRV_Write(DSL_DRV + #include "drv_dsl_cpe_api.h" +@@ -39,7 +40,7 @@ static DSL_ssize_t DSL_DRV_Write(DSL_DRV static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_inode_t * pINode, DSL_DRV_file_t * pFile, DSL_uint_t nCommand, unsigned long nArg); #else @@ -17,7 +17,7 @@ DSL_uint_t nCommand, unsigned long nArg); #endif static int DSL_DRV_Open(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil); -@@ -184,7 +185,7 @@ static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_ +@@ -183,7 +184,7 @@ static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_ DSL_uint_t nCommand, unsigned long nArg) #else @@ -26,7 +26,7 @@ DSL_DRV_file_t * pFile, DSL_uint_t nCommand, unsigned long nArg) -@@ -521,9 +522,9 @@ DSL_void_t* DSL_IoctlMemCpyTo( +@@ -520,9 +521,9 @@ DSL_void_t* DSL_IoctlMemCpyTo( - IFX_SUCCESS on success - IFX_ERROR on error */ @@ -38,7 +38,7 @@ DSL_int32_t retVal = -1; #ifndef _lint -@@ -546,30 +547,6 @@ DSL_DRV_STATIC DSL_int32_t DSL_DRV_Kerne +@@ -545,30 +546,6 @@ DSL_DRV_STATIC DSL_int32_t DSL_DRV_Kerne (DSL_NULL, "ENTER - Kernel Thread Startup <%s>" DSL_DRV_CRLF, pThrCntrl->thrParams.pName)); @@ -69,7 +69,7 @@ /*DSL_DRV_ThreadPriorityModify(pThrCntrl->nPriority);*/ pThrCntrl->thrParams.bRunning = 1; -@@ -639,9 +616,7 @@ DSL_int32_t DSL_DRV_ThreadInit( +@@ -638,9 +615,7 @@ DSL_int32_t DSL_DRV_ThreadInit( init_completion(&pThrCntrl->thrCompletion); /* start kernel thread via the wrapper function */ @@ -80,7 +80,7 @@ pThrCntrl->bValid = DSL_TRUE; -@@ -1064,12 +1039,12 @@ static void DSL_DRV_DebugInit(void) +@@ -1070,12 +1045,12 @@ static void DSL_DRV_DebugInit(void) #endif /* Entry point of driver */ @@ -95,7 +95,7 @@ &(dsl_cpe_api_version[4])); DSL_DRV_MemSet( ifxDevices, 0, sizeof(DSL_devCtx_t) * DSL_DRV_MAX_DEVICE_NUMBER ); -@@ -1118,7 +1093,7 @@ static int __devinit ltq_adsl_probe(stru +@@ -1124,7 +1099,7 @@ static int __devinit ltq_adsl_probe(stru return 0; } @@ -104,7 +104,7 @@ { printk("Module will be unloaded"DSL_DRV_CRLF); -@@ -1163,7 +1138,7 @@ MODULE_DEVICE_TABLE(of, ltq_adsl_match); +@@ -1169,7 +1144,7 @@ MODULE_DEVICE_TABLE(of, ltq_adsl_match); static struct platform_driver ltq_adsl_driver = { .probe = ltq_adsl_probe, diff --git a/package/kernel/lantiq/ltq-atm/Makefile b/package/kernel/lantiq/ltq-atm/Makefile index 5d63983d2c..455d7b25e3 100644 --- a/package/kernel/lantiq/ltq-atm/Makefile +++ b/package/kernel/lantiq/ltq-atm/Makefile @@ -8,7 +8,6 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ltq-atm PKG_RELEASE:=2 -PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/ltq-atm-$(BUILD_VARIANT) PKG_MAINTAINER:=John Crispin PKG_LICENSE:=GPL-2.0+ diff --git a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_amazon_se.c b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_amazon_se.c index 01a2e30abd..8777418dc5 100644 --- a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_amazon_se.c +++ b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_amazon_se.c @@ -40,6 +40,7 @@ #include #include #include +#include #include /* @@ -80,7 +81,7 @@ */ static inline void init_pmu(void); static inline void uninit_pmu(void); -static inline void reset_ppe(void); +static inline void reset_ppe(struct platform_device *pdev); static inline void init_ema(void); static inline void init_mailbox(void); static inline void init_atm_tc(void); @@ -136,7 +137,7 @@ static inline void uninit_pmu(void) //PPE_TOP_PMU_SETUP(IFX_PMU_DISABLE);*/ } -static inline void reset_ppe(void) +static inline void reset_ppe(struct platform_device *pdev) { #if 0 //MODULE unsigned int etop_cfg; @@ -262,11 +263,11 @@ extern void ase_fw_ver(unsigned int *major, unsigned int *minor) *minor = FW_VER_ID->minor; } -void ase_init(void) +void ase_init(struct platform_device *pdev) { init_pmu(); - reset_ppe(); + reset_ppe(pdev); init_ema(); diff --git a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ar9.c b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ar9.c index b68848b22d..2100aea81e 100644 --- a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ar9.c +++ b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ar9.c @@ -40,6 +40,7 @@ #include #include #include +#include #include /* @@ -83,7 +84,7 @@ */ static inline void init_pmu(void); static inline void uninit_pmu(void); -static inline void reset_ppe(void); +static inline void reset_ppe(struct platform_device *pdev); static inline void init_ema(void); static inline void init_mailbox(void); static inline void clear_share_buffer(void); @@ -125,7 +126,7 @@ static inline void uninit_pmu(void) { } -static inline void reset_ppe(void) +static inline void reset_ppe(struct platform_device *pdev) { #ifdef MODULE // reset PPE @@ -193,10 +194,10 @@ void ar9_fw_ver(unsigned int *major, unsigned int *minor) *minor = FW_VER_ID->minor; } -void ar9_init(void) +void ar9_init(struct platform_device *pdev) { init_pmu(); - reset_ppe(); + reset_ppe(pdev); init_ema(); init_mailbox(); clear_share_buffer(); diff --git a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_core.h b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_core.h index 398be7d828..31b80cf86f 100644 --- a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_core.h +++ b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_core.h @@ -34,7 +34,7 @@ #define SET_BITS(x, msb, lsb, value) (((x) & ~(((1 << ((msb) + 1)) - 1) ^ ((1 << (lsb)) - 1))) | (((value) & ((1 << (1 + (msb) - (lsb))) - 1)) << (lsb))) struct ltq_atm_ops { - void (*init)(void); + void (*init)(struct platform_device *pdev); void (*shutdown)(void); int (*start)(int pp32); diff --git a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_danube.c b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_danube.c index 9bab5b4a98..8302ae743a 100644 --- a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_danube.c +++ b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_danube.c @@ -40,6 +40,7 @@ #include #include #include +#include #include /* @@ -61,7 +62,7 @@ #define EMA_WRITE_BURST 0x2 #define EMA_READ_BURST 0x2 -static inline void reset_ppe(void); +static inline void reset_ppe(struct platform_device *pdev); #define IFX_PMU_MODULE_PPE_SLL01 BIT(19) #define IFX_PMU_MODULE_PPE_TC BIT(21) @@ -70,7 +71,7 @@ static inline void reset_ppe(void); #define IFX_PMU_MODULE_TPE BIT(13) #define IFX_PMU_MODULE_DSL_DFE BIT(9) -static inline void reset_ppe(void) +static inline void reset_ppe(struct platform_device *pdev) { /*#ifdef MODULE unsigned int etop_cfg; @@ -140,7 +141,7 @@ static void danube_fw_ver(unsigned int *major, unsigned int *minor) *minor = FW_VER_ID->minor; } -static void danube_init(void) +static void danube_init(struct platform_device *pdev) { volatile u32 *p = SB_RAM0_ADDR(0); unsigned int i; @@ -152,7 +153,7 @@ static void danube_init(void) IFX_PMU_MODULE_TPE | IFX_PMU_MODULE_DSL_DFE); - reset_ppe(); + reset_ppe(pdev); /* init ema */ IFX_REG_W32((EMA_CMD_BUF_LEN << 16) | (EMA_CMD_BASE_ADDR >> 2), EMA_CMDCFG); diff --git a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_vr9.c b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_vr9.c index 89c71e37e6..8638b12b4e 100644 --- a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_vr9.c +++ b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_vr9.c @@ -40,6 +40,8 @@ #include #include #include +#include +#include #include #include "ifxmips_atm_core.h" @@ -56,21 +58,46 @@ #define IFX_PMU_MODULE_AHBS BIT(13) #define IFX_PMU_MODULE_DSL_DFE BIT(9) -static inline void vr9_reset_ppe(void) +static inline void vr9_reset_ppe(struct platform_device *pdev) { -/*#ifdef MODULE - // reset PPE - ifx_rcu_rst(IFX_RCU_DOMAIN_DSLDFE, IFX_RCU_MODULE_ATM); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) + struct device *dev = &pdev->dev; + struct reset_control *dsp; + struct reset_control *dfe; + struct reset_control *tc; + + dsp = devm_reset_control_get(dev, "dsp"); + if (IS_ERR(dsp)) { + if (PTR_ERR(dsp) != -EPROBE_DEFER) + dev_err(dev, "Failed to lookup dsp reset\n"); +// return PTR_ERR(dsp); + } + + dfe = devm_reset_control_get(dev, "dfe"); + if (IS_ERR(dfe)) { + if (PTR_ERR(dfe) != -EPROBE_DEFER) + dev_err(dev, "Failed to lookup dfe reset\n"); +// return PTR_ERR(dfe); + } + + tc = devm_reset_control_get(dev, "tc"); + if (IS_ERR(tc)) { + if (PTR_ERR(tc) != -EPROBE_DEFER) + dev_err(dev, "Failed to lookup tc reset\n"); +// return PTR_ERR(tc); + } + + reset_control_assert(dsp); udelay(1000); - ifx_rcu_rst(IFX_RCU_DOMAIN_DSLTC, IFX_RCU_MODULE_ATM); + reset_control_assert(dfe); udelay(1000); - ifx_rcu_rst(IFX_RCU_DOMAIN_PPE, IFX_RCU_MODULE_ATM); + reset_control_assert(tc); udelay(1000); *PP32_SRST &= ~0x000303CF; udelay(1000); *PP32_SRST |= 0x000303CF; udelay(1000); -#endif*/ +#endif } static inline int vr9_pp32_download_code(int pp32, u32 *code_src, unsigned int code_dword_len, u32 *data_src, unsigned int data_dword_len) @@ -107,7 +134,7 @@ static void vr9_fw_ver(unsigned int *major, unsigned int *minor) *minor = FW_VER_ID->minor; } -static void vr9_init(void) +static void vr9_init(struct platform_device *pdev) { volatile u32 *p; unsigned int i; @@ -120,7 +147,7 @@ static void vr9_init(void) IFX_PMU_MODULE_AHBS | IFX_PMU_MODULE_DSL_DFE); - vr9_reset_ppe(); + vr9_reset_ppe(pdev); /* pdma init */ IFX_REG_W32(0x08, PDMA_CFG); diff --git a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c index b7ac81ca80..267a515df6 100644 --- a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c +++ b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c @@ -289,9 +289,17 @@ static int ppe_ioctl(struct atm_dev *dev, unsigned int cmd, void *arg) return -ENOTTY; if ( _IOC_DIR(cmd) & _IOC_READ ) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) + ret = !access_ok(arg, _IOC_SIZE(cmd)); +#else ret = !access_ok(VERIFY_WRITE, arg, _IOC_SIZE(cmd)); +#endif else if ( _IOC_DIR(cmd) & _IOC_WRITE ) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) + ret = !access_ok(arg, _IOC_SIZE(cmd)); +#else ret = !access_ok(VERIFY_READ, arg, _IOC_SIZE(cmd)); +#endif if ( ret ) return -EFAULT; @@ -1777,7 +1785,7 @@ static int ltq_atm_probe(struct platform_device *pdev) goto INIT_PRIV_DATA_FAIL; } - ops->init(); + ops->init(pdev); init_rx_tables(); init_tx_tables(); diff --git a/package/kernel/lantiq/ltq-deu/Makefile b/package/kernel/lantiq/ltq-deu/Makefile index af299d8883..7bc9e8532d 100644 --- a/package/kernel/lantiq/ltq-deu/Makefile +++ b/package/kernel/lantiq/ltq-deu/Makefile @@ -8,7 +8,6 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ltq-deu PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/ltq-deu-$(BUILD_VARIANT) PKG_MAINTAINER:=John Crispin PKG_LICENSE:=GPL-2.0+ diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_md5.c b/package/kernel/lantiq/ltq-deu/src/ifxmips_md5.c index 55cea1ccee..11cb64799e 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_md5.c +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_md5.c @@ -270,7 +270,7 @@ static struct shash_alg ifxdeu_md5_alg = { .cra_name = "md5", .cra_driver_name= "ifxdeu-md5", .cra_priority = 300, - .cra_flags = CRYPTO_ALG_TYPE_DIGEST, + .cra_flags = CRYPTO_ALG_TYPE_HASH, .cra_blocksize = MD5_HMAC_BLOCK_SIZE, .cra_module = THIS_MODULE, } diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_md5_hmac.c b/package/kernel/lantiq/ltq-deu/src/ifxmips_md5_hmac.c index 46797c9724..6cb2e5a417 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_md5_hmac.c +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_md5_hmac.c @@ -346,7 +346,7 @@ static struct shash_alg ifxdeu_md5_hmac_alg = { .cra_driver_name= "ifxdeu-md5_hmac", .cra_priority = 400, .cra_ctxsize = sizeof(struct md5_hmac_ctx), - .cra_flags = CRYPTO_ALG_TYPE_DIGEST, + .cra_flags = CRYPTO_ALG_TYPE_HASH, .cra_blocksize = MD5_HMAC_BLOCK_SIZE, .cra_module = THIS_MODULE, } diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c index 968dc6fb68..d711c4804d 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c @@ -259,7 +259,7 @@ static struct shash_alg ifxdeu_sha1_alg = { .cra_name = "sha1", .cra_driver_name= "ifxdeu-sha1", .cra_priority = 300, - .cra_flags = CRYPTO_ALG_TYPE_DIGEST, + .cra_flags = CRYPTO_ALG_TYPE_HASH, .cra_blocksize = SHA1_HMAC_BLOCK_SIZE, .cra_module = THIS_MODULE, } diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c index 791b966755..7776c51686 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c @@ -334,7 +334,7 @@ static struct shash_alg ifxdeu_sha1_hmac_alg = { .cra_driver_name= "ifxdeu-sha1_hmac", .cra_priority = 400, .cra_ctxsize = sizeof(struct sha1_hmac_ctx), - .cra_flags = CRYPTO_ALG_TYPE_DIGEST, + .cra_flags = CRYPTO_ALG_TYPE_HASH, .cra_blocksize = SHA1_HMAC_BLOCK_SIZE, .cra_module = THIS_MODULE, } diff --git a/package/kernel/lantiq/ltq-ifxos/Makefile b/package/kernel/lantiq/ltq-ifxos/Makefile index 4771fda20a..4a368309d3 100644 --- a/package/kernel/lantiq/ltq-ifxos/Makefile +++ b/package/kernel/lantiq/ltq-ifxos/Makefile @@ -17,7 +17,6 @@ PKG_MAINTAINER:=John Crispin PKG_LICENSE:=GPL-2.0 BSD-2-Clause PKG_LICENSE_FILES:=LICENSE -PKG_ASLR_PIE:=0 PKG_FIXUP:=autoreconf include $(INCLUDE_DIR)/package.mk diff --git a/package/kernel/lantiq/ltq-ifxos/patches/200-Fix-app-compilation-failure-from-inclusion-of-wrong-.patch b/package/kernel/lantiq/ltq-ifxos/patches/200-Fix-app-compilation-failure-from-inclusion-of-wrong-.patch index 5d661db861..453d85849b 100644 --- a/package/kernel/lantiq/ltq-ifxos/patches/200-Fix-app-compilation-failure-from-inclusion-of-wrong-.patch +++ b/package/kernel/lantiq/ltq-ifxos/patches/200-Fix-app-compilation-failure-from-inclusion-of-wrong-.patch @@ -32,7 +32,7 @@ Compiling against glibc can fail with the following errors ^ Makefile:1945: recipe for target 'libifxos_a-ifxos_linux_device_access_appl.o' failed -Ref: https://bugs.lede-project.org/index.php?do=details&task_id=1196 +Ref: https://bugs.openwrt.org/index.php?do=details&task_id=1196 --- src/Makefile.am | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/package/kernel/lantiq/ltq-ptm/Makefile b/package/kernel/lantiq/ltq-ptm/Makefile index 13831a2b6f..8f4db69411 100644 --- a/package/kernel/lantiq/ltq-ptm/Makefile +++ b/package/kernel/lantiq/ltq-ptm/Makefile @@ -8,8 +8,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ltq-ptm -PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/ltq-ptm-$(BUILD_VARIANT) +PKG_RELEASE:=2 PKG_MAINTAINER:=John Crispin PKG_LICENSE:=GPL-2.0+ diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c index 43e171a2b4..186c848693 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c @@ -44,6 +44,8 @@ #include #include #include +#include +#include #include /* @@ -1448,6 +1450,19 @@ static int ptm_showtime_exit(void) } +static const struct of_device_id ltq_ptm_match[] = { +#ifdef CONFIG_DANUBE + { .compatible = "lantiq,ppe-danube", .data = NULL }, +#elif defined CONFIG_AMAZON_SE + { .compatible = "lantiq,ppe-ase", .data = NULL }, +#elif defined CONFIG_AR9 + { .compatible = "lantiq,ppe-arx100", .data = NULL }, +#elif defined CONFIG_VR9 + { .compatible = "lantiq,ppe-xrx200", .data = NULL }, +#endif + {}, +}; +MODULE_DEVICE_TABLE(of, ltq_ptm_match); /* * #################################### @@ -1465,7 +1480,7 @@ static int ptm_showtime_exit(void) * 0 --- successful * else --- failure, usually it is negative value of error code */ -static int ifx_ptm_init(void) +static int ltq_ptm_probe(struct platform_device *pdev) { int ret; struct port_cell_info port_cell = {0}; @@ -1481,7 +1496,7 @@ static int ifx_ptm_init(void) goto INIT_PRIV_DATA_FAIL; } - ifx_ptm_init_chip(); + ifx_ptm_init_chip(pdev); init_tables(); for ( i = 0; i < ARRAY_SIZE(g_net_dev); i++ ) { @@ -1570,7 +1585,7 @@ INIT_PRIV_DATA_FAIL: * Output: * none */ -static void __exit ifx_ptm_exit(void) +static int ltq_ptm_remove(struct platform_device *pdev) { int i; @@ -1595,7 +1610,20 @@ static void __exit ifx_ptm_exit(void) ifx_ptm_uninit_chip(); clear_priv_data(); + + return 0; } -module_init(ifx_ptm_init); -module_exit(ifx_ptm_exit); +static struct platform_driver ltq_ptm_driver = { + .probe = ltq_ptm_probe, + .remove = ltq_ptm_remove, + .driver = { + .name = "ptm", + .owner = THIS_MODULE, + .of_match_table = ltq_ptm_match, + }, +}; + +module_platform_driver(ltq_ptm_driver); + +MODULE_LICENSE("GPL"); diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.h b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.h index de307bf732..6d1cbc7ea3 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.h +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.h @@ -122,7 +122,7 @@ extern unsigned int ifx_ptm_dbg_enable; extern void ifx_ptm_get_fw_ver(unsigned int *major, unsigned int *minor); -extern void ifx_ptm_init_chip(void); +extern void ifx_ptm_init_chip(struct platform_device *pdev); extern void ifx_ptm_uninit_chip(void); extern int ifx_pp32_start(int pp32); diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_amazon_se.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_amazon_se.c index 077c900e27..81ed7f7805 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_amazon_se.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_amazon_se.c @@ -40,6 +40,8 @@ #include #include #include +#include +#include #include /* @@ -84,7 +86,7 @@ */ static inline void init_pmu(void); static inline void uninit_pmu(void); -static inline void reset_ppe(void); +static inline void reset_ppe(struct platform_device *pdev); static inline void init_ema(void); static inline void init_mailbox(void); static inline void init_atm_tc(void); @@ -129,7 +131,7 @@ static inline void uninit_pmu(void) //PPE_TOP_PMU_SETUP(IFX_PMU_DISABLE); } -static inline void reset_ppe(void) +static inline void reset_ppe(struct platform_device *pdev) { #ifdef MODULE unsigned int etop_cfg; @@ -260,11 +262,11 @@ extern void ifx_ptm_get_fw_ver(unsigned int *major, unsigned int *minor) *minor = FW_VER_ID->minor; } -void ifx_ptm_init_chip(void) +void ifx_ptm_init_chip(struct platform_device *pdev) { init_pmu(); - reset_ppe(); + reset_ppe(pdev); init_ema(); diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ar9.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ar9.c index 777d5cfc9b..2f108286e2 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ar9.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ar9.c @@ -40,6 +40,8 @@ #include #include #include +#include +#include #include /* @@ -80,7 +82,7 @@ */ static inline void init_pmu(void); static inline void uninit_pmu(void); -static inline void reset_ppe(void); +static inline void reset_ppe(struct platform_device *pdev); static inline void init_ema(void); static inline void init_mailbox(void); static inline void init_atm_tc(void); @@ -130,7 +132,7 @@ static inline void uninit_pmu(void) } -static inline void reset_ppe(void) +static inline void reset_ppe(struct platform_device *pdev) { #ifdef MODULE // reset PPE @@ -283,11 +285,11 @@ void ifx_ptm_get_fw_ver(unsigned int *major, unsigned int *minor) *minor = FW_VER_ID->minor; } -void ifx_ptm_init_chip(void) +void ifx_ptm_init_chip(struct platform_device *pdev) { init_pmu(); - reset_ppe(); + reset_ppe(pdev); init_ema(); diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_danube.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_danube.c index 279b03ba3a..47ee4110a3 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_danube.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_danube.c @@ -40,6 +40,8 @@ #include #include #include +#include +#include #include /* @@ -79,7 +81,7 @@ */ static inline void init_pmu(void); static inline void uninit_pmu(void); -static inline void reset_ppe(void); +static inline void reset_ppe(struct platform_device *pdev); static inline void init_ema(void); static inline void init_mailbox(void); static inline void init_atm_tc(void); @@ -125,7 +127,7 @@ static inline void uninit_pmu(void) IFX_PMU_MODULE_DSL_DFE); } -static inline void reset_ppe(void) +static inline void reset_ppe(struct platform_device *pdev) { #ifdef MODULE /*unsigned int etop_cfg; @@ -255,11 +257,11 @@ extern void ifx_ptm_get_fw_ver(unsigned int *major, unsigned int *minor) *minor = FW_VER_ID->minor; } -void ifx_ptm_init_chip(void) +void ifx_ptm_init_chip(struct platform_device *pdev) { init_pmu(); - reset_ppe(); + reset_ppe(pdev); init_ema(); diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c index 9cfeefd80e..46a52e29d8 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c @@ -33,6 +33,8 @@ #include #include #include +#include +#include #include "ifxmips_ptm_vdsl.h" #include @@ -334,6 +336,9 @@ static int ptm_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) dma_cache_wback((unsigned long)skb->data, skb->len); } + /* make the skb unowned */ + skb_orphan(skb); + *(struct sk_buff **)((unsigned int)skb->data - byteoff - sizeof(struct sk_buff *)) = skb; /* write back to physical memory */ dma_cache_wback((unsigned long)skb->data - byteoff - sizeof(struct sk_buff *), skb->len + byteoff + sizeof(struct sk_buff *)); @@ -971,9 +976,21 @@ static int ptm_showtime_exit(void) return 0; } +static const struct of_device_id ltq_ptm_match[] = { +#ifdef CONFIG_DANUBE + { .compatible = "lantiq,ppe-danube", .data = NULL }, +#elif defined CONFIG_AMAZON_SE + { .compatible = "lantiq,ppe-ase", .data = NULL }, +#elif defined CONFIG_AR9 + { .compatible = "lantiq,ppe-arx100", .data = NULL }, +#elif defined CONFIG_VR9 + { .compatible = "lantiq,ppe-xrx200", .data = NULL }, +#endif + {}, +}; +MODULE_DEVICE_TABLE(of, ltq_ptm_match); - -static int ifx_ptm_init(void) +static int ltq_ptm_probe(struct platform_device *pdev) { int ret; int i; @@ -986,7 +1003,7 @@ static int ifx_ptm_init(void) goto INIT_PRIV_DATA_FAIL; } - ifx_ptm_init_chip(); + ifx_ptm_init_chip(pdev); ret = init_tables(); if ( ret != 0 ) { err("INIT_TABLES_FAIL"); @@ -1068,7 +1085,7 @@ INIT_PRIV_DATA_FAIL: return ret; } -static void __exit ifx_ptm_exit(void) +static int ltq_ptm_remove(struct platform_device *pdev) { int i; ifx_mei_atm_showtime_enter = NULL; @@ -1092,6 +1109,8 @@ static void __exit ifx_ptm_exit(void) ifx_ptm_uninit_chip(); clear_priv_data(); + + return 0; } #ifndef MODULE @@ -1120,8 +1139,17 @@ static int __init queue_gamma_map_setup(char *line) return 0; } #endif -module_init(ifx_ptm_init); -module_exit(ifx_ptm_exit); +static struct platform_driver ltq_ptm_driver = { + .probe = ltq_ptm_probe, + .remove = ltq_ptm_remove, + .driver = { + .name = "ptm", + .owner = THIS_MODULE, + .of_match_table = ltq_ptm_match, + }, +}; + +module_platform_driver(ltq_ptm_driver); #ifndef MODULE __setup("wanqos_en=", wanqos_en_setup); __setup("queue_gamma_map=", queue_gamma_map_setup); diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h index b06232d0f8..c0318805c5 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h @@ -113,7 +113,7 @@ extern unsigned int ifx_ptm_dbg_enable; extern void ifx_ptm_get_fw_ver(unsigned int *major, unsigned int *minor); -extern void ifx_ptm_init_chip(void); +extern void ifx_ptm_init_chip(struct platform_device *pdev); extern void ifx_ptm_uninit_chip(void); extern int ifx_pp32_start(int pp32); diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c index 0a02569cef..cf0897b563 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c @@ -40,6 +40,8 @@ #include #include #include +#include +#include #include /* @@ -52,7 +54,7 @@ static inline void init_pmu(void); static inline void uninit_pmu(void); -static inline void reset_ppe(void); +static inline void reset_ppe(struct platform_device *pdev); static inline void init_pdma(void); static inline void init_mailbox(void); static inline void init_atm_tc(void); @@ -80,21 +82,46 @@ static inline void uninit_pmu(void) { } -static inline void reset_ppe(void) +static inline void reset_ppe(struct platform_device *pdev) { -/*#ifdef MODULE - // reset PPE - ifx_rcu_rst(IFX_RCU_DOMAIN_DSLDFE, IFX_RCU_MODULE_PTM); - udelay(1000); - ifx_rcu_rst(IFX_RCU_DOMAIN_DSLTC, IFX_RCU_MODULE_PTM); - udelay(1000); - ifx_rcu_rst(IFX_RCU_DOMAIN_PPE, IFX_RCU_MODULE_PTM); - udelay(1000); - *PP32_SRST &= ~0x000303CF; - udelay(1000); - *PP32_SRST |= 0x000303CF; - udelay(1000); -#endif*/ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) + struct device *dev = &pdev->dev; + struct reset_control *dsp; + struct reset_control *dfe; + struct reset_control *tc; + + dsp = devm_reset_control_get(dev, "dsp"); + if (IS_ERR(dsp)) { + if (PTR_ERR(dsp) != -EPROBE_DEFER) + dev_err(dev, "Failed to lookup dsp reset\n"); +// return PTR_ERR(dsp); + } + + dfe = devm_reset_control_get(dev, "dfe"); + if (IS_ERR(dfe)) { + if (PTR_ERR(dfe) != -EPROBE_DEFER) + dev_err(dev, "Failed to lookup dfe reset\n"); +// return PTR_ERR(dfe); + } + + tc = devm_reset_control_get(dev, "tc"); + if (IS_ERR(tc)) { + if (PTR_ERR(tc) != -EPROBE_DEFER) + dev_err(dev, "Failed to lookup tc reset\n"); +// return PTR_ERR(tc); + } + + reset_control_assert(dsp); + udelay(1000); + reset_control_assert(dfe); + udelay(1000); + reset_control_assert(tc); + udelay(1000); + *PP32_SRST &= ~0x000303CF; + udelay(1000); + *PP32_SRST |= 0x000303CF; + udelay(1000); +#endif } static inline void init_pdma(void) @@ -230,11 +257,11 @@ extern void ifx_ptm_get_fw_ver(unsigned int *major, unsigned int *minor) *minor = FW_VER_ID->minor; } -void ifx_ptm_init_chip(void) +void ifx_ptm_init_chip(struct platform_device *pdev) { init_pmu(); - reset_ppe(); + reset_ppe(pdev); init_pdma(); diff --git a/package/kernel/lantiq/ltq-tapi/Makefile b/package/kernel/lantiq/ltq-tapi/Makefile index 171103350e..072041c589 100644 --- a/package/kernel/lantiq/ltq-tapi/Makefile +++ b/package/kernel/lantiq/ltq-tapi/Makefile @@ -17,7 +17,6 @@ PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources PKG_HASH:=109374d52872716570fca3fef3b93c9a93159a804dfd42484b19152b825af5c0 PKG_MAINTAINER:=John Crispin -PKG_ASLR_PIE:=0 PKG_CHECK_FORMAT_SECURITY:=0 PKG_FIXUP:=autoreconf diff --git a/package/kernel/lantiq/ltq-tapi/patches/010-fix-compile.patch b/package/kernel/lantiq/ltq-tapi/patches/010-fix-compile.patch index 051e25d3ad..0407b38b6f 100644 --- a/package/kernel/lantiq/ltq-tapi/patches/010-fix-compile.patch +++ b/package/kernel/lantiq/ltq-tapi/patches/010-fix-compile.patch @@ -6,7 +6,7 @@ #include +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) + #include -+ #include ++ #include +#endif #undef CONFIG_DEVFS_FS #ifndef UTS_RELEASE diff --git a/package/kernel/lantiq/ltq-tapi/patches/400-linux-415.patch b/package/kernel/lantiq/ltq-tapi/patches/400-linux-415.patch new file mode 100644 index 0000000000..cddb1b6553 --- /dev/null +++ b/package/kernel/lantiq/ltq-tapi/patches/400-linux-415.patch @@ -0,0 +1,48 @@ +--- a/src/drv_tapi_linux.c ++++ b/src/drv_tapi_linux.c +@@ -119,7 +119,11 @@ struct _TAPI_FD_PRIV_DATA + /* ============================= */ + /* Local Functions */ + /* ============================= */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + static IFX_void_t TAPI_timer_call_back (IFX_ulong_t arg); ++#else ++static IFX_void_t TAPI_timer_call_back (struct timer_list *t); ++#endif + #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)) + static IFX_void_t TAPI_tqueue (IFX_void_t *pWork); + #else /* for Kernel newer or equal 2.6.20 */ +@@ -3384,11 +3388,15 @@ Timer_ID TAPI_Create_Timer(TIMER_ENTRY p + pTimerData->nArgument = nArgument; + pTimerData->bStopped = IFX_FALSE; + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)) + init_timer(&(pTimerData->Timer_List)); + + /* set timer call back function */ + pTimerData->Timer_List.function = TAPI_timer_call_back; + pTimerData->Timer_List.data = (IFX_ulong_t) pTimerData; ++#else ++ timer_setup(&(pTimerData->Timer_List), TAPI_timer_call_back, 0); ++#endif + + /* Initialize Timer Task */ + #ifdef LINUX_2_6 +@@ -3529,9 +3537,17 @@ static IFX_void_t TAPI_tqueue (struct wo + + \param arg Pointer to corresponding timer ID. + */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + static IFX_void_t TAPI_timer_call_back (IFX_ulong_t arg) ++#else ++static IFX_void_t TAPI_timer_call_back (struct timer_list *t) ++#endif + { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + Timer_ID Timer = (Timer_ID) arg; ++#else ++ Timer_ID Timer = from_timer(Timer, t, Timer_List); ++#endif + /* do the operation in process context, + not in interrupt context */ + #ifdef LINUX_2_6 diff --git a/package/kernel/lantiq/ltq-vdsl-fw/Makefile b/package/kernel/lantiq/ltq-vdsl-fw/Makefile index 8186e657e7..336fc2e5e3 100644 --- a/package/kernel/lantiq/ltq-vdsl-fw/Makefile +++ b/package/kernel/lantiq/ltq-vdsl-fw/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ltq-vdsl-fw PKG_VERSION:=6.8.6 -PKG_RELEASE:=1 +PKG_RELEASE:=3 PKG_MAINTAINER:=Daniel Golle diff --git a/package/kernel/lantiq/ltq-vdsl-fw/src/vdsl_fw_install.sh b/package/kernel/lantiq/ltq-vdsl-fw/src/vdsl_fw_install.sh index 9242e175c0..e372e95c57 100755 --- a/package/kernel/lantiq/ltq-vdsl-fw/src/vdsl_fw_install.sh +++ b/package/kernel/lantiq/ltq-vdsl-fw/src/vdsl_fw_install.sh @@ -1,9 +1,9 @@ #!/bin/sh -FW="/tmp/firmware-speedport-w921v-1.44.000.bin" -URL="https://www.telekom.de/hilfe/downloads/firmware-speedport-w921v-1.44.000.bin" +FW="/tmp/firmware-speedport-w921v-1.46.000.bin" +URL="https://www.telekom.de/hilfe/downloads/firmware-speedport-w921v-1.46.000.bin" FW_TAPI="vr9_tapi_fw.bin" FW_DSL="vr9_dsl_fw_annex_b.bin" -MD5_FW="cefbeb7073e02e0fa4ddb6b31ecb3d1e" +MD5_FW="188734c0773b225f8c130984b279621a" MD5_TAPI="57f2d07f59e11250ce1219bad99c1eda" MD5_DSL="655442e31deaa42c9c68944869361ec0" diff --git a/package/kernel/lantiq/ltq-vdsl-fw/src/w921v_fw_cutter.c b/package/kernel/lantiq/ltq-vdsl-fw/src/w921v_fw_cutter.c index 6082bdadb6..8dc392914c 100644 --- a/package/kernel/lantiq/ltq-vdsl-fw/src/w921v_fw_cutter.c +++ b/package/kernel/lantiq/ltq-vdsl-fw/src/w921v_fw_cutter.c @@ -26,7 +26,7 @@ #include "LzmaWrapper.h" -#define FW_NAME "/tmp/firmware-speedport-w921v-1.44.000.bin" +#define FW_NAME "/tmp/firmware-speedport-w921v-1.46.000.bin" #define MAGIC 0x50 #define MAGIC_SZ 0x3FFC00 @@ -78,7 +78,7 @@ int main(int argc, char **argv) if (stat(FW_NAME, &s) != 0) { printf("Failed to find %s\n", FW_NAME); - printf("Ask Google or try https://www.telekom.de/hilfe/downloads/firmware-speedport-w921v-1.44.000.bin\n"); + printf("Ask Google or try https://www.telekom.de/hilfe/downloads/firmware-speedport-w921v-1.45.000.bin\n"); return -1; } diff --git a/package/kernel/lantiq/ltq-vdsl-mei/Makefile b/package/kernel/lantiq/ltq-vdsl-mei/Makefile index 9597de0072..5d15f2650b 100644 --- a/package/kernel/lantiq/ltq-vdsl-mei/Makefile +++ b/package/kernel/lantiq/ltq-vdsl-mei/Makefile @@ -22,8 +22,6 @@ PKG_MAINTAINER:=John Crispin PKG_LICENSE:=GPL-2.0 BSD-2-Clause PKG_LICENSE_FILES:=LICENSE -PKG_ASLR_PIE:=0 - include $(INCLUDE_DIR)/package.mk define KernelPackage/ltq-vdsl-vr9-mei @@ -40,7 +38,7 @@ define KernelPackage/ltq-vdsl-vr9-mei/description endef -define Package/ltq-vdsl-mei_test +define Package/ltq-vdsl-mei-test SECTION:=net CATEGORY:=Network TITLE:=Lantiq mei driver test tool @@ -48,7 +46,7 @@ define Package/ltq-vdsl-mei_test DEPENDS:=@TARGET_lantiq_xrx200 endef -define Package/ltq-vdsl-mei_test/description +define Package/ltq-vdsl-mei-test/description Userland tool to directly control the mei driver, this is only needed for test and development purposes. endef @@ -82,9 +80,9 @@ endef $(eval $(call KernelPackage,ltq-vdsl-vr9-mei)) -define Package/ltq-vdsl-mei_test/install +define Package/ltq-vdsl-mei-test/install $(INSTALL_DIR) $(1)/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mei_cpe_drv_test $(1)/bin endef -$(eval $(call BuildPackage,ltq-vdsl-mei_test)) +$(eval $(call BuildPackage,ltq-vdsl-mei-test)) diff --git a/package/kernel/lantiq/ltq-vdsl/Makefile b/package/kernel/lantiq/ltq-vdsl/Makefile index cf3711beb7..d518bd647d 100644 --- a/package/kernel/lantiq/ltq-vdsl/Makefile +++ b/package/kernel/lantiq/ltq-vdsl/Makefile @@ -19,7 +19,6 @@ PKG_HASH:=b4966a60653acc49254b168c6cc9c49eb36c54548e763617788aa4f252a29f21 PKG_LICENSE:=GPL-2.0 BSD-2-Clause PKG_LICENSE_FILES:=LICENSE -PKG_ASLR_PIE:=0 PKG_FIXUP:=autoreconf PKG_MAINTAINER:=John Crispin diff --git a/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch b/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch index a8ce61fa36..28d1da7c33 100644 --- a/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch +++ b/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch @@ -35,7 +35,28 @@ #endif if (pINode == DSL_NULL) -@@ -1203,6 +1197,9 @@ static void DSL_DRV_NlSendMsg(DSL_char_t +@@ -917,12 +911,19 @@ DSL_int32_t DSL_DRV_ThreadShutdown( + + DSL_uint32_t DSL_DRV_SysTimeGet(DSL_uint32_t nOffset) + { +- struct timeval tv; + DSL_uint32_t nTime = 0; ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)) ++ struct timeval tv; + + memset(&tv, 0, sizeof(tv)); + do_gettimeofday(&tv); + nTime = (DSL_uint32_t)tv.tv_sec; ++#else ++ struct timespec64 now; ++ ++ ktime_get_real_ts64(&now); ++ nTime = (DSL_uint32_t)now.tv_sec; ++#endif + + if ( (nOffset == 0) || (nOffset > nTime) ) + { +@@ -1203,6 +1204,9 @@ static void DSL_DRV_NlSendMsg(DSL_char_t } #endif @@ -45,7 +66,7 @@ /* Entry point of driver */ int __init DSL_ModuleInit(void) { -@@ -1241,6 +1238,10 @@ int __init DSL_ModuleInit(void) +@@ -1241,6 +1245,10 @@ int __init DSL_ModuleInit(void) DSL_DRV_DevNodeInit(); @@ -56,7 +77,7 @@ return 0; } -@@ -1248,6 +1249,11 @@ void __exit DSL_ModuleCleanup(void) +@@ -1248,6 +1256,11 @@ void __exit DSL_ModuleCleanup(void) { printk("Module will be unloaded"DSL_DRV_CRLF); diff --git a/package/kernel/lantiq/ltq-vmmc/Makefile b/package/kernel/lantiq/ltq-vmmc/Makefile index e44b509b2e..99263cce43 100644 --- a/package/kernel/lantiq/ltq-vmmc/Makefile +++ b/package/kernel/lantiq/ltq-vmmc/Makefile @@ -17,7 +17,6 @@ PKG_HASH:=707f515eb727c032418c4da67d7e86884bb56cdc2a606e8f6ded6057d8767e57 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources PKG_MAINTAINER:=John Crispin -PKG_ASLR_PIE:=0 PKG_CHECK_FORMAT_SECURITY:=0 PKG_FIXUP:=autoreconf From 9446333d6ecc84e474d80a736a93e23948d99f05 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sat, 25 Apr 2020 12:27:57 +0800 Subject: [PATCH 05/38] luci-app-sfe: drop outdated option --- package/lean/luci-app-sfe/luasrc/model/cbi/sfe.lua | 5 ----- package/lean/luci-app-sfe/po/zh-cn/sfe.po | 5 ----- package/lean/luci-app-sfe/root/etc/config/sfe | 1 - package/lean/luci-app-sfe/root/etc/init.d/sfe | 3 --- 4 files changed, 14 deletions(-) diff --git a/package/lean/luci-app-sfe/luasrc/model/cbi/sfe.lua b/package/lean/luci-app-sfe/luasrc/model/cbi/sfe.lua index eae4f2145e..7ebdc4749e 100644 --- a/package/lean/luci-app-sfe/luasrc/model/cbi/sfe.lua +++ b/package/lean/luci-app-sfe/luasrc/model/cbi/sfe.lua @@ -37,11 +37,6 @@ bbr.default = 0 bbr.rmempty = false bbr.description = translate("Bottleneck Bandwidth and Round-trip propagation time (BBR)") -aaaa = s:option(Flag, "filter_aaaa", translate("Filter AAAA")) -aaaa.default = 1 -aaaa.rmempty = false -aaaa.description = translate("Dnsmasq rejects IPv6 parsing and optimizes domestic complex dual-stack network") - dns = s:option(Flag, "dns", translate("DNS Acceleration")) dns.default = 0 dns.rmempty = false diff --git a/package/lean/luci-app-sfe/po/zh-cn/sfe.po b/package/lean/luci-app-sfe/po/zh-cn/sfe.po index 7d991d9a43..91fa321718 100644 --- a/package/lean/luci-app-sfe/po/zh-cn/sfe.po +++ b/package/lean/luci-app-sfe/po/zh-cn/sfe.po @@ -79,8 +79,3 @@ msgstr "支持dnsforwarder解析多个上游IPV6 DNS服务器,用','分隔( msgid "AdGuardHome's login username/passwd: AdGuardHome, web console addr: IP:3001" msgstr "AdGuardHome 网页控制台地址:IP:3001 登录账号/密码:AdGuardHome" -msgid "Filter AAAA" -msgstr "忽略域名的IPv6地址" - -msgid "Dnsmasq rejects IPv6 parsing and optimizes domestic complex dual-stack network" -msgstr "dnsmasq不返回ipv6解析结果,优化国内复杂双栈网络" diff --git a/package/lean/luci-app-sfe/root/etc/config/sfe b/package/lean/luci-app-sfe/root/etc/config/sfe index f1ebd3995d..b48624ca65 100644 --- a/package/lean/luci-app-sfe/root/etc/config/sfe +++ b/package/lean/luci-app-sfe/root/etc/config/sfe @@ -3,7 +3,6 @@ config sfe option ipv6 '0' option wifi '0' option bbr '0' - option filter_aaaa '1' option dns '0' option dnscache_enable '1' option dns_server '114.114.114.114,114.114.115.115,223.5.5.5,223.6.6.6,180.76.76.76,119.29.29.29,119.28.28.28,1.2.4.8,210.2.4.8' diff --git a/package/lean/luci-app-sfe/root/etc/init.d/sfe b/package/lean/luci-app-sfe/root/etc/init.d/sfe index bb787af93f..9b137f38ce 100755 --- a/package/lean/luci-app-sfe/root/etc/init.d/sfe +++ b/package/lean/luci-app-sfe/root/etc/init.d/sfe @@ -270,9 +270,6 @@ start_service() { sysctl -w net.ipv4.tcp_congestion_control=cubic fi - uci set dhcp.@dnsmasq[0].filter_aaaa=$(uci get sfe.@sfe[0].filter_aaaa) - uci commit dhcp - if [ "$DNSMASQ_RESTART" = N ]; then /etc/init.d/dnsmasq restart fi From aac401fc39eced5bbf337e5b845a606ee12ce6aa Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sat, 25 Apr 2020 18:29:43 +0800 Subject: [PATCH 06/38] lantiq: sync official source code --- .../files/lib/functions/migrations.sh | 39 + .../lantiq/ase/base-files/etc/board.d/01_leds | 32 + .../ase/base-files/etc/board.d/02_network | 56 ++ .../ase/base-files/lib/upgrade/platform.sh | 10 + target/linux/lantiq/ase/config-4.19 | 1 - .../lantiq/base-files/etc/board.d/02_network | 268 ------- .../base-files/etc/hotplug.d/dsl/pppoa.sh | 2 +- .../etc/uci-defaults/01_led_migration | 51 +- .../etc/uci-defaults/02_migrate_xdsl_iface | 1 - .../lantiq/base-files/lib/functions/lantiq.sh | 17 +- .../base-files/lib/functions/lantiq_dsl.sh | 32 +- .../lib/preinit/05_set_preinit_iface_lantiq | 2 - .../falcon/base-files/etc/board.d/02_network | 52 ++ .../falcon/base-files/lib/upgrade/platform.sh | 10 + .../arch/mips/boot/dts/lantiq}/amazonse.dtsi | 40 + .../dts/lantiq/amazonse_allnet_all0333cj.dts} | 4 - .../dts/lantiq/amazonse_netgear_dgn1000b.dts} | 18 - .../arch/mips/boot/dts/lantiq}/ar9.dtsi | 151 ++++ .../boot/dts/lantiq/ar9_avm_fritz7312.dts} | 26 +- .../boot/dts/lantiq/ar9_avm_fritz7320.dts} | 32 +- .../boot/dts/lantiq/ar9_bt_homehub-v3a.dts} | 36 +- .../dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts} | 0 .../boot/dts/lantiq/ar9_netgear_dgn3500.dts} | 2 +- .../boot/dts/lantiq/ar9_netgear_dgn3500.dtsi} | 34 +- .../boot/dts/lantiq/ar9_netgear_dgn3500b.dts} | 2 +- .../mips/boot/dts/lantiq/ar9_zte_h201l.dts} | 0 .../boot/dts/lantiq/ar9_zyxel_p-2601hn.dts} | 25 +- .../arch/mips/boot/dts/lantiq}/danube.dtsi | 80 ++ .../dts/lantiq/danube_arcadyan_arv4510pw.dts} | 23 +- .../lantiq/danube_arcadyan_arv4518pwr01.dts} | 2 +- .../lantiq/danube_arcadyan_arv4518pwr01.dtsi} | 18 +- .../lantiq/danube_arcadyan_arv4518pwr01a.dts} | 2 +- .../dts/lantiq/danube_arcadyan_arv4519pw.dts} | 0 .../dts/lantiq/danube_arcadyan_arv4520pw.dts} | 16 +- .../dts/lantiq/danube_arcadyan_arv4525pw.dts} | 16 +- .../dts/lantiq/danube_arcadyan_arv452cqw.dts} | 16 +- .../lantiq/danube_arcadyan_arv7506pw11.dts} | 9 +- .../lantiq/danube_arcadyan_arv7510pw22.dts} | 16 +- .../dts/lantiq/danube_arcadyan_arv7518pw.dts} | 17 +- .../dts/lantiq/danube_arcadyan_arv7519pw.dts} | 17 +- .../dts/lantiq/danube_arcadyan_arv7525pw.dts} | 8 +- .../dts/lantiq/danube_arcadyan_arv752dpw.dts} | 16 +- .../lantiq/danube_arcadyan_arv752dpw22.dts} | 16 +- .../lantiq/danube_arcadyan_arv8539pw22.dts} | 16 +- .../dts/lantiq/danube_audiocodes_mp-252.dts} | 7 +- .../dts/lantiq/danube_bt_homehub-v2b.dts} | 34 +- .../dts/lantiq/danube_lantiq_easy50712.dts} | 18 +- .../lantiq/danube_siemens_gigaset-sx76x.dts} | 12 - .../arch/mips/boot/dts/lantiq}/falcon.dtsi | 0 .../dts/lantiq/falcon_lantiq_easy88388.dts} | 2 +- .../dts/lantiq/falcon_lantiq_easy88444.dts} | 2 +- .../lantiq/falcon_lantiq_easy98000-nand.dts} | 3 +- .../lantiq/falcon_lantiq_easy98000-nor.dts} | 3 +- .../falcon_lantiq_easy98000-sflash.dts} | 6 +- .../dts/lantiq/falcon_lantiq_easy98000.dtsi} | 4 +- .../lantiq/falcon_lantiq_easy98020-v18.dts} | 2 +- .../dts/lantiq/falcon_lantiq_easy98020.dts} | 2 +- .../dts/lantiq/falcon_lantiq_easy98021.dts} | 2 +- .../lantiq/falcon_lantiq_easy98035synce.dts} | 2 +- .../falcon_lantiq_easy98035synce1588.dts} | 2 +- .../dts/lantiq/falcon_lantiq_falcon-mdu.dts} | 2 +- .../dts/lantiq/falcon_lantiq_falcon-sfp.dts} | 2 +- .../boot/dts/lantiq/falcon_sflash-16m.dtsi} | 0 .../arch/mips/boot/dts/lantiq}/vr9.dtsi | 150 ++++ .../lantiq/vr9_alphanetworks_asl56026.dts} | 12 - .../dts/lantiq/vr9_arcadyan_arv7519rw22.dts} | 4 - .../boot/dts/lantiq/vr9_arcadyan_vg3503j.dts} | 25 +- .../lantiq/vr9_arcadyan_vgv7510kw22-brn.dts} | 2 +- .../lantiq/vr9_arcadyan_vgv7510kw22-nor.dts} | 2 +- .../dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi} | 19 +- .../dts/lantiq/vr9_arcadyan_vgv7519-brn.dts} | 2 +- .../dts/lantiq/vr9_arcadyan_vgv7519-nor.dts} | 2 +- .../dts/lantiq/vr9_arcadyan_vgv7519.dtsi} | 21 +- .../lantiq/vr9_avm_fritz3370-rev2-hynix.dts} | 5 +- .../lantiq/vr9_avm_fritz3370-rev2-micron.dts} | 5 +- .../dts/lantiq/vr9_avm_fritz3370-rev2.dtsi} | 31 +- .../boot/dts/lantiq/vr9_avm_fritz7360sl.dts} | 2 +- .../boot/dts/lantiq/vr9_avm_fritz7362sl.dts} | 30 +- .../boot/dts/lantiq/vr9_avm_fritz736x.dtsi} | 9 +- .../boot/dts/lantiq/vr9_avm_fritz7412.dts} | 24 +- .../boot/dts/lantiq/vr9_bt_homehub-v5a.dts} | 21 +- .../dts/lantiq/vr9_buffalo_wbmr-300hpd.dts} | 19 - .../dts/lantiq/vr9_lantiq_easy80920-nand.dts} | 5 +- .../dts/lantiq/vr9_lantiq_easy80920-nor.dts} | 2 +- .../dts/lantiq/vr9_lantiq_easy80920.dtsi} | 44 +- .../boot/dts/lantiq/vr9_netgear_dm200.dts} | 27 - .../boot/dts/lantiq/vr9_tplink_tdw8970.dts} | 2 +- .../boot/dts/lantiq/vr9_tplink_tdw8980.dts} | 2 +- .../boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi} | 29 +- .../boot/dts/lantiq/vr9_tplink_vr200.dts} | 2 +- .../boot/dts/lantiq/vr9_tplink_vr200.dtsi} | 46 +- .../boot/dts/lantiq/vr9_tplink_vr200v.dts} | 2 +- .../dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts} | 5 +- .../dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts} | 5 +- .../dts/lantiq/vr9_zyxel_p-2812hnu-fx.dtsi} | 55 +- .../files/arch/mips/boot/dts/EASY50810.dts | 86 -- target/linux/lantiq/image/Makefile | 753 +----------------- target/linux/lantiq/image/amazonse.mk | 20 + target/linux/lantiq/image/ar9.mk | 165 ++++ target/linux/lantiq/image/danube.mk | 219 +++++ target/linux/lantiq/image/falcon.mk | 93 +++ target/linux/lantiq/image/tp-link.mk | 21 +- target/linux/lantiq/image/vr9.mk | 227 ++++++ target/linux/lantiq/image/xway_legacy.mk | 72 ++ ...T-PHY-add-led-support-for-intel-xway.patch | 4 +- ...0025-NET-MIPS-lantiq-adds-xrx200-net.patch | 37 +- .../base-files/etc/board.d/01_leds | 44 +- .../xrx200/base-files/etc/board.d/02_network | 175 ++++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 0 .../etc/hotplug.d/firmware/12-ath9k-eeprom | 161 ++++ .../base-files/lib/upgrade/platform.sh | 2 - .../xway/base-files/etc/board.d/01_leds | 44 + .../xway/base-files/etc/board.d/02_network | 118 +++ .../etc/hotplug.d/firmware/12-ath9k-eeprom | 17 +- .../xway/base-files/lib/upgrade/platform.sh | 20 + target/linux/lantiq/xway/config-4.19 | 4 - .../base-files/etc/board.d/01_leds | 41 + .../base-files/etc/board.d/02_network | 61 ++ .../base-files/lib/upgrade/platform.sh | 10 + target/linux/lantiq/xway_legacy/config-4.19 | 4 - 120 files changed, 2388 insertions(+), 1957 deletions(-) create mode 100644 package/base-files/files/lib/functions/migrations.sh create mode 100755 target/linux/lantiq/ase/base-files/etc/board.d/01_leds create mode 100755 target/linux/lantiq/ase/base-files/etc/board.d/02_network create mode 100644 target/linux/lantiq/ase/base-files/lib/upgrade/platform.sh delete mode 100755 target/linux/lantiq/base-files/etc/board.d/02_network create mode 100755 target/linux/lantiq/falcon/base-files/etc/board.d/02_network create mode 100755 target/linux/lantiq/falcon/base-files/lib/upgrade/platform.sh rename target/linux/lantiq/{files/arch/mips/boot/dts => files-4.19/arch/mips/boot/dts/lantiq}/amazonse.dtsi (84%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ALL0333CJ.dts => files-4.19/arch/mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts} (96%) rename target/linux/lantiq/{files/arch/mips/boot/dts/DGN1000B.dts => files-4.19/arch/mips/boot/dts/lantiq/amazonse_netgear_dgn1000b.dts} (87%) rename target/linux/lantiq/{files/arch/mips/boot/dts => files-4.19/arch/mips/boot/dts/lantiq}/ar9.dtsi (66%) rename target/linux/lantiq/{files/arch/mips/boot/dts/FRITZ7312.dts => files-4.19/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts} (87%) rename target/linux/lantiq/{files/arch/mips/boot/dts/FRITZ7320.dts => files-4.19/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts} (81%) rename target/linux/lantiq/{files/arch/mips/boot/dts/BTHOMEHUBV3A.dts => files-4.19/arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts} (86%) rename target/linux/lantiq/{files/arch/mips/boot/dts/WBMR.dts => files-4.19/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts} (100%) rename target/linux/lantiq/{files/arch/mips/boot/dts/DGN3500.dts => files-4.19/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dts} (75%) rename target/linux/lantiq/{files/arch/mips/boot/dts/DGN3500.dtsi => files-4.19/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi} (85%) rename target/linux/lantiq/{files/arch/mips/boot/dts/DGN3500B.dts => files-4.19/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500b.dts} (75%) rename target/linux/lantiq/{files/arch/mips/boot/dts/H201L.dts => files-4.19/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts} (100%) rename target/linux/lantiq/{files/arch/mips/boot/dts/P2601HNFX.dts => files-4.19/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts} (88%) rename target/linux/lantiq/{files/arch/mips/boot/dts => files-4.19/arch/mips/boot/dts/lantiq}/danube.dtsi (76%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ARV4510PW.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4510pw.dts} (90%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ARV4518PWR01.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dts} (71%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ARV4518PWR01.dtsi => files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi} (92%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ARV4518PWR01A.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01a.dts} (78%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ARV4519PW.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts} (100%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ARV4520PW.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts} (94%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ARV4525PW.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts} (91%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ARV452CQW.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts} (94%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ARV7506PW11.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts} (96%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ARV7510PW22.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts} (93%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ARV7518PW.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts} (94%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ARV7519PW.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts} (93%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ARV7525PW.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts} (96%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ARV752DPW.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts} (94%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ARV752DPW22.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts} (95%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ARV8539PW22.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts} (92%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ACMP252.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_audiocodes_mp-252.dts} (95%) rename target/linux/lantiq/{files/arch/mips/boot/dts/BTHOMEHUBV2B.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts} (88%) rename target/linux/lantiq/{files/arch/mips/boot/dts/EASY50712.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_lantiq_easy50712.dts} (80%) rename target/linux/lantiq/{files/arch/mips/boot/dts/GIGASX76X.dts => files-4.19/arch/mips/boot/dts/lantiq/danube_siemens_gigaset-sx76x.dts} (91%) rename target/linux/lantiq/{files/arch/mips/boot/dts => files-4.19/arch/mips/boot/dts/lantiq}/falcon.dtsi (100%) rename target/linux/lantiq/{files/arch/mips/boot/dts/EASY88388.dts => files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88388.dts} (98%) rename target/linux/lantiq/{files/arch/mips/boot/dts/EASY88444.dts => files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88444.dts} (97%) rename target/linux/lantiq/{files/arch/mips/boot/dts/EASY98000NAND.dts => files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nand.dts} (91%) rename target/linux/lantiq/{files/arch/mips/boot/dts/EASY98000NOR.dts => files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nor.dts} (91%) rename target/linux/lantiq/{files/arch/mips/boot/dts/EASY98000SFLASH.dts => files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-sflash.dts} (67%) rename target/linux/lantiq/{files/arch/mips/boot/dts/EASY98000-base.dtsi => files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000.dtsi} (98%) rename target/linux/lantiq/{files/arch/mips/boot/dts/EASY98020V18.dts => files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020-v18.dts} (97%) rename target/linux/lantiq/{files/arch/mips/boot/dts/EASY98020.dts => files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020.dts} (97%) rename target/linux/lantiq/{files/arch/mips/boot/dts/EASY98021.dts => files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98021.dts} (97%) rename target/linux/lantiq/{files/arch/mips/boot/dts/EASY98035SYNCE.dts => files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98035synce.dts} (97%) rename target/linux/lantiq/{files/arch/mips/boot/dts/EASY98035SYNCE1588.dts => files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98035synce1588.dts} (97%) rename target/linux/lantiq/{files/arch/mips/boot/dts/FALCON-MDU.dts => files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-mdu.dts} (96%) rename target/linux/lantiq/{files/arch/mips/boot/dts/FALCON-SFP.dts => files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-sfp.dts} (97%) rename target/linux/lantiq/{files/arch/mips/boot/dts/falcon-sflash-16M.dtsi => files-4.19/arch/mips/boot/dts/lantiq/falcon_sflash-16m.dtsi} (100%) rename target/linux/lantiq/{files/arch/mips/boot/dts => files-4.19/arch/mips/boot/dts/lantiq}/vr9.dtsi (71%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ASL56026.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts} (93%) rename target/linux/lantiq/{files/arch/mips/boot/dts/ARV7519RW22.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts} (98%) rename target/linux/lantiq/{files/arch/mips/boot/dts/VG3503J.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts} (86%) rename target/linux/lantiq/{files/arch/mips/boot/dts/VGV7510KW22BRN.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-brn.dts} (96%) rename target/linux/lantiq/{files/arch/mips/boot/dts/VGV7510KW22NOR.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-nor.dts} (92%) rename target/linux/lantiq/{files/arch/mips/boot/dts/VGV7510KW22.dtsi => files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi} (93%) rename target/linux/lantiq/{files/arch/mips/boot/dts/VGV7519BRN.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-brn.dts} (96%) rename target/linux/lantiq/{files/arch/mips/boot/dts/VGV7519NOR.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-nor.dts} (92%) rename target/linux/lantiq/{files/arch/mips/boot/dts/VGV7519.dtsi => files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi} (93%) rename target/linux/lantiq/{files/arch/mips/boot/dts/FRITZ3370-REV2-HYNIX.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2-hynix.dts} (84%) rename target/linux/lantiq/{files/arch/mips/boot/dts/FRITZ3370-REV2-MICRON.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2-micron.dts} (83%) rename target/linux/lantiq/{files/arch/mips/boot/dts/FRITZ3370-REV2.dtsi => files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi} (89%) rename target/linux/lantiq/{files/arch/mips/boot/dts/FRITZ7360SL.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts} (97%) rename target/linux/lantiq/{files/arch/mips/boot/dts/FRITZ7362SL.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts} (78%) rename target/linux/lantiq/{files/arch/mips/boot/dts/FRITZ736X.dtsi => files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi} (96%) rename target/linux/lantiq/{files/arch/mips/boot/dts/FRITZ7412.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts} (88%) rename target/linux/lantiq/{files/arch/mips/boot/dts/BTHOMEHUBV5A.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts} (93%) rename target/linux/lantiq/{files/arch/mips/boot/dts/WBMR300.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts} (93%) rename target/linux/lantiq/{files/arch/mips/boot/dts/EASY80920NAND.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nand.dts} (92%) rename target/linux/lantiq/{files/arch/mips/boot/dts/EASY80920NOR.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nor.dts} (94%) rename target/linux/lantiq/{files/arch/mips/boot/dts/EASY80920.dtsi => files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi} (86%) rename target/linux/lantiq/{files/arch/mips/boot/dts/DM200.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts} (86%) rename target/linux/lantiq/{files/arch/mips/boot/dts/TDW8970.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8970.dts} (78%) rename target/linux/lantiq/{files/arch/mips/boot/dts/TDW8980.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8980.dts} (94%) rename target/linux/lantiq/{files/arch/mips/boot/dts/TDW89X0.dtsi => files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi} (90%) rename target/linux/lantiq/{files/arch/mips/boot/dts/VR200.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dts} (98%) rename target/linux/lantiq/{files/arch/mips/boot/dts/VR200.dtsi => files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi} (86%) rename target/linux/lantiq/{files/arch/mips/boot/dts/VR200v.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_vr200v.dts} (98%) rename target/linux/lantiq/{files/arch/mips/boot/dts/P2812HNUF1.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts} (90%) rename target/linux/lantiq/{files/arch/mips/boot/dts/P2812HNUF3.dts => files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts} (89%) rename target/linux/lantiq/{files/arch/mips/boot/dts/P2812HNUFX.dtsi => files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-fx.dtsi} (82%) delete mode 100644 target/linux/lantiq/files/arch/mips/boot/dts/EASY50810.dts create mode 100644 target/linux/lantiq/image/amazonse.mk create mode 100644 target/linux/lantiq/image/ar9.mk create mode 100644 target/linux/lantiq/image/danube.mk create mode 100644 target/linux/lantiq/image/falcon.mk create mode 100644 target/linux/lantiq/image/vr9.mk create mode 100644 target/linux/lantiq/image/xway_legacy.mk rename target/linux/lantiq/{ => xrx200}/base-files/etc/board.d/01_leds (80%) create mode 100755 target/linux/lantiq/xrx200/base-files/etc/board.d/02_network rename target/linux/lantiq/{ => xrx200}/base-files/etc/hotplug.d/firmware/11-ath10k-caldata (100%) create mode 100644 target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom rename target/linux/lantiq/{ => xrx200}/base-files/lib/upgrade/platform.sh (91%) create mode 100755 target/linux/lantiq/xway/base-files/etc/board.d/01_leds create mode 100755 target/linux/lantiq/xway/base-files/etc/board.d/02_network rename target/linux/lantiq/{ => xway}/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom (86%) create mode 100755 target/linux/lantiq/xway/base-files/lib/upgrade/platform.sh create mode 100755 target/linux/lantiq/xway_legacy/base-files/etc/board.d/01_leds create mode 100755 target/linux/lantiq/xway_legacy/base-files/etc/board.d/02_network create mode 100755 target/linux/lantiq/xway_legacy/base-files/lib/upgrade/platform.sh diff --git a/package/base-files/files/lib/functions/migrations.sh b/package/base-files/files/lib/functions/migrations.sh new file mode 100644 index 0000000000..b180a0242f --- /dev/null +++ b/package/base-files/files/lib/functions/migrations.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +. /lib/functions.sh + +migrate_led_sysfs() { + local cfg="$1"; shift + local tuples="$@" + local sysfs + local name + + config_get sysfs ${cfg} sysfs + config_get name ${cfg} name + + [ -z "${sysfs}" ] && return + + for tuple in ${tuples}; do + local old=${tuple%=*} + local new=${tuple#*=} + local new_sysfs + + new_sysfs=$(echo ${sysfs} | sed "s/${old}/${new}/") + + [ "${new_sysfs}" = "${sysfs}" ] && continue + + uci set system.${cfg}.sysfs="${new_sysfs}" + + logger -t led-migration "sysfs option of LED \"${name}\" updated to ${new_sysfs}" + done; +} + +migrate_leds() { + config_load system + config_foreach migrate_led_sysfs led "$@" +} + +migrations_apply() { + local realm="$1" + [ -n "$(uci changes ${realm})" ] && uci -q commit ${realm} +} diff --git a/target/linux/lantiq/ase/base-files/etc/board.d/01_leds b/target/linux/lantiq/ase/base-files/etc/board.d/01_leds new file mode 100755 index 0000000000..6a8de7d7a5 --- /dev/null +++ b/target/linux/lantiq/ase/base-files/etc/board.d/01_leds @@ -0,0 +1,32 @@ +#!/bin/sh +# +# Copyright (C) 2011-2015 OpenWrt.org +# + +. /lib/functions/leds.sh +. /lib/functions/uci-defaults.sh + +board_config_update + +led_dsl="$(get_dt_led dsl)" +[ -n "$led_dsl" ] && { + led_internet="$(get_dt_led internet)" + if [ -n "$led_internet" ]; then + ucidef_set_led_default "dsl" "dsl" "$led_dsl" "0" + ucidef_set_led_netdev "internet" "internet" "$led_internet" "pppoe-wan" + else + ucidef_set_led_netdev "dsl" "dsl" "$led_dsl" "dsl0" + fi +} + +board=$(board_name) + +case "$board" in +allnet,all0333cj) + ucidef_set_led_netdev "lan" "lan" "all0333cj:green:lan" "eth0.1" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/lantiq/ase/base-files/etc/board.d/02_network b/target/linux/lantiq/ase/base-files/etc/board.d/02_network new file mode 100755 index 0000000000..0bda3e4763 --- /dev/null +++ b/target/linux/lantiq/ase/base-files/etc/board.d/02_network @@ -0,0 +1,56 @@ +#!/bin/sh +# +# Copyright (C) 2011-2015 OpenWrt.org +# + +. /lib/functions/uci-defaults.sh +. /lib/functions/system.sh +. /lib/functions/lantiq.sh + +lantiq_setup_interfaces() +{ + local board="$1" + + case "$board" in + *) + ucidef_set_interface_lan 'eth0' + ;; + esac +} + +lantiq_setup_dsl() +{ + local board="$1" + local annex="b" + + case "$board" in + esac + + lantiq_setup_dsl_helper "$annex" +} + +lantiq_setup_macs() +{ + local board="$1" + local lan_mac="" + local wan_mac="" + + case "$board" in + allnet,all0333cj) + lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr) + wan_mac=$(macaddr_add "$lan_mac" 1) + ;; + esac + + [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" "$lan_mac" + [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" "$wan_mac" +} + +board_config_update +board=$(board_name) +lantiq_setup_interfaces $board +lantiq_setup_dsl $board +lantiq_setup_macs $board +board_config_flush + +exit 0 diff --git a/target/linux/lantiq/ase/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/ase/base-files/lib/upgrade/platform.sh new file mode 100644 index 0000000000..d088601bb0 --- /dev/null +++ b/target/linux/lantiq/ase/base-files/lib/upgrade/platform.sh @@ -0,0 +1,10 @@ +PART_NAME=firmware +REQUIRE_IMAGE_METADATA=1 + +platform_check_image() { + return 0 +} + +platform_do_upgrade() { + default_do_upgrade "$1" +} diff --git a/target/linux/lantiq/ase/config-4.19 b/target/linux/lantiq/ase/config-4.19 index cf27a148b7..0c211847d2 100644 --- a/target/linux/lantiq/ase/config-4.19 +++ b/target/linux/lantiq/ase/config-4.19 @@ -5,7 +5,6 @@ CONFIG_CPU_MIPSR1=y CONFIG_CRC16=y CONFIG_CRYPTO_ACOMP2=y CONFIG_CRYPTO_DEFLATE=y -CONFIG_FIRMWARE_IN_KERNEL=y CONFIG_FIRMWARE_MEMMAP=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y diff --git a/target/linux/lantiq/base-files/etc/board.d/02_network b/target/linux/lantiq/base-files/etc/board.d/02_network deleted file mode 100755 index a6a9e4d29d..0000000000 --- a/target/linux/lantiq/base-files/etc/board.d/02_network +++ /dev/null @@ -1,268 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2011-2015 OpenWrt.org -# - -. /lib/functions/uci-defaults.sh -. /lib/functions/system.sh -. /lib/functions/lantiq.sh - -board_config_update - -vpi=1 -vci=32 -annex="a" -tone="av" -xfer_mode="" -encaps="llc" -payload="bridged" -lan_mac="" -wan_mac="" -interface_wan="dsl0" - -board=$(board_name) - -case "$board" in -audiocodes,mp-252) - ucidef_add_switch "switch0" \ - "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5t@eth0" - ;; - -allnet,all0333cj) - annex="b" - lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr) - wan_mac=$(macaddr_add "$lan_mac" 1) - ucidef_set_interface_lan 'eth0' - ;; - -arcadyan,arv4510pw) - lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr) - wan_mac=$(macaddr_add "$lan_mac" 1) - ucidef_add_switch "switch0" \ - "0:lan:4" "2:lan:2" "1:lan:3" "3:lan:1" "5t@eth0" - ;; - -arcadyan,arv4519pw|arcadyan,arv7510pw22|arcadyan,arv7518pw) - ucidef_add_switch "switch0" \ - "0t@eth0" "2:lan" "3:lan" "4:lan" "5:lan" - ;; - -arcadyan,arv4520pw) - annex="b" - ucidef_add_switch "switch0" \ - "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth0" - ;; - -arcadyan,arv4525pw|arcadyan,arv452cqw|arcadyan,arv7525pw|arcadyan,arv752dpw) - annex="b" - ucidef_set_interface_lan 'eth0' - ;; - -arcadyan,arv7506pw11) - annex="b" - wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 2) - ucidef_add_switch "switch0" \ - "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5t@eth0" - ;; - -arcadyan,arv7519pw) - wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 1) - ucidef_add_switch "switch0" \ - "0:lan" "1:lan" "2:lan" "3:lan" "4t@eth0" - ;; - -arcadyan,arv7519rw22) - wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 22)" 1) - ucidef_add_switch "switch0" \ - "0:lan:5" "2:lan:3" "3:lan:4" "4:lan:1" "5:lan:2" "6t@eth0" - ;; - -arcadyan,arv752dpw22|arcadyan,arv8539pw22) - annex="b" - ucidef_add_switch "switch0" \ - "0t@eth0" "2:lan" "3:lan" "4:lan" "5:lan" - ;; - -alphanetworks,asl56026) - lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr) - wan_mac=$(mtd_get_mac_ascii uboot_env wanmac) - ucidef_add_switch "switch0"\ - "2:lan" "3:lan" "6t@eth0" - ;; - -bt,homehub-v2b) - lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr) - wan_mac=$(macaddr_add "$lan_mac" 1) - ucidef_add_switch "switch0" \ - "1:lan" "2:lan" "3:lan" "4:lan" "5t@eth0" - ;; - -bt,homehub-v3a) - lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr) - wan_mac=$(macaddr_add "$lan_mac" 1) - ucidef_set_interface_lan 'eth0' - ;; - -bt,homehub-v5a) - lan_mac=$(mtd_get_mac_binary_ubi caldata 4364) - wan_mac=$(macaddr_add "$lan_mac" 1) - ucidef_add_switch "switch0" \ - "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0" - ;; - -netgear,dgn1000b) - annex="b" - ucidef_set_interface_lan 'eth0' - ;; - -netgear,dgn3500|netgear,dgn3500b) - lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr) - wan_mac=$(macaddr_add "$lan_mac" 1) - ucidef_add_switch "switch0" \ - "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth0" - ;; - -netgear,dm200) - lan_mac=$(mtd_get_mac_binary ART 0) - wan_mac=$(macaddr_add "$lan_mac" 1) - ucidef_set_interface_lan 'eth0' - ;; - -lantiq,easy80920-nand|lantiq,easy80920-nor) - lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr) - wan_mac=$(macaddr_add "$lan_mac" 1) - ucidef_add_switch "switch0" \ - "0:lan:4" "1:lan:3" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0" - ;; - -avm,fritz3370-rev2-hynix|\ -avm,fritz3370-rev2-micron) - annex="b" - lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) - wan_mac=$(macaddr_add "$lan_mac" 3) - ucidef_add_switch "switch0" \ - "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0" - ;; - -avm,fritz7312|\ -avm,fritz7320) - annex="b" - wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 2705)" 1) - ucidef_set_interface_lan 'eth0' - ;; - -avm,fritz7360sl) - annex="b" - wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 2705)" 1) - ucidef_add_switch "switch0" \ - "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0" - ;; - -avm,fritz7362sl) - annex="b" - lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) - wan_mac=$(fritz_tffs -n macdsl -i $(find_mtd_part "tffs (1)")) - ucidef_add_switch "switch0" \ - "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0" - ;; - -avm,fritz7412) - tffsdev=$(find_mtd_chardev "nand-tffs") - annex="b" - lan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n maca -o) - wan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n macdsl -o) - ucidef_set_interface_lan 'eth0' - ;; - -siemens,gigaset-sx76x) - annex="b" - ucidef_add_switch "switch0" \ - "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5t@eth0" - ;; - -zte,h201l) - annex="b" - ucidef_add_switch "switch0" \ - "0:lan" "1:lan" "2:lan" "3:lan" "4t@eth0" - ;; - -zyxel,p-2601hn) - ucidef_add_switch "switch0" \ - "0:lan" "1:lan" "2:lan" "3:lan" "5t@eth0" - ;; - -zyxel,p-2812hnu-f1|zyxel,p-2812hnu-f3) - lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr) - wan_mac=$(macaddr_add "$lan_mac" 1) - ucidef_add_switch "switch0" \ - "0:lan" "1:lan" "2:lan" "4:lan" "5:wan" "6t@eth0" - ;; - -tplink,tdw8970|tplink,tdw8980) - wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 61696)" 1) - ucidef_add_switch "switch0" \ - "0:lan:2" "2:lan:3" "4:lan:4" "5:lan:1" "6t@eth0" - ;; - -arcadyan,vg3503j) - lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr) - wan_mac=$(macaddr_add "$lan_mac" 1) - ucidef_add_switch "switch0" \ - "2:lan:2" "4:lan:1" "6t@eth0" - ;; - -tplink,vr200|tplink,vr200v) - wan_mac=$(macaddr_add "$(mtd_get_mac_binary romfile 61696)" 1) - ucidef_add_switch "switch0" \ - "0:lan" "2:lan" "4:lan" "5:lan" "6t@eth0" - ;; - -arcadyan,vgv7510kw22-nor|arcadyan,vgv7510kw22-brn) - annex="b" - wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 2) - ucidef_add_switch "switch0" \ - "2:lan:2" "3:lan:1" "4:lan:4" "5:lan:3" "0:wan:5" "6t@eth0" - ;; - -arcadyan,vgv7519-nor|arcadyan,vgv7519-brn) - wan_mac=$(mtd_get_mac_binary board_config 22) - ucidef_add_switch "switch0" \ - "0:lan:4" "1:lan:3" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0" - ;; - -buffalo,wbmr-hp-g300h) - ucidef_add_switch "switch0" \ - "0t@eth0" "2:lan" "3:lan" "4:lan" "5:lan" - ;; - -buffalo,wbmr-300hpd) - lan_mac=$(mtd_get_mac_ascii ubootconfig ethaddr) - wan_mac="$lan_mac" - ucidef_add_switch "switch0" \ - "5:lan:2" "2:lan:3" "3:lan:4" "4:wan:1" "6t@eth0" - ;; - -*) - ucidef_set_interface_lan 'eth0' - ;; - -esac - -ls /lib/modules/$(uname -r)/ltq_atm* 1> /dev/null 2>&1 && \ - ucidef_add_atm_bridge "$vpi" "$vci" "$encaps" "$payload" "dsl" - -if lantiq_is_vdsl_system; then - ucidef_add_vdsl_modem "$annex" "$tone" "$xfer_mode" -else - ucidef_add_adsl_modem "$annex" "/lib/firmware/adsl.bin" -fi - -ucidef_set_interface_wan "$interface_wan" "pppoe" - -[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" "$lan_mac" -[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" "$wan_mac" - -board_config_flush - -exit 0 - diff --git a/target/linux/lantiq/base-files/etc/hotplug.d/dsl/pppoa.sh b/target/linux/lantiq/base-files/etc/hotplug.d/dsl/pppoa.sh index b9a3313c83..4506737672 100755 --- a/target/linux/lantiq/base-files/etc/hotplug.d/dsl/pppoa.sh +++ b/target/linux/lantiq/base-files/etc/hotplug.d/dsl/pppoa.sh @@ -8,7 +8,7 @@ include /lib/network scan_interfaces -interfaces=`ubus list network.interface.\* | cut -d"." -f3` +interfaces=$(ubus list network.interface.\* | cut -d"." -f3) for ifc in $interfaces; do json_load "$(ifstatus $ifc)" diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration b/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration index dc594e35e9..b1e7be6bd2 100644 --- a/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration +++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration @@ -3,37 +3,7 @@ # Copyright (C) 2013 OpenWrt.org # -LED_OPTIONS_CHANGED=0 - -. /lib/functions.sh - -do_led_update_sysfs() -{ - local cfg=$1; shift - local tuples="$@" - local sysfs - local name - - config_get sysfs $cfg sysfs - config_get name $cfg name - - [ -z "$sysfs" ] && return - - for tuple in $tuples; do - local old=${tuple%=*} - local new=${tuple#*=} - local new_sysfs - - new_sysfs=$(echo ${sysfs} | sed "s/${old}/${new}/") - - [ "$new_sysfs" = "$sysfs" ] && continue - - uci set system.${cfg}.sysfs="${new_sysfs}" - LED_OPTIONS_CHANGED=1 - - logger -t led-migration "sysfs option of LED \"${name}\" updated to ${new_sysfs}" - done; -} +. /lib/functions/migrations.sh do_internet_led_rename() { @@ -45,38 +15,29 @@ do_internet_led_rename() uci rename system.led_internet=led_dsl uci set system.led_dsl.name=dsl - LED_OPTIONS_CHANGED=1 logger -t led-migration "internet led renamed to dsl" } -migrate_leds() -{ - config_load system - config_foreach do_led_update_sysfs led "$@" -} - case "$(board_name)" in +alphanetworks,asl56026|\ arcadyan,arv452cqw|\ arcadyan,arv7510pw22|\ arcadyan,arv7519rw22|\ arcadyan,arv752dpw|\ arcadyan,arv752dpw22|\ -alphanetworks,asl56026|\ +arcadyan,vg3503j|\ +avm,fritz7360sl|\ bt,homehub-v2b|\ bt,homehub-v3a|\ -bt,homehub-v5a|\ -avm,fritz7360sl|\ -arcadyan,vg3503j) +bt,homehub-v5a) do_internet_led_rename ;; netgear,dgn3500|\ netgear,dgn3500b) migrate_leds "dgn3500:blue:wireless=dgn3500:green:wireless" ;; -*) - ;; esac -[ "$LED_OPTIONS_CHANGED" = "1" ] && uci commit system +migrations_apply system exit 0 diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface b/target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface index 3b0313d1aa..dd57ca6d39 100644 --- a/target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface +++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface @@ -1,7 +1,6 @@ #!/bin/sh . /lib/functions.sh -. /lib/functions/lantiq.sh IFNAME_CHANGED=0 diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq.sh b/target/linux/lantiq/base-files/lib/functions/lantiq.sh index 62c7a6b662..e88e638285 100644 --- a/target/linux/lantiq/base-files/lib/functions/lantiq.sh +++ b/target/linux/lantiq/base-files/lib/functions/lantiq.sh @@ -1,5 +1,18 @@ -#!/bin/sh - lantiq_is_vdsl_system() { grep -qE "system type.*: (VR9|xRX200)" /proc/cpuinfo } + +lantiq_setup_dsl_helper() { + local annex="$1" + + ls /lib/modules/$(uname -r)/ltq_atm* 1> /dev/null 2>&1 && \ + ucidef_add_atm_bridge "1" "32" "llc" "bridged" "dsl" + + if lantiq_is_vdsl_system; then + ucidef_add_vdsl_modem "$annex" "av" + else + ucidef_add_adsl_modem "$annex" "/lib/firmware/adsl.bin" + fi + + ucidef_set_interface_wan "dsl0" "pppoe" +} diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh index 8665240da4..11b02fc4aa 100755 --- a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh +++ b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh @@ -290,8 +290,8 @@ xtse() { annex_s="$annex_s M," fi - annex_s=`echo ${annex_s:1}` - annex_s=`echo ${annex_s%?}` + annex_s=${annex_s:1} + annex_s=${annex_s%?} # Evaluate Line Mode (according to G.997.1, 7.3.1.1.1) @@ -346,8 +346,8 @@ xtse() { line_mode_s="$line_mode_s G.993.1 (VDSL)," fi - line_mode_s=`echo ${line_mode_s:1}` - line_mode_s=`echo ${line_mode_s%?}` + line_mode_s=${line_mode_s:1} + line_mode_s=${line_mode_s%?} xtse_s="${xtse1}, ${xtse2}, ${xtse3}, ${xtse4}, ${xtse5}, ${xtse6}, ${xtse7}, ${xtse8}" @@ -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}" @@ -734,7 +728,7 @@ profile() { fi } -status() { +dslstat() { vendor chipset xtse @@ -750,6 +744,6 @@ status() { lucistat() { echo "local dsl={}" - status + dslstat echo "return dsl" } diff --git a/target/linux/lantiq/base-files/lib/preinit/05_set_preinit_iface_lantiq b/target/linux/lantiq/base-files/lib/preinit/05_set_preinit_iface_lantiq index 7ed0fabcf7..4f7dc6673c 100644 --- a/target/linux/lantiq/base-files/lib/preinit/05_set_preinit_iface_lantiq +++ b/target/linux/lantiq/base-files/lib/preinit/05_set_preinit_iface_lantiq @@ -1,7 +1,5 @@ #!/bin/sh -. /lib/functions/lantiq.sh - set_preinit_iface() { ifname=eth0 } diff --git a/target/linux/lantiq/falcon/base-files/etc/board.d/02_network b/target/linux/lantiq/falcon/base-files/etc/board.d/02_network new file mode 100755 index 0000000000..7998efc2a0 --- /dev/null +++ b/target/linux/lantiq/falcon/base-files/etc/board.d/02_network @@ -0,0 +1,52 @@ +#!/bin/sh +# +# Copyright (C) 2011-2015 OpenWrt.org +# + +. /lib/functions/uci-defaults.sh +. /lib/functions/system.sh +. /lib/functions/lantiq.sh + +lantiq_setup_interfaces() +{ + local board="$1" + + case "$board" in + *) + ucidef_set_interface_lan 'eth0' + ;; + esac +} + +lantiq_setup_dsl() +{ + local board="$1" + local annex="a" + + case "$board" in + esac + + lantiq_setup_dsl_helper "$annex" +} + +lantiq_setup_macs() +{ + local board="$1" + local lan_mac="" + local wan_mac="" + + case "$board" in + esac + + [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" "$lan_mac" + [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" "$wan_mac" +} + +board_config_update +board=$(board_name) +lantiq_setup_interfaces $board +lantiq_setup_dsl $board +lantiq_setup_macs $board +board_config_flush + +exit 0 diff --git a/target/linux/lantiq/falcon/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/falcon/base-files/lib/upgrade/platform.sh new file mode 100755 index 0000000000..d088601bb0 --- /dev/null +++ b/target/linux/lantiq/falcon/base-files/lib/upgrade/platform.sh @@ -0,0 +1,10 @@ +PART_NAME=firmware +REQUIRE_IMAGE_METADATA=1 + +platform_check_image() { + return 0 +} + +platform_do_upgrade() { + default_do_upgrade "$1" +} diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/amazonse.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/amazonse.dtsi similarity index 84% rename from target/linux/lantiq/files/arch/mips/boot/dts/amazonse.dtsi rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/amazonse.dtsi index feb4cd529a..496150b7a7 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/amazonse.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/amazonse.dtsi @@ -133,6 +133,8 @@ "spi_frm"; #address-cells = <1>; #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&spi_pins>, <&spi_cs4_pins>; status = "disabled"; }; @@ -148,6 +150,40 @@ #gpio-cells = <2>; gpio-controller; reg = <0xe100b10 0xa0>; + + asc_pins: asc-pins { + mux { + lantiq,groups = "asc"; + lantiq,function = "asc"; + }; + }; + + mdio_pins: mdio { + mux { + lantiq,groups = "mdio"; + lantiq,function = "mdio"; + }; + }; + + spi_pins: spi { + mux-0 { + lantiq,groups = "spi_di"; + lantiq,function = "spi"; + }; + mux-1 { + lantiq,groups = "spi_do", "spi_clk"; + lantiq,function = "spi"; + lantiq,output = <1>; + }; + }; + + spi_cs4_pins: spi-cs4 { + mux { + lantiq,groups = "spi_cs4"; + lantiq,function = "spi"; + lantiq,output = <1>; + }; + }; }; asc1: serial@e100c00 { @@ -155,6 +191,8 @@ reg = <0xe100c00 0x400>; interrupt-parent = <&icu0>; interrupts = <72 74 75>; + pinctrl-0 = <&asc_pins>; + pinctrl-names = "default"; }; mei@e116000 { @@ -198,6 +236,8 @@ reg = <0xe180000 0x40000>; interrupt-parent = <&icu0>; interrupts = <105 109>; + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ALL0333CJ.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts similarity index 96% rename from target/linux/lantiq/files/arch/mips/boot/dts/ALL0333CJ.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts index ef57b2f06b..c5dd1600f4 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ALL0333CJ.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts @@ -61,10 +61,6 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - asc { - lantiq,groups = "asc"; - lantiq,function = "asc"; - }; keys_in { lantiq,pins = "io0",/* "io25", */"io29"; lantiq,pull = <2>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/DGN1000B.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/amazonse_netgear_dgn1000b.dts similarity index 87% rename from target/linux/lantiq/files/arch/mips/boot/dts/DGN1000B.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/amazonse_netgear_dgn1000b.dts index b4eee73b73..943b00f898 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/DGN1000B.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/amazonse_netgear_dgn1000b.dts @@ -86,28 +86,12 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - asc { - lantiq,groups = "asc"; - lantiq,function = "asc"; - }; keys_in { lantiq,pins = "io0",/* "io25", */"io29"; lantiq,pull = <2>; lantiq,open-drain = <1>; }; }; - pins_spi_default: pins_spi_default { - spi_in { - lantiq,groups = "spi_di"; - lantiq,function = "spi"; - }; - spi_out { - lantiq,groups = "spi_do", "spi_clk", - "spi_cs1"; - lantiq,function = "spi"; - lantiq,output = <1>; - }; - }; }; &gsw { @@ -117,8 +101,6 @@ &spi { status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pins_spi_default>; flash@1 { compatible = "jedec,spi-nor"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ar9.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9.dtsi similarity index 66% rename from target/linux/lantiq/files/arch/mips/boot/dts/ar9.dtsi rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9.dtsi index 37b44aecdd..12af82b8ce 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ar9.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9.dtsi @@ -160,6 +160,8 @@ "spi_frm"; #address-cells = <1>; #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&spi_pins>, <&spi_cs4_pins>; status = "disabled"; }; @@ -168,6 +170,149 @@ #gpio-cells = <2>; gpio-controller; reg = <0xe100b10 0xa0>; + + mdio_pins: mdio { + mux { + lantiq,groups = "mdio"; + lantiq,function = "mdio"; + }; + }; + + nand_pins: nand { + mux-0 { + lantiq,groups = "nand cle", "nand ale", + "nand rd"; + lantiq,function = "ebu"; + lantiq,output = <1>; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + mux-1 { + lantiq,groups = "nand rdy"; + lantiq,function = "ebu"; + lantiq,output = <0>; + lantiq,pull = <2>; + }; + }; + + nand_cs1_pins: nand-cs1 { + mux { + lantiq,groups = "nand cs1"; + lantiq,function = "ebu"; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + }; + + pci_gnt1_pins: pci-gnt1 { + mux { + lantiq,groups = "gnt1"; + lantiq,function = "pci"; + lantiq,output = <1>; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + }; + + pci_gnt2_pins: pci-gnt2 { + mux { + lantiq,groups = "gnt2"; + lantiq,function = "pci"; + lantiq,output = <1>; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + }; + + pci_gnt3_pins: pci-gnt3 { + mux { + lantiq,groups = "gnt3"; + lantiq,function = "pci"; + lantiq,output = <1>; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + }; + + pci_gnt4_pins: pci-gnt4 { + mux { + lantiq,groups = "gnt4"; + lantiq,function = "pci"; + lantiq,output = <1>; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + }; + + pci_req1_pins: pci-req1 { + mux { + lantiq,groups = "req1"; + lantiq,function = "pci"; + lantiq,output = <0>; + lantiq,open-drain = <1>; + lantiq,pull = <2>; + }; + }; + + pci_req2_pins: pci-req2 { + mux { + lantiq,groups = "req2"; + lantiq,function = "pci"; + lantiq,output = <0>; + lantiq,open-drain = <1>; + lantiq,pull = <2>; + }; + }; + + pci_req3_pins: pci-req3 { + mux { + lantiq,groups = "req3"; + lantiq,function = "pci"; + lantiq,output = <0>; + lantiq,open-drain = <1>; + lantiq,pull = <2>; + }; + }; + + pci_req4_pins: pci-req4 { + mux { + lantiq,groups = "req4"; + lantiq,function = "pci"; + lantiq,output = <0>; + lantiq,open-drain = <1>; + lantiq,pull = <2>; + }; + }; + + spi_pins: spi { + mux-0 { + lantiq,groups = "spi_di"; + lantiq,function = "spi"; + }; + mux-1 { + lantiq,groups = "spi_do", "spi_clk"; + lantiq,function = "spi"; + lantiq,output = <1>; + }; + }; + + spi_cs4_pins: spi-cs4 { + mux { + lantiq,groups = "spi_cs4"; + lantiq,function = "spi"; + lantiq,output = <1>; + }; + }; + + stp_pins: stp { + mux { + lantiq,groups = "stp"; + lantiq,function = "stp"; + lantiq,pull = <0>; + lantiq,open-drain = <0>; + lantiq,output = <1>; + }; + }; }; stp: stp@e100bb0 { @@ -175,6 +320,10 @@ compatible = "lantiq,gpio-stp-xway"; gpio-controller; reg = <0xe100bb0 0x40>; + + pinctrl-0 = <&stp_pins>; + pinctrl-names = "default"; + status = "disabled"; }; @@ -238,6 +387,8 @@ interrupt-parent = <&icu0>; interrupts = <73 72>; mac-address = [ 00 11 22 33 44 55 ]; + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; }; ppe@e234000 { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7312.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts similarity index 87% rename from target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7312.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts index 811f78f934..0f635127f8 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7312.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts @@ -18,8 +18,7 @@ led-running = &power; led-upgrade = &power; - led-internet = &info_green; - led-dsl = &power; + led-dsl = &info_green; led-wifi = &wlan; }; @@ -76,21 +75,6 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - pci { - lantiq,groups = "gnt1", "req1", "req2", "req4", "gnt2", "gnt3", "gnt4"; - lantiq,function = "pci"; - }; - pci-in { - lantiq,groups = "req1", "req2", "req4"; - lantiq,output = <0>; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - }; - pci-out { - lantiq,groups = "gnt1", "gnt2", "gnt3", "gnt4"; - lantiq,output = <1>; - lantiq,pull = <0>; - }; ar8030-intr { lantiq,groups = "exin3"; lantiq,function = "exin"; @@ -124,6 +108,7 @@ phy0: ethernet-phy@0 { reg = <0>; reset-gpios = <&gpio 34 GPIO_ACTIVE_LOW>; + max-speed = <100>; }; }; }; @@ -167,6 +152,13 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_gnt2_pins>, + <&pci_gnt3_pins>, <&pci_gnt4_pins>, + <&pci_req1_pins>, <&pci_req2_pins>, + <&pci_req4_pins>; + pinctrl-names = "default"; + req-mask = <0xf>; gpio-reset = <&gpio 21 GPIO_ACTIVE_LOW>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7320.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts similarity index 81% rename from target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7320.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts index 40348b1d59..424b778bb4 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7320.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts @@ -18,8 +18,7 @@ led-running = &power; led-upgrade = &power; - led-internet = &info_green; - led-dsl = &power; + led-dsl = &info_green; led-wifi = &wlan; }; @@ -74,29 +73,6 @@ }; }; -&gpio { - pinctrl-names = "default"; - pinctrl-0 = <&state_default>; - - state_default: pinmux { - pci { - lantiq,groups = "gnt1", "req1", "req2", "req3", "req4", "gnt2", "gnt3", "gnt4"; - lantiq,function = "pci"; - }; - pci-in { - lantiq,groups = "req1", "req2", "req3", "req4"; - lantiq,output = <0>; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - }; - pci-out { - lantiq,groups = "gnt1", "gnt2", "gnt3", "gnt4"; - lantiq,output = <1>; - lantiq,pull = <0>; - }; - }; -}; - &gsw { phy-mode = "mii"; mtd-mac-address = <&ath9k_cal 0xa91>; @@ -142,6 +118,12 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_gnt2_pins>, + <&pci_gnt3_pins>, <&pci_gnt4_pins>, + <&pci_req1_pins>, <&pci_req2_pins>, + <&pci_req3_pins>, <&pci_req4_pins>; + req-mask = <0xf>; gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV3A.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts similarity index 86% rename from target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV3A.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts index 823a158fbf..044ae2b417 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV3A.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts @@ -109,35 +109,6 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - nand_out { - lantiq,groups = "nand cle", "nand ale"; - lantiq,function = "ebu"; - lantiq,output = <1>; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; - nand_cs1 { - lantiq,groups = "nand cs1"; - lantiq,function = "ebu"; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; - - pci_in { - lantiq,groups = "req1"; - lantiq,function = "pci"; - lantiq,output = <0>; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - }; - pci_out { - lantiq,groups = "gnt1"; - lantiq,function = "pci"; - lantiq,output = <1>; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; - pci_rst { lantiq,pins = "io21"; lantiq,output = <1>; @@ -158,6 +129,9 @@ reg = <1 0x0 0x2000000 >; req-mask = <0x1>; /* PCI request lines to mask during NAND access */ + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + partitions { compatible = "fixed-partitions"; #address-cells = <1>; @@ -195,6 +169,10 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>; + pinctrl-names = "default"; + gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; wifi@7000 { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/WBMR.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts similarity index 100% rename from target/linux/lantiq/files/arch/mips/boot/dts/WBMR.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/DGN3500.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dts similarity index 75% rename from target/linux/lantiq/files/arch/mips/boot/dts/DGN3500.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dts index 98a2ebd98e..cbc99fe620 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/DGN3500.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include "DGN3500.dtsi" +#include "ar9_netgear_dgn3500.dtsi" / { compatible = "netgear,dgn3500", "lantiq,xway", "lantiq,ar9"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/DGN3500.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi similarity index 85% rename from target/linux/lantiq/files/arch/mips/boot/dts/DGN3500.dtsi rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi index 4a20dcefd3..a3dbbbdfad 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/DGN3500.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi @@ -115,33 +115,6 @@ lantiq,groups = "exin1"; lantiq,function = "exin"; }; - pci { - lantiq,groups = "gnt1", "req1"; - lantiq,function = "pci"; - }; - pci-in { - lantiq,groups = "req1"; - lantiq,output = <0>; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - }; - pci-out { - lantiq,groups = "gnt1"; - lantiq,output = <1>; - lantiq,pull = <0>; - }; - }; - pins_spi_default: pins_spi_default { - spi_in { - lantiq,groups = "spi_di"; - lantiq,function = "spi"; - }; - spi_out { - lantiq,groups = "spi_do", "spi_clk", - "spi_cs4"; - lantiq,function = "spi"; - lantiq,output = <1>; - }; }; }; @@ -151,6 +124,10 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>; + pinctrl-names = "default"; + gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; wifi@168c,0029 { @@ -163,9 +140,6 @@ &spi { status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pins_spi_default>; - flash@4 { compatible = "jedec,spi-nor"; reg = <4>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/DGN3500B.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500b.dts similarity index 75% rename from target/linux/lantiq/files/arch/mips/boot/dts/DGN3500B.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500b.dts index d1d788cc7d..b69613e48f 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/DGN3500B.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500b.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include "DGN3500.dtsi" +#include "ar9_netgear_dgn3500.dtsi" / { compatible = "netgear,dgn3500b", "lantiq,xway", "lantiq,ar9"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/H201L.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts similarity index 100% rename from target/linux/lantiq/files/arch/mips/boot/dts/H201L.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/P2601HNFX.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts similarity index 88% rename from target/linux/lantiq/files/arch/mips/boot/dts/P2601HNFX.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts index 62e5e70169..79896c6478 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/P2601HNFX.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts @@ -103,30 +103,10 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - stp { - lantiq,groups = "stp"; - lantiq,function = "stp"; - lantiq,pull = <2>; - lantiq,open-drain = <0>; - lantiq,output = <1>; - }; exin { lantiq,groups = "exin1"; lantiq,function = "exin"; }; - pci { - lantiq,groups = "gnt1"; - lantiq,function = "pci"; - }; - conf_out { - lantiq,pins = "io4", "io5", "io6"; - lantiq,open-drain; - lantiq,pull = <0>; - }; - mdio { - lantiq,groups = "mdio"; - lantiq,function = "mdio"; - }; }; usb_vbus: regulator-usb-vbus { @@ -177,6 +157,11 @@ }; }; +&pci0 { + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>; + pinctrl-names = "default"; +}; + &stp { status = "okay"; lantiq,shadow = <0xfff>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/danube.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube.dtsi similarity index 76% rename from target/linux/lantiq/files/arch/mips/boot/dts/danube.dtsi rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube.dtsi index cadfb80750..ae8c1c045a 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/danube.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube.dtsi @@ -144,6 +144,10 @@ compatible = "lantiq,gpio-stp-xway"; gpio-controller; reg = <0xe100bb0 0x40>; + + pinctrl-0 = <&stp_pins>; + pinctrl-names = "default"; + lantiq,shadow = <0xfff>; lantiq,groups = <0x3>; status = "disabled"; @@ -162,6 +166,82 @@ #gpio-cells = <2>; gpio-controller; reg = <0xe100b10 0xa0>; + + nand_pins: nand { + mux-0 { + lantiq,groups = "nand cle", "nand ale", + "nand rd"; + lantiq,function = "ebu"; + lantiq,output = <1>; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + mux-1 { + lantiq,groups = "nand rdy"; + lantiq,function = "ebu"; + lantiq,output = <0>; + lantiq,pull = <2>; + }; + }; + + nand_cs1_pins: nand-cs1 { + mux { + lantiq,groups = "nand cs1"; + lantiq,function = "ebu"; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + }; + + pci_gnt1_pins: pci-gnt1 { + mux { + lantiq,groups = "gnt1"; + lantiq,function = "pci"; + lantiq,output = <1>; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + }; + + pci_gnt2_pins: pci-gnt2 { + mux { + lantiq,groups = "gnt2"; + lantiq,function = "pci"; + lantiq,output = <1>; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + }; + + pci_req1_pins: pci-req1 { + mux { + lantiq,groups = "req1"; + lantiq,function = "pci"; + lantiq,output = <0>; + lantiq,open-drain = <1>; + lantiq,pull = <2>; + }; + }; + + pci_req2_pins: pci-req2 { + mux { + lantiq,groups = "req2"; + lantiq,function = "pci"; + lantiq,output = <0>; + lantiq,open-drain = <1>; + lantiq,pull = <2>; + }; + }; + + stp_pins: stp { + mux { + lantiq,groups = "stp"; + lantiq,function = "stp"; + lantiq,pull = <0>; + lantiq,open-drain = <0>; + lantiq,output = <1>; + }; + }; }; asc1: serial@e100c00 { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4510PW.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4510pw.dts similarity index 90% rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV4510PW.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4510pw.dts index e15eb66b04..19a44d5f6d 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4510PW.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4510pw.dts @@ -131,29 +131,11 @@ lantiq,open-drain = <0>; lantiq,output = <1>; }; - stp { - lantiq,groups = "stp"; - lantiq,function = "stp"; - lantiq,open-drain = <0>; - lantiq,output = <1>; - }; exin { lantiq,groups = "exin1", "exin2"; lantiq,function = "exin"; lantiq,output = <0>; }; - pci_in { - lantiq,groups = "req1", "req2"; - lantiq,function = "pci"; - lantiq,output = <0>; - }; - pci_out { - lantiq,groups = "gnt1", "gnt2"; - lantiq,function = "pci"; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - lantiq,output = <1>; - }; pci_rst { lantiq,pins = "io21"; lantiq,open-drain = <0>; @@ -211,6 +193,11 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_gnt2_pins>, + <&pci_req1_pins>, <&pci_req2_pins>; + pinctrl-names = "default"; + lantiq,external-clock; interrupt-map = < 0x6000 0 0 1 &icu0 135 diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4518PWR01.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dts similarity index 71% rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV4518PWR01.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dts index 34f868f484..ff34068005 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4518PWR01.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include "ARV4518PWR01.dtsi" +#include "danube_arcadyan_arv4518pwr01.dtsi" / { compatible = "arcadyan,arv4518pwr01", "lantiq,xway", "lantiq,danube"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4518PWR01.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi similarity index 92% rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV4518PWR01.dtsi rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi index f5dec312f8..dcae06d894 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4518PWR01.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi @@ -119,19 +119,6 @@ lantiq,groups = "ebu cs1"; lantiq,function = "ebu"; }; - pci_in { - lantiq,groups = "req1", "req2"; - lantiq,function = "pci"; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - lantiq,output = <0>; - }; - pci_out { - lantiq,groups = "gnt1", "gnt2"; - lantiq,function = "pci"; - lantiq,pull = <0>; - lantiq,output = <1>; - }; }; }; @@ -189,6 +176,11 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_gnt2_pins>, + <&pci_req1_pins>, <&pci_req2_pins>; + pinctrl-names = "default"; + gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; req-mask = <0xf>; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4518PWR01A.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01a.dts similarity index 78% rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV4518PWR01A.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01a.dts index 9617398bbc..b261a2fa91 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4518PWR01A.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01a.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include "ARV4518PWR01.dtsi" +#include "danube_arcadyan_arv4518pwr01.dtsi" / { compatible = "arcadyan,arv4518pwr01a", "lantiq,xway", "lantiq,danube"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4519PW.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts similarity index 100% rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV4519PW.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4520PW.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts similarity index 94% rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV4520PW.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts index 95944d9cfc..b59477cb19 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4520PW.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts @@ -135,18 +135,6 @@ lantiq,groups = "ebu cs1"; lantiq,function = "ebu"; }; - pci_in { - lantiq,groups = "req1"; - lantiq,function = "pci"; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - lantiq,output = <0>; - }; - pci_out { - lantiq,groups = "gnt1"; - lantiq,function = "pci"; - lantiq,output = <1>; - }; pci_rst { lantiq,pins = "io21"; lantiq,open-drain = <0>; @@ -210,6 +198,10 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>; + pinctrl-names = "default"; + lantiq,external-clock; gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4525PW.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts similarity index 91% rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV4525PW.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts index d55613a02b..cceb42164e 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4525PW.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts @@ -80,18 +80,6 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - pci_in { - lantiq,groups = "req1"; - lantiq,function = "pci"; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - lantiq,output = <0>; - }; - pci_out { - lantiq,groups = "gnt1"; - lantiq,function = "pci"; - lantiq,output = <1>; - }; pci_rst { lantiq,pins = "io21"; lantiq,pull = <2>; @@ -149,6 +137,10 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>; + pinctrl-names = "default"; + gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV452CQW.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts similarity index 94% rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV452CQW.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts index 4ff0f67ca3..eecff4bb0b 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ARV452CQW.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts @@ -147,18 +147,6 @@ lantiq,groups = "ebu cs1"; lantiq,function = "ebu"; }; - pci_in { - lantiq,groups = "req1"; - lantiq,function = "pci"; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - lantiq,output = <0>; - }; - pci_out { - lantiq,groups = "gnt1"; - lantiq,function = "pci"; - lantiq,output = <1>; - }; pci_rst { lantiq,pins = "io21"; lantiq,pull = <0>; @@ -228,6 +216,10 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>; + pinctrl-names = "default"; + lantiq,external-clock; gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV7506PW11.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts similarity index 96% rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV7506PW11.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts index c0bca84031..9e4216033b 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ARV7506PW11.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts @@ -91,11 +91,6 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - pci { - lantiq,groups = "gnt1"; - lantiq,function = "pci"; - lantiq,output = <1>; - }; pci_rst { lantiq,pins = "io21"; lantiq,pull = <2>; @@ -149,6 +144,10 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>; + pinctrl-names = "default"; + lantiq,external-clock; gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV7510PW22.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts similarity index 93% rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV7510PW22.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts index 5c4a41e957..e5fd05fe40 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ARV7510PW22.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts @@ -86,18 +86,6 @@ lantiq,pull = <2>; lantiq,output = <0>; }; - pci_in { - lantiq,groups = "req1", "req2"; - lantiq,function = "pci"; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - lantiq,output = <0>; - }; - pci_out { - lantiq,groups = "gnt1"; - lantiq,function = "pci"; - lantiq,output = <1>; - }; pci_rst { lantiq,pins = "io21"; lantiq,pull = <2>; @@ -173,6 +161,10 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>, <&pci_req2_pins>; + pinctrl-names = "default"; + lantiq,external-clock; interrupt-map = < 0x7000 0 0 1 &icu0 30 diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV7518PW.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts similarity index 94% rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV7518PW.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts index 458fd65495..ae0d27a042 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ARV7518PW.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts @@ -116,19 +116,6 @@ lantiq,groups = "ebu cs1"; lantiq,function = "ebu"; }; - pci_in { - lantiq,groups = "req1"; - lantiq,function = "pci"; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - lantiq,output = <0>; - }; - pci_out { - lantiq,groups = "gnt1"; - lantiq,function = "pci"; - lantiq,pull = <0>; - lantiq,output = <1>; - }; pci_rst { lantiq,pins = "io21"; lantiq,pull = <2>; @@ -215,6 +202,10 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>; + pinctrl-names = "default"; + gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; lantiq,external-clock; req-mask = <0xf>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV7519PW.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts similarity index 93% rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV7519PW.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts index e9c418e482..34b541af92 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ARV7519PW.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts @@ -131,19 +131,6 @@ lantiq,groups = "ebu cs1"; lantiq,function = "ebu"; }; - pci_in { - lantiq,groups = "req1"; - lantiq,function = "pci"; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - lantiq,output = <0>; - }; - pci_out { - lantiq,groups = "gnt1"; - lantiq,function = "pci"; - lantiq,pull = <0>; - lantiq,output = <1>; - }; pci_rst { lantiq,pins = "io21"; lantiq,pull = <2>; @@ -200,6 +187,10 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>; + pinctrl-names = "default"; + lantiq,external-clock; gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; req-mask = <0xf>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV7525PW.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts similarity index 96% rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV7525PW.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts index bcdc2249fd..d673c9b204 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ARV7525PW.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts @@ -83,10 +83,6 @@ lantiq,groups = "exin1"; lantiq,function = "exin"; }; - pci { - lantiq,groups = "gnt1", "req1"; - lantiq,function = "pci"; - }; }; }; @@ -134,6 +130,10 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>; + pinctrl-names = "default"; + interrupt-map = <0x7000 0 0 1 &icu0 135 1>; wifi@0,0 { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV752DPW.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts similarity index 94% rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV752DPW.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts index dbec1eb6a1..069b1b1ed6 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ARV752DPW.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts @@ -123,18 +123,6 @@ lantiq,pull = <2>; lantiq,output = <0>; }; - pci_in { - lantiq,groups = "req2", "req1"; - lantiq,function = "pci"; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - lantiq,output = <0>; - }; - pci_out { - lantiq,groups = "gnt1"; - lantiq,function = "pci"; - lantiq,output = <1>; - }; pci_rst { lantiq,pins = "io21"; lantiq,pull = <2>; @@ -220,6 +208,10 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>, <&pci_req2_pins>; + pinctrl-names = "default"; + lantiq,external-clock; gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; interrupt-map = <0x7000 0 0 1 &icu0 135>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV752DPW22.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts similarity index 95% rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV752DPW22.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts index de996d10cc..ec90a2bef9 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ARV752DPW22.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts @@ -151,18 +151,6 @@ lantiq,pull = <2>; lantiq,output = <0>; }; - pci_in { - lantiq,groups = "req1"; - lantiq,function = "pci"; - lantiq,pull = <2>; - lantiq,output = <0>; - }; - pci_out { - lantiq,groups = "gnt1"; - lantiq,function = "pci"; - lantiq,open-drain = <1>; - lantiq,output = <1>; - }; pci_rst { lantiq,pins = "io21"; lantiq,open-drain = <1>; @@ -235,6 +223,10 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>; + pinctrl-names = "default"; + lantiq,external-clock; interrupt-map = < 0x7000 0 0 1 &icu0 30 diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV8539PW22.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts similarity index 92% rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV8539PW22.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts index 00131f929c..4bf44a10e1 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ARV8539PW22.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts @@ -95,18 +95,6 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - pci_in { - lantiq,groups = "req1"; - lantiq,function = "pci"; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - lantiq,output = <0>; - }; - pci_out { - lantiq,groups = "gnt1"; - lantiq,function = "pci"; - lantiq,output = <1>; - }; pci_rst { lantiq,pins = "io21"; lantiq,pull = <2>; @@ -163,6 +151,10 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>; + pinctrl-names = "default"; + gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; wifi@168c,0029 { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ACMP252.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_audiocodes_mp-252.dts similarity index 95% rename from target/linux/lantiq/files/arch/mips/boot/dts/ACMP252.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_audiocodes_mp-252.dts index 7942535943..67b0f9631f 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ACMP252.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_audiocodes_mp-252.dts @@ -37,10 +37,6 @@ lantiq,groups = "exin1"; lantiq,function = "exin"; }; - pci { - lantiq,groups = "gnt1", "req1"; - lantiq,function = "pci"; - }; }; }; @@ -96,6 +92,9 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>; + pinctrl-names = "default"; }; &usb_phy { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV2B.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts similarity index 88% rename from target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV2B.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts index 2b3afb2295..40886feec4 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV2B.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts @@ -108,37 +108,10 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - nand_out { - lantiq,groups = "nand cle", "nand ale"; - lantiq,function = "ebu"; - lantiq,output = <1>; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; - nand_cs1 { - lantiq,groups = "nand cs1"; - lantiq,function = "ebu"; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; exin { lantiq,groups = "exin1"; lantiq,function = "exin"; }; - pci_in { - lantiq,groups = "req1"; - lantiq,function = "pci"; - lantiq,output = <0>; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - }; - pci_out { - lantiq,groups = "gnt1"; - lantiq,function = "pci"; - lantiq,output = <1>; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; pci_rst { lantiq,pins = "io21"; @@ -209,6 +182,9 @@ reg = <1 0x0 0x2000000 >; req-mask = <0x1>; /* PCI request lines to mask during NAND access */ + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + partitions { compatible = "fixed-partitions"; #address-cells = <1>; @@ -235,6 +211,10 @@ &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>; + pinctrl-names = "default"; + gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; wifi@168c,0027 { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY50712.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_lantiq_easy50712.dts similarity index 80% rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY50712.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_lantiq_easy50712.dts index ba7f302c2e..1afc74900e 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY50712.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_lantiq_easy50712.dts @@ -21,23 +21,10 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - stp { - lantiq,groups = "stp"; - lantiq,function = "stp"; - }; exin { lantiq,groups = "exin1"; lantiq,function = "exin"; }; - pci { - lantiq,groups = "gnt1"; - lantiq,function = "pci"; - }; - conf_out { - lantiq,pins = "io4", "io5", "io6"; /* stp */ - lantiq,open-drain; - lantiq,pull = <0>; - }; }; }; @@ -78,3 +65,8 @@ }; }; }; + +&pci0 { + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>; + pinctrl-names = "default"; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/GIGASX76X.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_siemens_gigaset-sx76x.dts similarity index 91% rename from target/linux/lantiq/files/arch/mips/boot/dts/GIGASX76X.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_siemens_gigaset-sx76x.dts index a9a5cbae2f..0072f7e2b1 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/GIGASX76X.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_siemens_gigaset-sx76x.dts @@ -52,18 +52,6 @@ }; }; -&gpio { - pinctrl-names = "default"; - pinctrl-0 = <&state_default>; - - state_default: pinmux { - stp { - lantiq,groups = "stp"; - lantiq,function = "stp"; - }; - }; -}; - &gpios { status = "okay"; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/falcon.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon.dtsi similarity index 100% rename from target/linux/lantiq/files/arch/mips/boot/dts/falcon.dtsi rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon.dtsi diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY88388.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88388.dts similarity index 98% rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY88388.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88388.dts index 12c448c2e6..22ce8caced 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY88388.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88388.dts @@ -2,7 +2,7 @@ #include #include "falcon.dtsi" -#include "falcon-sflash-16M.dtsi" +#include "falcon_sflash-16m.dtsi" / { model = "Lantiq Falcon FTTDP8 Reference Board"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY88444.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88444.dts similarity index 97% rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY88444.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88444.dts index 3f29d319cd..fa331450bf 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY88444.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88444.dts @@ -2,7 +2,7 @@ #include #include "falcon.dtsi" -#include "falcon-sflash-16M.dtsi" +#include "falcon_sflash-16m.dtsi" / { model = "Lantiq Falcon FTTdp G.FAST Reference Board"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98000NAND.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nand.dts similarity index 91% rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY98000NAND.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nand.dts index 2155f0cb1d..2107da5435 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98000NAND.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nand.dts @@ -1,7 +1,6 @@ /dts-v1/; -#include "falcon.dtsi" -#include "EASY98000-base.dtsi" +#include "falcon_lantiq_easy98000.dtsi" / { model = "Lantiq Falcon (NAND)"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98000NOR.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nor.dts similarity index 91% rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY98000NOR.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nor.dts index 3cb00343f5..56d0fe0bc3 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98000NOR.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nor.dts @@ -1,7 +1,6 @@ /dts-v1/; -#include "falcon.dtsi" -#include "EASY98000-base.dtsi" +#include "falcon_lantiq_easy98000.dtsi" / { model = "Lantiq Falcon (NOR)"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98000SFLASH.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-sflash.dts similarity index 67% rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY98000SFLASH.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-sflash.dts index bbe524e94e..8c931746ed 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98000SFLASH.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-sflash.dts @@ -1,8 +1,7 @@ /dts-v1/; -#include "falcon.dtsi" -#include "EASY98000-base.dtsi" -#include "falcon-sflash-16M.dtsi" +#include "falcon_lantiq_easy98000.dtsi" +#include "falcon_sflash-16m.dtsi" / { model = "Lantiq Falcon (SFLASH)"; @@ -13,4 +12,3 @@ spi1 = &spi; }; }; - diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98000-base.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000.dtsi similarity index 98% rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY98000-base.dtsi rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000.dtsi index fa8c0b4b06..5821c51def 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98000-base.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000.dtsi @@ -1,7 +1,8 @@ - #include #include +#include "falcon.dtsi" + / { compatible = "lantiq,easy98000", "lantiq,falcon"; @@ -107,4 +108,3 @@ reg = <0x51>; }; }; - diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98020V18.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020-v18.dts similarity index 97% rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY98020V18.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020-v18.dts index 571e23454a..773a490019 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98020V18.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020-v18.dts @@ -3,7 +3,7 @@ #include #include "falcon.dtsi" -#include "falcon-sflash-16M.dtsi" +#include "falcon_sflash-16m.dtsi" / { model = "Lantiq Falcon Reference Board V1.8"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98020.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020.dts similarity index 97% rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY98020.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020.dts index 7a3ef418d0..397764aac4 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98020.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020.dts @@ -3,7 +3,7 @@ #include #include "falcon.dtsi" -#include "falcon-sflash-16M.dtsi" +#include "falcon_sflash-16m.dtsi" / { model = "Lantiq Falcon Reference Board"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98021.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98021.dts similarity index 97% rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY98021.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98021.dts index 7eb40bde24..aa63268149 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98021.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98021.dts @@ -3,7 +3,7 @@ #include #include "falcon.dtsi" -#include "falcon-sflash-16M.dtsi" +#include "falcon_sflash-16m.dtsi" / { model = "Lantiq Falcon HGU Reference Board"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98035SYNCE.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98035synce.dts similarity index 97% rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY98035SYNCE.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98035synce.dts index df941cdb67..f1ecebec3b 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98035SYNCE.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98035synce.dts @@ -1,7 +1,7 @@ /dts-v1/; #include "falcon.dtsi" -#include "falcon-sflash-16M.dtsi" +#include "falcon_sflash-16m.dtsi" / { model = "Lantiq Falcon SFP Stick with SyncE"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98035SYNCE1588.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98035synce1588.dts similarity index 97% rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY98035SYNCE1588.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98035synce1588.dts index a3abc6e707..98421174d3 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98035SYNCE1588.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98035synce1588.dts @@ -1,7 +1,7 @@ /dts-v1/; #include "falcon.dtsi" -#include "falcon-sflash-16M.dtsi" +#include "falcon_sflash-16m.dtsi" / { model = "Lantiq Falcon SFP Stick with SyncE/1588"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FALCON-MDU.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-mdu.dts similarity index 96% rename from target/linux/lantiq/files/arch/mips/boot/dts/FALCON-MDU.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-mdu.dts index c5da8b564f..130d49ebd7 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/FALCON-MDU.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-mdu.dts @@ -3,7 +3,7 @@ #include #include "falcon.dtsi" -#include "falcon-sflash-16M.dtsi" +#include "falcon_sflash-16m.dtsi" / { model = "Lantiq Falcon / Vinax MDU Board"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FALCON-SFP.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-sfp.dts similarity index 97% rename from target/linux/lantiq/files/arch/mips/boot/dts/FALCON-SFP.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-sfp.dts index 8d45de4ebe..880c4edca8 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/FALCON-SFP.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-sfp.dts @@ -1,7 +1,7 @@ /dts-v1/; #include "falcon.dtsi" -#include "falcon-sflash-16M.dtsi" +#include "falcon_sflash-16m.dtsi" / { model = "Lantiq Falcon SFP Stick"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/falcon-sflash-16M.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_sflash-16m.dtsi similarity index 100% rename from target/linux/lantiq/files/arch/mips/boot/dts/falcon-sflash-16M.dtsi rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_sflash-16m.dtsi diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/vr9.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9.dtsi similarity index 71% rename from target/linux/lantiq/files/arch/mips/boot/dts/vr9.dtsi rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9.dtsi index e8b87dbcc7..35b1f180a5 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/vr9.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9.dtsi @@ -202,6 +202,8 @@ "spi_frm"; #address-cells = <1>; #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&spi_pins>, <&spi_cs4_pins>; status = "disabled"; }; @@ -210,6 +212,149 @@ #gpio-cells = <2>; gpio-controller; reg = <0xe100b10 0xa0>; + + gphy0_led0_pins: gphy0-led0 { + mux { + lantiq,groups = "gphy0 led0"; + lantiq,function = "gphy"; + lantiq,open-drain = <0>; + lantiq,pull = <2>; + lantiq,output = <1>; + }; + }; + + gphy0_led1_pins: gphy0-led1 { + mux { + lantiq,groups = "gphy0 led1"; + lantiq,function = "gphy"; + lantiq,open-drain = <0>; + lantiq,pull = <2>; + lantiq,output = <1>; + }; + }; + + gphy0_led2_pins: gphy0-led2 { + mux { + lantiq,groups = "gphy0 led2"; + lantiq,function = "gphy"; + lantiq,open-drain = <0>; + lantiq,pull = <2>; + lantiq,output = <1>; + }; + }; + + gphy1_led0_pins: gphy1-led0 { + mux { + lantiq,groups = "gphy1 led0"; + lantiq,function = "gphy"; + lantiq,open-drain = <0>; + lantiq,pull = <2>; + lantiq,output = <1>; + }; + }; + + gphy1_led1_pins: gphy1-led1 { + mux { + lantiq,groups = "gphy1 led1"; + lantiq,function = "gphy"; + lantiq,open-drain = <0>; + lantiq,pull = <2>; + lantiq,output = <1>; + }; + }; + + gphy1_led2_pins: gphy1-led2 { + mux { + lantiq,groups = "gphy1 led2"; + lantiq,function = "gphy"; + lantiq,open-drain = <0>; + lantiq,pull = <2>; + lantiq,output = <1>; + }; + }; + + mdio_pins: mdio { + mux { + lantiq,groups = "mdio"; + lantiq,function = "mdio"; + }; + }; + + nand_pins: nand { + mux-0 { + lantiq,groups = "nand cle", "nand ale", + "nand rd"; + lantiq,function = "ebu"; + lantiq,output = <1>; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + mux-1 { + lantiq,groups = "nand rdy"; + lantiq,function = "ebu"; + lantiq,output = <0>; + lantiq,pull = <2>; + }; + }; + + nand_cs1_pins: nand-cs1 { + mux { + lantiq,groups = "nand cs1"; + lantiq,function = "ebu"; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + }; + + pci_gnt1_pins: pci-gnt1 { + mux { + lantiq,groups = "gnt1"; + lantiq,function = "pci"; + lantiq,output = <1>; + lantiq,open-drain = <0>; + lantiq,pull = <0>; + }; + }; + + pci_req1_pins: pci-req1 { + mux { + lantiq,groups = "req1"; + lantiq,function = "pci"; + lantiq,output = <0>; + lantiq,open-drain = <1>; + lantiq,pull = <2>; + }; + }; + + spi_pins: spi { + mux-0 { + lantiq,groups = "spi_di"; + lantiq,function = "spi"; + }; + mux-1 { + lantiq,groups = "spi_do", "spi_clk"; + lantiq,function = "spi"; + lantiq,output = <1>; + }; + }; + + spi_cs4_pins: spi-cs4 { + mux { + lantiq,groups = "spi_cs4"; + lantiq,function = "spi"; + lantiq,output = <1>; + }; + }; + + stp_pins: stp { + mux { + lantiq,groups = "stp"; + lantiq,function = "stp"; + lantiq,pull = <0>; + lantiq,open-drain = <0>; + lantiq,output = <1>; + }; + }; }; stp: stp@e100bb0 { @@ -219,6 +364,9 @@ #gpio-cells = <2>; gpio-controller; + pinctrl-0 = <&stp_pins>; + pinctrl-names = "default"; + lantiq,shadow = <0xffffff>; lantiq,groups = <0x7>; lantiq,dsl = <0x0>; @@ -285,6 +433,8 @@ resets = <&reset0 21 16>, <&reset0 8 8>; reset-names = "switch", "ppe"; lantiq,phys = <&gphy0>, <&gphy1>; + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; }; mei@e116000 { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ASL56026.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts similarity index 93% rename from target/linux/lantiq/files/arch/mips/boot/dts/ASL56026.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts index 1c7f03c355..3d10f582b0 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ASL56026.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts @@ -119,18 +119,6 @@ lantiq,gphy-mode = ; }; -&gpio { - pinctrl-names = "default"; - pinctrl-0 = <&state_default>; - - state_default: pinmux { - mdio { - lantiq,groups = "mdio"; - lantiq,function = "mdio"; - }; - }; -}; - &localbus { flash@0 { compatible = "lantiq,nor"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV7519RW22.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts similarity index 98% rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV7519RW22.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts index f245fe370b..d6c521cfe7 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ARV7519RW22.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts @@ -177,10 +177,6 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - mdio { - lantiq,groups = "mdio"; - lantiq,function = "mdio"; - }; pcie-rst { lantiq,pins = "io21"; lantiq,pull = <0>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VG3503J.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts similarity index 86% rename from target/linux/lantiq/files/arch/mips/boot/dts/VG3503J.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts index 2d52176430..e074147d66 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/VG3503J.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts @@ -57,6 +57,10 @@ }; ð0 { + pinctrl-0 = <&mdio_pins>, + <&gphy0_led0_pins>, <&gphy0_led1_pins>, <&gphy0_led2_pins>, + <&gphy1_led0_pins>, <&gphy1_led1_pins>, <&gphy1_led2_pins>; + interface@0 { compatible = "lantiq,xrx200-pdi"; #address-cells = <1>; @@ -110,27 +114,6 @@ lantiq,gphy-mode = ; }; -&gpio { - pinctrl-names = "default"; - pinctrl-0 = <&state_default>; - - state_default: pinmux { - mdio { - lantiq,groups = "mdio"; - lantiq,function = "mdio"; - }; - gphy-leds { - lantiq,groups = "gphy0 led0", "gphy0 led1", - "gphy0 led2", "gphy1 led0", - "gphy1 led1", "gphy1 led2"; - lantiq,function = "gphy"; - lantiq,pull = <2>; - lantiq,open-drain = <0>; - lantiq,output = <1>; - }; - }; -}; - &localbus { flash@0 { compatible = "lantiq,nor"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7510KW22BRN.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-brn.dts similarity index 96% rename from target/linux/lantiq/files/arch/mips/boot/dts/VGV7510KW22BRN.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-brn.dts index 5a33121d72..9f6f405a09 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7510KW22BRN.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-brn.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include "VGV7510KW22.dtsi" +#include "vr9_arcadyan_vgv7510kw22.dtsi" / { compatible = "arcadyan,vgv7510kw22-brn", "arcadyan,vgv7510kw22", "lantiq,xway", "lantiq,vr9"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7510KW22NOR.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-nor.dts similarity index 92% rename from target/linux/lantiq/files/arch/mips/boot/dts/VGV7510KW22NOR.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-nor.dts index 2accffaed7..613ff3782c 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7510KW22NOR.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-nor.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include "VGV7510KW22.dtsi" +#include "vr9_arcadyan_vgv7510kw22.dtsi" / { compatible = "arcadyan,vgv7510kw22-nor", "arcadyan,vgv7510kw22", "lantiq,xway", "lantiq,vr9"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7510KW22.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi similarity index 93% rename from target/linux/lantiq/files/arch/mips/boot/dts/VGV7510KW22.dtsi rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi index f10a9dd8e6..017e473a04 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7510KW22.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi @@ -107,6 +107,11 @@ }; ð0 { + pinctrl-0 = <&mdio_pins>, + <&gphy0_led0_pins>, + <&gphy1_led0_pins>, <&gphy1_led1_pins>; + pinctrl-names = "default"; + lan: interface@0 { compatible = "lantiq,xrx200-pdi"; #address-cells = <1>; @@ -186,21 +191,9 @@ &gpio { pinctrl-names = "default"; - pinctrl-0 = <&state_default>; + pinctrl-0 = <&state_default>, <&gphy0_led1_pins>; state_default: pinmux { - gphy-leds { - lantiq,groups = "gphy0 led0", "gphy0 led1", - "gphy1 led0", "gphy1 led1"; - lantiq,function = "gphy"; - lantiq,open-drain = <0>; - lantiq,pull = <2>; - lantiq,output = <1>; - }; - mdio { - lantiq,groups = "mdio"; - lantiq,function = "mdio"; - }; pci-rst { lantiq,pins = "io21"; lantiq,open-drain = <0>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7519BRN.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-brn.dts similarity index 96% rename from target/linux/lantiq/files/arch/mips/boot/dts/VGV7519BRN.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-brn.dts index c51a44bb3d..051de0c23e 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7519BRN.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-brn.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include "VGV7519.dtsi" +#include "vr9_arcadyan_vgv7519.dtsi" / { compatible = "arcadyan,vgv7519-brn", "arcadyan,vgv7519", "lantiq,xway", "lantiq,vr9"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7519NOR.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-nor.dts similarity index 92% rename from target/linux/lantiq/files/arch/mips/boot/dts/VGV7519NOR.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-nor.dts index aa6a96156f..2121fbf41d 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7519NOR.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-nor.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include "VGV7519.dtsi" +#include "vr9_arcadyan_vgv7519.dtsi" / { compatible = "arcadyan,vgv7519-nor", "arcadyan,vgv7519", "lantiq,xway", "lantiq,vr9"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7519.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi similarity index 93% rename from target/linux/lantiq/files/arch/mips/boot/dts/VGV7519.dtsi rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi index 0b3e72d3ab..e82407d7c3 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7519.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi @@ -127,6 +127,9 @@ }; ð0 { + pinctrl-0 = <&mdio_pins>, <&gphy0_led1_pins>, <&gphy1_led0_pins>; + pinctrl-names = "default"; + lan: interface@0 { compatible = "lantiq,xrx200-pdi"; #address-cells = <1>; @@ -209,30 +212,12 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - stp { - lantiq,groups = "stp"; - lantiq,function = "stp"; - lantiq,open-drain = <0>; - lantiq,output = <1>; - lantiq,pull = <0>; - }; - mdio { - lantiq,groups = "mdio"; - lantiq,function = "mdio"; - }; pci-rst { lantiq,pins = "io21"; lantiq,open-drain = <0>; lantiq,pull = <0>; lantiq,output = <1>; }; - gphy-leds { - lantiq,groups = "gphy0 led1", "gphy1 led0"; - lantiq,function = "gphy"; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - lantiq,output = <1>; - }; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-HYNIX.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2-hynix.dts similarity index 84% rename from target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-HYNIX.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2-hynix.dts index c70f124db5..1aea98260a 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-HYNIX.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2-hynix.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include "FRITZ3370-REV2.dtsi" +#include "vr9_avm_fritz3370-rev2.dtsi" / { compatible = "avm,fritz3370-rev2-hynix", "avm,fritz3370-rev2", "lantiq,xway", "lantiq,vr9"; @@ -13,6 +13,9 @@ bank-width = <2>; reg = <1 0x0 0x2000000>; + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + nand-ecc-mode = "soft"; nand-ecc-strength = <3>; nand-ecc-step-size = <256>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-MICRON.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2-micron.dts similarity index 83% rename from target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-MICRON.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2-micron.dts index 3aaea4cb6d..a19d168159 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-MICRON.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2-micron.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include "FRITZ3370-REV2.dtsi" +#include "vr9_avm_fritz3370-rev2.dtsi" / { compatible = "avm,fritz3370-rev2-micron", "avm,fritz3370-rev2", "lantiq,xway", "lantiq,vr9"; @@ -13,6 +13,9 @@ bank-width = <2>; reg = <1 0x0 0x2000000>; + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + nand-ecc-mode = "on-die"; partitions { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi similarity index 89% rename from target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2.dtsi rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi index f23d2d2cf5..bac27c3649 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi @@ -15,7 +15,7 @@ led-boot = &power_green; led-failsafe = &power_red; led-running = &power_green; - led-upgrade = &power_green; + led-upgrade = &power_red; led-dsl = &dsl; led-internet = &info_green; @@ -193,18 +193,6 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - mdio { - lantiq,groups = "mdio"; - lantiq,function = "mdio"; - }; - - nand { - lantiq,groups = "nand cle", "nand ale", - "nand rd", "nand cs1", "nand rdy"; - lantiq,function = "ebu"; - lantiq,pull = <1>; - }; - phy-rst { lantiq,pins = "io37", "io44"; lantiq,pull = <0>; @@ -218,20 +206,6 @@ lantiq,output = <1>; }; }; - - pins_spi_default: pins_spi_default { - spi_in { - lantiq,groups = "spi_di"; - lantiq,function = "spi"; - }; - - spi_out { - lantiq,groups = "spi_do", "spi_clk", - "spi_cs4"; - lantiq,function = "spi"; - lantiq,output = <1>; - }; - }; }; &pcie0 { @@ -255,9 +229,6 @@ &spi { status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pins_spi_default>; - flash@4 { compatible = "jedec,spi-nor"; reg = <4>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7360SL.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts similarity index 97% rename from target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7360SL.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts index 0fbe6396a8..012300ec57 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7360SL.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; -#include "FRITZ736X.dtsi" +#include "vr9_avm_fritz736x.dtsi" #include #include diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7362SL.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts similarity index 78% rename from target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7362SL.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts index cca79c926e..a061a482da 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7362SL.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; -#include "FRITZ736X.dtsi" +#include "vr9_avm_fritz736x.dtsi" #include #include @@ -35,29 +35,7 @@ label = "fritz7362sl:green:dect"; }; -&gpio { - pins_spi_default: pins_spi_default { - spi_in { - lantiq,groups = "spi_di"; - lantiq,function = "spi"; - }; - - spi_out { - lantiq,groups = "spi_do", "spi_clk", - "spi_cs4"; - lantiq,function = "spi"; - lantiq,output = <1>; - }; - }; -}; - &state_default { - nand { - lantiq,groups = "nand ale", "nand cle", - "nand cs1", "nand rd", "nand rdy"; - lantiq,function = "ebu"; - }; - pcie-rst { lantiq,pins = "io21"; lantiq,open-drain = <1>; @@ -67,8 +45,6 @@ &spi { status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pins_spi_default>; flash@4 { #address-cells = <1>; @@ -103,6 +79,10 @@ lantiq,cs1 = <1>; bank-width = <1>; reg = <1 0x0 0x2000000>; + + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + nand-ecc-mode = "on-die"; partitions { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ736X.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi similarity index 96% rename from target/linux/lantiq/files/arch/mips/boot/dts/FRITZ736X.dtsi rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi index 82546a3572..1553d2f7f4 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ736X.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; #include "vr9.dtsi" @@ -17,7 +16,8 @@ led-boot = &power_green; led-failsafe = &power_red; led-running = &power_green; - led-upgrade = &power_green; + led-upgrade = &power_red; + led-dsl = &info_green; led-wifi = &wifi; }; @@ -155,11 +155,6 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - mdio { - lantiq,groups = "mdio"; - lantiq,function = "mdio"; - }; - phy-rst { lantiq,pins = "io37", "io44"; lantiq,pull = <0>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7412.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts similarity index 88% rename from target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7412.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts index baf3d69fb5..43216d66be 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7412.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts @@ -11,13 +11,14 @@ model = "AVM FRITZ!Box 7412"; chosen { - bootargs = "console=ttyLTQ0,115200 mem=126M vpe1_load_addr=0x87e00000 vpe1_mem=2M maxvpes=1 maxtcs=1 nosmp"; + bootargs = "console=ttyLTQ0,115200"; }; aliases { led-boot = &power_green; led-failsafe = &power_red; led-running = &power_green; + led-upgrade = &power_red; led-dsl = &info; led-wifi = &wifi; @@ -34,13 +35,13 @@ wps { label = "wps"; - gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; linux,code = ; }; dect { label = "dect"; - gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; linux,code = ; }; }; @@ -88,6 +89,9 @@ reg = <0 0x0 0x2000000>; lantiq,cs = <1>; + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + partitions { compatible = "fixed-partitions"; #address-cells = <1>; @@ -166,25 +170,11 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - mdio { - lantiq,groups = "mdio"; - lantiq,function = "mdio"; - }; pcie-rst { lantiq,pins = "io11"; lantiq,open-drain = <1>; lantiq,output = <1>; }; - nand-mux { - lantiq,groups = "nand cle", "nand ale", - "nand rd", "nand cs1", - "nand rdy"; - lantiq,function = "ebu"; - }; - nand-pins { - lantiq,pins = "io13", "io24", "io49"; - lantiq,pull = <1>; - }; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV5A.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts similarity index 93% rename from target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV5A.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts index c105f0a9ae..f6a2d9f6a7 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV5A.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts @@ -197,10 +197,6 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - mdio { - lantiq,groups = "mdio"; - lantiq,function = "mdio"; - }; pci_rst { lantiq,pins = "io21"; lantiq,output = <1>; @@ -218,19 +214,6 @@ lantiq,open-drain = <0>; lantiq,output = <1>; }; - nand_out { - lantiq,groups = "nand cle", "nand ale"; - lantiq,function = "ebu"; - lantiq,output = <1>; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; - nand_cs1 { - lantiq,groups = "nand cs1"; - lantiq,function = "ebu"; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; }; }; @@ -240,6 +223,10 @@ lantiq,cs = <1>; bank-width = <2>; reg = <0x1 0x0 0x2000000>; + + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + nand-on-flash-bbt; nand-ecc-strength = <3>; nand-ecc-step-size = <256>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/WBMR300.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts similarity index 93% rename from target/linux/lantiq/files/arch/mips/boot/dts/WBMR300.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts index 48f6dc71a1..4631ad4ffe 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/WBMR300.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts @@ -225,10 +225,6 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - mdio { - lantiq,groups = "mdio"; - lantiq,function = "mdio"; - }; phy-rst { lantiq,pins = "io42"; lantiq,pull = <0>; @@ -241,26 +237,11 @@ lantiq,output = <1>; }; }; - pins_spi_default: pins_spi_default { - spi_in { - lantiq,groups = "spi_di"; - lantiq,function = "spi"; - }; - spi_out { - lantiq,groups = "spi_do", "spi_clk", - "spi_cs4"; - lantiq,function = "spi"; - lantiq,output = <1>; - }; - }; }; &spi { status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pins_spi_default>; - flash@4 { compatible = "jedec,spi-nor"; reg = <4>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920NAND.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nand.dts similarity index 92% rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY80920NAND.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nand.dts index f687edf54d..585521459b 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920NAND.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nand.dts @@ -1,7 +1,7 @@ /dts-v1/; -#include "EASY80920.dtsi" +#include "vr9_lantiq_easy80920.dtsi" / { compatible = "lantiq,easy80920-nand", "lantiq,easy80920", "lantiq,xway", "lantiq,vr9"; @@ -19,6 +19,9 @@ bank-width = <2>; reg = <0 0x0 0x2000000>; + pinctrl-0 = <&nand_pins>; + pinctrl-names = "default"; + partitions { compatible = "fixed-partitions"; #address-cells = <1>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920NOR.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nor.dts similarity index 94% rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY80920NOR.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nor.dts index 6ed6c5d427..c204c5e093 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920NOR.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nor.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include "EASY80920.dtsi" +#include "vr9_lantiq_easy80920.dtsi" / { compatible = "lantiq,easy80920-nor", "lantiq,easy80920", "lantiq,xway", "lantiq,vr9"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi similarity index 86% rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY80920.dtsi rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi index b7ccb4ed57..4fbc1ac496 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi @@ -189,27 +189,8 @@ lantiq,groups = "exin3"; lantiq,function = "exin"; }; - stp { - lantiq,groups = "stp"; - lantiq,function = "stp"; - }; - nand { - lantiq,groups = "nand cle", "nand ale", - "nand rd", "nand rdy"; - lantiq,function = "ebu"; - }; - mdio { - lantiq,groups = "mdio"; - lantiq,function = "mdio"; - }; - pci { - lantiq,groups = "gnt1", "req1"; - lantiq,function = "pci"; - }; conf_out { - lantiq,pins = "io24", "io13", "io49", /* nand cle, ale and rd */ - "io4", "io5", "io6", /* stp */ - "io21", + lantiq,pins = "io21", "io33"; lantiq,open-drain; lantiq,pull = <0>; @@ -221,29 +202,13 @@ lantiq,output = <1>; }; conf_in { - lantiq,pins = "io39", /* exin3 */ - "io48"; /* nand rdy */ + lantiq,pins = "io39"; /* exin3 */ lantiq,pull = <2>; }; }; - pins_spi_default: pins_spi_default { - spi_in { - lantiq,groups = "spi_di"; - lantiq,function = "spi"; - }; - spi_out { - lantiq,groups = "spi_do", "spi_clk", - "spi_cs4"; - lantiq,function = "spi"; - lantiq,output = <1>; - }; - }; }; &spi { - pinctrl-names = "default"; - pinctrl-0 = <&pins_spi_default>; - status = "okay"; flash@4 { @@ -288,6 +253,11 @@ }; }; +&pci0 { + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>; + pinctrl-names = "default"; +}; + &stp { status = "okay"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/DM200.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts similarity index 86% rename from target/linux/lantiq/files/arch/mips/boot/dts/DM200.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts index 4796123c20..cdba656e49 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/DM200.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts @@ -118,30 +118,6 @@ lantiq,gphy-mode = ; }; -&gpio { - pinctrl-names = "default"; - pinctrl-0 = <&state_default>; - - state_default: pinmux { - mdio { - lantiq,groups = "mdio"; - lantiq,function = "mdio"; - }; - }; - - pins_spi_default: pins_spi_default { - spi_in { - lantiq,groups = "spi_di"; - lantiq,function = "spi"; - }; - spi_out { - lantiq,groups = "spi_do", "spi_clk", "spi_cs4"; - lantiq,function = "spi"; - lantiq,output = <1>; - }; - }; -}; - &pcie0 { status = "disabled"; }; @@ -149,9 +125,6 @@ &spi { status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pins_spi_default>; - flash@4 { compatible = "jedec,spi-nor"; reg = <4>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/TDW8970.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8970.dts similarity index 78% rename from target/linux/lantiq/files/arch/mips/boot/dts/TDW8970.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8970.dts index 25eb3dac67..9b3055983a 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/TDW8970.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8970.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include "TDW89X0.dtsi" +#include "vr9_tplink_tdw89x0.dtsi" / { compatible = "tplink,tdw8970", "tplink,tdw89x0", "lantiq,xway", "lantiq,vr9"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/TDW8980.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8980.dts similarity index 94% rename from target/linux/lantiq/files/arch/mips/boot/dts/TDW8980.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8980.dts index 76875e735d..725aa759d2 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/TDW8980.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8980.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include "TDW89X0.dtsi" +#include "vr9_tplink_tdw89x0.dtsi" / { compatible = "tplink,tdw8980", "tplink,tdw89x0", "lantiq,xway", "lantiq,vr9"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/TDW89X0.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi similarity index 90% rename from target/linux/lantiq/files/arch/mips/boot/dts/TDW89X0.dtsi rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi index 1a7d90a5bf..eabbc0257f 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/TDW89X0.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi @@ -103,6 +103,9 @@ }; ð0 { + pinctrl-0 = <&mdio_pins>, <&gphy0_led1_pins>, <&gphy1_led1_pins>; + pinctrl-names = "default"; + lan: interface@0 { compatible = "lantiq,xrx200-pdi"; #address-cells = <1>; @@ -175,17 +178,6 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - mdio { - lantiq,groups = "mdio"; - lantiq,function = "mdio"; - }; - gphy-leds { - lantiq,groups = "gphy0 led1", "gphy1 led1"; - lantiq,function = "gphy"; - lantiq,pull = <2>; - lantiq,open-drain = <0>; - lantiq,output = <1>; - }; phy-rst { lantiq,pins = "io42"; lantiq,pull = <0>; @@ -198,18 +190,6 @@ lantiq,output = <1>; }; }; - pins_spi_default: pins_spi_default { - spi_in { - lantiq,groups = "spi_di"; - lantiq,function = "spi"; - }; - spi_out { - lantiq,groups = "spi_do", "spi_clk", - "spi_cs4"; - lantiq,function = "spi"; - lantiq,output = <1>; - }; - }; }; &pcie0 { @@ -236,9 +216,6 @@ &spi { status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pins_spi_default>; - flash@4 { compatible = "jedec,spi-nor"; reg = <4>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VR200.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dts similarity index 98% rename from target/linux/lantiq/files/arch/mips/boot/dts/VR200.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dts index 8724e37b47..98f2282579 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/VR200.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include "VR200.dtsi" +#include "vr9_tplink_vr200.dtsi" / { compatible = "tplink,vr200", "lantiq,xway", "lantiq,vr9"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VR200.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi similarity index 86% rename from target/linux/lantiq/files/arch/mips/boot/dts/VR200.dtsi rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi index 3c04785314..77b4f0defb 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/VR200.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi @@ -23,6 +23,9 @@ }; ð0 { + pinctrl-0 = <&mdio_pins>, <&gphy0_led1_pins>, <&gphy1_led1_pins>; + pinctrl-names = "default"; + lan: interface@0 { compatible = "lantiq,xrx200-pdi"; #address-cells = <1>; @@ -95,17 +98,6 @@ pinctrl-0 = <&state_default>; state_default: pinmux { - mdio { - lantiq,groups = "mdio"; - lantiq,function = "mdio"; - }; - gphy-leds { - lantiq,groups = "gphy0 led1", "gphy1 led1"; - lantiq,function = "gphy"; - lantiq,pull = <2>; - lantiq,open-drain = <0>; - lantiq,output = <1>; - }; phy-rst { lantiq,pins = "io42"; lantiq,pull = <0>; @@ -118,16 +110,23 @@ lantiq,output = <1>; }; }; - pins_spi_default: pins_spi_default { - spi_in { - lantiq,groups = "spi_di"; - lantiq,function = "spi"; - }; - spi_out { - lantiq,groups = "spi_do", "spi_clk", - "spi_cs4"; - lantiq,function = "spi"; - lantiq,output = <1>; +}; + +&pcie0 { + pcie@0 { + reg = <0 0 0 0 0>; + #interrupt-cells = <1>; + #size-cells = <2>; + #address-cells = <3>; + device_type = "pci"; + + wifi@0,0 { + reg = <0 0 0 0 0>; + mediatek,mtd-eeprom = <&radio 0x0000>; + big-endian; + ieee80211-freq-limit = <5000000 6000000>; + mtd-mac-address = <&romfile 0xf100>; + mtd-mac-address-increment = <2>; }; }; }; @@ -140,9 +139,6 @@ &spi { status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pins_spi_default>; - flash@4 { compatible = "jedec,spi-nor"; reg = <4>; @@ -189,7 +185,7 @@ read-only; }; - partition@ff0000 { + radio: partition@ff0000 { reg = <0xff0000 0x10000>; label = "radio"; read-only; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VR200v.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_vr200v.dts similarity index 98% rename from target/linux/lantiq/files/arch/mips/boot/dts/VR200v.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_vr200v.dts index 34805bb9f0..2e25a72a83 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/VR200v.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_tplink_vr200v.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include "VR200.dtsi" +#include "vr9_tplink_vr200.dtsi" / { compatible = "tplink,vr200v", "lantiq,xway", "lantiq,vr9"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF1.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts similarity index 90% rename from target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF1.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts index 3159a5a244..4d7aac325b 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF1.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include "P2812HNUFX.dtsi" +#include "vr9_zyxel_p-2812hnu-fx.dtsi" / { compatible = "zyxel,p-2812hnu-f1", "zyxel,p-2812hnu", "lantiq,xway", "lantiq,vr9"; @@ -30,6 +30,9 @@ bank-width = <2>; reg = <0 0x0 0x2000000>; + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + partitions { compatible = "fixed-partitions"; #address-cells = <1>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF3.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts similarity index 89% rename from target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF3.dts rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts index f6e8fd8c83..7da1533809 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF3.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts @@ -1,6 +1,6 @@ /dts-v1/; -#include "P2812HNUFX.dtsi" +#include "vr9_zyxel_p-2812hnu-fx.dtsi" / { compatible = "zyxel,p-2812hnu-f3", "zyxel,p-2812hnu", "lantiq,xway", "lantiq,vr9"; @@ -21,6 +21,9 @@ bank-width = <2>; reg = <0 0x0 0x800000>; + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + partitions { compatible = "fixed-partitions"; #address-cells = <1>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUFX.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-fx.dtsi similarity index 82% rename from target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUFX.dtsi rename to target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-fx.dtsi index 9956a5b89f..5f8392ca44 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUFX.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-fx.dtsi @@ -111,6 +111,11 @@ }; ð0 { + pinctrl-0 = <&mdio_pins>, + <&gphy0_led0_pins>, <&gphy0_led2_pins>, + <&gphy1_led1_pins>, <&gphy1_led2_pins>; + pinctrl-names = "default"; + lan: interface@0 { compatible = "lantiq,xrx200-pdi"; #address-cells = <1>; @@ -196,39 +201,6 @@ lantiq,groups = "exin3"; lantiq,function = "exin"; }; - mdio { - lantiq,groups = "mdio"; - lantiq,function = "mdio"; - }; - gphy-leds { - lantiq,groups = "gphy0 led1", "gphy1 led1", - "gphy0 led2", "gphy1 led2"; - lantiq,function = "gphy"; - lantiq,pull = <2>; - lantiq,open-drain = <0>; - lantiq,output = <1>; - }; - stp { - lantiq,groups = "stp"; - lantiq,function = "stp"; - lantiq,pull = <2>; - lantiq,open-drain = <0>; - lantiq,output = <1>; - }; - pci-in { - lantiq,groups = "req1"; - lantiq,function = "pci"; - lantiq,output = <0>; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - }; - pci-out { - lantiq,groups = "gnt1"; - lantiq,function = "pci"; - lantiq,output = <1>; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; pci_rst { lantiq,pins = "io21"; lantiq,output = <1>; @@ -246,24 +218,15 @@ lantiq,open-drain = <0>; lantiq,output = <1>; }; - nand_out { - lantiq,groups = "nand cle", "nand ale"; - lantiq,function = "ebu"; - lantiq,output = <1>; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; - nand_cs1 { - lantiq,groups = "nand cs1"; - lantiq,function = "ebu"; - lantiq,open-drain = <0>; - lantiq,pull = <0>; - }; }; }; &pci0 { status = "okay"; + + pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>; + pinctrl-names = "default"; + gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY50810.dts b/target/linux/lantiq/files/arch/mips/boot/dts/EASY50810.dts deleted file mode 100644 index 4f101151d1..0000000000 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY50810.dts +++ /dev/null @@ -1,86 +0,0 @@ -/dts-v1/; - -#include "ar9.dtsi" - -/ { - compatible = "lantiq,easy50810", "lantiq,xway", "lantiq,ar9"; - model = "Lantiq EASY50810"; - - chosen { - bootargs = "console=ttyLTQ0,115200"; - }; - - memory@0 { - device_type = "memory"; - reg = <0x0 0x2000000>; - }; -}; - -&gpio { - pinctrl-names = "default"; - pinctrl-0 = <&state_default>; - - state_default: pinmux { - stp { - lantiq,groups = "stp"; - lantiq,function = "stp"; - }; - exin { - lantiq,groups = "exin1"; - lantiq,function = "exin"; - }; - pci { - lantiq,groups = "gnt1"; - lantiq,function = "pci"; - }; - conf_out { - lantiq,pins = "io4", "io5", "io6"; /* stp */ - lantiq,open-drain; - lantiq,pull = <0>; - }; - }; -}; - -&gsw { - phy-mode = "rmii"; -}; - -&localbus { - flash@0 { - compatible = "lantiq,nor"; - bank-width = <2>; - reg = <0 0x0 0x2000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "uboot"; - reg = <0x00000 0x10000>; /* 64 KB */ - }; - - partition@10000 { - label = "uboot_env"; - reg = <0x10000 0x10000>; /* 64 KB */ - }; - - partition@20000 { - label = "firmware"; - reg = <0x20000 0x3d0000>; - }; - - partition@400000 { - label = "rootfs"; - reg = <0x400000 0x400000>; - }; - }; - }; -}; - -&stp { - status = "okay"; - lantiq,shadow = <0xfff>; - lantiq,groups = <0x3>; -}; diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 2352cb6b5e..d0fef7c115 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -15,9 +15,9 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk ifeq ($(SUBTARGET),xway) - UBIFS_OPTS := -m 512 -e 15872 -c 1959 + UBIFS_OPTS := -m 512 -e 15872 -c 1959 else - UBIFS_OPTS := -m 2048 -e 126KiB -c 4096 + UBIFS_OPTS := -m 2048 -e 126KiB -c 4096 endif define Build/append-avm-fakeroot @@ -29,12 +29,12 @@ define Build/dgn3500-sercom-footer endef define Build/mkbrncmdline - mkbrncmdline -i $@ -o $@.new BRN-BOOT - mv $@.new $@ + mkbrncmdline -i $@ -o $@.new BRN-BOOT + mv $@.new $@ endef define Build/mkbrnimg - mkbrnimg -s $(SIGNATURE) -m $(MAGIC) -p $(CRC32_POLY) -o $@ $(IMAGE_KERNEL) $(IMAGE_ROOTFS) + mkbrnimg -s $(SIGNATURE) -m $(MAGIC) -p $(CRC32_POLY) -o $@ $(IMAGE_KERNEL) $(IMAGE_ROOTFS) endef define Build/fullimage @@ -52,6 +52,9 @@ define Build/fullimage rm $@.tmp endef +DEVICE_VARS += IMAGE_SIZE SIGNATURE MAGIC CRC32_POLY +DTS_DIR := $(DTS_DIR)/lantiq + # Shared device definition: applies to every defined device define Device/Default PROFILES = Default @@ -61,11 +64,12 @@ define Device/Default KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma FILESYSTEMS := squashfs IMAGE_SIZE := + SOC := $(DEFAULT_SOC) + DEVICE_DTS = $$(SOC)_$(1) SUPPORTED_DEVICES := $(subst _,$(comma),$(1)) IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) endef -DEVICE_VARS += IMAGE_SIZE define Device/NAND/xway BLOCKSIZE := 16k @@ -91,15 +95,15 @@ define Device/lantiqBrnImage IMAGES := factory.bin IMAGE/factory.bin := mkbrnimg | check-size $$$$(IMAGE_SIZE) endef -DEVICE_VARS += SIGNATURE MAGIC CRC32_POLY define Device/lantiqFullImage KERNEL := kernel-bin | append-dtb | lzma | uImage lzma | pad-offset 4 0 IMAGES := sysupgrade.bin fullimage.bin - IMAGE/fullimage.bin := fullimage | check-size $$$$(IMAGE_SIZE) + IMAGE/fullimage.bin := fullimage | check-size endef define Device/AVM + DEVICE_VENDOR := AVM KERNEL := kernel-bin | append-dtb | lzma | eva-image KERNEL_INITRAMFS := $$(KERNEL) IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-avm-fakeroot | \ @@ -107,742 +111,29 @@ define Device/AVM endef ifeq ($(SUBTARGET),ase) - -define Device/allnet_all0333cj - IMAGE_SIZE := 3700k - DEVICE_DTS := ALL0333CJ - DEVICE_TITLE := Allnet ALL0333CJ - DEVICE_PACKAGES := kmod-ltq-adsl-ase kmod-ltq-adsl-ase-mei \ - kmod-ltq-adsl-ase-fw-b kmod-ltq-atm-ase \ - ltq-adsl-app ppp-mod-pppoe -endef -TARGET_DEVICES += allnet_all0333cj - -define Device/netgear_dgn1000b - IMAGE_SIZE := 6000k - DEVICE_DTS := DGN1000B - DEVICE_TITLE := Netgear DGN1000B - DEVICE_PACKAGES := kmod-ltq-adsl-ase kmod-ltq-adsl-ase-mei \ - kmod-ltq-adsl-ase-fw-b kmod-ltq-atm-ase \ - ltq-adsl-app ppp-mod-pppoe - SUPPORTED_DEVICES += DGN1000B -endef -TARGET_DEVICES += netgear_dgn1000b - +DEFAULT_SOC := amazonse +include amazonse.mk endif ifeq ($(SUBTARGET),xway_legacy) - -define Device/arcadyan_arv4520pw - IMAGE_SIZE := 3648k - DEVICE_DTS := ARV4520PW - DEVICE_TITLE := Easybox 800, WAV-281 - ARV4520PW - DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ - kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ - kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-rt61-pci wpad-mini - SUPPORTED_DEVICES += ARV4520PW -endef -TARGET_DEVICES += arcadyan_arv4520pw - -define Device/arcadyan_arv4525pw - IMAGE_SIZE := 3776k - DEVICE_DTS := ARV4525PW - DEVICE_TITLE := Speedport W502V Typ A - ARV4525PW - DEVICE_PACKAGES := kmod-ath5k wpad-mini \ - kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ - kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ - ltq-adsl-app ppp-mod-pppoa -swconfig - SUPPORTED_DEVICES += ARV4525PW -endef -TARGET_DEVICES += arcadyan_arv4525pw - -define Device/arcadyan_arv452cqw - IMAGE_SIZE := 3776k - DEVICE_DTS := ARV452CQW - DEVICE_TITLE := Easybox 801 - ARV452CQW - DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ - kmod-ath5k wpad-mini \ - kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ - kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ - ltq-adsl-app ppp-mod-pppoa - SUPPORTED_DEVICES += ARV452CQW -endef -TARGET_DEVICES += arcadyan_arv452cqw - -define Device/arcadyan_arv4518pwr01 - IMAGE_SIZE := 3776k - DEVICE_DTS := ARV4518PWR01 - DEVICE_TITLE := ARV4518PWR01 - DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ - kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ - kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-ath5k wpad-mini - SUPPORTED_DEVICES += ARV4518PWR01 -endef -TARGET_DEVICES += arcadyan_arv4518pwr01 - -define Device/arcadyan_arv4518pwr01a - IMAGE_SIZE := 3776k - DEVICE_DTS := ARV4518PWR01A - DEVICE_TITLE := ARV4518PWR01A - DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ - kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ - kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-ath5k wpad-basic - SUPPORTED_DEVICES += ARV4518PWR01A -endef -TARGET_DEVICES += arcadyan_arv4518pwr01a - +DEFAULT_SOC := danube +include xway_legacy.mk endif ifeq ($(SUBTARGET),xway) - -# Danube - -define Device/bt_homehub-v2b - $(Device/NAND) - BOARD_NAME := BTHOMEHUBV2B - DEVICE_DTS := BTHOMEHUBV2B - DEVICE_TITLE := BT Home Hub 2B - DEVICE_PACKAGES := kmod-usb-dwc2 \ - kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ - kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ - kmod-ltq-deu-danube \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-ath9k kmod-owl-loader wpad-basic - SUPPORTED_DEVICES += BTHOMEHUBV2B -endef -TARGET_DEVICES += bt_homehub-v2b - -define Device/lantiq_easy50712 - DEVICE_DTS := EASY50712 - IMAGE_SIZE := 3776k - DEVICE_TITLE := Lantiq Danube - EASY50712 -endef -TARGET_DEVICES += lantiq_easy50712 - -define Device/audiocodes_mp-252 - IMAGE_SIZE := 14848k - DEVICE_DTS := ACMP252 - DEVICE_TITLE := AudioCodes MediaPack MP-252 - DEVICE_PACKAGES := kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ - kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ - kmod-ltq-tapi kmod-ltq-vmmc \ - kmod-usb-ledtrig-usbport kmod-usb-dwc2 \ - kmod-rt2800-pci \ - ltq-adsl-app ppp-mod-pppoa \ - wpad-basic - SUPPORTED_DEVICES += ACMP252 -endef -TARGET_DEVICES += audiocodes_mp-252 - -define Device/arcadyan_arv4510pw - IMAGE_SIZE := 15616k - DEVICE_DTS := ARV4510PW - DEVICE_TITLE := Wippies, Elisa - ARV4510PW - DEVICE_PACKAGES := kmod-usb-ledtrig-usbport kmod-usb2-pci kmod-usb-uhci \ - kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ - kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-ltq-tapi kmod-ltq-vmmc \ - kmod-rt2800-pci kmod-ath5k wpad-basic - SUPPORTED_DEVICES += ARV4510PW -endef -TARGET_DEVICES += arcadyan_arv4510pw - -define Device/arcadyan_arv7525pw - IMAGE_SIZE := 3776k - DEVICE_DTS := ARV4510PW - DEVICE_TITLE := Speedport W303V Typ A - ARV7525PW - DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic \ - kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ - kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ - ltq-adsl-app ppp-mod-pppoa -swconfig - SUPPORTED_DEVICES += ARV4510PW -endef -TARGET_DEVICES += arcadyan_arv7525pw - -define Device/arcadyan_arv4519pw - IMAGE_SIZE := 3776k - DEVICE_DTS := ARV4519PW - DEVICE_TITLE := Vodafone, Pirelli - ARV4519PW - DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ - kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ - kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ - ltq-adsl-app ppp-mod-pppoa - SUPPORTED_DEVICES += ARV4519PW -endef -TARGET_DEVICES += arcadyan_arv4519pw - -define Device/arcadyan_arv7506pw11 - IMAGE_SIZE := 7808k - DEVICE_DTS := ARV7506PW11 - DEVICE_TITLE := Alice/O2 IAD 4421 - ARV7506PW11 - DEVICE_PACKAGES := kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ - kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-rt2800-pci wpad-basic - SUPPORTED_DEVICES += ARV7506PW11 -endef -TARGET_DEVICES += arcadyan_arv7506pw11 - -define Device/arcadyan_arv7510pw22 - IMAGE_SIZE := 31232k - DEVICE_DTS := ARV7510PW22 - DEVICE_TITLE := Astoria - ARV7510PW22 - DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ - kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ - kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-ltq-tapi kmod-ltq-vmmc \ - kmod-rt2800-pci wpad-basic \ - kmod-usb-uhci kmod-usb2 kmod-usb2-pci - SUPPORTED_DEVICES += ARV7510PW22 -endef -TARGET_DEVICES += arcadyan_arv7510pw22 - -define Device/arcadyan_arv7518pw - IMAGE_SIZE := 7872k - DEVICE_DTS := ARV7518PW - DEVICE_TITLE := Astoria - ARV7518PW - DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ - kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ - kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-ath9k kmod-owl-loader wpad-basic - SUPPORTED_DEVICES += ARV7518PW -endef -TARGET_DEVICES += arcadyan_arv7518pw - -define Device/arcadyan_arv7519pw - IMAGE_SIZE := 15488k - DEVICE_DTS := ARV7519PW - DEVICE_TITLE := Astoria - ARV7519PW - DEVICE_PACKAGES := kmod-usb-dwc2 \ - kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ - kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-rt2800-pci wpad-basic - SUPPORTED_DEVICES += ARV7519PW -endef -TARGET_DEVICES += arcadyan_arv7519pw - -define Device/arcadyan_arv752dpw - IMAGE_SIZE := 7872k - DEVICE_DTS := ARV752DPW - DEVICE_TITLE := Easybox 802 - ARV752DPW - DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ - kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ - kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-ltq-tapi kmod-ltq-vmmc \ - kmod-rt2800-pci wpad-basic - SUPPORTED_DEVICES += ARV752DPW -endef -TARGET_DEVICES += arcadyan_arv752dpw - -define Device/arcadyan_arv752dpw22 - IMAGE_SIZE := 7616k - DEVICE_DTS := ARV752DPW22 - DEVICE_TITLE := Easybox 803 - ARV752DPW22 - DEVICE_PACKAGES := kmod-usb2-pci kmod-usb-uhci kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ - kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ - kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-ltq-tapi kmod-ltq-vmmc \ - kmod-rt2800-pci wpad-basic - SUPPORTED_DEVICES += ARV752DPW22 -endef -TARGET_DEVICES += arcadyan_arv752dpw22 - -define Device/arcadyan_arv8539pw22 - IMAGE_SIZE := 7616k - DEVICE_DTS := ARV8539PW22 - DEVICE_TITLE := Speedport W504V Typ A - ARV8539PW22 - DEVICE_PACKAGES := kmod-usb-dwc2 \ - kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ - kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-ath9k kmod-owl-loader wpad-basic - SUPPORTED_DEVICES += ARV8539PW22 -endef -TARGET_DEVICES += arcadyan_arv8539pw22 - -define Device/siemens_gigaset-sx76x - IMAGE_SIZE := 7680k - DEVICE_DTS := GIGASX76X - DEVICE_TITLE := Gigaset sx76x - DEVICE_PACKAGES := kmod-usb-dwc2 \ - kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ - kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ - ltq-adsl-app ppp-mod-pppoe \ - kmod-ath5k wpad-basic - SUPPORTED_DEVICES += GIGASX76X -endef -TARGET_DEVICES += siemens_gigaset-sx76x - - -# AR9 - -define Device/bt_homehub-v3a - $(Device/NAND) - BOARD_NAME := BTHOMEHUBV3A - DEVICE_DTS := BTHOMEHUBV3A - DEVICE_TITLE := BT Home Hub 3A - DEVICE_PACKAGES := kmod-usb-dwc2 \ - kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ - kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \ - kmod-ltq-deu-ar9 \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-ath9k kmod-owl-loader wpad-basic \ - uboot-envtools - SUPPORTED_DEVICES += BTHOMEHUBV3A -endef -TARGET_DEVICES += bt_homehub-v3a - -DGN3500_KERNEL_OFFSET_HEX=0x50000 -DGN3500_KERNEL_OFFSET_DEC=327680 -define Device/netgear_dgn3500 - DEVICE_DTS := DGN3500 - IMAGE_SIZE := 16000k - IMAGES := \ - sysupgrade-na.bin sysupgrade.bin \ - factory-na.img factory.img - IMAGE/sysupgrade-na.bin := \ - append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "NA" | \ - pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) - IMAGE/sysupgrade.bin := \ - append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "WW" | \ - pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) - IMAGE/factory-na.img := \ - pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \ - dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "NA" | pad-rootfs | \ - check-size 16320k | pad-to 16384k - IMAGE/factory.img := \ - pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \ - dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "WW" | pad-rootfs | \ - check-size 16320k | pad-to 16384k - DEVICE_TITLE := Netgear DGN3500 - DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ - kmod-ath9k kmod-owl-loader wpad-basic \ - kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ - kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-ltq-deu-ar9 - SUPPORTED_DEVICES += DGN3500 -endef -TARGET_DEVICES += netgear_dgn3500 - -define Device/netgear_dgn3500b - DEVICE_DTS := DGN3500B - IMAGE_SIZE := 16000k - IMAGES += factory.img - IMAGE/sysupgrade.bin := \ - append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "DE" | \ - pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) - IMAGE/factory.img := \ - pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \ - dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "DE" | pad-rootfs | \ - check-size 16320k | pad-to 16384k - DEVICE_TITLE := Netgear DGN3500B - DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ - kmod-ath9k kmod-owl-loader wpad-basic \ - kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ - kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-ltq-deu-ar9 - SUPPORTED_DEVICES += DGN3500B -endef -TARGET_DEVICES += netgear_dgn3500b - -define Device/buffalo_wbmr-hp-g300h-a - IMAGE_SIZE := 31488k - DEVICE_DTS := WBMR - DEVICE_TITLE := Buffalo WBMR-HP-G300H (A) - WBMR - DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ - kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ - kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-ath9k kmod-owl-loader wpad-basic - SUPPORTED_DEVICES := WBMR buffalo,wbmr-hp-g300h -endef -TARGET_DEVICES += buffalo_wbmr-hp-g300h-a - -define Device/buffalo_wbmr-hp-g300h-b - IMAGE_SIZE := 31488k - DEVICE_DTS := WBMR - DEVICE_TITLE := Buffalo WBMR-HP-G300H (B) - WBMR - DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ - kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ - kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-ath9k kmod-owl-loader wpad-basic - SUPPORTED_DEVICES := WBMR buffalo,wbmr-hp-g300h -endef -TARGET_DEVICES += buffalo_wbmr-hp-g300h-b - -define Device/avm_fritz7312 - $(Device/AVM) - DEVICE_DTS := FRITZ7312 - IMAGE_SIZE := 15744k - DEVICE_TITLE := AVM FRITZ!Box 7312 - DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic \ - kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ - kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-ltq-deu-ar9 -swconfig -endef -TARGET_DEVICES += avm_fritz7312 - -define Device/avm_fritz7320 - $(Device/AVM) - DEVICE_DTS := FRITZ7320 - IMAGE_SIZE := 15744k - DEVICE_TITLE := AVM FRITZ!Box 7320 - DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic \ - kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ - kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ - ltq-adsl-app ppp-mod-pppoa \ - kmod-ltq-deu-ar9 kmod-usb-dwc2 -swconfig - SUPPORTED_DEVICES += FRITZ7320 -endef -TARGET_DEVICES += avm_fritz7320 - -define Device/zte_h201l - IMAGE_SIZE := 7808k - DEVICE_DTS := H201L - DEVICE_TITLE := ZTE H201L - H201L - DEVICE_PACKAGES := kmod-ath9k-htc wpad-basic \ - kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ - kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ - ltq-adsl-app ppp-mod-pppoe \ - kmod-ltq-deu-ar9 kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ - kmod-ltq-tapi kmod-ltq-vmmc - SUPPORTED_DEVICES += H201L -endef -TARGET_DEVICES += zte_h201l - -define Device/zyxel_p-2601hn - IMAGE_SIZE := 15616k - DEVICE_DTS := P2601HNFX - DEVICE_TITLE := ZyXEL P-2601HN-Fx - DEVICE_PACKAGES := kmod-rt2800-usb wpad-basic \ - kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ - kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ - ltq-adsl-app ppp-mod-pppoe \ - kmod-ltq-deu-ar9 kmod-usb-dwc2 - SUPPORTED_DEVICES += P2601HNFX -endef -TARGET_DEVICES += zyxel_p-2601hn - - +include danube.mk +include ar9.mk endif - ifeq ($(SUBTARGET),xrx200) - -# VR9 - -define Device/zyxel_p-2812hnu-f1 - $(Device/NAND) - BOARD_NAME := P2812HNUF1 - DEVICE_DTS := P2812HNUF1 - DEVICE_TITLE := ZyXEL P-2812HNU-F1 - DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport - KERNEL_SIZE := 3072k - SUPPORTED_DEVICES += P2812HNUF1 -endef -TARGET_DEVICES += zyxel_p-2812hnu-f1 - -define Device/zyxel_p-2812hnu-f3 - $(Device/NAND) - BOARD_NAME := P2812HNUF3 - DEVICE_DTS := P2812HNUF3 - DEVICE_TITLE := ZyXEL P-2812HNU-F3 - DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 - SUPPORTED_DEVICES += P2812HNUF3 -endef -TARGET_DEVICES += zyxel_p-2812hnu-f3 - -define Device/arcadyan_arv7519rw22 - IMAGE_SIZE := 31232k - DEVICE_DTS := ARV7519RW22 - DEVICE_TITLE := Livebox Astoria ARV7519RW22 - DEVICE_PACKAGES := kmod-usb-dwc2 - SUPPORTED_DEVICES += ARV7519RW22 -endef -TARGET_DEVICES += arcadyan_arv7519rw22 - -define Device/alphanetworks_asl56026 - DEVICE_DTS := ASL56026 - IMAGE_SIZE := 7488k - DEVICE_TITLE := BT OpenReach - ECI VDSL Modem V-2FUb/I -endef -TARGET_DEVICES += alphanetworks_asl56026 - -define Device/bt_homehub-v5a - $(Device/NAND) - BOARD_NAME := BTHOMEHUBV5A - DEVICE_DTS := BTHOMEHUBV5A - DEVICE_TITLE := BT Home Hub 5A - DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader \ - kmod-ath10k-ct ath10k-firmware-qca988x-ct wpad-basic kmod-usb-dwc2 - SUPPORTED_DEVICES += BTHOMEHUBV5A -endef -TARGET_DEVICES += bt_homehub-v5a - -define Device/netgear_dm200 - DEVICE_DTS := DM200 - IMAGES := sysupgrade.bin factory.img - IMAGE/sysupgrade.bin := append-kernel | \ - pad-offset 64k 64 | append-uImage-fakehdr filesystem | \ - pad-offset 64k 64 | append-uImage-fakehdr filesystem | \ - append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) - IMAGE/factory.img := $$(IMAGE/sysupgrade.bin) | netgear-dni - IMAGE_SIZE := 7872k - DEVICE_TITLE := Netgear DM200 - NETGEAR_BOARD_ID := DM200 - NETGEAR_HW_ID := 29765233+8+0+64+0+0 -endef -DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID -TARGET_DEVICES += netgear_dm200 - -define Device/lantiq_easy80920-nand - $(Device/lantiqFullImage) - DEVICE_DTS := EASY80920NAND - IMAGE_SIZE := 64512k - DEVICE_TITLE := Lantiq VR9 - EASY80920NAND - DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport -endef -TARGET_DEVICES += lantiq_easy80920-nand - -define Device/lantiq_easy80920-nor - DEVICE_DTS := EASY80920NOR - IMAGE_SIZE := 7936k - DEVICE_TITLE := Lantiq VR9 - EASY80920NOR - DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport -endef -TARGET_DEVICES += lantiq_easy80920-nor - -define Device/avm_fritz3370 - $(Device/AVM) - $(Device/NAND) - DEVICE_DTS := FRITZ3370 - DEVICE_TITLE := AVM FRITZ!Box 3370 Rev. 2 - KERNEL_SIZE := 4096k - UBINIZE_OPTS := -E 5 - IMAGES += eva-kernel.bin eva-filesystem.bin - IMAGE/eva-kernel.bin := append-kernel - IMAGE/eva-filesystem.bin := append-ubi - DEVICE_PACKAGES := kmod-ath9k wpad-basic kmod-usb-dwc2 fritz-tffs -endef - -define Device/avm_fritz3370-rev2-hynix - $(Device/avm_fritz3370) - DEVICE_DTS := FRITZ3370-REV2-HYNIX - DEVICE_TITLE := AVM FRITZ!Box 3370 Rev. 2 (Hynix NAND) -endef -TARGET_DEVICES += avm_fritz3370-rev2-hynix - -define Device/avm_fritz3370-rev2-micron - $(Device/avm_fritz3370) - DEVICE_DTS := FRITZ3370-REV2-MICRON - DEVICE_TITLE := AVM FRITZ!Box 3370 Rev. 2 (Micron NAND) -endef -TARGET_DEVICES += avm_fritz3370-rev2-micron - -define Device/avm_fritz7360sl - $(Device/AVM) - IMAGE_SIZE := 15744k - DEVICE_DTS := FRITZ7360SL - DEVICE_TITLE := AVM FRITZ!Box 7360 SL - DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2 - SUPPORTED_DEVICES += FRITZ7360SL -endef -TARGET_DEVICES += avm_fritz7360sl - -define Device/avm_fritz7412 - $(Device/AVM) - $(Device/NAND) - BOARD_NAME := FRITZ7412 - DEVICE_DTS := FRITZ7412 - KERNEL_SIZE := 4096k - IMAGE_SIZE := 49152k - DEVICE_TITLE := AVM FRITZ!Box 7412 - DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-ltq-tapi kmod-ltq-vmmc fritz-tffs-nand fritz-caldata -endef -TARGET_DEVICES += avm_fritz7412 - -define Device/avm_fritz7362sl - $(Device/AVM) - $(Device/NAND) - KERNEL_SIZE := 4096k - IMAGE_SIZE := 49152k - DEVICE_DTS := FRITZ7362SL - DEVICE_TITLE := AVM FRITZ!Box 7362 SL - DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2 fritz-tffs -endef -TARGET_DEVICES += avm_fritz7362sl - -define Device/arcadyan_vg3503j - IMAGE_SIZE := 8000k - DEVICE_DTS := VG3503J - DEVICE_TITLE := BT OpenReach - ECI VDSL Modem V-2FUb/R - SUPPORTED_DEVICES += VG3503J -endef -TARGET_DEVICES += arcadyan_vg3503j - +DEFAULT_SOC := vr9 include tp-link.mk - -define Device/buffalo_wbmr-300hpd - IMAGE_SIZE := 15616k - DEVICE_DTS := WBMR300 - DEVICE_TITLE := Buffalo WBMR-300HPD - DEVICE_PACKAGES := kmod-mt7603 wpad-basic kmod-usb-dwc2 - SUPPORTED_DEVICES += WBMR300 -endef -TARGET_DEVICES += buffalo_wbmr-300hpd - -define Device/arcadyan_vgv7510kw22-nor - IMAGE_SIZE := 15232k - DEVICE_DTS := VGV7510KW22NOR - DEVICE_TITLE := o2 Box 6431 / Arcadyan VGV7510KW22 (NOR) - DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc - SUPPORTED_DEVICES += VGV7510KW22NOR -endef -TARGET_DEVICES += arcadyan_vgv7510kw22-nor - -define Device/arcadyan_vgv7510kw22-brn - $(Device/lantiqBrnImage) - IMAGE_SIZE := 7168k - DEVICE_DTS := VGV7510KW22BRN - SIGNATURE := BRNDA6431 - MAGIC := 0x12345678 - CRC32_POLY := 0x04c11db7 - DEVICE_TITLE := o2 Box 6431 / Arcadyan VGV7510KW22 (BRN) - DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc - SUPPORTED_DEVICES += VGV7510KW22BRN -endef -TARGET_DEVICES += arcadyan_vgv7510kw22-brn - -define Device/arcadyan_vgv7519-nor - IMAGE_SIZE := 15360k - DEVICE_DTS := VGV7519NOR - DEVICE_TITLE := Experiabox 8 VGV7519 - DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc - SUPPORTED_DEVICES += VGV7519NOR -endef -TARGET_DEVICES += arcadyan_vgv7519-nor - -define Device/arcadyan_vgv7519-brn - $(Device/lantiqBrnImage) - IMAGE_SIZE := 7168k - DEVICE_DTS := VGV7519BRN - SIGNATURE := 5D00008000 - MAGIC := 0x12345678 - CRC32_POLY := 0x2083b8ed - DEVICE_TITLE := Experiabox 8 VGV7519 (BRN) - DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc - SUPPORTED_DEVICES += VGV7519BRN -endef -TARGET_DEVICES += arcadyan_vgv7519-brn - +include vr9.mk endif - ifeq ($(SUBTARGET),falcon) - -define Device/lantiq_easy98000-nor - IMAGE_SIZE := 3904k - DEVICE_DTS := EASY98000NOR - DEVICE_TITLE := EASY98000 - Lantiq Falcon Eval Board NOR - DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24 -endef -TARGET_DEVICES += lantiq_easy98000-nor - -define Device/lantiq_easy98000-nand - IMAGE_SIZE := 3904k - DEVICE_DTS := EASY98000NAND - DEVICE_TITLE := EASY98000 - Lantiq Falcon Eval Board NAND - DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24 -endef -TARGET_DEVICES += lantiq_easy98000-nand - -define Device/lantiq_easy98000-sflash - IMAGE_SIZE := 7424k - DEVICE_DTS := EASY98000SFLASH - DEVICE_TITLE := EASY98000 - Lantiq Falcon Eval Board SFLASH - DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24 -endef -TARGET_DEVICES += lantiq_easy98000-sflash - -define Device/lantiq_falcon-mdu - IMAGE_SIZE := 7424k - DEVICE_DTS := FALCON-MDU - DEVICE_TITLE := MDU - Lantiq Falcon / VINAXdp MDU Board -endef -TARGET_DEVICES += lantiq_falcon-mdu - -define Device/lantiq_easy88388 - IMAGE_SIZE := 7424k - DEVICE_DTS := EASY88388 - DEVICE_TITLE := EASY88388 - Lantiq Falcon FTTDP8 Reference Board -endef -TARGET_DEVICES += lantiq_easy88388 - -define Device/lantiq_easy88444 - IMAGE_SIZE := 7424k - DEVICE_DTS := EASY88444 - DEVICE_TITLE := EASY88444 - Lantiq Falcon FTTdp G.FAST Reference Board -endef -TARGET_DEVICES += lantiq_easy88444 - -define Device/lantiq_falcon-sfp - IMAGE_SIZE := 7424k - DEVICE_DTS := FALCON-SFP - DEVICE_TITLE := SFP - Lantiq Falcon SFP Stick -endef -TARGET_DEVICES += lantiq_falcon-sfp - -define Device/lantiq_easy98035synce - IMAGE_SIZE := 7424k - DEVICE_DTS := EASY98035SYNCE - DEVICE_TITLE := EASY98035SYNCE - Lantiq Falcon SFP Stick with Synchronous Ethernet -endef -TARGET_DEVICES += lantiq_easy98035synce - -define Device/lantiq_easy98035synce1588 - IMAGE_SIZE := 7424k - DEVICE_DTS := EASY98035SYNCE1588 - DEVICE_TITLE := EASY98035SYNCE1588 - Lantiq Falcon SFP Stick with SyncE and IEEE1588 -endef -TARGET_DEVICES += lantiq_easy98035synce1588 - -define Device/lantiq_easy98020 - IMAGE_SIZE := 7424k - DEVICE_DTS := EASY98020 - DEVICE_TITLE := EASY98020 - Lantiq Falcon SFU Reference Board -endef -TARGET_DEVICES += lantiq_easy98020 - -define Device/lantiq_easy98020-v18 - IMAGE_SIZE := 7424k - DEVICE_DTS := EASY98020V18 - DEVICE_TITLE := EASY98020V18 - Lantiq Falcon SFU Reference Board V1.8 -endef -TARGET_DEVICES += lantiq_easy98020-v18 - -define Device/lantiq_easy98021 - IMAGE_SIZE := 7424k - DEVICE_DTS := EASY98021 - DEVICE_TITLE := EASY98021 - Lantiq Falcon HGU Reference Board -endef -TARGET_DEVICES += lantiq_easy98021 - +DEFAULT_SOC := falcon +include falcon.mk endif $(eval $(call BuildImage)) diff --git a/target/linux/lantiq/image/amazonse.mk b/target/linux/lantiq/image/amazonse.mk new file mode 100644 index 0000000000..4a23a68e40 --- /dev/null +++ b/target/linux/lantiq/image/amazonse.mk @@ -0,0 +1,20 @@ +define Device/allnet_all0333cj + DEVICE_VENDOR := Allnet + DEVICE_MODEL := ALL0333CJ + IMAGE_SIZE := 3700k + DEVICE_PACKAGES := kmod-ltq-adsl-ase kmod-ltq-adsl-ase-mei \ + kmod-ltq-adsl-ase-fw-b kmod-ltq-atm-ase \ + ltq-adsl-app ppp-mod-pppoe +endef +TARGET_DEVICES += allnet_all0333cj + +define Device/netgear_dgn1000b + DEVICE_VENDOR := NETGEAR + DEVICE_MODEL := DGN1000B + IMAGE_SIZE := 6000k + DEVICE_PACKAGES := kmod-ltq-adsl-ase kmod-ltq-adsl-ase-mei \ + kmod-ltq-adsl-ase-fw-b kmod-ltq-atm-ase \ + ltq-adsl-app ppp-mod-pppoe + SUPPORTED_DEVICES += DGN1000B +endef +TARGET_DEVICES += netgear_dgn1000b diff --git a/target/linux/lantiq/image/ar9.mk b/target/linux/lantiq/image/ar9.mk new file mode 100644 index 0000000000..73e2ab89b2 --- /dev/null +++ b/target/linux/lantiq/image/ar9.mk @@ -0,0 +1,165 @@ +define Device/avm_fritz7312 + $(Device/AVM) + DEVICE_MODEL := FRITZ!Box 7312 + SOC := ar9 + IMAGE_SIZE := 15744k + DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic \ + kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ + kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-ltq-deu-ar9 -swconfig +endef +TARGET_DEVICES += avm_fritz7312 + +define Device/avm_fritz7320 + $(Device/AVM) + DEVICE_MODEL := FRITZ!Box 7320 + DEVICE_ALT0_VENDOR := 1&1 + DEVICE_ALT0_MODEL := HomeServer + SOC := ar9 + IMAGE_SIZE := 15744k + DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic \ + kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ + kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-ltq-deu-ar9 kmod-usb-dwc2 -swconfig + SUPPORTED_DEVICES += FRITZ7320 +endef +TARGET_DEVICES += avm_fritz7320 + +define Device/bt_homehub-v3a + $(Device/NAND) + DEVICE_VENDOR := British Telecom + DEVICE_MODEL := Home Hub 3 + DEVICE_VARIANT := Type A + BOARD_NAME := BTHOMEHUBV3A + SOC := ar9 + DEVICE_PACKAGES := kmod-usb-dwc2 \ + kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ + kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \ + kmod-ltq-deu-ar9 \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-ath9k kmod-owl-loader wpad-basic \ + uboot-envtools + SUPPORTED_DEVICES += BTHOMEHUBV3A +endef +TARGET_DEVICES += bt_homehub-v3a + +define Device/buffalo_wbmr-hp-g300h-a + DEVICE_VENDOR := Buffalo + DEVICE_MODEL := WBMR-HP-G300H + DEVICE_VARIANT := A + IMAGE_SIZE := 31488k + SOC := ar9 + DEVICE_DTS := ar9_buffalo_wbmr-hp-g300h + DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ + kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ + kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-ath9k kmod-owl-loader wpad-basic + SUPPORTED_DEVICES := WBMR buffalo,wbmr-hp-g300h +endef +TARGET_DEVICES += buffalo_wbmr-hp-g300h-a + +define Device/buffalo_wbmr-hp-g300h-b + DEVICE_VENDOR := Buffalo + DEVICE_MODEL := WBMR-HP-G300H + DEVICE_VARIANT := B + IMAGE_SIZE := 31488k + SOC := ar9 + DEVICE_DTS := ar9_buffalo_wbmr-hp-g300h + DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ + kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ + kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-ath9k kmod-owl-loader wpad-basic + SUPPORTED_DEVICES := WBMR buffalo,wbmr-hp-g300h +endef +TARGET_DEVICES += buffalo_wbmr-hp-g300h-b + +DGN3500_KERNEL_OFFSET_HEX=0x50000 +DGN3500_KERNEL_OFFSET_DEC=327680 +define Device/netgear_dgn3500 + DEVICE_VENDOR := NETGEAR + DEVICE_MODEL := DGN3500 + SOC := ar9 + IMAGE_SIZE := 16000k + IMAGES := \ + sysupgrade-na.bin sysupgrade.bin \ + factory-na.img factory.img + IMAGE/sysupgrade-na.bin := \ + append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "NA" | \ + pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) + IMAGE/sysupgrade.bin := \ + append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "WW" | \ + pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) + IMAGE/factory-na.img := \ + pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \ + dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "NA" | pad-rootfs | \ + check-size 16320k | pad-to 16384k + IMAGE/factory.img := \ + pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \ + dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "WW" | pad-rootfs | \ + check-size 16320k | pad-to 16384k + DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ + kmod-ath9k kmod-owl-loader wpad-basic \ + kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ + kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-ltq-deu-ar9 + SUPPORTED_DEVICES += DGN3500 +endef +TARGET_DEVICES += netgear_dgn3500 + +define Device/netgear_dgn3500b + DEVICE_VENDOR := NETGEAR + DEVICE_MODEL := DGN3500B + SOC := ar9 + IMAGE_SIZE := 16000k + IMAGES += factory.img + IMAGE/sysupgrade.bin := \ + append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "DE" | \ + pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) + IMAGE/factory.img := \ + pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \ + dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "DE" | pad-rootfs | \ + check-size 16320k | pad-to 16384k + DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ + kmod-ath9k kmod-owl-loader wpad-basic \ + kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ + kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-ltq-deu-ar9 + SUPPORTED_DEVICES += DGN3500B +endef +TARGET_DEVICES += netgear_dgn3500b + +define Device/zte_h201l + DEVICE_VENDOR := ZTE + DEVICE_MODEL := H201L + IMAGE_SIZE := 7808k + SOC := ar9 + DEVICE_PACKAGES := kmod-ath9k-htc wpad-basic \ + kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ + kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ + ltq-adsl-app ppp-mod-pppoe \ + kmod-ltq-deu-ar9 kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ + kmod-ltq-tapi kmod-ltq-vmmc + SUPPORTED_DEVICES += H201L +endef +TARGET_DEVICES += zte_h201l + +define Device/zyxel_p-2601hn + DEVICE_VENDOR := ZyXEL + DEVICE_MODEL := P-2601HN + DEVICE_VARIANT := F1/F3 + IMAGE_SIZE := 15616k + SOC := ar9 + DEVICE_PACKAGES := kmod-rt2800-usb wpad-basic \ + kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ + kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ + ltq-adsl-app ppp-mod-pppoe \ + kmod-ltq-deu-ar9 kmod-usb-dwc2 + SUPPORTED_DEVICES += P2601HNFX +endef +TARGET_DEVICES += zyxel_p-2601hn diff --git a/target/linux/lantiq/image/danube.mk b/target/linux/lantiq/image/danube.mk new file mode 100644 index 0000000000..2fb5ea061f --- /dev/null +++ b/target/linux/lantiq/image/danube.mk @@ -0,0 +1,219 @@ +define Device/arcadyan_arv4510pw + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := ARV4510PW + DEVICE_ALT0_VENDOR := Wippies + DEVICE_ALT0_MODEL := BeWan iBox v1.0 + IMAGE_SIZE := 15616k + SOC := danube + DEVICE_PACKAGES := kmod-usb-ledtrig-usbport kmod-usb2-pci kmod-usb-uhci \ + kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-ltq-tapi kmod-ltq-vmmc \ + kmod-rt2800-pci kmod-ath5k wpad-basic + SUPPORTED_DEVICES += ARV4510PW +endef +TARGET_DEVICES += arcadyan_arv4510pw + +define Device/arcadyan_arv4519pw + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := ARV4519PW + DEVICE_ALT0_VENDOR := Vodafone + DEVICE_ALT0_MODEL := NetFasteR IAD 2 + DEVICE_ALT1_VENDOR := Pirelli + DEVICE_ALT1_MODEL := P.RG A4201G + IMAGE_SIZE := 3776k + SOC := danube + DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ + kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ + ltq-adsl-app ppp-mod-pppoa + SUPPORTED_DEVICES += ARV4519PW +endef +TARGET_DEVICES += arcadyan_arv4519pw + +define Device/arcadyan_arv7506pw11 + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := ARV7506PW11 + DEVICE_ALT0_VENDOR := Alice/O2 + DEVICE_ALT0_MODEL := IAD 4421 + IMAGE_SIZE := 7808k + SOC := danube + DEVICE_PACKAGES := kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-rt2800-pci wpad-basic + SUPPORTED_DEVICES += ARV7506PW11 +endef +TARGET_DEVICES += arcadyan_arv7506pw11 + +define Device/arcadyan_arv7510pw22 + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := ARV7510PW22 + DEVICE_ALT0_VENDOR := Astoria Networks + DEVICE_ALT0_MODEL := ARV7510PW22 + IMAGE_SIZE := 31232k + SOC := danube + DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ + kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-ltq-tapi kmod-ltq-vmmc \ + kmod-rt2800-pci wpad-basic \ + kmod-usb-uhci kmod-usb2 kmod-usb2-pci + SUPPORTED_DEVICES += ARV7510PW22 +endef +TARGET_DEVICES += arcadyan_arv7510pw22 + +define Device/arcadyan_arv7518pw + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := ARV7518PW + DEVICE_ALT0_VENDOR := Astoria Networks + DEVICE_ALT0_MODEL := ARV7518PW + IMAGE_SIZE := 7872k + SOC := danube + DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ + kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-ath9k kmod-owl-loader wpad-basic + SUPPORTED_DEVICES += ARV7518PW +endef +TARGET_DEVICES += arcadyan_arv7518pw + +define Device/arcadyan_arv7519pw + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := ARV7519PW + DEVICE_ALT0_VENDOR := Astoria Networks + DEVICE_ALT0_MODEL := ARV7519PW + IMAGE_SIZE := 15488k + SOC := danube + DEVICE_PACKAGES := kmod-usb-dwc2 \ + kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-rt2800-pci wpad-basic + SUPPORTED_DEVICES += ARV7519PW +endef +TARGET_DEVICES += arcadyan_arv7519pw + +define Device/arcadyan_arv7525pw + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := ARV7525PW + DEVICE_ALT0_VENDOR := Telekom + DEVICE_ALT0_MODEL := Speedport W303V + DEVICE_ALT0_VARIANT := Typ A + IMAGE_SIZE := 3776k + SOC := danube + DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic \ + kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ + ltq-adsl-app ppp-mod-pppoa -swconfig + SUPPORTED_DEVICES += ARV4510PW +endef +TARGET_DEVICES += arcadyan_arv7525pw + +define Device/arcadyan_arv752dpw + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := ARV752DPW + DEVICE_ALT0_VENDOR := Vodafone + DEVICE_ALT0_MODEL := Easybox 802 + IMAGE_SIZE := 7872k + SOC := danube + DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ + kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-ltq-tapi kmod-ltq-vmmc \ + kmod-rt2800-pci wpad-basic + SUPPORTED_DEVICES += ARV752DPW +endef +TARGET_DEVICES += arcadyan_arv752dpw + +define Device/arcadyan_arv752dpw22 + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := ARV752DPW22 + DEVICE_ALT0_VENDOR := Vodafone + DEVICE_ALT0_MODEL := Easybox 803 + IMAGE_SIZE := 7616k + SOC := danube + DEVICE_PACKAGES := kmod-usb2-pci kmod-usb-uhci kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ + kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-ltq-tapi kmod-ltq-vmmc \ + kmod-rt2800-pci wpad-basic + SUPPORTED_DEVICES += ARV752DPW22 +endef +TARGET_DEVICES += arcadyan_arv752dpw22 + +define Device/arcadyan_arv8539pw22 + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := ARV8539PW22 + DEVICE_ALT0_VENDOR := Telekom + DEVICE_ALT0_MODEL := Speedport W504V Typ A + IMAGE_SIZE := 7616k + SOC := danube + DEVICE_PACKAGES := kmod-usb-dwc2 \ + kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-ath9k kmod-owl-loader wpad-basic + SUPPORTED_DEVICES += ARV8539PW22 +endef +TARGET_DEVICES += arcadyan_arv8539pw22 + +define Device/audiocodes_mp-252 + DEVICE_VENDOR := AudioCodes + DEVICE_MODEL := MediaPack MP-252 + IMAGE_SIZE := 14848k + SOC := danube + DEVICE_PACKAGES := kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ + kmod-ltq-tapi kmod-ltq-vmmc \ + kmod-usb-ledtrig-usbport kmod-usb-dwc2 \ + kmod-rt2800-pci \ + ltq-adsl-app ppp-mod-pppoa \ + wpad-basic + SUPPORTED_DEVICES += ACMP252 +endef +TARGET_DEVICES += audiocodes_mp-252 + +define Device/bt_homehub-v2b + $(Device/NAND) + DEVICE_VENDOR := British Telecom + DEVICE_MODEL := Home Hub 2 + DEVICE_VARIANT := Type B + BOARD_NAME := BTHOMEHUBV2B + SOC := danube + DEVICE_PACKAGES := kmod-usb-dwc2 \ + kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ + kmod-ltq-deu-danube \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-ath9k kmod-owl-loader wpad-basic + SUPPORTED_DEVICES += BTHOMEHUBV2B +endef +TARGET_DEVICES += bt_homehub-v2b + +define Device/lantiq_easy50712 + DEVICE_VENDOR := Lantiq + DEVICE_MODEL := Danube (EASY50712) + SOC := danube + IMAGE_SIZE := 3776k +endef +TARGET_DEVICES += lantiq_easy50712 + +define Device/siemens_gigaset-sx76x + DEVICE_VENDOR := Siemens + DEVICE_MODEL := Gigaset sx76x + IMAGE_SIZE := 7680k + SOC := danube + DEVICE_PACKAGES := kmod-usb-dwc2 \ + kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ + ltq-adsl-app ppp-mod-pppoe \ + kmod-ath5k wpad-basic + SUPPORTED_DEVICES += GIGASX76X +endef +TARGET_DEVICES += siemens_gigaset-sx76x diff --git a/target/linux/lantiq/image/falcon.mk b/target/linux/lantiq/image/falcon.mk new file mode 100644 index 0000000000..a5490f6e68 --- /dev/null +++ b/target/linux/lantiq/image/falcon.mk @@ -0,0 +1,93 @@ +define Device/lantiq_easy88388 + DEVICE_VENDOR := Lantiq + DEVICE_MODEL := EASY88388 Falcon FTTDP8 Reference Board + IMAGE_SIZE := 7424k +endef +TARGET_DEVICES += lantiq_easy88388 + +define Device/lantiq_easy88444 + DEVICE_VENDOR := Lantiq + DEVICE_MODEL := EASY88444 Falcon FTTdp G.FAST Reference Board + IMAGE_SIZE := 7424k +endef +TARGET_DEVICES += lantiq_easy88444 + +define Device/lantiq_easy98020 + DEVICE_VENDOR := Lantiq + DEVICE_MODEL := Falcon SFU Reference Board (EASY98020) + DEVICE_VARIANT := v1.0-v1.7 + IMAGE_SIZE := 7424k +endef +TARGET_DEVICES += lantiq_easy98020 + +define Device/lantiq_easy98020-v18 + DEVICE_VENDOR := Lantiq + DEVICE_MODEL := Falcon SFU Reference Board (EASY98020) + DEVICE_VARIANT := v1.8 + IMAGE_SIZE := 7424k +endef +TARGET_DEVICES += lantiq_easy98020-v18 + +define Device/lantiq_easy98021 + DEVICE_VENDOR := Lantiq + DEVICE_MODEL := Falcon HGU Reference Board (EASY98021) + IMAGE_SIZE := 7424k +endef +TARGET_DEVICES += lantiq_easy98021 + +define Device/lantiq_easy98035synce + DEVICE_VENDOR := Lantiq + DEVICE_MODEL := Falcon SFP Stick (EASY98035SYNCE) + DEVICE_VARIANT := with Synchronous Ethernet + IMAGE_SIZE := 7424k +endef +TARGET_DEVICES += lantiq_easy98035synce + +define Device/lantiq_easy98035synce1588 + DEVICE_VENDOR := Lantiq + DEVICE_MODEL := Falcon SFP Stick (EASY98035SYNCE1588) + DEVICE_VARIANT := with SyncE and IEEE1588 + IMAGE_SIZE := 7424k +endef +TARGET_DEVICES += lantiq_easy98035synce1588 + +define Device/lantiq_easy98000-nand + DEVICE_VENDOR := Lantiq + DEVICE_MODEL := EASY98000 Falcon Eval Board + DEVICE_VARIANT := NAND + IMAGE_SIZE := 3904k + DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24 +endef +TARGET_DEVICES += lantiq_easy98000-nand + +define Device/lantiq_easy98000-nor + DEVICE_VENDOR := Lantiq + DEVICE_MODEL := EASY98000 Falcon Eval Board + DEVICE_VARIANT := NOR + IMAGE_SIZE := 3904k + DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24 +endef +TARGET_DEVICES += lantiq_easy98000-nor + +define Device/lantiq_easy98000-sflash + DEVICE_VENDOR := Lantiq + DEVICE_MODEL := EASY98000 Falcon Eval Board + DEVICE_VARIANT := SFLASH + IMAGE_SIZE := 7424k + DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24 +endef +TARGET_DEVICES += lantiq_easy98000-sflash + +define Device/lantiq_falcon-mdu + DEVICE_VENDOR := Lantiq + DEVICE_MODEL := Falcon / VINAXdp MDU Board + IMAGE_SIZE := 7424k +endef +TARGET_DEVICES += lantiq_falcon-mdu + +define Device/lantiq_falcon-sfp + DEVICE_VENDOR := Lantiq + DEVICE_MODEL := Falcon SFP Stick + IMAGE_SIZE := 7424k +endef +TARGET_DEVICES += lantiq_falcon-sfp diff --git a/target/linux/lantiq/image/tp-link.mk b/target/linux/lantiq/image/tp-link.mk index bec9eafbd1..acbc32b46a 100644 --- a/target/linux/lantiq/image/tp-link.mk +++ b/target/linux/lantiq/image/tp-link.mk @@ -1,6 +1,7 @@ DEVICE_VARS += TPLINK_FLASHLAYOUT TPLINK_HWID TPLINK_HWREV TPLINK_HWREVADD TPLINK_HVERSION define Device/lantiqTpLink + DEVICE_VENDOR := TP-Link TPLINK_HWREVADD := 0 TPLINK_HVERSION := 2 KERNEL := kernel-bin | append-dtb | lzma @@ -13,12 +14,12 @@ endef define Device/tplink_tdw8970 $(Device/lantiqTpLink) - DEVICE_DTS := TDW8970 + DEVICE_MODEL := TD-W8970 + DEVICE_VARIANT := v1 TPLINK_FLASHLAYOUT := 8Mltq TPLINK_HWID := 0x89700001 TPLINK_HWREV := 1 IMAGE_SIZE := 7680k - DEVICE_TITLE := TP-LINK TD-W8970 DEVICE_PACKAGES:= kmod-ath9k wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += TDW8970 endef @@ -26,12 +27,12 @@ TARGET_DEVICES += tplink_tdw8970 define Device/tplink_tdw8980 $(Device/lantiqTpLink) - DEVICE_DTS := TDW8980 + DEVICE_MODEL := TD-W8980 + DEVICE_VARIANT := v1 TPLINK_FLASHLAYOUT := 8Mltq TPLINK_HWID := 0x89800001 TPLINK_HWREV := 14 IMAGE_SIZE := 7680k - DEVICE_TITLE := TP-LINK TD-W8980 DEVICE_PACKAGES:= kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += TDW8980 endef @@ -39,26 +40,26 @@ TARGET_DEVICES += tplink_tdw8980 define Device/tplink_vr200 $(Device/lantiqTpLink) - DEVICE_DTS := VR200 + DEVICE_MODEL := Archer VR200 + DEVICE_VARIANT := v1 TPLINK_FLASHLAYOUT := 16Mltq TPLINK_HWID := 0x63e64801 TPLINK_HWREV := 0x53 IMAGE_SIZE := 15808k - DEVICE_TITLE := TP-LINK Archer VR200 - DEVICE_PACKAGES:= kmod-usb-dwc2 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES:= kmod-mt76x0e wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += VR200 endef TARGET_DEVICES += tplink_vr200 define Device/tplink_vr200v $(Device/lantiqTpLink) - DEVICE_DTS := VR200v + DEVICE_MODEL := Archer VR200v + DEVICE_VARIANT := v1 TPLINK_FLASHLAYOUT := 16Mltq TPLINK_HWID := 0x73b70801 TPLINK_HWREV := 0x2f IMAGE_SIZE := 15808k - DEVICE_TITLE := TP-LINK Archer VR200v - DEVICE_PACKAGES:= kmod-usb-dwc2 kmod-usb-ledtrig-usbport kmod-ltq-tapi kmod-ltq-vmmc + DEVICE_PACKAGES:= kmod-mt76x0e wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport kmod-ltq-tapi kmod-ltq-vmmc SUPPORTED_DEVICES += VR200v endef TARGET_DEVICES += tplink_vr200v diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk new file mode 100644 index 0000000000..167c57c7c4 --- /dev/null +++ b/target/linux/lantiq/image/vr9.mk @@ -0,0 +1,227 @@ +DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID + +define Device/alphanetworks_asl56026 + DEVICE_VENDOR := Alpha + DEVICE_MODEL := ASL56026 + DEVICE_ALT0_VENDOR := BT Openreach + DEVICE_ALT0_MODEL := ECI VDSL Modem V-2FUb/I + IMAGE_SIZE := 7488k +endef +TARGET_DEVICES += alphanetworks_asl56026 + +define Device/arcadyan_arv7519rw22 + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := ARV7519RW22 + DEVICE_ALT0_VENDOR := Orange + DEVICE_ALT0_MODEL := Livebox + DEVICE_ALT0_VARIANT := 2.1 + DEVICE_ALT1_VENDOR := Astoria Networks + DEVICE_ALT1_MODEL := ARV7519RW22 + IMAGE_SIZE := 31232k + DEVICE_PACKAGES := kmod-usb-dwc2 + SUPPORTED_DEVICES += ARV7519RW22 +endef +TARGET_DEVICES += arcadyan_arv7519rw22 + +define Device/arcadyan_vg3503j + DEVICE_VENDOR := BT Openreach + DEVICE_MODEL := ECI VDSL Modem V-2FUb/R + IMAGE_SIZE := 8000k + SUPPORTED_DEVICES += VG3503J +endef +TARGET_DEVICES += arcadyan_vg3503j + +define Device/arcadyan_vgv7510kw22-brn + $(Device/lantiqBrnImage) + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := VGV7510KW22 + DEVICE_VARIANT := BRN + DEVICE_ALT0_VENDOR := o2 + DEVICE_ALT0_MODEL := Box 6431 + DEVICE_ALT0_VARIANT := BRN + IMAGE_SIZE := 7168k + SIGNATURE := BRNDA6431 + MAGIC := 0x12345678 + CRC32_POLY := 0x04c11db7 + DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc + SUPPORTED_DEVICES += VGV7510KW22BRN +endef +TARGET_DEVICES += arcadyan_vgv7510kw22-brn + +define Device/arcadyan_vgv7510kw22-nor + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := VGV7510KW22 + DEVICE_VARIANT := NOR + DEVICE_ALT0_VENDOR := o2 + DEVICE_ALT0_MODEL := Box 6431 + DEVICE_ALT0_VARIANT := NOR + IMAGE_SIZE := 15232k + DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc + SUPPORTED_DEVICES += VGV7510KW22NOR +endef +TARGET_DEVICES += arcadyan_vgv7510kw22-nor + +define Device/arcadyan_vgv7519-brn + $(Device/lantiqBrnImage) + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := VGV7519 + DEVICE_VARIANT := BRN + DEVICE_ALT0_VENDOR := KPN + DEVICE_ALT0_MODEL := Experiabox 8 + DEVICE_ALT0_VARIANT := BRN + IMAGE_SIZE := 7168k + SIGNATURE := 5D00008000 + MAGIC := 0x12345678 + CRC32_POLY := 0x2083b8ed + DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc + SUPPORTED_DEVICES += VGV7519BRN +endef +TARGET_DEVICES += arcadyan_vgv7519-brn + +define Device/arcadyan_vgv7519-nor + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := VGV7519 + DEVICE_VARIANT := NOR + DEVICE_ALT0_VENDOR := KPN + DEVICE_ALT0_MODEL := Experiabox 8 + DEVICE_ALT0_VARIANT := NOR + IMAGE_SIZE := 15360k + DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc + SUPPORTED_DEVICES += VGV7519NOR +endef +TARGET_DEVICES += arcadyan_vgv7519-nor + +define Device/avm_fritz3370 + $(Device/AVM) + $(Device/NAND) + DEVICE_MODEL := FRITZ!Box 3370 + DEVICE_VARIANT := Rev. 2 + KERNEL_SIZE := 4096k + UBINIZE_OPTS := -E 5 + IMAGES += eva-kernel.bin eva-filesystem.bin + IMAGE/eva-kernel.bin := append-kernel + IMAGE/eva-filesystem.bin := append-ubi + DEVICE_PACKAGES := kmod-ath9k wpad-basic kmod-usb-dwc2 fritz-tffs +endef + +define Device/avm_fritz3370-rev2-hynix + $(Device/avm_fritz3370) + DEVICE_MODEL := FRITZ!Box 3370 + DEVICE_VARIANT := Rev. 2 (Hynix NAND) +endef +TARGET_DEVICES += avm_fritz3370-rev2-hynix + +define Device/avm_fritz3370-rev2-micron + $(Device/avm_fritz3370) + DEVICE_MODEL := FRITZ!Box 3370 + DEVICE_VARIANT := Rev. 2 (Micron NAND) +endef +TARGET_DEVICES += avm_fritz3370-rev2-micron + +define Device/avm_fritz7360sl + $(Device/AVM) + DEVICE_MODEL := FRITZ!Box 7360 SL + IMAGE_SIZE := 15744k + DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2 + SUPPORTED_DEVICES += FRITZ7360SL +endef +TARGET_DEVICES += avm_fritz7360sl + +define Device/avm_fritz7362sl + $(Device/AVM) + $(Device/NAND) + DEVICE_MODEL := FRITZ!Box 7362 SL + KERNEL_SIZE := 4096k + IMAGE_SIZE := 49152k + DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2 fritz-tffs +endef +TARGET_DEVICES += avm_fritz7362sl + +define Device/avm_fritz7412 + $(Device/AVM) + $(Device/NAND) + DEVICE_MODEL := FRITZ!Box 7412 + BOARD_NAME := FRITZ7412 + KERNEL_SIZE := 4096k + IMAGE_SIZE := 49152k + DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic fritz-tffs-nand fritz-caldata +endef +TARGET_DEVICES += avm_fritz7412 + +define Device/bt_homehub-v5a + $(Device/NAND) + DEVICE_VENDOR := British Telecom + DEVICE_MODEL := Home Hub 5 + DEVICE_VARIANT := Type A + BOARD_NAME := BTHOMEHUBV5A + DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader \ + kmod-ath10k-ct ath10k-firmware-qca988x-ct wpad-basic kmod-usb-dwc2 + SUPPORTED_DEVICES += BTHOMEHUBV5A +endef +TARGET_DEVICES += bt_homehub-v5a + +define Device/buffalo_wbmr-300hpd + DEVICE_VENDOR := Buffalo + DEVICE_MODEL := WBMR-300HPD + IMAGE_SIZE := 15616k + DEVICE_PACKAGES := kmod-mt7603 wpad-basic kmod-usb-dwc2 + SUPPORTED_DEVICES += WBMR300 +endef +TARGET_DEVICES += buffalo_wbmr-300hpd + +define Device/lantiq_easy80920-nand + $(Device/lantiqFullImage) + DEVICE_VENDOR := Lantiq + DEVICE_MODEL := VR9 EASY80920 + DEVICE_VARIANT := NAND + IMAGE_SIZE := 64512k + DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport +endef +TARGET_DEVICES += lantiq_easy80920-nand + +define Device/lantiq_easy80920-nor + DEVICE_VENDOR := Lantiq + DEVICE_MODEL := VR9 EASY80920 + DEVICE_VARIANT := NOR + IMAGE_SIZE := 7936k + DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport +endef +TARGET_DEVICES += lantiq_easy80920-nor + +define Device/netgear_dm200 + DEVICE_VENDOR := NETGEAR + DEVICE_MODEL := DM200 + IMAGES := sysupgrade.bin factory.img + IMAGE/sysupgrade.bin := append-kernel | \ + pad-offset 64k 64 | append-uImage-fakehdr filesystem | \ + pad-offset 64k 64 | append-uImage-fakehdr filesystem | \ + append-rootfs | pad-rootfs | append-metadata | check-size + IMAGE/factory.img := $$(IMAGE/sysupgrade.bin) | netgear-dni + IMAGE_SIZE := 7872k + NETGEAR_BOARD_ID := DM200 + NETGEAR_HW_ID := 29765233+8+0+64+0+0 +endef +TARGET_DEVICES += netgear_dm200 + +define Device/zyxel_p-2812hnu-f1 + $(Device/NAND) + DEVICE_VENDOR := ZyXEL + DEVICE_MODEL := P-2812HNU + DEVICE_VARIANT := F1 + BOARD_NAME := P2812HNUF1 + DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport + KERNEL_SIZE := 3072k + SUPPORTED_DEVICES += P2812HNUF1 +endef +TARGET_DEVICES += zyxel_p-2812hnu-f1 + +define Device/zyxel_p-2812hnu-f3 + $(Device/NAND) + DEVICE_VENDOR := ZyXEL + DEVICE_MODEL := P-2812HNU + DEVICE_VARIANT := F3 + BOARD_NAME := P2812HNUF3 + DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 + SUPPORTED_DEVICES += P2812HNUF3 +endef +TARGET_DEVICES += zyxel_p-2812hnu-f3 diff --git a/target/linux/lantiq/image/xway_legacy.mk b/target/linux/lantiq/image/xway_legacy.mk new file mode 100644 index 0000000000..52a29ab2f0 --- /dev/null +++ b/target/linux/lantiq/image/xway_legacy.mk @@ -0,0 +1,72 @@ +define Device/arcadyan_arv4518pwr01 + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := ARV4518PWR01 + IMAGE_SIZE := 3776k + DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ + kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-ath5k wpad-mini + SUPPORTED_DEVICES += ARV4518PWR01 +endef +TARGET_DEVICES += arcadyan_arv4518pwr01 + +define Device/arcadyan_arv4518pwr01a + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := ARV4518PWR01A + IMAGE_SIZE := 3776k + DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ + kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-ath5k wpad-basic + SUPPORTED_DEVICES += ARV4518PWR01A +endef +TARGET_DEVICES += arcadyan_arv4518pwr01a + +define Device/arcadyan_arv4520pw + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := ARV4520PW + DEVICE_ALT0_VENDOR := Vodafone + DEVICE_ALT0_MODEL := Easybox 800 + DEVICE_ALT1_VENDOR := Airties + DEVICE_ALT1_MODEL := WAV-281 + IMAGE_SIZE := 3648k + DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ + kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-rt61-pci wpad-mini + SUPPORTED_DEVICES += ARV4520PW +endef +TARGET_DEVICES += arcadyan_arv4520pw + +define Device/arcadyan_arv4525pw + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := ARV4525PW + DEVICE_ALT0_VENDOR := Telekom + DEVICE_ALT0_MODEL := Speedport W502V + DEVICE_ALT0_VARIANT := Typ A + IMAGE_SIZE := 3776k + DEVICE_PACKAGES := kmod-ath5k wpad-mini \ + kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ + ltq-adsl-app ppp-mod-pppoa -swconfig + SUPPORTED_DEVICES += ARV4525PW +endef +TARGET_DEVICES += arcadyan_arv4525pw + +define Device/arcadyan_arv452cqw + DEVICE_VENDOR := Arcadyan + DEVICE_MODEL := ARV452CQW + DEVICE_ALT0_VENDOR := Vodafone + DEVICE_ALT0_MODEL := Easybox 801 + IMAGE_SIZE := 3776k + DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ + kmod-ath5k wpad-mini \ + kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ + ltq-adsl-app ppp-mod-pppoa + SUPPORTED_DEVICES += ARV452CQW +endef +TARGET_DEVICES += arcadyan_arv452cqw diff --git a/target/linux/lantiq/patches-4.19/0023-NET-PHY-add-led-support-for-intel-xway.patch b/target/linux/lantiq/patches-4.19/0023-NET-PHY-add-led-support-for-intel-xway.patch index 60a6dbafdd..e5ba24c3e7 100644 --- a/target/linux/lantiq/patches-4.19/0023-NET-PHY-add-led-support-for-intel-xway.patch +++ b/target/linux/lantiq/patches-4.19/0023-NET-PHY-add-led-support-for-intel-xway.patch @@ -42,10 +42,10 @@ Signed-off-by: John Crispin + phy_write_mmd(phydev, MDIO_MMD_VEND2, XWAY_MMD_LED1L, tmp); + + if (!of_property_read_u32(phydev->mdio.dev.of_node, "lantiq,led2h", &tmp)) -+ phy_write_mmd(phydev, MDIO_MMD_VEND2, XWAY_MMD_LED3H, tmp); ++ phy_write_mmd(phydev, MDIO_MMD_VEND2, XWAY_MMD_LED2H, tmp); + + if (!of_property_read_u32(phydev->mdio.dev.of_node, "lantiq,led2l", &tmp)) -+ phy_write_mmd(phydev, MDIO_MMD_VEND2, XWAY_MMD_LED3L, tmp); ++ phy_write_mmd(phydev, MDIO_MMD_VEND2, XWAY_MMD_LED2L, tmp); + + if (!of_property_read_u32(phydev->mdio.dev.of_node, "lantiq,led3h", &tmp)) + phy_write_mmd(phydev, MDIO_MMD_VEND2, XWAY_MMD_LED3H, tmp); diff --git a/target/linux/lantiq/patches-4.19/0025-NET-MIPS-lantiq-adds-xrx200-net.patch b/target/linux/lantiq/patches-4.19/0025-NET-MIPS-lantiq-adds-xrx200-net.patch index b2de5ac510..4e5b55eb3e 100644 --- a/target/linux/lantiq/patches-4.19/0025-NET-MIPS-lantiq-adds-xrx200-net.patch +++ b/target/linux/lantiq/patches-4.19/0025-NET-MIPS-lantiq-adds-xrx200-net.patch @@ -209,7 +209,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net +}; --- /dev/null +++ b/drivers/net/ethernet/lantiq_xrx200.c -@@ -0,0 +1,1889 @@ +@@ -0,0 +1,1924 @@ +/* + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published @@ -433,6 +433,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net +struct xrx200_hw { + struct clk *clk; + struct mii_bus *mii_bus; ++ u8 phy_addr[XRX200_MAX_PORT]; + + struct xrx200_chan chan[XRX200_MAX_DMA]; + u16 vlan_vid[XRX200_MAX_VLAN]; @@ -947,6 +948,34 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net + return 0; +} + ++static int xrx200sw_set_port_link(struct switch_dev *dev, int port, ++ struct switch_port_link *link) ++{ ++ if (port >= XRX200_MAX_PORT) ++ return -EINVAL; ++ ++ return switch_generic_set_link(dev, port, link); ++} ++ ++static int xrx200_mdio_wr(struct mii_bus *bus, int addr, int reg, u16 val); ++static int xrx200_mdio_rd(struct mii_bus *bus, int addr, int reg); ++ ++static int xrx200sw_phy_read16(struct switch_dev *dev, int addr, u8 reg, u16 *value) ++{ ++ struct xrx200_hw *hw = container_of(dev, struct xrx200_hw, swdev); ++ ++ *value = xrx200_mdio_rd(hw->mii_bus, hw->phy_addr[addr], reg); ++ ++ return 0; ++} ++ ++static int xrx200sw_phy_write16(struct switch_dev *dev, int addr, u8 reg, u16 value) ++{ ++ struct xrx200_hw *hw = container_of(dev, struct xrx200_hw, swdev); ++ ++ return xrx200_mdio_wr(hw->mii_bus, hw->phy_addr[addr], reg, value); ++} ++ +static int xrx200_set_port_attr(struct switch_dev *dev, const struct switch_attr *attr, struct switch_val *val) +{ + if (val->port_vlan >= XRX200_MAX_PORT) @@ -1043,7 +1072,10 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net + .get_port_pvid = xrx200sw_get_port_pvid, + .reset_switch = xrx200sw_reset_switch, + .get_port_link = xrx200sw_get_port_link, ++ .set_port_link = xrx200sw_set_port_link, +// .get_port_stats = xrx200sw_get_port_stats, //TODO ++ .phy_read16 = xrx200sw_phy_read16, ++ .phy_write16 = xrx200sw_phy_write16, +}; + +static int xrx200sw_init(struct xrx200_hw *hw) @@ -1897,6 +1929,9 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net + + /* store the port id in the hw struct so we can map ports -> devices */ + priv->hw->port_map[p->num] = priv->hw->num_devs; ++ ++ /* store the phy addr in the hw struct so we can map ports -> phys */ ++ priv->hw->phy_addr[p->num] = p->phy_addr; +} + +static const struct net_device_ops xrx200_netdev_ops = { diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/xrx200/base-files/etc/board.d/01_leds similarity index 80% rename from target/linux/lantiq/base-files/etc/board.d/01_leds rename to target/linux/lantiq/xrx200/base-files/etc/board.d/01_leds index 4476a7eb43..b4d26d37ff 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/xrx200/base-files/etc/board.d/01_leds @@ -1,7 +1,6 @@ #!/bin/sh # # Copyright (C) 2011-2015 OpenWrt.org -# based on ar71xx # . /lib/functions/leds.sh @@ -32,38 +31,9 @@ led_dsl="$(get_dt_led dsl)" board=$(board_name) case "$board" in -allnet,all0333cj) - ucidef_set_led_netdev "lan" "lan" "all0333cj:green:lan" "eth0.1" - ;; -arcadyan,arv4525pw) - ucidef_set_led_netdev "wifi" "wifi" "arv4525pw:green:wlan" "wlan0" - ;; -arcadyan,arv7506pw11) - ucidef_set_led_wlan "wifi" "wifi" "arv7506pw11:green:wlan" "phy0radio" - ;; arcadyan,arv7519rw22) ucidef_set_led_netdev "lan" "lan" "arv7519rw22:green:lan" "eth0.1" ;; -arcadyan,arv752dpw22) - ucidef_set_led_wlan "wifi" "wifi" "arv752dpw22:red:wifi" "phy0radio" - ;; -bt,homehub-v5a) - ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0" - ;; -netgear,dm200) - ucidef_set_led_netdev "lan" "lan" "dm200:green:lan" "eth0" - ;; -avm,fritz3370-rev2-hynix|\ -avm,fritz3370-rev2-micron) - ucidef_set_led_switch "lan" "LAN" "fritz3370:green:lan" "switch0" "0x17" - ;; -avm,fritz7320) - ucidef_set_led_netdev "wifi" "wifi" "fritz7320:green:wlan" "wlan0" - ;; -zyxel,p-2812hnu-f1|\ -zyxel,p-2812hnu-f3) - ucidef_set_led_wlan "wifi" "wifi" "p2812hnufx:green:wlan" "phy0radio" - ;; arcadyan,vgv7510kw22-nor|\ arcadyan,vgv7510kw22-brn) ucidef_set_led_wlan "wifi" "wifi" "vgv7510kw22:green:wlan" "phy0radio" @@ -72,6 +42,13 @@ arcadyan,vgv7519-nor|\ arcadyan,vgv7519-brn) ucidef_set_led_wlan "wifi" "wifi" "vgv7519:green:wireless" "phy0radio" ;; +avm,fritz3370-rev2-hynix|\ +avm,fritz3370-rev2-micron) + ucidef_set_led_switch "lan" "LAN" "fritz3370:green:lan" "switch0" "0x17" + ;; +bt,homehub-v5a) + ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0" + ;; buffalo,wbmr-300hpd) ucidef_set_led_switch "lan1" "LAN1" "wbmr300:green:lan1" "switch0" "0x08" ucidef_set_led_switch "lan2" "LAN2" "wbmr300:green:lan2" "switch0" "0x04" @@ -79,7 +56,12 @@ buffalo,wbmr-300hpd) ucidef_set_led_switch "lan3" "LAN3" "wbmr300:green:lan3" "switch0" "0x20" ucidef_set_led_default "router" "router" "wbmr300:green:router" "1" ;; -*) +netgear,dm200) + ucidef_set_led_netdev "lan" "lan" "dm200:green:lan" "eth0" + ;; +zyxel,p-2812hnu-f1|\ +zyxel,p-2812hnu-f3) + ucidef_set_led_wlan "wifi" "wifi" "p2812hnufx:green:wlan" "phy0radio" ;; esac diff --git a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network new file mode 100755 index 0000000000..f39898263d --- /dev/null +++ b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network @@ -0,0 +1,175 @@ +#!/bin/sh +# +# Copyright (C) 2011-2015 OpenWrt.org +# + +. /lib/functions/uci-defaults.sh +. /lib/functions/system.sh +. /lib/functions/lantiq.sh + +lantiq_setup_interfaces() +{ + local board="$1" + + case "$board" in + alphanetworks,asl56026) + ucidef_add_switch "switch0" \ + "2:lan" "3:lan" "6t@eth0" + ;; + arcadyan,arv7519rw22) + ucidef_add_switch "switch0" \ + "0:lan:5" "2:lan:3" "3:lan:4" "4:lan:1" "5:lan:2" "6t@eth0" + ;; + arcadyan,vg3503j) + ucidef_add_switch "switch0" \ + "2:lan:2" "4:lan:1" "6t@eth0" + ;; + arcadyan,vgv7510kw22-brn|\ + arcadyan,vgv7510kw22-nor) + ucidef_add_switch "switch0" \ + "2:lan:2" "3:lan:1" "4:lan:4" "5:lan:3" "0:wan:5" "6t@eth0" + ;; + arcadyan,vgv7519-brn|\ + arcadyan,vgv7519-nor|\ + lantiq,easy80920-nand|\ + lantiq,easy80920-nor) + ucidef_add_switch "switch0" \ + "0:lan:4" "1:lan:3" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0" + ;; + avm,fritz3370-rev2-hynix|\ + avm,fritz3370-rev2-micron|\ + avm,fritz7360sl|\ + avm,fritz7362sl) + ucidef_add_switch "switch0" \ + "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0" + ;; + bt,homehub-v5a) + ucidef_add_switch "switch0" \ + "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0" + ;; + buffalo,wbmr-300hpd) + ucidef_add_switch "switch0" \ + "5:lan:2" "2:lan:3" "3:lan:4" "4:wan:1" "6t@eth0" + ;; + tplink,tdw8970|\ + tplink,tdw8980) + ucidef_add_switch "switch0" \ + "0:lan:2" "2:lan:3" "4:lan:4" "5:lan:1" "6t@eth0" + ;; + tplink,vr200|\ + tplink,vr200v) + ucidef_add_switch "switch0" \ + "0:lan" "2:lan" "4:lan" "5:lan" "6t@eth0" + ;; + zyxel,p-2812hnu-f1|\ + zyxel,p-2812hnu-f3) + ucidef_add_switch "switch0" \ + "0:lan" "1:lan" "2:lan" "4:lan" "5:wan" "6t@eth0" + ;; + *) + ucidef_set_interface_lan 'eth0' + ;; + esac +} + +lantiq_setup_dsl() +{ + local board="$1" + local annex="a" + + case "$board" in + arcadyan,vgv7510kw22-brn|\ + arcadyan,vgv7510kw22-nor|\ + avm,fritz3370-rev2-hynix|\ + avm,fritz3370-rev2-micron|\ + avm,fritz7360sl|\ + avm,fritz7362sl|\ + avm,fritz7412) + annex="b" + ;; + esac + + lantiq_setup_dsl_helper "$annex" +} + +lantiq_setup_macs() +{ + local board="$1" + local lan_mac="" + local wan_mac="" + + case "$board" in + alphanetworks,asl56026) + lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr) + wan_mac=$(mtd_get_mac_ascii uboot_env wanmac) + ;; + arcadyan,arv7519rw22) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 0x16)" 1) + ;; + arcadyan,vg3503j|\ + lantiq,easy80920-nand|\ + lantiq,easy80920-nor|\ + zyxel,p-2812hnu-f1|\ + zyxel,p-2812hnu-f3) + lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr) + wan_mac=$(macaddr_add "$lan_mac" 1) + ;; + arcadyan,vgv7510kw22-brn|\ + arcadyan,vgv7510kw22-nor) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 0x16)" 2) + ;; + arcadyan,vgv7519-brn|\ + arcadyan,vgv7519-nor) + wan_mac=$(mtd_get_mac_binary board_config 0x16) + ;; + avm,fritz3370-rev2-hynix|\ + avm,fritz3370-rev2-micron) + lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) + wan_mac=$(macaddr_add "$lan_mac" 3) + ;; + avm,fritz7360sl) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 0xa91)" 1) + ;; + avm,fritz7362sl) + lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) + wan_mac=$(fritz_tffs -n macdsl -i $(find_mtd_part "tffs (1)")) + ;; + avm,fritz7412) + tffsdev=$(find_mtd_chardev "nand-tffs") + lan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n maca -o) + wan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n macdsl -o) + ;; + bt,homehub-v5a) + lan_mac=$(mtd_get_mac_binary_ubi caldata 0x110c) + wan_mac=$(macaddr_add "$lan_mac" 1) + ;; + buffalo,wbmr-300hpd) + lan_mac=$(mtd_get_mac_ascii ubootconfig ethaddr) + wan_mac="$lan_mac" + ;; + netgear,dm200) + lan_mac=$(mtd_get_mac_binary ART 0x0) + wan_mac=$(macaddr_add "$lan_mac" 1) + ;; + tplink,tdw8970|\ + tplink,tdw8980) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 0xf100)" 1) + ;; + tplink,vr200|\ + tplink,vr200v) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary romfile 0xf100)" 1) + ;; + esac + + [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" "$lan_mac" + [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" "$wan_mac" +} + +board_config_update +board=$(board_name) +lantiq_setup_interfaces $board +lantiq_setup_dsl $board +lantiq_setup_macs $board +board_config_flush + +exit 0 diff --git a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/11-ath10k-caldata similarity index 100% rename from target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata rename to target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/11-ath10k-caldata diff --git a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom new file mode 100644 index 0000000000..cb91237400 --- /dev/null +++ b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom @@ -0,0 +1,161 @@ +#!/bin/sh +# Based on ar71xx 10-ath9k-eeprom + +[ -e /lib/firmware/$FIRMWARE ] && exit 0 + +. /lib/functions.sh +. /lib/functions/system.sh +. /lib/upgrade/nand.sh + +# xor multiple hex values of the same length +xor() { + local val + local ret="0x$1" + local retlen=${#1} + + shift + while [ -n "$1" ]; do + val="0x$1" + ret=$((ret ^ val)) + shift + done + + printf "%0${retlen}x" "$ret" +} + +ath9k_eeprom_die() { + echo "ath9k eeprom: $*" + exit 1 +} + +ath9k_eeprom_extract_raw() { + local source=$1 + local offset=$2 + local swap=$3 + local size=4096 + local bs=1 + local conv= + + if [ $swap -gt 0 ]; then + bs=2 + conv="conv=swab" + size=$((size / bs)) + offset=$((offset / bs)) + fi + + dd if=$source of=/lib/firmware/$FIRMWARE bs=$bs skip=$offset count=$size $conv 2>/dev/null || \ + ath9k_eeprom_die "failed to extract from $mtd" +} + +ath9k_eeprom_extract_reverse() { + local part=$1 + local offset=$2 + local count=$3 + local mtd + local reversed + local caldata + + mtd=$(find_mtd_chardev "$part") + reversed=$(hexdump -v -s $offset -n $count -e '/1 "%02x "' $mtd) + + for byte in $reversed; do + caldata="\x${byte}${caldata}" + done + + printf "%b" "$caldata" > /lib/firmware/$FIRMWARE +} + +ath9k_eeprom_extract() { + local part=$1 + local offset=$2 + local swap=$3 + local mtd + + mtd=$(find_mtd_chardev $part) + [ -n "$mtd" ] || \ + ath9k_eeprom_die "no mtd device found for partition $part" + + ath9k_eeprom_extract_raw $mtd $offset $swap +} + +ath9k_ubi_eeprom_extract() { + local part=$1 + local offset=$2 + local swap=$3 + local ubidev=$(nand_find_ubi $CI_UBIPART) + local ubi + + ubi=$(nand_find_volume $ubidev $part) + [ -n "$ubi" ] || \ + ath9k_eeprom_die "no UBI volume found for $part" + + ath9k_eeprom_extract_raw /dev/$ubi $offset $swap +} + +ath9k_patch_fw_mac_crc() { + local mac=$1 + local mac_offset=$2 + local chksum_offset=$((mac_offset - 10)) + + ath9k_patch_fw_mac "${mac}" "${mac_offset}" "${chksum_offset}" +} + +ath9k_patch_fw_mac() { + local mac=$1 + local mac_offset=$2 + local chksum_offset=$3 + local xor_mac + local xor_fw_mac + local xor_fw_chksum + + [ -z "$mac" -o -z "$mac_offset" ] && return + + [ -n "$chksum_offset" ] && { + xor_mac=${mac//:/} + xor_mac="${xor_mac:0:4} ${xor_mac:4:4} ${xor_mac:8:4}" + + xor_fw_mac=$(hexdump -v -n 6 -s $mac_offset -e '/1 "%02x"' /lib/firmware/$FIRMWARE) + xor_fw_mac="${xor_fw_mac:0:4} ${xor_fw_mac:4:4} ${xor_fw_mac:8:4}" + + xor_fw_chksum=$(hexdump -v -n 2 -s $chksum_offset -e '/1 "%02x"' /lib/firmware/$FIRMWARE) + xor_fw_chksum=$(xor $xor_fw_chksum $xor_fw_mac $xor_mac) + + printf "%b" "\x${xor_fw_chksum:0:2}\x${xor_fw_chksum:2:2}" | \ + dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=$chksum_offset count=2 + } + + macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=$mac_offset count=6 +} + +case "$FIRMWARE" in + "ath9k-eeprom-pci-0000:00:0e.0.bin" | \ + "ath9k-eeprom-pci-0000:01:00.0.bin" | \ + "ath9k-eeprom-pci-0000:02:00.0.bin") + board=$(board_name) + + case "$board" in + avm,fritz3370-rev2-hynix|\ + avm,fritz3370-rev2-micron|\ + avm,fritz7362sl) + ath9k_eeprom_extract_reverse "urlader" 5441 1088 + ;; + avm,fritz7360sl) + ath9k_eeprom_extract "urlader" 2437 0 + ;; + avm,fritz7412) + /usr/bin/fritz_cal_extract -i 1 -s 0x1e000 -e 0x207 -l 4096 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader") + ;; + bt,homehub-v5a) + ath9k_ubi_eeprom_extract "caldata" 4096 0 + ath9k_patch_fw_mac_crc $(macaddr_add $(mtd_get_mac_binary_ubi caldata 4364) +2) 268 + ;; + tplink,tdw8970|\ + tplink,tdw8980) + ath9k_eeprom_extract "boardconfig" 135168 0 + ;; + *) + ath9k_eeprom_die "board $board is not supported yet" + ;; + esac + ;; +esac diff --git a/target/linux/lantiq/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh similarity index 91% rename from target/linux/lantiq/base-files/lib/upgrade/platform.sh rename to target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh index c47ff78fb2..dcd797c30d 100755 --- a/target/linux/lantiq/base-files/lib/upgrade/platform.sh +++ b/target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh @@ -13,8 +13,6 @@ platform_do_upgrade() { avm,fritz3370-rev2-micron|\ avm,fritz7362sl|\ avm,fritz7412|\ - bt,homehub-v2b|\ - bt,homehub-v3a|\ bt,homehub-v5a|\ zyxel,p-2812hnu-f1|\ zyxel,p-2812hnu-f3) diff --git a/target/linux/lantiq/xway/base-files/etc/board.d/01_leds b/target/linux/lantiq/xway/base-files/etc/board.d/01_leds new file mode 100755 index 0000000000..82a39f4648 --- /dev/null +++ b/target/linux/lantiq/xway/base-files/etc/board.d/01_leds @@ -0,0 +1,44 @@ +#!/bin/sh +# +# Copyright (C) 2011-2015 OpenWrt.org +# + +. /lib/functions/leds.sh +. /lib/functions/uci-defaults.sh + +board_config_update + +led_wifi="$(get_dt_led wifi)" +[ -n "$led_wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "$led_wifi" "phy0tpt" + +led_usb="$(get_dt_led usb)" +[ -n "$led_usb" ] && ucidef_set_led_usbdev "usb" "usb" "$led_usb" "1-1" + +led_usb2="$(get_dt_led usb2)" +[ -n "$led_usb2" ] && ucidef_set_led_usbdev "usb2" "usb2" "$led_usb2" "2-1" + +led_dsl="$(get_dt_led dsl)" +[ -n "$led_dsl" ] && { + led_internet="$(get_dt_led internet)" + if [ -n "$led_internet" ]; then + ucidef_set_led_default "dsl" "dsl" "$led_dsl" "0" + ucidef_set_led_netdev "internet" "internet" "$led_internet" "pppoe-wan" + else + ucidef_set_led_netdev "dsl" "dsl" "$led_dsl" "dsl0" + fi +} + +board=$(board_name) + +case "$board" in +arcadyan,arv7506pw11) + ucidef_set_led_wlan "wifi" "wifi" "arv7506pw11:green:wlan" "phy0radio" + ;; +arcadyan,arv752dpw22) + ucidef_set_led_wlan "wifi" "wifi" "arv752dpw22:red:wifi" "phy0radio" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/lantiq/xway/base-files/etc/board.d/02_network b/target/linux/lantiq/xway/base-files/etc/board.d/02_network new file mode 100755 index 0000000000..89368d8bfb --- /dev/null +++ b/target/linux/lantiq/xway/base-files/etc/board.d/02_network @@ -0,0 +1,118 @@ +#!/bin/sh +# +# Copyright (C) 2011-2015 OpenWrt.org +# + +. /lib/functions/uci-defaults.sh +. /lib/functions/system.sh +. /lib/functions/lantiq.sh + +lantiq_setup_interfaces() +{ + local board="$1" + + case "$board" in + arcadyan,arv4510pw) + ucidef_add_switch "switch0" \ + "0:lan:4" "2:lan:2" "1:lan:3" "3:lan:1" "5t@eth0" + ;; + arcadyan,arv4519pw|\ + arcadyan,arv7510pw22|\ + arcadyan,arv7518pw|\ + arcadyan,arv752dpw22|\ + arcadyan,arv8539pw22|\ + buffalo,wbmr-hp-g300h) + ucidef_add_switch "switch0" \ + "0t@eth0" "2:lan" "3:lan" "4:lan" "5:lan" + ;; + arcadyan,arv7506pw11|\ + audiocodes,mp-252|\ + siemens,gigaset-sx76x) + ucidef_add_switch "switch0" \ + "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5t@eth0" + ;; + arcadyan,arv7519pw|\ + zte,h201l) + ucidef_add_switch "switch0" \ + "0:lan" "1:lan" "2:lan" "3:lan" "4t@eth0" + ;; + bt,homehub-v2b) + ucidef_add_switch "switch0" \ + "1:lan" "2:lan" "3:lan" "4:lan" "5t@eth0" + ;; + netgear,dgn3500|\ + netgear,dgn3500b) + ucidef_add_switch "switch0" \ + "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth0" + ;; + zyxel,p-2601hn) + ucidef_add_switch "switch0" \ + "0:lan" "1:lan" "2:lan" "3:lan" "5t@eth0" + ;; + *) + ucidef_set_interface_lan 'eth0' + ;; + esac +} + +lantiq_setup_dsl() +{ + local board="$1" + local annex="a" + + case "$board" in + arcadyan,arv7506pw11|\ + arcadyan,arv7525pw|\ + arcadyan,arv752dpw|\ + arcadyan,arv752dpw22|\ + arcadyan,arv8539pw22|\ + avm,fritz7312|\ + avm,fritz7320|\ + siemens,gigaset-sx76x|\ + zte,h201l) + annex="b" + ;; + esac + + lantiq_setup_dsl_helper "$annex" +} + +lantiq_setup_macs() +{ + local board="$1" + local lan_mac="" + local wan_mac="" + + case "$board" in + arcadyan,arv4510pw|\ + bt,homehub-v2b|\ + bt,homehub-v3a|\ + netgear,dgn3500|\ + netgear,dgn3500b) + lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr) + wan_mac=$(macaddr_add "$lan_mac" 1) + ;; + arcadyan,arv7506pw11) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 0x16)" 2) + ;; + arcadyan,arv7519pw) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 0x16)" 1) + ;; + avm,fritz7312|\ + avm,fritz7320) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 0xa91)" 1) + ;; + esac + + [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" "$lan_mac" + [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" "$wan_mac" +} + +board_config_update +board=$(board_name) +lantiq_setup_interfaces $board +lantiq_setup_dsl $board +lantiq_setup_macs $board +board_config_flush + +exit 0 diff --git a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom similarity index 86% rename from target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom rename to target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom index 6ae5e3cfe9..a5ffa918f5 100644 --- a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom +++ b/target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom @@ -148,28 +148,13 @@ case "$FIRMWARE" in ath9k_eeprom_extract "art-copy" 0 1 ath9k_patch_fw_mac_crc $(macaddr_add $(mtd_get_mac_ascii uboot_env ethaddr) +2) 268 ;; - bt,homehub-v5a) - ath9k_ubi_eeprom_extract "caldata" 4096 0 - ath9k_patch_fw_mac_crc $(macaddr_add $(mtd_get_mac_binary_ubi caldata 4364) +2) 268 - ;; netgear,dgn3500|netgear,dgn3500b) ath9k_eeprom_extract "calibration" 61440 0 ath9k_patch_fw_mac_crc $(macaddr_add $(mtd_get_mac_ascii uboot-env ethaddr) +2) 524 ;; - avm,fritz3370-rev2-hynix|\ - avm,fritz3370-rev2-micron|\ - avm,fritz7362sl) - ath9k_eeprom_extract_reverse "urlader" 5441 1088 - ;; - avm,fritz7312|avm,fritz7320|avm,fritz7360sl) + avm,fritz7312|avm,fritz7320) ath9k_eeprom_extract "urlader" 2437 0 ;; - avm,fritz7412) - /usr/bin/fritz_cal_extract -i 1 -s 0x1e000 -e 0x207 -l 4096 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader") - ;; - tplink,tdw8970|tplink,tdw8980) - ath9k_eeprom_extract "boardconfig" 135168 0 - ;; *) ath9k_eeprom_die "board $board is not supported yet" ;; diff --git a/target/linux/lantiq/xway/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/xway/base-files/lib/upgrade/platform.sh new file mode 100755 index 0000000000..5ef0a0ddb9 --- /dev/null +++ b/target/linux/lantiq/xway/base-files/lib/upgrade/platform.sh @@ -0,0 +1,20 @@ +PART_NAME=firmware +REQUIRE_IMAGE_METADATA=1 + +platform_check_image() { + return 0 +} + +platform_do_upgrade() { + local board=$(board_name) + + case "$board" in + bt,homehub-v2b|\ + bt,homehub-v3a) + nand_do_upgrade $1 + ;; + *) + default_do_upgrade "$1" + ;; + esac +} diff --git a/target/linux/lantiq/xway/config-4.19 b/target/linux/lantiq/xway/config-4.19 index 64a6c55832..6075cec522 100644 --- a/target/linux/lantiq/xway/config-4.19 +++ b/target/linux/lantiq/xway/config-4.19 @@ -6,7 +6,6 @@ CONFIG_CRC16=y CONFIG_CRYPTO_ACOMP2=y CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_LZO=y -CONFIG_FIRMWARE_IN_KERNEL=y CONFIG_INPUT=y CONFIG_INPUT_EVDEV=y CONFIG_INPUT_POLLDEV=y @@ -26,9 +25,6 @@ CONFIG_MTD_UBI_BLOCK=y # CONFIG_MTD_UBI_GLUEBI is not set CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_NLS=y -CONFIG_OF_ADDRESS_PCI=y -CONFIG_OF_PCI=y -CONFIG_OF_PCI_IRQ=y CONFIG_PCI=y # CONFIG_PCIE_LANTIQ is not set CONFIG_PCI_DOMAINS=y diff --git a/target/linux/lantiq/xway_legacy/base-files/etc/board.d/01_leds b/target/linux/lantiq/xway_legacy/base-files/etc/board.d/01_leds new file mode 100755 index 0000000000..4200dcb0c8 --- /dev/null +++ b/target/linux/lantiq/xway_legacy/base-files/etc/board.d/01_leds @@ -0,0 +1,41 @@ +#!/bin/sh +# +# Copyright (C) 2011-2015 OpenWrt.org +# + +. /lib/functions/leds.sh +. /lib/functions/uci-defaults.sh + +board_config_update + +led_wifi="$(get_dt_led wifi)" +[ -n "$led_wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "$led_wifi" "phy0tpt" + +led_usb="$(get_dt_led usb)" +[ -n "$led_usb" ] && ucidef_set_led_usbdev "usb" "usb" "$led_usb" "1-1" + +led_usb2="$(get_dt_led usb2)" +[ -n "$led_usb2" ] && ucidef_set_led_usbdev "usb2" "usb2" "$led_usb2" "2-1" + +led_dsl="$(get_dt_led dsl)" +[ -n "$led_dsl" ] && { + led_internet="$(get_dt_led internet)" + if [ -n "$led_internet" ]; then + ucidef_set_led_default "dsl" "dsl" "$led_dsl" "0" + ucidef_set_led_netdev "internet" "internet" "$led_internet" "pppoe-wan" + else + ucidef_set_led_netdev "dsl" "dsl" "$led_dsl" "dsl0" + fi +} + +board=$(board_name) + +case "$board" in +arcadyan,arv4525pw) + ucidef_set_led_netdev "wifi" "wifi" "arv4525pw:green:wlan" "wlan0" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/lantiq/xway_legacy/base-files/etc/board.d/02_network b/target/linux/lantiq/xway_legacy/base-files/etc/board.d/02_network new file mode 100755 index 0000000000..c29beb832d --- /dev/null +++ b/target/linux/lantiq/xway_legacy/base-files/etc/board.d/02_network @@ -0,0 +1,61 @@ +#!/bin/sh +# +# Copyright (C) 2011-2015 OpenWrt.org +# + +. /lib/functions/uci-defaults.sh +. /lib/functions/system.sh +. /lib/functions/lantiq.sh + +lantiq_setup_interfaces() +{ + local board="$1" + + case "$board" in + arcadyan,arv4520pw) + ucidef_add_switch "switch0" \ + "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth0" + ;; + *) + ucidef_set_interface_lan 'eth0' + ;; + esac +} + +lantiq_setup_dsl() +{ + local board="$1" + local annex="a" + + case "$board" in + arcadyan,arv4520pw|\ + arcadyan,arv4525pw|\ + arcadyan,arv452cqw) + annex="b" + ;; + esac + + lantiq_setup_dsl_helper "$annex" +} + +lantiq_setup_macs() +{ + local board="$1" + local lan_mac="" + local wan_mac="" + + case "$board" in + esac + + [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" "$lan_mac" + [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" "$wan_mac" +} + +board_config_update +board=$(board_name) +lantiq_setup_interfaces $board +lantiq_setup_dsl $board +lantiq_setup_macs $board +board_config_flush + +exit 0 diff --git a/target/linux/lantiq/xway_legacy/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/xway_legacy/base-files/lib/upgrade/platform.sh new file mode 100755 index 0000000000..d088601bb0 --- /dev/null +++ b/target/linux/lantiq/xway_legacy/base-files/lib/upgrade/platform.sh @@ -0,0 +1,10 @@ +PART_NAME=firmware +REQUIRE_IMAGE_METADATA=1 + +platform_check_image() { + return 0 +} + +platform_do_upgrade() { + default_do_upgrade "$1" +} diff --git a/target/linux/lantiq/xway_legacy/config-4.19 b/target/linux/lantiq/xway_legacy/config-4.19 index feb82c5fcf..c4042f147f 100644 --- a/target/linux/lantiq/xway_legacy/config-4.19 +++ b/target/linux/lantiq/xway_legacy/config-4.19 @@ -5,7 +5,6 @@ CONFIG_CRC16=y CONFIG_CRYPTO_ACOMP2=y CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_LZO=y -CONFIG_FIRMWARE_IN_KERNEL=y # CONFIG_GPIO_SYSFS is not set # CONFIG_HW_RANDOM is not set CONFIG_INPUT=y @@ -18,9 +17,6 @@ CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y # CONFIG_MTD_PHYSMAP_OF is not set CONFIG_NLS=y -CONFIG_OF_ADDRESS_PCI=y -CONFIG_OF_PCI=y -CONFIG_OF_PCI_IRQ=y CONFIG_PCI=y # CONFIG_PCIE_LANTIQ is not set CONFIG_PCI_DOMAINS=y From ceb6d06fd0c2abc634786354773e0f04d32fa9bd Mon Sep 17 00:00:00 2001 From: wybb Date: Sun, 26 Apr 2020 02:25:46 -0500 Subject: [PATCH 07/38] fix xlnetacc logout (#4422) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 迅雷快鸟openwrt的原作者项目:https://github.com/sensec/luci-app-xlnetacc/blob/master/files/root/etc/init.d/xlnetacc 原项目并没有采用kill -9的强杀方式 lean项目中迁移后的版本使用kill -9会导致不能正确注销,从而产生如下问题。 1、luci 快鸟web界面中切换从“启用”切换为“不启用”后,短期内无法停止提速效果(因为只是强杀xlnetacc.sh) 2、强杀将导致未注销就丢失了最近一次的sessionid(该变量为xlnetacc.sh的临时变量,强杀后就丢失了)。根据迅雷快鸟的官方规则,在前一次未注销的情况下,假如ip变化,那么新ip在24小时内将无法再次加速。 所以导致了在 a.重启路由 b.重启光猫 c.重新插拔光猫网线 d.web界面中手工停用快鸟后又进行了重新拨号 这些操作都将导致24小时内无法再次提速 原始项目中采用不加-9的kill能够安全发送信号导致注销操作 --- package/lean/luci-app-xlnetacc/root/etc/init.d/xlnetacc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/luci-app-xlnetacc/root/etc/init.d/xlnetacc b/package/lean/luci-app-xlnetacc/root/etc/init.d/xlnetacc index d156281136..6ad2adbfe2 100755 --- a/package/lean/luci-app-xlnetacc/root/etc/init.d/xlnetacc +++ b/package/lean/luci-app-xlnetacc/root/etc/init.d/xlnetacc @@ -32,10 +32,10 @@ stop() { local pid spid for pid in $(ps | grep xlnetacc.sh | grep -v 'grep' | awk '{print $1}'); do echo "Stop XLNetAcc process PID: $pid" - kill -9 $pid >/dev/null 2>&1 + kill $pid >/dev/null 2>&1 for spid in $(pgrep -P $pid "sleep"); do echo "Stop XLNetAcc process SPID: $spid" - kill -9 $spid >/dev/null 2>&1 + kill $spid >/dev/null 2>&1 done done logger -p "daemon.notice" -t "$NAME" "XLNetAcc has stoped." From 2c0a9d403e190dd93bf3e1ee9a2fec4811782ec8 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Sun, 26 Apr 2020 15:27:50 +0800 Subject: [PATCH 08/38] mac80211 ath10k: increase rx buffer size to 2048 --- ...h10k-increase-rx-buffer-size-to-2048.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch diff --git a/package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch b/package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch new file mode 100644 index 0000000000..55429139fa --- /dev/null +++ b/package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch @@ -0,0 +1,37 @@ +From: Linus Lüssing +Date: Wed, 5 Feb 2020 20:10:43 +0100 +Subject: ath10k: increase rx buffer size to 2048 + +Before, only frames with a maximum size of 1528 bytes could be +transmitted between two 802.11s nodes. + +For batman-adv for instance, which adds its own header to each frame, +we typically need an MTU of at least 1532 bytes to be able to transmit +without fragmentation. + +This patch now increases the maxmimum frame size from 1528 to 1656 +bytes. + +Tested with two ath10k devices in 802.11s mode, as well as with +batman-adv on top of 802.11s with forwarding disabled. + +Fix originally found and developed by Ben Greear. + +Link: https://github.com/greearb/ath10k-ct/issues/89 +Link: https://github.com/greearb/ath10k-ct/commit/9e5ab25027e0971fa24ccf93373324c08c4e992d +Cc: Ben Greear +Signed-off-by: Linus Lüssing + +Forwarded: https://patchwork.kernel.org/patch/11367055/ + +--- a/drivers/net/wireless/ath/ath10k/htt.h ++++ b/drivers/net/wireless/ath/ath10k/htt.h +@@ -2219,7 +2219,7 @@ struct htt_rx_chan_info { + * Should be: sizeof(struct htt_host_rx_desc) + max rx MSDU size, + * rounded up to a cache line size. + */ +-#define HTT_RX_BUF_SIZE 1920 ++#define HTT_RX_BUF_SIZE 2048 + #define HTT_RX_MSDU_SIZE (HTT_RX_BUF_SIZE - (int)sizeof(struct htt_rx_desc)) + + /* Refill a bunch of RX buffers for each refill round so that FW/HW can handle From 4306c245cf48ec4ae7061337b517d86125c4fc6b Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Sun, 26 Apr 2020 15:36:41 +0800 Subject: [PATCH 09/38] generic: fix flow table hw offload --- ...w_table-support-hw-offload-through-v.patch | 33 ++++++++++--------- ...w_table-support-hw-offload-through-v.patch | 33 ++++++++++--------- 2 files changed, 36 insertions(+), 30 deletions(-) diff --git a/target/linux/generic/pending-4.14/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch b/target/linux/generic/pending-4.14/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch index 9311725346..e1b13a1ad4 100644 --- a/target/linux/generic/pending-4.14/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch +++ b/target/linux/generic/pending-4.14/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch @@ -79,7 +79,7 @@ Signed-off-by: Felix Fietkau struct nf_flow_route { --- a/net/netfilter/nf_flow_table_hw.c +++ b/net/netfilter/nf_flow_table_hw.c -@@ -19,48 +19,75 @@ struct flow_offload_hw { +@@ -19,48 +19,77 @@ struct flow_offload_hw { enum flow_offload_type type; struct flow_offload *flow; struct nf_conn *ct; @@ -92,6 +92,7 @@ Signed-off-by: Felix Fietkau -static int do_flow_offload_hw(struct net *net, struct flow_offload *flow, - int type) +static void flow_offload_check_ethernet(struct flow_offload_tuple *tuple, ++ struct dst_entry *dst, + struct flow_offload_hw_path *path) { - struct net_device *indev; @@ -112,7 +113,7 @@ Signed-off-by: Felix Fietkau - dev_put(indev); + memcpy(path->eth_src, path->dev->dev_addr, ETH_ALEN); -+ n = dst_neigh_lookup(tuple->dst_cache, &tuple->src_v4); ++ n = dst_neigh_lookup(dst, &tuple->src_v4); + if (!n) + return; @@ -125,6 +126,7 @@ Signed-off-by: Felix Fietkau -static void flow_offload_hw_work_add(struct flow_offload_hw *offload) +static int flow_offload_check_path(struct net *net, + struct flow_offload_tuple *tuple, ++ struct dst_entry *dst, + struct flow_offload_hw_path *path) { - struct net *net; @@ -138,7 +140,7 @@ Signed-off-by: Felix Fietkau + return -ENOENT; + + path->dev = dev; -+ flow_offload_check_ethernet(tuple, path); ++ flow_offload_check_ethernet(tuple, dst, path); - net = read_pnet(&offload->flow_hw_net); - ret = do_flow_offload_hw(net, offload->flow, FLOW_OFFLOAD_ADD); @@ -166,11 +168,11 @@ Signed-off-by: Felix Fietkau + /* restore devices in case the driver mangled them */ + offload->src.dev = src_dev; + offload->dest.dev = dest_dev; -+ -+ return ret; -+} - do_flow_offload_hw(net, offload->flow, FLOW_OFFLOAD_DEL); ++ return ret; ++} ++ +static void flow_offload_hw_free(struct flow_offload_hw *offload) +{ + dev_put(offload->src.dev); @@ -182,7 +184,7 @@ Signed-off-by: Felix Fietkau } static void flow_offload_hw_work(struct work_struct *work) -@@ -73,18 +100,22 @@ static void flow_offload_hw_work(struct +@@ -73,18 +102,22 @@ static void flow_offload_hw_work(struct spin_unlock_bh(&flow_offload_hw_pending_list_lock); list_for_each_entry_safe(offload, next, &hw_offload_pending, list) { @@ -211,7 +213,7 @@ Signed-off-by: Felix Fietkau } } -@@ -97,20 +128,55 @@ static void flow_offload_queue_work(stru +@@ -97,20 +130,56 @@ static void flow_offload_queue_work(stru schedule_work(&nf_flow_offload_hw_work); } @@ -220,17 +222,18 @@ Signed-off-by: Felix Fietkau +{ + struct flow_offload_hw_path src = {}; + struct flow_offload_hw_path dest = {}; -+ struct flow_offload_tuple *tuple; ++ struct flow_offload_tuple *tuple_s, *tuple_d; + struct flow_offload_hw *offload = NULL; + + rcu_read_lock_bh(); + -+ tuple = &flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple; -+ if (flow_offload_check_path(net, tuple, &src)) ++ tuple_s = &flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple; ++ tuple_d = &flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple; ++ ++ if (flow_offload_check_path(net, tuple_s, tuple_d->dst_cache, &src)) + goto out; + -+ tuple = &flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple; -+ if (flow_offload_check_path(net, tuple, &dest)) ++ if (flow_offload_check_path(net, tuple_d, tuple_s->dst_cache, &dest)) + goto out; + + if (!src.dev->netdev_ops->ndo_flow_offload) @@ -270,7 +273,7 @@ Signed-off-by: Felix Fietkau flow_offload_queue_work(offload); } -@@ -119,14 +185,11 @@ static void flow_offload_hw_del(struct n +@@ -119,14 +188,11 @@ static void flow_offload_hw_del(struct n { struct flow_offload_hw *offload; @@ -286,7 +289,7 @@ Signed-off-by: Felix Fietkau flow_offload_queue_work(offload); } -@@ -153,12 +216,8 @@ static void __exit nf_flow_table_hw_modu +@@ -153,12 +219,8 @@ static void __exit nf_flow_table_hw_modu nf_flow_table_hw_unregister(&flow_offload_hw); cancel_work_sync(&nf_flow_offload_hw_work); diff --git a/target/linux/generic/pending-4.19/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch b/target/linux/generic/pending-4.19/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch index 87ff634793..30819d47af 100644 --- a/target/linux/generic/pending-4.19/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch +++ b/target/linux/generic/pending-4.19/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch @@ -79,7 +79,7 @@ Signed-off-by: Felix Fietkau struct nf_flow_route { --- a/net/netfilter/nf_flow_table_hw.c +++ b/net/netfilter/nf_flow_table_hw.c -@@ -19,48 +19,75 @@ struct flow_offload_hw { +@@ -19,48 +19,77 @@ struct flow_offload_hw { enum flow_offload_type type; struct flow_offload *flow; struct nf_conn *ct; @@ -92,6 +92,7 @@ Signed-off-by: Felix Fietkau -static int do_flow_offload_hw(struct net *net, struct flow_offload *flow, - int type) +static void flow_offload_check_ethernet(struct flow_offload_tuple *tuple, ++ struct dst_entry *dst, + struct flow_offload_hw_path *path) { - struct net_device *indev; @@ -112,7 +113,7 @@ Signed-off-by: Felix Fietkau - dev_put(indev); + memcpy(path->eth_src, path->dev->dev_addr, ETH_ALEN); -+ n = dst_neigh_lookup(tuple->dst_cache, &tuple->src_v4); ++ n = dst_neigh_lookup(dst, &tuple->src_v4); + if (!n) + return; @@ -125,6 +126,7 @@ Signed-off-by: Felix Fietkau -static void flow_offload_hw_work_add(struct flow_offload_hw *offload) +static int flow_offload_check_path(struct net *net, + struct flow_offload_tuple *tuple, ++ struct dst_entry *dst, + struct flow_offload_hw_path *path) { - struct net *net; @@ -138,7 +140,7 @@ Signed-off-by: Felix Fietkau + return -ENOENT; + + path->dev = dev; -+ flow_offload_check_ethernet(tuple, path); ++ flow_offload_check_ethernet(tuple, dst, path); - net = read_pnet(&offload->flow_hw_net); - ret = do_flow_offload_hw(net, offload->flow, FLOW_OFFLOAD_ADD); @@ -166,11 +168,11 @@ Signed-off-by: Felix Fietkau + /* restore devices in case the driver mangled them */ + offload->src.dev = src_dev; + offload->dest.dev = dest_dev; -+ -+ return ret; -+} - do_flow_offload_hw(net, offload->flow, FLOW_OFFLOAD_DEL); ++ return ret; ++} ++ +static void flow_offload_hw_free(struct flow_offload_hw *offload) +{ + dev_put(offload->src.dev); @@ -182,7 +184,7 @@ Signed-off-by: Felix Fietkau } static void flow_offload_hw_work(struct work_struct *work) -@@ -73,18 +100,22 @@ static void flow_offload_hw_work(struct +@@ -73,18 +102,22 @@ static void flow_offload_hw_work(struct spin_unlock_bh(&flow_offload_hw_pending_list_lock); list_for_each_entry_safe(offload, next, &hw_offload_pending, list) { @@ -211,7 +213,7 @@ Signed-off-by: Felix Fietkau } } -@@ -97,20 +128,55 @@ static void flow_offload_queue_work(stru +@@ -97,20 +130,56 @@ static void flow_offload_queue_work(stru schedule_work(&nf_flow_offload_hw_work); } @@ -220,17 +222,18 @@ Signed-off-by: Felix Fietkau +{ + struct flow_offload_hw_path src = {}; + struct flow_offload_hw_path dest = {}; -+ struct flow_offload_tuple *tuple; ++ struct flow_offload_tuple *tuple_s, *tuple_d; + struct flow_offload_hw *offload = NULL; + + rcu_read_lock_bh(); + -+ tuple = &flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple; -+ if (flow_offload_check_path(net, tuple, &src)) ++ tuple_s = &flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple; ++ tuple_d = &flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple; ++ ++ if (flow_offload_check_path(net, tuple_s, tuple_d->dst_cache, &src)) + goto out; + -+ tuple = &flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple; -+ if (flow_offload_check_path(net, tuple, &dest)) ++ if (flow_offload_check_path(net, tuple_d, tuple_s->dst_cache, &dest)) + goto out; + + if (!src.dev->netdev_ops->ndo_flow_offload) @@ -270,7 +273,7 @@ Signed-off-by: Felix Fietkau flow_offload_queue_work(offload); } -@@ -119,14 +185,11 @@ static void flow_offload_hw_del(struct n +@@ -119,14 +188,11 @@ static void flow_offload_hw_del(struct n { struct flow_offload_hw *offload; @@ -286,7 +289,7 @@ Signed-off-by: Felix Fietkau flow_offload_queue_work(offload); } -@@ -153,12 +216,8 @@ static void __exit nf_flow_table_hw_modu +@@ -153,12 +219,8 @@ static void __exit nf_flow_table_hw_modu nf_flow_table_hw_unregister(&flow_offload_hw); cancel_work_sync(&nf_flow_offload_hw_work); From fcfde03578a39f1cf5fd463493e63a679bce61d7 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Sun, 26 Apr 2020 16:09:40 +0800 Subject: [PATCH 10/38] UnblockNeteaseMusic: update search api --- package/lean/UnblockNeteaseMusic/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/UnblockNeteaseMusic/Makefile b/package/lean/UnblockNeteaseMusic/Makefile index 824246b701..5b4685dcac 100644 --- a/package/lean/UnblockNeteaseMusic/Makefile +++ b/package/lean/UnblockNeteaseMusic/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=UnblockNeteaseMusic PKG_VERSION:=0.24.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_LICENSE:=MIT PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/nondanee/UnblockNeteaseMusic.git -PKG_SOURCE_VERSION:=91e631db87920c67f92161a724a2d96472ad33cd +PKG_SOURCE_VERSION:=9c9582401e999e1876c4baa204d35284a3d32bec PKG_SOURCE_SUBDIR:=$(PKG_NAME) PKG_SOURCE:=$(PKG_SOURCE_SUBDIR)-$(PKG_VERSION).tar.gz From 9206d58b3467fee8a39ae16ef9866bc69388b1bd Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Sun, 26 Apr 2020 16:20:39 +0800 Subject: [PATCH 11/38] luci-app-ipsec-vpnd: fix outboud rules with some China android phones --- package/lean/luci-app-ipsec-vpnd/Makefile | 2 +- package/lean/luci-app-ipsec-vpnd/root/etc/ipsec.include | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package/lean/luci-app-ipsec-vpnd/Makefile b/package/lean/luci-app-ipsec-vpnd/Makefile index b7a83920f5..4509037631 100644 --- a/package/lean/luci-app-ipsec-vpnd/Makefile +++ b/package/lean/luci-app-ipsec-vpnd/Makefile @@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for IPSec VPN Server (IKEv1 with PSK and Xauth) LUCI_DEPENDS:=+strongswan-minimal +strongswan-mod-xauth-generic LUCI_PKGARCH:=all PKG_VERSION:=1.0 -PKG_RELEASE:=7 +PKG_RELEASE:=8 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/package/lean/luci-app-ipsec-vpnd/root/etc/ipsec.include b/package/lean/luci-app-ipsec-vpnd/root/etc/ipsec.include index 5c71080803..118fd0e303 100755 --- a/package/lean/luci-app-ipsec-vpnd/root/etc/ipsec.include +++ b/package/lean/luci-app-ipsec-vpnd/root/etc/ipsec.include @@ -2,10 +2,12 @@ iptables -D FORWARD -m policy --dir in --pol ipsec --proto esp -j ACCEPT 2>/dev iptables -D FORWARD -m policy --dir out --pol ipsec --proto esp -j ACCEPT 2>/dev/null iptables -D INPUT -m policy --dir in --pol ipsec --proto esp -j ACCEPT 2>/dev/null iptables -D OUTPUT -m policy --dir out --pol ipsec --proto esp -j ACCEPT 2>/dev/null +iptables -D FORWARD -p tcp --syn -i ppp+ -j TCPMSS --set-mss 1356 2>/dev/null iptables -I FORWARD -m policy --dir in --pol ipsec --proto esp -j ACCEPT iptables -I FORWARD -m policy --dir out --pol ipsec --proto esp -j ACCEPT iptables -I INPUT -m policy --dir in --pol ipsec --proto esp -j ACCEPT iptables -I OUTPUT -m policy --dir out --pol ipsec --proto esp -j ACCEPT +iptables -I FORWARD -p tcp --syn -i ppp+ -j TCPMSS --set-mss 1356 echo 1 > /proc/sys/net/ipv4/conf/br-lan/proxy_arp From b0fd18016208f3651e46ceee202dd9a5d8999d1c Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Sun, 26 Apr 2020 16:37:04 +0800 Subject: [PATCH 12/38] Revert "mac80211 ath10k: increase rx buffer size to 2048" This reverts commit 2c0a9d403e190dd93bf3e1ee9a2fec4811782ec8. --- ...h10k-increase-rx-buffer-size-to-2048.patch | 37 ------------------- 1 file changed, 37 deletions(-) delete mode 100644 package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch diff --git a/package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch b/package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch deleted file mode 100644 index 55429139fa..0000000000 --- a/package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Linus Lüssing -Date: Wed, 5 Feb 2020 20:10:43 +0100 -Subject: ath10k: increase rx buffer size to 2048 - -Before, only frames with a maximum size of 1528 bytes could be -transmitted between two 802.11s nodes. - -For batman-adv for instance, which adds its own header to each frame, -we typically need an MTU of at least 1532 bytes to be able to transmit -without fragmentation. - -This patch now increases the maxmimum frame size from 1528 to 1656 -bytes. - -Tested with two ath10k devices in 802.11s mode, as well as with -batman-adv on top of 802.11s with forwarding disabled. - -Fix originally found and developed by Ben Greear. - -Link: https://github.com/greearb/ath10k-ct/issues/89 -Link: https://github.com/greearb/ath10k-ct/commit/9e5ab25027e0971fa24ccf93373324c08c4e992d -Cc: Ben Greear -Signed-off-by: Linus Lüssing - -Forwarded: https://patchwork.kernel.org/patch/11367055/ - ---- a/drivers/net/wireless/ath/ath10k/htt.h -+++ b/drivers/net/wireless/ath/ath10k/htt.h -@@ -2219,7 +2219,7 @@ struct htt_rx_chan_info { - * Should be: sizeof(struct htt_host_rx_desc) + max rx MSDU size, - * rounded up to a cache line size. - */ --#define HTT_RX_BUF_SIZE 1920 -+#define HTT_RX_BUF_SIZE 2048 - #define HTT_RX_MSDU_SIZE (HTT_RX_BUF_SIZE - (int)sizeof(struct htt_rx_desc)) - - /* Refill a bunch of RX buffers for each refill round so that FW/HW can handle From a561416254610aa4baed401111ee0bf3a6cb43af Mon Sep 17 00:00:00 2001 From: Mattraks <16359027+Mattraks@users.noreply.github.com> Date: Mon, 27 Apr 2020 00:57:24 +0800 Subject: [PATCH 13/38] v2ray-plugin:Add GOPROXY support (#4421) --- package/lean/v2ray-plugin/Makefile | 27 +++++++++++++++++++++------ package/lean/v2ray/Makefile | 3 ++- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/package/lean/v2ray-plugin/Makefile b/package/lean/v2ray-plugin/Makefile index 5eb1dffabb..5506183e17 100644 --- a/package/lean/v2ray-plugin/Makefile +++ b/package/lean/v2ray-plugin/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=v2ray-plugin PKG_VERSION:=1.3.0 PKG_RELEASE:=2 -PKG_BUILD_DIR:=$(BUILD_DIR)/v2ray-plugin-$(PKG_VERSION) +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/shadowsocks/v2ray-plugin/tar.gz/v$(PKG_VERSION)? @@ -26,19 +26,34 @@ PKG_USE_MIPS16:=0 GO_PKG:=github.com/shadowsocks/v2ray-plugin GO_PKG_LDFLAGS:=-s -w +PKG_CONFIG_DEPENDS := CONFIG_$(PKG_NAME)_INCLUDE_GOPROXY include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk -define Package/v2ray-plugin +define Package/$(PKG_NAME)/config +config $(PKG_NAME)_INCLUDE_GOPROXY + bool "Compiling with GOPROXY proxy" + default n + +endef + +ifeq ($(CONFIG_$(PKG_NAME)_INCLUDE_GOPROXY),y) +export GO111MODULE=on +export GOPROXY=https://goproxy.io +#export GOPROXY=https://mirrors.aliyun.com/goproxy/ +endif + +define Package/$(PKG_NAME) SECTION:=net CATEGORY:=Network + SUBMENU:=Project V TITLE:=SIP003 plugin for shadowsocks, based on v2ray URL:=https://github.com/shadowsocks/v2ray-plugin DEPENDS:=$(GO_ARCH_DEPENDS) +ca-certificates endef -define Package/v2ray-plugin/description +define Package/$(PKG_NAME)/description Yet another SIP003 plugin for shadowsocks, based on v2ray endef @@ -51,9 +66,9 @@ define Build/Compile $(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/v2ray-plugin endef -define Package/v2ray-plugin/install +define Package/$(PKG_NAME)/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/v2ray-plugin $(1)/usr/bin/v2ray-plugin endef -$(eval $(call GoBinPackage,v2ray-plugin)) -$(eval $(call BuildPackage,v2ray-plugin)) +$(eval $(call GoBinPackage,$(PKG_NAME))) +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/package/lean/v2ray/Makefile b/package/lean/v2ray/Makefile index 40cee8e850..abed0879a1 100644 --- a/package/lean/v2ray/Makefile +++ b/package/lean/v2ray/Makefile @@ -89,7 +89,8 @@ endef ifeq ($(CONFIG_V2RAY_COMPRESS_GOPROXY),y) export GO111MODULE=on -export GOPROXY=https://goproxy.cn +export GOPROXY=https://goproxy.io +#export GOPROXY=https://mirrors.aliyun.com/goproxy/ endif V2RAY_SED_ARGS:= From 9da88d82c9563db11091b2580ff42b0f83b6abd5 Mon Sep 17 00:00:00 2001 From: Yangbo Lu Date: Tue, 14 Apr 2020 15:24:50 +0800 Subject: [PATCH 14/38] perf: build with NO_LIBCAP=1 Build with NO_LIBCAP=1. This is to resolve build issue. Package perf is missing dependencies for the following libraries: libcap.so.2 Signed-off-by: Yangbo Lu --- package/devel/perf/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/devel/perf/Makefile b/package/devel/perf/Makefile index bde94416ae..aa478a0431 100644 --- a/package/devel/perf/Makefile +++ b/package/devel/perf/Makefile @@ -26,7 +26,7 @@ include $(INCLUDE_DIR)/package.mk define Package/perf SECTION:=devel CATEGORY:=Development - DEPENDS:= +libcap +libelf +libdw +PACKAGE_libunwind:libunwind +libpthread +librt +objdump @!IN_SDK @!TARGET_arc770 @KERNEL_PERF_EVENTS + DEPENDS:= +libelf +libdw +PACKAGE_libunwind:libunwind +libpthread +librt +objdump @!IN_SDK @!TARGET_arc770 @KERNEL_PERF_EVENTS TITLE:=Linux performance monitoring tool VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE) URL:=http://www.kernel.org @@ -48,6 +48,7 @@ MAKE_FLAGS = \ NO_LIBAUDIT=1 \ NO_LIBCRYPTO=1 \ NO_LIBUNWIND=1 \ + NO_LIBCAP=1 \ CROSS_COMPILE="$(TARGET_CROSS)" \ CC="$(TARGET_CC)" \ LD="$(TARGET_CROSS)ld" \ From befbdc3fd841c4ba418ae7adba8e8a954f6cda23 Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Thu, 16 Apr 2020 01:23:28 -0300 Subject: [PATCH 15/38] gdb: disable gdbserver for arc Although gdb is supported, gdbserver is still not. checking whether gdbserver is supported on this host... no Build breaks as gdbserver executable is not found during packaging. Signed-off-by: Luiz Angelo Daros de Luca --- package/devel/gdb/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/devel/gdb/Makefile b/package/devel/gdb/Makefile index fd5ac7eb67..a2abf29f86 100644 --- a/package/devel/gdb/Makefile +++ b/package/devel/gdb/Makefile @@ -44,6 +44,7 @@ endef define Package/gdbserver $(call Package/gdb/Default) TITLE:=Remote server for GNU Debugger + DEPENDS=@!arc endef define Package/gdbserver/description From 9edf88448e1e99a13b5921579e9f7dd29679767e Mon Sep 17 00:00:00 2001 From: Lucian Cristian Date: Sun, 19 Apr 2020 15:52:25 +0300 Subject: [PATCH 16/38] u-boot.mk: switch download to https ftp can cause problems on some networks switch primary download location to https and add another mirror Signed-off-by: Lucian Cristian --- include/u-boot.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/u-boot.mk b/include/u-boot.mk index 02e37d0f4c..ec9fb15b6c 100644 --- a/include/u-boot.mk +++ b/include/u-boot.mk @@ -3,7 +3,8 @@ PKG_NAME ?= u-boot ifndef PKG_SOURCE_PROTO PKG_SOURCE = $(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL = \ - https://sources.openwrt.org \ + https://mirror.cyberbits.eu/u-boot \ + https://ftp.denx.de/pub/u-boot \ ftp://ftp.denx.de/pub/u-boot endif From c467605aa00729c8eea9a0dc6e1e4abd77e0e7c4 Mon Sep 17 00:00:00 2001 From: Lucian Cristian Date: Sun, 19 Apr 2020 16:07:10 +0300 Subject: [PATCH 17/38] tools/mkimage: update to 2020.04 also change the download source to https and add a mirror drop merged patches Signed-off-by: Lucian Cristian [Add extra changes to compile on FreeBSD, merge two patches] Signed-off-by: Hauke Mehrtens --- tools/mkimage/Makefile | 9 +- .../030-allow-to-use-different-magic.patch | 2 +- ...d-compatibility-with-non-Linux-hosts.patch | 95 ++++++++ .../patches/050-image_h_portability.patch | 207 ------------------ .../patches/060-remove_kernel_includes.patch | 29 --- .../070-remove_generated_autoconf.patch | 10 + .../patches/210-link-libcrypto-static.patch | 2 +- 7 files changed, 113 insertions(+), 241 deletions(-) create mode 100644 tools/mkimage/patches/050-Add-compatibility-with-non-Linux-hosts.patch delete mode 100644 tools/mkimage/patches/050-image_h_portability.patch delete mode 100644 tools/mkimage/patches/060-remove_kernel_includes.patch create mode 100644 tools/mkimage/patches/070-remove_generated_autoconf.patch diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile index dc1aec18a0..90ecdaaa6e 100644 --- a/tools/mkimage/Makefile +++ b/tools/mkimage/Makefile @@ -7,11 +7,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mkimage -PKG_VERSION:=2019.07 +PKG_VERSION:=2020.04 PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://ftp.denx.de/pub/u-boot -PKG_HASH:=bff4fa77e8da17521c030ca4c5b947a056c1b1be4d3e6ee8637020b8d50251d0 +PKG_SOURCE_URL:= \ + https://mirror.cyberbits.eu/u-boot \ + https://ftp.denx.de/pub/u-boot \ + ftp://ftp.denx.de/pub/u-boot +PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION) diff --git a/tools/mkimage/patches/030-allow-to-use-different-magic.patch b/tools/mkimage/patches/030-allow-to-use-different-magic.patch index ce61cb0fb6..8d79de2992 100644 --- a/tools/mkimage/patches/030-allow-to-use-different-magic.patch +++ b/tools/mkimage/patches/030-allow-to-use-different-magic.patch @@ -50,7 +50,7 @@ This patch makes it possible to set a custom image magic. break; --- a/tools/default_image.c +++ b/tools/default_image.c -@@ -116,7 +116,7 @@ static void image_set_header(void *ptr, +@@ -120,7 +120,7 @@ static void image_set_header(void *ptr, } /* Build new header */ diff --git a/tools/mkimage/patches/050-Add-compatibility-with-non-Linux-hosts.patch b/tools/mkimage/patches/050-Add-compatibility-with-non-Linux-hosts.patch new file mode 100644 index 0000000000..ea2e8e3da3 --- /dev/null +++ b/tools/mkimage/patches/050-Add-compatibility-with-non-Linux-hosts.patch @@ -0,0 +1,95 @@ +From 590b23a46b7ae0f5ec5e8f57a85c0e7578c71141 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Sun, 26 Apr 2020 17:15:17 +0200 +Subject: [PATCH 1/2] Add compatibility with non Linux hosts + +This adds some changes to the u-boot tools to make it possible to build +them on non Linux hosts like MacOS or FreeBSD. + +asm/byteorder.h, asm/posix_types.h, asm/types.h and linux/kernel.h are +not available on such systems. Remove the include and add the necessary +parts for these header files manually or remove the usage too. + +__u64 is not available on FreeBSD, remove its usage. + + has been replaced by + +Signed-off-by: Hauke Mehrtens +--- + include/image.h | 2 ++ + include/imx8image.h | 5 +++++ + include/linux/posix_types.h | 2 ++ + include/linux/types.h | 4 +++- + lib/rsa/rsa-sign.c | 2 +- + 5 files changed, 13 insertions(+), 2 deletions(-) + +--- a/include/image.h ++++ b/include/image.h +@@ -16,7 +16,9 @@ + #define __IMAGE_H__ + + #include "compiler.h" ++#ifdef linux + #include ++#endif + #include + + /* Define this to avoid #ifdefs later on */ +--- a/include/imx8image.h ++++ b/include/imx8image.h +@@ -11,7 +11,12 @@ + #include + #include + #include "imagetool.h" ++#ifdef linux + #include "linux/kernel.h" ++#else ++#define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1) ++#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) ++#endif + + #define __packed __attribute__((packed)) + +--- a/include/linux/posix_types.h ++++ b/include/linux/posix_types.h +@@ -43,6 +43,8 @@ typedef void (*__kernel_sighandler_t)(in + /* Type of a SYSV IPC key. */ + typedef int __kernel_key_t; + ++#ifdef linux + #include ++#endif + + #endif /* _LINUX_POSIX_TYPES_H */ +--- a/include/linux/types.h ++++ b/include/linux/types.h +@@ -2,7 +2,9 @@ + #define _LINUX_TYPES_H + + #include ++#ifdef linux + #include ++#endif + #include + + #ifndef __KERNEL_STRICT_NAMES +@@ -142,7 +144,7 @@ typedef __u16 __bitwise __le16; + typedef __u16 __bitwise __be16; + typedef __u32 __bitwise __le32; + typedef __u32 __bitwise __be32; +-#if defined(__GNUC__) ++#if defined(__GNUC__) && defined(linux) + typedef __u64 __bitwise __le64; + typedef __u64 __bitwise __be64; + #endif +--- a/lib/rsa/rsa-sign.c ++++ b/lib/rsa/rsa-sign.c +@@ -4,7 +4,7 @@ + */ + + #include "mkimage.h" +-#include ++#include + #include + #include + #include diff --git a/tools/mkimage/patches/050-image_h_portability.patch b/tools/mkimage/patches/050-image_h_portability.patch deleted file mode 100644 index 5b47f80cbb..0000000000 --- a/tools/mkimage/patches/050-image_h_portability.patch +++ /dev/null @@ -1,207 +0,0 @@ -Some of the Linux header files are not available on non Linux host -systems like FreeBSD or MacOSX. - -The __le32 and __be32 types are only defined in Linux in -asm/byteorder.h, but not on all other BSD systems. -Use uint32_t instead of __le32 and __be32. - -__swab32 is also a Linux only function, it looks like be32_to_cpu() -would be better here anyway. - ---- a/include/image.h -+++ b/include/image.h -@@ -16,7 +16,6 @@ - #define __IMAGE_H__ - - #include "compiler.h" --#include - #include - - /* Define this to avoid #ifdefs later on */ -@@ -317,13 +316,13 @@ enum { - * all data in network byte order (aka natural aka bigendian). - */ - typedef struct image_header { -- __be32 ih_magic; /* Image Header Magic Number */ -- __be32 ih_hcrc; /* Image Header CRC Checksum */ -- __be32 ih_time; /* Image Creation Timestamp */ -- __be32 ih_size; /* Image Data Size */ -- __be32 ih_load; /* Data Load Address */ -- __be32 ih_ep; /* Entry Point Address */ -- __be32 ih_dcrc; /* Image Data CRC Checksum */ -+ uint32_t ih_magic; /* Image Header Magic Number */ -+ uint32_t ih_hcrc; /* Image Header CRC Checksum */ -+ uint32_t ih_time; /* Image Creation Timestamp */ -+ uint32_t ih_size; /* Image Data Size */ -+ uint32_t ih_load; /* Data Load Address */ -+ uint32_t ih_ep; /* Entry Point Address */ -+ uint32_t ih_dcrc; /* Image Data CRC Checksum */ - uint8_t ih_os; /* Operating System */ - uint8_t ih_arch; /* CPU architecture */ - uint8_t ih_type; /* Image Type */ ---- a/tools/mtk_image.h -+++ b/tools/mtk_image.h -@@ -15,8 +15,8 @@ - union gen_boot_header { - struct { - char name[12]; -- __le32 version; -- __le32 size; -+ uint32_t version; -+ uint32_t size; - }; - - uint8_t pad[0x200]; -@@ -32,14 +32,14 @@ union nand_boot_header { - char name[12]; - char version[4]; - char id[8]; -- __le16 ioif; -- __le16 pagesize; -- __le16 addrcycles; -- __le16 oobsize; -- __le16 pages_of_block; -- __le16 numblocks; -- __le16 writesize_shift; -- __le16 erasesize_shift; -+ uint16_t ioif; -+ uint16_t pagesize; -+ uint16_t addrcycles; -+ uint16_t oobsize; -+ uint16_t pages_of_block; -+ uint16_t numblocks; -+ uint16_t writesize_shift; -+ uint16_t erasesize_shift; - uint8_t dummy[60]; - uint8_t ecc_parity[28]; - }; -@@ -54,14 +54,14 @@ union nand_boot_header { - /* BootROM layout header */ - struct brom_layout_header { - char name[8]; -- __le32 version; -- __le32 header_size; -- __le32 total_size; -- __le32 magic; -- __le32 type; -- __le32 header_size_2; -- __le32 total_size_2; -- __le32 unused; -+ uint32_t version; -+ uint32_t header_size; -+ uint32_t total_size; -+ uint32_t magic; -+ uint32_t type; -+ uint32_t header_size_2; -+ uint32_t total_size_2; -+ uint32_t unused; - }; - - #define BRLYT_NAME "BRLYT" -@@ -90,8 +90,8 @@ struct gen_device_header { - struct gfh_common_header { - uint8_t magic[3]; - uint8_t version; -- __le16 size; -- __le16 type; -+ uint16_t size; -+ uint16_t type; - }; - - #define GFH_HEADER_MAGIC "MMM" -@@ -106,17 +106,17 @@ struct gfh_common_header { - struct gfh_file_info { - struct gfh_common_header gfh; - char name[12]; -- __le32 unused; -- __le16 file_type; -+ uint32_t unused; -+ uint16_t file_type; - uint8_t flash_type; - uint8_t sig_type; -- __le32 load_addr; -- __le32 total_size; -- __le32 max_size; -- __le32 hdr_size; -- __le32 sig_size; -- __le32 jump_offset; -- __le32 processed; -+ uint32_t load_addr; -+ uint32_t total_size; -+ uint32_t max_size; -+ uint32_t hdr_size; -+ uint32_t sig_size; -+ uint32_t jump_offset; -+ uint32_t processed; - }; - - #define GFH_FILE_INFO_NAME "FILE_INFO" -@@ -129,16 +129,16 @@ struct gfh_file_info { - - struct gfh_bl_info { - struct gfh_common_header gfh; -- __le32 attr; -+ uint32_t attr; - }; - - struct gfh_brom_cfg { - struct gfh_common_header gfh; -- __le32 cfg_bits; -- __le32 usbdl_by_auto_detect_timeout_ms; -+ uint32_t cfg_bits; -+ uint32_t usbdl_by_auto_detect_timeout_ms; - uint8_t unused[0x48]; -- __le32 usbdl_by_kcol0_timeout_ms; -- __le32 usbdl_by_flag_timeout_ms; -+ uint32_t usbdl_by_kcol0_timeout_ms; -+ uint32_t usbdl_by_flag_timeout_ms; - uint32_t pad; - }; - -@@ -157,15 +157,15 @@ struct gfh_anti_clone { - uint8_t ac_b2k; - uint8_t ac_b2c; - uint16_t pad; -- __le32 ac_offset; -- __le32 ac_len; -+ uint32_t ac_offset; -+ uint32_t ac_len; - }; - - struct gfh_brom_sec_cfg { - struct gfh_common_header gfh; -- __le32 cfg_bits; -+ uint32_t cfg_bits; - char customer_name[0x20]; -- __le32 pad; -+ uint32_t pad; - }; - - #define BROM_SEC_CFG_JTAG_EN 1 -@@ -184,11 +184,11 @@ struct gfh_header { - - union lk_hdr { - struct { -- __le32 magic; -- __le32 size; -+ uint32_t magic; -+ uint32_t size; - char name[32]; -- __le32 loadaddr; -- __le32 mode; -+ uint32_t loadaddr; -+ uint32_t mode; - }; - - uint8_t data[512]; ---- a/tools/zynqmpbif.c -+++ b/tools/zynqmpbif.c -@@ -517,7 +517,7 @@ static int bif_add_bit(struct bif_entry - debug("Bitstream Length: 0x%x\n", bitlen); - for (i = 0; i < bitlen; i += sizeof(uint32_t)) { - uint32_t *bitbin32 = (uint32_t *)&bitbin[i]; -- *bitbin32 = __swab32(*bitbin32); -+ *bitbin32 = be32_to_cpu(*bitbin32); - } - - if (!bf->dest_dev) diff --git a/tools/mkimage/patches/060-remove_kernel_includes.patch b/tools/mkimage/patches/060-remove_kernel_includes.patch deleted file mode 100644 index 8917ec0863..0000000000 --- a/tools/mkimage/patches/060-remove_kernel_includes.patch +++ /dev/null @@ -1,29 +0,0 @@ -The Kernel includes are only available on Linux hosts, remove then on -non Linux hosts. - ---- a/include/linux/posix_types.h -+++ b/include/linux/posix_types.h -@@ -43,6 +43,8 @@ typedef void (*__kernel_sighandler_t)(in - /* Type of a SYSV IPC key. */ - typedef int __kernel_key_t; - -+#ifdef linux - #include -+#endif - - #endif /* _LINUX_POSIX_TYPES_H */ ---- a/include/imx8image.h -+++ b/include/imx8image.h -@@ -11,7 +11,12 @@ - #include - #include - #include "imagetool.h" -+#ifdef linux - #include "linux/kernel.h" -+#else -+#define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1) -+#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) -+#endif - - #define __packed __attribute__((packed)) - diff --git a/tools/mkimage/patches/070-remove_generated_autoconf.patch b/tools/mkimage/patches/070-remove_generated_autoconf.patch new file mode 100644 index 0000000000..7dcc8b64c1 --- /dev/null +++ b/tools/mkimage/patches/070-remove_generated_autoconf.patch @@ -0,0 +1,10 @@ +--- a/tools/imximage.c ++++ b/tools/imximage.c +@@ -11,7 +11,6 @@ + #include "imagetool.h" + #include + #include "imximage.h" +-#include + + #define UNDEFINED 0xFFFFFFFF + diff --git a/tools/mkimage/patches/210-link-libcrypto-static.patch b/tools/mkimage/patches/210-link-libcrypto-static.patch index 368dea86c9..c609912be9 100644 --- a/tools/mkimage/patches/210-link-libcrypto-static.patch +++ b/tools/mkimage/patches/210-link-libcrypto-static.patch @@ -3,7 +3,7 @@ needed dependencies are added too. --- a/tools/Makefile +++ b/tools/Makefile -@@ -151,7 +151,7 @@ ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CON +@@ -162,7 +162,7 @@ ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CON HOSTCFLAGS_kwbimage.o += \ $(shell pkg-config --cflags libssl libcrypto 2> /dev/null || echo "") HOSTLOADLIBES_mkimage += \ From 3e32ce5e593c310cde04900dcdb880bc622bf4dd Mon Sep 17 00:00:00 2001 From: Lucian Cristian Date: Sun, 19 Apr 2020 01:39:08 +0300 Subject: [PATCH 18/38] uboot-envtools: update to 2020.04 also revert to directly download the archive from https Signed-off-by: Lucian Cristian --- package/boot/uboot-envtools/Makefile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile index 1c6b789716..b032e07c37 100644 --- a/package/boot/uboot-envtools/Makefile +++ b/package/boot/uboot-envtools/Makefile @@ -9,16 +9,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uboot-envtools PKG_DISTNAME:=u-boot -PKG_VERSION:=2019.07 -PKG_RELEASE:=2 +PKG_VERSION:=2020.04 +PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:= \ + https://ftp.denx.de/pub/u-boot \ + https://mirror.cyberbits.eu/u-boot \ + ftp://ftp.denx.de/pub/u-boot +PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372 PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://git.denx.de/u-boot.git -PKG_SOURCE_VERSION:=e5aee22e4be75e75a854ab64503fc80598bc2004 -PKG_MIRROR_HASH:=58c1ecaf901b6bf65c5e872b5449b642694ae5acebf61f91f0d4bc20b4c654b7 PKG_BUILD_DEPENDS:=fstools From 774e8f6a51ec43f3450f6c2d115ec59e594b7601 Mon Sep 17 00:00:00 2001 From: Matt Merhar Date: Sun, 19 Apr 2020 17:12:03 -0400 Subject: [PATCH 19/38] kernel: backport fix for non-regular inodes on f2fs Upstream commit dda9f4b9ca ("f2fs: fix to skip verifying block address for non-regular inode"). On 4.14, attempting to perform operations on a non-regular inode residing on an f2fs filesystem, such rm-ing a device node, would fail and lead to a warning / call trace in dmesg. This fix was already applied to other kernels upstream - including 4.19, from which the patch was taken. More info at https://bugzilla.kernel.org/show_bug.cgi?id=202495. Signed-off-by: Matt Merhar --- ...ying-block-address-non-regular-inode.patch | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 target/linux/generic/backport-4.14/050-v4.19-f2fs-skip-verifying-block-address-non-regular-inode.patch diff --git a/target/linux/generic/backport-4.14/050-v4.19-f2fs-skip-verifying-block-address-non-regular-inode.patch b/target/linux/generic/backport-4.14/050-v4.19-f2fs-skip-verifying-block-address-non-regular-inode.patch new file mode 100644 index 0000000000..65ab16a97a --- /dev/null +++ b/target/linux/generic/backport-4.14/050-v4.19-f2fs-skip-verifying-block-address-non-regular-inode.patch @@ -0,0 +1,69 @@ +From dda9f4b9cac6bdd2a96253b4444d7a6ce5132edb Mon Sep 17 00:00:00 2001 +From: Chao Yu +Date: Sat, 11 Aug 2018 23:42:09 +0800 +Subject: f2fs: fix to skip verifying block address for non-regular inode + +generic/184 1s ... [failed, exit status 1]- output mismatch + --- tests/generic/184.out 2015-01-11 16:52:27.643681072 +0800 + QA output created by 184 - silence is golden + +rm: cannot remove '/mnt/f2fs/null': Bad address + +mknod: '/mnt/f2fs/null': Bad address + +chmod: cannot access '/mnt/f2fs/null': Bad address + +./tests/generic/184: line 36: /mnt/f2fs/null: Bad address + ... + +F2FS-fs (zram0): access invalid blkaddr:259 +EIP: f2fs_is_valid_blkaddr+0x14b/0x1b0 [f2fs] + f2fs_iget+0x927/0x1010 [f2fs] + f2fs_lookup+0x26e/0x630 [f2fs] + __lookup_slow+0xb3/0x140 + lookup_slow+0x31/0x50 + walk_component+0x185/0x1f0 + path_lookupat+0x51/0x190 + filename_lookup+0x7f/0x140 + user_path_at_empty+0x36/0x40 + vfs_statx+0x61/0xc0 + __do_sys_stat64+0x29/0x40 + sys_stat64+0x13/0x20 + do_fast_syscall_32+0xaa/0x22c + entry_SYSENTER_32+0x53/0x86 + +In f2fs_iget(), we will check inode's first block address, if it is valid, +we will set FI_FIRST_BLOCK_WRITTEN flag in inode. + +But we should only do this for regular inode, otherwise, like special +inode, i_addr[0] is used for storing device info instead of block address, +it will fail checking flow obviously. + +So for non-regular inode, let's skip verifying address and setting flag. + +Signed-off-by: Chao Yu +Signed-off-by: Jaegeuk Kim +--- + fs/f2fs/inode.c | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +--- a/fs/f2fs/inode.c ++++ b/fs/f2fs/inode.c +@@ -310,13 +310,15 @@ static int do_read_inode(struct inode *i + /* get rdev by using inline_info */ + __get_inode_rdev(inode, ri); + +- err = __written_first_block(sbi, ri); +- if (err < 0) { +- f2fs_put_page(node_page, 1); +- return err; ++ if (S_ISREG(inode->i_mode)) { ++ err = __written_first_block(sbi, ri); ++ if (err < 0) { ++ f2fs_put_page(node_page, 1); ++ return err; ++ } ++ if (!err) ++ set_inode_flag(inode, FI_FIRST_BLOCK_WRITTEN); + } +- if (!err) +- set_inode_flag(inode, FI_FIRST_BLOCK_WRITTEN); + + if (!need_inode_block_update(sbi, inode->i_ino)) + fi->last_disk_size = inode->i_size; From 404ec5fa846fdaee7e776b0946667937d97b4f73 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Mon, 27 Apr 2020 12:30:22 +0800 Subject: [PATCH 20/38] ipq40xx: adjust pacakge --- target/linux/ipq40xx/Makefile | 7 +++---- target/linux/ipq40xx/image/Makefile | 12 ++++++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/target/linux/ipq40xx/Makefile b/target/linux/ipq40xx/Makefile index c75f3d518b..3b6496859f 100644 --- a/target/linux/ipq40xx/Makefile +++ b/target/linux/ipq40xx/Makefile @@ -17,10 +17,9 @@ include $(INCLUDE_DIR)/target.mk DEFAULT_PACKAGES += \ kmod-usb-dwc3-of-simple kmod-usb-dwc3-qcom \ kmod-leds-gpio kmod-gpio-button-hotplug swconfig \ - kmod-ath10k-ct wpad-openssl \ - kmod-usb3 kmod-usb-dwc3 ath10k-firmware-qca4019-ct \ - automount autosamba luci-app-ipsec-vpnd v2ray shadowsocks-libev-ss-redir shadowsocksr-libev-server luci-app-music-remote-center \ - luci-app-unblockmusic luci-app-cpufreq luci-app-zerotier luci-app-xlnetacc ca-certificates kmod-fs-cifs kmod-nls-utf8 \ + kmod-ath10k wpad-openssl \ + kmod-usb3 kmod-usb-dwc3 ath10k-firmware-qca4019 \ + automount autosamba luci-app-ipsec-vpnd luci-app-unblockmusic luci-app-cpufreq luci-app-zerotier luci-app-xlnetacc \ htop fdisk e2fsprogs $(eval $(call BuildTarget)) diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index f9c844b1d5..979fa7ff51 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -68,7 +68,7 @@ define Device/asus_map-ac2200 DEVICE_MODEL := Lyra (MAP-AC2200) DEVICE_DTS := qcom-ipq4019-map-ac2200 IMAGES := sysupgrade.bin - DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-ath3k + DEVICE_PACKAGES := ath10k-firmware-qca9888 kmod-ath3k endef TARGET_DEVICES += asus_map-ac2200 @@ -91,7 +91,7 @@ define Device/asus_rt-ac58u KERNEL_INITRAMFS := $$(KERNEL) | uImage none KERNEL_INITRAMFS_SUFFIX := -factory.trx IMAGES := sysupgrade.bin - DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \ + DEVICE_PACKAGES := -kmod-ath10k kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \ kmod-usb-ledtrig-usbport endef TARGET_DEVICES += asus_rt-ac58u @@ -128,7 +128,7 @@ define Device/asus_rt-acrh17 KERNEL_INITRAMFS := $$(KERNEL) | uImage none KERNEL_INITRAMFS_SUFFIX := -factory.trx IMAGES := sysupgrade.bin - DEVICE_PACKAGES := ipq-wifi-rt-acrh17 ath10k-firmware-qca9984-ct + DEVICE_PACKAGES := ipq-wifi-rt-acrh17 ath10k-firmware-qca9984 endef TARGET_DEVICES += asus_rt-acrh17 @@ -249,7 +249,7 @@ define Device/meraki_mr33 BLOCKSIZE := 128k PAGESIZE := 2048 IMAGES = sysupgrade.bin - DEVICE_PACKAGES := -swconfig ath10k-firmware-qca9887-ct + DEVICE_PACKAGES := -swconfig ath10k-firmware-qca9887 endef TARGET_DEVICES += meraki_mr33 @@ -318,7 +318,7 @@ define Device/openmesh_a62 IMAGES = factory.bin sysupgrade.bin IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A62 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata - DEVICE_PACKAGES := ath10k-firmware-qca9888-ct uboot-envtools + DEVICE_PACKAGES := ath10k-firmware-qca9888 uboot-envtools endef TARGET_DEVICES += openmesh_a62 @@ -410,7 +410,7 @@ define Device/zyxel_wre6606 DEVICE_DTS_CONFIG := config@4 IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata - DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers + DEVICE_PACKAGES := -kmod-ath10k kmod-ath10k-ct kmod-ath10k-ct-smallbuffers endef TARGET_DEVICES += zyxel_wre6606 From 55e06fdb00f8a92175dbb893724324fb7bba51a9 Mon Sep 17 00:00:00 2001 From: Chuck Date: Mon, 27 Apr 2020 12:31:07 +0800 Subject: [PATCH 21/38] dropbear: only bind lan by default (#4456) --- package/network/services/dropbear/files/dropbear.config | 1 + 1 file changed, 1 insertion(+) diff --git a/package/network/services/dropbear/files/dropbear.config b/package/network/services/dropbear/files/dropbear.config index 2139ba0bbe..e2a936d7af 100644 --- a/package/network/services/dropbear/files/dropbear.config +++ b/package/network/services/dropbear/files/dropbear.config @@ -2,4 +2,5 @@ config dropbear option PasswordAuth 'on' option RootPasswordAuth 'on' option Port '22' + option Interface 'lan' # option BannerFile '/etc/banner' From 4787dbaf3cad44b374b660cc0fef9386963e6795 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Mon, 27 Apr 2020 12:49:57 +0800 Subject: [PATCH 22/38] mac80211: ath10k: increase rx buffer size to 2048 --- ...h10k-increase-rx-buffer-size-to-2048.patch | 37 +++++++++++++++++++ ...80211-use-more-bits-for-ack_frame_id.patch | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch diff --git a/package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch b/package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch new file mode 100644 index 0000000000..55429139fa --- /dev/null +++ b/package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch @@ -0,0 +1,37 @@ +From: Linus Lüssing +Date: Wed, 5 Feb 2020 20:10:43 +0100 +Subject: ath10k: increase rx buffer size to 2048 + +Before, only frames with a maximum size of 1528 bytes could be +transmitted between two 802.11s nodes. + +For batman-adv for instance, which adds its own header to each frame, +we typically need an MTU of at least 1532 bytes to be able to transmit +without fragmentation. + +This patch now increases the maxmimum frame size from 1528 to 1656 +bytes. + +Tested with two ath10k devices in 802.11s mode, as well as with +batman-adv on top of 802.11s with forwarding disabled. + +Fix originally found and developed by Ben Greear. + +Link: https://github.com/greearb/ath10k-ct/issues/89 +Link: https://github.com/greearb/ath10k-ct/commit/9e5ab25027e0971fa24ccf93373324c08c4e992d +Cc: Ben Greear +Signed-off-by: Linus Lüssing + +Forwarded: https://patchwork.kernel.org/patch/11367055/ + +--- a/drivers/net/wireless/ath/ath10k/htt.h ++++ b/drivers/net/wireless/ath/ath10k/htt.h +@@ -2219,7 +2219,7 @@ struct htt_rx_chan_info { + * Should be: sizeof(struct htt_host_rx_desc) + max rx MSDU size, + * rounded up to a cache line size. + */ +-#define HTT_RX_BUF_SIZE 1920 ++#define HTT_RX_BUF_SIZE 2048 + #define HTT_RX_MSDU_SIZE (HTT_RX_BUF_SIZE - (int)sizeof(struct htt_rx_desc)) + + /* Refill a bunch of RX buffers for each refill round so that FW/HW can handle diff --git a/package/kernel/mac80211/patches/subsys/353-mac80211-use-more-bits-for-ack_frame_id.patch b/package/kernel/mac80211/patches/subsys/353-mac80211-use-more-bits-for-ack_frame_id.patch index 1511525aa4..a2fb9d4b10 100644 --- a/package/kernel/mac80211/patches/subsys/353-mac80211-use-more-bits-for-ack_frame_id.patch +++ b/package/kernel/mac80211/patches/subsys/353-mac80211-use-more-bits-for-ack_frame_id.patch @@ -59,7 +59,7 @@ Acked-by: Toke Høiland-Jørgensen if (id < 0) { --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -2452,7 +2452,7 @@ static int ieee80211_store_ack_skb(struc +@@ -2458,7 +2458,7 @@ static int ieee80211_store_ack_skb(struc spin_lock_irqsave(&local->ack_status_lock, flags); id = idr_alloc(&local->ack_status_frames, ack_skb, From 11848e8b4309434786e95a289f37df309061fac4 Mon Sep 17 00:00:00 2001 From: lunatickochiya <55731491+lunatickochiya@users.noreply.github.com> Date: Tue, 28 Apr 2020 13:58:13 +0800 Subject: [PATCH 23/38] =?UTF-8?q?=20shadowsocksr-libev=EF=BC=9Areduce=20fi?= =?UTF-8?q?le=20size=20(#4467)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 参数来源:https://github.com/openwrt/packages/commit/c54a826086092b9af17258355af465879dfc9acd#diff-517378957dd5ecc51358b1ae79836edb 经测试,对于ssr也可以优化 测试平台:ar71xx ramips --- package/lean/shadowsocksr-libev/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/lean/shadowsocksr-libev/Makefile b/package/lean/shadowsocksr-libev/Makefile index 8856479912..501638e03a 100644 --- a/package/lean/shadowsocksr-libev/Makefile +++ b/package/lean/shadowsocksr-libev/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=shadowsocksr-libev PKG_VERSION:=2.5.6 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/shadowsocksrr/shadowsocksr-libev @@ -36,6 +36,7 @@ Package/shadowsocksr-libev-alt = $(Package/shadowsocksr-libev) Package/shadowsocksr-libev-ssr-local = $(Package/shadowsocksr-libev) CONFIGURE_ARGS += --disable-documentation --disable-ssp --disable-assert +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed define Package/shadowsocksr-libev/install $(INSTALL_DIR) $(1)/usr/bin From 4b53337af7c574413233ff78729b5945a5aa9515 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Wed, 29 Apr 2020 13:32:07 +0800 Subject: [PATCH 24/38] ipq40xx: correct device packages (#4450) --- target/linux/ipq40xx/image/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index 979fa7ff51..186eb3178d 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -91,8 +91,8 @@ define Device/asus_rt-ac58u KERNEL_INITRAMFS := $$(KERNEL) | uImage none KERNEL_INITRAMFS_SUFFIX := -factory.trx IMAGES := sysupgrade.bin - DEVICE_PACKAGES := -kmod-ath10k kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \ - kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := -kmod-ath10k -ath10k-firmware-qca4019 \ + kmod-ath10k-ct-smallbuffers ath10k-firmware-qca4019-ct kmod-usb-ledtrig-usbport endef TARGET_DEVICES += asus_rt-ac58u @@ -410,7 +410,8 @@ define Device/zyxel_wre6606 DEVICE_DTS_CONFIG := config@4 IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata - DEVICE_PACKAGES := -kmod-ath10k kmod-ath10k-ct kmod-ath10k-ct-smallbuffers + DEVICE_PACKAGES := -kmod-ath10k -ath10k-firmware-qca4019 \ + kmod-ath10k-ct-smallbuffers ath10k-firmware-qca4019-ct endef TARGET_DEVICES += zyxel_wre6606 From 244a0f8574da6fa263532f43cc3de99500597801 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Wed, 29 Apr 2020 17:25:11 +0800 Subject: [PATCH 25/38] Revert "kernel: bump 4.14 to 4.14.177" This reverts commit 89c18f5335195e5ed8be1096ce633cf5d1997230. --- include/kernel-version.mk | 4 +- ...mware-loader-for-uPD720201-and-uPD72.patch | 6 +- .../802-usb-xhci-force-msi-renesas-xhci.patch | 2 +- ...mtd-cfi_cmdset_0002-force-word-write.patch | 6 +- ...ore-register-defines-for-QCA956x-SoC.patch | 2 +- ...ore-register-defines-for-QCA956x-SoC.patch | 4 +- .../940-qca955x-add-more-registers.patch | 4 +- .../910-unaligned_access_hacks.patch | 2 +- ...CM5301X-Add-DT-for-ARRIS-SBR-AC3200P.patch | 1 + ...tree-gpio-hogs-on-dual-role-gpio-pin.patch | 4 +- ...ddress-assignment-via-ifconfig-ioctl.patch | 4 +- ...ipv6-make-ip6_dst_mtu_forward-inline.patch | 2 +- .../generic/hack-4.14/902-debloat_proc.patch | 2 +- ...T-skip-GRO-for-foreign-MAC-addresses.patch | 10 +-- ...-dt-Add-L2-frequency-scaling-support.patch | 4 +- ...056-cpufreq-dt-Add-missing-rcu-locks.patch | 2 +- .../851-ata-add-sata-driver.patch | 18 ++--- .../995-4g-add-u9300-driver.patch | 8 +- .../202-core-linux-support-layerscape.patch | 46 +++++------ .../302-dts-support-layerscape.patch | 16 ++-- ...707-dpaa-ethernet-support-layerscape.patch | 2 +- .../807-usb-support-layerscape.patch | 28 +++---- .../816-pcie-support-layerscape.patch | 4 +- .../819-sdhc-support-layerscape.patch | 34 ++++---- .../patches-4.14/0052-net-phy-add-FC.patch | 2 +- ...tek-add-driver-for-RTC-on-MT7622-SoC.patch | 2 +- ...ance-the-description-for-MediaTek-PM.patch | 2 +- ...low-imod-interval-to-be-configurable.patch | 2 +- .../300-mvneta-tx-queue-workaround.patch | 4 +- .../403-net-mvneta-convert-to-phylink.patch | 40 +++++----- ...04-net-mvneta-hack-fix-phy_interface.patch | 2 +- ...le-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch | 6 +- ...ta-add-module-EEPROM-reading-support.patch | 4 +- ...eeprom-ethtool-access-into-netdev-co.patch | 6 +- ...0-crypto-mxsdcp-provide-importexport.patch | 6 +- ...le-fpga-Handle-chained-IRQs-properly.patch | 77 +++++++++++++++++++ ...satile-fpga-Apply-clear-mask-earlier.patch | 58 ++++++++++++++ ...RM-dts-oxnas-Fix-clear-mask-property.patch | 55 +++++++++++++ .../0034-NET-multi-phy-support.patch | 6 +- 39 files changed, 339 insertions(+), 148 deletions(-) create mode 100644 target/linux/oxnas/patches-4.14/001-irqchip-versatile-fpga-Handle-chained-IRQs-properly.patch create mode 100644 target/linux/oxnas/patches-4.14/002-irqchip-versatile-fpga-Apply-clear-mask-earlier.patch create mode 100644 target/linux/oxnas/patches-4.14/003-ARM-dts-oxnas-Fix-clear-mask-property.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 9b362f8dc5..0cbb141f6d 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -7,11 +7,11 @@ ifdef CONFIG_TESTING_KERNEL endif LINUX_VERSION-4.9 = .220 -LINUX_VERSION-4.14 = .177 +LINUX_VERSION-4.14 = .176 LINUX_VERSION-4.19 = .118 LINUX_KERNEL_HASH-4.9.220 = dad9c760787f9694173308c29f8e357b2c447b87a7965565ae4bb7f5979f0b2e -LINUX_KERNEL_HASH-4.14.177 = 33a73c88344a78b75751a5d42fff8b3ee1e2e006b30b2913605ebc6a40041812 +LINUX_KERNEL_HASH-4.14.176 = bcae0956baaeb55dab5bad0401873fbc5baaa7fbe957ea6d27a5ab241cec5ca2 LINUX_KERNEL_HASH-4.19.118 = 89749365f9dafa6c62cc5e920a7e532ed4aad9ab766fb436423b153ffbc08c96 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) diff --git a/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch b/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch index f95fdf3d7f..892cdaef33 100644 --- a/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch +++ b/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch @@ -44,7 +44,7 @@ Signed-off-by: Christian Lamparter #include "xhci.h" #include "xhci-trace.h" -@@ -269,6 +271,458 @@ static void xhci_pme_acpi_rtd3_enable(st +@@ -268,6 +270,458 @@ static void xhci_pme_acpi_rtd3_enable(st static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { } #endif /* CONFIG_ACPI */ @@ -503,7 +503,7 @@ Signed-off-by: Christian Lamparter /* called during probe() after chip reset completes */ static int xhci_pci_setup(struct usb_hcd *hcd) { -@@ -307,6 +761,22 @@ static int xhci_pci_probe(struct pci_dev +@@ -306,6 +760,22 @@ static int xhci_pci_probe(struct pci_dev struct hc_driver *driver; struct usb_hcd *hcd; @@ -526,7 +526,7 @@ Signed-off-by: Christian Lamparter driver = (struct hc_driver *)id->driver_data; /* For some HW implementation, a XHCI reset is just not enough... */ -@@ -368,6 +838,16 @@ static void xhci_pci_remove(struct pci_d +@@ -367,6 +837,16 @@ static void xhci_pci_remove(struct pci_d { struct xhci_hcd *xhci; diff --git a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch index 1fe94e8c6f..c7315f9b8b 100644 --- a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch @@ -13,7 +13,7 @@ produce a noisy warning. --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -222,7 +222,7 @@ static void xhci_pci_quirks(struct devic +@@ -221,7 +221,7 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_TRUST_TX_LENGTH; if (pdev->vendor == PCI_VENDOR_ID_RENESAS && pdev->device == 0x0015) diff --git a/target/linux/ar71xx/patches-4.14/411-mtd-cfi_cmdset_0002-force-word-write.patch b/target/linux/ar71xx/patches-4.14/411-mtd-cfi_cmdset_0002-force-word-write.patch index 5a6eb77d0f..bb013c6cf5 100644 --- a/target/linux/ar71xx/patches-4.14/411-mtd-cfi_cmdset_0002-force-word-write.patch +++ b/target/linux/ar71xx/patches-4.14/411-mtd-cfi_cmdset_0002-force-word-write.patch @@ -35,7 +35,7 @@ /* Atmel chips don't use the same PRI format as AMD chips */ static void fixup_convert_atmel_pri(struct mtd_info *mtd) -@@ -1800,6 +1804,7 @@ static int cfi_amdstd_write_words(struct +@@ -1798,6 +1802,7 @@ static int cfi_amdstd_write_words(struct /* * FIXME: interleaved mode not tested, and probably not supported! */ @@ -43,7 +43,7 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, unsigned long adr, const u_char *buf, int len) -@@ -1928,7 +1933,6 @@ static int __xipram do_write_buffer(stru +@@ -1926,7 +1931,6 @@ static int __xipram do_write_buffer(stru return ret; } @@ -51,7 +51,7 @@ static int cfi_amdstd_write_buffers(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) { -@@ -2003,6 +2007,7 @@ static int cfi_amdstd_write_buffers(stru +@@ -2001,6 +2005,7 @@ static int cfi_amdstd_write_buffers(stru return 0; } diff --git a/target/linux/ar71xx/patches-4.14/622-MIPS-ath79-add-more-register-defines-for-QCA956x-SoC.patch b/target/linux/ar71xx/patches-4.14/622-MIPS-ath79-add-more-register-defines-for-QCA956x-SoC.patch index d1fbe2e31d..cab2f6f9cb 100644 --- a/target/linux/ar71xx/patches-4.14/622-MIPS-ath79-add-more-register-defines-for-QCA956x-SoC.patch +++ b/target/linux/ar71xx/patches-4.14/622-MIPS-ath79-add-more-register-defines-for-QCA956x-SoC.patch @@ -19,7 +19,7 @@ #define QCA956X_PLL_CPU_CONFIG_REFDIV_SHIFT 12 #define QCA956X_PLL_CPU_CONFIG_REFDIV_MASK 0x1f -@@ -1198,4 +1203,16 @@ +@@ -1196,4 +1201,16 @@ #define QCA955X_ETH_CFG_TXE_DELAY_MASK 0x3 #define QCA955X_ETH_CFG_TXE_DELAY_SHIFT 20 diff --git a/target/linux/ar71xx/patches-4.14/921-MIPS-ath79-add-even-more-register-defines-for-QCA956x-SoC.patch b/target/linux/ar71xx/patches-4.14/921-MIPS-ath79-add-even-more-register-defines-for-QCA956x-SoC.patch index a1a16817e3..a4608ea48d 100644 --- a/target/linux/ar71xx/patches-4.14/921-MIPS-ath79-add-even-more-register-defines-for-QCA956x-SoC.patch +++ b/target/linux/ar71xx/patches-4.14/921-MIPS-ath79-add-even-more-register-defines-for-QCA956x-SoC.patch @@ -130,8 +130,8 @@ Add more registers for QCA955x and QCA956x. +#define QCA955X_GMAC_REG_SGMII_SERDES 0x18 #define QCA955X_ETH_CFG_RGMII_EN BIT(0) - #define QCA955X_ETH_CFG_GE0_MII_EN BIT(1) -@@ -1212,16 +1293,58 @@ + #define QCA955X_ETH_CFG_MII_GE0 BIT(1) +@@ -1210,16 +1291,58 @@ #define QCA955X_ETH_CFG_TXE_DELAY_MASK 0x3 #define QCA955X_ETH_CFG_TXE_DELAY_SHIFT 20 diff --git a/target/linux/ar71xx/patches-4.14/940-qca955x-add-more-registers.patch b/target/linux/ar71xx/patches-4.14/940-qca955x-add-more-registers.patch index 705763a7a2..ff72308465 100644 --- a/target/linux/ar71xx/patches-4.14/940-qca955x-add-more-registers.patch +++ b/target/linux/ar71xx/patches-4.14/940-qca955x-add-more-registers.patch @@ -20,8 +20,8 @@ +#define QCA955X_GMAC_REG_SGMII_DEBUG 0x58 #define QCA955X_ETH_CFG_RGMII_EN BIT(0) - #define QCA955X_ETH_CFG_GE0_MII_EN BIT(1) -@@ -1293,6 +1297,18 @@ + #define QCA955X_ETH_CFG_MII_GE0 BIT(1) +@@ -1291,6 +1295,18 @@ #define QCA955X_ETH_CFG_TXE_DELAY_MASK 0x3 #define QCA955X_ETH_CFG_TXE_DELAY_SHIFT 20 diff --git a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch index 5622f0662a..cff52e5add 100644 --- a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch @@ -214,7 +214,7 @@ #include #include #include -@@ -819,10 +820,10 @@ static void tcp_v6_send_response(const s +@@ -820,10 +821,10 @@ static void tcp_v6_send_response(const s topt = (__be32 *)(t1 + 1); if (tsecr) { diff --git a/target/linux/bcm53xx/patches-4.14/323-ARM-dts-BCM5301X-Add-DT-for-ARRIS-SBR-AC3200P.patch b/target/linux/bcm53xx/patches-4.14/323-ARM-dts-BCM5301X-Add-DT-for-ARRIS-SBR-AC3200P.patch index f0b08deb4a..606b22c3e2 100644 --- a/target/linux/bcm53xx/patches-4.14/323-ARM-dts-BCM5301X-Add-DT-for-ARRIS-SBR-AC3200P.patch +++ b/target/linux/bcm53xx/patches-4.14/323-ARM-dts-BCM5301X-Add-DT-for-ARRIS-SBR-AC3200P.patch @@ -93,3 +93,4 @@ + }; + }; +}; ++ \ No newline at end of file diff --git a/target/linux/brcm63xx/patches-4.14/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch b/target/linux/brcm63xx/patches-4.14/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch index e1d43da87a..bbd39811c5 100644 --- a/target/linux/brcm63xx/patches-4.14/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch +++ b/target/linux/brcm63xx/patches-4.14/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch @@ -89,7 +89,7 @@ Signed-off-by: Jonas Gorski --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c -@@ -1941,7 +1941,8 @@ int gpiochip_add_pingroup_range(struct g +@@ -1958,7 +1958,8 @@ int gpiochip_add_pingroup_range(struct g list_add_tail(&pin_range->node, &gdev->pin_ranges); @@ -99,7 +99,7 @@ Signed-off-by: Jonas Gorski } EXPORT_SYMBOL_GPL(gpiochip_add_pingroup_range); -@@ -1993,7 +1994,7 @@ int gpiochip_add_pin_range(struct gpio_c +@@ -2010,7 +2011,7 @@ int gpiochip_add_pin_range(struct gpio_c list_add_tail(&pin_range->node, &gdev->pin_ranges); diff --git a/target/linux/generic/backport-4.14/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch b/target/linux/generic/backport-4.14/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch index e3f77ab9da..1c501867a9 100644 --- a/target/linux/generic/backport-4.14/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch +++ b/target/linux/generic/backport-4.14/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch @@ -48,7 +48,7 @@ Reviewed-by: John Gilmore #define INADDR_ANY ((unsigned long int) 0x00000000) --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c -@@ -934,7 +934,7 @@ static int inet_abc_len(__be32 addr) +@@ -929,7 +929,7 @@ static int inet_abc_len(__be32 addr) { int rc = -1; /* Something else, probably a multicast. */ @@ -57,7 +57,7 @@ Reviewed-by: John Gilmore rc = 0; else { __u32 haddr = ntohl(addr); -@@ -945,6 +945,8 @@ static int inet_abc_len(__be32 addr) +@@ -940,6 +940,8 @@ static int inet_abc_len(__be32 addr) rc = 16; else if (IN_CLASSC(haddr)) rc = 24; diff --git a/target/linux/generic/backport-4.14/350-v4.18-ipv6-make-ip6_dst_mtu_forward-inline.patch b/target/linux/generic/backport-4.14/350-v4.18-ipv6-make-ip6_dst_mtu_forward-inline.patch index bbc04555f7..dddc347436 100644 --- a/target/linux/generic/backport-4.14/350-v4.18-ipv6-make-ip6_dst_mtu_forward-inline.patch +++ b/target/linux/generic/backport-4.14/350-v4.18-ipv6-make-ip6_dst_mtu_forward-inline.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h -@@ -253,4 +253,26 @@ static inline bool rt6_duplicate_nexthop +@@ -252,4 +252,26 @@ static inline bool rt6_duplicate_nexthop ipv6_addr_equal(&a->rt6i_gateway, &b->rt6i_gateway) && !lwtunnel_cmp_encap(a->dst.lwtstate, b->dst.lwtstate); } diff --git a/target/linux/generic/hack-4.14/902-debloat_proc.patch b/target/linux/generic/hack-4.14/902-debloat_proc.patch index d4f2d90ef8..30328b87d7 100644 --- a/target/linux/generic/hack-4.14/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.14/902-debloat_proc.patch @@ -232,7 +232,7 @@ Signed-off-by: Felix Fietkau return -ENOMEM; --- a/mm/vmalloc.c +++ b/mm/vmalloc.c -@@ -2788,6 +2788,8 @@ static const struct file_operations proc +@@ -2786,6 +2786,8 @@ static const struct file_operations proc static int __init proc_vmalloc_init(void) { diff --git a/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 0c5016d368..245ef291ed 100644 --- a/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau __u16 tc_index; /* traffic control index */ --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4816,6 +4816,9 @@ static enum gro_result dev_gro_receive(s +@@ -4815,6 +4815,9 @@ static enum gro_result dev_gro_receive(s enum gro_result ret; int grow; @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau if (netif_elide_gro(skb->dev)) goto normal; -@@ -6293,6 +6296,48 @@ static void __netdev_adjacent_dev_unlink +@@ -6292,6 +6295,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info) -@@ -6331,6 +6376,7 @@ static int __netdev_upper_dev_link(struc +@@ -6330,6 +6375,7 @@ static int __netdev_upper_dev_link(struc if (ret) return ret; @@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -6408,6 +6454,7 @@ void netdev_upper_dev_unlink(struct net_ +@@ -6407,6 +6453,7 @@ void netdev_upper_dev_unlink(struct net_ __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); @@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev, &changeupper_info.info); } -@@ -6972,6 +7019,7 @@ int dev_set_mac_address(struct net_devic +@@ -6971,6 +7018,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; diff --git a/target/linux/ipq806x/patches-4.14/0055-cpufreq-dt-Add-L2-frequency-scaling-support.patch b/target/linux/ipq806x/patches-4.14/0055-cpufreq-dt-Add-L2-frequency-scaling-support.patch index 2bcd3553f4..f3e79b2178 100644 --- a/target/linux/ipq806x/patches-4.14/0055-cpufreq-dt-Add-L2-frequency-scaling-support.patch +++ b/target/linux/ipq806x/patches-4.14/0055-cpufreq-dt-Add-L2-frequency-scaling-support.patch @@ -55,7 +55,7 @@ Signed-off-by: Georgi Djakov mutex_unlock(&priv->lock); return ret; -@@ -197,6 +228,8 @@ static int cpufreq_init(struct cpufreq_p +@@ -197,6 +227,8 @@ static int cpufreq_init(struct cpufreq_p const char *name; int ret; struct srcu_notifier_head *opp_srcu_head; @@ -64,7 +64,7 @@ Signed-off-by: Georgi Djakov cpu_dev = get_cpu_device(policy->cpu); if (!cpu_dev) { -@@ -305,6 +338,13 @@ static int cpufreq_init(struct cpufreq_p +@@ -305,6 +337,13 @@ static int cpufreq_init(struct cpufreq_p policy->suspend_freq = dev_pm_opp_get_suspend_opp_freq(cpu_dev) / 1000; diff --git a/target/linux/ipq806x/patches-4.14/0056-cpufreq-dt-Add-missing-rcu-locks.patch b/target/linux/ipq806x/patches-4.14/0056-cpufreq-dt-Add-missing-rcu-locks.patch index a5ae5629f7..d9d76e409b 100644 --- a/target/linux/ipq806x/patches-4.14/0056-cpufreq-dt-Add-missing-rcu-locks.patch +++ b/target/linux/ipq806x/patches-4.14/0056-cpufreq-dt-Add-missing-rcu-locks.patch @@ -10,7 +10,7 @@ Signed-off-by: Georgi Djakov --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c -@@ -145,8 +145,10 @@ static int opp_notifier(struct notifier_ +@@ -144,8 +144,10 @@ static int opp_notifier(struct notifier_ ret = PTR_ERR(cpu_reg); goto out; } diff --git a/target/linux/ipq806x/patches-4.14/851-ata-add-sata-driver.patch b/target/linux/ipq806x/patches-4.14/851-ata-add-sata-driver.patch index 951fe4f74e..998e99c721 100644 --- a/target/linux/ipq806x/patches-4.14/851-ata-add-sata-driver.patch +++ b/target/linux/ipq806x/patches-4.14/851-ata-add-sata-driver.patch @@ -22,13 +22,13 @@ Signed-off-by: Gokul Sriram Palanisamy @@ -54,7 +54,7 @@ enum { - AHCI_MAX_PORTS = 32, + AHCI_MAX_PORTS = 32, - AHCI_MAX_CLKS = 5, + AHCI_MAX_CLKS = 6, - AHCI_MAX_SG = 168, /* hardware max is 64K */ - AHCI_DMA_BOUNDARY = 0xffffffff, - AHCI_MAX_CMDS = 32, ---- /dev/null + AHCI_MAX_SG = 168, /* hardware max is 64K */ + AHCI_DMA_BOUNDARY = 0xffffffff, + AHCI_MAX_CMDS = 32, +--- a/dev/null +++ b/drivers/ata/ahci_ipq.c @@ -0,0 +1,248 @@ +/* Copyright (c) 2015 - 2017, The Linux Foundation. All rights reserved. @@ -283,7 +283,7 @@ Signed-off-by: Gokul Sriram Palanisamy +++ b/drivers/ata/Kconfig @@ -162,6 +162,14 @@ config AHCI_IMX - If unsure, say N. + If unsure, say N. +config AHCI_IPQ + tristate "Qualcomm Atheros IPQ806X AHCI SATA support" @@ -294,11 +294,11 @@ Signed-off-by: Gokul Sriram Palanisamy + If unsure, say N. + config AHCI_CEVA - tristate "CEVA AHCI SATA support" - depends on OF + tristate "CEVA AHCI SATA support" + depends on OF --- a/drivers/ata/Makefile +++ b/drivers/ata/Makefile -@@ -18,6 +18,7 @@ obj-$(CONFIG_AHCI_CEVA) += ahci_ceva.o +@@ -18,6 +18,7 @@ obj-$(CONFIG_AHCI_DA850) += ahci_da850.o libahci.o libahci_platform.o obj-$(CONFIG_AHCI_DM816) += ahci_dm816.o libahci.o libahci_platform.o obj-$(CONFIG_AHCI_IMX) += ahci_imx.o libahci.o libahci_platform.o diff --git a/target/linux/ipq806x/patches-4.14/995-4g-add-u9300-driver.patch b/target/linux/ipq806x/patches-4.14/995-4g-add-u9300-driver.patch index 5b81e89375..14127ff67e 100644 --- a/target/linux/ipq806x/patches-4.14/995-4g-add-u9300-driver.patch +++ b/target/linux/ipq806x/patches-4.14/995-4g-add-u9300-driver.patch @@ -1,6 +1,6 @@ --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c -@@ -1290,6 +1290,7 @@ static const struct usb_device_id produc +@@ -1292,6 +1292,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x03f0, 0x9d1d, 1)}, /* HP lt4120 Snapdragon X5 LTE */ {QMI_FIXED_INTF(0x22de, 0x9061, 3)}, /* WeTelecom WPD-600N */ {QMI_QUIRK_SET_DTR(0x1e0e, 0x9001, 5)}, /* SIMCom 7100E, 7230E, 7600E ++ */ @@ -10,7 +10,7 @@ {QMI_FIXED_INTF(0x2c7c, 0x0296, 4)}, /* Quectel BG96 */ --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c -@@ -384,6 +384,7 @@ static void option_instat_callback(struc +@@ -384,6 +384,7 @@ static void option_instat_callback(struct urb *urb); * Mobidata, etc sell under their own brand names. */ #define LONGCHEER_VENDOR_ID 0x1c9e @@ -18,7 +18,7 @@ /* 4G Systems products */ /* This is the 4G XS Stick W14 a.k.a. Mobilcom Debitel Surf-Stick * -@@ -574,6 +575,16 @@ static void option_instat_callback(struc +@@ -574,6 +575,16 @@ static void option_instat_callback(struct urb *urb); /* Device needs ZLP */ #define ZLP BIT(17) @@ -35,7 +35,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, -@@ -608,6 +619,8 @@ static const struct usb_device_id option +@@ -608,6 +619,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLE) }, { USB_DEVICE(QUANTA_VENDOR_ID, 0xea42), .driver_info = RSVD(4) }, diff --git a/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch b/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch index 0dc609eed3..784b10dd50 100644 --- a/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch @@ -442,7 +442,7 @@ Signed-off-by: Yangbo Lu --- a/drivers/soc/imx/gpc.c +++ b/drivers/soc/imx/gpc.c -@@ -210,7 +210,7 @@ static int imx_pgc_power_domain_probe(st +@@ -209,7 +209,7 @@ static int imx_pgc_power_domain_probe(st goto genpd_err; } @@ -539,7 +539,7 @@ Signed-off-by: Yangbo Lu --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -2354,7 +2354,8 @@ int register_netdevice_notifier(struct n +@@ -2349,7 +2349,8 @@ int register_netdevice_notifier(struct n int unregister_netdevice_notifier(struct notifier_block *nb); struct netdev_notifier_info { @@ -549,7 +549,7 @@ Signed-off-by: Yangbo Lu }; struct netdev_notifier_info_ext { -@@ -2386,6 +2387,7 @@ static inline void netdev_notifier_info_ +@@ -2381,6 +2382,7 @@ static inline void netdev_notifier_info_ struct net_device *dev) { info->dev = dev; @@ -557,7 +557,7 @@ Signed-off-by: Yangbo Lu } static inline struct net_device * -@@ -2394,6 +2396,12 @@ netdev_notifier_info_to_dev(const struct +@@ -2389,6 +2391,12 @@ netdev_notifier_info_to_dev(const struct return info->dev; } @@ -572,15 +572,15 @@ Signed-off-by: Yangbo Lu --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -977,6 +977,7 @@ void kfree_skb_list(struct sk_buff *segs +@@ -964,6 +964,7 @@ void kfree_skb_list(struct sk_buff *segs void skb_tx_error(struct sk_buff *skb); void consume_skb(struct sk_buff *skb); void __consume_stateless_skb(struct sk_buff *skb); +void skb_recycle(struct sk_buff *skb); void __kfree_skb(struct sk_buff *skb); + extern struct kmem_cache *skbuff_head_cache; - #if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE) -@@ -3334,6 +3335,7 @@ static inline void skb_free_datagram_loc +@@ -3315,6 +3316,7 @@ static inline void skb_free_datagram_loc } int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags); int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len); @@ -642,7 +642,7 @@ Signed-off-by: Yangbo Lu --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -165,7 +165,6 @@ static struct list_head offload_base __r +@@ -162,7 +162,6 @@ static struct list_head offload_base __r static int netif_rx_internal(struct sk_buff *skb); static int call_netdevice_notifiers_info(unsigned long val, @@ -650,7 +650,7 @@ Signed-off-by: Yangbo Lu struct netdev_notifier_info *info); static struct napi_struct *napi_by_id(unsigned int napi_id); -@@ -1315,10 +1314,11 @@ EXPORT_SYMBOL(netdev_features_change); +@@ -1312,10 +1311,11 @@ EXPORT_SYMBOL(netdev_features_change); void netdev_state_change(struct net_device *dev) { if (dev->flags & IFF_UP) { @@ -665,7 +665,7 @@ Signed-off-by: Yangbo Lu &change_info.info); rtmsg_ifinfo(RTM_NEWLINK, dev, 0, GFP_KERNEL); } -@@ -1539,9 +1539,10 @@ EXPORT_SYMBOL(dev_disable_lro); +@@ -1536,9 +1536,10 @@ EXPORT_SYMBOL(dev_disable_lro); static int call_netdevice_notifier(struct notifier_block *nb, unsigned long val, struct net_device *dev) { @@ -678,7 +678,7 @@ Signed-off-by: Yangbo Lu return nb->notifier_call(nb, val, &info); } -@@ -1666,11 +1667,9 @@ EXPORT_SYMBOL(unregister_netdevice_notif +@@ -1663,11 +1664,9 @@ EXPORT_SYMBOL(unregister_netdevice_notif */ static int call_netdevice_notifiers_info(unsigned long val, @@ -690,7 +690,7 @@ Signed-off-by: Yangbo Lu return raw_notifier_call_chain(&netdev_chain, val, info); } -@@ -1685,9 +1684,11 @@ static int call_netdevice_notifiers_info +@@ -1682,9 +1681,11 @@ static int call_netdevice_notifiers_info int call_netdevice_notifiers(unsigned long val, struct net_device *dev) { @@ -704,7 +704,7 @@ Signed-off-by: Yangbo Lu } EXPORT_SYMBOL(call_netdevice_notifiers); -@@ -1710,7 +1711,7 @@ static int call_netdevice_notifiers_mtu( +@@ -1707,7 +1708,7 @@ static int call_netdevice_notifiers_mtu( BUILD_BUG_ON(offsetof(struct netdev_notifier_info_ext, info) != 0); @@ -713,7 +713,7 @@ Signed-off-by: Yangbo Lu } #ifdef CONFIG_NET_INGRESS -@@ -6352,7 +6353,15 @@ static int __netdev_upper_dev_link(struc +@@ -6341,7 +6342,15 @@ static int __netdev_upper_dev_link(struc struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info) { @@ -730,7 +730,7 @@ Signed-off-by: Yangbo Lu int ret = 0; ASSERT_RTNL(); -@@ -6370,12 +6379,7 @@ static int __netdev_upper_dev_link(struc +@@ -6359,12 +6368,7 @@ static int __netdev_upper_dev_link(struc if (master && netdev_master_upper_dev_get(dev)) return -EBUSY; @@ -744,7 +744,7 @@ Signed-off-by: Yangbo Lu &changeupper_info.info); ret = notifier_to_errno(ret); if (ret) -@@ -6387,7 +6391,7 @@ static int __netdev_upper_dev_link(struc +@@ -6376,7 +6380,7 @@ static int __netdev_upper_dev_link(struc return ret; netdev_update_addr_mask(dev); @@ -753,7 +753,7 @@ Signed-off-by: Yangbo Lu &changeupper_info.info); ret = notifier_to_errno(ret); if (ret) -@@ -6451,21 +6455,25 @@ EXPORT_SYMBOL(netdev_master_upper_dev_li +@@ -6440,21 +6444,25 @@ EXPORT_SYMBOL(netdev_master_upper_dev_li void netdev_upper_dev_unlink(struct net_device *dev, struct net_device *upper_dev) { @@ -784,7 +784,7 @@ Signed-off-by: Yangbo Lu &changeupper_info.info); } EXPORT_SYMBOL(netdev_upper_dev_unlink); -@@ -6481,11 +6489,13 @@ EXPORT_SYMBOL(netdev_upper_dev_unlink); +@@ -6470,11 +6478,13 @@ EXPORT_SYMBOL(netdev_upper_dev_unlink); void netdev_bonding_info_change(struct net_device *dev, struct netdev_bonding_info *bonding_info) { @@ -800,7 +800,7 @@ Signed-off-by: Yangbo Lu &info.info); } EXPORT_SYMBOL(netdev_bonding_info_change); -@@ -6611,11 +6621,13 @@ EXPORT_SYMBOL(dev_get_nest_level); +@@ -6600,11 +6610,13 @@ EXPORT_SYMBOL(dev_get_nest_level); void netdev_lower_state_changed(struct net_device *lower_dev, void *lower_state_info) { @@ -816,7 +816,7 @@ Signed-off-by: Yangbo Lu &changelowerstate_info.info); } EXPORT_SYMBOL(netdev_lower_state_changed); -@@ -6906,11 +6918,14 @@ void __dev_notify_flags(struct net_devic +@@ -6895,11 +6907,14 @@ void __dev_notify_flags(struct net_devic if (dev->flags & IFF_UP && (changes & ~(IFF_UP | IFF_PROMISC | IFF_ALLMULTI | IFF_VOLATILE))) { @@ -837,7 +837,7 @@ Signed-off-by: Yangbo Lu --- a/net/core/skbuff.c +++ b/net/core/skbuff.c -@@ -906,6 +906,32 @@ void napi_consume_skb(struct sk_buff *sk +@@ -803,6 +803,32 @@ void napi_consume_skb(struct sk_buff *sk } EXPORT_SYMBOL(napi_consume_skb); @@ -870,7 +870,7 @@ Signed-off-by: Yangbo Lu /* Make sure a field is enclosed inside headers_start/headers_end section */ #define CHECK_SKB_FIELD(field) \ BUILD_BUG_ON(offsetof(struct sk_buff, field) < \ -@@ -1429,7 +1455,7 @@ static void skb_headers_offset_update(st +@@ -1322,7 +1348,7 @@ static void skb_headers_offset_update(st skb->inner_mac_header += off; } @@ -879,7 +879,7 @@ Signed-off-by: Yangbo Lu { __copy_skb_header(new, old); -@@ -1437,6 +1463,7 @@ static void copy_skb_header(struct sk_bu +@@ -1330,6 +1356,7 @@ static void copy_skb_header(struct sk_bu skb_shinfo(new)->gso_segs = skb_shinfo(old)->gso_segs; skb_shinfo(new)->gso_type = skb_shinfo(old)->gso_type; } diff --git a/target/linux/layerscape/patches-4.14/302-dts-support-layerscape.patch b/target/linux/layerscape/patches-4.14/302-dts-support-layerscape.patch index 919bb30cfc..871a8068cb 100644 --- a/target/linux/layerscape/patches-4.14/302-dts-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/302-dts-support-layerscape.patch @@ -607,9 +607,9 @@ Signed-off-by: Zhao Qiang +}; + &enet0 { - tbi-handle = <&tbi0>; + tbi-handle = <&tbi1>; phy-handle = <&sgmii_phy2>; -@@ -235,6 +250,10 @@ +@@ -228,6 +243,10 @@ }; }; @@ -620,7 +620,7 @@ Signed-off-by: Zhao Qiang &sai1 { status = "okay"; }; -@@ -250,3 +269,11 @@ +@@ -243,3 +262,11 @@ &uart1 { status = "okay"; }; @@ -740,7 +740,7 @@ Signed-off-by: Zhao Qiang dcu: dcu@2ce0000 { compatible = "fsl,ls1021a-dcu"; reg = <0x0 0x2ce0000 0x0 0x10000>; -@@ -693,6 +743,11 @@ +@@ -684,6 +734,11 @@ dr_mode = "host"; snps,quirk-frame-length-adjustment = <0x20>; snps,dis_rxdet_inp3_quirk; @@ -752,7 +752,7 @@ Signed-off-by: Zhao Qiang }; pcie@3400000 { -@@ -700,7 +755,9 @@ +@@ -691,7 +746,9 @@ reg = <0x00 0x03400000 0x0 0x00010000 /* controller registers */ 0x40 0x00000000 0x0 0x00002000>; /* configuration space */ reg-names = "regs", "config"; @@ -763,7 +763,7 @@ Signed-off-by: Zhao Qiang fsl,pcie-scfg = <&scfg 0>; #address-cells = <3>; #size-cells = <2>; -@@ -716,6 +773,7 @@ +@@ -707,6 +764,7 @@ <0000 0 0 2 &gic GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>, <0000 0 0 3 &gic GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>, <0000 0 0 4 &gic GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>; @@ -771,7 +771,7 @@ Signed-off-by: Zhao Qiang }; pcie@3500000 { -@@ -723,7 +781,9 @@ +@@ -714,7 +772,9 @@ reg = <0x00 0x03500000 0x0 0x00010000 /* controller registers */ 0x48 0x00000000 0x0 0x00002000>; /* configuration space */ reg-names = "regs", "config"; @@ -782,7 +782,7 @@ Signed-off-by: Zhao Qiang fsl,pcie-scfg = <&scfg 1>; #address-cells = <3>; #size-cells = <2>; -@@ -739,6 +799,47 @@ +@@ -730,6 +790,47 @@ <0000 0 0 2 &gic GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>, <0000 0 0 3 &gic GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>, <0000 0 0 4 &gic GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>; diff --git a/target/linux/layerscape/patches-4.14/707-dpaa-ethernet-support-layerscape.patch b/target/linux/layerscape/patches-4.14/707-dpaa-ethernet-support-layerscape.patch index 887a19e0e1..3e512cb357 100644 --- a/target/linux/layerscape/patches-4.14/707-dpaa-ethernet-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/707-dpaa-ethernet-support-layerscape.patch @@ -156538,7 +156538,7 @@ Signed-off-by: Zhao Qiang +#endif /* __NET_IOCTLS_H */ --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c -@@ -321,6 +321,13 @@ static void dev_watchdog(unsigned long a +@@ -313,6 +313,13 @@ static void dev_watchdog(unsigned long a txq->trans_timeout++; break; } diff --git a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch index 1a1913a0ec..47481cfa99 100644 --- a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch @@ -323,7 +323,7 @@ Signed-off-by: Zhao Chenhui usb_phy_set_suspend(dwc->usb2_phy, 0); usb_phy_set_suspend(dwc->usb3_phy, 0); ret = phy_power_on(dwc->usb2_generic_phy); -@@ -873,6 +1009,22 @@ static int dwc3_core_init(struct dwc3 *d +@@ -870,6 +1006,22 @@ static int dwc3_core_init(struct dwc3 *d dwc3_writel(dwc->regs, DWC3_GUCTL1, reg); } @@ -346,7 +346,7 @@ Signed-off-by: Zhao Chenhui return 0; err4: -@@ -1079,6 +1231,8 @@ static void dwc3_get_properties(struct d +@@ -1076,6 +1228,8 @@ static void dwc3_get_properties(struct d &hird_threshold); dwc->usb3_lpm_capable = device_property_read_bool(dev, "snps,usb3_lpm_capable"); @@ -355,9 +355,9 @@ Signed-off-by: Zhao Chenhui dwc->disable_scramble_quirk = device_property_read_bool(dev, "snps,disable_scramble_quirk"); -@@ -1113,8 +1267,16 @@ static void dwc3_get_properties(struct d - dwc->parkmode_disable_ss_quirk = device_property_read_bool(dev, - "snps,parkmode-disable-ss-quirk"); +@@ -1108,8 +1262,16 @@ static void dwc3_get_properties(struct d + dwc->dis_tx_ipgap_linecheck_quirk = device_property_read_bool(dev, + "snps,dis-tx-ipgap-linecheck-quirk"); + dwc->quirk_reverse_in_out = device_property_read_bool(dev, + "snps,quirk_reverse_in_out"); @@ -372,7 +372,7 @@ Signed-off-by: Zhao Chenhui device_property_read_u8(dev, "snps,tx_de_emphasis", &tx_de_emphasis); device_property_read_string(dev, "snps,hsphy_interface", -@@ -1125,6 +1287,9 @@ static void dwc3_get_properties(struct d +@@ -1120,6 +1282,9 @@ static void dwc3_get_properties(struct d dwc->dis_metastability_quirk = device_property_read_bool(dev, "snps,dis_metastability_quirk"); @@ -382,7 +382,7 @@ Signed-off-by: Zhao Chenhui dwc->lpm_nyet_threshold = lpm_nyet_threshold; dwc->tx_de_emphasis = tx_de_emphasis; -@@ -1376,12 +1541,14 @@ static int dwc3_resume_common(struct dwc +@@ -1371,12 +1536,14 @@ static int dwc3_resume_common(struct dwc switch (dwc->dr_mode) { case USB_DR_MODE_PERIPHERAL: @@ -440,9 +440,9 @@ Signed-off-by: Zhao Chenhui +#define DWC3_GUCTL_HSTINAUTORETRY BIT(14) + /* Global User Control 1 Register */ - #define DWC3_GUCTL1_PARKMODE_DISABLE_SS BIT(17) #define DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS BIT(28) -@@ -478,6 +507,14 @@ + #define DWC3_GUCTL1_DEV_L1_EXIT_BY_HW BIT(24) +@@ -477,6 +506,14 @@ #define DWC3_DEV_IMOD_INTERVAL_SHIFT 0 #define DWC3_DEV_IMOD_INTERVAL_MASK (0xffff << 0) @@ -457,7 +457,7 @@ Signed-off-by: Zhao Chenhui /* Structures */ struct dwc3_trb; -@@ -789,6 +826,7 @@ struct dwc3_scratchpad_array { +@@ -788,6 +825,7 @@ struct dwc3_scratchpad_array { * @regs: base address for our registers * @regs_size: address space size * @fladj: frame length adjustment @@ -465,7 +465,7 @@ Signed-off-by: Zhao Chenhui * @irq_gadget: peripheral controller's IRQ number * @nr_scratch: number of scratch buffers * @u1u2: only used on revisions <1.83a for workaround -@@ -844,6 +882,7 @@ struct dwc3_scratchpad_array { +@@ -843,6 +881,7 @@ struct dwc3_scratchpad_array { * @setup_packet_pending: true when there's a Setup Packet in FIFO. Workaround * @three_stage_setup: set if we perform a three phase setup * @usb3_lpm_capable: set if hadrware supports Link Power Management @@ -473,7 +473,7 @@ Signed-off-by: Zhao Chenhui * @disable_scramble_quirk: set if we enable the disable scramble quirk * @u2exit_lfps_quirk: set if we enable u2exit lfps quirk * @u2ss_inp3_quirk: set if we enable P3 OK for U2/SS Inactive quirk -@@ -925,6 +964,12 @@ struct dwc3 { +@@ -922,6 +961,12 @@ struct dwc3 { enum usb_phy_interface hsphy_mode; u32 fladj; @@ -486,7 +486,7 @@ Signed-off-by: Zhao Chenhui u32 irq_gadget; u32 nr_scratch; u32 u1u2; -@@ -1009,6 +1054,7 @@ struct dwc3 { +@@ -1006,6 +1051,7 @@ struct dwc3 { unsigned setup_packet_pending:1; unsigned three_stage_setup:1; unsigned usb3_lpm_capable:1; @@ -494,7 +494,7 @@ Signed-off-by: Zhao Chenhui unsigned disable_scramble_quirk:1; unsigned u2exit_lfps_quirk:1; -@@ -1029,6 +1075,11 @@ struct dwc3 { +@@ -1025,6 +1071,11 @@ struct dwc3 { unsigned tx_de_emphasis_quirk:1; unsigned tx_de_emphasis:2; diff --git a/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch b/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch index 4362863b7b..6077f979cf 100644 --- a/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch @@ -5715,7 +5715,7 @@ Signed-off-by: Yangbo Lu int (*start)(struct pci_epc *epc); void (*stop)(struct pci_epc *epc); struct module *owner; -@@ -94,8 +100,17 @@ struct pci_epc { +@@ -91,8 +97,17 @@ struct pci_epc { struct config_group *group; /* spinlock to protect against concurrent access of EP controller */ spinlock_t lock; @@ -5733,7 +5733,7 @@ Signed-off-by: Yangbo Lu #define to_pci_epc(device) container_of((device), struct pci_epc, dev) #define pci_epc_create(dev, ops) \ -@@ -127,17 +142,23 @@ void pci_epc_destroy(struct pci_epc *epc +@@ -124,17 +139,23 @@ void pci_epc_destroy(struct pci_epc *epc int pci_epc_add_epf(struct pci_epc *epc, struct pci_epf *epf); void pci_epc_linkup(struct pci_epc *epc); void pci_epc_remove_epf(struct pci_epc *epc, struct pci_epf *epf); diff --git a/target/linux/layerscape/patches-4.14/819-sdhc-support-layerscape.patch b/target/linux/layerscape/patches-4.14/819-sdhc-support-layerscape.patch index 02688c74cd..60d0c889e5 100644 --- a/target/linux/layerscape/patches-4.14/819-sdhc-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/819-sdhc-support-layerscape.patch @@ -265,7 +265,7 @@ Signed-off-by: Yinbo Zhu u32 val; sdhci_reset(host, mask); -@@ -619,6 +710,12 @@ static void esdhc_reset(struct sdhci_hos +@@ -622,6 +713,12 @@ static void esdhc_reset(struct sdhci_hos val = sdhci_readl(host, ESDHC_TBCTL); val &= ~ESDHC_TB_EN; sdhci_writel(host, val, ESDHC_TBCTL); @@ -278,7 +278,7 @@ Signed-off-by: Yinbo Zhu } } -@@ -630,6 +727,7 @@ static void esdhc_reset(struct sdhci_hos +@@ -633,6 +730,7 @@ static void esdhc_reset(struct sdhci_hos static const struct of_device_id scfg_device_ids[] = { { .compatible = "fsl,t1040-scfg", }, { .compatible = "fsl,ls1012a-scfg", }, @@ -286,7 +286,7 @@ Signed-off-by: Yinbo Zhu { .compatible = "fsl,ls1046a-scfg", }, {} }; -@@ -692,23 +790,91 @@ static int esdhc_signal_voltage_switch(s +@@ -695,23 +793,91 @@ static int esdhc_signal_voltage_switch(s } } @@ -383,7 +383,7 @@ Signed-off-by: Yinbo Zhu } #ifdef CONFIG_PM_SLEEP -@@ -757,7 +923,7 @@ static const struct sdhci_ops sdhci_esdh +@@ -760,7 +926,7 @@ static const struct sdhci_ops sdhci_esdh .adma_workaround = esdhc_of_adma_workaround, .set_bus_width = esdhc_pltfm_set_bus_width, .reset = esdhc_reset, @@ -392,7 +392,7 @@ Signed-off-by: Yinbo Zhu }; static const struct sdhci_ops sdhci_esdhc_le_ops = { -@@ -774,7 +940,7 @@ static const struct sdhci_ops sdhci_esdh +@@ -777,7 +943,7 @@ static const struct sdhci_ops sdhci_esdh .adma_workaround = esdhc_of_adma_workaround, .set_bus_width = esdhc_pltfm_set_bus_width, .reset = esdhc_reset, @@ -401,7 +401,7 @@ Signed-off-by: Yinbo Zhu }; static const struct sdhci_pltfm_data sdhci_esdhc_be_pdata = { -@@ -800,8 +966,20 @@ static struct soc_device_attribute soc_i +@@ -803,8 +969,20 @@ static struct soc_device_attribute soc_i { }, }; @@ -422,7 +422,7 @@ Signed-off-by: Yinbo Zhu struct sdhci_pltfm_host *pltfm_host; struct sdhci_esdhc *esdhc; struct device_node *np; -@@ -821,6 +999,24 @@ static void esdhc_init(struct platform_d +@@ -824,6 +1002,24 @@ static void esdhc_init(struct platform_d else esdhc->quirk_incorrect_hostver = false; @@ -447,7 +447,7 @@ Signed-off-by: Yinbo Zhu np = pdev->dev.of_node; clk = of_clk_get(np, 0); if (!IS_ERR(clk)) { -@@ -848,6 +1044,12 @@ static void esdhc_init(struct platform_d +@@ -851,6 +1047,12 @@ static void esdhc_init(struct platform_d } } @@ -460,7 +460,7 @@ Signed-off-by: Yinbo Zhu static int sdhci_esdhc_probe(struct platform_device *pdev) { struct sdhci_host *host; -@@ -871,6 +1073,7 @@ static int sdhci_esdhc_probe(struct plat +@@ -874,6 +1076,7 @@ static int sdhci_esdhc_probe(struct plat host->mmc_host_ops.start_signal_voltage_switch = esdhc_signal_voltage_switch; host->mmc_host_ops.execute_tuning = esdhc_execute_tuning; @@ -468,7 +468,7 @@ Signed-off-by: Yinbo Zhu host->tuning_delay = 1; esdhc_init(pdev, host); -@@ -879,6 +1082,11 @@ static int sdhci_esdhc_probe(struct plat +@@ -882,6 +1085,11 @@ static int sdhci_esdhc_probe(struct plat pltfm_host = sdhci_priv(host); esdhc = sdhci_pltfm_priv(pltfm_host); @@ -480,7 +480,7 @@ Signed-off-by: Yinbo Zhu if (esdhc->vendor_ver == VENDOR_V_22) host->quirks2 |= SDHCI_QUIRK2_HOST_NO_CMD23; -@@ -925,14 +1133,6 @@ static int sdhci_esdhc_probe(struct plat +@@ -928,14 +1136,6 @@ static int sdhci_esdhc_probe(struct plat return ret; } @@ -497,7 +497,7 @@ Signed-off-by: Yinbo Zhu .name = "sdhci-esdhc", --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c -@@ -2148,7 +2148,7 @@ static void sdhci_send_tuning(struct sdh +@@ -2150,7 +2150,7 @@ static void sdhci_send_tuning(struct sdh } @@ -506,9 +506,9 @@ Signed-off-by: Yinbo Zhu { int i; -@@ -2165,13 +2165,13 @@ static void __sdhci_execute_tuning(struc - pr_debug("%s: Tuning timeout, falling back to fixed sampling clock\n", - mmc_hostname(host->mmc)); +@@ -2167,13 +2167,13 @@ static void __sdhci_execute_tuning(struc + pr_info("%s: Tuning timeout, falling back to fixed sampling clock\n", + mmc_hostname(host->mmc)); sdhci_abort_tuning(host, opcode); - return; + return -ETIMEDOUT; @@ -522,7 +522,7 @@ Signed-off-by: Yinbo Zhu break; } -@@ -2183,6 +2183,7 @@ static void __sdhci_execute_tuning(struc +@@ -2185,6 +2185,7 @@ static void __sdhci_execute_tuning(struc pr_info("%s: Tuning failed, falling back to fixed sampling clock\n", mmc_hostname(host->mmc)); sdhci_reset_tuning(host); @@ -530,7 +530,7 @@ Signed-off-by: Yinbo Zhu } int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) -@@ -2244,7 +2245,7 @@ int sdhci_execute_tuning(struct mmc_host +@@ -2246,7 +2247,7 @@ int sdhci_execute_tuning(struct mmc_host sdhci_start_tuning(host); diff --git a/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch b/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch index 46427a1d03..bb49ee75e8 100644 --- a/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch +++ b/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1948,7 +1948,7 @@ static struct phy_driver genphy_driver = +@@ -1944,7 +1944,7 @@ static struct phy_driver genphy_driver = .config_init = genphy_config_init, .features = PHY_GBIT_FEATURES | SUPPORTED_MII | SUPPORTED_AUI | SUPPORTED_FIBRE | diff --git a/target/linux/mediatek/patches-4.14/0138-rtc-mediatek-add-driver-for-RTC-on-MT7622-SoC.patch b/target/linux/mediatek/patches-4.14/0138-rtc-mediatek-add-driver-for-RTC-on-MT7622-SoC.patch index 374d4d3997..8cf900d143 100644 --- a/target/linux/mediatek/patches-4.14/0138-rtc-mediatek-add-driver-for-RTC-on-MT7622-SoC.patch +++ b/target/linux/mediatek/patches-4.14/0138-rtc-mediatek-add-driver-for-RTC-on-MT7622-SoC.patch @@ -17,7 +17,7 @@ Signed-off-by: Alexandre Belloni --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig -@@ -1716,6 +1716,16 @@ config RTC_DRV_MT6397 +@@ -1715,6 +1715,16 @@ config RTC_DRV_MT6397 If you want to use Mediatek(R) RTC interface, select Y or M here. diff --git a/target/linux/mediatek/patches-4.14/0139-rtc-mediatek-enhance-the-description-for-MediaTek-PM.patch b/target/linux/mediatek/patches-4.14/0139-rtc-mediatek-enhance-the-description-for-MediaTek-PM.patch index f8840f930d..0513a085ac 100644 --- a/target/linux/mediatek/patches-4.14/0139-rtc-mediatek-enhance-the-description-for-MediaTek-PM.patch +++ b/target/linux/mediatek/patches-4.14/0139-rtc-mediatek-enhance-the-description-for-MediaTek-PM.patch @@ -18,7 +18,7 @@ Signed-off-by: Alexandre Belloni --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig -@@ -1707,14 +1707,14 @@ config RTC_DRV_MOXART +@@ -1706,14 +1706,14 @@ config RTC_DRV_MOXART will be called rtc-moxart config RTC_DRV_MT6397 diff --git a/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch b/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch index df099ea3f3..0f79fa4fd1 100644 --- a/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch +++ b/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch @@ -86,7 +86,7 @@ Signed-off-by: Greg Kroah-Hartman if (!xhci->shared_hcd) { --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -280,6 +280,9 @@ static int xhci_pci_setup(struct usb_hcd +@@ -279,6 +279,9 @@ static int xhci_pci_setup(struct usb_hcd if (!xhci->sbrn) pci_read_config_byte(pdev, XHCI_SBRN_OFFSET, &xhci->sbrn); diff --git a/target/linux/mvebu/patches-4.14/300-mvneta-tx-queue-workaround.patch b/target/linux/mvebu/patches-4.14/300-mvneta-tx-queue-workaround.patch index 6c21fa30be..f21f8083ee 100644 --- a/target/linux/mvebu/patches-4.14/300-mvneta-tx-queue-workaround.patch +++ b/target/linux/mvebu/patches-4.14/300-mvneta-tx-queue-workaround.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -3960,6 +3960,15 @@ static int mvneta_ethtool_set_wol(struct +@@ -3961,6 +3961,15 @@ static int mvneta_ethtool_set_wol(struct return ret; } @@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau static const struct net_device_ops mvneta_netdev_ops = { .ndo_open = mvneta_open, .ndo_stop = mvneta_stop, -@@ -3970,6 +3979,7 @@ static const struct net_device_ops mvnet +@@ -3971,6 +3980,7 @@ static const struct net_device_ops mvnet .ndo_fix_features = mvneta_fix_features, .ndo_get_stats64 = mvneta_get_stats64, .ndo_do_ioctl = mvneta_ioctl, diff --git a/target/linux/mvebu/patches-4.14/403-net-mvneta-convert-to-phylink.patch b/target/linux/mvebu/patches-4.14/403-net-mvneta-convert-to-phylink.patch index 8cefb1db26..34a2d342db 100644 --- a/target/linux/mvebu/patches-4.14/403-net-mvneta-convert-to-phylink.patch +++ b/target/linux/mvebu/patches-4.14/403-net-mvneta-convert-to-phylink.patch @@ -251,7 +251,7 @@ Signed-off-by: Russell King } /* Release Tx descriptors */ -@@ -3060,7 +3019,6 @@ static int mvneta_setup_txqs(struct mvne +@@ -3061,7 +3020,6 @@ static int mvneta_setup_txqs(struct mvne static void mvneta_start_dev(struct mvneta_port *pp) { int cpu; @@ -259,7 +259,7 @@ Signed-off-by: Russell King mvneta_max_rx_size_set(pp, pp->pkt_size); mvneta_txq_max_tx_size_set(pp, pp->pkt_size); -@@ -3088,16 +3046,15 @@ static void mvneta_start_dev(struct mvne +@@ -3089,16 +3047,15 @@ static void mvneta_start_dev(struct mvne MVNETA_CAUSE_LINK_CHANGE | MVNETA_CAUSE_PSC_SYNC_CHANGE); @@ -278,7 +278,7 @@ Signed-off-by: Russell King if (!pp->neta_armada3700) { for_each_online_cpu(cpu) { -@@ -3250,103 +3207,232 @@ static int mvneta_set_mac_addr(struct ne +@@ -3251,103 +3208,232 @@ static int mvneta_set_mac_addr(struct ne return 0; } @@ -585,7 +585,7 @@ Signed-off-by: Russell King } /* Electing a CPU must be done in an atomic way: it should be done -@@ -3625,10 +3711,9 @@ static int mvneta_stop(struct net_device +@@ -3626,10 +3712,9 @@ static int mvneta_stop(struct net_device static int mvneta_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { @@ -598,7 +598,7 @@ Signed-off-by: Russell King } /* Ethtool methods */ -@@ -3639,44 +3724,25 @@ mvneta_ethtool_set_link_ksettings(struct +@@ -3640,44 +3725,25 @@ mvneta_ethtool_set_link_ksettings(struct const struct ethtool_link_ksettings *cmd) { struct mvneta_port *pp = netdev_priv(ndev); @@ -657,7 +657,7 @@ Signed-off-by: Russell King } /* Set interrupt coalescing for ethtools */ -@@ -3768,6 +3834,22 @@ static int mvneta_ethtool_set_ringparam( +@@ -3769,6 +3835,22 @@ static int mvneta_ethtool_set_ringparam( return 0; } @@ -680,7 +680,7 @@ Signed-off-by: Russell King static void mvneta_ethtool_get_strings(struct net_device *netdev, u32 sset, u8 *data) { -@@ -3784,26 +3866,35 @@ static void mvneta_ethtool_update_stats( +@@ -3785,26 +3867,35 @@ static void mvneta_ethtool_update_stats( { const struct mvneta_statistic *s; void __iomem *base = pp->base; @@ -721,7 +721,7 @@ Signed-off-by: Russell King } } -@@ -3938,28 +4029,65 @@ static int mvneta_ethtool_get_rxfh(struc +@@ -3939,28 +4030,65 @@ static int mvneta_ethtool_get_rxfh(struc static void mvneta_ethtool_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { @@ -795,7 +795,7 @@ Signed-off-by: Russell King static u16 mvneta_select_queue(struct net_device *dev, struct sk_buff *skb, void *accel_priv, select_queue_fallback_t fallback) -@@ -3983,13 +4111,15 @@ static const struct net_device_ops mvnet +@@ -3984,13 +4112,15 @@ static const struct net_device_ops mvnet }; static const struct ethtool_ops mvneta_eth_tool_ops = { @@ -812,7 +812,7 @@ Signed-off-by: Russell King .get_strings = mvneta_ethtool_get_strings, .get_ethtool_stats = mvneta_ethtool_get_stats, .get_sset_count = mvneta_ethtool_get_sset_count, -@@ -3997,10 +4127,12 @@ static const struct ethtool_ops mvneta_e +@@ -3998,10 +4128,12 @@ static const struct ethtool_ops mvneta_e .get_rxnfc = mvneta_ethtool_get_rxnfc, .get_rxfh = mvneta_ethtool_get_rxfh, .set_rxfh = mvneta_ethtool_set_rxfh, @@ -826,7 +826,7 @@ Signed-off-by: Russell King }; /* Initialize hw */ -@@ -4145,14 +4277,13 @@ static int mvneta_probe(struct platform_ +@@ -4146,14 +4278,13 @@ static int mvneta_probe(struct platform_ { struct resource *res; struct device_node *dn = pdev->dev.of_node; @@ -842,7 +842,7 @@ Signed-off-by: Russell King int tx_csum_limit; int phy_mode; int err; -@@ -4168,31 +4299,11 @@ static int mvneta_probe(struct platform_ +@@ -4169,31 +4300,11 @@ static int mvneta_probe(struct platform_ goto err_free_netdev; } @@ -875,7 +875,7 @@ Signed-off-by: Russell King } dev->tx_queue_len = MVNETA_MAX_TXD; -@@ -4203,12 +4314,7 @@ static int mvneta_probe(struct platform_ +@@ -4204,12 +4315,7 @@ static int mvneta_probe(struct platform_ pp = netdev_priv(dev); spin_lock_init(&pp->lock); @@ -889,7 +889,7 @@ Signed-off-by: Russell King pp->rxq_def = rxq_def; -@@ -4230,7 +4336,7 @@ static int mvneta_probe(struct platform_ +@@ -4231,7 +4337,7 @@ static int mvneta_probe(struct platform_ pp->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(pp->clk)) { err = PTR_ERR(pp->clk); @@ -898,7 +898,7 @@ Signed-off-by: Russell King } clk_prepare_enable(pp->clk); -@@ -4356,6 +4462,14 @@ static int mvneta_probe(struct platform_ +@@ -4357,6 +4463,14 @@ static int mvneta_probe(struct platform_ /* 9676 == 9700 - 20 and rounding to 8 */ dev->max_mtu = 9676; @@ -913,7 +913,7 @@ Signed-off-by: Russell King err = register_netdev(dev); if (err < 0) { dev_err(&pdev->dev, "failed to register\n"); -@@ -4367,14 +4481,6 @@ static int mvneta_probe(struct platform_ +@@ -4368,14 +4482,6 @@ static int mvneta_probe(struct platform_ platform_set_drvdata(pdev, pp->dev); @@ -928,7 +928,7 @@ Signed-off-by: Russell King return 0; err_netdev: -@@ -4383,16 +4489,14 @@ err_netdev: +@@ -4384,16 +4490,14 @@ err_netdev: mvneta_bm_pool_destroy(pp->bm_priv, pp->pool_short, 1 << pp->id); } @@ -947,7 +947,7 @@ Signed-off-by: Russell King err_free_irq: irq_dispose_mapping(dev->irq); err_free_netdev: -@@ -4404,7 +4508,6 @@ err_free_netdev: +@@ -4405,7 +4509,6 @@ err_free_netdev: static int mvneta_remove(struct platform_device *pdev) { struct net_device *dev = platform_get_drvdata(pdev); @@ -955,7 +955,7 @@ Signed-off-by: Russell King struct mvneta_port *pp = netdev_priv(dev); unregister_netdev(dev); -@@ -4412,10 +4515,8 @@ static int mvneta_remove(struct platform +@@ -4413,10 +4516,8 @@ static int mvneta_remove(struct platform clk_disable_unprepare(pp->clk); free_percpu(pp->ports); free_percpu(pp->stats); @@ -967,7 +967,7 @@ Signed-off-by: Russell King free_netdev(dev); if (pp->bm_priv) { -@@ -4467,9 +4568,6 @@ static int mvneta_resume(struct device * +@@ -4468,9 +4569,6 @@ static int mvneta_resume(struct device * return err; } diff --git a/target/linux/mvebu/patches-4.14/404-net-mvneta-hack-fix-phy_interface.patch b/target/linux/mvebu/patches-4.14/404-net-mvneta-hack-fix-phy_interface.patch index 584e6381b4..906c163ac9 100644 --- a/target/linux/mvebu/patches-4.14/404-net-mvneta-hack-fix-phy_interface.patch +++ b/target/linux/mvebu/patches-4.14/404-net-mvneta-hack-fix-phy_interface.patch @@ -18,7 +18,7 @@ Signed-off-by: Russell King struct device_node *dn; unsigned int tx_csum_limit; struct phylink *phylink; -@@ -4314,6 +4315,7 @@ static int mvneta_probe(struct platform_ +@@ -4315,6 +4316,7 @@ static int mvneta_probe(struct platform_ pp = netdev_priv(dev); spin_lock_init(&pp->lock); diff --git a/target/linux/mvebu/patches-4.14/405-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch b/target/linux/mvebu/patches-4.14/405-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch index 0889aff969..7d02b0a93b 100644 --- a/target/linux/mvebu/patches-4.14/405-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch +++ b/target/linux/mvebu/patches-4.14/405-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch @@ -24,7 +24,7 @@ Signed-off-by: Russell King mvneta_link_change(pp); } -@@ -3044,8 +3043,7 @@ static void mvneta_start_dev(struct mvne +@@ -3045,8 +3044,7 @@ static void mvneta_start_dev(struct mvne mvreg_write(pp, MVNETA_INTR_MISC_MASK, MVNETA_CAUSE_PHY_STATUS_CHANGE | @@ -34,7 +34,7 @@ Signed-off-by: Russell King phylink_start(pp->phylink); netif_tx_start_all_queues(pp->dev); -@@ -3541,8 +3539,7 @@ static int mvneta_cpu_online(unsigned in +@@ -3542,8 +3540,7 @@ static int mvneta_cpu_online(unsigned in on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true); mvreg_write(pp, MVNETA_INTR_MISC_MASK, MVNETA_CAUSE_PHY_STATUS_CHANGE | @@ -44,7 +44,7 @@ Signed-off-by: Russell King netif_tx_start_all_queues(pp->dev); spin_unlock(&pp->lock); return 0; -@@ -3583,8 +3580,7 @@ static int mvneta_cpu_dead(unsigned int +@@ -3584,8 +3581,7 @@ static int mvneta_cpu_dead(unsigned int on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true); mvreg_write(pp, MVNETA_INTR_MISC_MASK, MVNETA_CAUSE_PHY_STATUS_CHANGE | diff --git a/target/linux/mvebu/patches-4.14/406-net-mvneta-add-module-EEPROM-reading-support.patch b/target/linux/mvebu/patches-4.14/406-net-mvneta-add-module-EEPROM-reading-support.patch index 7b0323b1a7..39eb33ac2c 100644 --- a/target/linux/mvebu/patches-4.14/406-net-mvneta-add-module-EEPROM-reading-support.patch +++ b/target/linux/mvebu/patches-4.14/406-net-mvneta-add-module-EEPROM-reading-support.patch @@ -10,7 +10,7 @@ Signed-off-by: Russell King --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -4044,6 +4044,22 @@ static int mvneta_ethtool_set_wol(struct +@@ -4045,6 +4045,22 @@ static int mvneta_ethtool_set_wol(struct return ret; } @@ -33,7 +33,7 @@ Signed-off-by: Russell King static int mvneta_ethtool_get_eee(struct net_device *dev, struct ethtool_eee *eee) { -@@ -4128,6 +4144,8 @@ static const struct ethtool_ops mvneta_e +@@ -4129,6 +4145,8 @@ static const struct ethtool_ops mvneta_e .set_link_ksettings = mvneta_ethtool_set_link_ksettings, .get_wol = mvneta_ethtool_get_wol, .set_wol = mvneta_ethtool_set_wol, diff --git a/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch b/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch index f6e8f71743..19f8f1e632 100644 --- a/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch +++ b/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch @@ -15,7 +15,7 @@ Signed-off-by: Russell King --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -4044,22 +4044,6 @@ static int mvneta_ethtool_set_wol(struct +@@ -4045,22 +4045,6 @@ static int mvneta_ethtool_set_wol(struct return ret; } @@ -38,7 +38,7 @@ Signed-off-by: Russell King static int mvneta_ethtool_get_eee(struct net_device *dev, struct ethtool_eee *eee) { -@@ -4144,8 +4128,6 @@ static const struct ethtool_ops mvneta_e +@@ -4145,8 +4129,6 @@ static const struct ethtool_ops mvneta_e .set_link_ksettings = mvneta_ethtool_set_link_ksettings, .get_wol = mvneta_ethtool_get_wol, .set_wol = mvneta_ethtool_set_wol, @@ -129,7 +129,7 @@ Signed-off-by: Russell King /* 802.11 specific */ struct wireless_dev; /* 802.15.4 specific */ -@@ -1945,6 +1946,7 @@ struct net_device { +@@ -1940,6 +1941,7 @@ struct net_device { struct netprio_map __rcu *priomap; #endif struct phy_device *phydev; diff --git a/target/linux/mxs/patches-4.14/110-crypto-mxsdcp-provide-importexport.patch b/target/linux/mxs/patches-4.14/110-crypto-mxsdcp-provide-importexport.patch index 49e96d1e95..3be3e1a111 100644 --- a/target/linux/mxs/patches-4.14/110-crypto-mxsdcp-provide-importexport.patch +++ b/target/linux/mxs/patches-4.14/110-crypto-mxsdcp-provide-importexport.patch @@ -1,6 +1,6 @@ --- a/drivers/crypto/mxs-dcp.c +++ b/drivers/crypto/mxs-dcp.c -@@ -831,6 +831,24 @@ static void dcp_sha_cra_exit(struct cryp +@@ -777,6 +777,24 @@ static void dcp_sha_cra_exit(struct cryp { } @@ -25,7 +25,7 @@ /* AES 128 ECB and AES 128 CBC */ static struct crypto_alg dcp_aes_algs[] = { { -@@ -890,8 +908,11 @@ static struct ahash_alg dcp_sha1_alg = { +@@ -836,8 +854,11 @@ static struct ahash_alg dcp_sha1_alg = { .final = dcp_sha_final, .finup = dcp_sha_finup, .digest = dcp_sha_digest, @@ -37,7 +37,7 @@ .base = { .cra_name = "sha1", .cra_driver_name = "sha1-dcp", -@@ -914,8 +935,11 @@ static struct ahash_alg dcp_sha256_alg = +@@ -860,8 +881,11 @@ static struct ahash_alg dcp_sha256_alg = .final = dcp_sha_final, .finup = dcp_sha_finup, .digest = dcp_sha_digest, diff --git a/target/linux/oxnas/patches-4.14/001-irqchip-versatile-fpga-Handle-chained-IRQs-properly.patch b/target/linux/oxnas/patches-4.14/001-irqchip-versatile-fpga-Handle-chained-IRQs-properly.patch new file mode 100644 index 0000000000..f4285aadd0 --- /dev/null +++ b/target/linux/oxnas/patches-4.14/001-irqchip-versatile-fpga-Handle-chained-IRQs-properly.patch @@ -0,0 +1,77 @@ +From patchwork Thu Mar 19 02:34:48 2020 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Sungbo Eo +X-Patchwork-Id: 11446405 +From: Sungbo Eo +To: Linus Walleij , + Thomas Gleixner , Jason Cooper , + Marc Zyngier , linux-arm-kernel@lists.infradead.org, + linux-kernel@vger.kernel.org, linux-oxnas@groups.io +Subject: [PATCH v2] irqchip/versatile-fpga: Handle chained IRQs properly +Date: Thu, 19 Mar 2020 11:34:48 +0900 +Message-Id: <20200319023448.1479701-1-mans0n@gorani.run> +In-Reply-To: <002b72cab9896fa5ac76a52e0cb503ff@kernel.org> +References: <002b72cab9896fa5ac76a52e0cb503ff@kernel.org> +MIME-Version: 1.0 +List-Id: +Cc: Sungbo Eo , Neil Armstrong +Sender: "linux-arm-kernel" + +Enclose the chained handler with chained_irq_{enter,exit}(), so that the +muxed interrupts get properly acked. + +This patch also fixes a reboot bug on OX820 SoC, where the jiffies timer +interrupt is never acked. The kernel waits a clock tick forever in +calibrate_delay_converge(), which leads to a boot hang. + +Fixes: c41b16f8c9d9 ("ARM: integrator/versatile: consolidate FPGA IRQ handling code") +Signed-off-by: Sungbo Eo +Cc: Neil Armstrong +--- +v2: moved readl below chained_irq_enter() + added Fixes tag + + drivers/irqchip/irq-versatile-fpga.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +--- a/drivers/irqchip/irq-versatile-fpga.c ++++ b/drivers/irqchip/irq-versatile-fpga.c +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -68,12 +69,16 @@ static void fpga_irq_unmask(struct irq_d + + static void fpga_irq_handle(struct irq_desc *desc) + { ++ struct irq_chip *chip = irq_desc_get_chip(desc); + struct fpga_irq_data *f = irq_desc_get_handler_data(desc); +- u32 status = readl(f->base + IRQ_STATUS); ++ u32 status; + ++ chained_irq_enter(chip, desc); ++ ++ status = readl(f->base + IRQ_STATUS); + if (status == 0) { + do_bad_IRQ(desc); +- return; ++ goto out; + } + + do { +@@ -82,6 +87,9 @@ static void fpga_irq_handle(struct irq_d + status &= ~(1 << irq); + generic_handle_irq(irq_find_mapping(f->domain, irq)); + } while (status); ++ ++out: ++ chained_irq_exit(chip, desc); + } + + /* diff --git a/target/linux/oxnas/patches-4.14/002-irqchip-versatile-fpga-Apply-clear-mask-earlier.patch b/target/linux/oxnas/patches-4.14/002-irqchip-versatile-fpga-Apply-clear-mask-earlier.patch new file mode 100644 index 0000000000..eef2c4624f --- /dev/null +++ b/target/linux/oxnas/patches-4.14/002-irqchip-versatile-fpga-Apply-clear-mask-earlier.patch @@ -0,0 +1,58 @@ +From patchwork Sat Mar 21 13:38:42 2020 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Sungbo Eo +X-Patchwork-Id: 11451163 +From: Sungbo Eo +To: linux-oxnas@groups.io, Linus Walleij , + Thomas Gleixner , Jason Cooper , + Marc Zyngier , linux-arm-kernel@lists.infradead.org, + linux-kernel@vger.kernel.org +Subject: [PATCH] irqchip/versatile-fpga: Apply clear-mask earlier +Date: Sat, 21 Mar 2020 22:38:42 +0900 +Message-Id: <20200321133842.2408823-1-mans0n@gorani.run> +MIME-Version: 1.0 +Sender: "linux-arm-kernel" + +Clear its own IRQs before the parent IRQ get enabled, so that the +remaining IRQs do not accidentally interrupt the parent IRQ controller. + +This patch also fixes a reboot bug on OX820 SoC, where the remaining +rps-timer IRQ raises a GIC interrupt that is left pending. After that, +the rps-timer IRQ is cleared during driver initialization, and there's +no IRQ left in rps-irq when local_irq_enable() is called, which evokes +an error message "unexpected IRQ trap". + +Fixes: bdd272cbb97a ("irqchip: versatile FPGA: support cascaded interrupts from DT") +Signed-off-by: Sungbo Eo +Cc: Neil Armstrong +Cc: Daniel Golle +--- + drivers/irqchip/irq-versatile-fpga.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c +index 70e2cfff8175..f1386733d3bc 100644 +--- a/drivers/irqchip/irq-versatile-fpga.c ++++ b/drivers/irqchip/irq-versatile-fpga.c +@@ -212,6 +212,9 @@ int __init fpga_irq_of_init(struct device_node *node, + if (of_property_read_u32(node, "valid-mask", &valid_mask)) + valid_mask = 0; + ++ writel(clear_mask, base + IRQ_ENABLE_CLEAR); ++ writel(clear_mask, base + FIQ_ENABLE_CLEAR); ++ + /* Some chips are cascaded from a parent IRQ */ + parent_irq = irq_of_parse_and_map(node, 0); + if (!parent_irq) { +@@ -221,9 +224,6 @@ int __init fpga_irq_of_init(struct device_node *node, + + fpga_irq_init(base, node->name, 0, parent_irq, valid_mask, node); + +- writel(clear_mask, base + IRQ_ENABLE_CLEAR); +- writel(clear_mask, base + FIQ_ENABLE_CLEAR); +- + /* + * On Versatile AB/PB, some secondary interrupts have a direct + * pass-thru to the primary controller for IRQs 20 and 22-31 which need diff --git a/target/linux/oxnas/patches-4.14/003-ARM-dts-oxnas-Fix-clear-mask-property.patch b/target/linux/oxnas/patches-4.14/003-ARM-dts-oxnas-Fix-clear-mask-property.patch new file mode 100644 index 0000000000..cac125e7b3 --- /dev/null +++ b/target/linux/oxnas/patches-4.14/003-ARM-dts-oxnas-Fix-clear-mask-property.patch @@ -0,0 +1,55 @@ +From patchwork Sat Mar 21 14:36:53 2020 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Sungbo Eo +X-Patchwork-Id: 11451187 +From: Sungbo Eo +To: Neil Armstrong , + Rob Herring , + Mark Rutland , linux-arm-kernel@lists.infradead.org, + linux-oxnas@groups.io, devicetree@vger.kernel.org, + linux-kernel@vger.kernel.org +Subject: [PATCH] ARM: dts: oxnas: Fix clear-mask property +Date: Sat, 21 Mar 2020 23:36:53 +0900 +Message-Id: <20200321143653.2412823-1-mans0n@gorani.run> +Sender: "linux-arm-kernel" + +Disable all rps-irq interrupts during driver initialization to prevent +an accidental interrupt on GIC. + +Fixes: 84316f4ef141 ("ARM: boot: dts: Add Oxford Semiconductor OX810SE dtsi") +Fixes: 38d4a53733f5 ("ARM: dts: Add support for OX820 and Pogoplug V3") +Signed-off-by: Sungbo Eo +Acked-by: Neil Armstrong +--- + arch/arm/boot/dts/ox810se.dtsi | 4 ++-- + arch/arm/boot/dts/ox820.dtsi | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +--- a/arch/arm/boot/dts/ox810se.dtsi ++++ b/arch/arm/boot/dts/ox810se.dtsi +@@ -323,8 +323,8 @@ + interrupt-controller; + reg = <0 0x200>; + #interrupt-cells = <1>; +- valid-mask = <0xFFFFFFFF>; +- clear-mask = <0>; ++ valid-mask = <0xffffffff>; ++ clear-mask = <0xffffffff>; + }; + + timer0: timer@200 { +--- a/arch/arm/boot/dts/ox820.dtsi ++++ b/arch/arm/boot/dts/ox820.dtsi +@@ -240,8 +240,8 @@ + reg = <0 0x200>; + interrupts = ; + #interrupt-cells = <1>; +- valid-mask = <0xFFFFFFFF>; +- clear-mask = <0>; ++ valid-mask = <0xffffffff>; ++ clear-mask = <0xffffffff>; + }; + + timer0: timer@200 { diff --git a/target/linux/ramips/patches-4.14/0034-NET-multi-phy-support.patch b/target/linux/ramips/patches-4.14/0034-NET-multi-phy-support.patch index e6583f9791..98ea5f557c 100644 --- a/target/linux/ramips/patches-4.14/0034-NET-multi-phy-support.patch +++ b/target/linux/ramips/patches-4.14/0034-NET-multi-phy-support.patch @@ -11,7 +11,7 @@ Signed-off-by: John Crispin --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -980,7 +980,10 @@ void phy_state_machine(struct work_struc +@@ -913,7 +913,10 @@ void phy_state_machine(struct work_struc /* If the link is down, give up on negotiation for now */ if (!phydev->link) { phydev->state = PHY_NOLINK; @@ -23,7 +23,7 @@ Signed-off-by: John Crispin break; } -@@ -1067,7 +1070,10 @@ void phy_state_machine(struct work_struc +@@ -1000,7 +1003,10 @@ void phy_state_machine(struct work_struc phy_link_up(phydev); } else { phydev->state = PHY_NOLINK; @@ -35,7 +35,7 @@ Signed-off-by: John Crispin } if (phy_interrupt_is_valid(phydev)) -@@ -1077,7 +1083,10 @@ void phy_state_machine(struct work_struc +@@ -1010,7 +1016,10 @@ void phy_state_machine(struct work_struc case PHY_HALTED: if (phydev->link) { phydev->link = 0; From 7411cf939e3c1c925fddde63970e1a56b7f85e52 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 27 Apr 2020 20:06:40 +0200 Subject: [PATCH 26/38] mt76: update to the latest version Signed-off-by: Felix Fietkau --- package/kernel/mt76/Makefile | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index be383eab50..f4b37989c8 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2020-04-23 -PKG_SOURCE_VERSION:=cde3716aa47e8f8446b18a0f6873f53c95c9f202 -PKG_MIRROR_HASH:=a97a23f828cf054220b5f9a083c94323d9591b631ad7190a903c0ab67ba69997 +PKG_SOURCE_DATE:=2020-04-27 +PKG_SOURCE_VERSION:=5f3ccc7226272198c21ec934d9072a56b0953f47 +PKG_MIRROR_HASH:=6f1a7b7d7b9f4db79d72405baeafa318769eeab270fea4479756f91ac5a2494d PKG_MAINTAINER:=Felix Fietkau PKG_BUILD_PARALLEL:=1 @@ -23,9 +23,7 @@ PKG_CONFIG_DEPENDS += \ CONFIG_PACKAGE_kmod-mt76x2-common \ CONFIG_PACKAGE_kmod-mt76x2 \ CONFIG_PACKAGE_kmod-mt76x2u \ - CONFIG_PACKAGE_kmod-mt7603 \ - CONFIG_PACKAGE_kmod-mt7615-common \ - CONFIG_PACKAGE_kmod-mt7615e + CONFIG_PACKAGE_kmod-mt7603 STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h @@ -140,19 +138,12 @@ define KernelPackage/mt7603 AUTOLOAD:=$(call AutoProbe,mt7603e) endef -define KernelPackage/mt7615-common - $(KernelPackage/mt76-default) - TITLE:=MediaTek MT7615 wireless driver common code - DEPENDS+=+kmod-mt76-core - HIDDEN:=1 - FILES:=$(PKG_BUILD_DIR)/mt7615/mt7615-common.ko -endef - define KernelPackage/mt7615e $(KernelPackage/mt76-default) TITLE:=MediaTek MT7615 wireless driver - DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common + DEPENDS+=@PCI_SUPPORT +kmod-mt76-core FILES:=\ + $(PKG_BUILD_DIR)/mt7615/mt7615-common.ko \ $(PKG_BUILD_DIR)/mt7615/mt7615e.ko AUTOLOAD:=$(call AutoProbe,mt7615e) endef @@ -200,10 +191,8 @@ endif ifdef CONFIG_PACKAGE_kmod-mt7603 PKG_MAKE_FLAGS += CONFIG_MT7603E=m endif -ifdef CONFIG_PACKAGE_kmod-mt7615-common - PKG_MAKE_FLAGS += CONFIG_MT7615_COMMON=m -endif ifdef CONFIG_PACKAGE_kmod-mt7615e + PKG_MAKE_FLAGS += CONFIG_MT7615_COMMON=m PKG_MAKE_FLAGS += CONFIG_MT7615E=m ifdef CONFIG_TARGET_mediatek_mt7622 PKG_MAKE_FLAGS += CONFIG_MT7622_WMAC=y @@ -285,6 +274,5 @@ $(eval $(call KernelPackage,mt76x2-common)) $(eval $(call KernelPackage,mt76x2u)) $(eval $(call KernelPackage,mt76x2)) $(eval $(call KernelPackage,mt7603)) -$(eval $(call KernelPackage,mt7615-common)) $(eval $(call KernelPackage,mt7615e)) $(eval $(call KernelPackage,mt76)) From 6cdf4ded1fed161cfc719c5089ff2ecdb1366d0f Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Thu, 30 Apr 2020 10:11:11 +0800 Subject: [PATCH 27/38] ath10k-firmware: move CT firmwares to new package --- package/firmware/ath10k-ct-firmware/Makefile | 677 +++++++ package/firmware/ath10k-firmware/Makefile | 448 +---- package/kernel/ath10k-ct/Makefile | 8 +- ...rt-for-configuring-management-packet.patch | 89 - ...ble-out-of-bound-access-of-ath10k_ra.patch | 66 - ...rect-multicast-broadcast-rate-settin.patch | 43 - ...64-ath10k-commit-rates-from-mac80211.patch | 52 - ...-the-vif-to-cancel_remain_on_channel.patch | 41 - ...rolling-support-for-various-chipsets.patch | 1634 ----------------- ...rolling-support-for-various-chipsets.patch | 598 ++++++ ...h10k-4.16-use-tpt-trigger-by-default.patch | 127 -- ...02-ath10k-use-tpt-trigger-by-default.patch | 53 + ...ilable-channels-via-DT-ieee80211-fre.patch | 39 - ...0-0010-ath10k-limit-htt-rx-ring-size.patch | 28 - ...60-0011-ath10k-limit-pci-buffer-size.patch | 100 - ...station-exists-before-forwarding-tx-.patch | 81 - 16 files changed, 1334 insertions(+), 2750 deletions(-) create mode 100644 package/firmware/ath10k-ct-firmware/Makefile delete mode 100644 package/kernel/ath10k-ct/patches/161-ath10k-add-support-for-configuring-management-packet.patch delete mode 100644 package/kernel/ath10k-ct/patches/162-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch delete mode 100644 package/kernel/ath10k-ct/patches/163-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch delete mode 100644 package/kernel/ath10k-ct/patches/170-mac80211-pass-the-vif-to-cancel_remain_on_channel.patch delete mode 100644 package/kernel/ath10k-ct/patches/201-ath10k-4.16_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch create mode 100644 package/kernel/ath10k-ct/patches/201-ath10k-add-LED-and-GPIO-controlling-support-for-various-chipsets.patch delete mode 100644 package/kernel/ath10k-ct/patches/202-ath10k-4.16-use-tpt-trigger-by-default.patch create mode 100644 package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch delete mode 100644 package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch delete mode 100644 package/kernel/ath10k-ct/patches/976-ath10k-Check-if-station-exists-before-forwarding-tx-.patch diff --git a/package/firmware/ath10k-ct-firmware/Makefile b/package/firmware/ath10k-ct-firmware/Makefile new file mode 100644 index 0000000000..18370b7d85 --- /dev/null +++ b/package/firmware/ath10k-ct-firmware/Makefile @@ -0,0 +1,677 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=ath10k-ct-firmware +PKG_VERSION:=2020-04-24 +PKG_RELEASE:=2 + +include $(INCLUDE_DIR)/package.mk + +ATH10K_FIRMWARE_REV:=d622d160e9f552ead68d9ae81b715422892dc2ef +ATH10K_FIRMWARE_URL:=@GITHUB/kvalo/ath10k-firmware/$(ATH10K_FIRMWARE_REV) + +QCA9887_BOARD_FILE:=ath10k-firmware-$(ATH10K_FIRMWARE_REV)-qca9887-board.bin +define Download/qca9887-board + FILE:=$(QCA9887_BOARD_FILE) + URL:=$(ATH10K_FIRMWARE_URL)/QCA9887/hw1.0 + URL_FILE:=board.bin + HASH:=cf4df099f6ee05c181f55ce17297a1d32c61d725eb96246fd315ad5587c42426 +endef +$(eval $(call Download,qca9887-board)) + +QCA988X_BOARD_FILE:=ath10k-firmware-$(ATH10K_FIRMWARE_REV)-qca988x-board.bin +define Download/qca988x-board + FILE:=$(QCA988X_BOARD_FILE) + URL:=$(ATH10K_FIRMWARE_URL)/QCA988X/hw2.0 + URL_FILE:=board.bin + HASH:=5b5b380333c2dd3b6ce67f30e2f7008f4020bf594970d3b464fd8d4a80fcd880 +endef +$(eval $(call Download,qca988x-board)) + +QCA99X0_BOARD_FILE:=ath10k-firmware-$(ATH10K_FIRMWARE_REV)-qca99x0-board.bin +define Download/qca99x0-board + FILE:=$(QCA99X0_BOARD_FILE) + URL:=$(ATH10K_FIRMWARE_URL)/QCA99X0/hw2.0 + URL_FILE:=boardData_AR900B_CUS239_5G_v2_001.bin + HASH:=3bf7561ee373b369025dcd366d276d038a97d3397ccae41ce841d98a58b30aff +endef +$(eval $(call Download,qca99x0-board)) + +QCA99X0_BOARD2_REV:=ddcec9efd245da9365c474f513a855a55f3ac7fe +QCA99X0_BOARD2_FILE:=ath10k-firmware-$(QCA99X0_BOARD2_REV)-qca99x0-board-2.bin +define Download/qca99x0-board2 + FILE:=$(QCA99X0_BOARD2_FILE) + URL:=https://source.codeaurora.org/quic/qsdk/oss/firmware/ath10k-firmware/plain/ath10k/QCA99X0/hw2.0 + URL_FILE:=board-2.bin?id=$(QCA99X0_BOARD2_REV) + HASH:=03711ac21e60ef59d3815e235eb721c0c22851b5410299411085aa6f2af45401 +endef +$(eval $(call Download,qca99x0-board2)) + +QCA9984_BOARD2_FILE:=ath10k-firmware-$(ATH10K_FIRMWARE_REV)-qca9984-board-2.bin +define Download/qca9984-board2 + FILE:=$(QCA9984_BOARD2_FILE) + URL:=$(ATH10K_FIRMWARE_URL)/QCA9984/hw1.0 + URL_FILE:=board-2.bin + HASH:=0d6d46cf0467185e3959ce3cb69e2415be6e48ab8a4bee3eb400edbe48cb9c25 +endef +$(eval $(call Download,qca9984-board2)) + +QCA4019_BOARD2_FILE:=ath10k-firmware-$(ATH10K_FIRMWARE_REV)-qca4019-board-2.bin +define Download/qca4019-board2 + FILE:=$(QCA4019_BOARD2_FILE) + URL:=$(ATH10K_FIRMWARE_URL)/QCA4019/hw1.0 + URL_FILE:=board-2.bin + HASH:=94b66aa4ddbed5110a96364d3c7b4ebcb320e3ac4e8697660b277e76077bc338 +endef +$(eval $(call Download,qca4019-board2)) + +QCA9888_BOARD2_FILE:=ath10k-firmware-$(ATH10K_FIRMWARE_REV)-qca9888-board-2.bin +define Download/qca9888-board2 + FILE:=$(QCA9888_BOARD2_FILE) + URL:=$(ATH10K_FIRMWARE_URL)/QCA9888/hw2.0 + URL_FILE:=board-2.bin + HASH:=5b871bb567f64525ca45adb88063211de472015d09e0f9aa3fa61ab71c8fdfd3 +endef +$(eval $(call Download,qca9888-board2)) + +CT_FIRMWARE_FILE = $(1)-$($(1)_FIRMWARE_FILE_CT) +CT_FIRMWARE_FILE_FULL_HTT = $(1)-$($(1)_FIRMWARE_FILE_CT_FULL_HTT) +CT_FIRMWARE_FILE_HTT = $(1)-$($(1)_FIRMWARE_FILE_CT_HTT) + +define Download/ct-firmware + URL:=https://www.candelatech.com/downloads/$(2) + FILE:=$(call CT_FIRMWARE_FILE,$(1)) + URL_FILE:=$($(1)_FIRMWARE_FILE_CT) +endef + +define Download/ct-firmware-full-htt + URL:=https://www.candelatech.com/downloads/$(2) + FILE:=$(call CT_FIRMWARE_FILE_FULL_HTT,$(1)) + URL_FILE:=$($(1)_FIRMWARE_FILE_CT_FULL_HTT) +endef + +define Download/ct-firmware-htt + URL:=https://www.candelatech.com/downloads/$(2) + FILE:=$(call CT_FIRMWARE_FILE_HTT,$(1)) + URL_FILE:=$($(1)_FIRMWARE_FILE_CT_HTT) +endef + +QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-22.bin.lede.018 +define Download/ath10k-firmware-qca988x-ct + $(call Download/ct-firmware,QCA988X,) + HASH:=8b4c99253aa309d35f2e060c190091b8db1b84dbda06a6a15c83ac0f9a938126 +endef +$(eval $(call Download,ath10k-firmware-qca988x-ct)) + +QCA988X_FIRMWARE_FILE_CT_FULL_HTT:=firmware-2-ct-full-htt-mgt-community-22.bin.lede.018 +define Download/ath10k-firmware-qca988x-ct-full-htt + $(call Download/ct-firmware-full-htt,QCA988X,) + HASH:=a7168916d6aa5e4d7858f8b620c0c980c76d03f390929db6f4077685ce2051e7 +endef +$(eval $(call Download,ath10k-firmware-qca988x-ct-full-htt)) + + +QCA9887_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-22.bin.lede.018 +define Download/ath10k-firmware-qca9887-ct + $(call Download/ct-firmware,QCA9887,ath10k-9887) + HASH:=459692deb186a63ab8eeddb7ad5d54779266e68ca686e7c46062554db6dca12b +endef +$(eval $(call Download,ath10k-firmware-qca9887-ct)) + +QCA9887_FIRMWARE_FILE_CT_FULL_HTT:=firmware-2-ct-full-htt-mgt-community-22.bin.lede.018 +define Download/ath10k-firmware-qca9887-ct-full-htt + $(call Download/ct-firmware-full-htt,QCA9887,ath10k-9887) + HASH:=fd126a457d0927d0c8ea10d66ef5b67d5e1e0741f8692bb3016bb602d0af3098 +endef +$(eval $(call Download,ath10k-firmware-qca9887-ct-full-htt)) + + +QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.018 +define Download/ath10k-firmware-qca99x0-ct + $(call Download/ct-firmware,QCA99X0,ath10k-10-4b) + HASH:=cf26eb37524de54af51fe9b2efffc85e0e70ab849e8607ef63ce5a8ecffeaa42 +endef +$(eval $(call Download,ath10k-firmware-qca99x0-ct)) + +QCA99X0_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.018 +define Download/ath10k-firmware-qca99x0-ct-full-htt + $(call Download/ct-firmware-full-htt,QCA99X0,ath10k-10-4b) + HASH:=e9737538d7379e13ad4e4c8c519a63659b5e34a35455ed9ac4399ae8097caabc +endef +$(eval $(call Download,ath10k-firmware-qca99x0-ct-full-htt)) + +QCA99X0_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community-12.bin-lede.018 +define Download/ath10k-firmware-qca99x0-ct-htt + $(call Download/ct-firmware-htt,QCA99X0,ath10k-10-4b) + HASH:=4d4f74afca487d452f244cd48304cf9710d8941eb97a6346a949ed6b6877d657 +endef +$(eval $(call Download,ath10k-firmware-qca99x0-ct-htt)) + + +QCA9984_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.018 +define Download/ath10k-firmware-qca9984-ct + $(call Download/ct-firmware,QCA9984,ath10k-9984-10-4b) + HASH:=a6b3d66efe640a430a837f238e91eddcd423eed6b887d3ae19716d87a71fd0b1 +endef +$(eval $(call Download,ath10k-firmware-qca9984-ct)) + +QCA9984_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.018 +define Download/ath10k-firmware-qca9984-ct-full-htt + $(call Download/ct-firmware-full-htt,QCA9984,ath10k-9984-10-4b) + HASH:=96060227e372b3b210badccbe6b0bd75d9a35335a7a0f2966964e9e89f66b00f +endef +$(eval $(call Download,ath10k-firmware-qca9984-ct-full-htt)) + +QCA9984_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community-12.bin-lede.018 +define Download/ath10k-firmware-qca9984-ct-htt + $(call Download/ct-firmware-htt,QCA9984,ath10k-9984-10-4b) + HASH:=ee593fb5724d75c372de02ac7894e1630ee9f909fcb2e2bbf17aadef67cb9d43 +endef +$(eval $(call Download,ath10k-firmware-qca9984-ct-htt)) + + +QCA4019_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.018 +define Download/ath10k-firmware-qca4019-ct + $(call Download/ct-firmware,QCA4019,ath10k-4019-10-4b) + HASH:=46d8f8f1e780813299dc8780eedcfceda103c6b4d8908589ad1adbef921714c0 +endef +$(eval $(call Download,ath10k-firmware-qca4019-ct)) + +QCA4019_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.018 +define Download/ath10k-firmware-qca4019-ct-full-htt + $(call Download/ct-firmware-full-htt,QCA4019,ath10k-4019-10-4b) + HASH:=d884624fc34f4b5de7a3ec0534627c46cea25fca45657f3a2f6bb85f6c5893d7 +endef +$(eval $(call Download,ath10k-firmware-qca4019-ct-full-htt)) + +QCA4019_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community-12.bin-lede.018 +define Download/ath10k-firmware-qca4019-ct-htt + $(call Download/ct-firmware-htt,QCA4019,ath10k-4019-10-4b) + HASH:=51fe06f66365771647d16039cca8b541de3d642c45271977a4cfd433c2c5d45b +endef +$(eval $(call Download,ath10k-firmware-qca4019-ct-htt)) + + +QCA9888_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.018 +define Download/ath10k-firmware-qca9888-ct + $(call Download/ct-firmware,QCA9888,ath10k-9888-10-4b) + HASH:=d01f1429aaf0bfac07eee3547e5821d19136840b2f983e75e76979a5ac19b6f0 +endef +$(eval $(call Download,ath10k-firmware-qca9888-ct)) + +QCA9888_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.018 +define Download/ath10k-firmware-qca9888-ct-full-htt + $(call Download/ct-firmware-full-htt,QCA9888,ath10k-9888-10-4b) + HASH:=68c42f8e0dcf77f18d4813ac93174bf06ff5cf5aa4f69befe7f35f9fae1de1e3 +endef +$(eval $(call Download,ath10k-firmware-qca9888-ct-full-htt)) + +QCA9888_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community-12.bin-lede.018 +define Download/ath10k-firmware-qca9888-ct-htt + $(call Download/ct-firmware-htt,QCA9888,ath10k-9888-10-4b) + HASH:=6c692141155f5bb74c0117553d5d48ff2aaba73bd4d5e90a5044a5e2ec0faab0 +endef +$(eval $(call Download,ath10k-firmware-qca9888-ct-htt)) + + +define Package/ath10k-ct-firmware-default + SECTION:=firmware + CATEGORY:=Firmware + URL:=https://www.candelatech.com/ath10k.php + DEPENDS:= +endef + +define Package/ath10k-firmware-qca988x-ct +$(Package/ath10k-ct-firmware-default) + TITLE:=ath10k CT 10.1 firmware for QCA988x devices + SECTION:=firmware + CATEGORY:=Firmware + PROVIDES:=ath10k-firmware-qca988x +endef +define Package/ath10k-firmware-qca988x-ct-full-htt +$(Package/ath10k-ct-firmware-default) + TITLE:=ath10k CT 10.1 full-htt-mgt fw for QCA988x + SECTION:=firmware + CATEGORY:=Firmware + PROVIDES:=ath10k-firmware-qca988x + DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct +endef + +define Package/ath10k-firmware-qca9887-ct +$(Package/ath10k-ct-firmware-default) + TITLE:=ath10k CT 10.1 firmware for QCA9887 devices + SECTION:=firmware + CATEGORY:=Firmware + PROVIDES:=ath10k-firmware-qca9887 +endef +define Package/ath10k-firmware-qca9887-ct-full-htt +$(Package/ath10k-ct-firmware-default) + TITLE:=ath10k CT 10.1 full-htt-mgt fw for QCA9887 + SECTION:=firmware + CATEGORY:=Firmware + PROVIDES:=ath10k-firmware-qca9887 + DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct +endef + +define Package/ath10k-firmware-qca99x0-ct +$(Package/ath10k-ct-firmware-default) + TITLE:=ath10k CT 10.4 firmware for QCA99x0 devices + SECTION:=firmware + CATEGORY:=Firmware + PROVIDES:=ath10k-firmware-qca99x0 +endef +define Package/ath10k-firmware-qca99x0-ct-full-htt +$(Package/ath10k-ct-firmware-default) + TITLE:=ath10k CT 10.4 full-htt-mgt fw for QCA99x0 + SECTION:=firmware + CATEGORY:=Firmware + PROVIDES:=ath10k-firmware-qca99x0 + DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct +endef +define Package/ath10k-firmware-qca99x0-ct-htt +$(Package/ath10k-firmware-default) + TITLE:=ath10k CT 10.4 htt-mgt fw for QCA99x0 + SECTION:=firmware + CATEGORY:=Firmware + PROVIDES:=ath10k-firmware-qca99x0 + DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct +endef + +define Package/ath10k-firmware-qca9984-ct +$(Package/ath10k-ct-firmware-default) + TITLE:=ath10k CT 10.4 firmware for QCA9984 devices + SECTION:=firmware + CATEGORY:=Firmware + PROVIDES:=ath10k-firmware-qca9984 +endef +define Package/ath10k-firmware-qca9984-ct-full-htt +$(Package/ath10k-ct-firmware-default) + TITLE:=ath10k CT 10.4 full-htt-mgt fw for QCA9984 + SECTION:=firmware + CATEGORY:=Firmware + PROVIDES:=ath10k-firmware-qca9984 + DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct +endef +define Package/ath10k-firmware-qca9984-ct-htt +$(Package/ath10k-firmware-default) + TITLE:=ath10k CT 10.4 htt-mgt fw for QCA9984 + SECTION:=firmware + CATEGORY:=Firmware + PROVIDES:=ath10k-firmware-qca9984 + DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct +endef + +define Package/ath10k-firmware-qca4019-ct +$(Package/ath10k-ct-firmware-default) + TITLE:=ath10k CT 10.4 firmware for QCA4018/9 + SECTION:=firmware + CATEGORY:=Firmware + PROVIDES:=ath10k-firmware-qca4019 +endef +define Package/ath10k-firmware-qca4019-ct-full-htt +$(Package/ath10k-ct-firmware-default) + TITLE:=ath10k CT 10.4 full-htt-mgt for QCA4018/9 + SECTION:=firmware + CATEGORY:=Firmware + PROVIDES:=ath10k-firmware-qca4019 + DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct +endef +define Package/ath10k-firmware-qca4019-ct-htt +$(Package/ath10k-firmware-default) + TITLE:=ath10k CT 10.4 htt-mgt for QCA4018/9 + SECTION:=firmware + CATEGORY:=Firmware + PROVIDES:=ath10k-firmware-qca4019 + DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct +endef + +define Package/ath10k-firmware-qca9888-ct +$(Package/ath10k-ct-firmware-default) + TITLE:=ath10k CT 10.4 fw for QCA9886/8 devices + SECTION:=firmware + CATEGORY:=Firmware + PROVIDES:=ath10k-firmware-qca9888 +endef +define Package/ath10k-firmware-qca9888-ct-full-htt +$(Package/ath10k-ct-firmware-default) + TITLE:=ath10k CT 10.4 full-htt-mgt fw for QCA9886/8 + SECTION:=firmware + CATEGORY:=Firmware + PROVIDES:=ath10k-firmware-qca9888 + DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct +endef +define Package/ath10k-firmware-qca9888-ct-htt +$(Package/ath10k-firmware-default) + TITLE:=ath10k CT 10.4 htt-mgt fw for QCA9886/8 + SECTION:=firmware + CATEGORY:=Firmware + PROVIDES:=ath10k-firmware-qca9888 + DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct +endef + + +define Package/ath10k-firmware-qca9887-ct/description +Alternative ath10k firmware for QCA9887 from Candela Technologies. +Enables IBSS and other features. See: +http://www.candelatech.com/ath10k-10.1.php +This firmware conflicts with the standard 9887 firmware, so select only +one. +endef +define Package/ath10k-firmware-qca9887-ct-full-htt/description +Alternative ath10k firmware for QCA9887 from Candela Technologies. +Uses normal HTT TX data path for management frames, which improves +stability in busy networks and fixes .11r authentication. +Enables IBSS and other features. See: +http://www.candelatech.com/ath10k-10.1.php +This firmware selects and requires the ath10k-ct driver. +endef + +define Package/ath10k-firmware-qca988x-ct/description +Alternative ath10k firmware for QCA988X from Candela Technologies. +Enables IBSS and other features. See: +http://www.candelatech.com/ath10k-10.1.php +This firmware will NOT be used unless the standard ath10k-firmware-qca988x +is un-selected since the driver will try to load firmware-5.bin before +firmware-2.bin +endef +define Package/ath10k-firmware-qca988x-ct-full-htt/description +Alternative ath10k firmware for QCA988X from Candela Technologies. +Uses normal HTT TX data path for management frames, which improves +stability in busy networks and fixes .11r authentication. +Enables IBSS and other features. See: +http://www.candelatech.com/ath10k-10.1.php +This firmware selects and requires the ath10k-ct driver. +endef + +define Package/ath10k-firmware-qca99x0-ct/description +Alternative ath10k firmware for QCA99x0 from Candela Technologies. +Enables IBSS and other features. See: +http://www.candelatech.com/ath10k-10.4.php +This firmware conflicts with the standard 99x0 firmware, so select only +one. +endef +define Package/ath10k-firmware-qca99x0-ct-full-htt/description +Alternative ath10k firmware for QCA99x0 from Candela Technologies. +Uses normal HTT TX data path for management frames, which improves +stability in busy networks and may be required for .11r authentication. +Enables IBSS and other features. See: +http://www.candelatech.com/ath10k-10.4.php +This firmware selects and requires the ath10k-ct driver. +endef +define Package/ath10k-firmware-qca99x0-ct-htt/description +Alternative ath10k firmware for QCA99x0 from Candela Technologies. +Uses normal HTT TX data path for management frames, which improves +stability in busy networks and may be required for .11r authentication. +This firmware lacks a lot of features that ath10k does not use, saving +a lot of resources. +Enables IBSS and other features. See: +http://www.candelatech.com/ath10k-10.4.php +This firmware selects and requires the ath10k-ct driver. +endef + +define Package/ath10k-firmware-qca9984-ct/description +Alternative ath10k firmware for QCA9984 from Candela Technologies. +Enables IBSS and other features. See: +http://www.candelatech.com/ath10k-10.4.php +This firmware conflicts with the standard 9984 firmware, so select only +one. +endef +define Package/ath10k-firmware-qca9984-ct-full-htt/description +Alternative ath10k firmware for QCA9984 from Candela Technologies. +Uses normal HTT TX data path for management frames, which improves +stability in busy networks and may be required for .11r authentication. +Enables IBSS and other features. See: +http://www.candelatech.com/ath10k-10.4.php +This firmware selects and requires the ath10k-ct driver. +endef +define Package/ath10k-firmware-qca9984-ct-htt/description +Alternative ath10k firmware for QCA9984 from Candela Technologies. +Uses normal HTT TX data path for management frames, which improves +stability in busy networks and may be required for .11r authentication. +This firmware lacks a lot of features that ath10k does not use, saving +a lot of resources. +Enables IBSS and other features. See: +http://www.candelatech.com/ath10k-10.4.php +This firmware selects and requires the ath10k-ct driver. +endef + +define Package/ath10k-firmware-qca4019-ct/description +Alternative ath10k firmware for IPQ4019 radio from Candela Technologies. +Enables IBSS and other features. Works with standard or ath10k-ct driver. +See: http://www.candelatech.com/ath10k-10.4.php +endef +define Package/ath10k-firmware-qca4019-ct-full-htt/description +Alternative ath10k firmware for IPQ4019 radio from Candela Technologies. +Uses normal HTT TX data path for management frames, which improves +stability in busy networks and may be required for .11r authentication. +Enables IBSS and other features. +See: http://www.candelatech.com/ath10k-10.4.php +This firmware selects and requires the ath10k-ct driver. +endef +define Package/ath10k-firmware-qca4019-ct-htt/description +Alternative ath10k firmware for IPQ4019 radio from Candela Technologies. +Uses normal HTT TX data path for management frames, which improves +stability in busy networks and may be required for .11r authentication. +This firmware lacks a lot of features that ath10k does not use, saving +a lot of resources. +Enables IBSS and other features. +See: http://www.candelatech.com/ath10k-10.4.php +This firmware selects and requires the ath10k-ct driver. +endef + +define Package/ath10k-firmware-qca9888-ct/description +Alternative ath10k firmware for QCA9886 and QCA9888 from Candela Technologies. +Enables IBSS and other features. See: +http://www.candelatech.com/ath10k-10.4.php +This firmware conflicts with the standard 9886 and 9888 firmware, so select only +one. +endef +define Package/ath10k-firmware-qca9888-ct-full-htt/description +Alternative ath10k firmware for QCA9886 and QCA9888 from Candela Technologies. +Uses normal HTT TX data path for management frames, which improves +stability in busy networks and may be required for .11r authentication. +Enables IBSS and other features. See: +http://www.candelatech.com/ath10k-10.4.php +This firmware selects and requires the ath10k-ct driver. +endef +define Package/ath10k-firmware-qca9888-ct-htt/description +Alternative ath10k firmware for QCA9886 and QCA9888 from Candela Technologies. +Uses normal HTT TX data path for management frames, which improves +stability in busy networks and may be required for .11r authentication. +This firmware lacks a lot of features that ath10k does not use, saving +a lot of resources. +Enables IBSS and other features. See: +http://www.candelatech.com/ath10k-10.4.php +This firmware selects and requires the ath10k-ct driver. +endef + + +define Build/Compile + +endef + + +define Package/ath10k-firmware-qca9887-ct/install + $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0 + $(INSTALL_DATA) \ + $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9887) \ + $(1)/lib/firmware/ath10k/QCA9887/hw1.0/firmware-2.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA9887_BOARD_FILE) \ + $(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin +endef +define Package/ath10k-firmware-qca9887-ct-full-htt/install + $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0 + $(INSTALL_DATA) \ + $(DL_DIR)/$(call CT_FIRMWARE_FILE_FULL_HTT,QCA9887) \ + $(1)/lib/firmware/ath10k/QCA9887/hw1.0/ct-firmware-2.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA9887_BOARD_FILE) \ + $(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin +endef + +define Package/ath10k-firmware-qca988x-ct/install + $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0 + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA988X_BOARD_FILE) \ + $(1)/lib/firmware/ath10k/QCA988X/hw2.0/board.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA988X) \ + $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin +endef +define Package/ath10k-firmware-qca988x-ct-full-htt/install + $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0 + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA988X_BOARD_FILE) \ + $(1)/lib/firmware/ath10k/QCA988X/hw2.0/board.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(call CT_FIRMWARE_FILE_FULL_HTT,QCA988X) \ + $(1)/lib/firmware/ath10k/QCA988X/hw2.0/ct-firmware-2.bin +endef + +define Package/ath10k-firmware-qca99x0-ct/install + $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0 + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA99X0_BOARD2_FILE) \ + $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA99X0_BOARD_FILE) \ + $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA99X0) \ + $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin +endef +define Package/ath10k-firmware-qca99x0-ct-full-htt/install + $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0 + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA99X0_BOARD2_FILE) \ + $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA99X0_BOARD_FILE) \ + $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(call CT_FIRMWARE_FILE_FULL_HTT,QCA99X0) \ + $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/ct-firmware-5.bin +endef +define Package/ath10k-firmware-qca99x0-ct-htt/install + $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0 + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA99X0_BOARD2_FILE) \ + $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA99X0_BOARD_FILE) \ + $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA99X0) \ + $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/ct-firmware-5.bin +endef + +define Package/ath10k-firmware-qca9984-ct/install + $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0 + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA9984_BOARD2_FILE) \ + $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9984) \ + $(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin +endef +define Package/ath10k-firmware-qca9984-ct-full-htt/install + $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0 + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA9984_BOARD2_FILE) \ + $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(call CT_FIRMWARE_FILE_FULL_HTT,QCA9984) \ + $(1)/lib/firmware/ath10k/QCA9984/hw1.0/ct-firmware-5.bin +endef +define Package/ath10k-firmware-qca9984-ct-htt/install + $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0 + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA9984_BOARD2_FILE) \ + $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA9984) \ + $(1)/lib/firmware/ath10k/QCA9984/hw1.0/ct-firmware-5.bin +endef + +define Package/ath10k-firmware-qca4019-ct/install + $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0 + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA4019_BOARD2_FILE) \ + $(1)/lib/firmware/ath10k/QCA4019/hw1.0/board-2.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA4019) \ + $(1)/lib/firmware/ath10k/QCA4019/hw1.0/firmware-5.bin +endef +define Package/ath10k-firmware-qca4019-ct-full-htt/install + $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0 + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA4019_BOARD2_FILE) \ + $(1)/lib/firmware/ath10k/QCA4019/hw1.0/board-2.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(call CT_FIRMWARE_FILE_FULL_HTT,QCA4019) \ + $(1)/lib/firmware/ath10k/QCA4019/hw1.0/ct-firmware-5.bin +endef +define Package/ath10k-firmware-qca4019-ct-htt/install + $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0 + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA4019_BOARD2_FILE) \ + $(1)/lib/firmware/ath10k/QCA4019/hw1.0/board-2.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA4019) \ + $(1)/lib/firmware/ath10k/QCA4019/hw1.0/ct-firmware-5.bin +endef + +define Package/ath10k-firmware-qca9888-ct/install + $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0 + ln -s \ + ../../cal-pci-0000:01:00.0.bin \ + $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA9888_BOARD2_FILE) \ + $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9888) \ + $(1)/lib/firmware/ath10k/QCA9888/hw2.0/firmware-5.bin +endef +define Package/ath10k-firmware-qca9888-ct-full-htt/install + $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0 + ln -s \ + ../../cal-pci-0000:01:00.0.bin \ + $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA9888_BOARD2_FILE) \ + $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(call CT_FIRMWARE_FILE_FULL_HTT,QCA9888) \ + $(1)/lib/firmware/ath10k/QCA9888/hw2.0/ct-firmware-5.bin +endef +define Package/ath10k-firmware-qca9888-ct-htt/install + $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0 + ln -s \ + ../../cal-pci-0000:01:00.0.bin \ + $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(QCA9888_BOARD2_FILE) \ + $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin + $(INSTALL_DATA) \ + $(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA9888) \ + $(1)/lib/firmware/ath10k/QCA9888/hw2.0/ct-firmware-5.bin +endef + + +$(eval $(call BuildPackage,ath10k-firmware-qca9887-ct)) +$(eval $(call BuildPackage,ath10k-firmware-qca9887-ct-full-htt)) +$(eval $(call BuildPackage,ath10k-firmware-qca988x-ct)) +$(eval $(call BuildPackage,ath10k-firmware-qca988x-ct-full-htt)) +$(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct)) +$(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct-full-htt)) +$(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct-htt)) +$(eval $(call BuildPackage,ath10k-firmware-qca9984-ct)) +$(eval $(call BuildPackage,ath10k-firmware-qca9984-ct-full-htt)) +$(eval $(call BuildPackage,ath10k-firmware-qca9984-ct-htt)) +$(eval $(call BuildPackage,ath10k-firmware-qca4019-ct)) +$(eval $(call BuildPackage,ath10k-firmware-qca4019-ct-full-htt)) +$(eval $(call BuildPackage,ath10k-firmware-qca4019-ct-htt)) +$(eval $(call BuildPackage,ath10k-firmware-qca9888-ct)) +$(eval $(call BuildPackage,ath10k-firmware-qca9888-ct-full-htt)) +$(eval $(call BuildPackage,ath10k-firmware-qca9888-ct-htt)) diff --git a/package/firmware/ath10k-firmware/Makefile b/package/firmware/ath10k-firmware/Makefile index f821153643..c427f08842 100644 --- a/package/firmware/ath10k-firmware/Makefile +++ b/package/firmware/ath10k-firmware/Makefile @@ -37,11 +37,6 @@ $(Package/ath10k-firmware-default) TITLE:=ath10k firmware for QCA9888 devices endef -define Package/ath10k-firmware-qca9887-ct -$(Package/ath10k-firmware-default) - TITLE:=ath10k-CT firmware for QCA9887 devices -endef - define Package/ath10k-firmware-qca988x $(Package/ath10k-firmware-default) TITLE:=ath10k firmware for QCA988x devices @@ -49,111 +44,6 @@ $(Package/ath10k-firmware-default) CATEGORY:=Firmware endef -CT_FIRMWARE_FILE = $(1)-$($(1)_FIRMWARE_FILE_CT) -CT_FIRMWARE_FILE_HTT = $(1)-$($(1)_FIRMWARE_FILE_CT_HTT) - -define Download/ct-firmware - URL:=https://www.candelatech.com/downloads/$(2) - FILE:=$(call CT_FIRMWARE_FILE,$(1)) - URL_FILE:=$($(1)_FIRMWARE_FILE_CT) -endef - -define Download/ct-firmware-htt - URL:=https://www.candelatech.com/downloads/$(2) - FILE:=$(call CT_FIRMWARE_FILE_HTT,$(1)) - URL_FILE:=$($(1)_FIRMWARE_FILE_CT_HTT) -endef - -QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-22.bin.lede.017 -define Download/ath10k-firmware-qca988x-ct - $(call Download/ct-firmware,QCA988X,) - HASH:=2f0bf766e400a4c5726e77b128eb8c141ebaa778526fe2c7c5083f3b17659dbf -endef -$(eval $(call Download,ath10k-firmware-qca988x-ct)) - -QCA988X_FIRMWARE_FILE_CT_HTT:=firmware-2-ct-full-htt-mgt-community-22.bin.lede.017 -define Download/ath10k-firmware-qca988x-ct-htt - $(call Download/ct-firmware-htt,QCA988X,) - HASH:=5e4285d5c6eee159a25ca14c6ce26022c32380bd7bafaedfc0c5de1510119007 -endef -$(eval $(call Download,ath10k-firmware-qca988x-ct-htt)) - - -QCA9887_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-22.bin.lede.017 -define Download/ath10k-firmware-qca9887-ct - $(call Download/ct-firmware,QCA9887,ath10k-9887) - HASH:=4fa30e0e1972ca3b06225a731df0f93a1b73ac67fea5bf54bb55dea3bbc0da6a -endef -$(eval $(call Download,ath10k-firmware-qca9887-ct)) - -QCA9887_FIRMWARE_FILE_CT_HTT:=firmware-2-ct-full-htt-mgt-community-22.bin.lede.017 -define Download/ath10k-firmware-qca9887-ct-htt - $(call Download/ct-firmware-htt,QCA9887,ath10k-9887) - HASH:=dc681b6b1e45956e7c2e418ab05eee5c943d13e775209196d9bd931ff6493935 -endef -$(eval $(call Download,ath10k-firmware-qca9887-ct-htt)) - - -QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.017 -define Download/ath10k-firmware-qca99x0-ct - $(call Download/ct-firmware,QCA99X0,ath10k-10-4b) - HASH:=289ea845d4bbae6f36b3af2a13a5eaa07097f52d10f7b7306cfc9e2dd394f889 -endef -$(eval $(call Download,ath10k-firmware-qca99x0-ct)) - -QCA99X0_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.017 -define Download/ath10k-firmware-qca99x0-ct-htt - $(call Download/ct-firmware-htt,QCA99X0,ath10k-10-4b) - HASH:=adedcd3d379a910bc3a5257d75f8970e11319f4cd9c1b34440d35821602a8b9c -endef -$(eval $(call Download,ath10k-firmware-qca99x0-ct-htt)) - - -QCA9984_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.017 -define Download/ath10k-firmware-qca9984-ct - $(call Download/ct-firmware,QCA9984,ath10k-9984-10-4b) - HASH:=8175be5b3946bddc042be018ff7713e67b41b59374ef4cdd183185b59274c91a -endef -$(eval $(call Download,ath10k-firmware-qca9984-ct)) - -QCA9984_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.017 -define Download/ath10k-firmware-qca9984-ct-htt - $(call Download/ct-firmware-htt,QCA9984,ath10k-9984-10-4b) - HASH:=eb8b894cfe0d1aaa87f130bb7fd1815ef07b951c14df8a2ceaeb780df8f640e0 -endef -$(eval $(call Download,ath10k-firmware-qca9984-ct-htt)) - - -QCA4019_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.017 -define Download/ath10k-firmware-qca4019-ct - $(call Download/ct-firmware,QCA4019,ath10k-4019-10-4b) - HASH:=29e9f662c4cd287213877abfbb90fbabb5e32dd3710d3ade82aa94a0921972ae -endef -$(eval $(call Download,ath10k-firmware-qca4019-ct)) - -QCA4019_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.017 -define Download/ath10k-firmware-qca4019-ct-htt - $(call Download/ct-firmware-htt,QCA4019,ath10k-4019-10-4b) - HASH:=559c911f23856b1d3d864ce714d1bef7262bf6638e93e057ecf8d5dba48ca1e6 -endef -$(eval $(call Download,ath10k-firmware-qca4019-ct-htt)) - - -QCA9888_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.017 -define Download/ath10k-firmware-qca9888-ct - $(call Download/ct-firmware,QCA9888,ath10k-9888-10-4b) - HASH:=b295880a8b08ec2680d85daaf5f20232a0e73d9cc579bf3efd7ffae24ea340d7 -endef -$(eval $(call Download,ath10k-firmware-qca9888-ct)) - -QCA9888_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.017 -define Download/ath10k-firmware-qca9888-ct-htt - $(call Download/ct-firmware-htt,QCA9888,ath10k-9888-10-4b) - HASH:=26fe7c00df10e93373a0f9f105e85d02bb8b1cdd629183ce22a5147138336aec -endef -$(eval $(call Download,ath10k-firmware-qca9888-ct-htt)) - - define Package/ath10k-firmware-qca99x0 $(Package/ath10k-firmware-default) TITLE:=ath10k firmware for QCA99x0 devices @@ -161,204 +51,12 @@ $(Package/ath10k-firmware-default) CATEGORY:=Firmware endef -define Package/ath10k-firmware-qca988x-ct -$(Package/ath10k-firmware-default) - TITLE:=ath10k CT 10.1 firmware for QCA988x devices - SECTION:=firmware - CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca988x -endef -define Package/ath10k-firmware-qca988x-ct-htt -$(Package/ath10k-firmware-default) - TITLE:=ath10k CT 10.1 htt-mgt fw for QCA988x - SECTION:=firmware - CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca988x - DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct -endef - -define Package/ath10k-firmware-qca9887-ct -$(Package/ath10k-firmware-default) - TITLE:=ath10k CT 10.1 firmware for QCA9887 devices - SECTION:=firmware - CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca9887 -endef -define Package/ath10k-firmware-qca9887-ct-htt -$(Package/ath10k-firmware-default) - TITLE:=ath10k CT 10.1 htt-mgt fw for QCA9887 - SECTION:=firmware - CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca9887 - DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct -endef - -define Package/ath10k-firmware-qca988x-ct/description -Alternative ath10k firmware for QCA988X from Candela Technologies. -Enables IBSS and other features. See: -http://www.candelatech.com/ath10k-10.1.php -This firmware will NOT be used unless the standard ath10k-firmware-qca988x -is un-selected since the driver will try to load firmware-5.bin before -firmware-2.bin -endef -define Package/ath10k-firmware-qca988x-ct-htt/description -Alternative ath10k firmware for QCA988X from Candela Technologies. -Uses normal HTT TX data path for management frames, which improves -stability in busy networks and fixes .11r authentication. -Enables IBSS and other features. See: -http://www.candelatech.com/ath10k-10.1.php -This firmware selects and requires the ath10k-ct driver. -endef - -define Package/ath10k-firmware-qca9887-ct/description -Alternative ath10k firmware for QCA9887 from Candela Technologies. -Enables IBSS and other features. See: -http://www.candelatech.com/ath10k-10.1.php -This firmware conflicts with the standard 9887 firmware, so select only -one. -endef -define Package/ath10k-firmware-qca9887-ct-htt/description -Alternative ath10k firmware for QCA9887 from Candela Technologies. -Uses normal HTT TX data path for management frames, which improves -stability in busy networks and fixes .11r authentication. -Enables IBSS and other features. See: -http://www.candelatech.com/ath10k-10.1.php -This firmware selects and requires the ath10k-ct driver. -endef - -define Package/ath10k-firmware-qca99x0-ct/description -Alternative ath10k firmware for QCA99x0 from Candela Technologies. -Enables IBSS and other features. See: -http://www.candelatech.com/ath10k-10.4.php -This firmware conflicts with the standard 99x0 firmware, so select only -one. -endef -define Package/ath10k-firmware-qca99x0-ct-htt/description -Alternative ath10k firmware for QCA99x0 from Candela Technologies. -Uses normal HTT TX data path for management frames, which improves -stability in busy networks and may be required for .11r authentication. -Enables IBSS and other features. See: -http://www.candelatech.com/ath10k-10.4.php -This firmware selects and requires the ath10k-ct driver. -endef - -define Package/ath10k-firmware-qca9984-ct/description -Alternative ath10k firmware for QCA9984 from Candela Technologies. -Enables IBSS and other features. See: -http://www.candelatech.com/ath10k-10.4.php -This firmware conflicts with the standard 9984 firmware, so select only -one. -endef -define Package/ath10k-firmware-qca9984-ct-htt/description -Alternative ath10k firmware for QCA9984 from Candela Technologies. -Uses normal HTT TX data path for management frames, which improves -stability in busy networks and may be required for .11r authentication. -Enables IBSS and other features. See: -http://www.candelatech.com/ath10k-10.4.php -This firmware selects and requires the ath10k-ct driver. -endef - -define Package/ath10k-firmware-qca4019-ct/description -Alternative ath10k firmware for IPQ4019 radio from Candela Technologies. -Enables IBSS and other features. Works with standard or ath10k-ct driver. -See: http://www.candelatech.com/ath10k-10.4.php -endef -define Package/ath10k-firmware-qca4019-ct-htt/description -Alternative ath10k firmware for IPQ4019 radio from Candela Technologies. -Uses normal HTT TX data path for management frames, which improves -stability in busy networks and may be required for .11r authentication. -Enables IBSS and other features. -See: http://www.candelatech.com/ath10k-10.4.php -This firmware selects and requires the ath10k-ct driver. -endef - -define Package/ath10k-firmware-qca9888-ct/description -Alternative ath10k firmware for QCA9886 and QCA9888 from Candela Technologies. -Enables IBSS and other features. See: -http://www.candelatech.com/ath10k-10.4.php -This firmware conflicts with the standard 9886 and 9888 firmware, so select only -one. -endef -define Package/ath10k-firmware-qca9888-ct-htt/description -Alternative ath10k firmware for QCA9886 and QCA9888 from Candela Technologies. -Uses normal HTT TX data path for management frames, which improves -stability in busy networks and may be required for .11r authentication. -Enables IBSS and other features. See: -http://www.candelatech.com/ath10k-10.4.php -This firmware selects and requires the ath10k-ct driver. -endef - - define Package/ath10k-firmware-qca99x0/description Standard ath10k firmware for QCA99x0 from QCA This firmware conflicts with the CT 99x0 firmware, so select only one. endef -define Package/ath10k-firmware-qca99x0-ct -$(Package/ath10k-firmware-default) - TITLE:=ath10k CT 10.4 firmware for QCA99x0 devices - SECTION:=firmware - CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca99x0 -endef -define Package/ath10k-firmware-qca99x0-ct-htt -$(Package/ath10k-firmware-default) - TITLE:=ath10k CT 10.4 htt-mgt fw for QCA99x0 - SECTION:=firmware - CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca99x0 - DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct -endef - -define Package/ath10k-firmware-qca9984-ct -$(Package/ath10k-firmware-default) - TITLE:=ath10k CT 10.4 firmware for QCA9984 devices - SECTION:=firmware - CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca9984 -endef -define Package/ath10k-firmware-qca9984-ct-htt -$(Package/ath10k-firmware-default) - TITLE:=ath10k CT 10.4 htt-mgt fw for QCA9984 - SECTION:=firmware - CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca9984 - DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct -endef - -define Package/ath10k-firmware-qca4019-ct -$(Package/ath10k-firmware-default) - TITLE:=ath10k CT 10.4 firmware for QCA4018/9 - SECTION:=firmware - CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca4019 -endef -define Package/ath10k-firmware-qca4019-ct-htt -$(Package/ath10k-firmware-default) - TITLE:=ath10k CT 10.4 htt-mgt for QCA4018/9 - SECTION:=firmware - CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca4019 - DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct -endef - -define Package/ath10k-firmware-qca9888-ct -$(Package/ath10k-firmware-default) - TITLE:=ath10k CT 10.4 fw for QCA9886/8 devices - SECTION:=firmware - CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca9888 -endef -define Package/ath10k-firmware-qca9888-ct-htt -$(Package/ath10k-firmware-default) - TITLE:=ath10k CT 10.4 htt-mgt fw for QCA9886/8 - SECTION:=firmware - CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca9888 - DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct -endef - define Package/ath10k-firmware-qca9984 $(Package/ath10k-firmware-default) TITLE:=ath10k firmware for QCA9984 devices @@ -401,7 +99,7 @@ define Package/ath10k-firmware-qca4019/install $(PKG_BUILD_DIR)/QCA4019/hw1.0/board-2.bin \ $(1)/lib/firmware/ath10k/QCA4019/hw1.0/ $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/QCA4019/hw1.0/3.6/firmware-5.bin_10.4-3.6-00140 \ + $(PKG_BUILD_DIR)/QCA4019/hw1.0/3.5.3/firmware-5.bin_10.4-3.5.3-00057 \ $(1)/lib/firmware/ath10k/QCA4019/hw1.0/firmware-5.bin endef @@ -475,152 +173,10 @@ define Package/ath10k-firmware-qca9984/install $(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin endef - -# CT related firmware - -define Package/ath10k-firmware-qca9887-ct/install - $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0 - $(INSTALL_DATA) \ - $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9887) \ - $(1)/lib/firmware/ath10k/QCA9887/hw1.0/firmware-2.bin - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/QCA9887/hw1.0/board.bin \ - $(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin -endef -define Package/ath10k-firmware-qca9887-ct-htt/install - $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0 - $(INSTALL_DATA) \ - $(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA9887) \ - $(1)/lib/firmware/ath10k/QCA9887/hw1.0/ct-firmware-2.bin - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/QCA9887/hw1.0/board.bin \ - $(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin -endef - -define Package/ath10k-firmware-qca988x-ct/install - $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0 - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/QCA988X/hw2.0/board.bin \ - $(1)/lib/firmware/ath10k/QCA988X/hw2.0/ - $(INSTALL_DATA) \ - $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA988X) \ - $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin -endef -define Package/ath10k-firmware-qca988x-ct-htt/install - $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0 - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/QCA988X/hw2.0/board.bin \ - $(1)/lib/firmware/ath10k/QCA988X/hw2.0/ - $(INSTALL_DATA) \ - $(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA988X) \ - $(1)/lib/firmware/ath10k/QCA988X/hw2.0/ct-firmware-2.bin -endef - -define Package/ath10k-firmware-qca99x0-ct/install - $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0 - $(INSTALL_DATA) \ - $(DL_DIR)/$(QCA99X0_BOARD_FILE) \ - $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \ - $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin - $(INSTALL_DATA) \ - $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA99X0) \ - $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin -endef -define Package/ath10k-firmware-qca99x0-ct-htt/install - $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0 - $(INSTALL_DATA) \ - $(DL_DIR)/$(QCA99X0_BOARD_FILE) \ - $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \ - $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin - $(INSTALL_DATA) \ - $(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA99X0) \ - $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/ct-firmware-5.bin -endef - -define Package/ath10k-firmware-qca9984-ct/install - $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0 - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/QCA9984/hw1.0/board-2.bin \ - $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin - $(INSTALL_DATA) \ - $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9984) \ - $(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin -endef -define Package/ath10k-firmware-qca9984-ct-htt/install - $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0 - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/QCA9984/hw1.0/board-2.bin \ - $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin - $(INSTALL_DATA) \ - $(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA9984) \ - $(1)/lib/firmware/ath10k/QCA9984/hw1.0/ct-firmware-5.bin -endef - -define Package/ath10k-firmware-qca4019-ct/install - $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0 - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/QCA4019/hw1.0/board-2.bin \ - $(1)/lib/firmware/ath10k/QCA4019/hw1.0/ - $(INSTALL_DATA) \ - $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA4019) \ - $(1)/lib/firmware/ath10k/QCA4019/hw1.0/firmware-5.bin -endef -define Package/ath10k-firmware-qca4019-ct-htt/install - $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0 - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/QCA4019/hw1.0/board-2.bin \ - $(1)/lib/firmware/ath10k/QCA4019/hw1.0/ - $(INSTALL_DATA) \ - $(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA4019) \ - $(1)/lib/firmware/ath10k/QCA4019/hw1.0/ct-firmware-5.bin -endef - -define Package/ath10k-firmware-qca9888-ct/install - $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0 - ln -s \ - ../../cal-pci-0000:01:00.0.bin \ - $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board.bin - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/QCA9888/hw2.0/board-2.bin \ - $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin - $(INSTALL_DATA) \ - $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9888) \ - $(1)/lib/firmware/ath10k/QCA9888/hw2.0/firmware-5.bin -endef -define Package/ath10k-firmware-qca9888-ct-htt/install - $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0 - ln -s \ - ../../cal-pci-0000:01:00.0.bin \ - $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board.bin - $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/QCA9888/hw2.0/board-2.bin \ - $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin - $(INSTALL_DATA) \ - $(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA9888) \ - $(1)/lib/firmware/ath10k/QCA9888/hw2.0/ct-firmware-5.bin -endef - $(eval $(call BuildPackage,ath10k-firmware-qca9887)) #$(eval $(call BuildPackage,ath10k-firmware-qca9888)) $(eval $(call BuildPackage,ath10k-firmware-qca988x)) #$(eval $(call BuildPackage,ath10k-firmware-qca99x0)) #$(eval $(call BuildPackage,ath10k-firmware-qca6174)) #$(eval $(call BuildPackage,ath10k-firmware-qca9984)) -$(eval $(call BuildPackage,ath10k-firmware-qca4019)) - -$(eval $(call BuildPackage,ath10k-firmware-qca9887-ct)) -$(eval $(call BuildPackage,ath10k-firmware-qca9887-ct-htt)) -$(eval $(call BuildPackage,ath10k-firmware-qca988x-ct)) -$(eval $(call BuildPackage,ath10k-firmware-qca988x-ct-htt)) -$(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct)) -$(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct-htt)) -$(eval $(call BuildPackage,ath10k-firmware-qca9984-ct)) -$(eval $(call BuildPackage,ath10k-firmware-qca9984-ct-htt)) -$(eval $(call BuildPackage,ath10k-firmware-qca4019-ct)) -$(eval $(call BuildPackage,ath10k-firmware-qca4019-ct-htt)) -$(eval $(call BuildPackage,ath10k-firmware-qca9888-ct)) -$(eval $(call BuildPackage,ath10k-firmware-qca9888-ct-htt)) +#$(eval $(call BuildPackage,ath10k-firmware-qca4019)) diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile index 63052071f0..16930a13a8 100644 --- a/package/kernel/ath10k-ct/Makefile +++ b/package/kernel/ath10k-ct/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2020-03-25 -PKG_SOURCE_VERSION:=3d173a471d3e583f2885ce68190c4387424cecc5 -PKG_MIRROR_HASH:=496279322f3cd26b262d4999cb5a8c1ea022e92a7bb0d43d008bce235abb9a65 +PKG_SOURCE_DATE:=2020-04-29 +PKG_SOURCE_VERSION:=3637be6f6baf99e85a7f0b27f80a99a2f2a5f78d +PKG_MIRROR_HASH:=97cf22a4a57381c7eb7a9b8a8b1e347e9711ce51c89db971b4ab9a35af476ece # Build the 5.4 ath10k-ct driver version. Other option is "-4.19". # Probably this should match as closely as @@ -112,7 +112,7 @@ endif define Build/Compile +$(MAKE) $(CT_MAKEDEFS) $(PKG_JOBS) -C "$(LINUX_DIR)" \ $(KERNEL_MAKE_FLAGS) \ - SUBDIRS="$(PKG_BUILD_DIR)/ath10k$(CT_KVER)" \ + M="$(PKG_BUILD_DIR)/ath10k$(CT_KVER)" \ NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \ modules endef diff --git a/package/kernel/ath10k-ct/patches/161-ath10k-add-support-for-configuring-management-packet.patch b/package/kernel/ath10k-ct/patches/161-ath10k-add-support-for-configuring-management-packet.patch deleted file mode 100644 index f18afae327..0000000000 --- a/package/kernel/ath10k-ct/patches/161-ath10k-add-support-for-configuring-management-packet.patch +++ /dev/null @@ -1,89 +0,0 @@ -From: Sriram R -Date: Mon, 10 Sep 2018 11:09:40 +0530 -Subject: [PATCH] ath10k: add support for configuring management packet rate - -By default the firmware uses 1Mbps and 6Mbps rate for management packets -in 2G and 5G bands respectively. But when the user selects different -basic rates from the userspace, we need to send the management -packets at the lowest basic rate selected by the user. - -This change makes use of WMI_VDEV_PARAM_MGMT_RATE param for configuring the -management packets rate to the firmware. - -Chipsets Tested : QCA988X, QCA9887, QCA9984 -FW Tested : 10.2.4-1.0-41, 10.4-3.6.104 - -Signed-off-by: Sriram R -Signed-off-by: Kalle Valo - -Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f279294e9ee22a8f306fdc8e4181cf555e6f0f70 ---- ---- a/ath10k-4.19/mac.c -+++ b/ath10k-4.19/mac.c -@@ -157,6 +157,22 @@ u8 ath10k_mac_bitrate_to_idx(const struc - return 0; - } - -+static int ath10k_mac_get_rate_hw_value(int bitrate) -+{ -+ int i; -+ u8 hw_value_prefix = 0; -+ -+ if (ath10k_mac_bitrate_is_cck(bitrate)) -+ hw_value_prefix = WMI_RATE_PREAMBLE_CCK << 6; -+ -+ for (i = 0; i < sizeof(ath10k_rates); i++) { -+ if (ath10k_rates[i].bitrate == bitrate) -+ return hw_value_prefix | ath10k_rates[i].hw_value; -+ } -+ -+ return -EINVAL; -+} -+ - static int ath10k_mac_get_max_vht_mcs_map(u16 mcs_map, int nss) - { - switch ((mcs_map >> (2 * nss)) & 0x3) { -@@ -6413,9 +6429,10 @@ static void ath10k_bss_info_changed(stru - struct cfg80211_chan_def def; - u32 vdev_param, pdev_param, slottime, preamble; - u16 bitrate, hw_value; -- u8 rate; -- int rateidx, ret = 0; -+ u8 rate, basic_rate_idx; -+ int rateidx, ret = 0, hw_rate_code; - enum nl80211_band band; -+ const struct ieee80211_supported_band *sband; - - mutex_lock(&ar->conf_mutex); - -@@ -6621,6 +6638,30 @@ static void ath10k_bss_info_changed(stru - arvif->vdev_id, ret); - } - -+ if (changed & BSS_CHANGED_BASIC_RATES) { -+ if (WARN_ON(ath10k_mac_vif_chan(vif, &def))) { -+ mutex_unlock(&ar->conf_mutex); -+ return; -+ } -+ -+ sband = ar->hw->wiphy->bands[def.chan->band]; -+ basic_rate_idx = ffs(vif->bss_conf.basic_rates) - 1; -+ bitrate = sband->bitrates[basic_rate_idx].bitrate; -+ -+ hw_rate_code = ath10k_mac_get_rate_hw_value(bitrate); -+ if (hw_rate_code < 0) { -+ ath10k_warn(ar, "bitrate not supported %d\n", bitrate); -+ mutex_unlock(&ar->conf_mutex); -+ return; -+ } -+ -+ vdev_param = ar->wmi.vdev_param->mgmt_rate; -+ ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param, -+ hw_rate_code); -+ if (ret) -+ ath10k_warn(ar, "failed to set mgmt tx rate %d\n", ret); -+ } -+ - mutex_unlock(&ar->conf_mutex); - } - diff --git a/package/kernel/ath10k-ct/patches/162-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch b/package/kernel/ath10k-ct/patches/162-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch deleted file mode 100644 index aa473e8fea..0000000000 --- a/package/kernel/ath10k-ct/patches/162-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch +++ /dev/null @@ -1,66 +0,0 @@ -From: Sriram R -Date: Wed, 3 Oct 2018 08:43:50 +0530 -Subject: [PATCH] ath10k: fix possible out of bound access of ath10k_rates array - -While using 'ath10k_mac_get_rate_hw_value()' to obtain the hw value -from the passed bitrate, there is a chance of out of bound array access -when wrong bitrate is passed. This is fixed by comparing the bitrates -within the correct size of the ath10k_rates array. - -Fixes commit f279294e9ee2 ("ath10k: add support for configuring management -packet rate"). Also correction made to some indents used in the above commit. - -Signed-off-by: Sriram R -Signed-off-by: Kalle Valo - -Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34e141eea7dd8525dd1ef7a925459e455b4d307f ---- ---- a/ath10k-4.19/mac.c -+++ b/ath10k-4.19/mac.c -@@ -165,7 +165,7 @@ static int ath10k_mac_get_rate_hw_value( - if (ath10k_mac_bitrate_is_cck(bitrate)) - hw_value_prefix = WMI_RATE_PREAMBLE_CCK << 6; - -- for (i = 0; i < sizeof(ath10k_rates); i++) { -+ for (i = 0; i < ARRAY_SIZE(ath10k_rates); i++) { - if (ath10k_rates[i].bitrate == bitrate) - return hw_value_prefix | ath10k_rates[i].hw_value; - } -@@ -6644,22 +6644,22 @@ static void ath10k_bss_info_changed(stru - return; - } - -- sband = ar->hw->wiphy->bands[def.chan->band]; -- basic_rate_idx = ffs(vif->bss_conf.basic_rates) - 1; -- bitrate = sband->bitrates[basic_rate_idx].bitrate; -- -- hw_rate_code = ath10k_mac_get_rate_hw_value(bitrate); -- if (hw_rate_code < 0) { -- ath10k_warn(ar, "bitrate not supported %d\n", bitrate); -- mutex_unlock(&ar->conf_mutex); -- return; -- } -+ sband = ar->hw->wiphy->bands[def.chan->band]; -+ basic_rate_idx = ffs(vif->bss_conf.basic_rates) - 1; -+ bitrate = sband->bitrates[basic_rate_idx].bitrate; -+ -+ hw_rate_code = ath10k_mac_get_rate_hw_value(bitrate); -+ if (hw_rate_code < 0) { -+ ath10k_warn(ar, "bitrate not supported %d\n", bitrate); -+ mutex_unlock(&ar->conf_mutex); -+ return; -+ } - -- vdev_param = ar->wmi.vdev_param->mgmt_rate; -- ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param, -- hw_rate_code); -- if (ret) -- ath10k_warn(ar, "failed to set mgmt tx rate %d\n", ret); -+ vdev_param = ar->wmi.vdev_param->mgmt_rate; -+ ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param, -+ hw_rate_code); -+ if (ret) -+ ath10k_warn(ar, "failed to set mgmt tx rate %d\n", ret); - } - - mutex_unlock(&ar->conf_mutex); diff --git a/package/kernel/ath10k-ct/patches/163-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch b/package/kernel/ath10k-ct/patches/163-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch deleted file mode 100644 index fc866f49b5..0000000000 --- a/package/kernel/ath10k-ct/patches/163-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: Pradeep kumar Chitrapu -Date: Mon, 10 Dec 2018 20:56:11 -0800 -Subject: ath10k: fix incorrect multicast/broadcast rate setting - -Invalid rate code is sent to firmware when multicast rate value of 0 is -sent to driver indicating disabled case, causing broken mesh path. -so fix that. - -Tested on QCA9984 with firmware 10.4-3.6.1-00827 - -Fixes: cd93b83ad92 ("ath10k: support for multicast rate control") -Co-developed-by: Zhi Chen -Signed-off-by: Zhi Chen -Signed-off-by: Pradeep Kumar Chitrapu - -Origin: other, https://patchwork.kernel.org/patch/10723033/ - ---- a/ath10k-4.19/mac.c -+++ b/ath10k-4.19/mac.c -@@ -6429,8 +6429,8 @@ static void ath10k_bss_info_changed(stru - struct cfg80211_chan_def def; - u32 vdev_param, pdev_param, slottime, preamble; - u16 bitrate, hw_value; -- u8 rate, basic_rate_idx; -- int rateidx, ret = 0, hw_rate_code; -+ u8 rate, basic_rate_idx, rateidx; -+ int ret = 0, hw_rate_code, mcast_rate; - enum nl80211_band band; - const struct ieee80211_supported_band *sband; - -@@ -6603,7 +6603,11 @@ static void ath10k_bss_info_changed(stru - if (changed & BSS_CHANGED_MCAST_RATE && - !WARN_ON(ath10k_mac_vif_chan(arvif->vif, &def))) { - band = def.chan->band; -- rateidx = vif->bss_conf.mcast_rate[band] - 1; -+ mcast_rate = vif->bss_conf.mcast_rate[band]; -+ if (mcast_rate > 0) -+ rateidx = mcast_rate - 1; -+ else -+ rateidx = ffs(vif->bss_conf.basic_rates) - 1; - - if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY) - rateidx += ATH10K_MAC_FIRST_OFDM_RATE_IDX; diff --git a/package/kernel/ath10k-ct/patches/164-ath10k-commit-rates-from-mac80211.patch b/package/kernel/ath10k-ct/patches/164-ath10k-commit-rates-from-mac80211.patch index 05d65e24ea..4e88c8a19f 100644 --- a/package/kernel/ath10k-ct/patches/164-ath10k-commit-rates-from-mac80211.patch +++ b/package/kernel/ath10k-ct/patches/164-ath10k-commit-rates-from-mac80211.patch @@ -9,58 +9,6 @@ mcast_rate set for a wifi-iface. Signed-off-by: Sven Eckelmann ---- a/ath10k-4.19/mac.c -+++ b/ath10k-4.19/mac.c -@@ -6625,6 +6625,7 @@ static void ath10k_bss_info_changed(stru - "mac vdev %d mcast_rate %x\n", - arvif->vdev_id, rate); - -+ arvif->mcast_rate[band] = rate; - vdev_param = ar->wmi.vdev_param->mcast_data_rate; - ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, - vdev_param, rate); -@@ -6633,6 +6634,7 @@ static void ath10k_bss_info_changed(stru - "failed to set mcast rate on vdev %i: %d\n", - arvif->vdev_id, ret); - -+ arvif->bcast_rate[band] = rate; - vdev_param = ar->wmi.vdev_param->bcast_data_rate; - ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, - vdev_param, rate); -@@ -6659,6 +6661,7 @@ static void ath10k_bss_info_changed(stru - return; - } - -+ arvif->mgt_rate[def.chan->band] = hw_rate_code; - vdev_param = ar->wmi.vdev_param->mgmt_rate; - ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param, - hw_rate_code); ---- a/ath10k-5.2/mac.c -+++ b/ath10k-5.2/mac.c -@@ -6742,6 +6742,7 @@ static void ath10k_bss_info_changed(stru - "mac vdev %d mcast_rate %x\n", - arvif->vdev_id, rate); - -+ arvif->mcast_rate[band] = rate; - vdev_param = ar->wmi.vdev_param->mcast_data_rate; - ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, - vdev_param, rate); -@@ -6750,6 +6751,7 @@ static void ath10k_bss_info_changed(stru - "failed to set mcast rate on vdev %i: %d\n", - arvif->vdev_id, ret); - -+ arvif->bcast_rate[band] = rate; - vdev_param = ar->wmi.vdev_param->bcast_data_rate; - ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, - vdev_param, rate); -@@ -6776,6 +6778,7 @@ static void ath10k_bss_info_changed(stru - return; - } - -+ arvif->mgt_rate[def.chan->band] = hw_rate_code; - vdev_param = ar->wmi.vdev_param->mgmt_rate; - ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param, - hw_rate_code); --- a/ath10k-5.4/mac.c +++ b/ath10k-5.4/mac.c @@ -6793,6 +6793,7 @@ static void ath10k_bss_info_changed(stru diff --git a/package/kernel/ath10k-ct/patches/170-mac80211-pass-the-vif-to-cancel_remain_on_channel.patch b/package/kernel/ath10k-ct/patches/170-mac80211-pass-the-vif-to-cancel_remain_on_channel.patch deleted file mode 100644 index 180b0d5bf7..0000000000 --- a/package/kernel/ath10k-ct/patches/170-mac80211-pass-the-vif-to-cancel_remain_on_channel.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 5db4c4b9559f8cddd5f7f74e58c7b8f172120e6d Mon Sep 17 00:00:00 2001 -From: Emmanuel Grumbach -Date: Tue, 23 Jul 2019 21:00:01 +0300 -Subject: [PATCH] mac80211: pass the vif to cancel_remain_on_channel - -This low level driver can find it useful to get the vif -when a remain on channel session is cancelled. - -iwlwifi will need this soon. - -Signed-off-by: Emmanuel Grumbach -Link: https://lore.kernel.org/r/20190723180001.5828-1-emmanuel.grumbach@intel.com -Signed-off-by: Johannes Berg ---- - drivers/net/wireless/ath/ath10k/mac.c | 3 ++- - 10 files changed, 4 insertions(+), 2 deletions(-) - ---- a/ath10k-4.19/mac.c -+++ b/ath10k-4.19/mac.c -@@ -7783,7 +7783,8 @@ exit: - return ret; - } - --static int ath10k_cancel_remain_on_channel(struct ieee80211_hw *hw) -+static int ath10k_cancel_remain_on_channel(struct ieee80211_hw *hw, -+ struct ieee80211_vif *vif) - { - struct ath10k *ar = hw->priv; - ---- a/ath10k-5.2/mac.c -+++ b/ath10k-5.2/mac.c -@@ -7893,7 +7893,8 @@ exit: - return ret; - } - --static int ath10k_cancel_remain_on_channel(struct ieee80211_hw *hw) -+static int ath10k_cancel_remain_on_channel(struct ieee80211_hw *hw, -+ struct ieee80211_vif *vif) - { - struct ath10k *ar = hw->priv; - diff --git a/package/kernel/ath10k-ct/patches/201-ath10k-4.16_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch b/package/kernel/ath10k-ct/patches/201-ath10k-4.16_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch deleted file mode 100644 index 696da7b455..0000000000 --- a/package/kernel/ath10k-ct/patches/201-ath10k-4.16_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch +++ /dev/null @@ -1,1634 +0,0 @@ -From: Sebastian Gottschall - -Adds LED and GPIO Control support for 988x, 9887, 9888, 99x0, 9984 based -chipsets with on chipset connected led's using WMI Firmware API. The LED -device will get available named as "ath10k-phyX" at sysfs and can be controlled -with various triggers. adds also debugfs interface for gpio control. - -This patch is specific for OpenWRt base, as is use old backported package -with old wireless source. Support for QCA9984 is removed. -Reworked to use ath10k-ct custom source - - -Signed-off-by: Sebastian Gottschall -Reviewed-by: Steve deRosier -[kvalo: major reorg and cleanup] -Signed-off-by: Kalle Valo -Signed-off-by: Ansuel Smith ---- - -v13: - -* only compile tested! - -* fix all checkpatch warnings - -* fix commit log - -* sizeof(struct ath10k_gpiocontrol) -> sizeof(*gpio) - -* unsigned -> unsigned int - -* remove GPIOLIB code, that should be added in a separate patch - -* rename gpio.c to leds.c - -* add leds.h - -* rename some functions: - - ath10k_attach_led() -> ath10k_leds_register() - ath10k_unregister_led() -> ath10k_leds_unregister() - ath10k_reset_led_pin() -> ath10k_leds_start() - -* call ath10k_leds_unregister() before ath10k_thermal_unregister() to preserve ordering - -* call ath10k_leds_start() only from ath10k_core_start() and not from mac.c - -* rename struct ath10k_gpiocontrol as anonymous function under struct - ath10k::leds, no need for memory allocation - -* merge ath10k_add_led() to ath10k_attach_led(), which is it's only caller - -* remove #if IS_ENABLED() checks from most of places, memory savings from those were not worth it - -* Kconfig help text improvement and move it lower in the menu, also don't enable it by default - -* switch to set_brightness_blocking() so that the callback can sleep, - then no need to use ath10k_wmi_cmd_send_nowait() and can take mutex - to access ar->state - -* don't touch ath10k_wmi_pdev_get_temperature() - -* as QCA6174/QCA9377 are not (yet) supported don't add the command to WMI-TLV interface - -* remove debugfs interface, that should be added in another patch - -* cleanup includes - - - ath10k-4.16/Kconfig | 10 +++ - ath10k-4.16/Makefile | 1 + - ath10k-4.16/core.c | 22 +++++++ - ath10k-4.16/core.h | 9 ++- - ath10k-4.16/hw.h | 1 + - ath10k-4.16/leds.c | 103 ++++++++++++++++++++++++++++++ - ath10k-4.16/leds.h | 45 +++++++++++++ - ath10k-4.16/mac.c | 1 + - ath10k-4.16/wmi-ops.h | 32 ++++++++++ - ath10k-4.16/wmi-tlv.c | 2 + - ath10k-4.16/wmi.c | 54 ++++++++++++++++ - ath10k-4.16/wmi.h | 35 ++++++++++ - 12 files changed, 314 insertions(+), 1 deletion(-) - create mode 100644 ath10k-4.16/leds.c - create mode 100644 ath10k-4.16/leds.h ---- a/ath10k-4.19/Kconfig -+++ b/ath10k-4.19/Kconfig -@@ -64,6 +64,16 @@ config ATH10K_DEBUGFS - - If unsure, say Y to make it easier to debug problems. - -+config ATH10K_LEDS -+ bool "Atheros ath10k LED support" -+ depends on ATH10K -+ select MAC80211_LEDS -+ select LEDS_CLASS -+ select NEW_LEDS -+ default y -+ ---help--- -+ This option is necessary, if you want LED support for chipset connected led pins. If unsure, say N. -+ - config ATH10K_SPECTRAL - bool "Atheros ath10k spectral scan support" - depends on ATH10K_DEBUGFS ---- a/ath10k-4.19/Makefile -+++ b/ath10k-4.19/Makefile -@@ -19,6 +19,7 @@ ath10k_core-$(CONFIG_ATH10K_SPECTRAL) += - ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o - ath10k_core-$(CONFIG_ATH10K_TRACING) += trace.o - ath10k_core-$(CONFIG_THERMAL) += thermal.o -+ath10k_core-$(CONFIG_ATH10K_LEDS) += leds.o - ath10k_core-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o - ath10k_core-$(CONFIG_PM) += wow.o - ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o ---- a/ath10k-4.19/core.c -+++ b/ath10k-4.19/core.c -@@ -35,6 +35,7 @@ - #include "testmode.h" - #include "wmi-ops.h" - #include "coredump.h" -+#include "leds.h" - - /* Disable ath10k-ct DBGLOG output by default */ - unsigned int ath10k_debug_mask = ATH10K_DBG_NO_DBGLOG; -@@ -72,6 +73,7 @@ static const struct ath10k_hw_params ath - .id = QCA988X_HW_2_0_VERSION, - .dev_id = QCA988X_2_0_DEVICE_ID, - .name = "qca988x hw2.0", -+ .led_pin = 1, - .patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR, - .uart_pin = 7, - .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL, -@@ -137,6 +139,7 @@ static const struct ath10k_hw_params ath - .id = QCA9887_HW_1_0_VERSION, - .dev_id = QCA9887_1_0_DEVICE_ID, - .name = "qca9887 hw1.0", -+ .led_pin = 1, - .patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR, - .uart_pin = 7, - .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL, -@@ -301,6 +304,7 @@ static const struct ath10k_hw_params ath - .id = QCA99X0_HW_2_0_DEV_VERSION, - .dev_id = QCA99X0_2_0_DEVICE_ID, - .name = "qca99x0 hw2.0", -+ .led_pin = 17, - .patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR, - .uart_pin = 7, - .otp_exe_param = 0x00000700, -@@ -339,6 +343,7 @@ static const struct ath10k_hw_params ath - .id = QCA9984_HW_1_0_DEV_VERSION, - .dev_id = QCA9984_1_0_DEVICE_ID, - .name = "qca9984/qca9994 hw1.0", -+ .led_pin = 17, - .patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR, - .uart_pin = 7, - .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, -@@ -382,6 +387,7 @@ static const struct ath10k_hw_params ath - .id = QCA9888_HW_2_0_DEV_VERSION, - .dev_id = QCA9888_2_0_DEVICE_ID, - .name = "qca9888 hw2.0", -+ .led_pin = 17, - .patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR, - .uart_pin = 7, - .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, -@@ -3176,6 +3182,10 @@ int ath10k_core_start(struct ath10k *ar, - ath10k_wmi_check_apply_board_power_ctl_table(ar); - } - -+ status = ath10k_leds_start(ar); -+ if (status) -+ goto err_hif_stop; -+ - return 0; - - err_hif_stop: -@@ -3430,9 +3440,18 @@ static void ath10k_core_register_work(st - goto err_spectral_destroy; - } - -+ status = ath10k_leds_register(ar); -+ if (status) { -+ ath10k_err(ar, "could not register leds: %d\n", -+ status); -+ goto err_thermal_unregister; -+ } -+ - set_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags); - return; - -+err_thermal_unregister: -+ ath10k_thermal_unregister(ar); - err_spectral_destroy: - ath10k_spectral_destroy(ar); - err_debug_destroy: -@@ -3490,6 +3509,8 @@ void ath10k_core_unregister(struct ath10 - if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags)) - return; - -+ ath10k_leds_unregister(ar); -+ - ath10k_thermal_unregister(ar); - /* Stop spectral before unregistering from mac80211 to remove the - * relayfs debugfs file cleanly. Otherwise the parent debugfs tree ---- a/ath10k-4.19/core.h -+++ b/ath10k-4.19/core.h -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include - - #include "htt.h" - #include "htc.h" -@@ -1138,7 +1139,6 @@ struct ath10k { - u32 low_5ghz_chan; - u32 high_5ghz_chan; - bool ani_enabled; -- - bool p2p; - bool ct_all_pkts_htt; /* CT firmware only: native-wifi for all pkts */ - -@@ -1391,6 +1391,13 @@ struct ath10k { - } testmode; - - struct { -+ struct gpio_led wifi_led; -+ struct led_classdev cdev; -+ char label[48]; -+ u32 gpio_state_pin; -+ } leds; -+ -+ struct { - /* protected by data_lock */ - u32 fw_crash_counter; - u32 fw_warm_reset_counter; ---- a/ath10k-4.19/hw.h -+++ b/ath10k-4.19/hw.h -@@ -508,6 +508,7 @@ struct ath10k_hw_params { - const char *name; - u32 patch_load_addr; - int uart_pin; -+ int led_pin; - u32 otp_exe_param; - - /* Type of hw cycle counter wraparound logic, for more info ---- /dev/null -+++ b/ath10k-4.19/leds.c -@@ -0,0 +1,103 @@ -+/* -+ * Copyright (c) 2005-2011 Atheros Communications Inc. -+ * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. -+ * Copyright (c) 2018 Sebastian Gottschall -+ * Copyright (c) 2018, The Linux Foundation. All rights reserved. -+ * -+ * Permission to use, copy, modify, and/or distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -+ */ -+ -+#include -+ -+#include "core.h" -+#include "wmi.h" -+#include "wmi-ops.h" -+ -+#include "leds.h" -+ -+static int ath10k_leds_set_brightness_blocking(struct led_classdev *led_cdev, -+ enum led_brightness brightness) -+{ -+ struct ath10k *ar = container_of(led_cdev, struct ath10k, -+ leds.cdev); -+ struct gpio_led *led = &ar->leds.wifi_led; -+ -+ mutex_lock(&ar->conf_mutex); -+ -+ if (ar->state != ATH10K_STATE_ON) -+ goto out; -+ -+ ar->leds.gpio_state_pin = (brightness != LED_OFF) ^ led->active_low; -+ ath10k_wmi_gpio_output(ar, led->gpio, ar->leds.gpio_state_pin); -+ -+out: -+ mutex_unlock(&ar->conf_mutex); -+ -+ return 0; -+} -+ -+int ath10k_leds_start(struct ath10k *ar) -+{ -+ if (ar->hw_params.led_pin == 0) -+ /* leds not supported */ -+ return 0; -+ -+ /* under some circumstances, the gpio pin gets reconfigured -+ * to default state by the firmware, so we need to -+ * reconfigure it this behaviour has only ben seen on -+ * QCA9984 and QCA99XX devices so far -+ */ -+ ath10k_wmi_gpio_config(ar, ar->hw_params.led_pin, 0, -+ WMI_GPIO_PULL_NONE, WMI_GPIO_INTTYPE_DISABLE); -+ ath10k_wmi_gpio_output(ar, ar->hw_params.led_pin, 1); -+ -+ return 0; -+} -+ -+int ath10k_leds_register(struct ath10k *ar) -+{ -+ int ret; -+ -+ if (ar->hw_params.led_pin == 0) -+ /* leds not supported */ -+ return 0; -+ -+ snprintf(ar->leds.label, sizeof(ar->leds.label), "ath10k-%s", -+ wiphy_name(ar->hw->wiphy)); -+ ar->leds.wifi_led.active_low = 1; -+ ar->leds.wifi_led.gpio = ar->hw_params.led_pin; -+ ar->leds.wifi_led.name = ar->leds.label; -+ ar->leds.wifi_led.default_state = LEDS_GPIO_DEFSTATE_KEEP; -+ -+ ar->leds.cdev.name = ar->leds.label; -+ ar->leds.cdev.brightness_set_blocking = ath10k_leds_set_brightness_blocking; -+ -+ /* FIXME: this assignment doesn't make sense as it's NULL, remove it? */ -+ ar->leds.cdev.default_trigger = ar->leds.wifi_led.default_trigger; -+ -+ ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev); -+ if (ret) -+ return ret; -+ -+ return 0; -+} -+ -+void ath10k_leds_unregister(struct ath10k *ar) -+{ -+ if (ar->hw_params.led_pin == 0) -+ /* leds not supported */ -+ return; -+ -+ led_classdev_unregister(&ar->leds.cdev); -+} -+ ---- /dev/null -+++ b/ath10k-4.19/leds.h -@@ -0,0 +1,41 @@ -+/* -+ * Copyright (c) 2018, The Linux Foundation. All rights reserved. -+ * -+ * Permission to use, copy, modify, and/or distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -+ */ -+#ifndef _LEDS_H_ -+#define _LEDS_H_ -+ -+#include "core.h" -+ -+#ifdef CONFIG_ATH10K_LEDS -+void ath10k_leds_unregister(struct ath10k *ar); -+int ath10k_leds_start(struct ath10k *ar); -+int ath10k_leds_register(struct ath10k *ar); -+#else -+static inline void ath10k_leds_unregister(struct ath10k *ar) -+{ -+} -+ -+static inline int ath10k_leds_start(struct ath10k *ar) -+{ -+ return 0; -+} -+ -+static inline int ath10k_leds_register(struct ath10k *ar) -+{ -+ return 0; -+} -+ -+#endif -+#endif /* _LEDS_H_ */ ---- a/ath10k-4.19/mac.c -+++ b/ath10k-4.19/mac.c -@@ -34,6 +34,7 @@ - #include "wmi-tlv.h" - #include "wmi-ops.h" - #include "wow.h" -+#include "leds.h" - - /*********/ - /* Rates */ ---- a/ath10k-4.19/wmi-ops.h -+++ b/ath10k-4.19/wmi-ops.h -@@ -218,7 +218,10 @@ struct wmi_ops { - struct sk_buff *(*gen_echo)(struct ath10k *ar, u32 value); - struct sk_buff *(*gen_pdev_get_tpc_table_cmdid)(struct ath10k *ar, - u32 param); -+ struct sk_buff *(*gen_gpio_config)(struct ath10k *ar, u32 gpio_num, -+ u32 input, u32 pull_type, u32 intr_mode); - -+ struct sk_buff *(*gen_gpio_output)(struct ath10k *ar, u32 gpio_num, u32 set); - }; - - int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id); -@@ -1079,6 +1082,35 @@ ath10k_wmi_force_fw_hang(struct ath10k * - return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->force_fw_hang_cmdid); - } - -+static inline int ath10k_wmi_gpio_config(struct ath10k *ar, u32 gpio_num, -+ u32 input, u32 pull_type, u32 intr_mode) -+{ -+ struct sk_buff *skb; -+ -+ if (!ar->wmi.ops->gen_gpio_config) -+ return -EOPNOTSUPP; -+ -+ skb = ar->wmi.ops->gen_gpio_config(ar, gpio_num, input, pull_type, intr_mode); -+ if (IS_ERR(skb)) -+ return PTR_ERR(skb); -+ -+ return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->gpio_config_cmdid); -+} -+ -+static inline int ath10k_wmi_gpio_output(struct ath10k *ar, u32 gpio_num, u32 set) -+{ -+ struct sk_buff *skb; -+ -+ if (!ar->wmi.ops->gen_gpio_config) -+ return -EOPNOTSUPP; -+ -+ skb = ar->wmi.ops->gen_gpio_output(ar, gpio_num, set); -+ if (IS_ERR(skb)) -+ return PTR_ERR(skb); -+ -+ return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->gpio_output_cmdid); -+} -+ - static inline int - ath10k_wmi_dbglog_cfg(struct ath10k *ar, u64 module_enable, u32 log_level) - { ---- a/ath10k-4.19/wmi-tlv.c -+++ b/ath10k-4.19/wmi-tlv.c -@@ -3976,6 +3976,8 @@ static const struct wmi_ops wmi_tlv_ops - .gen_echo = ath10k_wmi_tlv_op_gen_echo, - .gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf, - .gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable, -+ /* .gen_gpio_config not implemented */ -+ /* .gen_gpio_output not implemented */ - }; - - static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = { ---- a/ath10k-4.19/wmi.c -+++ b/ath10k-4.19/wmi.c -@@ -8071,6 +8071,49 @@ ath10k_wmi_op_gen_peer_set_param(struct - return skb; - } - -+static struct sk_buff *ath10k_wmi_op_gen_gpio_config(struct ath10k *ar, -+ u32 gpio_num, u32 input, -+ u32 pull_type, u32 intr_mode) -+{ -+ struct wmi_gpio_config_cmd *cmd; -+ struct sk_buff *skb; -+ -+ skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd)); -+ if (!skb) -+ return ERR_PTR(-ENOMEM); -+ -+ cmd = (struct wmi_gpio_config_cmd *)skb->data; -+ cmd->pull_type = __cpu_to_le32(pull_type); -+ cmd->gpio_num = __cpu_to_le32(gpio_num); -+ cmd->input = __cpu_to_le32(input); -+ cmd->intr_mode = __cpu_to_le32(intr_mode); -+ -+ ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi gpio_config gpio_num 0x%08x input 0x%08x pull_type 0x%08x intr_mode 0x%08x\n", -+ gpio_num, input, pull_type, intr_mode); -+ -+ return skb; -+} -+ -+static struct sk_buff *ath10k_wmi_op_gen_gpio_output(struct ath10k *ar, -+ u32 gpio_num, u32 set) -+{ -+ struct wmi_gpio_output_cmd *cmd; -+ struct sk_buff *skb; -+ -+ skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd)); -+ if (!skb) -+ return ERR_PTR(-ENOMEM); -+ -+ cmd = (struct wmi_gpio_output_cmd *)skb->data; -+ cmd->gpio_num = __cpu_to_le32(gpio_num); -+ cmd->set = __cpu_to_le32(set); -+ -+ ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi gpio_output gpio_num 0x%08x set 0x%08x\n", -+ gpio_num, set); -+ -+ return skb; -+} -+ - static struct sk_buff * - ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id, - enum wmi_sta_ps_mode psmode) -@@ -9824,6 +9867,9 @@ static const struct wmi_ops wmi_ops = { - .fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill, - .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, - .gen_echo = ath10k_wmi_op_gen_echo, -+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, -+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, -+ - /* .gen_bcn_tmpl not implemented */ - /* .gen_prb_tmpl not implemented */ - /* .gen_p2p_go_bcn_ie not implemented */ -@@ -9894,6 +9940,8 @@ static const struct wmi_ops wmi_10_1_ops - .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, - .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, - .gen_echo = ath10k_wmi_op_gen_echo, -+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, -+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, - /* .gen_bcn_tmpl not implemented */ - /* .gen_prb_tmpl not implemented */ - /* .gen_p2p_go_bcn_ie not implemented */ -@@ -9972,6 +10020,8 @@ static const struct wmi_ops wmi_10_2_ops - .gen_delba_send = ath10k_wmi_op_gen_delba_send, - .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, - .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, -+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, -+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, - /* .gen_pdev_enable_adaptive_cca not implemented */ - }; - -@@ -10042,6 +10092,8 @@ static const struct wmi_ops wmi_10_2_4_o - .gen_pdev_enable_adaptive_cca = - ath10k_wmi_op_gen_pdev_enable_adaptive_cca, - .get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype, -+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, -+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, - /* .gen_bcn_tmpl not implemented */ - /* .gen_prb_tmpl not implemented */ - /* .gen_p2p_go_bcn_ie not implemented */ -@@ -10122,6 +10174,8 @@ static const struct wmi_ops wmi_10_4_ops - .gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info, - .gen_echo = ath10k_wmi_op_gen_echo, - .gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config, -+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, -+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, - }; - - int ath10k_wmi_attach(struct ath10k *ar) ---- a/ath10k-4.19/wmi.h -+++ b/ath10k-4.19/wmi.h -@@ -3084,6 +3084,41 @@ enum wmi_10_4_feature_mask { - - }; - -+/* WMI_GPIO_CONFIG_CMDID */ -+enum { -+ WMI_GPIO_PULL_NONE, -+ WMI_GPIO_PULL_UP, -+ WMI_GPIO_PULL_DOWN, -+}; -+ -+enum { -+ WMI_GPIO_INTTYPE_DISABLE, -+ WMI_GPIO_INTTYPE_RISING_EDGE, -+ WMI_GPIO_INTTYPE_FALLING_EDGE, -+ WMI_GPIO_INTTYPE_BOTH_EDGE, -+ WMI_GPIO_INTTYPE_LEVEL_LOW, -+ WMI_GPIO_INTTYPE_LEVEL_HIGH -+}; -+ -+/* WMI_GPIO_CONFIG_CMDID */ -+struct wmi_gpio_config_cmd { -+ __le32 gpio_num; /* GPIO number to be setup */ -+ __le32 input; /* 0 - Output/ 1 - Input */ -+ __le32 pull_type; /* Pull type defined above */ -+ __le32 intr_mode; /* Interrupt mode defined above (Input) */ -+} __packed; -+ -+/* WMI_GPIO_OUTPUT_CMDID */ -+struct wmi_gpio_output_cmd { -+ __le32 gpio_num; /* GPIO number to be setup */ -+ __le32 set; /* Set the GPIO pin*/ -+} __packed; -+ -+/* WMI_GPIO_INPUT_EVENTID */ -+struct wmi_gpio_input_event { -+ __le32 gpio_num; /* GPIO number which changed state */ -+} __packed; -+ - struct wmi_ext_resource_config_10_4_cmd { - /* contains enum wmi_host_platform_type */ - __le32 host_platform_config; ---- a/ath10k-5.2/Kconfig -+++ b/ath10k-5.2/Kconfig -@@ -66,6 +66,16 @@ config ATH10K_DEBUGFS - - If unsure, say Y to make it easier to debug problems. - -+config ATH10K_LEDS -+ bool "Atheros ath10k LED support" -+ depends on ATH10K -+ select MAC80211_LEDS -+ select LEDS_CLASS -+ select NEW_LEDS -+ default y -+ ---help--- -+ This option is necessary, if you want LED support for chipset connected led pins. If unsure, say N. -+ - config ATH10K_SPECTRAL - bool "Atheros ath10k spectral scan support" - depends on ATH10K_DEBUGFS ---- a/ath10k-5.2/Makefile -+++ b/ath10k-5.2/Makefile -@@ -19,6 +19,7 @@ ath10k_core-$(CONFIG_ATH10K_SPECTRAL) += - ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o - ath10k_core-$(CONFIG_ATH10K_TRACING) += trace.o - ath10k_core-$(CONFIG_THERMAL) += thermal.o -+ath10k_core-$(CONFIG_ATH10K_LEDS) += leds.o - ath10k_core-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o - ath10k_core-$(CONFIG_PM) += wow.o - ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o ---- a/ath10k-5.2/core.c -+++ b/ath10k-5.2/core.c -@@ -25,6 +25,7 @@ - #include "testmode.h" - #include "wmi-ops.h" - #include "coredump.h" -+#include "leds.h" - - /* Disable ath10k-ct DBGLOG output by default */ - unsigned int ath10k_debug_mask = ATH10K_DBG_NO_DBGLOG; -@@ -63,6 +64,7 @@ static const struct ath10k_hw_params ath - .dev_id = QCA988X_2_0_DEVICE_ID, - .bus = ATH10K_BUS_PCI, - .name = "qca988x hw2.0", -+ .led_pin = 1, - .patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR, - .uart_pin = 7, - .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL, -@@ -131,6 +133,7 @@ static const struct ath10k_hw_params ath - .dev_id = QCA9887_1_0_DEVICE_ID, - .bus = ATH10K_BUS_PCI, - .name = "qca9887 hw1.0", -+ .led_pin = 1, - .patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR, - .uart_pin = 7, - .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL, -@@ -305,6 +308,7 @@ static const struct ath10k_hw_params ath - .dev_id = QCA99X0_2_0_DEVICE_ID, - .bus = ATH10K_BUS_PCI, - .name = "qca99x0 hw2.0", -+ .led_pin = 17, - .patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR, - .uart_pin = 7, - .otp_exe_param = 0x00000700, -@@ -345,6 +349,7 @@ static const struct ath10k_hw_params ath - .dev_id = QCA9984_1_0_DEVICE_ID, - .bus = ATH10K_BUS_PCI, - .name = "qca9984/qca9994 hw1.0", -+ .led_pin = 17, - .patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR, - .uart_pin = 7, - .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, -@@ -392,6 +397,7 @@ static const struct ath10k_hw_params ath - .dev_id = QCA9888_2_0_DEVICE_ID, - .bus = ATH10K_BUS_PCI, - .name = "qca9888 hw2.0", -+ .led_pin = 17, - .patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR, - .uart_pin = 7, - .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, -@@ -3503,6 +3509,10 @@ int ath10k_core_start(struct ath10k *ar, - ath10k_wmi_check_apply_board_power_ctl_table(ar); - } - -+ status = ath10k_leds_start(ar); -+ if (status) -+ goto err_hif_stop; -+ - return 0; - - err_hif_stop: -@@ -3759,9 +3769,18 @@ static void ath10k_core_register_work(st - goto err_spectral_destroy; - } - -+ status = ath10k_leds_register(ar); -+ if (status) { -+ ath10k_err(ar, "could not register leds: %d\n", -+ status); -+ goto err_thermal_unregister; -+ } -+ - set_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags); - return; - -+err_thermal_unregister: -+ ath10k_thermal_unregister(ar); - err_spectral_destroy: - ath10k_spectral_destroy(ar); - err_debug_destroy: -@@ -3821,6 +3840,8 @@ void ath10k_core_unregister(struct ath10 - if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags)) - return; - -+ ath10k_leds_unregister(ar); -+ - ath10k_thermal_unregister(ar); - /* Stop spectral before unregistering from mac80211 to remove the - * relayfs debugfs file cleanly. Otherwise the parent debugfs tree ---- a/ath10k-5.2/core.h -+++ b/ath10k-5.2/core.h -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - - #include "htt.h" - #include "htc.h" -@@ -1449,6 +1450,13 @@ struct ath10k { - } testmode; - - struct { -+ struct gpio_led wifi_led; -+ struct led_classdev cdev; -+ char label[48]; -+ u32 gpio_state_pin; -+ } leds; -+ -+ struct { - /* protected by data_lock */ - u32 fw_crash_counter; - u32 fw_warm_reset_counter; ---- a/ath10k-5.2/hw.h -+++ b/ath10k-5.2/hw.h -@@ -515,6 +515,7 @@ struct ath10k_hw_params { - const char *name; - u32 patch_load_addr; - int uart_pin; -+ int led_pin; - u32 otp_exe_param; - - /* Type of hw cycle counter wraparound logic, for more info ---- /dev/null -+++ b/ath10k-5.2/leds.c -@@ -0,0 +1,103 @@ -+/* -+ * Copyright (c) 2005-2011 Atheros Communications Inc. -+ * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. -+ * Copyright (c) 2018 Sebastian Gottschall -+ * Copyright (c) 2018, The Linux Foundation. All rights reserved. -+ * -+ * Permission to use, copy, modify, and/or distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -+ */ -+ -+#include -+ -+#include "core.h" -+#include "wmi.h" -+#include "wmi-ops.h" -+ -+#include "leds.h" -+ -+static int ath10k_leds_set_brightness_blocking(struct led_classdev *led_cdev, -+ enum led_brightness brightness) -+{ -+ struct ath10k *ar = container_of(led_cdev, struct ath10k, -+ leds.cdev); -+ struct gpio_led *led = &ar->leds.wifi_led; -+ -+ mutex_lock(&ar->conf_mutex); -+ -+ if (ar->state != ATH10K_STATE_ON) -+ goto out; -+ -+ ar->leds.gpio_state_pin = (brightness != LED_OFF) ^ led->active_low; -+ ath10k_wmi_gpio_output(ar, led->gpio, ar->leds.gpio_state_pin); -+ -+out: -+ mutex_unlock(&ar->conf_mutex); -+ -+ return 0; -+} -+ -+int ath10k_leds_start(struct ath10k *ar) -+{ -+ if (ar->hw_params.led_pin == 0) -+ /* leds not supported */ -+ return 0; -+ -+ /* under some circumstances, the gpio pin gets reconfigured -+ * to default state by the firmware, so we need to -+ * reconfigure it this behaviour has only ben seen on -+ * QCA9984 and QCA99XX devices so far -+ */ -+ ath10k_wmi_gpio_config(ar, ar->hw_params.led_pin, 0, -+ WMI_GPIO_PULL_NONE, WMI_GPIO_INTTYPE_DISABLE); -+ ath10k_wmi_gpio_output(ar, ar->hw_params.led_pin, 1); -+ -+ return 0; -+} -+ -+int ath10k_leds_register(struct ath10k *ar) -+{ -+ int ret; -+ -+ if (ar->hw_params.led_pin == 0) -+ /* leds not supported */ -+ return 0; -+ -+ snprintf(ar->leds.label, sizeof(ar->leds.label), "ath10k-%s", -+ wiphy_name(ar->hw->wiphy)); -+ ar->leds.wifi_led.active_low = 1; -+ ar->leds.wifi_led.gpio = ar->hw_params.led_pin; -+ ar->leds.wifi_led.name = ar->leds.label; -+ ar->leds.wifi_led.default_state = LEDS_GPIO_DEFSTATE_KEEP; -+ -+ ar->leds.cdev.name = ar->leds.label; -+ ar->leds.cdev.brightness_set_blocking = ath10k_leds_set_brightness_blocking; -+ -+ /* FIXME: this assignment doesn't make sense as it's NULL, remove it? */ -+ ar->leds.cdev.default_trigger = ar->leds.wifi_led.default_trigger; -+ -+ ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev); -+ if (ret) -+ return ret; -+ -+ return 0; -+} -+ -+void ath10k_leds_unregister(struct ath10k *ar) -+{ -+ if (ar->hw_params.led_pin == 0) -+ /* leds not supported */ -+ return; -+ -+ led_classdev_unregister(&ar->leds.cdev); -+} -+ ---- /dev/null -+++ b/ath10k-5.2/leds.h -@@ -0,0 +1,41 @@ -+/* -+ * Copyright (c) 2018, The Linux Foundation. All rights reserved. -+ * -+ * Permission to use, copy, modify, and/or distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -+ */ -+#ifndef _LEDS_H_ -+#define _LEDS_H_ -+ -+#include "core.h" -+ -+#ifdef CONFIG_ATH10K_LEDS -+void ath10k_leds_unregister(struct ath10k *ar); -+int ath10k_leds_start(struct ath10k *ar); -+int ath10k_leds_register(struct ath10k *ar); -+#else -+static inline void ath10k_leds_unregister(struct ath10k *ar) -+{ -+} -+ -+static inline int ath10k_leds_start(struct ath10k *ar) -+{ -+ return 0; -+} -+ -+static inline int ath10k_leds_register(struct ath10k *ar) -+{ -+ return 0; -+} -+ -+#endif -+#endif /* _LEDS_H_ */ ---- a/ath10k-5.2/mac.c -+++ b/ath10k-5.2/mac.c -@@ -24,6 +24,7 @@ - #include "wmi-tlv.h" - #include "wmi-ops.h" - #include "wow.h" -+#include "leds.h" - - /*********/ - /* Rates */ ---- a/ath10k-5.2/wmi-ops.h -+++ b/ath10k-5.2/wmi-ops.h -@@ -218,7 +218,10 @@ struct wmi_ops { - struct sk_buff *(*gen_bb_timing) - (struct ath10k *ar, - const struct wmi_bb_timing_cfg_arg *arg); -+ struct sk_buff *(*gen_gpio_config)(struct ath10k *ar, u32 gpio_num, -+ u32 input, u32 pull_type, u32 intr_mode); - -+ struct sk_buff *(*gen_gpio_output)(struct ath10k *ar, u32 gpio_num, u32 set); - }; - - int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id); -@@ -1105,6 +1108,35 @@ ath10k_wmi_force_fw_hang(struct ath10k * - return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->force_fw_hang_cmdid); - } - -+static inline int ath10k_wmi_gpio_config(struct ath10k *ar, u32 gpio_num, -+ u32 input, u32 pull_type, u32 intr_mode) -+{ -+ struct sk_buff *skb; -+ -+ if (!ar->wmi.ops->gen_gpio_config) -+ return -EOPNOTSUPP; -+ -+ skb = ar->wmi.ops->gen_gpio_config(ar, gpio_num, input, pull_type, intr_mode); -+ if (IS_ERR(skb)) -+ return PTR_ERR(skb); -+ -+ return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->gpio_config_cmdid); -+} -+ -+static inline int ath10k_wmi_gpio_output(struct ath10k *ar, u32 gpio_num, u32 set) -+{ -+ struct sk_buff *skb; -+ -+ if (!ar->wmi.ops->gen_gpio_config) -+ return -EOPNOTSUPP; -+ -+ skb = ar->wmi.ops->gen_gpio_output(ar, gpio_num, set); -+ if (IS_ERR(skb)) -+ return PTR_ERR(skb); -+ -+ return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->gpio_output_cmdid); -+} -+ - static inline int - ath10k_wmi_dbglog_cfg(struct ath10k *ar, u64 module_enable, u32 log_level) - { ---- a/ath10k-5.2/wmi-tlv.c -+++ b/ath10k-5.2/wmi-tlv.c -@@ -4311,6 +4311,8 @@ static const struct wmi_ops wmi_tlv_ops - .gen_echo = ath10k_wmi_tlv_op_gen_echo, - .gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf, - .gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable, -+ /* .gen_gpio_config not implemented */ -+ /* .gen_gpio_output not implemented */ - }; - - static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = { ---- a/ath10k-5.2/wmi.c -+++ b/ath10k-5.2/wmi.c -@@ -8295,6 +8295,49 @@ ath10k_wmi_op_gen_peer_set_param(struct - return skb; - } - -+static struct sk_buff *ath10k_wmi_op_gen_gpio_config(struct ath10k *ar, -+ u32 gpio_num, u32 input, -+ u32 pull_type, u32 intr_mode) -+{ -+ struct wmi_gpio_config_cmd *cmd; -+ struct sk_buff *skb; -+ -+ skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd)); -+ if (!skb) -+ return ERR_PTR(-ENOMEM); -+ -+ cmd = (struct wmi_gpio_config_cmd *)skb->data; -+ cmd->pull_type = __cpu_to_le32(pull_type); -+ cmd->gpio_num = __cpu_to_le32(gpio_num); -+ cmd->input = __cpu_to_le32(input); -+ cmd->intr_mode = __cpu_to_le32(intr_mode); -+ -+ ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi gpio_config gpio_num 0x%08x input 0x%08x pull_type 0x%08x intr_mode 0x%08x\n", -+ gpio_num, input, pull_type, intr_mode); -+ -+ return skb; -+} -+ -+static struct sk_buff *ath10k_wmi_op_gen_gpio_output(struct ath10k *ar, -+ u32 gpio_num, u32 set) -+{ -+ struct wmi_gpio_output_cmd *cmd; -+ struct sk_buff *skb; -+ -+ skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd)); -+ if (!skb) -+ return ERR_PTR(-ENOMEM); -+ -+ cmd = (struct wmi_gpio_output_cmd *)skb->data; -+ cmd->gpio_num = __cpu_to_le32(gpio_num); -+ cmd->set = __cpu_to_le32(set); -+ -+ ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi gpio_output gpio_num 0x%08x set 0x%08x\n", -+ gpio_num, set); -+ -+ return skb; -+} -+ - static struct sk_buff * - ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id, - enum wmi_sta_ps_mode psmode) -@@ -10069,6 +10112,9 @@ static const struct wmi_ops wmi_ops = { - .fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill, - .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, - .gen_echo = ath10k_wmi_op_gen_echo, -+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, -+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, -+ - /* .gen_bcn_tmpl not implemented */ - /* .gen_prb_tmpl not implemented */ - /* .gen_p2p_go_bcn_ie not implemented */ -@@ -10139,6 +10185,8 @@ static const struct wmi_ops wmi_10_1_ops - .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, - .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, - .gen_echo = ath10k_wmi_op_gen_echo, -+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, -+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, - /* .gen_bcn_tmpl not implemented */ - /* .gen_prb_tmpl not implemented */ - /* .gen_p2p_go_bcn_ie not implemented */ -@@ -10218,6 +10266,8 @@ static const struct wmi_ops wmi_10_2_ops - .gen_delba_send = ath10k_wmi_op_gen_delba_send, - .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, - .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, -+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, -+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, - /* .gen_pdev_enable_adaptive_cca not implemented */ - }; - -@@ -10289,6 +10339,8 @@ static const struct wmi_ops wmi_10_2_4_o - ath10k_wmi_op_gen_pdev_enable_adaptive_cca, - .get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype, - .gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing, -+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, -+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, - /* .gen_bcn_tmpl not implemented */ - /* .gen_prb_tmpl not implemented */ - /* .gen_p2p_go_bcn_ie not implemented */ -@@ -10370,6 +10422,8 @@ static const struct wmi_ops wmi_10_4_ops - .gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info, - .gen_echo = ath10k_wmi_op_gen_echo, - .gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config, -+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, -+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, - }; - - int ath10k_wmi_attach(struct ath10k *ar) ---- a/ath10k-5.2/wmi.h -+++ b/ath10k-5.2/wmi.h -@@ -3103,6 +3103,41 @@ enum wmi_10_4_feature_mask { - - }; - -+/* WMI_GPIO_CONFIG_CMDID */ -+enum { -+ WMI_GPIO_PULL_NONE, -+ WMI_GPIO_PULL_UP, -+ WMI_GPIO_PULL_DOWN, -+}; -+ -+enum { -+ WMI_GPIO_INTTYPE_DISABLE, -+ WMI_GPIO_INTTYPE_RISING_EDGE, -+ WMI_GPIO_INTTYPE_FALLING_EDGE, -+ WMI_GPIO_INTTYPE_BOTH_EDGE, -+ WMI_GPIO_INTTYPE_LEVEL_LOW, -+ WMI_GPIO_INTTYPE_LEVEL_HIGH -+}; -+ -+/* WMI_GPIO_CONFIG_CMDID */ -+struct wmi_gpio_config_cmd { -+ __le32 gpio_num; /* GPIO number to be setup */ -+ __le32 input; /* 0 - Output/ 1 - Input */ -+ __le32 pull_type; /* Pull type defined above */ -+ __le32 intr_mode; /* Interrupt mode defined above (Input) */ -+} __packed; -+ -+/* WMI_GPIO_OUTPUT_CMDID */ -+struct wmi_gpio_output_cmd { -+ __le32 gpio_num; /* GPIO number to be setup */ -+ __le32 set; /* Set the GPIO pin*/ -+} __packed; -+ -+/* WMI_GPIO_INPUT_EVENTID */ -+struct wmi_gpio_input_event { -+ __le32 gpio_num; /* GPIO number which changed state */ -+} __packed; -+ - struct wmi_ext_resource_config_10_4_cmd { - /* contains enum wmi_host_platform_type */ - __le32 host_platform_config; ---- a/ath10k-5.4/Kconfig -+++ b/ath10k-5.4/Kconfig -@@ -66,6 +66,16 @@ config ATH10K_DEBUGFS - - If unsure, say Y to make it easier to debug problems. - -+config ATH10K_LEDS -+ bool "Atheros ath10k LED support" -+ depends on ATH10K -+ select MAC80211_LEDS -+ select LEDS_CLASS -+ select NEW_LEDS -+ default y -+ ---help--- -+ This option is necessary, if you want LED support for chipset connected led pins. If unsure, say N. -+ - config ATH10K_SPECTRAL - bool "Atheros ath10k spectral scan support" - depends on ATH10K_DEBUGFS ---- a/ath10k-5.4/Makefile -+++ b/ath10k-5.4/Makefile -@@ -19,6 +19,7 @@ ath10k_core-$(CONFIG_ATH10K_SPECTRAL) += - ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o - ath10k_core-$(CONFIG_ATH10K_TRACING) += trace.o - ath10k_core-$(CONFIG_THERMAL) += thermal.o -+ath10k_core-$(CONFIG_ATH10K_LEDS) += leds.o - ath10k_core-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o - ath10k_core-$(CONFIG_PM) += wow.o - ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o ---- a/ath10k-5.4/core.c -+++ b/ath10k-5.4/core.c -@@ -25,6 +25,7 @@ - #include "testmode.h" - #include "wmi-ops.h" - #include "coredump.h" -+#include "leds.h" - - /* Disable ath10k-ct DBGLOG output by default */ - unsigned int ath10k_debug_mask = ATH10K_DBG_NO_DBGLOG; -@@ -67,6 +68,7 @@ static const struct ath10k_hw_params ath - .dev_id = QCA988X_2_0_DEVICE_ID, - .bus = ATH10K_BUS_PCI, - .name = "qca988x hw2.0", -+ .led_pin = 1, - .patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR, - .uart_pin = 7, - .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL, -@@ -137,6 +139,7 @@ static const struct ath10k_hw_params ath - .dev_id = QCA9887_1_0_DEVICE_ID, - .bus = ATH10K_BUS_PCI, - .name = "qca9887 hw1.0", -+ .led_pin = 1, - .patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR, - .uart_pin = 7, - .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL, -@@ -344,6 +347,7 @@ static const struct ath10k_hw_params ath - .dev_id = QCA99X0_2_0_DEVICE_ID, - .bus = ATH10K_BUS_PCI, - .name = "qca99x0 hw2.0", -+ .led_pin = 17, - .patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR, - .uart_pin = 7, - .otp_exe_param = 0x00000700, -@@ -385,6 +389,7 @@ static const struct ath10k_hw_params ath - .dev_id = QCA9984_1_0_DEVICE_ID, - .bus = ATH10K_BUS_PCI, - .name = "qca9984/qca9994 hw1.0", -+ .led_pin = 17, - .patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR, - .uart_pin = 7, - .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, -@@ -433,6 +438,7 @@ static const struct ath10k_hw_params ath - .dev_id = QCA9888_2_0_DEVICE_ID, - .bus = ATH10K_BUS_PCI, - .name = "qca9888 hw2.0", -+ .led_pin = 17, - .patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR, - .uart_pin = 7, - .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, -@@ -3573,6 +3579,10 @@ int ath10k_core_start(struct ath10k *ar, - ath10k_wmi_check_apply_board_power_ctl_table(ar); - } - -+ status = ath10k_leds_start(ar); -+ if (status) -+ goto err_hif_stop; -+ - return 0; - - err_hif_stop: -@@ -3829,9 +3839,18 @@ static void ath10k_core_register_work(st - goto err_spectral_destroy; - } - -+ status = ath10k_leds_register(ar); -+ if (status) { -+ ath10k_err(ar, "could not register leds: %d\n", -+ status); -+ goto err_thermal_unregister; -+ } -+ - set_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags); - return; - -+err_thermal_unregister: -+ ath10k_thermal_unregister(ar); - err_spectral_destroy: - ath10k_spectral_destroy(ar); - err_debug_destroy: -@@ -3891,6 +3910,8 @@ void ath10k_core_unregister(struct ath10 - if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags)) - return; - -+ ath10k_leds_unregister(ar); -+ - ath10k_thermal_unregister(ar); - /* Stop spectral before unregistering from mac80211 to remove the - * relayfs debugfs file cleanly. Otherwise the parent debugfs tree ---- a/ath10k-5.4/core.h -+++ b/ath10k-5.4/core.h -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - - #include "htt.h" - #include "htc.h" -@@ -1469,6 +1470,13 @@ struct ath10k { - } testmode; - - struct { -+ struct gpio_led wifi_led; -+ struct led_classdev cdev; -+ char label[48]; -+ u32 gpio_state_pin; -+ } leds; -+ -+ struct { - /* protected by data_lock */ - u32 fw_crash_counter; - u32 fw_warm_reset_counter; ---- a/ath10k-5.4/hw.h -+++ b/ath10k-5.4/hw.h -@@ -518,6 +518,7 @@ struct ath10k_hw_params { - const char *name; - u32 patch_load_addr; - int uart_pin; -+ int led_pin; - u32 otp_exe_param; - - /* Type of hw cycle counter wraparound logic, for more info ---- /dev/null -+++ b/ath10k-5.4/leds.c -@@ -0,0 +1,103 @@ -+/* -+ * Copyright (c) 2005-2011 Atheros Communications Inc. -+ * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. -+ * Copyright (c) 2018 Sebastian Gottschall -+ * Copyright (c) 2018, The Linux Foundation. All rights reserved. -+ * -+ * Permission to use, copy, modify, and/or distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -+ */ -+ -+#include -+ -+#include "core.h" -+#include "wmi.h" -+#include "wmi-ops.h" -+ -+#include "leds.h" -+ -+static int ath10k_leds_set_brightness_blocking(struct led_classdev *led_cdev, -+ enum led_brightness brightness) -+{ -+ struct ath10k *ar = container_of(led_cdev, struct ath10k, -+ leds.cdev); -+ struct gpio_led *led = &ar->leds.wifi_led; -+ -+ mutex_lock(&ar->conf_mutex); -+ -+ if (ar->state != ATH10K_STATE_ON) -+ goto out; -+ -+ ar->leds.gpio_state_pin = (brightness != LED_OFF) ^ led->active_low; -+ ath10k_wmi_gpio_output(ar, led->gpio, ar->leds.gpio_state_pin); -+ -+out: -+ mutex_unlock(&ar->conf_mutex); -+ -+ return 0; -+} -+ -+int ath10k_leds_start(struct ath10k *ar) -+{ -+ if (ar->hw_params.led_pin == 0) -+ /* leds not supported */ -+ return 0; -+ -+ /* under some circumstances, the gpio pin gets reconfigured -+ * to default state by the firmware, so we need to -+ * reconfigure it this behaviour has only ben seen on -+ * QCA9984 and QCA99XX devices so far -+ */ -+ ath10k_wmi_gpio_config(ar, ar->hw_params.led_pin, 0, -+ WMI_GPIO_PULL_NONE, WMI_GPIO_INTTYPE_DISABLE); -+ ath10k_wmi_gpio_output(ar, ar->hw_params.led_pin, 1); -+ -+ return 0; -+} -+ -+int ath10k_leds_register(struct ath10k *ar) -+{ -+ int ret; -+ -+ if (ar->hw_params.led_pin == 0) -+ /* leds not supported */ -+ return 0; -+ -+ snprintf(ar->leds.label, sizeof(ar->leds.label), "ath10k-%s", -+ wiphy_name(ar->hw->wiphy)); -+ ar->leds.wifi_led.active_low = 1; -+ ar->leds.wifi_led.gpio = ar->hw_params.led_pin; -+ ar->leds.wifi_led.name = ar->leds.label; -+ ar->leds.wifi_led.default_state = LEDS_GPIO_DEFSTATE_KEEP; -+ -+ ar->leds.cdev.name = ar->leds.label; -+ ar->leds.cdev.brightness_set_blocking = ath10k_leds_set_brightness_blocking; -+ -+ /* FIXME: this assignment doesn't make sense as it's NULL, remove it? */ -+ ar->leds.cdev.default_trigger = ar->leds.wifi_led.default_trigger; -+ -+ ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev); -+ if (ret) -+ return ret; -+ -+ return 0; -+} -+ -+void ath10k_leds_unregister(struct ath10k *ar) -+{ -+ if (ar->hw_params.led_pin == 0) -+ /* leds not supported */ -+ return; -+ -+ led_classdev_unregister(&ar->leds.cdev); -+} -+ ---- /dev/null -+++ b/ath10k-5.4/leds.h -@@ -0,0 +1,41 @@ -+/* -+ * Copyright (c) 2018, The Linux Foundation. All rights reserved. -+ * -+ * Permission to use, copy, modify, and/or distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -+ */ -+#ifndef _LEDS_H_ -+#define _LEDS_H_ -+ -+#include "core.h" -+ -+#ifdef CONFIG_ATH10K_LEDS -+void ath10k_leds_unregister(struct ath10k *ar); -+int ath10k_leds_start(struct ath10k *ar); -+int ath10k_leds_register(struct ath10k *ar); -+#else -+static inline void ath10k_leds_unregister(struct ath10k *ar) -+{ -+} -+ -+static inline int ath10k_leds_start(struct ath10k *ar) -+{ -+ return 0; -+} -+ -+static inline int ath10k_leds_register(struct ath10k *ar) -+{ -+ return 0; -+} -+ -+#endif -+#endif /* _LEDS_H_ */ ---- a/ath10k-5.4/mac.c -+++ b/ath10k-5.4/mac.c -@@ -24,6 +24,7 @@ - #include "wmi-tlv.h" - #include "wmi-ops.h" - #include "wow.h" -+#include "leds.h" - - /*********/ - /* Rates */ ---- a/ath10k-5.4/wmi-ops.h -+++ b/ath10k-5.4/wmi-ops.h -@@ -218,7 +218,10 @@ struct wmi_ops { - struct sk_buff *(*gen_bb_timing) - (struct ath10k *ar, - const struct wmi_bb_timing_cfg_arg *arg); -+ struct sk_buff *(*gen_gpio_config)(struct ath10k *ar, u32 gpio_num, -+ u32 input, u32 pull_type, u32 intr_mode); - -+ struct sk_buff *(*gen_gpio_output)(struct ath10k *ar, u32 gpio_num, u32 set); - }; - - int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id); -@@ -1105,6 +1108,35 @@ ath10k_wmi_force_fw_hang(struct ath10k * - return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->force_fw_hang_cmdid); - } - -+static inline int ath10k_wmi_gpio_config(struct ath10k *ar, u32 gpio_num, -+ u32 input, u32 pull_type, u32 intr_mode) -+{ -+ struct sk_buff *skb; -+ -+ if (!ar->wmi.ops->gen_gpio_config) -+ return -EOPNOTSUPP; -+ -+ skb = ar->wmi.ops->gen_gpio_config(ar, gpio_num, input, pull_type, intr_mode); -+ if (IS_ERR(skb)) -+ return PTR_ERR(skb); -+ -+ return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->gpio_config_cmdid); -+} -+ -+static inline int ath10k_wmi_gpio_output(struct ath10k *ar, u32 gpio_num, u32 set) -+{ -+ struct sk_buff *skb; -+ -+ if (!ar->wmi.ops->gen_gpio_config) -+ return -EOPNOTSUPP; -+ -+ skb = ar->wmi.ops->gen_gpio_output(ar, gpio_num, set); -+ if (IS_ERR(skb)) -+ return PTR_ERR(skb); -+ -+ return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->gpio_output_cmdid); -+} -+ - static inline int - ath10k_wmi_dbglog_cfg(struct ath10k *ar, u64 module_enable, u32 log_level) - { ---- a/ath10k-5.4/wmi-tlv.c -+++ b/ath10k-5.4/wmi-tlv.c -@@ -4364,6 +4364,8 @@ static const struct wmi_ops wmi_tlv_ops - .gen_echo = ath10k_wmi_tlv_op_gen_echo, - .gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf, - .gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable, -+ /* .gen_gpio_config not implemented */ -+ /* .gen_gpio_output not implemented */ - }; - - static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = { ---- a/ath10k-5.4/wmi.c -+++ b/ath10k-5.4/wmi.c -@@ -8295,6 +8295,49 @@ ath10k_wmi_op_gen_peer_set_param(struct - return skb; - } - -+static struct sk_buff *ath10k_wmi_op_gen_gpio_config(struct ath10k *ar, -+ u32 gpio_num, u32 input, -+ u32 pull_type, u32 intr_mode) -+{ -+ struct wmi_gpio_config_cmd *cmd; -+ struct sk_buff *skb; -+ -+ skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd)); -+ if (!skb) -+ return ERR_PTR(-ENOMEM); -+ -+ cmd = (struct wmi_gpio_config_cmd *)skb->data; -+ cmd->pull_type = __cpu_to_le32(pull_type); -+ cmd->gpio_num = __cpu_to_le32(gpio_num); -+ cmd->input = __cpu_to_le32(input); -+ cmd->intr_mode = __cpu_to_le32(intr_mode); -+ -+ ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi gpio_config gpio_num 0x%08x input 0x%08x pull_type 0x%08x intr_mode 0x%08x\n", -+ gpio_num, input, pull_type, intr_mode); -+ -+ return skb; -+} -+ -+static struct sk_buff *ath10k_wmi_op_gen_gpio_output(struct ath10k *ar, -+ u32 gpio_num, u32 set) -+{ -+ struct wmi_gpio_output_cmd *cmd; -+ struct sk_buff *skb; -+ -+ skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd)); -+ if (!skb) -+ return ERR_PTR(-ENOMEM); -+ -+ cmd = (struct wmi_gpio_output_cmd *)skb->data; -+ cmd->gpio_num = __cpu_to_le32(gpio_num); -+ cmd->set = __cpu_to_le32(set); -+ -+ ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi gpio_output gpio_num 0x%08x set 0x%08x\n", -+ gpio_num, set); -+ -+ return skb; -+} -+ - static struct sk_buff * - ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id, - enum wmi_sta_ps_mode psmode) -@@ -10094,6 +10137,9 @@ static const struct wmi_ops wmi_ops = { - .fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill, - .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, - .gen_echo = ath10k_wmi_op_gen_echo, -+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, -+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, -+ - /* .gen_bcn_tmpl not implemented */ - /* .gen_prb_tmpl not implemented */ - /* .gen_p2p_go_bcn_ie not implemented */ -@@ -10164,6 +10210,8 @@ static const struct wmi_ops wmi_10_1_ops - .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, - .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, - .gen_echo = ath10k_wmi_op_gen_echo, -+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, -+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, - /* .gen_bcn_tmpl not implemented */ - /* .gen_prb_tmpl not implemented */ - /* .gen_p2p_go_bcn_ie not implemented */ -@@ -10243,6 +10291,8 @@ static const struct wmi_ops wmi_10_2_ops - .gen_delba_send = ath10k_wmi_op_gen_delba_send, - .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, - .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, -+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, -+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, - /* .gen_pdev_enable_adaptive_cca not implemented */ - }; - -@@ -10314,6 +10364,8 @@ static const struct wmi_ops wmi_10_2_4_o - ath10k_wmi_op_gen_pdev_enable_adaptive_cca, - .get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype, - .gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing, -+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, -+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, - /* .gen_bcn_tmpl not implemented */ - /* .gen_prb_tmpl not implemented */ - /* .gen_p2p_go_bcn_ie not implemented */ -@@ -10395,6 +10447,8 @@ static const struct wmi_ops wmi_10_4_ops - .gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info, - .gen_echo = ath10k_wmi_op_gen_echo, - .gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config, -+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, -+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, - }; - - int ath10k_wmi_attach(struct ath10k *ar) ---- a/ath10k-5.4/wmi.h -+++ b/ath10k-5.4/wmi.h -@@ -3110,6 +3110,41 @@ enum wmi_10_4_feature_mask { - - }; - -+/* WMI_GPIO_CONFIG_CMDID */ -+enum { -+ WMI_GPIO_PULL_NONE, -+ WMI_GPIO_PULL_UP, -+ WMI_GPIO_PULL_DOWN, -+}; -+ -+enum { -+ WMI_GPIO_INTTYPE_DISABLE, -+ WMI_GPIO_INTTYPE_RISING_EDGE, -+ WMI_GPIO_INTTYPE_FALLING_EDGE, -+ WMI_GPIO_INTTYPE_BOTH_EDGE, -+ WMI_GPIO_INTTYPE_LEVEL_LOW, -+ WMI_GPIO_INTTYPE_LEVEL_HIGH -+}; -+ -+/* WMI_GPIO_CONFIG_CMDID */ -+struct wmi_gpio_config_cmd { -+ __le32 gpio_num; /* GPIO number to be setup */ -+ __le32 input; /* 0 - Output/ 1 - Input */ -+ __le32 pull_type; /* Pull type defined above */ -+ __le32 intr_mode; /* Interrupt mode defined above (Input) */ -+} __packed; -+ -+/* WMI_GPIO_OUTPUT_CMDID */ -+struct wmi_gpio_output_cmd { -+ __le32 gpio_num; /* GPIO number to be setup */ -+ __le32 set; /* Set the GPIO pin*/ -+} __packed; -+ -+/* WMI_GPIO_INPUT_EVENTID */ -+struct wmi_gpio_input_event { -+ __le32 gpio_num; /* GPIO number which changed state */ -+} __packed; -+ - struct wmi_ext_resource_config_10_4_cmd { - /* contains enum wmi_host_platform_type */ - __le32 host_platform_config; diff --git a/package/kernel/ath10k-ct/patches/201-ath10k-add-LED-and-GPIO-controlling-support-for-various-chipsets.patch b/package/kernel/ath10k-ct/patches/201-ath10k-add-LED-and-GPIO-controlling-support-for-various-chipsets.patch new file mode 100644 index 0000000000..c20800209d --- /dev/null +++ b/package/kernel/ath10k-ct/patches/201-ath10k-add-LED-and-GPIO-controlling-support-for-various-chipsets.patch @@ -0,0 +1,598 @@ +From: Sebastian Gottschall + +Adds LED and GPIO Control support for 988x, 9887, 9888, 99x0, 9984 based +chipsets with on chipset connected led's using WMI Firmware API. The LED +device will get available named as "ath10k-phyX" at sysfs and can be controlled +with various triggers. adds also debugfs interface for gpio control. + +This patch is specific for OpenWRt base, as is use old backported package +with old wireless source. Support for QCA9984 is removed. +Reworked to use ath10k-ct custom source + + +Signed-off-by: Sebastian Gottschall +Reviewed-by: Steve deRosier +[kvalo: major reorg and cleanup] +Signed-off-by: Kalle Valo +Signed-off-by: Ansuel Smith +--- + +v13: + +* only compile tested! + +* fix all checkpatch warnings + +* fix commit log + +* sizeof(struct ath10k_gpiocontrol) -> sizeof(*gpio) + +* unsigned -> unsigned int + +* remove GPIOLIB code, that should be added in a separate patch + +* rename gpio.c to leds.c + +* add leds.h + +* rename some functions: + + ath10k_attach_led() -> ath10k_leds_register() + ath10k_unregister_led() -> ath10k_leds_unregister() + ath10k_reset_led_pin() -> ath10k_leds_start() + +* call ath10k_leds_unregister() before ath10k_thermal_unregister() to preserve ordering + +* call ath10k_leds_start() only from ath10k_core_start() and not from mac.c + +* rename struct ath10k_gpiocontrol as anonymous function under struct + ath10k::leds, no need for memory allocation + +* merge ath10k_add_led() to ath10k_attach_led(), which is it's only caller + +* remove #if IS_ENABLED() checks from most of places, memory savings from those were not worth it + +* Kconfig help text improvement and move it lower in the menu, also don't enable it by default + +* switch to set_brightness_blocking() so that the callback can sleep, + then no need to use ath10k_wmi_cmd_send_nowait() and can take mutex + to access ar->state + +* don't touch ath10k_wmi_pdev_get_temperature() + +* as QCA6174/QCA9377 are not (yet) supported don't add the command to WMI-TLV interface + +* remove debugfs interface, that should be added in another patch + +* cleanup includes + + ath10k-5.4/Kconfig | 10 +++ + ath10k-5.4/Makefile | 1 + + ath10k-5.4/core.c | 22 +++++++ + ath10k-5.4/core.h | 9 ++- + ath10k-5.4/hw.h | 1 + + ath10k-5.4/leds.c | 103 ++++++++++++++++++++++++++++++ + ath10k-5.4/leds.h | 45 +++++++++++++ + ath10k-5.4/mac.c | 1 + + ath10k-5.4/wmi-ops.h | 32 ++++++++++ + ath10k-5.4/wmi-tlv.c | 2 + + ath10k-5.4/wmi.c | 54 ++++++++++++++++ + ath10k-5.4/wmi.h | 35 ++++++++++ + 12 files changed, 314 insertions(+), 1 deletion(-) + create mode 100644 ath10k-5.4/leds.c + create mode 100644 ath10k-5.4/leds.h + +--- a/ath10k-5.4/Kconfig ++++ b/ath10k-5.4/Kconfig +@@ -66,6 +66,16 @@ config ATH10K_DEBUGFS + + If unsure, say Y to make it easier to debug problems. + ++config ATH10K_LEDS ++ bool "Atheros ath10k LED support" ++ depends on ATH10K ++ select MAC80211_LEDS ++ select LEDS_CLASS ++ select NEW_LEDS ++ default y ++ ---help--- ++ This option is necessary, if you want LED support for chipset connected led pins. If unsure, say N. ++ + config ATH10K_SPECTRAL + bool "Atheros ath10k spectral scan support" + depends on ATH10K_DEBUGFS +--- a/ath10k-5.4/Makefile ++++ b/ath10k-5.4/Makefile +@@ -19,6 +19,7 @@ ath10k_core-$(CONFIG_ATH10K_SPECTRAL) += + ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o + ath10k_core-$(CONFIG_ATH10K_TRACING) += trace.o + ath10k_core-$(CONFIG_THERMAL) += thermal.o ++ath10k_core-$(CONFIG_ATH10K_LEDS) += leds.o + ath10k_core-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o + ath10k_core-$(CONFIG_PM) += wow.o + ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o +--- a/ath10k-5.4/core.c ++++ b/ath10k-5.4/core.c +@@ -25,6 +25,7 @@ + #include "testmode.h" + #include "wmi-ops.h" + #include "coredump.h" ++#include "leds.h" + + /* Disable ath10k-ct DBGLOG output by default */ + unsigned int ath10k_debug_mask = ATH10K_DBG_NO_DBGLOG; +@@ -67,6 +68,7 @@ static const struct ath10k_hw_params ath + .dev_id = QCA988X_2_0_DEVICE_ID, + .bus = ATH10K_BUS_PCI, + .name = "qca988x hw2.0", ++ .led_pin = 1, + .patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR, + .uart_pin = 7, + .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL, +@@ -137,6 +139,7 @@ static const struct ath10k_hw_params ath + .dev_id = QCA9887_1_0_DEVICE_ID, + .bus = ATH10K_BUS_PCI, + .name = "qca9887 hw1.0", ++ .led_pin = 1, + .patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR, + .uart_pin = 7, + .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL, +@@ -344,6 +347,7 @@ static const struct ath10k_hw_params ath + .dev_id = QCA99X0_2_0_DEVICE_ID, + .bus = ATH10K_BUS_PCI, + .name = "qca99x0 hw2.0", ++ .led_pin = 17, + .patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR, + .uart_pin = 7, + .otp_exe_param = 0x00000700, +@@ -385,6 +389,7 @@ static const struct ath10k_hw_params ath + .dev_id = QCA9984_1_0_DEVICE_ID, + .bus = ATH10K_BUS_PCI, + .name = "qca9984/qca9994 hw1.0", ++ .led_pin = 17, + .patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR, + .uart_pin = 7, + .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, +@@ -433,6 +438,7 @@ static const struct ath10k_hw_params ath + .dev_id = QCA9888_2_0_DEVICE_ID, + .bus = ATH10K_BUS_PCI, + .name = "qca9888 hw2.0", ++ .led_pin = 17, + .patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR, + .uart_pin = 7, + .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, +@@ -3573,6 +3579,10 @@ int ath10k_core_start(struct ath10k *ar, + ath10k_wmi_check_apply_board_power_ctl_table(ar); + } + ++ status = ath10k_leds_start(ar); ++ if (status) ++ goto err_hif_stop; ++ + return 0; + + err_hif_stop: +@@ -3829,9 +3839,18 @@ static void ath10k_core_register_work(st + goto err_spectral_destroy; + } + ++ status = ath10k_leds_register(ar); ++ if (status) { ++ ath10k_err(ar, "could not register leds: %d\n", ++ status); ++ goto err_thermal_unregister; ++ } ++ + set_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags); + return; + ++err_thermal_unregister: ++ ath10k_thermal_unregister(ar); + err_spectral_destroy: + ath10k_spectral_destroy(ar); + err_debug_destroy: +@@ -3891,6 +3910,8 @@ void ath10k_core_unregister(struct ath10 + if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags)) + return; + ++ ath10k_leds_unregister(ar); ++ + ath10k_thermal_unregister(ar); + /* Stop spectral before unregistering from mac80211 to remove the + * relayfs debugfs file cleanly. Otherwise the parent debugfs tree +--- a/ath10k-5.4/core.h ++++ b/ath10k-5.4/core.h +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + + #include "htt.h" + #include "htc.h" +@@ -1469,6 +1470,13 @@ struct ath10k { + } testmode; + + struct { ++ struct gpio_led wifi_led; ++ struct led_classdev cdev; ++ char label[48]; ++ u32 gpio_state_pin; ++ } leds; ++ ++ struct { + /* protected by data_lock */ + u32 fw_crash_counter; + u32 fw_warm_reset_counter; +--- a/ath10k-5.4/hw.h ++++ b/ath10k-5.4/hw.h +@@ -518,6 +518,7 @@ struct ath10k_hw_params { + const char *name; + u32 patch_load_addr; + int uart_pin; ++ int led_pin; + u32 otp_exe_param; + + /* Type of hw cycle counter wraparound logic, for more info +--- /dev/null ++++ b/ath10k-5.4/leds.c +@@ -0,0 +1,103 @@ ++/* ++ * Copyright (c) 2005-2011 Atheros Communications Inc. ++ * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. ++ * Copyright (c) 2018 Sebastian Gottschall ++ * Copyright (c) 2018, The Linux Foundation. All rights reserved. ++ * ++ * Permission to use, copy, modify, and/or distribute this software for any ++ * purpose with or without fee is hereby granted, provided that the above ++ * copyright notice and this permission notice appear in all copies. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ */ ++ ++#include ++ ++#include "core.h" ++#include "wmi.h" ++#include "wmi-ops.h" ++ ++#include "leds.h" ++ ++static int ath10k_leds_set_brightness_blocking(struct led_classdev *led_cdev, ++ enum led_brightness brightness) ++{ ++ struct ath10k *ar = container_of(led_cdev, struct ath10k, ++ leds.cdev); ++ struct gpio_led *led = &ar->leds.wifi_led; ++ ++ mutex_lock(&ar->conf_mutex); ++ ++ if (ar->state != ATH10K_STATE_ON) ++ goto out; ++ ++ ar->leds.gpio_state_pin = (brightness != LED_OFF) ^ led->active_low; ++ ath10k_wmi_gpio_output(ar, led->gpio, ar->leds.gpio_state_pin); ++ ++out: ++ mutex_unlock(&ar->conf_mutex); ++ ++ return 0; ++} ++ ++int ath10k_leds_start(struct ath10k *ar) ++{ ++ if (ar->hw_params.led_pin == 0) ++ /* leds not supported */ ++ return 0; ++ ++ /* under some circumstances, the gpio pin gets reconfigured ++ * to default state by the firmware, so we need to ++ * reconfigure it this behaviour has only ben seen on ++ * QCA9984 and QCA99XX devices so far ++ */ ++ ath10k_wmi_gpio_config(ar, ar->hw_params.led_pin, 0, ++ WMI_GPIO_PULL_NONE, WMI_GPIO_INTTYPE_DISABLE); ++ ath10k_wmi_gpio_output(ar, ar->hw_params.led_pin, 1); ++ ++ return 0; ++} ++ ++int ath10k_leds_register(struct ath10k *ar) ++{ ++ int ret; ++ ++ if (ar->hw_params.led_pin == 0) ++ /* leds not supported */ ++ return 0; ++ ++ snprintf(ar->leds.label, sizeof(ar->leds.label), "ath10k-%s", ++ wiphy_name(ar->hw->wiphy)); ++ ar->leds.wifi_led.active_low = 1; ++ ar->leds.wifi_led.gpio = ar->hw_params.led_pin; ++ ar->leds.wifi_led.name = ar->leds.label; ++ ar->leds.wifi_led.default_state = LEDS_GPIO_DEFSTATE_KEEP; ++ ++ ar->leds.cdev.name = ar->leds.label; ++ ar->leds.cdev.brightness_set_blocking = ath10k_leds_set_brightness_blocking; ++ ++ /* FIXME: this assignment doesn't make sense as it's NULL, remove it? */ ++ ar->leds.cdev.default_trigger = ar->leds.wifi_led.default_trigger; ++ ++ ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++void ath10k_leds_unregister(struct ath10k *ar) ++{ ++ if (ar->hw_params.led_pin == 0) ++ /* leds not supported */ ++ return; ++ ++ led_classdev_unregister(&ar->leds.cdev); ++} ++ +--- /dev/null ++++ b/ath10k-5.4/leds.h +@@ -0,0 +1,41 @@ ++/* ++ * Copyright (c) 2018, The Linux Foundation. All rights reserved. ++ * ++ * Permission to use, copy, modify, and/or distribute this software for any ++ * purpose with or without fee is hereby granted, provided that the above ++ * copyright notice and this permission notice appear in all copies. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ */ ++#ifndef _LEDS_H_ ++#define _LEDS_H_ ++ ++#include "core.h" ++ ++#ifdef CONFIG_ATH10K_LEDS ++void ath10k_leds_unregister(struct ath10k *ar); ++int ath10k_leds_start(struct ath10k *ar); ++int ath10k_leds_register(struct ath10k *ar); ++#else ++static inline void ath10k_leds_unregister(struct ath10k *ar) ++{ ++} ++ ++static inline int ath10k_leds_start(struct ath10k *ar) ++{ ++ return 0; ++} ++ ++static inline int ath10k_leds_register(struct ath10k *ar) ++{ ++ return 0; ++} ++ ++#endif ++#endif /* _LEDS_H_ */ +--- a/ath10k-5.4/mac.c ++++ b/ath10k-5.4/mac.c +@@ -24,6 +24,7 @@ + #include "wmi-tlv.h" + #include "wmi-ops.h" + #include "wow.h" ++#include "leds.h" + + /*********/ + /* Rates */ +--- a/ath10k-5.4/wmi-ops.h ++++ b/ath10k-5.4/wmi-ops.h +@@ -218,7 +218,10 @@ struct wmi_ops { + struct sk_buff *(*gen_bb_timing) + (struct ath10k *ar, + const struct wmi_bb_timing_cfg_arg *arg); ++ struct sk_buff *(*gen_gpio_config)(struct ath10k *ar, u32 gpio_num, ++ u32 input, u32 pull_type, u32 intr_mode); + ++ struct sk_buff *(*gen_gpio_output)(struct ath10k *ar, u32 gpio_num, u32 set); + }; + + int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id); +@@ -1105,6 +1108,35 @@ ath10k_wmi_force_fw_hang(struct ath10k * + return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->force_fw_hang_cmdid); + } + ++static inline int ath10k_wmi_gpio_config(struct ath10k *ar, u32 gpio_num, ++ u32 input, u32 pull_type, u32 intr_mode) ++{ ++ struct sk_buff *skb; ++ ++ if (!ar->wmi.ops->gen_gpio_config) ++ return -EOPNOTSUPP; ++ ++ skb = ar->wmi.ops->gen_gpio_config(ar, gpio_num, input, pull_type, intr_mode); ++ if (IS_ERR(skb)) ++ return PTR_ERR(skb); ++ ++ return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->gpio_config_cmdid); ++} ++ ++static inline int ath10k_wmi_gpio_output(struct ath10k *ar, u32 gpio_num, u32 set) ++{ ++ struct sk_buff *skb; ++ ++ if (!ar->wmi.ops->gen_gpio_config) ++ return -EOPNOTSUPP; ++ ++ skb = ar->wmi.ops->gen_gpio_output(ar, gpio_num, set); ++ if (IS_ERR(skb)) ++ return PTR_ERR(skb); ++ ++ return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->gpio_output_cmdid); ++} ++ + static inline int + ath10k_wmi_dbglog_cfg(struct ath10k *ar, u64 module_enable, u32 log_level) + { +--- a/ath10k-5.4/wmi-tlv.c ++++ b/ath10k-5.4/wmi-tlv.c +@@ -4364,6 +4364,8 @@ static const struct wmi_ops wmi_tlv_ops + .gen_echo = ath10k_wmi_tlv_op_gen_echo, + .gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf, + .gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable, ++ /* .gen_gpio_config not implemented */ ++ /* .gen_gpio_output not implemented */ + }; + + static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = { +--- a/ath10k-5.4/wmi.c ++++ b/ath10k-5.4/wmi.c +@@ -8295,6 +8295,49 @@ ath10k_wmi_op_gen_peer_set_param(struct + return skb; + } + ++static struct sk_buff *ath10k_wmi_op_gen_gpio_config(struct ath10k *ar, ++ u32 gpio_num, u32 input, ++ u32 pull_type, u32 intr_mode) ++{ ++ struct wmi_gpio_config_cmd *cmd; ++ struct sk_buff *skb; ++ ++ skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd)); ++ if (!skb) ++ return ERR_PTR(-ENOMEM); ++ ++ cmd = (struct wmi_gpio_config_cmd *)skb->data; ++ cmd->pull_type = __cpu_to_le32(pull_type); ++ cmd->gpio_num = __cpu_to_le32(gpio_num); ++ cmd->input = __cpu_to_le32(input); ++ cmd->intr_mode = __cpu_to_le32(intr_mode); ++ ++ ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi gpio_config gpio_num 0x%08x input 0x%08x pull_type 0x%08x intr_mode 0x%08x\n", ++ gpio_num, input, pull_type, intr_mode); ++ ++ return skb; ++} ++ ++static struct sk_buff *ath10k_wmi_op_gen_gpio_output(struct ath10k *ar, ++ u32 gpio_num, u32 set) ++{ ++ struct wmi_gpio_output_cmd *cmd; ++ struct sk_buff *skb; ++ ++ skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd)); ++ if (!skb) ++ return ERR_PTR(-ENOMEM); ++ ++ cmd = (struct wmi_gpio_output_cmd *)skb->data; ++ cmd->gpio_num = __cpu_to_le32(gpio_num); ++ cmd->set = __cpu_to_le32(set); ++ ++ ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi gpio_output gpio_num 0x%08x set 0x%08x\n", ++ gpio_num, set); ++ ++ return skb; ++} ++ + static struct sk_buff * + ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id, + enum wmi_sta_ps_mode psmode) +@@ -10094,6 +10137,9 @@ static const struct wmi_ops wmi_ops = { + .fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill, + .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, + .gen_echo = ath10k_wmi_op_gen_echo, ++ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, ++ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, ++ + /* .gen_bcn_tmpl not implemented */ + /* .gen_prb_tmpl not implemented */ + /* .gen_p2p_go_bcn_ie not implemented */ +@@ -10164,6 +10210,8 @@ static const struct wmi_ops wmi_10_1_ops + .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, + .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, + .gen_echo = ath10k_wmi_op_gen_echo, ++ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, ++ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, + /* .gen_bcn_tmpl not implemented */ + /* .gen_prb_tmpl not implemented */ + /* .gen_p2p_go_bcn_ie not implemented */ +@@ -10243,6 +10291,8 @@ static const struct wmi_ops wmi_10_2_ops + .gen_delba_send = ath10k_wmi_op_gen_delba_send, + .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, + .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, ++ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, ++ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, + /* .gen_pdev_enable_adaptive_cca not implemented */ + }; + +@@ -10314,6 +10364,8 @@ static const struct wmi_ops wmi_10_2_4_o + ath10k_wmi_op_gen_pdev_enable_adaptive_cca, + .get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype, + .gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing, ++ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, ++ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, + /* .gen_bcn_tmpl not implemented */ + /* .gen_prb_tmpl not implemented */ + /* .gen_p2p_go_bcn_ie not implemented */ +@@ -10395,6 +10447,8 @@ static const struct wmi_ops wmi_10_4_ops + .gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info, + .gen_echo = ath10k_wmi_op_gen_echo, + .gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config, ++ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config, ++ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output, + }; + + int ath10k_wmi_attach(struct ath10k *ar) +--- a/ath10k-5.4/wmi.h ++++ b/ath10k-5.4/wmi.h +@@ -3110,6 +3110,41 @@ enum wmi_10_4_feature_mask { + + }; + ++/* WMI_GPIO_CONFIG_CMDID */ ++enum { ++ WMI_GPIO_PULL_NONE, ++ WMI_GPIO_PULL_UP, ++ WMI_GPIO_PULL_DOWN, ++}; ++ ++enum { ++ WMI_GPIO_INTTYPE_DISABLE, ++ WMI_GPIO_INTTYPE_RISING_EDGE, ++ WMI_GPIO_INTTYPE_FALLING_EDGE, ++ WMI_GPIO_INTTYPE_BOTH_EDGE, ++ WMI_GPIO_INTTYPE_LEVEL_LOW, ++ WMI_GPIO_INTTYPE_LEVEL_HIGH ++}; ++ ++/* WMI_GPIO_CONFIG_CMDID */ ++struct wmi_gpio_config_cmd { ++ __le32 gpio_num; /* GPIO number to be setup */ ++ __le32 input; /* 0 - Output/ 1 - Input */ ++ __le32 pull_type; /* Pull type defined above */ ++ __le32 intr_mode; /* Interrupt mode defined above (Input) */ ++} __packed; ++ ++/* WMI_GPIO_OUTPUT_CMDID */ ++struct wmi_gpio_output_cmd { ++ __le32 gpio_num; /* GPIO number to be setup */ ++ __le32 set; /* Set the GPIO pin*/ ++} __packed; ++ ++/* WMI_GPIO_INPUT_EVENTID */ ++struct wmi_gpio_input_event { ++ __le32 gpio_num; /* GPIO number which changed state */ ++} __packed; ++ + struct wmi_ext_resource_config_10_4_cmd { + /* contains enum wmi_host_platform_type */ + __le32 host_platform_config; diff --git a/package/kernel/ath10k-ct/patches/202-ath10k-4.16-use-tpt-trigger-by-default.patch b/package/kernel/ath10k-ct/patches/202-ath10k-4.16-use-tpt-trigger-by-default.patch deleted file mode 100644 index c23c31417b..0000000000 --- a/package/kernel/ath10k-ct/patches/202-ath10k-4.16-use-tpt-trigger-by-default.patch +++ /dev/null @@ -1,127 +0,0 @@ -From 79c9d7aabae1d1da9eea97d83b61e1517a8a2221 Mon Sep 17 00:00:00 2001 -From: Mathias Kresin -Date: Fri, 22 Jun 2018 18:59:44 +0200 -Subject: [PATCH] ath10k: use tpt LED trigger by default - -Use the tpt LED trigger for each created phy led. Ths way LEDs attached -to the ath10k GPIO pins are indicating the phy status and blink on -traffic. - -Signed-off-by: Mathias Kresin ---- - ath10k-4.16/core.h | 4 ++++ - ath10k-4.16/leds.c | 4 +--- - ath10k-4.16/mac.c | 2 +- - 3 files changed, 6 insertions(+), 4 deletions(-) - ---- a/ath10k-4.19/core.h -+++ b/ath10k-4.19/core.h -@@ -1491,6 +1491,10 @@ struct ath10k { - u8 csi_data[4096]; - u16 csi_data_len; - -+#ifdef CPTCFG_MAC80211_LEDS -+ const char *led_default_trigger; -+#endif -+ - /* must be last */ - u8 drv_priv[0] __aligned(sizeof(void *)); - }; ---- a/ath10k-4.19/leds.c -+++ b/ath10k-4.19/leds.c -@@ -81,9 +81,7 @@ int ath10k_leds_register(struct ath10k * - - ar->leds.cdev.name = ar->leds.label; - ar->leds.cdev.brightness_set_blocking = ath10k_leds_set_brightness_blocking; -- -- /* FIXME: this assignment doesn't make sense as it's NULL, remove it? */ -- ar->leds.cdev.default_trigger = ar->leds.wifi_led.default_trigger; -+ ar->leds.cdev.default_trigger = ar->led_default_trigger; - - ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev); - if (ret) ---- a/ath10k-4.19/mac.c -+++ b/ath10k-4.19/mac.c -@@ -9987,7 +9987,7 @@ int ath10k_mac_register(struct ath10k *a - wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); - - #ifdef CPTCFG_MAC80211_LEDS -- ieee80211_create_tpt_led_trigger(ar->hw, -+ ar->led_default_trigger = ieee80211_create_tpt_led_trigger(ar->hw, - IEEE80211_TPT_LEDTRIG_FL_RADIO, ath10k_tpt_blink, - ARRAY_SIZE(ath10k_tpt_blink)); - #endif ---- a/ath10k-5.2/core.h -+++ b/ath10k-5.2/core.h -@@ -1552,6 +1552,10 @@ struct ath10k { - u8 csi_data[4096]; - u16 csi_data_len; - -+#ifdef CPTCFG_MAC80211_LEDS -+ const char *led_default_trigger; -+#endif -+ - /* must be last */ - u8 drv_priv[0] __aligned(sizeof(void *)); - }; ---- a/ath10k-5.2/leds.c -+++ b/ath10k-5.2/leds.c -@@ -81,9 +81,7 @@ int ath10k_leds_register(struct ath10k * - - ar->leds.cdev.name = ar->leds.label; - ar->leds.cdev.brightness_set_blocking = ath10k_leds_set_brightness_blocking; -- -- /* FIXME: this assignment doesn't make sense as it's NULL, remove it? */ -- ar->leds.cdev.default_trigger = ar->leds.wifi_led.default_trigger; -+ ar->leds.cdev.default_trigger = ar->led_default_trigger; - - ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev); - if (ret) ---- a/ath10k-5.2/mac.c -+++ b/ath10k-5.2/mac.c -@@ -10187,7 +10187,7 @@ int ath10k_mac_register(struct ath10k *a - ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; - - #ifdef CPTCFG_MAC80211_LEDS -- ieee80211_create_tpt_led_trigger(ar->hw, -+ ar->led_default_trigger = ieee80211_create_tpt_led_trigger(ar->hw, - IEEE80211_TPT_LEDTRIG_FL_RADIO, ath10k_tpt_blink, - ARRAY_SIZE(ath10k_tpt_blink)); - #endif ---- a/ath10k-5.4/core.h -+++ b/ath10k-5.4/core.h -@@ -1573,6 +1573,10 @@ struct ath10k { - u8 csi_data[4096]; - u16 csi_data_len; - -+#ifdef CPTCFG_MAC80211_LEDS -+ const char *led_default_trigger; -+#endif -+ - /* must be last */ - u8 drv_priv[0] __aligned(sizeof(void *)); - }; ---- a/ath10k-5.4/leds.c -+++ b/ath10k-5.4/leds.c -@@ -81,9 +81,7 @@ int ath10k_leds_register(struct ath10k * - - ar->leds.cdev.name = ar->leds.label; - ar->leds.cdev.brightness_set_blocking = ath10k_leds_set_brightness_blocking; -- -- /* FIXME: this assignment doesn't make sense as it's NULL, remove it? */ -- ar->leds.cdev.default_trigger = ar->leds.wifi_led.default_trigger; -+ ar->leds.cdev.default_trigger = ar->led_default_trigger; - - ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev); - if (ret) ---- a/ath10k-5.4/mac.c -+++ b/ath10k-5.4/mac.c -@@ -10367,7 +10367,7 @@ int ath10k_mac_register(struct ath10k *a - ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; - - #ifdef CPTCFG_MAC80211_LEDS -- ieee80211_create_tpt_led_trigger(ar->hw, -+ ar->led_default_trigger = ieee80211_create_tpt_led_trigger(ar->hw, - IEEE80211_TPT_LEDTRIG_FL_RADIO, ath10k_tpt_blink, - ARRAY_SIZE(ath10k_tpt_blink)); - #endif diff --git a/package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch b/package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch new file mode 100644 index 0000000000..b1c7bae193 --- /dev/null +++ b/package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch @@ -0,0 +1,53 @@ +From 79c9d7aabae1d1da9eea97d83b61e1517a8a2221 Mon Sep 17 00:00:00 2001 +From: Mathias Kresin +Date: Fri, 22 Jun 2018 18:59:44 +0200 +Subject: [PATCH] ath10k: use tpt LED trigger by default + +Use the tpt LED trigger for each created phy led. Ths way LEDs attached +to the ath10k GPIO pins are indicating the phy status and blink on +traffic. + +Signed-off-by: Mathias Kresin +--- + ath10k-5.4/core.h | 4 ++++ + ath10k-5.4/leds.c | 4 +--- + ath10k-5.4/mac.c | 2 +- + 3 files changed, 6 insertions(+), 4 deletions(-) + +--- a/ath10k-5.4/core.h ++++ b/ath10k-5.4/core.h +@@ -1573,6 +1573,10 @@ struct ath10k { + u8 csi_data[4096]; + u16 csi_data_len; + ++#ifdef CPTCFG_MAC80211_LEDS ++ const char *led_default_trigger; ++#endif ++ + /* must be last */ + u8 drv_priv[0] __aligned(sizeof(void *)); + }; +--- a/ath10k-5.4/leds.c ++++ b/ath10k-5.4/leds.c +@@ -81,9 +81,7 @@ int ath10k_leds_register(struct ath10k * + + ar->leds.cdev.name = ar->leds.label; + ar->leds.cdev.brightness_set_blocking = ath10k_leds_set_brightness_blocking; +- +- /* FIXME: this assignment doesn't make sense as it's NULL, remove it? */ +- ar->leds.cdev.default_trigger = ar->leds.wifi_led.default_trigger; ++ ar->leds.cdev.default_trigger = ar->led_default_trigger; + + ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev); + if (ret) +--- a/ath10k-5.4/mac.c ++++ b/ath10k-5.4/mac.c +@@ -10367,7 +10367,7 @@ int ath10k_mac_register(struct ath10k *a + ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; + + #ifdef CPTCFG_MAC80211_LEDS +- ieee80211_create_tpt_led_trigger(ar->hw, ++ ar->led_default_trigger = ieee80211_create_tpt_led_trigger(ar->hw, + IEEE80211_TPT_LEDTRIG_FL_RADIO, ath10k_tpt_blink, + ARRAY_SIZE(ath10k_tpt_blink)); + #endif diff --git a/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch b/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch deleted file mode 100644 index f47e9d64c0..0000000000 --- a/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch +++ /dev/null @@ -1,39 +0,0 @@ -From bbf0a8af2261bc7ae39b227ff6a1e9f45a008c27 Mon Sep 17 00:00:00 2001 -From: Sven Eckelmann -Date: Mon, 30 Jul 2018 17:31:41 +0200 -Subject: [PATCH] ath10k: Limit available channels via DT ieee80211-freq-limit - -Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special filters in -the RX and TX path. These filtered channel can in theory still be used by -the hardware but the signal strength is reduced so much that it makes no -sense. - -There is already a DT property to limit the available channels but ath10k -has to manually call this functionality to limit the currrently set wiphy -channels further. - -Signed-off-by: Sven Eckelmann - -Forwarded: https://patchwork.kernel.org/patch/10549245/ ---- - drivers/net/wireless/ath/ath10k/mac.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/ath10k-4.19/mac.c -+++ b/ath10k-4.19/mac.c -@@ -18,6 +18,7 @@ - - #include "mac.h" - -+#include - #include - #include - #include -@@ -9711,6 +9712,7 @@ int ath10k_mac_register(struct ath10k *a - ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band; - } - -+ wiphy_read_of_freq_limits(ar->hw->wiphy); - ath10k_mac_setup_ht_vht_cap(ar); - - ar->hw->wiphy->interface_modes = diff --git a/package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch b/package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch index 70f4fb0546..c527430898 100644 --- a/package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch +++ b/package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch @@ -1,31 +1,3 @@ ---- a/ath10k-4.19/htt.h -+++ b/ath10k-4.19/htt.h -@@ -237,7 +237,11 @@ enum htt_rx_ring_flags { - }; - - #define HTT_RX_RING_SIZE_MIN 128 -+#ifndef CONFIG_ATH10K_SMALLBUFFERS - #define HTT_RX_RING_SIZE_MAX 2048 -+#else -+#define HTT_RX_RING_SIZE_MAX 512 -+#endif - #define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX - #define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1) - #define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1) ---- a/ath10k-5.2/htt.h -+++ b/ath10k-5.2/htt.h -@@ -225,7 +225,11 @@ enum htt_rx_ring_flags { - }; - - #define HTT_RX_RING_SIZE_MIN 128 -+#ifndef CONFIG_ATH10K_SMALLBUFFERS - #define HTT_RX_RING_SIZE_MAX 2048 -+#else -+#define HTT_RX_RING_SIZE_MAX 512 -+#endif - #define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX - #define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1) - #define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1) --- a/ath10k-5.4/htt.h +++ b/ath10k-5.4/htt.h @@ -225,7 +225,11 @@ enum htt_rx_ring_flags { diff --git a/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch b/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch index 0b691217b2..f559a78f29 100644 --- a/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch +++ b/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch @@ -1,103 +1,3 @@ ---- a/ath10k-4.19/pci.c -+++ b/ath10k-4.19/pci.c -@@ -142,7 +142,11 @@ static struct ce_attr host_ce_config_wla - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 2048, -+#ifndef CONFIG_ATH10K_SMALLBUFFERS - .dest_nentries = 512, -+#else -+ .dest_nentries = 128, -+#endif - .recv_cb = ath10k_pci_htt_htc_rx_cb, - }, - -@@ -151,7 +155,11 @@ static struct ce_attr host_ce_config_wla - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 2048, -+#ifndef CONFIG_ATH10K_SMALLBUFFERS - .dest_nentries = 128, -+#else -+ .dest_nentries = 64, -+#endif - .recv_cb = ath10k_pci_htc_rx_cb, - }, - -@@ -178,7 +186,11 @@ static struct ce_attr host_ce_config_wla - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 512, -+#ifndef CONFIG_ATH10K_SMALLBUFFERS - .dest_nentries = 512, -+#else -+ .dest_nentries = 128, -+#endif - .recv_cb = ath10k_pci_htt_rx_cb, - }, - -@@ -203,7 +215,11 @@ static struct ce_attr host_ce_config_wla - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 2048, -+#ifndef CONFIG_ATH10K_SMALLBUFFERS - .dest_nentries = 128, -+#else -+ .dest_nentries = 96, -+#endif - .recv_cb = ath10k_pci_pktlog_rx_cb, - }, - ---- a/ath10k-5.2/pci.c -+++ b/ath10k-5.2/pci.c -@@ -131,7 +131,11 @@ static struct ce_attr host_ce_config_wla - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 2048, -+#ifndef CONFIG_ATH10K_SMALLBUFFERS - .dest_nentries = 512, -+#else -+ .dest_nentries = 128, -+#endif - .recv_cb = ath10k_pci_htt_htc_rx_cb, - }, - -@@ -140,7 +144,11 @@ static struct ce_attr host_ce_config_wla - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 2048, -+#ifndef CONFIG_ATH10K_SMALLBUFFERS - .dest_nentries = 128, -+#else -+ .dest_nentries = 64, -+#endif - .recv_cb = ath10k_pci_htc_rx_cb, - }, - -@@ -167,7 +175,11 @@ static struct ce_attr host_ce_config_wla - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 512, -+#ifndef CONFIG_ATH10K_SMALLBUFFERS - .dest_nentries = 512, -+#else -+ .dest_nentries = 128, -+#endif - .recv_cb = ath10k_pci_htt_rx_cb, - }, - -@@ -192,7 +204,11 @@ static struct ce_attr host_ce_config_wla - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 2048, -+#ifndef CONFIG_ATH10K_SMALLBUFFERS - .dest_nentries = 128, -+#else -+ .dest_nentries = 96, -+#endif - .recv_cb = ath10k_pci_pktlog_rx_cb, - }, - --- a/ath10k-5.4/pci.c +++ b/ath10k-5.4/pci.c @@ -131,7 +131,11 @@ static struct ce_attr host_ce_config_wla diff --git a/package/kernel/ath10k-ct/patches/976-ath10k-Check-if-station-exists-before-forwarding-tx-.patch b/package/kernel/ath10k-ct/patches/976-ath10k-Check-if-station-exists-before-forwarding-tx-.patch deleted file mode 100644 index 0ff885d95a..0000000000 --- a/package/kernel/ath10k-ct/patches/976-ath10k-Check-if-station-exists-before-forwarding-tx-.patch +++ /dev/null @@ -1,81 +0,0 @@ -From cc8ec75f5ad4acf9babe5e26a10c9bca10624593 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 18 Aug 2019 15:33:51 +0200 -Subject: [PATCH] ath10k: Check if station exists before forwarding tx airtime - report - -It looks like the FW on QCA9984 already reports the tx airtimes before -the station is added to the peer entry. The peer entry is created in -ath10k_peer_map_event() just with the vdev_id and the ethaddr, but -not with a station entry, this is added later in ath10k_peer_create() in -callbacks from mac80211. - -When there is no sta added to the peer entry, this function fails -because it calls ieee80211_sta_register_airtime() with NULL. - -This was reported in OpenWrt some time ago: -https://bugs.openwrt.org/index.php?do=details&task_id=2414 - -This commit should fix this crash: -[ 75.991714] Unable to handle kernel paging request at virtual address fffff9e8 -[ 75.991756] pgd = c0204000 -[ 75.997955] [fffff9e8] *pgd=5fdfd861, *pte=00000000, *ppte=00000000 -[ 76.000537] Internal error: Oops: 37 [#1] SMP ARM -[ 76.006686] Modules linked in: pppoe ppp_async ath10k_pci ath10k_core ath pptp pppox ppp_mppe ppp_generic mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_esp xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_FLOWOFFLOAD xt_DSCP xt_CT xt_CLASSIFY usbserial slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack_netlink iptable_raw iptable_mangle iptable_filter ipt_ah ipt_ECN ip_tables crc_ccitt compat chaoskey fuse sch_cake sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 -[ 76.059974] cls_tcindex cls_route cls_matchall cls_fw cls_flow cls_basic act_skbedit act_mirred ledtrig_usbport xt_set ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6t_NPT ip6t_MASQUERADE nf_nat_masquerade_ipv6 nf_nat nf_conntrack nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 msdos ip_gre gre ifb sit tunnel4 ip_tunnel tun vfat fat hfsplus cifs nls_utf8 nls_iso8859_15 nls_iso8859_1 nls_cp850 nls_cp437 nls_cp1250 sha1_generic md5 md4 -[ 76.130634] usb_storage leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_of_simple ohci_platform ohci_hcd phy_qcom_dwc3 ahci ehci_platform sd_mod ahci_platform libahci_platform libahci libata scsi_mod ehci_hcd gpio_button_hotplug ext4 mbcache jbd2 exfat crc32c_generic -[ 76.154772] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.14.132 #0 -[ 76.177001] Hardware name: Generic DT based system -[ 76.182990] task: c0b06d80 task.stack: c0b00000 -[ 76.187832] PC is at ieee80211_sta_register_airtime+0x24/0x148 [mac80211] -[ 76.192211] LR is at ath10k_htt_t2h_msg_handler+0x678/0x10f4 [ath10k_core] -[ 76.199052] pc : [] lr : [] psr: a0000113 -[ 76.205820] sp : c0b01d54 ip : 00000002 fp : bf869c0c -[ 76.211981] r10: 0000003c r9 : dbdca138 r8 : 00060002 -[ 76.217192] r7 : 00000000 r6 : dabe1150 r5 : 00000000 r4 : dbdc95c0 -[ 76.222401] r3 : 00000000 r2 : 00060002 r1 : 00000000 r0 : 00000000 -[ 76.229003] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none -[ 76.235509] Control: 10c5787d Table: 5c94006a DAC: 00000051 -[ 76.242716] Process swapper/0 (pid: 0, stack limit = 0xc0b00210) -[ 76.248446] Stack: (0xc0b01d54 to 0xc0b02000) -[ 76.254532] 1d40: dbdc95c0 00000000 dabe1150 -[ 76.258808] 1d60: 00000001 dabe1150 dbdca138 0000003c bf869c0c bf83e8b0 00000002 c0314b10 -[ 76.266969] 1d80: dbdc9c70 00000001 00000001 dabe114c 00010000 00000000 dbdcd724 bf88f3d8 -[ 76.275126] 1da0: c0310d28 db393c00 dbdc95c0 00000000 c0b01dd0 c07fb4c4 dbdcd724 00000001 -[ 76.283286] 1dc0: 00000022 bf88b09c db393c00 00000022 c0b01dd0 c0b01dd0 00000000 dbdcc5c0 -[ 76.291445] 1de0: bf88f04c dbdcd654 dbdcd71c dbdc95c0 00000014 dbdcd724 dbdcc5c0 00000005 -[ 76.299605] 1e00: 0004b400 bf85c360 00000000 bf87101c c0b01e24 00000006 00000000 dbdc95c0 -[ 76.307764] 1e20: 00000001 00000040 0000012c c0b01e80 1cf51000 bf85c448 dbdcd440 dbdc95c0 -[ 76.315925] 1e40: dbdca440 ffffa880 00000040 bf88cb68 dbdcd440 00000001 00000040 ffffa880 -[ 76.324084] 1e60: c0b02d00 c06d72e0 dd990080 c0a3f080 c0b255dc c0b047e4 c090afac c090e80c -[ 76.332244] 1e80: c0b01e80 c0b01e80 c0b01e88 c0b01e88 dd4cc200 00000000 00000003 c0b0208c -[ 76.340405] 1ea0: c0b02080 40000003 ffffe000 00000100 c0b02080 c03015c8 00000000 00000001 -[ 76.348564] 1ec0: dd408000 c0a38210 c0b2c7c0 0000000a ffffa880 c0b02d00 c07fb764 00200102 -[ 76.356723] 1ee0: dd4cc268 c0a3e414 00000000 00000000 00000001 dd408000 de803000 00000000 -[ 76.364883] 1f00: 00000000 c03247cc c0a3e414 c0368f1c c0b03f60 c0b153cc de80200c de802000 -[ 76.373042] 1f20: c0b01f48 c0301488 c0308630 60000013 ffffffff c0b01f7c 00000000 c0b00000 -[ 76.381204] 1f40: 00000000 c030c08c 00000001 00000000 00000000 c0315180 ffffe000 c0b03cc0 -[ 76.389363] 1f60: c0b03c70 00000000 00000000 c0a2da28 00000000 00000000 c0b01f90 c0b01f98 -[ 76.397522] 1f80: c030862c c0308630 60000013 ffffffff 00000051 00000000 ffffe000 c035dd18 -[ 76.405681] 1fa0: 000000bf c0b03c40 00000000 c0b2c000 dddfce80 c035e060 c0b2c040 c0a00cf4 -[ 76.413842] 1fc0: ffffffff ffffffff 00000000 c0a0067c c0a2da28 00000000 00000000 c0b2c1d4 -[ 76.422001] 1fe0: c0b03c5c c0a2da24 c0b07ee0 4220406a 512f04d0 4220807c 00000000 00000000 -[ 76.430335] [] (ieee80211_sta_register_airtime [mac80211]) from [<00000002>] (0x2) -[ 76.438314] Code: e1cd81f0 e1a08002 e1cda1f8 e58de020 (e5102618) -[ 76.446965] ---[ end trace 227a38ade964d642 ]--- - -Fixes: bb31b7cb106c ("ath10k: report tx airtime provided by fw") -Signed-off-by: Hauke Mehrtens ---- - ---- a/ath10k-5.2/htt_rx.c -+++ b/ath10k-5.2/htt_rx.c -@@ -2568,7 +2568,7 @@ do_generic: - spin_lock_bh(&ar->data_lock); - - peer = ath10k_peer_find_by_id(ar, peer_id); -- if (!peer) { -+ if (!peer || !peer->sta) { - spin_unlock_bh(&ar->data_lock); - rcu_read_unlock(); - continue; From e3e03876c22f1d54666e65f9e1948164bb718707 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Thu, 30 Apr 2020 10:14:30 +0800 Subject: [PATCH 28/38] add rclone package and luci-app-rclone --- package/lean/luci-app-rclone/Makefile | 37 ++++ .../luasrc/controller/rclone.lua | 7 + .../luasrc/model/cbi/rclone.lua | 138 +++++++++++++++ package/lean/luci-app-rclone/po/en/rclone.po | 110 ++++++++++++ .../po/templates/luci-app-rclone.pot | 134 ++++++++++++++ .../lean/luci-app-rclone/po/zh-cn/rclone.po | 1 + .../po/zh_Hans/luci-app-rclone.po | 167 ++++++++++++++++++ .../luci-app-rclone/root/etc/config/rclone | 17 ++ .../luci-app-rclone/root/etc/init.d/rclone | 100 +++++++++++ .../root/etc/uci-defaults/100_luci-rclone | 11 ++ .../usr/share/rpcd/acl.d/luci-app-rclone.json | 11 ++ package/lean/rclone-webui-react/Makefile | 58 ++++++ package/lean/rclone/Makefile | 77 ++++++++ .../rclone/patches/000-disable-plugins.patch | 22 +++ 14 files changed, 890 insertions(+) create mode 100644 package/lean/luci-app-rclone/Makefile create mode 100644 package/lean/luci-app-rclone/luasrc/controller/rclone.lua create mode 100644 package/lean/luci-app-rclone/luasrc/model/cbi/rclone.lua create mode 100644 package/lean/luci-app-rclone/po/en/rclone.po create mode 100644 package/lean/luci-app-rclone/po/templates/luci-app-rclone.pot create mode 120000 package/lean/luci-app-rclone/po/zh-cn/rclone.po create mode 100644 package/lean/luci-app-rclone/po/zh_Hans/luci-app-rclone.po create mode 100644 package/lean/luci-app-rclone/root/etc/config/rclone create mode 100755 package/lean/luci-app-rclone/root/etc/init.d/rclone create mode 100755 package/lean/luci-app-rclone/root/etc/uci-defaults/100_luci-rclone create mode 100644 package/lean/luci-app-rclone/root/usr/share/rpcd/acl.d/luci-app-rclone.json create mode 100644 package/lean/rclone-webui-react/Makefile create mode 100644 package/lean/rclone/Makefile create mode 100644 package/lean/rclone/patches/000-disable-plugins.patch diff --git a/package/lean/luci-app-rclone/Makefile b/package/lean/luci-app-rclone/Makefile new file mode 100644 index 0000000000..0a10544d52 --- /dev/null +++ b/package/lean/luci-app-rclone/Makefile @@ -0,0 +1,37 @@ +#### + # File: /Makefile + # Project: luci-app-rclone + # File Created: Wednesday, 9th October 2019 1:39:36 pm + # Author: ElonH[EH](elonhhuang@gmail.com) + # License: GNU General Public License v3.0 or later(http://www.gnu.org/licenses/gpl-3.0-standalone.html) + # Copyright (C) 2019 [ElonH] +#### + +include $(TOPDIR)/rules.mk + +LUCI_TITLE:=LuCI support for Rclone +LUCI_DEPENDS:=+rclone +rclone-webui-react +LUCI_PKGARCH:=all +PKG_NAME:=luci-app-rclone +PKG_VERSION:=1.3.21 +PKG_RELEASE:=1 +PKG_LICENSE:=GPLv3.0+ +PKG_MAINTAINER:=ElonH + +define Package/luci-app-rclone/description + LuCI support for Rclone. + Rclone ("rsync for cloud storage") is a command line program to sync root/usr/bin and directories to and from different cloud storage providers. + Cloud storage providers: + 1Fichier, Alibaba Cloud (Aliyun) Object Storage System (OSS), Amazon Drive, Amazon S3, + Backblaze B2, Box, Ceph, C14, DigitalOcean Spaces, Dreamhost, Dropbox, FTP, + Google Cloud Storage, Google Drive, Google Photos, HTTP, Hubic, Jottacloud, + IBM COS S3, Koofr, Memset Memstore, Mega, Microsoft Azure Blob Storage, + Microsoft OneDrive, Minio, Nextcloud, OVH, OpenDrive, Openstack Swift, + Oracle Cloud Storage, ownCloud, pCloud, premiumize.me, put.io, QingStor, + Rackspace Cloud root/usr/bin, rsync.net, Scaleway, SFTP, Wasabi, WebDAV, + Yandex Disk, The local root/usr/binystem. +endef + +include $(TOPDIR)/feeds/luci/luci.mk + +# call BuildPackage - OpenWrt buildroot signature diff --git a/package/lean/luci-app-rclone/luasrc/controller/rclone.lua b/package/lean/luci-app-rclone/luasrc/controller/rclone.lua new file mode 100644 index 0000000000..5b1028066c --- /dev/null +++ b/package/lean/luci-app-rclone/luasrc/controller/rclone.lua @@ -0,0 +1,7 @@ +module("luci.controller.rclone", package.seeall) + +function index() + if not nixio.fs.access("/etc/config/rclone") then return end + entry({"admin", "nas"}, firstchild(), _("NAS") , 45).dependent = false + entry({"admin", "nas", "rclone"}, cbi("rclone"), _("Rclone"), 100 ).dependent = false +end diff --git a/package/lean/luci-app-rclone/luasrc/model/cbi/rclone.lua b/package/lean/luci-app-rclone/luasrc/model/cbi/rclone.lua new file mode 100644 index 0000000000..aa9312aa0d --- /dev/null +++ b/package/lean/luci-app-rclone/luasrc/model/cbi/rclone.lua @@ -0,0 +1,138 @@ +require('luci.sys') +require('luci.util') + +local fs = require 'nixio.fs' + +local uci = require 'luci.model.uci'.cursor() + +local m, s + +local running = (luci.sys.call('pidof rclone > /dev/null') == 0) + +local state_msg = '' +local trport = uci:get('rclone', 'config', 'port') + +local triptype = uci:get('rclone', 'config', 'addr_type') +local trip = '' + +if triptype == 'local' then + trip = uci:get('network', 'loopback', 'ipaddr') +elseif triptype == 'lan' then + trip = uci:get('network', 'lan', 'ipaddr') +else + trip = '[ip]' +end + +if running then + state_msg = '' .. translate('rclone running') .. '' + address_msg = translate('rclone address') .. ' : http://' .. trip .. ':' .. trport .. '

' +else + state_msg = '' .. translate('rclone not run') .. '' + address_msg = '' +end + +m = + Map( + 'rclone', + translate('Rclone'), + translate('Rclone ("rsync for cloud storage") is a command line program to sync root/usr/bin and directories to and from different cloud storage providers.') .. + '

' .. translate('rclone state') .. ' : ' .. state_msg .. '

' + .. address_msg .. + translate('Installed Web Interface') .. + '      

" +) + +s = m:section(TypedSection, 'global', translate('global')) +s.addremove = false +s.anonymous = true + +enable = s:option(Flag, 'enabled', translate('run Rclone as daemon')) +enable.rmempty = false + +s = m:section(TypedSection, 'conf', translate('configure')) +s.addremove = false +s.anonymous = true + +o = s:option(ListValue, 'addr_type', translate('listen address')) +o:value('local', translate('localhost address')) +o:value('lan', translate('local network address')) +o:value('all', translate('all address')) +o.default = 'lan' +o.rmempty = false + +o = s:option(Value, 'port', translate('listen port')) +o.placeholder = 5572 +o.default = 5572 +o.datatype = 'port' +o.rmempty = false + +o = s:option(Value, 'config_path', translate('rclone configuration file path')) +o.placeholder = '/etc/rclone/rclone.conf' +o.default = '/etc/rclone/rclone.conf' +o.rmempty = false +o.description = translate("Recommand: run ") .. + "rclone config --config rclone.conf" .. + translate(" to setup configuration on pc,") .. "
" .. translate("than updaload configuration to here.") + +o = s:option(Button,"config_download",translate("download configuration")) +o.inputtitle = translate("download") +o.inputstyle = "apply" +o.write = function() + Download() +end + +function Download() + local t,e + t=nixio.open(uci:get('rclone', 'config', 'config_path'),"r") + luci.http.header('Content-Disposition','attachment; filename="rclone.conf"') + luci.http.prepare_content("application/octet-stream") + while true do + e=t:read(nixio.const.buffersize) + if(not e)or(#e==0)then + break + else + luci.http.write(e) + end + end + t:close() + luci.http.close() +end + +o = s:option(Value, 'username', translate('username')) +o.placeholder = 'admin' +o.default = 'admin' +o.rmempty = false + +o = s:option(Value, 'password', translate('password')) +o.password = true +o.placeholder = 'admin' +o.default = 'admin' +o.rmempty = false + +s = m:section(TypedSection, 'proxy', translate('proxy')) +s.addremove = false +s.anonymous = true +s.description = "" + ..translate("FAQ").."" + +enable = s:option(Flag, 'enabled', translate('enable proxy')) +enable.rmempty = false + +o = s:option(Value, 'proxy_addr', translate('proxy address')) +o.placeholder = 'socks5://127.0.0.1:1080' +o.default = 'socks5://127.0.0.1:1080' +o.rmempty = false +o.description = translate("The content of the variable is protocol://server:port. The protocol value is commonly either http or socks5.") + +s = m:section(TypedSection, 'log', translate('log')) +s.addremove = false +s.anonymous = true + +o = s:option(Value, 'path', translate('path')) +o.placeholder = '/var/log/rclone/output' +o.default = '/var/log/rclone/output' +o.rmempty = false + +return m diff --git a/package/lean/luci-app-rclone/po/en/rclone.po b/package/lean/luci-app-rclone/po/en/rclone.po new file mode 100644 index 0000000000..a71070ee05 --- /dev/null +++ b/package/lean/luci-app-rclone/po/en/rclone.po @@ -0,0 +1,110 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: PACKAGE VERSION\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:41 +msgid "Installed Web Interface" +msgstr "Installed Web Interface" + +#: luci-app-rclone/luasrc/controller/rclone.lua:7 +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:37 +msgid "Rclone" +msgstr "Rclone" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:38 +msgid "" +"Rclone (\"rsync for cloud storage\") is a command line program to sync root/" +"usr/bin and directories to and from different cloud storage providers." +msgstr "" +"Rclone (\"rsync for cloud storage\") is a command line program to sync root/" +"usr/bin and directories to and from different cloud storage providers." + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:43 +msgid "Webui React" +msgstr "Webui React" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:61 +msgid "all address" +msgstr "all address" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:54 +msgid "configure" +msgstr "configure" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:77 +msgid "download" +msgstr "download" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:76 +msgid "download configuration" +msgstr "download configuration" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:47 +msgid "global" +msgstr "global" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:58 +msgid "listen address" +msgstr "listen address" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:65 +msgid "listen port" +msgstr "listen port" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:60 +msgid "local network address" +msgstr "local network address" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:59 +msgid "localhost address" +msgstr "localhost address" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:111 +msgid "log" +msgstr "log" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:105 +msgid "password" +msgstr "password" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:115 +msgid "path" +msgstr "path" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:28 +msgid "rclone address" +msgstr "" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:71 +msgid "rclone configuration file path" +msgstr "rclone configuration file path" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:30 +msgid "rclone not run" +msgstr "rclone not run" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:27 +msgid "rclone running" +msgstr "rclone running" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:39 +msgid "rclone state" +msgstr "rclone state" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:51 +msgid "run Rclone as daemon" +msgstr "run Rclone as daemon" + +#: luci-app-rclone/luasrc/model/cbi/rclone.lua:100 +msgid "username" +msgstr "username" + +#~ msgid "run Rclone in daeman" +#~ msgstr "run Rclone in daeman" diff --git a/package/lean/luci-app-rclone/po/templates/luci-app-rclone.pot b/package/lean/luci-app-rclone/po/templates/luci-app-rclone.pot new file mode 100644 index 0000000000..7df760f2bc --- /dev/null +++ b/package/lean/luci-app-rclone/po/templates/luci-app-rclone.pot @@ -0,0 +1,134 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +#: luasrc/model/cbi/rclone.lua:118 +msgid "FAQ" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:41 +msgid "Installed Web Interface" +msgstr "" + +#: luasrc/controller/rclone.lua:5 +msgid "NAS" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:37 luasrc/controller/rclone.lua:6 +msgid "Rclone" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:38 +msgid "" +"Rclone (\"rsync for cloud storage\") is a command line program to sync root/" +"usr/bin and directories to and from different cloud storage providers." +msgstr "" + +#: luasrc/model/cbi/rclone.lua:75 +msgid "Recommand: run" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:127 +msgid "" +"The content of the variable is protocol://server:port. The protocol value is " +"commonly either http or socks5." +msgstr "" + +#: luasrc/model/cbi/rclone.lua:43 +msgid "Webui React" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:61 +msgid "all address" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:54 +msgid "configure" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:80 +msgid "download" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:79 +msgid "download configuration" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:120 +msgid "enable proxy" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:47 +msgid "global" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:58 +msgid "listen address" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:65 +msgid "listen port" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:60 +msgid "local network address" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:59 +msgid "localhost address" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:129 +msgid "log" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:108 +msgid "password" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:133 +msgid "path" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:114 +msgid "proxy" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:123 +msgid "proxy address" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:28 +msgid "rclone address" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:71 +msgid "rclone configuration file path" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:30 +msgid "rclone not run" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:27 +msgid "rclone running" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:39 +msgid "rclone state" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:51 +msgid "run Rclone as daemon" +msgstr "" + +#: luasrc/model/cbi/rclone.lua:77 +msgid "than updaload configuration to here." +msgstr "" + +#: luasrc/model/cbi/rclone.lua:77 +msgid "to setup configuration on pc," +msgstr "" + +#: luasrc/model/cbi/rclone.lua:103 +msgid "username" +msgstr "" diff --git a/package/lean/luci-app-rclone/po/zh-cn/rclone.po b/package/lean/luci-app-rclone/po/zh-cn/rclone.po new file mode 120000 index 0000000000..b08e41a9d2 --- /dev/null +++ b/package/lean/luci-app-rclone/po/zh-cn/rclone.po @@ -0,0 +1 @@ +../zh_Hans/luci-app-rclone.po \ No newline at end of file diff --git a/package/lean/luci-app-rclone/po/zh_Hans/luci-app-rclone.po b/package/lean/luci-app-rclone/po/zh_Hans/luci-app-rclone.po new file mode 100644 index 0000000000..3afed25cc9 --- /dev/null +++ b/package/lean/luci-app-rclone/po/zh_Hans/luci-app-rclone.po @@ -0,0 +1,167 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"Last-Translator: ElonH \n" +"Language-Team: none\n" +"Language: zh-Hans\n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"X-Generator: Poedit 2.0.6\n" + +#: luasrc/model/cbi/rclone.lua:118 +msgid "FAQ" +msgstr "常见问题" + +#: luasrc/model/cbi/rclone.lua:41 +msgid "Installed Web Interface" +msgstr "已安装Web界面" + +#: luasrc/controller/rclone.lua:5 +msgid "NAS" +msgstr "存储" + +#: luasrc/model/cbi/rclone.lua:37 luasrc/controller/rclone.lua:6 +msgid "Rclone" +msgstr "Rclone" + +#: luasrc/model/cbi/rclone.lua:38 +msgid "" +"Rclone (\"rsync for cloud storage\") is a command line program to sync root/" +"usr/bin and directories to and from different cloud storage providers." +msgstr "" +"Rclone是一款的命令行工具,支持在不同对象存储、网盘间同步、上传、下载数据。" + +#: luasrc/model/cbi/rclone.lua:75 +msgid "Recommand: run" +msgstr "建议: 在 PC 上运行" + +#: luasrc/model/cbi/rclone.lua:127 +msgid "" +"The content of the variable is protocol://server:port. The protocol value is " +"commonly either http or socks5." +msgstr "" +"内容格式为: protocol://server:port\n" +"protocol 通常为 http 或者 socks5" + +#: luasrc/model/cbi/rclone.lua:43 +msgid "Webui React" +msgstr "Webui React" + +#: luasrc/model/cbi/rclone.lua:61 +msgid "all address" +msgstr "全部地址" + +#: luasrc/model/cbi/rclone.lua:54 +msgid "configure" +msgstr "配置" + +#: luasrc/model/cbi/rclone.lua:80 +msgid "download" +msgstr "下载" + +#: luasrc/model/cbi/rclone.lua:79 +msgid "download configuration" +msgstr "下载配置文件" + +#: luasrc/model/cbi/rclone.lua:120 +msgid "enable proxy" +msgstr "启用代理" + +#: luasrc/model/cbi/rclone.lua:47 +msgid "global" +msgstr "全局" + +#: luasrc/model/cbi/rclone.lua:58 +msgid "listen address" +msgstr "监听地址" + +#: luasrc/model/cbi/rclone.lua:65 +msgid "listen port" +msgstr "监听端口" + +#: luasrc/model/cbi/rclone.lua:60 +msgid "local network address" +msgstr "局域网地址" + +#: luasrc/model/cbi/rclone.lua:59 +msgid "localhost address" +msgstr "本机地址" + +#: luasrc/model/cbi/rclone.lua:129 +msgid "log" +msgstr "日志" + +#: luasrc/model/cbi/rclone.lua:108 +msgid "password" +msgstr "密码" + +#: luasrc/model/cbi/rclone.lua:133 +msgid "path" +msgstr "路径" + +#: luasrc/model/cbi/rclone.lua:114 +msgid "proxy" +msgstr "代理" + +#: luasrc/model/cbi/rclone.lua:123 +msgid "proxy address" +msgstr "代理地址" + +#: luasrc/model/cbi/rclone.lua:28 +msgid "rclone address" +msgstr "rclone 地址" + +#: luasrc/model/cbi/rclone.lua:71 +msgid "rclone configuration file path" +msgstr "rclone 配置文件地址" + +#: luasrc/model/cbi/rclone.lua:30 +msgid "rclone not run" +msgstr "rclone未运行" + +#: luasrc/model/cbi/rclone.lua:27 +msgid "rclone running" +msgstr "rclone 运行中" + +#: luasrc/model/cbi/rclone.lua:39 +msgid "rclone state" +msgstr "rclone 状态" + +#: luasrc/model/cbi/rclone.lua:51 +msgid "run Rclone as daemon" +msgstr "启动 rclone 后台服务" + +#: luasrc/model/cbi/rclone.lua:77 +msgid "than updaload configuration to here." +msgstr "然后上传配置文件到这里" + +#: luasrc/model/cbi/rclone.lua:77 +msgid "to setup configuration on pc," +msgstr "命令设置 rclone 配置文件," + +#: luasrc/model/cbi/rclone.lua:103 +msgid "username" +msgstr "用户名" + +#~ msgid "Hosts must be comma separated, and can contain domains or parts." +#~ msgstr "用逗号分隔地址,且地址必须包含(部分)域名" + +#~ msgid "This allows you to disable the proxy for specific hosts." +#~ msgstr "这允许不代理特定的地址." + +#~ msgid "How to proxy rclone" +#~ msgstr "如何代理rclone" + +#~ msgid "disable proxy for specific hosts" +#~ msgstr "针对特定主机禁用代理" + +#~ msgid "" +#~ "rclone will follow the standard environment variables for proxies, " +#~ "similar to cURL and other programs." +#~ msgstr "rclone 会使用代理的标准环境变量,类似于 cURL 及其他程序。" + +#~ msgid "run Rclone in daeman" +#~ msgstr "启动 rclone 后台服务" diff --git a/package/lean/luci-app-rclone/root/etc/config/rclone b/package/lean/luci-app-rclone/root/etc/config/rclone new file mode 100644 index 0000000000..1440200ca5 --- /dev/null +++ b/package/lean/luci-app-rclone/root/etc/config/rclone @@ -0,0 +1,17 @@ + +config global 'global' + option enabled '0' + +config conf 'config' + option config_path '/etc/rclone/rclone.conf' + option port '5572' + option username 'admin' + option password 'admin' + option addr_type 'lan' + +config proxy 'proxy' + option enabled '0' + option proxy_addr 'socks5://127.0.0.1:1080' + +config log 'log' + option path '/var/log/rclone/output' diff --git a/package/lean/luci-app-rclone/root/etc/init.d/rclone b/package/lean/luci-app-rclone/root/etc/init.d/rclone new file mode 100755 index 0000000000..15205215ce --- /dev/null +++ b/package/lean/luci-app-rclone/root/etc/init.d/rclone @@ -0,0 +1,100 @@ +#!/bin/bash /etc/rc.common +# Copyright (C) 2019 ElonH + +USE_PROCD=1 +START=95 +STOP=10 + +APP=rclone +CONFIGURATION=rclone + +_info() { + logger -p daemon.info -t "$APP" "$*" +} + +_err() { + logger -p daemon.err -t "$APP" "$*" +} + +init_config() { + config_load "${CONFIGURATION}" + # Create rclone dirs + local config_path + local config_dir + local log_path + local log_dir + + config_get config_path config config_path + config_get log_path log path + + config_dir=${config_path%/*} + [ -d "$config_dir" ] || mkdir -p "$config_dir" 2>/dev/null + + [ -f "$config_path" ] || touch "$config_path" + + log_dir=${log_path%/*} + [ -d "$log_dir" ] || mkdir -p "$log_dir" 2>/dev/null && echo /dev/null > "$log_path" + + +} + +start_service() { + init_config + + local enabled + local config_path + local addr_type + local port + local username + local password + local proxy_enable + local proxy_addr + local log_path + + config_get enabled global enabled + + config_get config_path config config_path + config_get addr_type config addr_type + config_get port config port + config_get username config username + config_get password config password + + config_get proxy_enable proxy enabled + config_get proxy_addr proxy proxy_addr + + config_get log_path log path + + if [[ "${addr_type}" == "local" ]]; then + addr="$(uci get network.loopback.ipaddr)" + elif [[ "${addr_type}" == "lan" ]]; then + addr="$(uci get network.lan.ipaddr)" + elif [[ "${addr_type}" == "all" ]]; then + addr="" + fi + [ "$enabled" == "1" ] || { _info "Instance \"rclone\" disabled."; return 1; } + _info "Instance \"rclone\" start." + procd_open_instance + procd_set_param command /usr/bin/$APP rcd -vv + procd_append_param command "--rc-addr=$addr:$port" + procd_append_param command "--rc-user=$username" "--rc-pass=$password" + procd_append_param command "--config=$config_path" + procd_append_param command "--rc-allow-origin=*" + procd_append_param command "--log-file=${log_path}" + if [[ "${proxy_enable}" == "1" ]]; then + procd_set_param env all_proxy="$proxy_addr" https_proxy="$proxy_addr" http_proxy="$proxy_addr" + procd_set_param env ALL_PROXY="$proxy_addr" HTTPS_PROXY="$proxy_addr" HTTP_PROXY="$proxy_addr" + fi + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_set_param file /etc/config/rclone + # procd_set_param pidfile /var/run/rclone.pid + procd_set_param user rclone + procd_set_param group rclone + procd_set_param respawn retry=60 + procd_close_instance + +} + +service_triggers() { + procd_add_reload_trigger "rclone" +} diff --git a/package/lean/luci-app-rclone/root/etc/uci-defaults/100_luci-rclone b/package/lean/luci-app-rclone/root/etc/uci-defaults/100_luci-rclone new file mode 100755 index 0000000000..3d7a46247c --- /dev/null +++ b/package/lean/luci-app-rclone/root/etc/uci-defaults/100_luci-rclone @@ -0,0 +1,11 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete ucitrack.@rclone[-1] + add ucitrack rclone + set ucitrack.@rclone[-1].init=rclone + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/package/lean/luci-app-rclone/root/usr/share/rpcd/acl.d/luci-app-rclone.json b/package/lean/luci-app-rclone/root/usr/share/rpcd/acl.d/luci-app-rclone.json new file mode 100644 index 0000000000..0a664ef43b --- /dev/null +++ b/package/lean/luci-app-rclone/root/usr/share/rpcd/acl.d/luci-app-rclone.json @@ -0,0 +1,11 @@ +{ + "luci-app-rclone": { + "description": "Grant UCI access for luci-app-rclone", + "read": { + "uci": ["rclone"] + }, + "write": { + "uci": ["rclone"] + } + } +} diff --git a/package/lean/rclone-webui-react/Makefile b/package/lean/rclone-webui-react/Makefile new file mode 100644 index 0000000000..0e359d5873 --- /dev/null +++ b/package/lean/rclone-webui-react/Makefile @@ -0,0 +1,58 @@ +#### + # File: /Makefile + # Project: rclone-webui-react + # File Created: Thursday, 10th October 2019 5:57:39 pm + # Author: ElonH[EH](elonhhuang@gmail.com) + # License: GNU General Public License v3.0 or later(http://www.gnu.org/licenses/gpl-3.0-standalone.html) + # Copyright (C) 2019 [ElonH] +#### + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rclone-webui-react +PKG_VERSION:=0.1.0 +PKG_RELEASE:=1 + + +PKG_LICENSE:=GPLv3 +PKG_MAINTAINER:=ElonH + +include $(INCLUDE_DIR)/package.mk + +PKG_SOURCE:=currentbuild.zip +PKG_SOURCE_URL:=https://github.com/rclone/rclone-webui-react/releases/download/v$(PKG_VERSION)/ +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_HASH:=06b9401779f82ef62fd22a9688549664228797d094b645a68a098c2310461fc5 + +define Package/$(PKG_NAME) + SECTION:=net + CATEGORY:=Network + SUBMENU:=File Transfer + SUBMENU:=Cloud Manager + TITLE:=A reactjs based web UI for rclone + URL:=https://github.com/rclone/rclone-webui-react + PKGARCH:=all +endef + +define Package/$(PKG_NAME)/description + A full fledged UI for the rclone cloud sync tool. +endef + +define Build/Prepare + mkdir -vp $(PKG_BUILD_DIR) + unzip -od $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE) +endef + +define Build/Configure +endef + +define Build/Compile + echo "$(PKG_NAME) Compile Skiped!" +endef + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/www/rclone-webui-react + $(CP) $(PKG_BUILD_DIR)/build/* $(1)/www/rclone-webui-react +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/package/lean/rclone/Makefile b/package/lean/rclone/Makefile new file mode 100644 index 0000000000..747a8f1b7a --- /dev/null +++ b/package/lean/rclone/Makefile @@ -0,0 +1,77 @@ +#### + # File: /Makefile + # Project: rclone + # File Created: Friday, 11th October 2019 4:50:49 pm + # Author: ElonH[EH](elonhhuang@gmail.com) + # License: GNU General Public License v3.0 or later(http://www.gnu.org/licenses/gpl-3.0-standalone.html) + # Copyright (C) 2019 [ElonH] +#### + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rclone +PKG_VERSION:=1.51.0 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/rclone/rclone.git +PKG_SOURCE_DATE:=2020-02-01 +PKG_SOURCE_VERSION:=43daecd89b21292b112051340317927b42ccbdd3 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz +PKG_MIRROR_HASH:=aca159c81971a9490a6a6c323b67879dccba3860955b66787d91590f4ba8ba29 + +PKG_LICENSE:=GPLv3 +PKG_MAINTAINER:=ElonH + +PKG_BUILD_DEPENDS:=golang/host +PKG_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 # https://github.com/openwrt/packages/issues/8498 +GO_PKG:=github.com/rclone/rclone +GO_PKG_EXCLUDES:=test + +include $(INCLUDE_DIR)/package.mk +include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk + +# GO_PKG_LDFLAGS:= +GO_PKG_LDFLAGS_X:=\ + github.com/rclone/rclone/fs.Version=v$(PKG_VERSION)_$(PKG_SOURCE_DATE)\ + main.Version=v$(PKG_VERSION) \ + main.BuildUser=openwrt \ + main.BuildHost=openwrt \ + main.BuildStamp=$(SOURCE_DATE_EPOCH) + +define Package/$(PKG_NAME) + SECTION:=utils + CATEGORY:=Utilities + TITLE:=rsync for cloud storage. + URL:=https://rclone.org + DEPENDS:=$(GO_ARCH_DEPENDS) +endef + +define Package/$(PKG_NAME)/description +Rclone ("rsync for cloud storage") is a command line program to sync root/usr/bin and directories to and from different cloud storage providers. +Cloud storage providers: + 1Fichier, Alibaba Cloud (Aliyun) Object Storage System (OSS), Amazon Drive, Amazon S3, + Backblaze B2, Box, Ceph, C14, DigitalOcean Spaces, Dreamhost, Dropbox, FTP, + Google Cloud Storage, Google Drive, Google Photos, HTTP, Hubic, Jottacloud, + IBM COS S3, Koofr, Memset Memstore, Mega, Microsoft Azure Blob Storage, + Microsoft OneDrive, Minio, Nextcloud, OVH, OpenDrive, Openstack Swift, + Oracle Cloud Storage, ownCloud, pCloud, premiumize.me, put.io, QingStor, + Rackspace Cloud root/usr/bin, rsync.net, Scaleway, SFTP, Wasabi, WebDAV, + Yandex Disk, The local root/usr/binystem. +endef + +define Package/$(PKG_NAME)/install + # echo "++++++++++++++++++" + # echo "$(PKG_INSTALL_DIR)" + # echo "$(1)" + # echo "$(GO_PKG_BUILD_BIN_DIR)" + # echo "++++++++++++++++++" + + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/rclone $(1)/usr/bin/ +endef + +$(eval $(call GoBinPackage,$(PKG_NAME))) +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/package/lean/rclone/patches/000-disable-plugins.patch b/package/lean/rclone/patches/000-disable-plugins.patch new file mode 100644 index 0000000000..34b6486592 --- /dev/null +++ b/package/lean/rclone/patches/000-disable-plugins.patch @@ -0,0 +1,22 @@ +## +# File: /patches/000-disable-plugins.patch +# Project: rclone +# Created Date: Wednesday, January 1st 2020, 1:49:43 pm +# Author: ElonH[EH](elonhhuang@gmail.com) +# License: GNU General Public License v3.0 or later(http://www.gnu.org/licenses/gpl-3.0-standalone.html) +# Copyright (C) 2019 [ElonH] +## +# refs: https://github.com/openwrt/packages/issues/10864#issuecomment-569921457 +diff --git a/rclone.go b/rclone.go +index 74fde16ab..9a9ba9150 100644 +--- a/rclone.go ++++ b/rclone.go +@@ -7,7 +7,7 @@ import ( + _ "github.com/rclone/rclone/backend/all" // import all backends + "github.com/rclone/rclone/cmd" + _ "github.com/rclone/rclone/cmd/all" // import all commands +- _ "github.com/rclone/rclone/lib/plugin" // import plugins ++ // _ "github.com/rclone/rclone/lib/plugin" // import plugins + ) + + func main() { From f2f84a682e076f0b8547c8db7b126adbbbc846e9 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Thu, 30 Apr 2020 11:31:31 +0800 Subject: [PATCH 29/38] jquery v3.5.0 mark --- .../luci-theme-argon/htdocs/luci-static/argon/js/jquery.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/lean/luci-theme-argon/htdocs/luci-static/argon/js/jquery.min.js b/package/lean/luci-theme-argon/htdocs/luci-static/argon/js/jquery.min.js index f3644431ee..b893e0a99d 100644 --- a/package/lean/luci-theme-argon/htdocs/luci-static/argon/js/jquery.min.js +++ b/package/lean/luci-theme-argon/htdocs/luci-static/argon/js/jquery.min.js @@ -1,4 +1,4 @@ -/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ +/*! jQuery v3.5.0 | (c) 2005, 2020 jQuery Foundation, Inc. | jquery.org/license */ !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/\s*$/g,ra={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:k.htmlSerialize?[0,"",""]:[1,"X
","
"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?""!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("