Re: [PATCH 2/2] devices: Add Cypress CYW43455
On 1/17/22 09:19, Paul Spooren wrote: Which project is this for? I don’t see a devices.txt in openwrt.git. Hi Paul, Sorry I missed the project name. This is for the iwinfo project: https://git.openwrt.org/?p=project/iwinfo.git;a=blob;f=devices.txt;h=e6c18e65e9be0d9d65dfc60f1b77c06dfb8efdee;hb=HEAD Hauke ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH 2/2] hostapd: refresh patches
Refresh patches after updating to hostapd v2.10. Signed-off-by: David Bauer --- .../001-wolfssl-init-RNG-with-ECC-key.patch | 6 ++-- ...erministic-channel-on-channel-switch.patch | 6 ++-- ...ix-sta-add-after-previous-connection.patch | 4 +-- ...ewrite-neigh-code-to-not-depend-on-l.patch | 14 .../hostapd/patches/050-build_fix.patch | 2 +- .../hostapd/patches/200-multicall.patch | 36 +-- .../services/hostapd/patches/300-noscan.patch | 4 +-- .../hostapd/patches/301-mesh-noscan.patch | 4 +-- .../patches/310-rescan_immediately.patch | 2 +- .../patches/330-nl80211_fix_set_freq.patch| 2 +- .../341-mesh-ctrl-iface-channel-switch.patch | 2 +- .../patches/350-nl80211_del_beacon_bss.patch | 10 +++--- .../patches/360-ctrl_iface_reload.patch | 4 +-- .../hostapd/patches/370-ap_sta_support.patch | 26 +++--- .../patches/380-disable_ctrl_iface_mib.patch | 26 +++--- .../400-wps_single_auth_enc_type.patch| 2 +- ...dd-new-config-params-to-be-used-with.patch | 6 ++-- ...-use-new-parameters-during-ibss-join.patch | 4 +-- .../patches/463-add-mcast_rate-to-11s.patch | 8 ++--- .../patches/464-fix-mesh-obss-check.patch | 2 +- .../patches/500-lto-jobserver-support.patch | 6 ++-- .../patches/590-rrm-wnm-statistics.patch | 6 ++-- .../hostapd/patches/600-ubus_support.patch| 34 +- .../hostapd/patches/700-wifi-reload.patch | 16 - .../hostapd/patches/710-vlan_no_bridge.patch | 2 +- .../patches/711-wds_bridge_force.patch| 2 +- .../patches/720-iface_max_num_sta.patch | 8 ++--- .../hostapd/patches/730-ft_iface.patch| 4 +-- .../hostapd/patches/740-snoop_iface.patch | 2 +- ...750-qos_map_set_without_interworking.patch | 14 30 files changed, 132 insertions(+), 132 deletions(-) diff --git a/package/network/services/hostapd/patches/001-wolfssl-init-RNG-with-ECC-key.patch b/package/network/services/hostapd/patches/001-wolfssl-init-RNG-with-ECC-key.patch index 84fc1c9351..994aa30626 100644 --- a/package/network/services/hostapd/patches/001-wolfssl-init-RNG-with-ECC-key.patch +++ b/package/network/services/hostapd/patches/001-wolfssl-init-RNG-with-ECC-key.patch @@ -16,7 +16,7 @@ Signed-off-by: David Bauer --- a/src/crypto/crypto_wolfssl.c +++ b/src/crypto/crypto_wolfssl.c -@@ -1303,6 +1303,7 @@ int ecc_projective_add_point(ecc_point * +@@ -1307,6 +1307,7 @@ int ecc_projective_add_point(ecc_point * struct crypto_ec { ecc_key key; @@ -24,7 +24,7 @@ Signed-off-by: David Bauer mp_int a; mp_int prime; mp_int order; -@@ -1357,6 +1358,8 @@ struct crypto_ec * crypto_ec_init(int gr +@@ -1361,6 +1362,8 @@ struct crypto_ec * crypto_ec_init(int gr return NULL; if (wc_ecc_init(>key) != 0 || @@ -33,7 +33,7 @@ Signed-off-by: David Bauer wc_ecc_set_curve(>key, 0, curve_id) != 0 || mp_init(>a) != MP_OKAY || mp_init(>prime) != MP_OKAY || -@@ -1388,6 +1391,7 @@ void crypto_ec_deinit(struct crypto_ec* +@@ -1392,6 +1395,7 @@ void crypto_ec_deinit(struct crypto_ec* mp_clear(>order); mp_clear(>prime); mp_clear(>a); diff --git a/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch b/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch index 03a1e339a9..1faeacf766 100644 --- a/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch +++ b/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch @@ -29,7 +29,7 @@ Signed-off-by: Markus Theil static int dfs_get_used_n_chans(struct hostapd_iface *iface, int *seg1) -@@ -480,9 +481,14 @@ dfs_get_valid_channel(struct hostapd_ifa +@@ -483,9 +484,14 @@ dfs_get_valid_channel(struct hostapd_ifa int num_available_chandefs; int chan_idx, chan_idx2; int sec_chan_idx_80p80 = -1; @@ -44,7 +44,7 @@ Signed-off-by: Markus Theil wpa_printf(MSG_DEBUG, "DFS: Selecting random channel"); *secondary_channel = 0; *oper_centr_freq_seg0_idx = 0; -@@ -502,8 +508,20 @@ dfs_get_valid_channel(struct hostapd_ifa +@@ -505,8 +511,20 @@ dfs_get_valid_channel(struct hostapd_ifa if (num_available_chandefs == 0) return NULL; @@ -68,7 +68,7 @@ Signed-off-by: Markus Theil if (!chan) { --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -9872,6 +9872,10 @@ static int nl80211_switch_channel(void * +@@ -9895,6 +9895,10 @@ static int nl80211_switch_channel(void * if (ret) goto error; diff --git a/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch b/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch index
[PATCH 1/2] hostapd: update to v2.10
Upstreamed patches: 020-mesh-make-forwarding-configurable.patch e6db1bc5da3fd7d5f4dba24aa102543b4749912f 550-WNM-allow-specifying-dialog-token.patch 979f19716539362f8ce60a77bf1b88fdcf5ba8e5 720-ACS-fix-channel-100-frequency.patch 2341585c349231af00cdef8d51458df01bc6965f 741-proxyarp-fix-compilation-with-Hotspot-2.0-disabled.patch 08bdf4f90de61a84ed8f4dd918272dd9d36e2e1f Compile-tested: wpad-wolfssl hostapd-openssl Run-tested: ath79-generic Signed-off-by: David Bauer --- package/network/services/hostapd/Makefile | 6 +- ...hannels-to-be-selected-if-dfs-is-ena.patch | 60 +++-- ...20-mesh-make-forwarding-configurable.patch | 219 -- .../hostapd/patches/301-mesh-noscan.patch | 15 +- .../patches/470-survey_data_fallback.patch| 22 +- ...50-WNM-allow-specifying-dialog-token.patch | 99 .../720-ACS-fix-channel-100-frequency.patch | 30 --- ...ompilation-with-Hotspot-2.0-disabled.patch | 51 .../services/hostapd/src/src/ap/ubus.c| 2 +- 9 files changed, 57 insertions(+), 447 deletions(-) delete mode 100644 package/network/services/hostapd/patches/020-mesh-make-forwarding-configurable.patch delete mode 100644 package/network/services/hostapd/patches/550-WNM-allow-specifying-dialog-token.patch delete mode 100644 package/network/services/hostapd/patches/720-ACS-fix-channel-100-frequency.patch delete mode 100644 package/network/services/hostapd/patches/741-proxyarp-fix-compilation-with-Hotspot-2.0-disabled.patch diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 7e4056bb18..584695786f 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -9,9 +9,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2021-05-22 -PKG_SOURCE_VERSION:=b102f19bcc53c7f7db3951424d4d46709b4f1986 -PKG_MIRROR_HASH:=cb3cb968883042fc582752be1607586696c18e6ecf9808c9a8ac50e204584367 +PKG_SOURCE_DATE:=2022-01-16 +PKG_SOURCE_VERSION:=cff80b4f7d3c0a47c052e8187d671710f48939e4 +PKG_MIRROR_HASH:=712965bfa11a2e601d3e1c9a51a2cf3cffc6db89abafb3df3eb0cfd83c64705b PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=BSD-3-Clause diff --git a/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch b/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch index d948c41b30..16d24d1000 100644 --- a/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch +++ b/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch @@ -14,16 +14,37 @@ Signed-off-by: Peter Oh --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -2395,6 +2395,8 @@ void ibss_mesh_setup_freq(struct wpa_sup +@@ -2409,7 +2409,7 @@ static int drv_supports_vht(struct wpa_s + } + + +-static bool ibss_mesh_is_80mhz_avail(int channel, struct hostapd_hw_modes *mode) ++static bool ibss_mesh_is_80mhz_avail(int channel, struct hostapd_hw_modes *mode, bool dfs_enabled) + { + int i; + +@@ -2418,7 +2418,10 @@ static bool ibss_mesh_is_80mhz_avail(int + + chan = hw_get_channel_chan(mode, i, NULL); + if (!chan || +- chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR)) ++ chan->flag & HOSTAPD_CHAN_DISABLED) ++ return false; ++ ++ if (!dfs_enabled && chan->flag & (HOSTAPD_CHAN_RADAR | HOSTAPD_CHAN_NO_IR)) + return false; + } + +@@ -2447,6 +2450,8 @@ void ibss_mesh_setup_freq(struct wpa_sup int chwidth, seg0, seg1; u32 vht_caps = 0; - int is_24ghz; -+ int dfs_enabled = wpa_s->conf->country[0] && -+ (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR); + bool is_24ghz, is_6ghz; ++ bool dfs_enabled = wpa_s->conf->country[0] && ++ (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR); freq->freq = ssid->frequency; -@@ -2484,8 +2486,11 @@ void ibss_mesh_setup_freq(struct wpa_sup +@@ -2543,8 +2548,11 @@ void ibss_mesh_setup_freq(struct wpa_sup return; /* Check primary channel flags */ @@ -36,7 +57,7 @@ Signed-off-by: Peter Oh freq->channel = pri_chan->chan; -@@ -2518,8 +2523,11 @@ void ibss_mesh_setup_freq(struct wpa_sup +@@ -2577,8 +2585,11 @@ void ibss_mesh_setup_freq(struct wpa_sup return; /* Check secondary channel flags */ @@ -49,20 +70,25 @@ Signed-off-by: Peter Oh if (ht40 == -1) { if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS)) -@@ -2612,8 +2620,11 @@ skip_ht40: - return; +@@ -2667,7 +2678,7 @@ skip_to_6ghz: + return; - /* Back to HT configuration if channel not usable */ --
Proposed reviewers to include in patches
Hi! I sent a patch set for review two months back but I am yet to receive any comments, ack/nack. Maybe nobody took action since I did not Cc: anyone specifically. Are there ppl who normally carry out reviews or should I just resend the patch set? -- Mauri ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH v2 1/2] ath79: add support for reset key on MikroTik RB912UAG-2HPnD
> I'm seeing this in the bootlogs when using this patch: > > [5.183305] gpio-latch gpio_latch: failed to get gpio 7: -517 > [5.235889] rb91x-nand nand_gpio: failed to get gpios: -517 It's okay. The gpio-latch probe function seems to be called before the rb91x-key probe, but it also returns EPROBE_DEFER (-517), so it will be called later. I've tested master with reset key patch and Koen's patch that sets ref clock freq to 2500. All is working: nand, leds, key and Gigabit Ethernet (setting 100 -- pings okay, setting back 1000 -- pings still okay). Should I delete from my rb91x-key patch support for kernel 5.4 and submit v2? Thanks, Denis ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH v2] firmware-utils: support checksum for AVM fritzbox wasp SOCs
From: Daniel Kestrel This patch adds creating the checksum to be able to create an image and boot the secondary ath79 based wireless assist (WASP) SoC with a second instance of OpenWrt for some AVM Fritzbox devices (3390, 3490, 5490, 7490). The utility is called avm-wasp-checksum and was originally created by Andreas Boehler. Signed-off-by: Daniel Kestrel --- CMakeLists.txt | 1 + src/avm-wasp-checksum.c | 171 2 files changed, 172 insertions(+) create mode 100644 src/avm-wasp-checksum.c diff --git a/CMakeLists.txt b/CMakeLists.txt index f406520..5f886ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,7 @@ ENDMACRO(FW_UTIL) FW_UTIL(add_header "" "" "") FW_UTIL(addpattern "" "" "") FW_UTIL(asustrx "" "" "") +FW_UTIL(avm-wasp-checksum "" --std=gnu99 "") FW_UTIL(bcm4908asus "" "" "") FW_UTIL(bcm4908kernel "" "" "") FW_UTIL(buffalo-enc src/buffalo-lib.c "" "") diff --git a/src/avm-wasp-checksum.c b/src/avm-wasp-checksum.c new file mode 100644 index 000..8c112f3 --- /dev/null +++ b/src/avm-wasp-checksum.c @@ -0,0 +1,171 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (C) 2020 Andreas Boehler + * + * This tool was based on: + * firmware-crc.pl by Atheros Communications + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + * + */ + +#include +#include +#include +#include +#include /* for getopt() */ +#include + +char *infile; +char *outfile; +char *progname; +enum { + MODEL_3390, + MODEL_X490 +} model; + +#define CHUNK_SIZE 256 + +uint32_t crc32_for_byte(uint32_t r) +{ + for (int j = 0; j < 8; ++j) + r = (r & 1 ? 0 : (uint32_t)0xEDB88320L) ^ r >> 1; + return r ^ (uint32_t)0xFF00L; +} + +void crc32(const void *data, size_t n_bytes, uint32_t *crc) +{ + static uint32_t table[0x100]; + + if (!*table) + for (size_t i = 0; i < 0x100; ++i) + table[i] = crc32_for_byte(i); + for (size_t i = 0; i < n_bytes; ++i) + *crc = table[(uint8_t)*crc ^ ((uint8_t *)data)[i]] ^ *crc >> 8; +} + +static void usage(int status) +{ + fprintf(stderr, "Usage: %s [OPTIONS...]\n", progname); + fprintf(stderr, + "\n" + "Options:\n" + " -i input file name\n" + " -o output file name\n" + " -m model (3390, x490 for 3490/5490/7490)\n" + " -h show this screen\n" + ); + + exit(status); +} + +int main(int argc, char *argv[]) +{ + uint32_t crc = 0; + FILE *in_fp; + FILE *out_fp; + uint32_t buf[CHUNK_SIZE]; + size_t read; + + progname = argv[0]; + + while (1) { + int c; + + c = getopt(argc, argv, "i:o:m:h"); + if (c == -1) + break; + + switch (c) { + case 'i': + infile = optarg; + break; + case 'o': + outfile = optarg; + break; + case 'm': + if (strcmp(optarg, "3390") == 0) + model = MODEL_3390; + else if (strcmp(optarg, "x490") == 0) + model = MODEL_X490; + else + usage(EXIT_FAILURE); + break; + case 'h': + usage(EXIT_SUCCESS); + default: + usage(EXIT_FAILURE); + break; + } + } + + if (!infile || !outfile) + usage(EXIT_FAILURE); + + in_fp = fopen(infile, "r"); + if (!in_fp) { + fprintf(stderr, "Error opening input file: %s\n", infile); + return EXIT_FAILURE; + } + out_fp = fopen(outfile, "w"); + if (!out_fp) { + fprintf(stderr, "Error opening output file: %s\n", outfile); + fclose(in_fp); + return EXIT_FAILURE; + } + + while (!feof(in_fp)) { + switch (model) { + case MODEL_3390: + read = fread(buf, sizeof(uint32_t), CHUNK_SIZE, in_fp); + if (ferror(in_fp)) { + fprintf(stderr, "Error reading input file: %s\n", infile); + fclose(in_fp); + fclose(out_fp); + return EXIT_FAILURE; + } + for (int i = 0; i < read; i++) + crc = crc ^ buf[i]; + fwrite(buf, sizeof(uint32_t), read, out_fp); +
Re: [PATCH 2/2] devices: Add Cypress CYW43455
Which project is this for? I don’t see a devices.txt in openwrt.git. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel