diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 3a446ffb18..89e26f6d96 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -8,11 +8,11 @@ endif LINUX_VERSION-4.14 = .180 LINUX_VERSION-4.19 = .123 -LINUX_VERSION-5.4 = .43 +LINUX_VERSION-5.4 = .45 LINUX_KERNEL_HASH-4.14.180 = 444ef973d9b6a6ea174e4a9086f0aea980d8575d13302e431ad688f22e27ed0e LINUX_KERNEL_HASH-4.19.123 = a79914d31a8d8c6b0e2bb0f2b143d615fe8a6c4dd2e0f36e97aa20efd69a993f -LINUX_KERNEL_HASH-5.4.43 = 2667b90a42d42557aca9e3d37bba1b4e71809b9523958e6870ada311c4790744 +LINUX_KERNEL_HASH-5.4.45 = 103f039f34a9009c42ea643b4f473bda6bb9607d5ad7f63b56b3e2351615fe2e remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 66560d5d41..ea90e01c1d 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -11,9 +11,9 @@ PKG_RELEASE:=2 PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2020-05-20 -PKG_SOURCE_VERSION:=dd2daf0848ed8854065cc5cfca07a0538cd380af -PKG_MIRROR_HASH:=5f198ba4f9098e8bddb32e41f82a24d0510c6e25317a86dcfafc70fb8db260e2 +PKG_SOURCE_DATE:=2020-06-08 +PKG_SOURCE_VERSION:=5a8b366233f5585e68a4ffbb604fbb4a848eb325 +PKG_MIRROR_HASH:=1b2a4947034142587a3f81eac2ea27dd64650e77f8943d973623b47533be2393 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=BSD-3-Clause diff --git a/package/network/services/hostapd/patches/004-mesh-use-setup-completion-callback-to-complete-mesh-.patch b/package/network/services/hostapd/patches/004-mesh-use-setup-completion-callback-to-complete-mesh-.patch index 844437f74a..54dea274fa 100644 --- a/package/network/services/hostapd/patches/004-mesh-use-setup-completion-callback-to-complete-mesh-.patch +++ b/package/network/services/hostapd/patches/004-mesh-use-setup-completion-callback-to-complete-mesh-.patch @@ -34,7 +34,7 @@ Signed-off-by: Peter Oh #endif /* CONFIG_MESH */ hostapd_clean_rrm(hapd); -@@ -2145,6 +2147,13 @@ dfs_offload: +@@ -2156,6 +2158,13 @@ dfs_offload: if (hapd->setup_complete_cb) hapd->setup_complete_cb(hapd->setup_complete_cb_ctx); @@ -48,7 +48,7 @@ Signed-off-by: Peter Oh wpa_printf(MSG_DEBUG, "%s: Setup of interface done.", iface->bss[0]->conf->iface); if (iface->interfaces && iface->interfaces->terminate_on_error > 0) -@@ -2288,7 +2297,7 @@ int hostapd_setup_interface(struct hosta +@@ -2299,7 +2308,7 @@ int hostapd_setup_interface(struct hosta ret = setup_interface(iface); if (ret) { wpa_printf(MSG_ERROR, "%s: Unable to setup interface.", diff --git a/package/network/services/hostapd/patches/006-mesh-inform-kernel-driver-DFS-handler-in-userspace.patch b/package/network/services/hostapd/patches/006-mesh-inform-kernel-driver-DFS-handler-in-userspace.patch index 8b1ce88864..2ca15e5d1e 100644 --- a/package/network/services/hostapd/patches/006-mesh-inform-kernel-driver-DFS-handler-in-userspace.patch +++ b/package/network/services/hostapd/patches/006-mesh-inform-kernel-driver-DFS-handler-in-userspace.patch @@ -26,7 +26,7 @@ Signed-off-by: Peter Oh struct wpa_driver_set_key_params { --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -10038,6 +10038,9 @@ static int nl80211_join_mesh(struct i802 +@@ -10051,6 +10051,9 @@ static int nl80211_join_mesh(struct i802 wpa_printf(MSG_DEBUG, " * flags=%08X", params->flags); diff --git a/package/network/services/hostapd/patches/011-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch b/package/network/services/hostapd/patches/011-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch index cc63576883..3a9b847171 100644 --- a/package/network/services/hostapd/patches/011-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch +++ b/package/network/services/hostapd/patches/011-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch @@ -13,7 +13,7 @@ Signed-off-by: Peter Oh --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -2345,6 +2345,8 @@ void ibss_mesh_setup_freq(struct wpa_sup +@@ -2349,6 +2349,8 @@ void ibss_mesh_setup_freq(struct wpa_sup int chwidth, seg0, seg1; u32 vht_caps = 0; int is_24ghz; @@ -22,7 +22,7 @@ Signed-off-by: Peter Oh freq->freq = ssid->frequency; -@@ -2432,8 +2434,11 @@ void ibss_mesh_setup_freq(struct wpa_sup +@@ -2436,8 +2438,11 @@ void ibss_mesh_setup_freq(struct wpa_sup return; /* Check primary channel flags */ @@ -35,7 +35,7 @@ Signed-off-by: Peter Oh freq->channel = pri_chan->chan; -@@ -2466,8 +2471,11 @@ void ibss_mesh_setup_freq(struct wpa_sup +@@ -2470,8 +2475,11 @@ void ibss_mesh_setup_freq(struct wpa_sup return; /* Check secondary channel flags */ @@ -48,7 +48,7 @@ Signed-off-by: Peter Oh if (ht40 == -1) { if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS)) -@@ -2560,8 +2568,11 @@ skip_ht40: +@@ -2564,8 +2572,11 @@ skip_ht40: return; /* Back to HT configuration if channel not usable */ @@ -61,7 +61,7 @@ Signed-off-by: Peter Oh } chwidth = CHANWIDTH_80MHZ; -@@ -2581,10 +2592,11 @@ skip_ht40: +@@ -2585,10 +2596,11 @@ skip_ht40: if (!chan) continue; diff --git a/package/network/services/hostapd/patches/015-mesh-do-not-use-offchan-mgmt-tx-on-DFS.patch b/package/network/services/hostapd/patches/015-mesh-do-not-use-offchan-mgmt-tx-on-DFS.patch index 3d623a65b2..7c6f249a0b 100644 --- a/package/network/services/hostapd/patches/015-mesh-do-not-use-offchan-mgmt-tx-on-DFS.patch +++ b/package/network/services/hostapd/patches/015-mesh-do-not-use-offchan-mgmt-tx-on-DFS.patch @@ -17,7 +17,7 @@ Signed-off-by: Peter Oh --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -7788,6 +7788,10 @@ static int wpa_driver_nl80211_send_actio +@@ -7789,6 +7789,10 @@ static int wpa_driver_nl80211_send_actio u8 *buf; struct ieee80211_hdr *hdr; int offchanok = 1; @@ -28,7 +28,7 @@ Signed-off-by: Peter Oh if (is_ap_interface(drv->nlmode) && (int) freq == bss->freq && bss->beacon_set) -@@ -7816,6 +7820,21 @@ static int wpa_driver_nl80211_send_actio +@@ -7817,6 +7821,21 @@ static int wpa_driver_nl80211_send_actio os_memset(bss->rand_addr, 0, ETH_ALEN); } diff --git a/package/network/services/hostapd/patches/018-mesh-make-forwarding-configurable.patch b/package/network/services/hostapd/patches/018-mesh-make-forwarding-configurable.patch index f7ea9674da..0bdc4cc154 100644 --- a/package/network/services/hostapd/patches/018-mesh-make-forwarding-configurable.patch +++ b/package/network/services/hostapd/patches/018-mesh-make-forwarding-configurable.patch @@ -31,7 +31,7 @@ Signed-off-by: Daniel Golle }; #define MAX_STA_COUNT 2007 -@@ -691,6 +692,7 @@ struct hostapd_bss_config { +@@ -701,6 +702,7 @@ struct hostapd_bss_config { #define MESH_ENABLED BIT(0) int mesh; @@ -59,7 +59,7 @@ Signed-off-by: Daniel Golle --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -10006,6 +10006,9 @@ static int nl80211_put_mesh_config(struc +@@ -10019,6 +10019,9 @@ static int nl80211_put_mesh_config(struc if (((params->flags & WPA_DRIVER_MESH_CONF_FLAG_AUTO_PLINKS) && nla_put_u8(msg, NL80211_MESHCONF_AUTO_OPEN_PLINKS, params->auto_plinks)) || @@ -79,7 +79,7 @@ Signed-off-by: Daniel Golle { INT_RANGE(mesh_rssi_threshold, -255, 1) }, #else /* CONFIG_MESH */ { INT_RANGE(mode, 0, 4) }, -@@ -3046,6 +3047,7 @@ void wpa_config_set_network_defaults(str +@@ -3047,6 +3048,7 @@ void wpa_config_set_network_defaults(str ssid->dot11MeshRetryTimeout = DEFAULT_MESH_RETRY_TIMEOUT; ssid->dot11MeshConfirmTimeout = DEFAULT_MESH_CONFIRM_TIMEOUT; ssid->dot11MeshHoldingTimeout = DEFAULT_MESH_HOLDING_TIMEOUT; @@ -87,7 +87,7 @@ Signed-off-by: Daniel Golle ssid->mesh_rssi_threshold = DEFAULT_MESH_RSSI_THRESHOLD; #endif /* CONFIG_MESH */ #ifdef CONFIG_HT_OVERRIDES -@@ -4273,6 +4275,7 @@ struct wpa_config * wpa_config_alloc_emp +@@ -4274,6 +4276,7 @@ struct wpa_config * wpa_config_alloc_emp config->user_mpm = DEFAULT_USER_MPM; config->max_peer_links = DEFAULT_MAX_PEER_LINKS; config->mesh_max_inactivity = DEFAULT_MESH_MAX_INACTIVITY; @@ -95,7 +95,7 @@ Signed-off-by: Daniel Golle config->dot11RSNASAERetransPeriod = DEFAULT_DOT11_RSNA_SAE_RETRANS_PERIOD; config->fast_reauth = DEFAULT_FAST_REAUTH; -@@ -4911,6 +4914,7 @@ static const struct global_parse_data gl +@@ -4912,6 +4915,7 @@ static const struct global_parse_data gl { INT(user_mpm), 0 }, { INT_RANGE(max_peer_links, 0, 255), 0 }, { INT(mesh_max_inactivity), 0 }, @@ -138,7 +138,7 @@ Signed-off-by: Daniel Golle INT(frequency); INT(enable_edmg); INT(edmg_channel); -@@ -1526,6 +1527,9 @@ static void wpa_config_write_global(FILE +@@ -1527,6 +1528,9 @@ static void wpa_config_write_global(FILE fprintf(f, "mesh_max_inactivity=%d\n", config->mesh_max_inactivity); @@ -150,7 +150,7 @@ Signed-off-by: Daniel Golle fprintf(f, "dot11RSNASAERetransPeriod=%d\n", --- a/wpa_supplicant/config_ssid.h +++ b/wpa_supplicant/config_ssid.h -@@ -540,6 +540,11 @@ struct wpa_ssid { +@@ -546,6 +546,11 @@ struct wpa_ssid { int dot11MeshConfirmTimeout; /* msec */ int dot11MeshHoldingTimeout; /* msec */ diff --git a/package/network/services/hostapd/patches/200-multicall.patch b/package/network/services/hostapd/patches/200-multicall.patch index ef28e191c9..0b371afe3e 100644 --- a/package/network/services/hostapd/patches/200-multicall.patch +++ b/package/network/services/hostapd/patches/200-multicall.patch @@ -1,6 +1,6 @@ --- a/hostapd/Makefile +++ b/hostapd/Makefile -@@ -28,6 +28,7 @@ CFLAGS += -I$(abspath ../src/utils) +@@ -31,6 +31,7 @@ CFLAGS += -I$(abspath ../src/utils) export BINDIR ?= /usr/local/bin/ -include .config @@ -8,7 +8,7 @@ ifndef CONFIG_NO_GITVER # Add VERSION_STR postfix for builds from a git repository -@@ -200,7 +201,8 @@ endif +@@ -204,7 +205,8 @@ endif ifdef CONFIG_NO_VLAN CFLAGS += -DCONFIG_NO_VLAN @@ -18,7 +18,7 @@ OBJS += ../src/ap/vlan_init.o OBJS += ../src/ap/vlan_ifconfig.o OBJS += ../src/ap/vlan.o -@@ -346,10 +348,14 @@ CFLAGS += -DCONFIG_MBO +@@ -354,10 +356,14 @@ CFLAGS += -DCONFIG_MBO OBJS += ../src/ap/mbo_ap.o endif @@ -36,7 +36,7 @@ LIBS += $(DRV_AP_LIBS) ifdef CONFIG_L2_PACKET -@@ -1300,6 +1306,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR) +@@ -1311,6 +1317,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR) BCHECK=../src/drivers/build.hostapd @@ -49,9 +49,9 @@ hostapd: $(BCHECK) $(OBJS) $(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS) @$(E) " LD " $@ -@@ -1341,6 +1353,12 @@ ifeq ($(CONFIG_TLS), linux) - HOBJS += ../src/crypto/crypto_linux.o - endif +@@ -1374,6 +1386,12 @@ SOBJS += ../src/crypto/sha256-kdf.o + SOBJS += ../src/crypto/sha384-kdf.o + SOBJS += ../src/crypto/sha512-kdf.o +dump_cflags: + @printf "%s " "$(CFLAGS)" @@ -72,7 +72,7 @@ ifndef CONFIG_NO_GITVER # Add VERSION_STR postfix for builds from a git repository -@@ -365,7 +366,9 @@ endif +@@ -369,7 +370,9 @@ endif ifdef CONFIG_IBSS_RSN NEED_RSN_AUTHENTICATOR=y CFLAGS += -DCONFIG_IBSS_RSN @@ -82,7 +82,7 @@ OBJS += ibss_rsn.o endif -@@ -886,6 +889,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS +@@ -890,6 +893,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS LIBS += -ldl -rdynamic endif @@ -93,7 +93,7 @@ endif ifdef CONFIG_AP -@@ -893,9 +900,11 @@ NEED_EAP_COMMON=y +@@ -897,9 +904,11 @@ NEED_EAP_COMMON=y NEED_RSN_AUTHENTICATOR=y CFLAGS += -DCONFIG_AP OBJS += ap.o @@ -105,7 +105,7 @@ OBJS += ../src/ap/hostapd.o OBJS += ../src/ap/wpa_auth_glue.o OBJS += ../src/ap/utils.o -@@ -975,6 +984,12 @@ endif +@@ -979,6 +988,12 @@ endif ifdef CONFIG_HS20 OBJS += ../src/ap/hs20.o endif @@ -118,7 +118,7 @@ endif ifdef CONFIG_MBO -@@ -983,7 +998,9 @@ CFLAGS += -DCONFIG_MBO +@@ -987,7 +1002,9 @@ CFLAGS += -DCONFIG_MBO endif ifdef NEED_RSN_AUTHENTICATOR @@ -128,7 +128,7 @@ NEED_AES_WRAP=y OBJS += ../src/ap/wpa_auth.o OBJS += ../src/ap/wpa_auth_ie.o -@@ -1893,6 +1910,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv) +@@ -1897,6 +1914,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv) $(OBJS_c) $(OBJS_t) $(OBJS_t2) $(OBJS) $(BCHECK) $(EXTRA_progs): .config @@ -141,7 +141,7 @@ wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs) $(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS) @$(E) " LD " $@ -@@ -1993,6 +2016,12 @@ endif +@@ -1997,6 +2020,12 @@ endif $(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@ @$(E) " sed" $< @@ -156,7 +156,7 @@ wpa_cli.exe: wpa_cli --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -5879,8 +5879,8 @@ union wpa_event_data { +@@ -5886,8 +5886,8 @@ union wpa_event_data { * Driver wrapper code should call this function whenever an event is received * from the driver. */ @@ -167,7 +167,7 @@ /** * wpa_supplicant_event_global - Report a driver event for wpa_supplicant -@@ -5892,7 +5892,7 @@ void wpa_supplicant_event(void *ctx, enu +@@ -5899,7 +5899,7 @@ void wpa_supplicant_event(void *ctx, enu * Same as wpa_supplicant_event(), but we search for the interface in * wpa_global. */ @@ -178,7 +178,7 @@ /* --- a/src/ap/drv_callbacks.c +++ b/src/ap/drv_callbacks.c -@@ -1768,8 +1768,8 @@ err: +@@ -1789,8 +1789,8 @@ err: #endif /* CONFIG_OWE */ @@ -189,7 +189,7 @@ { struct hostapd_data *hapd = ctx; #ifndef CONFIG_NO_STDOUT_DEBUG -@@ -2014,7 +2014,7 @@ void wpa_supplicant_event(void *ctx, enu +@@ -2035,7 +2035,7 @@ void wpa_supplicant_event(void *ctx, enu } @@ -231,7 +231,7 @@ os_memset(&global, 0, sizeof(global)); --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c -@@ -4500,8 +4500,8 @@ static void wpas_event_unprot_beacon(str +@@ -4579,8 +4579,8 @@ static void wpas_event_unprot_beacon(str } @@ -242,7 +242,7 @@ { struct wpa_supplicant *wpa_s = ctx; int resched; -@@ -5319,7 +5319,7 @@ void wpa_supplicant_event(void *ctx, enu +@@ -5398,7 +5398,7 @@ void wpa_supplicant_event(void *ctx, enu } @@ -253,7 +253,7 @@ struct wpa_supplicant *wpa_s; --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -6593,7 +6593,6 @@ struct wpa_interface * wpa_supplicant_ma +@@ -6597,7 +6597,6 @@ struct wpa_interface * wpa_supplicant_ma return NULL; } @@ -261,7 +261,7 @@ /** * wpa_supplicant_match_existing - Match existing interfaces * @global: Pointer to global data from wpa_supplicant_init() -@@ -6630,6 +6629,11 @@ static int wpa_supplicant_match_existing +@@ -6634,6 +6633,11 @@ static int wpa_supplicant_match_existing #endif /* CONFIG_MATCH_IFACE */ @@ -273,7 +273,7 @@ /** * wpa_supplicant_add_iface - Add a new network interface -@@ -6886,6 +6890,8 @@ struct wpa_global * wpa_supplicant_init( +@@ -6890,6 +6894,8 @@ struct wpa_global * wpa_supplicant_init( #ifndef CONFIG_NO_WPA_MSG wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb); #endif /* CONFIG_NO_WPA_MSG */ diff --git a/package/network/services/hostapd/patches/300-noscan.patch b/package/network/services/hostapd/patches/300-noscan.patch index 53cf38c42e..638b76f84e 100644 --- a/package/network/services/hostapd/patches/300-noscan.patch +++ b/package/network/services/hostapd/patches/300-noscan.patch @@ -1,6 +1,6 @@ --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -3452,6 +3452,10 @@ static int hostapd_config_fill(struct ho +@@ -3493,6 +3493,10 @@ static int hostapd_config_fill(struct ho if (bss->ocv && !bss->ieee80211w) bss->ieee80211w = 1; #endif /* CONFIG_OCV */ @@ -13,7 +13,7 @@ } else if (os_strcmp(buf, "ht_capab") == 0) { --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h -@@ -974,6 +974,8 @@ struct hostapd_config { +@@ -984,6 +984,8 @@ struct hostapd_config { int ht_op_mode_fixed; u16 ht_capab; diff --git a/package/network/services/hostapd/patches/301-mesh-noscan.patch b/package/network/services/hostapd/patches/301-mesh-noscan.patch index 33c481cc76..fac9bffabd 100644 --- a/package/network/services/hostapd/patches/301-mesh-noscan.patch +++ b/package/network/services/hostapd/patches/301-mesh-noscan.patch @@ -31,7 +31,7 @@ if (conf->hw_mode == HOSTAPD_MODE_IEEE80211A && ssid->vht) { --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -2334,12 +2334,12 @@ void ibss_mesh_setup_freq(struct wpa_sup +@@ -2338,12 +2338,12 @@ void ibss_mesh_setup_freq(struct wpa_sup int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode); enum hostapd_hw_mode hw_mode; struct hostapd_hw_modes *mode = NULL; @@ -46,7 +46,7 @@ unsigned int j, k; struct hostapd_freq_params vht_freq; int chwidth, seg0, seg1; -@@ -2421,7 +2421,7 @@ void ibss_mesh_setup_freq(struct wpa_sup +@@ -2425,7 +2425,7 @@ void ibss_mesh_setup_freq(struct wpa_sup #endif /* CONFIG_HE_OVERRIDES */ /* Setup higher BW only for 5 GHz */ @@ -57,7 +57,7 @@ for (chan_idx = 0; chan_idx < mode->num_channels; chan_idx++) { --- a/wpa_supplicant/config_ssid.h +++ b/wpa_supplicant/config_ssid.h -@@ -965,6 +965,8 @@ struct wpa_ssid { +@@ -971,6 +971,8 @@ struct wpa_ssid { */ int no_auto_peer; diff --git a/package/network/services/hostapd/patches/310-rescan_immediately.patch b/package/network/services/hostapd/patches/310-rescan_immediately.patch index 7c065f55b3..be2be615e3 100644 --- a/package/network/services/hostapd/patches/310-rescan_immediately.patch +++ b/package/network/services/hostapd/patches/310-rescan_immediately.patch @@ -1,6 +1,6 @@ --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -4948,7 +4948,7 @@ wpa_supplicant_alloc(struct wpa_supplica +@@ -4952,7 +4952,7 @@ wpa_supplicant_alloc(struct wpa_supplica if (wpa_s == NULL) return NULL; wpa_s->scan_req = INITIAL_SCAN_REQ; diff --git a/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch b/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch index 5ad4ed801a..9e2551ce60 100644 --- a/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch +++ b/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -4645,7 +4645,7 @@ static int nl80211_set_channel(struct i8 +@@ -4646,7 +4646,7 @@ static int nl80211_set_channel(struct i8 freq->freq, freq->ht_enabled, freq->vht_enabled, freq->he_enabled, freq->bandwidth, freq->center_freq1, freq->center_freq2); diff --git a/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch b/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch index 876becfbc9..a2a03c04f7 100644 --- a/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch +++ b/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -2787,10 +2787,15 @@ static int wpa_driver_nl80211_del_beacon +@@ -2788,10 +2788,15 @@ static int wpa_driver_nl80211_del_beacon struct nl_msg *msg; struct wpa_driver_nl80211_data *drv = bss->drv; @@ -18,7 +18,7 @@ return send_and_recv_msgs(drv, msg, NULL, NULL); } -@@ -5260,7 +5265,7 @@ static void nl80211_teardown_ap(struct i +@@ -5261,7 +5266,7 @@ static void nl80211_teardown_ap(struct i nl80211_mgmt_unsubscribe(bss, "AP teardown"); nl80211_put_wiphy_data_ap(bss); @@ -27,7 +27,7 @@ } -@@ -7678,8 +7683,6 @@ static int wpa_driver_nl80211_if_remove( +@@ -7679,8 +7684,6 @@ static int wpa_driver_nl80211_if_remove( } else { wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context"); nl80211_teardown_ap(bss); @@ -36,7 +36,7 @@ nl80211_destroy_bss(bss); if (!bss->added_if) i802_set_iface_flags(bss, 0); -@@ -8073,7 +8076,6 @@ static int wpa_driver_nl80211_deinit_ap( +@@ -8074,7 +8077,6 @@ static int wpa_driver_nl80211_deinit_ap( if (!is_ap_interface(drv->nlmode)) return -1; wpa_driver_nl80211_del_beacon(bss); @@ -44,7 +44,7 @@ /* * If the P2P GO interface was dynamically added, then it is -@@ -8093,7 +8095,6 @@ static int wpa_driver_nl80211_stop_ap(vo +@@ -8094,7 +8096,6 @@ static int wpa_driver_nl80211_stop_ap(vo if (!is_ap_interface(drv->nlmode)) return -1; wpa_driver_nl80211_del_beacon(bss); diff --git a/package/network/services/hostapd/patches/360-ctrl_iface_reload.patch b/package/network/services/hostapd/patches/360-ctrl_iface_reload.patch index 7692a29157..31c5102cb1 100644 --- a/package/network/services/hostapd/patches/360-ctrl_iface_reload.patch +++ b/package/network/services/hostapd/patches/360-ctrl_iface_reload.patch @@ -78,7 +78,7 @@ #ifdef NEED_AP_MLME static int hostapd_ctrl_iface_sa_query(struct hostapd_data *hapd, -@@ -3527,6 +3584,8 @@ static int hostapd_ctrl_iface_receive_pr +@@ -3546,6 +3603,8 @@ static int hostapd_ctrl_iface_receive_pr } else if (os_strncmp(buf, "VENDOR ", 7) == 0) { reply_len = hostapd_ctrl_iface_vendor(hapd, buf + 7, reply, reply_size); diff --git a/package/network/services/hostapd/patches/370-ap_sta_support.patch b/package/network/services/hostapd/patches/370-ap_sta_support.patch index 670d0a52a1..f96017de2e 100644 --- a/package/network/services/hostapd/patches/370-ap_sta_support.patch +++ b/package/network/services/hostapd/patches/370-ap_sta_support.patch @@ -183,7 +183,7 @@ wpa_s->new_connection = 1; wpa_drv_set_operstate(wpa_s, 0); #ifndef IEEE8021X_EAPOL -@@ -2225,6 +2277,8 @@ void wpa_supplicant_associate(struct wpa +@@ -2229,6 +2281,8 @@ void wpa_supplicant_associate(struct wpa wpa_ssid_txt(ssid->ssid, ssid->ssid_len), ssid->id); wpas_notify_mesh_group_started(wpa_s, ssid); @@ -192,7 +192,7 @@ #else /* CONFIG_MESH */ wpa_msg(wpa_s, MSG_ERROR, "mesh mode support not included in the build"); -@@ -6206,6 +6260,16 @@ static int wpa_supplicant_init_iface(str +@@ -6210,6 +6264,16 @@ static int wpa_supplicant_init_iface(str sizeof(wpa_s->bridge_ifname)); } @@ -209,7 +209,7 @@ /* RSNA Supplicant Key Management - INITIALIZE */ eapol_sm_notify_portEnabled(wpa_s->eapol, false); eapol_sm_notify_portValid(wpa_s->eapol, false); -@@ -6539,6 +6603,11 @@ static void wpa_supplicant_deinit_iface( +@@ -6543,6 +6607,11 @@ static void wpa_supplicant_deinit_iface( if (terminate) wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING); @@ -246,7 +246,7 @@ --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c -@@ -2693,6 +2693,11 @@ static int hostapd_ctrl_iface_chan_switc +@@ -2712,6 +2712,11 @@ static int hostapd_ctrl_iface_chan_switc return 0; } @@ -274,7 +274,7 @@ if (ieee802_11_build_ap_params(hapd, ¶ms) < 0) --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c -@@ -4500,6 +4500,60 @@ static void wpas_event_unprot_beacon(str +@@ -4579,6 +4579,60 @@ static void wpas_event_unprot_beacon(str } @@ -335,7 +335,7 @@ void supplicant_event(void *ctx, enum wpa_event_type event, union wpa_event_data *data) { -@@ -4802,8 +4856,10 @@ void supplicant_event(void *ctx, enum wp +@@ -4881,8 +4935,10 @@ void supplicant_event(void *ctx, enum wp channel_width_to_string(data->ch_switch.ch_width), data->ch_switch.cf1, data->ch_switch.cf2); @@ -349,7 +349,7 @@ wpa_s->current_ssid->frequency = data->ch_switch.freq; --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -5683,6 +5683,7 @@ union wpa_event_data { +@@ -5690,6 +5690,7 @@ union wpa_event_data { /** * struct ch_switch @@ -357,7 +357,7 @@ * @freq: Frequency of new channel in MHz * @ht_enabled: Whether this is an HT channel * @ch_offset: Secondary channel offset -@@ -5691,6 +5692,7 @@ union wpa_event_data { +@@ -5698,6 +5699,7 @@ union wpa_event_data { * @cf2: Center frequency 2 */ struct ch_switch { diff --git a/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch b/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch index 2b904d1199..cd4a2c9f14 100644 --- a/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch +++ b/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch @@ -1,6 +1,6 @@ --- a/hostapd/Makefile +++ b/hostapd/Makefile -@@ -222,6 +222,9 @@ endif +@@ -226,6 +226,9 @@ endif ifdef CONFIG_NO_CTRL_IFACE CFLAGS += -DCONFIG_NO_CTRL_IFACE else @@ -12,7 +12,7 @@ else --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c -@@ -3351,6 +3351,7 @@ static int hostapd_ctrl_iface_receive_pr +@@ -3370,6 +3370,7 @@ static int hostapd_ctrl_iface_receive_pr reply_size); } else if (os_strcmp(buf, "STATUS-DRIVER") == 0) { reply_len = hostapd_drv_status(hapd, reply, reply_size); @@ -20,7 +20,7 @@ } else if (os_strcmp(buf, "MIB") == 0) { reply_len = ieee802_11_get_mib(hapd, reply, reply_size); if (reply_len >= 0) { -@@ -3392,6 +3393,7 @@ static int hostapd_ctrl_iface_receive_pr +@@ -3411,6 +3412,7 @@ static int hostapd_ctrl_iface_receive_pr } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) { reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply, reply_size); @@ -30,7 +30,7 @@ reply_len = -1; --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile -@@ -948,6 +948,9 @@ ifdef CONFIG_FILS +@@ -952,6 +952,9 @@ ifdef CONFIG_FILS OBJS += ../src/ap/fils_hlp.o endif ifdef CONFIG_CTRL_IFACE @@ -42,7 +42,7 @@ --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c -@@ -2261,7 +2261,7 @@ static int wpa_supplicant_ctrl_iface_sta +@@ -2267,7 +2267,7 @@ static int wpa_supplicant_ctrl_iface_sta pos += ret; } @@ -51,7 +51,7 @@ if (wpa_s->ap_iface) { pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos, end - pos, -@@ -10243,6 +10243,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -10366,6 +10366,7 @@ char * wpa_supplicant_ctrl_iface_process reply_len = -1; } else if (os_strncmp(buf, "NOTE ", 5) == 0) { wpa_printf(MSG_INFO, "NOTE: %s", buf + 5); @@ -59,7 +59,7 @@ } else if (os_strcmp(buf, "MIB") == 0) { reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size); if (reply_len >= 0) { -@@ -10255,6 +10256,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -10378,6 +10379,7 @@ char * wpa_supplicant_ctrl_iface_process reply_size - reply_len); #endif /* CONFIG_MACSEC */ } @@ -67,7 +67,7 @@ } else if (os_strncmp(buf, "STATUS", 6) == 0) { reply_len = wpa_supplicant_ctrl_iface_status( wpa_s, buf + 6, reply, reply_size); -@@ -10739,6 +10741,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -10862,6 +10864,7 @@ char * wpa_supplicant_ctrl_iface_process reply_len = wpa_supplicant_ctrl_iface_bss( wpa_s, buf + 4, reply, reply_size); #ifdef CONFIG_AP @@ -75,7 +75,7 @@ } else if (os_strcmp(buf, "STA-FIRST") == 0) { reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size); } else if (os_strncmp(buf, "STA ", 4) == 0) { -@@ -10747,12 +10750,15 @@ char * wpa_supplicant_ctrl_iface_process +@@ -10870,12 +10873,15 @@ char * wpa_supplicant_ctrl_iface_process } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) { reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply, reply_size); @@ -144,7 +144,7 @@ static void ieee802_1x_wnm_notif_send(void *eloop_ctx, void *timeout_ctx) --- a/src/ap/wpa_auth.c +++ b/src/ap/wpa_auth.c -@@ -4391,6 +4391,7 @@ static const char * wpa_bool_txt(int val +@@ -4451,6 +4451,7 @@ static const char * wpa_bool_txt(int val return val ? "TRUE" : "FALSE"; } @@ -152,7 +152,7 @@ #define RSN_SUITE "%02x-%02x-%02x-%d" #define RSN_SUITE_ARG(s) \ -@@ -4541,7 +4542,7 @@ int wpa_get_mib_sta(struct wpa_state_mac +@@ -4601,7 +4602,7 @@ int wpa_get_mib_sta(struct wpa_state_mac return len; } @@ -163,7 +163,7 @@ { --- a/src/rsn_supp/wpa.c +++ b/src/rsn_supp/wpa.c -@@ -2717,6 +2717,8 @@ static u32 wpa_key_mgmt_suite(struct wpa +@@ -2728,6 +2728,8 @@ static u32 wpa_key_mgmt_suite(struct wpa } @@ -172,7 +172,7 @@ #define RSN_SUITE "%02x-%02x-%02x-%d" #define RSN_SUITE_ARG(s) \ ((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff -@@ -2798,6 +2800,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch +@@ -2809,6 +2811,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch return (int) len; } diff --git a/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch b/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch index 1318759ea7..9dee2d738e 100644 --- a/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch +++ b/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch @@ -1,6 +1,6 @@ --- a/src/common/wpa_common.c +++ b/src/common/wpa_common.c -@@ -2119,6 +2119,31 @@ u32 wpa_akm_to_suite(int akm) +@@ -2121,6 +2121,31 @@ u32 wpa_akm_to_suite(int akm) } @@ -32,7 +32,7 @@ int wpa_compare_rsn_ie(int ft_initial_assoc, const u8 *ie1, size_t ie1len, const u8 *ie2, size_t ie2len) -@@ -2126,8 +2151,19 @@ int wpa_compare_rsn_ie(int ft_initial_as +@@ -2128,8 +2153,19 @@ int wpa_compare_rsn_ie(int ft_initial_as if (ie1 == NULL || ie2 == NULL) return -1; diff --git a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch index 0a512a48a1..0a16af3099 100644 --- a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch +++ b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch @@ -162,7 +162,7 @@ Signed-hostap: Antonio Quartulli #define DEFAULT_EAP_WORKAROUND ((unsigned int) -1) -@@ -837,6 +839,9 @@ struct wpa_ssid { +@@ -843,6 +845,9 @@ struct wpa_ssid { */ void *parent_cred; @@ -174,7 +174,7 @@ Signed-hostap: Antonio Quartulli * macsec_policy - Determines the policy for MACsec secure session --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -3637,6 +3637,12 @@ static void wpas_start_assoc_cb(struct w +@@ -3641,6 +3641,12 @@ static void wpas_start_assoc_cb(struct w params.beacon_int = ssid->beacon_int; else params.beacon_int = wpa_s->conf->beacon_int; diff --git a/package/network/services/hostapd/patches/461-driver_nl80211-use-new-parameters-during-ibss-join.patch b/package/network/services/hostapd/patches/461-driver_nl80211-use-new-parameters-during-ibss-join.patch index 955e15e307..61d2089bc8 100644 --- a/package/network/services/hostapd/patches/461-driver_nl80211-use-new-parameters-during-ibss-join.patch +++ b/package/network/services/hostapd/patches/461-driver_nl80211-use-new-parameters-during-ibss-join.patch @@ -10,7 +10,7 @@ Signed-hostap: Antonio Quartulli --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -5583,7 +5583,7 @@ static int wpa_driver_nl80211_ibss(struc +@@ -5584,7 +5584,7 @@ static int wpa_driver_nl80211_ibss(struc struct wpa_driver_associate_params *params) { struct nl_msg *msg; @@ -19,7 +19,7 @@ Signed-hostap: Antonio Quartulli int count = 0; wpa_printf(MSG_DEBUG, "nl80211: Join IBSS (ifindex=%d)", drv->ifindex); -@@ -5610,6 +5610,37 @@ retry: +@@ -5611,6 +5611,37 @@ retry: nl80211_put_beacon_int(msg, params->beacon_int)) goto fail; diff --git a/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch b/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch index 473f3c786c..5bb0142341 100644 --- a/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch +++ b/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch @@ -29,7 +29,7 @@ Tested-by: Simon Wunderlich struct wpa_driver_set_key_params { --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -10026,6 +10026,18 @@ static int nl80211_put_mesh_id(struct nl +@@ -10039,6 +10039,18 @@ static int nl80211_put_mesh_id(struct nl } @@ -48,7 +48,7 @@ Tested-by: Simon Wunderlich static int nl80211_put_mesh_config(struct nl_msg *msg, struct wpa_driver_mesh_bss_params *params) { -@@ -10087,6 +10099,7 @@ static int nl80211_join_mesh(struct i802 +@@ -10100,6 +10112,7 @@ static int nl80211_join_mesh(struct i802 nl80211_put_basic_rates(msg, params->basic_rates) || nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) || nl80211_put_beacon_int(msg, params->beacon_int) || diff --git a/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch b/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch index 6d48175163..5f1f8e3d82 100644 --- a/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch +++ b/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch @@ -1,6 +1,6 @@ --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -2407,11 +2407,13 @@ void ibss_mesh_setup_freq(struct wpa_sup +@@ -2411,11 +2411,13 @@ void ibss_mesh_setup_freq(struct wpa_sup for (j = 0; j < wpa_s->last_scan_res_used; j++) { struct wpa_bss *bss = wpa_s->last_scan_res[j]; diff --git a/package/network/services/hostapd/patches/500-lto-jobserver-support.patch b/package/network/services/hostapd/patches/500-lto-jobserver-support.patch index 223c43cfde..46030859de 100644 --- a/package/network/services/hostapd/patches/500-lto-jobserver-support.patch +++ b/package/network/services/hostapd/patches/500-lto-jobserver-support.patch @@ -1,6 +1,6 @@ --- a/hostapd/Makefile +++ b/hostapd/Makefile -@@ -1316,14 +1316,14 @@ hostapd_multi.a: $(BCHECK) $(OBJS) +@@ -1327,14 +1327,14 @@ hostapd_multi.a: $(BCHECK) $(OBJS) @$(AR) cr $@ hostapd_multi.o $(OBJS) hostapd: $(BCHECK) $(OBJS) @@ -19,7 +19,7 @@ NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS) --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile -@@ -1926,23 +1926,23 @@ wpa_supplicant_multi.a: .config $(BCHECK +@@ -1930,23 +1930,23 @@ wpa_supplicant_multi.a: .config $(BCHECK @$(AR) cr $@ wpa_supplicant_multi.o $(OBJS) wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs) diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch index 23bdaa7a1b..d2d45ac971 100644 --- a/package/network/services/hostapd/patches/600-ubus_support.patch +++ b/package/network/services/hostapd/patches/600-ubus_support.patch @@ -1,6 +1,6 @@ --- a/hostapd/Makefile +++ b/hostapd/Makefile -@@ -167,6 +167,11 @@ OBJS += ../src/common/hw_features_common +@@ -171,6 +171,11 @@ OBJS += ../src/common/hw_features_common OBJS += ../src/eapol_auth/eapol_auth_sm.o @@ -57,7 +57,7 @@ accounting_deinit(hapd); hostapd_deinit_wpa(hapd); vlan_deinit(hapd); -@@ -1413,6 +1414,8 @@ static int hostapd_setup_bss(struct host +@@ -1417,6 +1418,8 @@ static int hostapd_setup_bss(struct host if (hapd->driver && hapd->driver->set_operstate) hapd->driver->set_operstate(hapd->drv_priv, 1); @@ -66,7 +66,7 @@ return 0; } -@@ -1988,6 +1991,7 @@ static int hostapd_setup_interface_compl +@@ -1999,6 +2002,7 @@ static int hostapd_setup_interface_compl if (err) goto fail; @@ -74,7 +74,7 @@ wpa_printf(MSG_DEBUG, "Completing interface initialization"); if (iface->freq) { #ifdef NEED_AP_MLME -@@ -2185,6 +2189,7 @@ dfs_offload: +@@ -2196,6 +2200,7 @@ dfs_offload: fail: wpa_printf(MSG_ERROR, "Interface initialization failed"); @@ -82,7 +82,7 @@ hostapd_set_state(iface, HAPD_IFACE_DISABLED); wpa_msg(hapd->msg_ctx, MSG_INFO, AP_EVENT_DISABLED); #ifdef CONFIG_FST -@@ -2658,6 +2663,7 @@ void hostapd_interface_deinit_free(struc +@@ -2669,6 +2674,7 @@ void hostapd_interface_deinit_free(struc (unsigned int) iface->conf->num_bss); driver = iface->bss[0]->driver; drv_priv = iface->bss[0]->drv_priv; @@ -92,7 +92,7 @@ __func__, driver, drv_priv); --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c -@@ -2252,13 +2252,18 @@ static void handle_auth(struct hostapd_d +@@ -2327,13 +2327,18 @@ static void handle_auth(struct hostapd_d u16 auth_alg, auth_transaction, status_code; u16 resp = WLAN_STATUS_SUCCESS; struct sta_info *sta = NULL; @@ -112,7 +112,7 @@ if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) { wpa_printf(MSG_INFO, "handle_auth - too short payload (len=%lu)", -@@ -2418,6 +2423,13 @@ static void handle_auth(struct hostapd_d +@@ -2493,6 +2498,13 @@ static void handle_auth(struct hostapd_d resp = WLAN_STATUS_UNSPECIFIED_FAILURE; goto fail; } @@ -126,7 +126,7 @@ if (res == HOSTAPD_ACL_PENDING) return; -@@ -4087,7 +4099,7 @@ static void handle_assoc(struct hostapd_ +@@ -4166,7 +4178,7 @@ static void handle_assoc(struct hostapd_ int resp = WLAN_STATUS_SUCCESS; u16 reply_res; const u8 *pos; @@ -135,7 +135,7 @@ struct sta_info *sta; u8 *tmp = NULL; #ifdef CONFIG_FILS -@@ -4300,6 +4312,11 @@ static void handle_assoc(struct hostapd_ +@@ -4379,6 +4391,11 @@ static void handle_assoc(struct hostapd_ left = res; } #endif /* CONFIG_FILS */ @@ -147,7 +147,7 @@ /* followed by SSID and Supported rates; and HT capabilities if 802.11n * is used */ -@@ -4464,6 +4481,14 @@ static void handle_assoc(struct hostapd_ +@@ -4543,6 +4560,14 @@ static void handle_assoc(struct hostapd_ pos, left, rssi, omit_rsnxe); os_free(tmp); @@ -162,7 +162,7 @@ /* * Remove the station in case tranmission of a success response fails * (the STA was added associated to the driver) or if the station was -@@ -4491,6 +4516,7 @@ static void handle_disassoc(struct hosta +@@ -4570,6 +4595,7 @@ static void handle_disassoc(struct hosta wpa_printf(MSG_DEBUG, "disassocation: STA=" MACSTR " reason_code=%d", MAC2STR(mgmt->sa), le_to_host16(mgmt->u.disassoc.reason_code)); @@ -170,7 +170,7 @@ sta = ap_get_sta(hapd, mgmt->sa); if (sta == NULL) { -@@ -4557,6 +4583,8 @@ static void handle_deauth(struct hostapd +@@ -4636,6 +4662,8 @@ static void handle_deauth(struct hostapd " reason_code=%d", MAC2STR(mgmt->sa), le_to_host16(mgmt->u.deauth.reason_code)); @@ -261,7 +261,7 @@ hapd->msg_ctx_parent != hapd->msg_ctx) --- a/src/ap/wpa_auth_glue.c +++ b/src/ap/wpa_auth_glue.c -@@ -251,6 +251,7 @@ static void hostapd_wpa_auth_psk_failure +@@ -259,6 +259,7 @@ static void hostapd_wpa_auth_psk_failure struct hostapd_data *hapd = ctx; wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_POSSIBLE_PSK_MISMATCH MACSTR, MAC2STR(addr)); @@ -284,7 +284,7 @@ ifdef CONFIG_CODE_COVERAGE CFLAGS += -O0 -fprofile-arcs -ftest-coverage LIBS += -lgcov -@@ -883,6 +889,9 @@ OBJS += ../src/pae/ieee802_1x_secy_ops.o +@@ -887,6 +893,9 @@ OBJS += ../src/pae/ieee802_1x_secy_ops.o ifdef CONFIG_AP OBJS += ../src/ap/wpa_auth_kay.o endif @@ -296,7 +296,7 @@ ifdef CONFIG_IEEE8021X_EAPOL --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -6793,6 +6793,8 @@ struct wpa_supplicant * wpa_supplicant_a +@@ -6797,6 +6797,8 @@ struct wpa_supplicant * wpa_supplicant_a } #endif /* CONFIG_P2P */ @@ -305,7 +305,7 @@ return wpa_s; } -@@ -6819,6 +6821,8 @@ int wpa_supplicant_remove_iface(struct w +@@ -6823,6 +6825,8 @@ int wpa_supplicant_remove_iface(struct w struct wpa_supplicant *parent = wpa_s->parent; #endif /* CONFIG_MESH */ @@ -314,7 +314,7 @@ /* Remove interface from the global list of interfaces */ prev = global->ifaces; if (prev == wpa_s) { -@@ -7122,8 +7126,12 @@ int wpa_supplicant_run(struct wpa_global +@@ -7126,8 +7130,12 @@ int wpa_supplicant_run(struct wpa_global eloop_register_signal_terminate(wpa_supplicant_terminate, global); eloop_register_signal_reconfig(wpa_supplicant_reconfig, global); diff --git a/package/network/services/hostapd/patches/700-wifi-reload.patch b/package/network/services/hostapd/patches/700-wifi-reload.patch index 82e5c806d4..8949789204 100644 --- a/package/network/services/hostapd/patches/700-wifi-reload.patch +++ b/package/network/services/hostapd/patches/700-wifi-reload.patch @@ -1,6 +1,6 @@ --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -2460,6 +2460,8 @@ static int hostapd_config_fill(struct ho +@@ -2501,6 +2501,8 @@ static int hostapd_config_fill(struct ho bss->isolate = atoi(pos); } else if (os_strcmp(buf, "ap_max_inactivity") == 0) { bss->ap_max_inactivity = atoi(pos); @@ -9,7 +9,7 @@ } else if (os_strcmp(buf, "skip_inactivity_poll") == 0) { bss->skip_inactivity_poll = atoi(pos); } else if (os_strcmp(buf, "country_code") == 0) { -@@ -3156,6 +3158,8 @@ static int hostapd_config_fill(struct ho +@@ -3197,6 +3199,8 @@ static int hostapd_config_fill(struct ho } } else if (os_strcmp(buf, "acs_exclude_dfs") == 0) { conf->acs_exclude_dfs = atoi(pos); @@ -20,7 +20,7 @@ } else if (os_strcmp(buf, "channel") == 0) { --- a/src/ap/ap_config.c +++ b/src/ap/ap_config.c -@@ -772,6 +772,7 @@ void hostapd_config_free_bss(struct host +@@ -780,6 +780,7 @@ void hostapd_config_free_bss(struct host os_free(conf->radius_req_attr_sqlite); os_free(conf->rsn_preauth_interfaces); os_free(conf->ctrl_interface); @@ -28,7 +28,7 @@ os_free(conf->ca_cert); os_free(conf->server_cert); os_free(conf->server_cert2); -@@ -964,6 +965,7 @@ void hostapd_config_free(struct hostapd_ +@@ -972,6 +973,7 @@ void hostapd_config_free(struct hostapd_ for (i = 0; i < conf->num_bss; i++) hostapd_config_free_bss(conf->bss[i]); @@ -38,7 +38,7 @@ os_free(conf->basic_rates); --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h -@@ -861,6 +861,7 @@ struct hostapd_bss_config { +@@ -871,6 +871,7 @@ struct hostapd_bss_config { */ u8 mka_psk_set; #endif /* CONFIG_MACSEC */ @@ -46,7 +46,7 @@ }; /** -@@ -1052,6 +1053,7 @@ struct hostapd_config { +@@ -1062,6 +1063,7 @@ struct hostapd_config { unsigned int airtime_update_interval; #define AIRTIME_MODE_MAX (__AIRTIME_MODE_MAX - 1) #endif /* CONFIG_AIRTIME_POLICY */ @@ -133,7 +133,7 @@ hapd->iconf = newconf; hapd->conf = newconf->bss[j]; hostapd_reload_bss(hapd); -@@ -2355,6 +2386,10 @@ hostapd_alloc_bss_data(struct hostapd_if +@@ -2366,6 +2397,10 @@ hostapd_alloc_bss_data(struct hostapd_if hapd->iconf = conf; hapd->conf = bss; hapd->iface = hapd_iface; @@ -174,7 +174,7 @@ hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface, --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -4492,6 +4492,9 @@ static int wpa_driver_nl80211_set_ap(voi +@@ -4493,6 +4493,9 @@ static int wpa_driver_nl80211_set_ap(voi if (ret) { wpa_printf(MSG_DEBUG, "nl80211: Beacon set failed: %d (%s)", ret, strerror(-ret)); diff --git a/package/network/services/umdns/Makefile b/package/network/services/umdns/Makefile index 42048c374c..01cf968679 100644 --- a/package/network/services/umdns/Makefile +++ b/package/network/services/umdns/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_URL=$(PROJECT_GIT)/project/mdnsd.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2020-04-25 -PKG_SOURCE_VERSION:=cdac0460ba50dc45735f0be2e19a5a8efc3dafe1 -PKG_MIRROR_HASH:=261cb929dfc03c1f293156cfdec8c2cd1541dcdc57ae42a323f9df5d26e6f7d2 +PKG_SOURCE_DATE:=2020-06-08 +PKG_SOURCE_VERSION:=d13290b427487bb05581e11875af3bfe74d6da2d +PKG_MIRROR_HASH:=6cd38b41b341212359ddc723fc54ea16a2a7009519db015fb51cd2afb7324369 PKG_MAINTAINER:=John Crispin PKG_LICENSE:=LGPL-2.1 diff --git a/package/system/ca-certificates/Makefile b/package/system/ca-certificates/Makefile index ea7d253fa2..239b442ebd 100644 --- a/package/system/ca-certificates/Makefile +++ b/package/system/ca-certificates/Makefile @@ -7,14 +7,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ca-certificates -PKG_VERSION:=20190110 -PKG_RELEASE:=2 +PKG_VERSION:=20200601 +PKG_RELEASE:=1 PKG_MAINTAINER:= PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/c/ca-certificates -PKG_HASH:=ee4bf0f4c6398005f5b5ca4e0b87b82837ac5c3b0280a1cb3a63c47555c3a675 - +PKG_HASH:=43766d5a436519503dfd65ab83488ae33ab4d4ca3d0993797b58c92eb9ed4e63 +PKG_BUILD_DIR:=$(BUILD_DIR)/work PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/package/zxlhhyccc/verysync/Makefile b/package/zxlhhyccc/verysync/Makefile index a33cce4148..a760dd4685 100644 --- a/package/zxlhhyccc/verysync/Makefile +++ b/package/zxlhhyccc/verysync/Makefile @@ -19,24 +19,18 @@ ifeq ($(ARCH),i386) PKG_ARCH_VERYSYNC:=386 endif ifeq ($(ARCH),arm) - PKG_ARCH_VERYSYNC:=arm7 -endif -ifeq ($(BOARD),bcm53xx) - PKG_ARCH_VERYSYNC:=arm6 -endif -ifeq ($(BOARD),kirkwood) - PKG_ARCH_VERYSYNC:=arm -endif -ifeq ($(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE)))),) PKG_ARCH_VERYSYNC:=arm endif ifeq ($(ARCH),aarch64) PKG_ARCH_VERYSYNC:=arm64 endif +ifeq ($(ARCH),powerpc64) + PKG_ARCH_VERYSYNC:=ppc64 +endif PKG_NAME:=verysync -PKG_VERSION:=v1.3.1 -PKG_RELEASE:=4 +PKG_VERSION:=v1.4.1 +PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-linux-$(PKG_ARCH_VERYSYNC)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://releases-cdn.verysync.com/releases/$(PKG_VERSION)/ @@ -48,7 +42,7 @@ define Package/$(PKG_NAME) SECTION:=net CATEGORY:=Network TITLE:=A efficient data transmission tool - DEPENDS:=@(aarch64||arm||i386||mips||mipsel||x86_64) + DEPENDS:= URL:=http://www.verysync.com endef diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dts b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dts index 75c68d83c7..38a1140968 100644 --- a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dts +++ b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dts @@ -32,3 +32,24 @@ read-only; }; }; + +&ath9k1 { + /* The original WNDR3700(v1) variant have four antennae dedicated + * to the 5GHz radio as well. Again, two antennae are available for + * each chain to switch between. The following configuration is the + * default setting which taken from the vendor's wifi + * code for that radio. + * + * All possible options [GPIO6,GPIO7,GPIO8,GPIO9]: + * [0,1,0,1], [0,1,1,0], [1,0,0,1], [1,0,1,0] + */ + antenna-demux { + gpio-hog; + line-name = "fixed antenna group 2"; + gpios = <6 GPIO_ACTIVE_LOW>, + <7 GPIO_ACTIVE_HIGH>, + <8 GPIO_ACTIVE_HIGH>, + <9 GPIO_ACTIVE_LOW>; + output-high; + }; +}; diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi index ab4f37da11..f1db1ffd58 100644 --- a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi +++ b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi @@ -160,6 +160,25 @@ qca,no-eeprom; #gpio-cells = <2>; gpio-controller; + + /* all WNDR3700 variants have four antennae dedicated + * to the 2.4GHz radio. Two antennae are available for + * each chain. The following configuration is the + * default setting which taken from the vendor's wifi + * code for that radio. + * + * All possible options [GPIO6,GPIO7,GPIO8,GPIO9]: + * [0,1,0,1], [0,1,1,0], [1,0,0,1], [1,0,1,0] + */ + antenna-demux { + gpio-hog; + line-name = "fixed antenna group 1"; + gpios = <6 GPIO_ACTIVE_LOW>, + <7 GPIO_ACTIVE_HIGH>, + <8 GPIO_ACTIVE_LOW>, + <9 GPIO_ACTIVE_HIGH>; + output-high; + }; }; ath9k1: wifi@0,12 { diff --git a/target/linux/bcm27xx/patches-5.4/950-0128-gpiolib-Don-t-prevent-IRQ-usage-of-output-GPIOs.patch b/target/linux/bcm27xx/patches-5.4/950-0128-gpiolib-Don-t-prevent-IRQ-usage-of-output-GPIOs.patch index 4286abf01a..bb32faef72 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0128-gpiolib-Don-t-prevent-IRQ-usage-of-output-GPIOs.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0128-gpiolib-Don-t-prevent-IRQ-usage-of-output-GPIOs.patch @@ -37,12 +37,14 @@ Signed-off-by: Phil Elwell gpiod_err(desc, "%s: tried to set a GPIO tied to an IRQ as output\n", __func__); -@@ -3894,7 +3896,7 @@ int gpiochip_lock_as_irq(struct gpio_chi - } +@@ -3895,8 +3897,8 @@ int gpiochip_lock_as_irq(struct gpio_chi } -- if (test_bit(FLAG_IS_OUT, &desc->flags)) { -+ if (dont_test_bit(FLAG_IS_OUT, &desc->flags)) { + /* To be valid for IRQ the line needs to be input or open drain */ +- if (test_bit(FLAG_IS_OUT, &desc->flags) && +- !test_bit(FLAG_OPEN_DRAIN, &desc->flags)) { ++ if (dont_test_bit(FLAG_IS_OUT, &desc->flags) && ++ !dont_test_bit(FLAG_OPEN_DRAIN, &desc->flags)) { chip_err(chip, "%s: tried to flag a GPIO set as output for IRQ\n", __func__); diff --git a/target/linux/bcm53xx/patches-5.4/700-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch b/target/linux/bcm53xx/patches-5.4/700-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch index 91bb4fae11..a5f13afe02 100644 --- a/target/linux/bcm53xx/patches-5.4/700-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch +++ b/target/linux/bcm53xx/patches-5.4/700-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch @@ -21,7 +21,7 @@ Signed-off-by: Rafał Miłecki #include "b53_regs.h" #include "b53_priv.h" -@@ -1579,6 +1580,28 @@ static int b53_switch_init(struct b53_de +@@ -1587,6 +1588,28 @@ static int b53_switch_init(struct b53_de return ret; } diff --git a/target/linux/generic/backport-5.4/745-v5.7-net-dsa-mt7530-add-support-for-port-mirroring.patch b/target/linux/generic/backport-5.4/745-v5.7-net-dsa-mt7530-add-support-for-port-mirroring.patch index 4dadb517a3..e788118259 100644 --- a/target/linux/generic/backport-5.4/745-v5.7-net-dsa-mt7530-add-support-for-port-mirroring.patch +++ b/target/linux/generic/backport-5.4/745-v5.7-net-dsa-mt7530-add-support-for-port-mirroring.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1151,6 +1151,64 @@ mt7530_port_vlan_del(struct dsa_switch * +@@ -1153,6 +1153,64 @@ mt7530_port_vlan_del(struct dsa_switch * return 0; } @@ -93,7 +93,7 @@ Signed-off-by: David S. Miller .phylink_mac_config = mt7530_phylink_mac_config, --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -36,6 +36,9 @@ enum { +@@ -37,6 +37,9 @@ enum { #define CPU_EN BIT(7) #define CPU_PORT(x) ((x) << 4) #define CPU_MASK (0xf << 4) @@ -103,7 +103,7 @@ Signed-off-by: David S. Miller /* Registers for address table access */ #define MT7530_ATA1 0x74 -@@ -141,6 +144,8 @@ enum mt7530_stp_state { +@@ -142,6 +145,8 @@ enum mt7530_stp_state { /* Register for port control */ #define MT7530_PCR_P(x) (0x2004 + ((x) * 0x100)) @@ -112,7 +112,7 @@ Signed-off-by: David S. Miller #define PORT_VLAN(x) ((x) & 0x3) enum mt7530_port_mode { -@@ -457,6 +462,8 @@ struct mt7530_priv { +@@ -464,6 +469,8 @@ struct mt7530_priv { phy_interface_t p6_interface; phy_interface_t p5_interface; unsigned int p5_intf_sel; diff --git a/target/linux/generic/backport-5.4/751-v5.8-net-dsa-mt7530-set-CPU-port-to-fallback-mode.patch b/target/linux/generic/backport-5.4/751-v5.8-net-dsa-mt7530-set-CPU-port-to-fallback-mode.patch deleted file mode 100644 index 7b68fac8be..0000000000 --- a/target/linux/generic/backport-5.4/751-v5.8-net-dsa-mt7530-set-CPU-port-to-fallback-mode.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 38152ea37d8bdaffa22603e0a5b5b86cfa8714c9 Mon Sep 17 00:00:00 2001 -From: DENG Qingfang -Date: Wed, 13 May 2020 23:37:17 +0800 -Subject: net: dsa: mt7530: set CPU port to fallback mode - -Currently, setting a bridge's self PVID to other value and deleting -the default VID 1 renders untagged ports of that VLAN unable to talk to -the CPU port: - - bridge vlan add dev br0 vid 2 pvid untagged self - bridge vlan del dev br0 vid 1 self - bridge vlan add dev sw0p0 vid 2 pvid untagged - bridge vlan del dev sw0p0 vid 1 - # br0 cannot send untagged frames out of sw0p0 anymore - -That is because the CPU port is set to security mode and its PVID is -still 1, and untagged frames are dropped due to VLAN member violation. - -Set the CPU port to fallback mode so untagged frames can pass through. - -Fixes: 83163f7dca56 ("net: dsa: mediatek: add VLAN support for MT7530") -Signed-off-by: DENG Qingfang -Reviewed-by: Florian Fainelli -Signed-off-by: David S. Miller ---- - drivers/net/dsa/mt7530.c | 11 ++++++++--- - drivers/net/dsa/mt7530.h | 6 ++++++ - 2 files changed, 14 insertions(+), 3 deletions(-) - ---- a/drivers/net/dsa/mt7530.c -+++ b/drivers/net/dsa/mt7530.c -@@ -821,10 +821,15 @@ mt7530_port_set_vlan_aware(struct dsa_sw - PCR_MATRIX_MASK, PCR_MATRIX(MT7530_ALL_MEMBERS)); - - /* Trapped into security mode allows packet forwarding through VLAN -- * table lookup. -+ * table lookup. CPU port is set to fallback mode to let untagged -+ * frames pass through. - */ -- mt7530_rmw(priv, MT7530_PCR_P(port), PCR_PORT_VLAN_MASK, -- MT7530_PORT_SECURITY_MODE); -+ if (dsa_is_cpu_port(ds, port)) -+ mt7530_rmw(priv, MT7530_PCR_P(port), PCR_PORT_VLAN_MASK, -+ MT7530_PORT_FALLBACK_MODE); -+ else -+ mt7530_rmw(priv, MT7530_PCR_P(port), PCR_PORT_VLAN_MASK, -+ MT7530_PORT_SECURITY_MODE); - - /* Set the port as a user port which is to be able to recognize VID - * from incoming packets before fetching entry within the VLAN table. ---- a/drivers/net/dsa/mt7530.h -+++ b/drivers/net/dsa/mt7530.h -@@ -152,6 +152,12 @@ enum mt7530_port_mode { - /* Port Matrix Mode: Frames are forwarded by the PCR_MATRIX members. */ - MT7530_PORT_MATRIX_MODE = PORT_VLAN(0), - -+ /* Fallback Mode: Forward received frames with ingress ports that do -+ * not belong to the VLAN member. Frames whose VID is not listed on -+ * the VLAN table are forwarded by the PCR_MATRIX members. -+ */ -+ MT7530_PORT_FALLBACK_MODE = PORT_VLAN(1), -+ - /* Security Mode: Discard any frame due to ingress membership - * violation or VID missed on the VLAN table. - */ diff --git a/target/linux/generic/backport-5.4/753-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch b/target/linux/generic/backport-5.4/753-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch index 8d64d2e672..c9c2a6392e 100644 --- a/target/linux/generic/backport-5.4/753-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch +++ b/target/linux/generic/backport-5.4/753-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch @@ -15,7 +15,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1096,12 +1096,6 @@ mt7530_port_vlan_add(struct dsa_switch * +@@ -1093,12 +1093,6 @@ mt7530_port_vlan_add(struct dsa_switch * struct mt7530_priv *priv = ds->priv; u16 vid; @@ -28,7 +28,7 @@ Signed-off-by: David S. Miller mutex_lock(&priv->reg_mutex); for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) { -@@ -1127,12 +1121,6 @@ mt7530_port_vlan_del(struct dsa_switch * +@@ -1124,12 +1118,6 @@ mt7530_port_vlan_del(struct dsa_switch * struct mt7530_priv *priv = ds->priv; u16 vid, pvid; @@ -41,7 +41,7 @@ Signed-off-by: David S. Miller mutex_lock(&priv->reg_mutex); pvid = priv->ports[port].pvid; -@@ -1245,6 +1233,7 @@ mt7530_setup(struct dsa_switch *ds) +@@ -1242,6 +1230,7 @@ mt7530_setup(struct dsa_switch *ds) * as two netdev instances. */ dn = ds->ports[MT7530_CPU_PORT].master->dev.of_node->parent; diff --git a/target/linux/generic/backport-5.4/754-v5.7-net-dsa-mt7530-fix-roaming-from-DSA-user-ports.patch b/target/linux/generic/backport-5.4/754-v5.7-net-dsa-mt7530-fix-roaming-from-DSA-user-ports.patch deleted file mode 100644 index 1dcc9e44f7..0000000000 --- a/target/linux/generic/backport-5.4/754-v5.7-net-dsa-mt7530-fix-roaming-from-DSA-user-ports.patch +++ /dev/null @@ -1,116 +0,0 @@ -From 5e5502e012b8129e11be616acb0f9c34bc8f8adb Mon Sep 17 00:00:00 2001 -From: DENG Qingfang -Date: Wed, 13 May 2020 23:10:16 +0800 -Subject: net: dsa: mt7530: fix roaming from DSA user ports - -When a client moves from a DSA user port to a software port in a bridge, -it cannot reach any other clients that connected to the DSA user ports. -That is because SA learning on the CPU port is disabled, so the switch -ignores the client's frames from the CPU port and still thinks it is at -the user port. - -Fix it by enabling SA learning on the CPU port. - -To prevent the switch from learning from flooding frames from the CPU -port, set skb->offload_fwd_mark to 1 for unicast and broadcast frames, -and let the switch flood them instead of trapping to the CPU port. -Multicast frames still need to be trapped to the CPU port for snooping, -so set the SA_DIS bit of the MTK tag to 1 when transmitting those frames -to disable SA learning. - -Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") -Signed-off-by: DENG Qingfang -Signed-off-by: David S. Miller ---- - drivers/net/dsa/mt7530.c | 9 ++------- - drivers/net/dsa/mt7530.h | 1 + - net/dsa/tag_mtk.c | 15 +++++++++++++++ - 3 files changed, 18 insertions(+), 7 deletions(-) - ---- a/drivers/net/dsa/mt7530.c -+++ b/drivers/net/dsa/mt7530.c -@@ -639,11 +639,8 @@ mt7530_cpu_port_enable(struct mt7530_pri - mt7530_write(priv, MT7530_PVC_P(port), - PORT_SPEC_TAG); - -- /* Disable auto learning on the cpu port */ -- mt7530_set(priv, MT7530_PSC_P(port), SA_DIS); -- -- /* Unknown unicast frame fordwarding to the cpu port */ -- mt7530_set(priv, MT7530_MFC, UNU_FFP(BIT(port))); -+ /* Unknown multicast frame forwarding to the cpu port */ -+ mt7530_rmw(priv, MT7530_MFC, UNM_FFP_MASK, UNM_FFP(BIT(port))); - - /* Set CPU port number */ - if (priv->id == ID_MT7621) -@@ -1298,8 +1295,6 @@ mt7530_setup(struct dsa_switch *ds) - /* Enable and reset MIB counters */ - mt7530_mib_reset(ds); - -- mt7530_clear(priv, MT7530_MFC, UNU_FFP_MASK); -- - for (i = 0; i < MT7530_NUM_PORTS; i++) { - /* Disable forwarding by default on all ports */ - mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK, ---- a/drivers/net/dsa/mt7530.h -+++ b/drivers/net/dsa/mt7530.h -@@ -31,6 +31,7 @@ enum { - #define MT7530_MFC 0x10 - #define BC_FFP(x) (((x) & 0xff) << 24) - #define UNM_FFP(x) (((x) & 0xff) << 16) -+#define UNM_FFP_MASK UNM_FFP(~0) - #define UNU_FFP(x) (((x) & 0xff) << 8) - #define UNU_FFP_MASK UNU_FFP(~0) - #define CPU_EN BIT(7) ---- a/net/dsa/tag_mtk.c -+++ b/net/dsa/tag_mtk.c -@@ -15,6 +15,7 @@ - #define MTK_HDR_XMIT_TAGGED_TPID_8100 1 - #define MTK_HDR_RECV_SOURCE_PORT_MASK GENMASK(2, 0) - #define MTK_HDR_XMIT_DP_BIT_MASK GENMASK(5, 0) -+#define MTK_HDR_XMIT_SA_DIS BIT(6) - - static struct sk_buff *mtk_tag_xmit(struct sk_buff *skb, - struct net_device *dev) -@@ -22,6 +23,9 @@ static struct sk_buff *mtk_tag_xmit(stru - struct dsa_port *dp = dsa_slave_to_port(dev); - u8 *mtk_tag; - bool is_vlan_skb = true; -+ unsigned char *dest = eth_hdr(skb)->h_dest; -+ bool is_multicast_skb = is_multicast_ether_addr(dest) && -+ !is_broadcast_ether_addr(dest); - - /* Build the special tag after the MAC Source Address. If VLAN header - * is present, it's required that VLAN header and special tag is -@@ -47,6 +51,10 @@ static struct sk_buff *mtk_tag_xmit(stru - MTK_HDR_XMIT_UNTAGGED; - mtk_tag[1] = (1 << dp->index) & MTK_HDR_XMIT_DP_BIT_MASK; - -+ /* Disable SA learning for multicast frames */ -+ if (unlikely(is_multicast_skb)) -+ mtk_tag[1] |= MTK_HDR_XMIT_SA_DIS; -+ - /* Tag control information is kept for 802.1Q */ - if (!is_vlan_skb) { - mtk_tag[2] = 0; -@@ -61,6 +69,9 @@ static struct sk_buff *mtk_tag_rcv(struc - { - int port; - __be16 *phdr, hdr; -+ unsigned char *dest = eth_hdr(skb)->h_dest; -+ bool is_multicast_skb = is_multicast_ether_addr(dest) && -+ !is_broadcast_ether_addr(dest); - - if (unlikely(!pskb_may_pull(skb, MTK_HDR_LEN))) - return NULL; -@@ -86,6 +97,10 @@ static struct sk_buff *mtk_tag_rcv(struc - if (!skb->dev) - return NULL; - -+ /* Only unicast or broadcast frames are offloaded */ -+ if (likely(!is_multicast_skb)) -+ skb->offload_fwd_mark = 1; -+ - return skb; - } - diff --git a/target/linux/generic/pending-5.4/332-arc-add-OWRTDTB-section.patch b/target/linux/generic/pending-5.4/332-arc-add-OWRTDTB-section.patch index c30dbc94ef..4b0534eff7 100644 --- a/target/linux/generic/pending-5.4/332-arc-add-OWRTDTB-section.patch +++ b/target/linux/generic/pending-5.4/332-arc-add-OWRTDTB-section.patch @@ -42,7 +42,7 @@ Signed-off-by: Evgeniy Didin ;---------------------------------------------------------------- --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c -@@ -491,6 +491,8 @@ static inline bool uboot_arg_invalid(uns +@@ -492,6 +492,8 @@ static inline bool uboot_arg_invalid(uns /* We always pass 0 as magic from U-boot */ #define UBOOT_MAGIC_VALUE 0 @@ -51,7 +51,7 @@ Signed-off-by: Evgeniy Didin void __init handle_uboot_args(void) { bool use_embedded_dtb = true; -@@ -529,7 +531,7 @@ void __init handle_uboot_args(void) +@@ -530,7 +532,7 @@ void __init handle_uboot_args(void) ignore_uboot_args: if (use_embedded_dtb) { diff --git a/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index f199f497e4..aae3d35f46 100644 --- a/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-5.4/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 -@@ -5461,6 +5461,9 @@ static enum gro_result dev_gro_receive(s +@@ -5471,6 +5471,9 @@ static enum gro_result dev_gro_receive(s int same_flow; int grow; @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau if (netif_elide_gro(skb->dev)) goto normal; -@@ -7254,6 +7257,48 @@ static void __netdev_adjacent_dev_unlink +@@ -7264,6 +7267,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, -@@ -7304,6 +7349,7 @@ static int __netdev_upper_dev_link(struc +@@ -7314,6 +7359,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, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -7397,6 +7443,7 @@ void netdev_upper_dev_unlink(struct net_ +@@ -7407,6 +7453,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, &changeupper_info.info); -@@ -8127,6 +8174,7 @@ int dev_set_mac_address(struct net_devic +@@ -8137,6 +8184,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/imx6/patches-5.4/006-v5.7-ARM-dts-imx-ventana-add-fxos8700-on-gateworks-boards.patch b/target/linux/imx6/patches-5.4/006-v5.7-ARM-dts-imx-ventana-add-fxos8700-on-gateworks-boards.patch index e2c8980a43..1d8844fb0d 100644 --- a/target/linux/imx6/patches-5.4/006-v5.7-ARM-dts-imx-ventana-add-fxos8700-on-gateworks-boards.patch +++ b/target/linux/imx6/patches-5.4/006-v5.7-ARM-dts-imx-ventana-add-fxos8700-on-gateworks-boards.patch @@ -13,8 +13,6 @@ Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 5 +++++ 3 files changed, 15 insertions(+) -diff --git a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi -index 1a9a9d9..60563ff 100644 --- a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi @@ -313,6 +313,11 @@ @@ -29,8 +27,6 @@ index 1a9a9d9..60563ff 100644 }; &ldb { -diff --git a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi -index 54b2bea..8942bec 100644 --- a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi @@ -304,6 +304,11 @@ @@ -45,8 +41,6 @@ index 54b2bea..8942bec 100644 }; &ldb { -diff --git a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi -index 1b6c133..c40583d 100644 --- a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi @@ -361,6 +361,11 @@ @@ -61,6 +55,3 @@ index 1b6c133..c40583d 100644 }; &ldb { --- -2.7.4 - diff --git a/target/linux/imx6/patches-5.4/006-v5.7-ARM-dts-imx6qdl-gw5910-add-CC1352-UART.patch b/target/linux/imx6/patches-5.4/006-v5.7-ARM-dts-imx6qdl-gw5910-add-CC1352-UART.patch index 5f5dc0aed1..5873e92626 100644 --- a/target/linux/imx6/patches-5.4/006-v5.7-ARM-dts-imx6qdl-gw5910-add-CC1352-UART.patch +++ b/target/linux/imx6/patches-5.4/006-v5.7-ARM-dts-imx6qdl-gw5910-add-CC1352-UART.patch @@ -11,8 +11,6 @@ Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-gw5910.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) -diff --git a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi -index be1af74..30fe47f 100644 --- a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi @@ -220,6 +220,14 @@ @@ -54,6 +52,3 @@ index be1af74..30fe47f 100644 pinctrl_uart4: uart4grp { fsl,pins = < MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA 0x1b0b1 --- -2.7.4 - diff --git a/target/linux/imx6/patches-5.4/006-v5.8-ARM-dts-imx6qdl-gw552x-add-USB-OTG-support.patch b/target/linux/imx6/patches-5.4/006-v5.8-ARM-dts-imx6qdl-gw552x-add-USB-OTG-support.patch index b0ac409f7e..8d436be631 100644 --- a/target/linux/imx6/patches-5.4/006-v5.8-ARM-dts-imx6qdl-gw552x-add-USB-OTG-support.patch +++ b/target/linux/imx6/patches-5.4/006-v5.8-ARM-dts-imx6qdl-gw552x-add-USB-OTG-support.patch @@ -13,8 +13,6 @@ Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-gw552x.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) -diff --git a/arch/arm/boot/dts/imx6qdl-gw552x.dtsi b/arch/arm/boot/dts/imx6qdl-gw552x.dtsi -index dc646b7..bb35971 100644 --- a/arch/arm/boot/dts/imx6qdl-gw552x.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw552x.dtsi @@ -258,6 +258,14 @@ @@ -45,6 +43,3 @@ index dc646b7..bb35971 100644 pinctrl_wdog: wdoggrp { fsl,pins = < MX6QDL_PAD_DISP0_DAT8__WDOG1_B 0x1b0b0 --- -2.7.4 - diff --git a/target/linux/imx6/patches-5.4/007-v5.8-ARM-dts-imx6qdl-gw560x-add-lsm9ds1-iio-imu-magn-supp.patch b/target/linux/imx6/patches-5.4/007-v5.8-ARM-dts-imx6qdl-gw560x-add-lsm9ds1-iio-imu-magn-supp.patch index cb8f17222a..537b6f4d67 100644 --- a/target/linux/imx6/patches-5.4/007-v5.8-ARM-dts-imx6qdl-gw560x-add-lsm9ds1-iio-imu-magn-supp.patch +++ b/target/linux/imx6/patches-5.4/007-v5.8-ARM-dts-imx6qdl-gw560x-add-lsm9ds1-iio-imu-magn-supp.patch @@ -13,8 +13,6 @@ Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-gw560x.dtsi | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) -diff --git a/arch/arm/boot/dts/imx6qdl-gw560x.dtsi b/arch/arm/boot/dts/imx6qdl-gw560x.dtsi -index e8e36df..69ca70d 100644 --- a/arch/arm/boot/dts/imx6qdl-gw560x.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw560x.dtsi @@ -295,6 +295,15 @@ @@ -76,6 +74,3 @@ index e8e36df..69ca70d 100644 pinctrl_pcie: pciegrp { fsl,pins = < MX6QDL_PAD_DISP0_DAT10__GPIO4_IO31 0x1b0b0 /* PCI_RST# */ --- -2.7.4 - diff --git a/target/linux/imx6/patches-5.4/008-v5.8-ARM-dts-imx6qdl-gw5904-add-lsm9ds1-iio-imu-magn-supp.patch b/target/linux/imx6/patches-5.4/008-v5.8-ARM-dts-imx6qdl-gw5904-add-lsm9ds1-iio-imu-magn-supp.patch index 9befdbe0a0..4d24b40535 100644 --- a/target/linux/imx6/patches-5.4/008-v5.8-ARM-dts-imx6qdl-gw5904-add-lsm9ds1-iio-imu-magn-supp.patch +++ b/target/linux/imx6/patches-5.4/008-v5.8-ARM-dts-imx6qdl-gw5904-add-lsm9ds1-iio-imu-magn-supp.patch @@ -13,8 +13,6 @@ Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-gw5904.dtsi | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) -diff --git a/arch/arm/boot/dts/imx6qdl-gw5904.dtsi b/arch/arm/boot/dts/imx6qdl-gw5904.dtsi -index 6d21cc6..76d6cf5 100644 --- a/arch/arm/boot/dts/imx6qdl-gw5904.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw5904.dtsi @@ -248,6 +248,15 @@ @@ -69,6 +67,3 @@ index 6d21cc6..76d6cf5 100644 pinctrl_pcie: pciegrp { fsl,pins = < MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x1b0b0 /* PCIE RST */ --- -2.7.4 - diff --git a/target/linux/imx6/patches-5.4/009-v5.8-ARM-dts-imx6qdl-gw5910-add-support-for-bcm4330-bt.patch b/target/linux/imx6/patches-5.4/009-v5.8-ARM-dts-imx6qdl-gw5910-add-support-for-bcm4330-bt.patch index ca11c5462a..6cbd6fdd03 100644 --- a/target/linux/imx6/patches-5.4/009-v5.8-ARM-dts-imx6qdl-gw5910-add-support-for-bcm4330-bt.patch +++ b/target/linux/imx6/patches-5.4/009-v5.8-ARM-dts-imx6qdl-gw5910-add-support-for-bcm4330-bt.patch @@ -16,8 +16,6 @@ Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-gw5910.dtsi | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) -diff --git a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi -index 30fe47f..b850f8f 100644 --- a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi @@ -83,19 +83,6 @@ @@ -82,6 +80,3 @@ index 30fe47f..b850f8f 100644 pinctrl_reg_wl: regwlgrp { fsl,pins = < MX6QDL_PAD_GPIO_5__GPIO1_IO05 0x1b0b1 --- -2.7.4 - diff --git a/target/linux/imx6/patches-5.4/010-v5.8-ARM-dts-imx6qdl-gw5910-fix-wlan-regulator.patch b/target/linux/imx6/patches-5.4/010-v5.8-ARM-dts-imx6qdl-gw5910-fix-wlan-regulator.patch index 8a9158ae00..c4cce19b93 100644 --- a/target/linux/imx6/patches-5.4/010-v5.8-ARM-dts-imx6qdl-gw5910-fix-wlan-regulator.patch +++ b/target/linux/imx6/patches-5.4/010-v5.8-ARM-dts-imx6qdl-gw5910-fix-wlan-regulator.patch @@ -12,8 +12,6 @@ Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-gw5910.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -diff --git a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi -index b850f8f..0857de5 100644 --- a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi @@ -81,7 +81,6 @@ @@ -33,6 +31,3 @@ index b850f8f..0857de5 100644 non-removable; bus-width = <4>; status = "okay"; --- -2.7.4 - diff --git a/target/linux/layerscape/patches-5.4/701-net-0122-config-enable-SDK-FMan-driver.patch b/target/linux/layerscape/patches-5.4/701-net-0122-config-enable-SDK-FMan-driver.patch index 47d801160a..49cece6fb7 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0122-config-enable-SDK-FMan-driver.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0122-config-enable-SDK-FMan-driver.patch @@ -10,7 +10,7 @@ Signed-off-by: Madalin Bucur --- a/drivers/net/ethernet/freescale/Kconfig +++ b/drivers/net/ethernet/freescale/Kconfig -@@ -95,6 +95,7 @@ config GIANFAR +@@ -97,6 +97,7 @@ config GIANFAR This driver supports the Gigabit TSEC on the MPC83xx, MPC85xx, and MPC86xx family of chips, the eTSEC on LS1021A and the FEC on the 8540. diff --git a/target/linux/layerscape/patches-5.4/701-net-0123-config-enable-SDK-DPAA-driver.patch b/target/linux/layerscape/patches-5.4/701-net-0123-config-enable-SDK-DPAA-driver.patch index e025c145ed..05b1aee807 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0123-config-enable-SDK-DPAA-driver.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0123-config-enable-SDK-DPAA-driver.patch @@ -10,7 +10,7 @@ Signed-off-by: Madalin Bucur --- a/drivers/net/ethernet/freescale/Kconfig +++ b/drivers/net/ethernet/freescale/Kconfig -@@ -96,7 +96,7 @@ config GIANFAR +@@ -98,7 +98,7 @@ config GIANFAR and MPC86xx family of chips, the eTSEC on LS1021A and the FEC on the 8540. source "drivers/net/ethernet/freescale/sdk_fman/Kconfig" diff --git a/target/linux/layerscape/patches-5.4/701-net-0273-net-dsa-ocelot-add-tsn-support-for-felix-switch.patch b/target/linux/layerscape/patches-5.4/701-net-0273-net-dsa-ocelot-add-tsn-support-for-felix-switch.patch index aae0e670f2..6166a49ce6 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0273-net-dsa-ocelot-add-tsn-support-for-felix-switch.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0273-net-dsa-ocelot-add-tsn-support-for-felix-switch.patch @@ -648,7 +648,7 @@ Signed-off-by: Xiaoliang Yang static const u32 vsc9959_gcb_regmap[] = { --- a/include/net/dsa.h +++ b/include/net/dsa.h -@@ -545,6 +545,7 @@ struct dsa_switch_ops { +@@ -552,6 +552,7 @@ struct dsa_switch_ops { */ netdev_tx_t (*port_deferred_xmit)(struct dsa_switch *ds, int port, struct sk_buff *skb); diff --git a/target/linux/layerscape/patches-5.4/701-net-0381-net-dsa-Pass-pcs_poll-flag-from-driver-to-PHYLINK.patch b/target/linux/layerscape/patches-5.4/701-net-0381-net-dsa-Pass-pcs_poll-flag-from-driver-to-PHYLINK.patch index 40d22f4652..d3fdfb3fb1 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0381-net-dsa-Pass-pcs_poll-flag-from-driver-to-PHYLINK.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0381-net-dsa-Pass-pcs_poll-flag-from-driver-to-PHYLINK.patch @@ -24,7 +24,7 @@ on touch") which was merged in v5.4-rc3. --- a/include/net/dsa.h +++ b/include/net/dsa.h -@@ -277,6 +277,11 @@ struct dsa_switch { +@@ -284,6 +284,11 @@ struct dsa_switch { */ bool vlan_filtering; @@ -38,7 +38,7 @@ on touch") which was merged in v5.4-rc3. struct dsa_port ports[]; --- a/net/dsa/port.c +++ b/net/dsa/port.c -@@ -625,6 +625,7 @@ static int dsa_port_phylink_register(str +@@ -639,6 +639,7 @@ static int dsa_port_phylink_register(str dp->pl_config.dev = ds->dev; dp->pl_config.type = PHYLINK_DEV; diff --git a/target/linux/layerscape/patches-5.4/814-qe-0006-config-qe-add-irq-qeic-support.patch b/target/linux/layerscape/patches-5.4/814-qe-0006-config-qe-add-irq-qeic-support.patch index 7aaf8c7162..bace6fd8f0 100644 --- a/target/linux/layerscape/patches-5.4/814-qe-0006-config-qe-add-irq-qeic-support.patch +++ b/target/linux/layerscape/patches-5.4/814-qe-0006-config-qe-add-irq-qeic-support.patch @@ -58,4 +58,4 @@ Signed-off-by: Zhao Qiang + depends on QUICC_ENGINE && FSL_SOC && PPC32 select FSL_PQ_MDIO select PHYLIB - ---help--- + select FIXED_PHY diff --git a/target/linux/mediatek/patches-5.4/0500-v5.6-crypto-backport-inside-secure.patch b/target/linux/mediatek/patches-5.4/0500-v5.6-crypto-backport-inside-secure.patch index 3237c12c15..2fae90ef9e 100644 --- a/target/linux/mediatek/patches-5.4/0500-v5.6-crypto-backport-inside-secure.patch +++ b/target/linux/mediatek/patches-5.4/0500-v5.6-crypto-backport-inside-secure.patch @@ -1,6 +1,6 @@ --- a/drivers/crypto/inside-secure/safexcel.c +++ b/drivers/crypto/inside-secure/safexcel.c -@@ -75,9 +75,9 @@ +@@ -75,9 +75,9 @@ static void eip197_trc_cache_banksel(str } static u32 eip197_trc_cache_probe(struct safexcel_crypto_priv *priv, @@ -12,7 +12,7 @@ int actbank; /* -@@ -87,32 +87,37 @@ +@@ -87,32 +87,37 @@ static u32 eip197_trc_cache_probe(struct addrhi = 1 << (16 + maxbanks); addrlo = 0; actbank = min(maxbanks - 1, 0); @@ -60,7 +60,7 @@ } return addrhi; } -@@ -150,7 +155,7 @@ +@@ -150,7 +155,7 @@ static void eip197_trc_cache_clear(struc htable_offset + i * sizeof(u32)); } @@ -69,7 +69,7 @@ { u32 val, dsize, asize; int cs_rc_max, cs_ht_wc, cs_trc_rec_wc, cs_trc_lg_rec_wc; -@@ -183,7 +188,7 @@ +@@ -183,7 +188,7 @@ static void eip197_trc_cache_init(struct writel(val, priv->base + EIP197_TRC_PARAMS); /* Probed data RAM size in bytes */ @@ -78,7 +78,7 @@ /* * Now probe the administration RAM size pretty much the same way -@@ -196,11 +201,18 @@ +@@ -196,11 +201,18 @@ static void eip197_trc_cache_init(struct writel(val, priv->base + EIP197_TRC_PARAMS); /* Probed admin RAM size in admin words */ @@ -98,7 +98,7 @@ /* * Determine optimal configuration from RAM sizes * Note that we assume that the physical RAM configuration is sane -@@ -251,6 +263,7 @@ +@@ -251,6 +263,7 @@ static void eip197_trc_cache_init(struct dev_info(priv->dev, "TRC init: %dd,%da (%dr,%dh)\n", dsize, asize, cs_rc_max, cs_ht_wc + cs_ht_wc); @@ -106,7 +106,7 @@ } static void eip197_init_firmware(struct safexcel_crypto_priv *priv) -@@ -298,13 +311,14 @@ +@@ -298,13 +311,14 @@ static void eip197_init_firmware(struct static int eip197_write_firmware(struct safexcel_crypto_priv *priv, const struct firmware *fw) { @@ -123,7 +123,7 @@ /* Exclude final 2 NOPs from size */ return i - EIP197_FW_TERMINAL_NOPS; -@@ -471,6 +485,14 @@ +@@ -471,6 +485,14 @@ static int safexcel_hw_setup_cdesc_rings cd_fetch_cnt = ((1 << priv->hwconfig.hwcfsize) / cd_size_rnd) - 1; } @@ -138,7 +138,7 @@ for (i = 0; i < priv->config.rings; i++) { /* ring base address */ -@@ -479,12 +501,12 @@ +@@ -479,12 +501,12 @@ static int safexcel_hw_setup_cdesc_rings writel(upper_32_bits(priv->ring[i].cdr.base_dma), EIP197_HIA_CDR(priv, i) + EIP197_HIA_xDR_RING_BASE_ADDR_HI); @@ -154,7 +154,7 @@ EIP197_HIA_CDR(priv, i) + EIP197_HIA_xDR_CFG); /* Configure DMA tx control */ -@@ -527,13 +549,13 @@ +@@ -527,13 +549,13 @@ static int safexcel_hw_setup_rdesc_rings writel(upper_32_bits(priv->ring[i].rdr.base_dma), EIP197_HIA_RDR(priv, i) + EIP197_HIA_xDR_RING_BASE_ADDR_HI); @@ -170,7 +170,7 @@ EIP197_HIA_RDR(priv, i) + EIP197_HIA_xDR_CFG); /* Configure DMA tx control */ -@@ -559,7 +581,7 @@ +@@ -559,7 +581,7 @@ static int safexcel_hw_setup_rdesc_rings static int safexcel_hw_init(struct safexcel_crypto_priv *priv) { u32 val; @@ -179,7 +179,7 @@ dev_dbg(priv->dev, "HW init: using %d pipe(s) and %d ring(s)\n", priv->config.pes, priv->config.rings); -@@ -595,8 +617,8 @@ +@@ -595,8 +617,8 @@ static int safexcel_hw_init(struct safex writel(EIP197_DxE_THR_CTRL_RESET_PE, EIP197_HIA_DFE_THR(priv) + EIP197_HIA_DFE_THR_CTRL(pe)); @@ -190,7 +190,7 @@ writel(EIP197_HIA_RA_PE_CTRL_RESET, EIP197_HIA_AIC(priv) + EIP197_HIA_RA_PE_CTRL(pe)); -@@ -639,9 +661,16 @@ +@@ -639,9 +661,16 @@ static int safexcel_hw_init(struct safex ; /* DMA transfer size to use */ @@ -209,7 +209,7 @@ val |= EIP197_HIA_DxE_CFG_DATA_CACHE_CTRL(WR_CACHE_3BITS); val |= EIP197_HIA_DSE_CFG_ALWAYS_BUFFERABLE; /* FIXME: instability issues can occur for EIP97 but disabling -@@ -655,8 +684,8 @@ +@@ -655,8 +684,8 @@ static int safexcel_hw_init(struct safex writel(0, EIP197_HIA_DSE_THR(priv) + EIP197_HIA_DSE_THR_CTRL(pe)); /* Configure the procesing engine thresholds */ @@ -220,7 +220,7 @@ EIP197_PE(priv) + EIP197_PE_OUT_DBUF_THRES(pe)); /* Processing Engine configuration */ -@@ -696,7 +725,7 @@ +@@ -696,7 +725,7 @@ static int safexcel_hw_init(struct safex writel(0, EIP197_HIA_CDR(priv, i) + EIP197_HIA_xDR_PROC_PNTR); @@ -229,7 +229,7 @@ EIP197_HIA_CDR(priv, i) + EIP197_HIA_xDR_RING_SIZE); } -@@ -719,7 +748,7 @@ +@@ -719,7 +748,7 @@ static int safexcel_hw_init(struct safex EIP197_HIA_RDR(priv, i) + EIP197_HIA_xDR_PROC_PNTR); /* Ring size */ @@ -238,7 +238,7 @@ EIP197_HIA_RDR(priv, i) + EIP197_HIA_xDR_RING_SIZE); } -@@ -736,19 +765,28 @@ +@@ -736,19 +765,28 @@ static int safexcel_hw_init(struct safex /* Clear any HIA interrupt */ writel(GENMASK(30, 20), EIP197_HIA_AIC_G(priv) + EIP197_HIA_AIC_G_ACK); @@ -274,7 +274,7 @@ } /* Called with ring's lock taken */ -@@ -836,20 +874,24 @@ +@@ -836,20 +874,24 @@ finalize: spin_unlock_bh(&priv->ring[ring].lock); /* let the RDR know we have pending descriptors */ @@ -305,7 +305,7 @@ return 0; if (rdesc->descriptor_overflow) -@@ -858,13 +900,14 @@ +@@ -858,13 +900,14 @@ inline int safexcel_rdesc_check_errors(s if (rdesc->buffer_overflow) dev_err(priv->dev, "Buffer overflow detected"); @@ -323,7 +323,7 @@ (BIT(7) | BIT(4) | BIT(3) | BIT(0))) { /* * Give priority over authentication fails: -@@ -872,7 +915,7 @@ +@@ -872,7 +915,7 @@ inline int safexcel_rdesc_check_errors(s * something wrong with the input! */ return -EINVAL; @@ -332,7 +332,7 @@ /* Authentication failed */ return -EBADMSG; } -@@ -931,16 +974,18 @@ +@@ -931,16 +974,18 @@ int safexcel_invalidate_cache(struct cry { struct safexcel_command_desc *cdesc; struct safexcel_result_desc *rdesc; @@ -353,7 +353,7 @@ cdesc->control_data.control0 = CONTEXT_CONTROL_INV_TR; /* Prepare result descriptor */ -@@ -1003,7 +1048,7 @@ +@@ -1003,7 +1048,7 @@ handle_results: acknowledge: if (i) writel(EIP197_xDR_PROC_xD_PKT(i) | @@ -362,7 +362,7 @@ EIP197_HIA_RDR(priv, ring) + EIP197_HIA_xDR_PROC_COUNT); /* If the number of requests overflowed the counter, try to proceed more -@@ -1171,6 +1216,44 @@ +@@ -1171,6 +1216,44 @@ static struct safexcel_alg_template *saf &safexcel_alg_xts_aes, &safexcel_alg_gcm, &safexcel_alg_ccm, @@ -407,7 +407,7 @@ }; static int safexcel_register_algorithms(struct safexcel_crypto_priv *priv) -@@ -1240,30 +1323,30 @@ +@@ -1240,30 +1323,30 @@ static void safexcel_unregister_algorith static void safexcel_configure(struct safexcel_crypto_priv *priv) { @@ -457,7 +457,7 @@ } static void safexcel_init_register_offsets(struct safexcel_crypto_priv *priv) -@@ -1309,7 +1392,7 @@ +@@ -1309,7 +1392,7 @@ static int safexcel_probe_generic(void * int is_pci_dev) { struct device *dev = priv->dev; @@ -466,7 +466,7 @@ int i, ret, hwctg; priv->context_pool = dmam_pool_create("safexcel-context", dev, -@@ -1371,13 +1454,16 @@ +@@ -1371,13 +1454,16 @@ static int safexcel_probe_generic(void * */ version = readl(EIP197_GLOBAL(priv) + EIP197_VERSION); if (((priv->flags & SAFEXCEL_HW_EIP197) && @@ -484,7 +484,7 @@ return -ENODEV; } -@@ -1385,6 +1471,14 @@ +@@ -1385,6 +1471,14 @@ static int safexcel_probe_generic(void * hwctg = version >> 28; peid = version & 255; @@ -499,7 +499,7 @@ /* Detect EIP96 packet engine and version */ version = readl(EIP197_PE(priv) + EIP197_PE_EIP96_VERSION(0)); if (EIP197_REG_LO16(version) != EIP96_VERSION_LE) { -@@ -1393,10 +1487,13 @@ +@@ -1393,10 +1487,13 @@ static int safexcel_probe_generic(void * } priv->hwconfig.pever = EIP197_VERSION_MASK(version); @@ -513,7 +513,7 @@ priv->hwconfig.hwdataw = (hiaopt >> EIP197_HWDATAW_OFFSET) & EIP197_HWDATAW_MASK; priv->hwconfig.hwcfsize = ((hiaopt >> EIP197_CFSIZE_OFFSET) & -@@ -1405,6 +1502,19 @@ +@@ -1405,6 +1502,19 @@ static int safexcel_probe_generic(void * priv->hwconfig.hwrfsize = ((hiaopt >> EIP197_RFSIZE_OFFSET) & EIP197_RFSIZE_MASK) + EIP197_RFSIZE_ADJUST; @@ -533,7 +533,7 @@ } else { /* EIP97 */ priv->hwconfig.hwdataw = (hiaopt >> EIP197_HWDATAW_OFFSET) & -@@ -1413,6 +1523,23 @@ +@@ -1413,6 +1523,23 @@ static int safexcel_probe_generic(void * EIP97_CFSIZE_MASK; priv->hwconfig.hwrfsize = (hiaopt >> EIP97_RFSIZE_OFFSET) & EIP97_RFSIZE_MASK; @@ -557,7 +557,7 @@ } /* Get supported algorithms from EIP96 transform engine */ -@@ -1420,10 +1547,12 @@ +@@ -1420,10 +1547,12 @@ static int safexcel_probe_generic(void * EIP197_PE_EIP96_OPTIONS(0)); /* Print single info line describing what we just detected */ @@ -574,7 +574,7 @@ priv->hwconfig.algo_flags); safexcel_configure(priv); -@@ -1547,7 +1676,6 @@ +@@ -1547,7 +1676,6 @@ static void safexcel_hw_reset_rings(stru } } @@ -582,7 +582,7 @@ /* for Device Tree platform driver */ static int safexcel_probe(struct platform_device *pdev) -@@ -1625,6 +1753,7 @@ +@@ -1625,6 +1753,7 @@ static int safexcel_remove(struct platfo safexcel_unregister_algorithms(priv); safexcel_hw_reset_rings(priv); @@ -590,7 +590,7 @@ clk_disable_unprepare(priv->clk); for (i = 0; i < priv->config.rings; i++) -@@ -1666,9 +1795,7 @@ +@@ -1666,9 +1795,7 @@ static struct platform_driver crypto_sa .of_match_table = safexcel_of_match_table, }, }; @@ -600,7 +600,7 @@ /* PCIE devices - i.e. Inside Secure development boards */ static int safexcel_pci_probe(struct pci_dev *pdev, -@@ -1759,7 +1886,7 @@ +@@ -1759,7 +1886,7 @@ static int safexcel_pci_probe(struct pci return rc; } @@ -609,7 +609,7 @@ { struct safexcel_crypto_priv *priv = pci_get_drvdata(pdev); int i; -@@ -1789,54 +1916,32 @@ +@@ -1789,54 +1916,32 @@ static struct pci_driver safexcel_pci_dr .probe = safexcel_pci_probe, .remove = safexcel_pci_remove, }; @@ -702,7 +702,7 @@ #include #include #include -@@ -33,6 +37,8 @@ +@@ -33,6 +37,8 @@ enum safexcel_cipher_alg { SAFEXCEL_DES, SAFEXCEL_3DES, SAFEXCEL_AES, @@ -711,7 +711,7 @@ }; struct safexcel_cipher_ctx { -@@ -41,8 +47,12 @@ +@@ -41,8 +47,12 @@ struct safexcel_cipher_ctx { u32 mode; enum safexcel_cipher_alg alg; @@ -726,7 +726,7 @@ __le32 key[16]; u32 nonce; -@@ -51,10 +61,11 @@ +@@ -51,10 +61,11 @@ struct safexcel_cipher_ctx { /* All the below is AEAD specific */ u32 hash_alg; u32 state_sz; @@ -740,7 +740,7 @@ }; struct safexcel_cipher_req { -@@ -65,206 +76,298 @@ +@@ -65,206 +76,298 @@ struct safexcel_cipher_req { int nr_src, nr_dst; }; @@ -1201,7 +1201,7 @@ } static int safexcel_skcipher_aes_setkey(struct crypto_skcipher *ctfm, -@@ -277,14 +380,12 @@ +@@ -277,14 +380,12 @@ static int safexcel_skcipher_aes_setkey( int ret, i; ret = aes_expandkey(&aes, key, len); @@ -1218,7 +1218,7 @@ ctx->base.needs_inv = true; break; } -@@ -309,43 +410,57 @@ +@@ -309,43 +410,57 @@ static int safexcel_aead_setkey(struct c struct safexcel_crypto_priv *priv = ctx->priv; struct crypto_authenc_keys keys; struct crypto_aes_ctx aes; @@ -1286,7 +1286,7 @@ /* Auth key */ switch (ctx->hash_alg) { -@@ -374,21 +489,24 @@ +@@ -374,21 +489,24 @@ static int safexcel_aead_setkey(struct c keys.authkeylen, &istate, &ostate)) goto badkey; break; @@ -1315,7 +1315,7 @@ ctx->key_len = keys.enckeylen; memcpy(ctx->ipad, &istate.state, ctx->state_sz); -@@ -398,8 +516,6 @@ +@@ -398,8 +516,6 @@ static int safexcel_aead_setkey(struct c return 0; badkey: @@ -1324,7 +1324,7 @@ memzero_explicit(&keys, sizeof(keys)); return err; } -@@ -423,6 +539,17 @@ +@@ -423,6 +539,17 @@ static int safexcel_context_control(stru CONTEXT_CONTROL_DIGEST_XCM | ctx->hash_alg | CONTEXT_CONTROL_SIZE(ctrl_size); @@ -1342,7 +1342,7 @@ } else { ctrl_size += ctx->state_sz / sizeof(u32) * 2; cdesc->control_data.control0 = -@@ -431,17 +558,21 @@ +@@ -431,17 +558,21 @@ static int safexcel_context_control(stru ctx->hash_alg | CONTEXT_CONTROL_SIZE(ctrl_size); } @@ -1372,7 +1372,7 @@ } else { if (sreq->direction == SAFEXCEL_ENCRYPT) cdesc->control_data.control0 = -@@ -480,6 +611,12 @@ +@@ -480,6 +611,12 @@ static int safexcel_context_control(stru ctx->key_len >> ctx->xts); return -EINVAL; } @@ -1385,7 +1385,7 @@ } return 0; -@@ -563,6 +700,7 @@ +@@ -563,6 +700,7 @@ static int safexcel_send_req(struct cryp unsigned int totlen; unsigned int totlen_src = cryptlen + assoclen; unsigned int totlen_dst = totlen_src; @@ -1393,7 +1393,7 @@ int n_cdesc = 0, n_rdesc = 0; int queued, i, ret = 0; bool first = true; -@@ -637,56 +775,60 @@ +@@ -637,56 +775,60 @@ static int safexcel_send_req(struct cryp memcpy(ctx->base.ctxr->data, ctx->key, ctx->key_len); @@ -1475,7 +1475,7 @@ cryptlen); /* result descriptors */ -@@ -1073,6 +1215,8 @@ +@@ -1073,6 +1215,8 @@ static int safexcel_skcipher_cra_init(st ctx->base.send = safexcel_skcipher_send; ctx->base.handle_result = safexcel_skcipher_handle_result; @@ -1484,7 +1484,7 @@ return 0; } -@@ -1137,6 +1281,8 @@ +@@ -1137,6 +1281,8 @@ static int safexcel_skcipher_aes_ecb_cra safexcel_skcipher_cra_init(tfm); ctx->alg = SAFEXCEL_AES; ctx->mode = CONTEXT_CONTROL_CRYPTO_MODE_ECB; @@ -1493,7 +1493,7 @@ return 0; } -@@ -1171,6 +1317,7 @@ +@@ -1171,6 +1317,7 @@ static int safexcel_skcipher_aes_cbc_cra safexcel_skcipher_cra_init(tfm); ctx->alg = SAFEXCEL_AES; @@ -1501,7 +1501,7 @@ ctx->mode = CONTEXT_CONTROL_CRYPTO_MODE_CBC; return 0; } -@@ -1207,6 +1354,7 @@ +@@ -1207,6 +1354,7 @@ static int safexcel_skcipher_aes_cfb_cra safexcel_skcipher_cra_init(tfm); ctx->alg = SAFEXCEL_AES; @@ -1509,7 +1509,7 @@ ctx->mode = CONTEXT_CONTROL_CRYPTO_MODE_CFB; return 0; } -@@ -1243,6 +1391,7 @@ +@@ -1243,6 +1391,7 @@ static int safexcel_skcipher_aes_ofb_cra safexcel_skcipher_cra_init(tfm); ctx->alg = SAFEXCEL_AES; @@ -1517,7 +1517,7 @@ ctx->mode = CONTEXT_CONTROL_CRYPTO_MODE_OFB; return 0; } -@@ -1288,14 +1437,12 @@ +@@ -1288,14 +1437,12 @@ static int safexcel_skcipher_aesctr_setk /* exclude the nonce here */ keylen = len - CTR_RFC3686_NONCE_SIZE; ret = aes_expandkey(&aes, key, keylen); @@ -1534,7 +1534,7 @@ ctx->base.needs_inv = true; break; } -@@ -1317,6 +1464,7 @@ +@@ -1317,6 +1464,7 @@ static int safexcel_skcipher_aes_ctr_cra safexcel_skcipher_cra_init(tfm); ctx->alg = SAFEXCEL_AES; @@ -1542,7 +1542,7 @@ ctx->mode = CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD; return 0; } -@@ -1352,6 +1500,7 @@ +@@ -1352,6 +1500,7 @@ static int safexcel_des_setkey(struct cr unsigned int len) { struct safexcel_cipher_ctx *ctx = crypto_skcipher_ctx(ctfm); @@ -1550,7 +1550,7 @@ int ret; ret = verify_skcipher_des_key(ctfm, key); -@@ -1359,7 +1508,7 @@ +@@ -1359,7 +1508,7 @@ static int safexcel_des_setkey(struct cr return ret; /* if context exits and key changed, need to invalidate it */ @@ -1559,7 +1559,7 @@ if (memcmp(ctx->key, key, len)) ctx->base.needs_inv = true; -@@ -1375,6 +1524,8 @@ +@@ -1375,6 +1524,8 @@ static int safexcel_skcipher_des_cbc_cra safexcel_skcipher_cra_init(tfm); ctx->alg = SAFEXCEL_DES; @@ -1568,7 +1568,7 @@ ctx->mode = CONTEXT_CONTROL_CRYPTO_MODE_CBC; return 0; } -@@ -1412,6 +1563,8 @@ +@@ -1412,6 +1563,8 @@ static int safexcel_skcipher_des_ecb_cra safexcel_skcipher_cra_init(tfm); ctx->alg = SAFEXCEL_DES; ctx->mode = CONTEXT_CONTROL_CRYPTO_MODE_ECB; @@ -1577,7 +1577,7 @@ return 0; } -@@ -1444,6 +1597,7 @@ +@@ -1444,6 +1597,7 @@ static int safexcel_des3_ede_setkey(stru const u8 *key, unsigned int len) { struct safexcel_cipher_ctx *ctx = crypto_skcipher_ctx(ctfm); @@ -1585,7 +1585,7 @@ int err; err = verify_skcipher_des3_key(ctfm, key); -@@ -1451,13 +1605,11 @@ +@@ -1451,13 +1605,11 @@ static int safexcel_des3_ede_setkey(stru return err; /* if context exits and key changed, need to invalidate it */ @@ -1600,7 +1600,7 @@ ctx->key_len = len; return 0; -@@ -1469,6 +1621,8 @@ +@@ -1469,6 +1621,8 @@ static int safexcel_skcipher_des3_cbc_cr safexcel_skcipher_cra_init(tfm); ctx->alg = SAFEXCEL_3DES; @@ -1609,7 +1609,7 @@ ctx->mode = CONTEXT_CONTROL_CRYPTO_MODE_CBC; return 0; } -@@ -1506,6 +1660,8 @@ +@@ -1506,6 +1660,8 @@ static int safexcel_skcipher_des3_ecb_cr safexcel_skcipher_cra_init(tfm); ctx->alg = SAFEXCEL_3DES; ctx->mode = CONTEXT_CONTROL_CRYPTO_MODE_ECB; @@ -1618,7 +1618,7 @@ return 0; } -@@ -1561,6 +1717,9 @@ +@@ -1561,6 +1717,9 @@ static int safexcel_aead_cra_init(struct ctx->priv = tmpl->priv; ctx->alg = SAFEXCEL_AES; /* default */ @@ -1628,7 +1628,7 @@ ctx->mode = CONTEXT_CONTROL_CRYPTO_MODE_CBC; /* default */ ctx->aead = true; ctx->base.send = safexcel_aead_send; -@@ -1749,6 +1908,8 @@ +@@ -1749,6 +1908,8 @@ static int safexcel_aead_sha1_des3_cra_i safexcel_aead_sha1_cra_init(tfm); ctx->alg = SAFEXCEL_3DES; /* override default */ @@ -1637,7 +1637,7 @@ return 0; } -@@ -1777,6 +1938,330 @@ +@@ -1777,6 +1938,330 @@ struct safexcel_alg_template safexcel_al }, }; @@ -1968,7 +1968,7 @@ static int safexcel_aead_sha1_ctr_cra_init(struct crypto_tfm *tfm) { struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); -@@ -1965,14 +2450,12 @@ +@@ -1965,14 +2450,12 @@ static int safexcel_skcipher_aesxts_setk /* Only half of the key data is cipher key */ keylen = (len >> 1); ret = aes_expandkey(&aes, key, keylen); @@ -1985,7 +1985,7 @@ ctx->base.needs_inv = true; break; } -@@ -1984,15 +2467,13 @@ +@@ -1984,15 +2467,13 @@ static int safexcel_skcipher_aesxts_setk /* The other half is the tweak key */ ret = aes_expandkey(&aes, (u8 *)(key + keylen), keylen); @@ -2004,7 +2004,7 @@ ctx->base.needs_inv = true; break; } -@@ -2015,6 +2496,7 @@ +@@ -2015,6 +2496,7 @@ static int safexcel_skcipher_aes_xts_cra safexcel_skcipher_cra_init(tfm); ctx->alg = SAFEXCEL_AES; @@ -2012,7 +2012,7 @@ ctx->xts = 1; ctx->mode = CONTEXT_CONTROL_CRYPTO_MODE_XTS; return 0; -@@ -2075,14 +2557,13 @@ +@@ -2075,14 +2557,13 @@ static int safexcel_aead_gcm_setkey(stru ret = aes_expandkey(&aes, key, len); if (ret) { @@ -2028,7 +2028,7 @@ ctx->base.needs_inv = true; break; } -@@ -2099,8 +2580,6 @@ +@@ -2099,8 +2580,6 @@ static int safexcel_aead_gcm_setkey(stru crypto_cipher_set_flags(ctx->hkaes, crypto_aead_get_flags(ctfm) & CRYPTO_TFM_REQ_MASK); ret = crypto_cipher_setkey(ctx->hkaes, key, len); @@ -2037,7 +2037,7 @@ if (ret) return ret; -@@ -2109,7 +2588,7 @@ +@@ -2109,7 +2588,7 @@ static int safexcel_aead_gcm_setkey(stru if (priv->flags & EIP197_TRC_CACHE && ctx->base.ctxr_dma) { for (i = 0; i < AES_BLOCK_SIZE / sizeof(u32); i++) { @@ -2046,7 +2046,7 @@ ctx->base.needs_inv = true; break; } -@@ -2135,10 +2614,7 @@ +@@ -2135,10 +2614,7 @@ static int safexcel_aead_gcm_cra_init(st ctx->mode = CONTEXT_CONTROL_CRYPTO_MODE_XCM; /* override default */ ctx->hkaes = crypto_alloc_cipher("aes", 0, 0); @@ -2058,7 +2058,7 @@ } static void safexcel_aead_gcm_cra_exit(struct crypto_tfm *tfm) -@@ -2192,14 +2668,13 @@ +@@ -2192,14 +2668,13 @@ static int safexcel_aead_ccm_setkey(stru ret = aes_expandkey(&aes, key, len); if (ret) { @@ -2074,7 +2074,7 @@ ctx->base.needs_inv = true; break; } -@@ -2235,6 +2710,7 @@ +@@ -2235,6 +2710,7 @@ static int safexcel_aead_ccm_cra_init(st ctx->state_sz = 3 * AES_BLOCK_SIZE; ctx->xcm = EIP197_XCM_MODE_CCM; ctx->mode = CONTEXT_CONTROL_CRYPTO_MODE_XCM; /* override default */ @@ -2082,7 +2082,7 @@ return 0; } -@@ -2301,5 +2777,949 @@ +@@ -2301,5 +2777,949 @@ struct safexcel_alg_template safexcel_al .cra_exit = safexcel_aead_cra_exit, .cra_module = THIS_MODULE, }, @@ -3183,7 +3183,7 @@ __le32 data[40]; } __packed; -@@ -358,10 +388,14 @@ +@@ -358,10 +388,14 @@ struct safexcel_context_record { #define CONTEXT_CONTROL_CRYPTO_ALG_AES128 (0x5 << 17) #define CONTEXT_CONTROL_CRYPTO_ALG_AES192 (0x6 << 17) #define CONTEXT_CONTROL_CRYPTO_ALG_AES256 (0x7 << 17) @@ -3198,7 +3198,7 @@ #define CONTEXT_CONTROL_CRYPTO_ALG_SHA1 (0x2 << 23) #define CONTEXT_CONTROL_CRYPTO_ALG_SHA224 (0x4 << 23) #define CONTEXT_CONTROL_CRYPTO_ALG_SHA256 (0x3 << 23) -@@ -371,17 +405,25 @@ +@@ -371,17 +405,25 @@ struct safexcel_context_record { #define CONTEXT_CONTROL_CRYPTO_ALG_XCBC128 (0x1 << 23) #define CONTEXT_CONTROL_CRYPTO_ALG_XCBC192 (0x2 << 23) #define CONTEXT_CONTROL_CRYPTO_ALG_XCBC256 (0x3 << 23) @@ -3224,7 +3224,7 @@ #define CONTEXT_CONTROL_IV0 BIT(5) #define CONTEXT_CONTROL_IV1 BIT(6) #define CONTEXT_CONTROL_IV2 BIT(7) -@@ -394,6 +436,13 @@ +@@ -394,6 +436,13 @@ struct safexcel_context_record { #define EIP197_XCM_MODE_GCM 1 #define EIP197_XCM_MODE_CCM 2 @@ -3238,7 +3238,7 @@ /* The hash counter given to the engine in the context has a granularity of * 64 bits. */ -@@ -423,6 +472,8 @@ +@@ -423,6 +472,8 @@ struct safexcel_context_record { #define EIP197_TRC_PARAMS2_RC_SZ_SMALL(n) ((n) << 18) /* Cache helpers */ @@ -3247,7 +3247,7 @@ #define EIP197_CS_TRC_REC_WC 64 #define EIP197_CS_RC_SIZE (4 * sizeof(u32)) #define EIP197_CS_RC_NEXT(x) (x) -@@ -447,7 +498,7 @@ +@@ -447,7 +498,7 @@ struct result_data_desc { u16 application_id; u16 rsvd1; @@ -3256,7 +3256,7 @@ } __packed; -@@ -465,16 +516,15 @@ +@@ -465,16 +516,15 @@ struct safexcel_result_desc { u32 data_lo; u32 data_hi; @@ -3276,7 +3276,7 @@ sizeof(u32)) struct safexcel_token { -@@ -505,6 +555,8 @@ +@@ -505,6 +555,8 @@ static inline void eip197_noop_token(str { token->opcode = EIP197_TOKEN_OPCODE_NOOP; token->packet_length = BIT(2); @@ -3285,7 +3285,7 @@ } /* Instructions */ -@@ -526,14 +578,13 @@ +@@ -526,14 +578,13 @@ struct safexcel_control_data_desc { u16 application_id; u16 rsvd; @@ -3302,7 +3302,7 @@ } __packed; #define EIP197_OPTION_MAGIC_VALUE BIT(0) -@@ -543,7 +594,10 @@ +@@ -543,7 +594,10 @@ struct safexcel_control_data_desc { #define EIP197_OPTION_2_TOKEN_IV_CMD GENMASK(11, 10) #define EIP197_OPTION_4_TOKEN_IV_CMD GENMASK(11, 9) @@ -3313,7 +3313,7 @@ /* Basic Command Descriptor format */ struct safexcel_command_desc { -@@ -551,16 +605,22 @@ +@@ -551,16 +605,22 @@ struct safexcel_command_desc { u8 rsvd0:5; u8 last_seg:1; u8 first_seg:1; @@ -3337,7 +3337,7 @@ /* * Internal structures & functions */ -@@ -578,15 +638,20 @@ +@@ -578,15 +638,20 @@ enum eip197_fw { struct safexcel_desc_ring { void *base; @@ -3359,7 +3359,7 @@ }; enum safexcel_alg_type { -@@ -601,9 +666,11 @@ +@@ -601,9 +666,11 @@ struct safexcel_config { u32 cd_size; u32 cd_offset; @@ -3371,7 +3371,7 @@ }; struct safexcel_work_data { -@@ -654,6 +721,12 @@ +@@ -654,6 +721,12 @@ enum safexcel_eip_version { /* Priority we use for advertising our algorithms */ #define SAFEXCEL_CRA_PRIORITY 300 @@ -3384,7 +3384,7 @@ /* EIP algorithm presence flags */ enum safexcel_eip_algorithms { SAFEXCEL_ALG_BC0 = BIT(5), -@@ -697,16 +770,23 @@ +@@ -697,16 +770,23 @@ struct safexcel_register_offsets { enum safexcel_flags { EIP197_TRC_CACHE = BIT(0), SAFEXCEL_HW_EIP197 = BIT(1), @@ -3408,7 +3408,7 @@ }; struct safexcel_crypto_priv { -@@ -778,7 +858,7 @@ +@@ -778,7 +858,7 @@ struct safexcel_inv_result { void safexcel_dequeue(struct safexcel_crypto_priv *priv, int ring); int safexcel_rdesc_check_errors(struct safexcel_crypto_priv *priv, @@ -3417,7 +3417,7 @@ void safexcel_complete(struct safexcel_crypto_priv *priv, int ring); int safexcel_invalidate_cache(struct crypto_async_request *async, struct safexcel_crypto_priv *priv, -@@ -797,7 +877,8 @@ +@@ -797,7 +877,8 @@ struct safexcel_command_desc *safexcel_a bool first, bool last, dma_addr_t data, u32 len, u32 full_data_len, @@ -3427,7 +3427,7 @@ struct safexcel_result_desc *safexcel_add_rdesc(struct safexcel_crypto_priv *priv, int ring_id, bool first, bool last, -@@ -853,5 +934,43 @@ +@@ -853,5 +934,43 @@ extern struct safexcel_alg_template safe extern struct safexcel_alg_template safexcel_alg_xts_aes; extern struct safexcel_alg_template safexcel_alg_gcm; extern struct safexcel_alg_template safexcel_alg_ccm; @@ -3487,7 +3487,7 @@ #include #include #include -@@ -19,9 +23,19 @@ +@@ -19,9 +23,19 @@ struct safexcel_ahash_ctx { struct safexcel_crypto_priv *priv; u32 alg; @@ -3510,7 +3510,7 @@ }; struct safexcel_ahash_req { -@@ -31,6 +45,8 @@ +@@ -31,6 +45,8 @@ struct safexcel_ahash_req { bool needs_inv; bool hmac_zlen; bool len_is_le; @@ -3519,7 +3519,7 @@ int nents; dma_addr_t result_dma; -@@ -39,7 +55,9 @@ +@@ -39,7 +55,9 @@ struct safexcel_ahash_req { u8 state_sz; /* expected state size, only set once */ u8 block_sz; /* block size, only set once */ @@ -3530,7 +3530,7 @@ u64 len; u64 processed; -@@ -57,22 +75,36 @@ +@@ -57,22 +75,36 @@ static inline u64 safexcel_queued_len(st } static void safexcel_hash_token(struct safexcel_command_desc *cdesc, @@ -3573,7 +3573,7 @@ } static void safexcel_context_control(struct safexcel_ahash_ctx *ctx, -@@ -82,29 +114,49 @@ +@@ -82,29 +114,49 @@ static void safexcel_context_control(str struct safexcel_crypto_priv *priv = ctx->priv; u64 count = 0; @@ -3630,7 +3630,7 @@ return; } -@@ -204,7 +256,7 @@ +@@ -204,7 +256,7 @@ static int safexcel_handle_req_result(st } if (sreq->result_dma) { @@ -3639,7 +3639,7 @@ DMA_FROM_DEVICE); sreq->result_dma = 0; } -@@ -223,14 +275,15 @@ +@@ -223,14 +275,15 @@ static int safexcel_handle_req_result(st memcpy(sreq->cache, sreq->state, crypto_ahash_digestsize(ahash)); @@ -3657,7 +3657,7 @@ areq->nbytes = 0; safexcel_ahash_enqueue(areq); -@@ -238,8 +291,14 @@ +@@ -238,8 +291,14 @@ static int safexcel_handle_req_result(st return 1; } @@ -3674,7 +3674,7 @@ } cache_len = safexcel_queued_len(sreq); -@@ -261,10 +320,11 @@ +@@ -261,10 +320,11 @@ static int safexcel_ahash_send_req(struc struct safexcel_command_desc *cdesc, *first_cdesc = NULL; struct safexcel_result_desc *rdesc; struct scatterlist *sg; @@ -3689,7 +3689,7 @@ if (queued <= HASH_CACHE_SIZE) cache_len = queued; else -@@ -287,15 +347,52 @@ +@@ -287,15 +347,52 @@ static int safexcel_ahash_send_req(struc areq->nbytes - extra); queued -= extra; @@ -3743,7 +3743,7 @@ /* Add a command descriptor for the cached data, if any */ if (cache_len) { req->cache_dma = dma_map_single(priv->dev, req->cache, -@@ -306,8 +403,9 @@ +@@ -306,8 +403,9 @@ static int safexcel_ahash_send_req(struc req->cache_sz = cache_len; first_cdesc = safexcel_add_cdesc(priv, ring, 1, (cache_len == len), @@ -3755,7 +3755,7 @@ if (IS_ERR(first_cdesc)) { ret = PTR_ERR(first_cdesc); goto unmap_cache; -@@ -319,10 +417,6 @@ +@@ -319,10 +417,6 @@ static int safexcel_ahash_send_req(struc goto send_command; } @@ -3766,7 +3766,7 @@ /* Now handle the current ahash request buffer(s) */ req->nents = dma_map_sg(priv->dev, areq->src, sg_nents_for_len(areq->src, -@@ -336,26 +430,34 @@ +@@ -336,26 +430,34 @@ static int safexcel_ahash_send_req(struc for_each_sg(areq->src, sg, req->nents, i) { int sglen = sg_dma_len(sg); @@ -3806,7 +3806,7 @@ } send_command: -@@ -363,9 +465,9 @@ +@@ -363,9 +465,9 @@ send_command: safexcel_context_control(ctx, req, first_cdesc); /* Add the token */ @@ -3818,7 +3818,7 @@ DMA_FROM_DEVICE); if (dma_mapping_error(priv->dev, req->result_dma)) { ret = -EINVAL; -@@ -374,7 +476,7 @@ +@@ -374,7 +476,7 @@ send_command: /* Add a result descriptor */ rdesc = safexcel_add_rdesc(priv, ring, 1, 1, req->result_dma, @@ -3827,7 +3827,7 @@ if (IS_ERR(rdesc)) { ret = PTR_ERR(rdesc); goto unmap_result; -@@ -382,17 +484,20 @@ +@@ -382,17 +484,20 @@ send_command: safexcel_rdr_req_set(priv, ring, rdesc, &areq->base); @@ -3851,7 +3851,7 @@ cdesc_rollback: for (i = 0; i < n_cdesc; i++) safexcel_ring_rollback_wptr(priv, &priv->ring[ring].cdr); -@@ -590,16 +695,12 @@ +@@ -590,16 +695,12 @@ static int safexcel_ahash_enqueue(struct if (ctx->base.ctxr) { if (priv->flags & EIP197_TRC_CACHE && !ctx->base.needs_inv && @@ -3871,7 +3871,7 @@ memcmp(ctx->base.ctxr->data + (req->state_sz>>2), ctx->opad, req->state_sz)))) /* -@@ -622,6 +723,7 @@ +@@ -622,6 +723,7 @@ static int safexcel_ahash_enqueue(struct if (!ctx->base.ctxr) return -ENOMEM; } @@ -3879,7 +3879,7 @@ ring = ctx->base.ring; -@@ -691,8 +793,34 @@ +@@ -691,8 +793,34 @@ static int safexcel_ahash_final(struct a else if (ctx->alg == CONTEXT_CONTROL_CRYPTO_ALG_SHA512) memcpy(areq->result, sha512_zero_message_hash, SHA512_DIGEST_SIZE); @@ -3914,7 +3914,7 @@ } else if (unlikely(req->hmac && (req->len == req->block_sz) && !areq->nbytes)) { -@@ -792,6 +920,7 @@ +@@ -792,6 +920,7 @@ static int safexcel_ahash_cra_init(struc ctx->priv = tmpl->priv; ctx->base.send = safexcel_ahash_send; ctx->base.handle_result = safexcel_handle_result; @@ -3922,7 +3922,7 @@ crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), sizeof(struct safexcel_ahash_req)); -@@ -808,6 +937,7 @@ +@@ -808,6 +937,7 @@ static int safexcel_sha1_init(struct aha ctx->alg = CONTEXT_CONTROL_CRYPTO_ALG_SHA1; req->digest = CONTEXT_CONTROL_DIGEST_PRECOMPUTED; req->state_sz = SHA1_DIGEST_SIZE; @@ -3930,7 +3930,7 @@ req->block_sz = SHA1_BLOCK_SIZE; return 0; -@@ -889,6 +1019,7 @@ +@@ -889,6 +1019,7 @@ static int safexcel_hmac_sha1_init(struc ctx->alg = CONTEXT_CONTROL_CRYPTO_ALG_SHA1; req->digest = CONTEXT_CONTROL_DIGEST_PRECOMPUTED; req->state_sz = SHA1_DIGEST_SIZE; @@ -3938,7 +3938,7 @@ req->block_sz = SHA1_BLOCK_SIZE; req->hmac = true; -@@ -1125,6 +1256,7 @@ +@@ -1125,6 +1256,7 @@ static int safexcel_sha256_init(struct a ctx->alg = CONTEXT_CONTROL_CRYPTO_ALG_SHA256; req->digest = CONTEXT_CONTROL_DIGEST_PRECOMPUTED; req->state_sz = SHA256_DIGEST_SIZE; @@ -3946,7 +3946,7 @@ req->block_sz = SHA256_BLOCK_SIZE; return 0; -@@ -1180,6 +1312,7 @@ +@@ -1180,6 +1312,7 @@ static int safexcel_sha224_init(struct a ctx->alg = CONTEXT_CONTROL_CRYPTO_ALG_SHA224; req->digest = CONTEXT_CONTROL_DIGEST_PRECOMPUTED; req->state_sz = SHA256_DIGEST_SIZE; @@ -3954,7 +3954,7 @@ req->block_sz = SHA256_BLOCK_SIZE; return 0; -@@ -1248,6 +1381,7 @@ +@@ -1248,6 +1381,7 @@ static int safexcel_hmac_sha224_init(str ctx->alg = CONTEXT_CONTROL_CRYPTO_ALG_SHA224; req->digest = CONTEXT_CONTROL_DIGEST_PRECOMPUTED; req->state_sz = SHA256_DIGEST_SIZE; @@ -3962,7 +3962,7 @@ req->block_sz = SHA256_BLOCK_SIZE; req->hmac = true; -@@ -1318,6 +1452,7 @@ +@@ -1318,6 +1452,7 @@ static int safexcel_hmac_sha256_init(str ctx->alg = CONTEXT_CONTROL_CRYPTO_ALG_SHA256; req->digest = CONTEXT_CONTROL_DIGEST_PRECOMPUTED; req->state_sz = SHA256_DIGEST_SIZE; @@ -3970,7 +3970,7 @@ req->block_sz = SHA256_BLOCK_SIZE; req->hmac = true; -@@ -1375,6 +1510,7 @@ +@@ -1375,6 +1510,7 @@ static int safexcel_sha512_init(struct a ctx->alg = CONTEXT_CONTROL_CRYPTO_ALG_SHA512; req->digest = CONTEXT_CONTROL_DIGEST_PRECOMPUTED; req->state_sz = SHA512_DIGEST_SIZE; @@ -3978,7 +3978,7 @@ req->block_sz = SHA512_BLOCK_SIZE; return 0; -@@ -1430,6 +1566,7 @@ +@@ -1430,6 +1566,7 @@ static int safexcel_sha384_init(struct a ctx->alg = CONTEXT_CONTROL_CRYPTO_ALG_SHA384; req->digest = CONTEXT_CONTROL_DIGEST_PRECOMPUTED; req->state_sz = SHA512_DIGEST_SIZE; @@ -3986,7 +3986,7 @@ req->block_sz = SHA512_BLOCK_SIZE; return 0; -@@ -1498,6 +1635,7 @@ +@@ -1498,6 +1635,7 @@ static int safexcel_hmac_sha512_init(str ctx->alg = CONTEXT_CONTROL_CRYPTO_ALG_SHA512; req->digest = CONTEXT_CONTROL_DIGEST_PRECOMPUTED; req->state_sz = SHA512_DIGEST_SIZE; @@ -3994,7 +3994,7 @@ req->block_sz = SHA512_BLOCK_SIZE; req->hmac = true; -@@ -1568,6 +1706,7 @@ +@@ -1568,6 +1706,7 @@ static int safexcel_hmac_sha384_init(str ctx->alg = CONTEXT_CONTROL_CRYPTO_ALG_SHA384; req->digest = CONTEXT_CONTROL_DIGEST_PRECOMPUTED; req->state_sz = SHA512_DIGEST_SIZE; @@ -4002,7 +4002,7 @@ req->block_sz = SHA512_BLOCK_SIZE; req->hmac = true; -@@ -1625,6 +1764,7 @@ +@@ -1625,6 +1764,7 @@ static int safexcel_md5_init(struct ahas ctx->alg = CONTEXT_CONTROL_CRYPTO_ALG_MD5; req->digest = CONTEXT_CONTROL_DIGEST_PRECOMPUTED; req->state_sz = MD5_DIGEST_SIZE; @@ -4010,7 +4010,7 @@ req->block_sz = MD5_HMAC_BLOCK_SIZE; return 0; -@@ -1686,6 +1826,7 @@ +@@ -1686,6 +1826,7 @@ static int safexcel_hmac_md5_init(struct ctx->alg = CONTEXT_CONTROL_CRYPTO_ALG_MD5; req->digest = CONTEXT_CONTROL_DIGEST_PRECOMPUTED; req->state_sz = MD5_DIGEST_SIZE; @@ -4018,7 +4018,7 @@ req->block_sz = MD5_HMAC_BLOCK_SIZE; req->len_is_le = true; /* MD5 is little endian! ... */ req->hmac = true; -@@ -1738,5 +1879,1235 @@ +@@ -1738,5 +1879,1235 @@ struct safexcel_alg_template safexcel_al .cra_module = THIS_MODULE, }, }, @@ -5256,7 +5256,7 @@ }; --- a/drivers/crypto/inside-secure/safexcel_ring.c +++ b/drivers/crypto/inside-secure/safexcel_ring.c -@@ -14,7 +14,12 @@ +@@ -14,7 +14,12 @@ int safexcel_init_ring_descriptors(struc struct safexcel_desc_ring *cdr, struct safexcel_desc_ring *rdr) { @@ -5270,7 +5270,7 @@ cdr->base = dmam_alloc_coherent(priv->dev, cdr->offset * EIP197_DEFAULT_RING_SIZE, &cdr->base_dma, GFP_KERNEL); -@@ -24,7 +29,34 @@ +@@ -24,7 +29,34 @@ int safexcel_init_ring_descriptors(struc cdr->base_end = cdr->base + cdr->offset * (EIP197_DEFAULT_RING_SIZE - 1); cdr->read = cdr->base; @@ -5306,7 +5306,7 @@ rdr->base = dmam_alloc_coherent(priv->dev, rdr->offset * EIP197_DEFAULT_RING_SIZE, &rdr->base_dma, GFP_KERNEL); -@@ -42,11 +74,40 @@ +@@ -42,11 +74,40 @@ inline int safexcel_select_ring(struct s return (atomic_inc_return(&priv->ring_used) % priv->config.rings); } @@ -5349,7 +5349,7 @@ if ((ring->write == ring->read - ring->offset) || (ring->read == ring->base && ring->write == ring->base_end)) return ERR_PTR(-ENOMEM); -@@ -106,10 +167,13 @@ +@@ -106,10 +167,13 @@ void safexcel_ring_rollback_wptr(struct if (ring->write == ring->read) return; @@ -5365,7 +5365,7 @@ } struct safexcel_command_desc *safexcel_add_cdesc(struct safexcel_crypto_priv *priv, -@@ -117,26 +181,26 @@ +@@ -117,26 +181,26 @@ struct safexcel_command_desc *safexcel_a bool first, bool last, dma_addr_t data, u32 data_len, u32 full_data_len, @@ -5403,7 +5403,7 @@ /* * Note that the length here MUST be >0 or else the EIP(1)97 * may hang. Newer EIP197 firmware actually incorporates this -@@ -146,20 +210,12 @@ +@@ -146,20 +210,12 @@ struct safexcel_command_desc *safexcel_a cdesc->control_data.packet_length = full_data_len ?: 1; cdesc->control_data.options = EIP197_OPTION_MAGIC_VALUE | EIP197_OPTION_64BIT_CTX | @@ -5429,7 +5429,7 @@ } return cdesc; -@@ -171,18 +227,27 @@ +@@ -171,18 +227,27 @@ struct safexcel_result_desc *safexcel_ad dma_addr_t data, u32 len) { struct safexcel_result_desc *rdesc; diff --git a/target/linux/mediatek/patches-5.4/0501-crypto-add-eip97-inside-secure-support.patch b/target/linux/mediatek/patches-5.4/0501-crypto-add-eip97-inside-secure-support.patch index 197cbf457d..98cb0b16ff 100644 --- a/target/linux/mediatek/patches-5.4/0501-crypto-add-eip97-inside-secure-support.patch +++ b/target/linux/mediatek/patches-5.4/0501-crypto-add-eip97-inside-secure-support.patch @@ -1,6 +1,6 @@ --- a/drivers/crypto/inside-secure/safexcel.c +++ b/drivers/crypto/inside-secure/safexcel.c -@@ -595,6 +595,14 @@ +@@ -595,6 +595,14 @@ static int safexcel_hw_init(struct safex val |= EIP197_MST_CTRL_TX_MAX_CMD(5); writel(val, EIP197_HIA_AIC(priv) + EIP197_HIA_MST_CTRL); } diff --git a/target/linux/mediatek/patches-5.4/0600-1-6-net-dsa-mt7530-Refine-message-in-Kconfig.patch b/target/linux/mediatek/patches-5.4/0600-1-6-net-dsa-mt7530-Refine-message-in-Kconfig.patch index 5c56765ecc..5288751e50 100644 --- a/target/linux/mediatek/patches-5.4/0600-1-6-net-dsa-mt7530-Refine-message-in-Kconfig.patch +++ b/target/linux/mediatek/patches-5.4/0600-1-6-net-dsa-mt7530-Refine-message-in-Kconfig.patch @@ -78,23 +78,21 @@ Reviewed-by: Florian Fainelli drivers/net/dsa/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig -index c7667645f04a..467f80157acf 100644 ---- a/drivers/net/dsa/Kconfig -+++ b/drivers/net/dsa/Kconfig -@@ -33,12 +33,12 @@ config NET_DSA_LANTIQ_GSWIP - the xrx200 / VR9 SoC. - - config NET_DSA_MT7530 -- tristate "Mediatek MT7530 Ethernet switch support" -+ tristate "MediaTek MT7530 and MT7621 Ethernet switch support" - depends on NET_DSA - select NET_DSA_TAG_MTK - ---help--- -- This enables support for the Mediatek MT7530 Ethernet switch -- chip. -+ This enables support for the MediaTek MT7530 and MT7621 Ethernet -+ switch chip. - - config NET_DSA_MV88E6060 - tristate "Marvell 88E6060 ethernet switch chip support" +--- a/drivers/net/dsa/Kconfig ++++ b/drivers/net/dsa/Kconfig +@@ -33,12 +33,12 @@ config NET_DSA_LANTIQ_GSWIP + the xrx200 / VR9 SoC. + + config NET_DSA_MT7530 +- tristate "Mediatek MT7530 Ethernet switch support" ++ tristate "MediaTek MT7530 and MT7621 Ethernet switch support" + depends on NET_DSA + select NET_DSA_TAG_MTK + ---help--- +- This enables support for the Mediatek MT7530 Ethernet switch +- chip. ++ This enables support for the MediaTek MT7530 and MT7621 Ethernet ++ switch chip. + + config NET_DSA_MV88E6060 + tristate "Marvell 88E6060 ethernet switch chip support" diff --git a/target/linux/mediatek/patches-5.4/0600-2-6-net-dsa-mt7530-Extend-device-data-ready-for-adding-a-new-hardware.patch b/target/linux/mediatek/patches-5.4/0600-2-6-net-dsa-mt7530-Extend-device-data-ready-for-adding-a-new-hardware.patch index 637f9e3c58..c4b117dcb7 100644 --- a/target/linux/mediatek/patches-5.4/0600-2-6-net-dsa-mt7530-Extend-device-data-ready-for-adding-a-new-hardware.patch +++ b/target/linux/mediatek/patches-5.4/0600-2-6-net-dsa-mt7530-Extend-device-data-ready-for-adding-a-new-hardware.patch @@ -84,10 +84,8 @@ Signed-off-by: Sean Wang drivers/net/dsa/mt7530.h | 29 ++++- 2 files changed, 203 insertions(+), 57 deletions(-) -Index: linux-5.4.43/drivers/net/dsa/mt7530.c -=================================================================== ---- linux-5.4.43.orig/drivers/net/dsa/mt7530.c -+++ linux-5.4.43/drivers/net/dsa/mt7530.c +--- a/drivers/net/dsa/mt7530.c ++++ b/drivers/net/dsa/mt7530.c @@ -373,7 +373,7 @@ mt7530_fdb_write(struct mt7530_priv *pri } @@ -389,10 +387,8 @@ Index: linux-5.4.43/drivers/net/dsa/mt7530.c if (priv->id == ID_MT7530) { priv->core_pwr = devm_regulator_get(&mdiodev->dev, "core"); -Index: linux-5.4.43/drivers/net/dsa/mt7530.h -=================================================================== ---- linux-5.4.43.orig/drivers/net/dsa/mt7530.h -+++ linux-5.4.43/drivers/net/dsa/mt7530.h +--- a/drivers/net/dsa/mt7530.h ++++ b/drivers/net/dsa/mt7530.h @@ -11,7 +11,7 @@ #define MT7530_NUM_FDB_RECORDS 2048 #define MT7530_ALL_MEMBERS 0xff diff --git a/target/linux/mediatek/patches-5.4/0600-3-6-dt-bindings-net-dsa-add-new-MT7531-binding-to-support-MT7531.patch b/target/linux/mediatek/patches-5.4/0600-3-6-dt-bindings-net-dsa-add-new-MT7531-binding-to-support-MT7531.patch index 3ca12b9172..b28f23f573 100644 --- a/target/linux/mediatek/patches-5.4/0600-3-6-dt-bindings-net-dsa-add-new-MT7531-binding-to-support-MT7531.patch +++ b/target/linux/mediatek/patches-5.4/0600-3-6-dt-bindings-net-dsa-add-new-MT7531-binding-to-support-MT7531.patch @@ -79,103 +79,101 @@ Signed-off-by: Landen Chao .../devicetree/bindings/net/dsa/mt7530.txt | 77 ++++++++++++++++++- 1 file changed, 74 insertions(+), 3 deletions(-) -diff --git a/Documentation/devicetree/bindings/net/dsa/mt7530.txt b/Documentation/devicetree/bindings/net/dsa/mt7530.txt -index c5ed5d25f642..dc226a4e402a 100644 ---- a/Documentation/devicetree/bindings/net/dsa/mt7530.txt -+++ b/Documentation/devicetree/bindings/net/dsa/mt7530.txt -@@ -5,6 +5,7 @@ Required properties: - - - compatible: may be compatible = "mediatek,mt7530" - or compatible = "mediatek,mt7621" -+ or compatible = "mediatek,mt7531" - - #address-cells: Must be 1. - - #size-cells: Must be 0. - - mediatek,mcm: Boolean; if defined, indicates that either MT7530 is the part -@@ -32,10 +33,13 @@ Required properties for the child nodes within ports container: - - - reg: Port address described must be 6 for CPU port and from 0 to 5 for - user ports. --- phy-mode: String, must be either "trgmii" or "rgmii" for port labeled -- "cpu". -+- phy-mode: String, the follow value would be acceptable for port labeled "cpu" -+ If compatible mediatek,mt7530 or mediatek,mt7621 is set, -+ must be either "trgmii" or "rgmii" -+ If compatible mediatek,mt7531 is set, -+ must be either "sgmii", "1000base-x" or "2500base-x" - --Port 5 of the switch is muxed between: -+Port 5 of mt7530 and mt7621 switch is muxed between: - 1. GMAC5: GMAC5 can interface with another external MAC or PHY. - 2. PHY of port 0 or port 4: PHY interfaces with an external MAC like 2nd GMAC - of the SOC. Used in many setups where port 0/4 becomes the WAN port. -@@ -308,3 +312,70 @@ Example 3: MT7621: Port 5 is connected to external PHY: Port 5 -> external PHY. - }; - }; - }; -+ -+Example 4: -+ -+ð { -+ gmac0: mac@0 { -+ compatible = "mediatek,eth-mac"; -+ reg = <0>; -+ phy-mode = "2500base-x"; -+ -+ fixed-link { -+ speed = <1000>; -+ full-duplex; -+ pause; -+ }; -+ }; -+ -+ &mdio0 { -+ switch@0 { -+ compatible = "mediatek,mt7531"; -+ reg = <0>; -+ reset-gpios = <&pio 54 0>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reg = <0>; -+ -+ port@0 { -+ reg = <0>; -+ label = "lan0"; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ label = "lan1"; -+ }; -+ -+ port@2 { -+ reg = <2>; -+ label = "lan2"; -+ }; -+ -+ port@3 { -+ reg = <3>; -+ label = "lan3"; -+ }; -+ -+ port@4 { -+ reg = <4>; -+ label = "wan"; -+ }; -+ -+ port@6 { -+ reg = <6>; -+ label = "cpu"; -+ ethernet = <&gmac0>; -+ phy-mode = "2500base-x"; -+ -+ fixed-link { -+ speed = <1000>; -+ full-duplex; -+ pause; -+ }; -+ }; -+ }; -+ }; -+ }; +--- a/Documentation/devicetree/bindings/net/dsa/mt7530.txt ++++ b/Documentation/devicetree/bindings/net/dsa/mt7530.txt +@@ -5,6 +5,7 @@ Required properties: + + - compatible: may be compatible = "mediatek,mt7530" + or compatible = "mediatek,mt7621" ++ or compatible = "mediatek,mt7531" + - #address-cells: Must be 1. + - #size-cells: Must be 0. + - mediatek,mcm: Boolean; if defined, indicates that either MT7530 is the part +@@ -32,10 +33,13 @@ Required properties for the child nodes + + - reg: Port address described must be 6 for CPU port and from 0 to 5 for + user ports. +-- phy-mode: String, must be either "trgmii" or "rgmii" for port labeled +- "cpu". ++- phy-mode: String, the follow value would be acceptable for port labeled "cpu" ++ If compatible mediatek,mt7530 or mediatek,mt7621 is set, ++ must be either "trgmii" or "rgmii" ++ If compatible mediatek,mt7531 is set, ++ must be either "sgmii", "1000base-x" or "2500base-x" + +-Port 5 of the switch is muxed between: ++Port 5 of mt7530 and mt7621 switch is muxed between: + 1. GMAC5: GMAC5 can interface with another external MAC or PHY. + 2. PHY of port 0 or port 4: PHY interfaces with an external MAC like 2nd GMAC + of the SOC. Used in many setups where port 0/4 becomes the WAN port. +@@ -308,3 +312,70 @@ Example 3: MT7621: Port 5 is connected t + }; + }; + }; ++ ++Example 4: ++ ++ð { ++ gmac0: mac@0 { ++ compatible = "mediatek,eth-mac"; ++ reg = <0>; ++ phy-mode = "2500base-x"; ++ ++ fixed-link { ++ speed = <1000>; ++ full-duplex; ++ pause; ++ }; ++ }; ++ ++ &mdio0 { ++ switch@0 { ++ compatible = "mediatek,mt7531"; ++ reg = <0>; ++ reset-gpios = <&pio 54 0>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ port@0 { ++ reg = <0>; ++ label = "lan0"; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ label = "lan1"; ++ }; ++ ++ port@2 { ++ reg = <2>; ++ label = "lan2"; ++ }; ++ ++ port@3 { ++ reg = <3>; ++ label = "lan3"; ++ }; ++ ++ port@4 { ++ reg = <4>; ++ label = "wan"; ++ }; ++ ++ port@6 { ++ reg = <6>; ++ label = "cpu"; ++ ethernet = <&gmac0>; ++ phy-mode = "2500base-x"; ++ ++ fixed-link { ++ speed = <1000>; ++ full-duplex; ++ pause; ++ }; ++ }; ++ }; ++ }; ++ }; diff --git a/target/linux/mediatek/patches-5.4/0600-4-6-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch b/target/linux/mediatek/patches-5.4/0600-4-6-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch index a93b802c17..299ac24c79 100644 --- a/target/linux/mediatek/patches-5.4/0600-4-6-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch +++ b/target/linux/mediatek/patches-5.4/0600-4-6-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch @@ -87,10 +87,8 @@ Signed-off-by: Sean Wang drivers/net/dsa/mt7530.h | 144 +++++++++ 3 files changed, 784 insertions(+), 9 deletions(-) -Index: linux-5.4.43/drivers/net/dsa/Kconfig -=================================================================== ---- linux-5.4.43.orig/drivers/net/dsa/Kconfig -+++ linux-5.4.43/drivers/net/dsa/Kconfig +--- a/drivers/net/dsa/Kconfig ++++ b/drivers/net/dsa/Kconfig @@ -33,12 +33,12 @@ config NET_DSA_LANTIQ_GSWIP the xrx200 / VR9 SoC. @@ -107,10 +105,8 @@ Index: linux-5.4.43/drivers/net/dsa/Kconfig config NET_DSA_MV88E6060 tristate "Marvell 88E6060 ethernet switch chip support" -Index: linux-5.4.43/drivers/net/dsa/mt7530.c -=================================================================== ---- linux-5.4.43.orig/drivers/net/dsa/mt7530.c -+++ linux-5.4.43/drivers/net/dsa/mt7530.c +--- a/drivers/net/dsa/mt7530.c ++++ b/drivers/net/dsa/mt7530.c @@ -234,6 +234,12 @@ mt7530_write(struct mt7530_priv *priv, u } @@ -882,10 +878,8 @@ Index: linux-5.4.43/drivers/net/dsa/mt7530.c { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, mt7530_of_match); -Index: linux-5.4.43/drivers/net/dsa/mt7530.h -=================================================================== ---- linux-5.4.43.orig/drivers/net/dsa/mt7530.h -+++ linux-5.4.43/drivers/net/dsa/mt7530.h +--- a/drivers/net/dsa/mt7530.h ++++ b/drivers/net/dsa/mt7530.h @@ -14,6 +14,7 @@ enum mt753x_id { ID_MT7530 = 0, diff --git a/target/linux/mediatek/patches-5.4/0600-6-6-arm64-dts-mt7622-add-mt7531-dsa-to-bananapi-bpi-r64-board.patch b/target/linux/mediatek/patches-5.4/0600-6-6-arm64-dts-mt7622-add-mt7531-dsa-to-bananapi-bpi-r64-board.patch index a4899caee5..8919ad27e0 100644 --- a/target/linux/mediatek/patches-5.4/0600-6-6-arm64-dts-mt7622-add-mt7531-dsa-to-bananapi-bpi-r64-board.patch +++ b/target/linux/mediatek/patches-5.4/0600-6-6-arm64-dts-mt7622-add-mt7531-dsa-to-bananapi-bpi-r64-board.patch @@ -77,64 +77,62 @@ Signed-off-by: Landen Chao .../dts/mediatek/mt7622-bananapi-bpi-r64.dts | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) -diff --git a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts -index 83e10591e0e5..ffacefee8e2a 100644 ---- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts -+++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts -@@ -143,6 +143,56 @@ - mdio: mdio-bus { - #address-cells = <1>; - #size-cells = <0>; -+ -+ switch@0 { -+ compatible = "mediatek,mt7531"; -+ reg = <0>; -+ reset-gpios = <&pio 54 0>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ label = "wan"; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ label = "lan0"; -+ }; -+ -+ port@2 { -+ reg = <2>; -+ label = "lan1"; -+ }; -+ -+ port@3 { -+ reg = <3>; -+ label = "lan2"; -+ }; -+ -+ port@4 { -+ reg = <4>; -+ label = "lan3"; -+ }; -+ -+ port@6 { -+ reg = <6>; -+ label = "cpu"; -+ ethernet = <&gmac0>; -+ phy-mode = "2500base-x"; -+ -+ fixed-link { -+ speed = <2500>; -+ full-duplex; -+ pause; -+ }; -+ }; -+ }; -+ }; -+ - }; - }; - +--- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts ++++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +@@ -150,6 +150,56 @@ + mdio: mdio-bus { + #address-cells = <1>; + #size-cells = <0>; ++ ++ switch@0 { ++ compatible = "mediatek,mt7531"; ++ reg = <0>; ++ reset-gpios = <&pio 54 0>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ reg = <0>; ++ label = "wan"; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ label = "lan0"; ++ }; ++ ++ port@2 { ++ reg = <2>; ++ label = "lan1"; ++ }; ++ ++ port@3 { ++ reg = <3>; ++ label = "lan2"; ++ }; ++ ++ port@4 { ++ reg = <4>; ++ label = "lan3"; ++ }; ++ ++ port@6 { ++ reg = <6>; ++ label = "cpu"; ++ ethernet = <&gmac0>; ++ phy-mode = "2500base-x"; ++ ++ fixed-link { ++ speed = <2500>; ++ full-duplex; ++ pause; ++ }; ++ }; ++ }; ++ }; ++ + }; + }; + diff --git a/target/linux/octeontx/patches-5.4/0002-gpio-thunderx-fix-irq_request_resources.patch b/target/linux/octeontx/patches-5.4/0002-gpio-thunderx-fix-irq_request_resources.patch index 8c4de51aae..44d91da529 100644 --- a/target/linux/octeontx/patches-5.4/0002-gpio-thunderx-fix-irq_request_resources.patch +++ b/target/linux/octeontx/patches-5.4/0002-gpio-thunderx-fix-irq_request_resources.patch @@ -15,11 +15,9 @@ Signed-off-by: Tim Harvey drivers/gpio/gpio-thunderx.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) -diff --git a/drivers/gpio/gpio-thunderx.c b/drivers/gpio/gpio-thunderx.c -index 715371b..feda2a2 100644 --- a/drivers/gpio/gpio-thunderx.c +++ b/drivers/gpio/gpio-thunderx.c -@@ -363,15 +363,18 @@ static int thunderx_gpio_irq_request_resources(struct irq_data *data) +@@ -363,15 +363,18 @@ static int thunderx_gpio_irq_request_res { struct thunderx_line *txline = irq_data_get_irq_chip_data(data); struct thunderx_gpio *txgpio = txline->txgpio; @@ -41,6 +39,3 @@ index 715371b..feda2a2 100644 return r; } --- -2.7.4 - diff --git a/target/linux/octeontx/patches-5.4/0003-can-mcp251x-convert-to-half-duplex-SPI.patch b/target/linux/octeontx/patches-5.4/0003-can-mcp251x-convert-to-half-duplex-SPI.patch index 54906b786e..f760b2ac9a 100644 --- a/target/linux/octeontx/patches-5.4/0003-can-mcp251x-convert-to-half-duplex-SPI.patch +++ b/target/linux/octeontx/patches-5.4/0003-can-mcp251x-convert-to-half-duplex-SPI.patch @@ -12,11 +12,9 @@ Signed-off-by: Tim Harvey drivers/net/can/spi/mcp251x.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) -diff --git a/drivers/net/can/spi/mcp251x.c b/drivers/net/can/spi/mcp251x.c -index bb20a9b..dc0574a 100644 --- a/drivers/net/can/spi/mcp251x.c +++ b/drivers/net/can/spi/mcp251x.c -@@ -291,23 +291,23 @@ static u8 mcp251x_read_reg(struct spi_device *spi, u8 reg) +@@ -291,23 +291,23 @@ static u8 mcp251x_read_reg(struct spi_de priv->spi_tx_buf[0] = INSTRUCTION_READ; priv->spi_tx_buf[1] = reg; @@ -45,7 +43,7 @@ index bb20a9b..dc0574a 100644 } static void mcp251x_write_reg(struct spi_device *spi, u8 reg, u8 val) -@@ -398,8 +398,9 @@ static void mcp251x_hw_rx_frame(struct spi_device *spi, u8 *buf, +@@ -398,8 +398,9 @@ static void mcp251x_hw_rx_frame(struct s buf[i] = mcp251x_read_reg(spi, RXBCTRL(buf_idx) + i); } else { priv->spi_tx_buf[RXBCTRL_OFF] = INSTRUCTION_READ_RXB(buf_idx); @@ -57,6 +55,3 @@ index bb20a9b..dc0574a 100644 } } --- -2.7.4 - diff --git a/target/linux/oxnas/config-5.4 b/target/linux/oxnas/config-5.4 index 112d4e43be..7b14110486 100644 --- a/target/linux/oxnas/config-5.4 +++ b/target/linux/oxnas/config-5.4 @@ -350,7 +350,6 @@ CONFIG_VERSATILE_FPGA_IRQ=y CONFIG_VERSATILE_FPGA_IRQ_NR=4 CONFIG_VFAT_FS=y # CONFIG_VFP is not set -# CONFIG_VLAN_8021Q is not set CONFIG_VM_EVENT_COUNTERS=y # CONFIG_WATCHDOG is not set # CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index ba9f7fb7b6..290069f4d3 100755 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -44,10 +44,10 @@ ramips_setup_interfaces() ucidef_set_interfaces_lan_wan "lan2 lan3 lan4 lan5" "wan" ;; ubnt,edgerouter-x) - ucidef_set_interface_lan "eth0 eth1 eth2 eth3 eth4" + ucidef_set_interface_lan_wan "eth1 eth2 eth3 eth4" "eth0" ;; ubnt,edgerouter-x-sfp) - ucidef_set_interface_lan "eth0 eth1 eth2 eth3 eth4 eth5" + ucidef_set_interface_lan_wan "eth1 eth2 eth3 eth4 eth5" "eth0" ;; *) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" diff --git a/tools/firmware-utils/src/mkchkimg.c b/tools/firmware-utils/src/mkchkimg.c index 5f2823f154..dff5169a25 100644 --- a/tools/firmware-utils/src/mkchkimg.c +++ b/tools/firmware-utils/src/mkchkimg.c @@ -264,13 +264,8 @@ main (int argc, char * argv[]) hdr->magic = htonl (0x2a23245e); hdr->header_len = htonl(header_len); hdr->reserved[0] = (unsigned char)(region & 0xff); - hdr->reserved[1] = 1; /* Major */ - hdr->reserved[2] = 1; /* Minor */ - hdr->reserved[3] = 99; /* Build */ - hdr->reserved[4] = 0; - hdr->reserved[5] = 0; - hdr->reserved[6] = 0; - hdr->reserved[7] = 0; + memset(&hdr->reserved[1], 99, sizeof(hdr->reserved) - 1); + message (" Board Id: %s", board_id); message (" Region: %s", region == 1 ? "World Wide (WW)" : (region == 2 ? "North America (NA)" : "Unknown"));