Compare commits

...

2010 Commits
v2.4.0 ... next

Author SHA1 Message Date
John Crispin
ac122c7912 hostapd: add CUI to ACL RADIUS Access-Request
When radius_request_cui=1 is configured, the EAP path includes a
Chargeable-User-Identity attribute (RFC 4372) but the ACL path used
by psk2-radius / mpsk-radius does not.  Add a nul CUI to
hostapd_radius_acl_query() so the RADIUS server is solicited for CUI
in Access-Accept, matching the EAP initial-request behaviour.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-14 10:21:59 +01:00
Arif Alam
5b64d78459 ucentral-client: fix hostname validation
- Wire hostname validation enable / disable to hostname_validate
  flag in gateway.json

- Fix hostname validation check when server cert Subject CN has
  other attributes like Organization in case of Insta
  server certs: subject=CN=*.example.com, O=ExampleInc.
  Fix backported to libwebsockets from:
  5124ffe9d4

Fixes WIFI-15384

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2026-03-14 09:21:58 +01:00
John Crispin
68c3bd4bbf mediatek: fix eap111 network config and rebase WAP588M patch
Move edgecore,eap111 to the correct switch group in 02_network
and adjust the WAP588M patch context to match.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-13 17:22:42 +01:00
John Crispin
653ea84231 rpcd: fix build failure against qca-wifi-7 iwinfo
The standard iwinfo added he_chan_info, eht_chan_info and eht_chan_width
which rpcd uses unconditionally. The qca-wifi-7 iwinfo lacks these,
breaking the rpcd build.

Add IWINFO_HAS_EHT_CHAN_INFO to the standard iwinfo header and guard
the HE/EHT scan result blocks in rpcd behind it.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-13 15:29:51 +01:00
John Crispin
78c6fd421f ucode: add missing MLO TTLM attribute stubs for QCA wifi-7
The QCA wifi-7 nl80211.h is missing NL80211_ATTR_MLO_TTLM_DLINK and
NL80211_ATTR_MLO_TTLM_ULINK. Add stub defines mapping them to
NL80211_ATTR_NOT_IMPLEMENTED to fix the build.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-13 12:24:57 +01:00
John Crispin
84aa3b08c1 config.yml: update to latest openwrt-25.12
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-13 11:03:17 +01:00
John Crispin
9fd4bd7e4b luci-mod-ucentral: hide buffered memory row when value is zero
On some devices mem.buffered is 0 which evaluates as falsy, causing
the status page to render a "?" instead of a progress bar. Skip the
row entirely when buffered is 0 or absent.

Fixes: WIFI-15328
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-13 11:03:17 +01:00
John Crispin
9363f98bca wifi-scripts: disable rsn_override by default
Vendor hostapd builds such as qca-wifi-6 do not support the
rsn_override_key_mgmt, rsn_override_pairwise and rsn_override_mfp
configuration items. When rsn_override defaults to 1, these items
are emitted for wpa3 and wpa3-mixed encryption types causing hostapd
to reject the entire configuration.

Change the default to 0 making RSN Override opt-in, and gate the
emission of rsn_override_* lines on rsn_override being enabled.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-13 09:13:27 +01:00
John Crispin
5edcbf45d2 ucentral-event: remove debug logging from strict forwarding
Remove logger calls that were left in from development. The FDB
entries are observable via 'bridge fdb show' and do not need runtime
logging in production.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-13 08:46:22 +01:00
John Crispin
cb040fb624 udhcpinject: fix UDP pseudo-header address extraction
ntohs() on a right-shifted __be32 produces garbage because the shift
operates on the network-order representation. Use ntohl() first to
convert to host order, then extract the 16-bit halves.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-13 08:45:17 +01:00
Kumiko18
59851f9886 ucentral-event: add FDB management for strict forwarding
When strict forwarding is enabled, DHCP packets fail to forward
because the bridge lacks static FDB entries for client MACs in the
correct VLAN. Add per-station static FDB entries tagged with the
bridge PVID on sta-authorized and remove them on disconnect.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-13 08:44:22 +01:00
Kumiko18
d9e5247b5b udhcpinject: fix IP and UDP checksum calculation
The checksum code mixes host and network byte order inconsistently,
producing corrupt UDP checksums. Switch to consistently working in
host byte order using ntohs() on each word before summing, and
htons() on the final result.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-13 08:44:09 +01:00
John Crispin
b24ef86d48 qca-wifi-6: ftm: fix package version for apk compatibility
apk rejects version strings containing alphabetic suffixes. Drop the
csu1 qualifier from PKG_VERSION as it is not needed for the local
source build.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-13 08:35:54 +01:00
John Crispin
cccb4aae75 ucentral-schema: update to latest HEAD
3cebaf7 schema: remove default accounting interim interval
593003b renderer: honour roaming set to false

Fixes: WIFI-15359
Fixes: WIFI-15362
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-13 08:35:07 +01:00
Arif Alam
5614812d56 ucentral-client: fix ucentral insecure mode enabled by default when allow-self-signed is unset
Fixes WIFI-15375

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2026-03-12 13:07:20 +01:00
Mateusz Bajorski
7f71db60c0 ucentral-pstore: Disable printing processed lines
When processing huge console log and dmesg files printing lines
hanged execution blocking ucentral-state startup process.

It seems stdout is mainly for debug purposes and lines are
printed after we store file, so it is safe to disable print
as file is already processed and can be examined.

Fixes: WIFI-15356

Signed-off-by: Mateusz Bajorski <mbajorski@shasta.cloud>
Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2026-03-12 13:06:45 +01:00
John Crispin
a76ed4c485 ucentral-schema: install ucode system scripts with executable permission
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
3a52f185d3 wifi-scripts: add psk2-radius and osen encryption support
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
d94a9528b3 qca-wifi-6: mac80211: remove file installs provided by wifi-scripts
Remove mac80211.sh and 10-wifi-detect installs from kmod-cfg80211 since
these files are now provided by the standard wifi-scripts package.

Add #mlo pseudo-device early returns to drv_mac80211_setup() and
drv_mac80211_teardown() to prevent errors on MLO pseudo-devices.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
aecc717738 qca-wifi-6: hostapd: switch to standard ucode scripts
Replace the QCA-specific hostapd.uc and wpa_supplicant.uc with copies
of the standard OpenWrt versions, adding try/catch guards around
udebug_set() calls that the older 2021 QCA hostapd binary does not
expose.

Remove common.uc, wdev.uc, hostapd.sh, and wps hotplug installs from
hostapd-common since these are now provided by the standard wifi-scripts
package.

Add ucode-mod-rtnl and libudebug to CORE_DEPENDS as required by the
standard ucode scripts.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
674dfe09e7 qca-wifi-6: wifi-scripts: remove package in favour of standard wifi-scripts
Drop the QCA wifi-6 wifi-scripts override so the standard OpenWrt
wifi-scripts package takes over, providing common.uc, wdev.uc,
hostapd.sh, netifd-wireless.sh, sbin/wifi, and mac80211.sh.

The QCA-specific psk2-radius and osen encryption features are ported
to the standard netifd-wireless.sh separately.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
78acb7f329 qca-wifi-7: iw: fix tiny variant build failure
Remove #ifdef IW_FULL guards from ntype_11u() and print_osen_ie()
definitions added by 501-compilation-fix.patch. Their callers
print_interworking() and print_wifi_osen() are not guarded, causing
implicit function declaration errors in the tiny (non-IW_FULL) build.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
5bd94d81ed qca-wifi-7: hostapd: fix build errors
Fix incompatible pointer type in wispr patch: pass sta->bandwidth
(array decays to u32 *) instead of &sta->bandwidth (u32 (*)[2]) to
radius_msg_get_wispr().

Remove stray debug syslog() call in ubus.c.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
e107217a9d qca-wifi-7: fix package version strings for apk compatibility
OpenWrt 25.12 uses apk which has stricter version validation than opkg.

Replace raw git commit hashes used as PKG_VERSION with proper numeric
versions in qca-ssdk-qca, qca-ssdk-shell, qca-nss-dp-qca, qca-nss-ppe,
qca-nss-ppe-ds, qca-nss-ppe-vp and wlan-telemetry. The git hashes are
moved to PKG_SOURCE_VERSION where they belong.

Fix mac80211 version from 6.5-rc3 (invalid due to the -rc suffix) to
6.5.0.3 using PKG_SOURCE_DATE to preserve the source tarball naming.

Uncomment PKG_RELEASE in hostapd and remove EXTRA_DEPENDS with opkg
version pinning syntax that apk rejects.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
d04c205585 ucode: update QCA nl80211 patch with PKG_CONFIG_DEPENDS
Add PKG_CONFIG_DEPENDS for QCA WiFi target configs to ensure the ucode
package gets rebuilt when switching between targets.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
042c1c9f0a ucentral-client: update to latest HEAD
d322773 package: replace system() with fork/execvp to prevent shell injection
d47d3fd package: migrate from opkg/ipk to apk for OpenWrt 25.12

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
168e9f323f mediatek: drop obsolete MT7981 WiFi firmware optimisation patch
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
c80aefa0b2 mediatek: update Edgecore EAP111 fixes patch
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
cd58175500 mediatek: add support for EMPLUS WAP588M
Add patch and build profile for the EMPLUS WAP588M access point.
MT7981B-based with MT7915E WiFi, RTL8211FS 1G Ethernet (SGMII, LAN)
and internal GbE PHY (GMII, WAN). SPI-NAND flash with dual rootfs A/B
partition scheme using active_fw u-boot environment variable.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
e6c3170ba9 mediatek: add support for Edgecore EAP115/EAP115a
Add patch and build profile for the Edgecore EAP115/EAP115a access
points. MT7987A-based with MT7992 WiFi (PCIe), RTL8211FS 1G Ethernet
(SGMII, LAN) and internal 2.5G PHY (WAN). SPI-NAND flash with dual
rootfs A/B partition scheme.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
07d96f8e19 iwinfo: drop morse micro patch for now
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
0f509fb9f6 ucentral-client: switch from opkg to apk for package listing
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
5cc709ed15 feeds/hostapd: drop feed
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
ab26c37132 mediatek: drop out of tree kernel feeds
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
619cab7a00 mac80211: backport upstream bugfixes for shell wifi-scripts
Backport three upstream fixes for the shell-based mac80211.sh:

- Capabilities grep (adf958c919): grep 'Capabilities:' also matches
  HE/EHT capability lines, causing arithmetic overflow and wrong HT
  caps. Fix by anchoring the match with grep -E '^\s*Capabilities:'.

- he_spr_psr_enabled (b74318481b): mac80211_add_he_capabilities writes
  he_spr_psr_enabled=1 directly into hostapd.conf, but hostapd does not
  recognise it as a config directive and fails to start. Remove it from
  the capabilities call and check the HW PHY capability register
  directly instead.

- iw_htmode (86eb1c0b5a): VHT160 incorrectly falls into the HT40 case,
  HE160 has no mapping at all, and 80MHz has wrong casing (80MHZ). Add
  proper VHT160/HE160 case and fix casing. For qca-wifi-7, also add the
  missing EHT20/EHT40/EHT80/EHT160 mappings.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
91ffd5a799 wifi-scripts: install netifd ucode wireless modules from upstream
Netifd in 25.12 delegates wireless management to ucode. The
network.wireless ubus object is now published by wireless.uc,
loaded by netifd's main.uc at startup. Without it, all wifi
ubus calls fail with "Not found".

Install wireless.uc, wireless-device.uc and wifi/utils.uc from
the upstream wifi-scripts package rather than keeping duplicates.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
6d89dd504c qca-wifi-6: fix build compatibility with 25.12
Replace deprecated AUTORELEASE with static release number in
batman-adv and hostapd Makefiles. Add missing kernel config option.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
818f0b7c1a profiles: remove obsolete entries
Drop the host_dependencies clang/llvm build logic from qosify and
remove the hostapd include from yuncore_ax820.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
18bb1b1ba4 ucentral-client: bump to 2026-01-30
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
ebe0716f03 qca-wifi-6: fix package versions for apk compatibility
apk requires proper version strings. Move git hashes and long version
identifiers to PKG_SOURCE_VERSION/PKG_SOURCE_DATE and set PKG_VERSION
to a conformant version number.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
3eee606e11 cmake: bump minimum version to 3.5
CMake has removed compatibility with versions below 3.5.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
bc6f851f24 hostapd: remove debug syslog
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
0d459c8577 luci: fix version format for apk compatibility
OpenWrt 25.12 uses apk which rejects the git-prefixed version format.
Align with upstream luci.mk version format.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
4dd28dd783 patches-24.10: drop the 24.10 patchset
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
95a48bd0e2 patches: add OpenWrt 25.12 patch set and update config
Add the full patch series for OpenWrt 25.12 (0001-0093) covering
base-files, hostapd, netifd, kernel, and target customisations.
Update config.yml accordingly.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-12 13:06:45 +01:00
John Crispin
2ffeaf869d ucentral-schema: drop now obsolete patch
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 15:23:56 +01:00
John Crispin
31b1655cd2 config.yml: bump 24.10.3 -> 24.10.5
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
e99ff9e09c asterfusion_ap7330: fix image file suffix
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
e5748e105c build-dev: disable boards still using mediatek-sdk kernel
These boards need to be migrated to the upstream OpenWrt target
before they can be re-enabled.

Affected boards:
- sonicfi_rap630w-211g
- sonicfi_rap63xc-211g
- edgecore_eap112
- senao_iap4300m
- senao_iap2300m
- senao_jeap6500
- emplus_wap588m

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
51a69b3f5c qca-wifi-7/ipq53xx: fix GCC warning inside the LSM303 driver
Replace variable-length arrays in lsm303agr_acc_i2c_write() and
lsm303agr_mag_i2c_write() with fixed-size buffers to resolve
-Wvla warnings. Add bounds checking to prevent buffer overflows.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
8fbbcbfabf ipq50xx: sonicfi_rap630w_312g: drop packages with missing kernel dependencies
Remove kmod-usb-uas, kmod-fs-msdos and kmod-fs-ntfs from the device
packages as their dependency on kmod-scsi-core requires CONFIG_SCSI
which is not enabled in the kernel config.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
f4ac5f36e8 dhcpdiscover: fix DHCP options type to unsigned char
The options field holds raw byte values (0-255) but was declared as
signed char, making the end-of-options marker comparison (== 255)
always false on architectures where char is signed. This broke DHCP
option parsing and triggered -Werror=type-limits on MIPS builds.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
89ab2c8ae1 hostapd: remove the feed from several profiles
This is a transition patch to unbreak builds. The follow-up fix is inside
the 25.10 rebase branch.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
8ba4ac9c51 patches: remove the remainign v23.05 patches
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
05d4dee227 patches: replace mediatek build tree hacks with fw3 variant (0061)
Remove obsolete mediatek-sdk build tree integration patches (0067, 0069)
and replace with a cleaner approach using a firewall3 default packages
variant. This simplifies the MediaTek SDK integration for OpenWrt 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
e1e3b8ea2d patches: fix crypto module packaging for older kernels (0060)
The MediaTek SDK uses kernel 5.4.271 which requires adjustments to
the crypto module packaging:

1. The gf128mul module location changed between kernel versions:
   - Kernels < 6.2: crypto/gf128mul.ko
   - Kernels >= 6.2: lib/crypto/gf128mul.ko
   Add version-specific file paths to handle both locations.

2. The sha512-arm64 module doesn't exist in older ARM64 kernels like 5.4,
   causing package build failures. Exclude this module for the mt7981
   target which uses the older MediaTek SDK kernel.

These changes allow the kernel modules to build correctly whilst
maintaining compatibility with newer kernel versions.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
2b12e23fe6 patches: add kernel 5.4.271 hash for MediaTek SDK (0059)
Add kernel version and hash for MediaTek target using Linux 5.4.271
from the MediaTek SDK external feed.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
71dcd71241 patches: carry forward LED turnoff command (0058)
Adds a turnoff command to the LED script for disabling LEDs via the led command.

Renumbered from patches/0014.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
5775787248 patches: carry forward DHCP options 138 and 224 support (0057)
Adds support for DHCP option 138 (CAPWAP AC) and option 224 (private/site-specific) in netifd and busybox udhcpc.

Renumbered from patches/0101.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
7e34484dd9 patches: consolidate hostapd TIP patches (0056)
Consolidates all TIP-specific hostapd patches into a single patch including drop script, TIP extensions, shell scripts, global_ban support, builtin patches sync, and radar notification fixes.

Consolidated from patches 0020-0025.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
d2bacb0840 patches: add ugps warning fixes (0055)
Silences compiler warnings in ugps build.

New patch for 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
d2eaf5d4bd patches: add ubox warning fixes (0054)
Silences compiler warnings in ubox build.

New patch for 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
4c57081512 patches: carry forward Morse Micro iwinfo support (0053)
Adds iwinfo support for Morse Micro wireless chipsets.

Renumbered from patches/0089.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
741ec09945 patches: carry forward uci-defaults sync (0052)
Adds sync after uci-defaults execution to ensure changes are written to disk.

Renumbered from patches/0096.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
83ecb13c0f patches: carry forward WWAN modemmanager support (0051)
Calls modemmanager script to set up Quectel LTE modems for WWAN connectivity.

Renumbered from patches/0093.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
6bc2e523e0 patches: carry forward IPQ807x UBI force detach (0050)
Adds UBI force detach patch for IPQ807x to handle problematic UBI volumes.

Renumbered from patches/0071.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
ae0b918d5e patches: carry forward Japan channel 14 fix (0049)
Fixes channel 14 configuration in wireless regulatory database for Japan.

Renumbered from patches/0099.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
6f23124157 patches: carry forward yuncore ax820 partition update (0048)
Adds insta1 and insta2 partitions to yuncore ax820 device tree.

Renumbered from patches/0097.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
a1a1a6e6a2 patches: add IPQ807x sysupgrade config behaviour (0047)
Prevents carrying configuration over during sysupgrade on IPQ807x targets.

New patch for 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
8d45ff7f8d patches: carry forward Indio UM-305AX device support (0046)
Adds device support for Indio UM-305AX on MT7621 platform.

Renumbered from patches/0058.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
71ed55d542 patches: add description to 0045-ramips-add-certificates-partitions
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
63f38233e1 patches: carry forward ramips certificates partition (0045)
Adds certificates partition to ramips device tree for secure storage.

Renumbered from patches/0057.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
f7d572fc76 patches: add EdgeCore EAP111 device fixes (0044)
Device-specific fixes for EdgeCore EAP111 MediaTek platform.

New patch for 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
e6f2f16312 patches: carry forward ucode nl80211 QCA support (0043)
Adds lib/nl80211 support for QCA WiFi 6/7 nl80211 operations in ucode.

Renumbered and updated from patches/0081.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
ed2f794093 patches: carry forward RTL8367C/S switch support (0042)
Adds compile option for RTL8367C/S switch support.

Renumbered from patches/0054.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
09831f75a2 patches: carry forward busybox NTP priority fix (0041)
Prevents using pool NTP servers if DHCP-provided NTP servers are available.

Renumbered from patches/0079.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
5491657e23 patches: carry forward fwtool EST support check (0040)
Checks for EST (Enrollment over Secure Transport) support if the certificate was issued via EST.

Renumbered from patches/0091.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
b4b69b6d07 patches: add gpio-button-hotplug compatibility fix (0039)
Fixes gpio-button-hotplug compilation on older kernel versions.

New patch for 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
57535d04b0 patches: carry forward WiFi interface renaming revert (0038)
Reverts upstream WiFi interface/device renaming changes from <phy>-<type><index> back to traditional wlan<N> naming to maintain compatibility with existing configurations.

Renumbered from patches/0026. In 24.10 the script moved from mac80211 package to wifi-scripts package.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
cb4767748b patches: carry forward rootfs size increase (0037)
Increases rootfs size to 500M for targets requiring larger firmware images.

Renumbered and generalised from patches/0085.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
4db6c64faf patches: carry forward netifd PSK2+RADIUS support (0036)
Adds support for WPA2-PSK with RADIUS accounting (PSK2+RADIUS mode).

Renumbered from patches/0034.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
e52d694543 patches: carry forward netifd swconfig reload optimisation (0035)
Only reloads swconfig if configuration actually changed, avoiding unnecessary switch resets.

Renumbered from patches/0033.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
9ef25443db patches: carry forward netifd GCMP-256 support (0034)
Adds GCMP-256 as a cipher suite when SAE is enabled, particularly for 6GHz operation.

Renumbered from patches/0090.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
e23560a249 patches: carry forward India DFS region fix (0033)
Adds DFS region configuration for India wireless regulatory compliance.

Renumbered from patches/0073.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
02b622652e patches: carry forward ubox log priority filtering (0032)
Adds log priority filtering capability to ubox logread.

Renumbered from patches/0075.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
f1ea09df61 patches: carry forward libubox CLOCK_BOOTTIME (0031)
Uses CLOCK_BOOTTIME instead of CLOCK_MONOTONIC for better suspend/resume handling.

Renumbered from patches/0042.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
3d8564ce3e patches: carry forward libubox runqueue fix (0030)
Prevents clearing the cancelled flag when a runqueue task is cancelled.

Renumbered from patches/0041.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
4d542b8803 patches: carry forward dnsmasq EDNS options (0029)
Enables EDNS configuration options including CPE-ID and other extensions.

Renumbered from patches/0039.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
befba0317f patches: carry forward dnsmasq ifb-dhcp ignore (0028)
Configures dnsmasq to ignore DHCP on the ifb-dhcp interface.

Renumbered from patches/0038.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
b7cca04960 patches: carry forward yuncore ax820 SPI fix (0027)
Reduces SPI clock speed to 20MHz for yuncore ax820 to fix stability issues.

Renumbered from patches/0050.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
c286273a41 patches: carry forward ugps AFC fields (0026)
Adds AFC (Automated Frequency Coordination) related fields to ubus GPS info command.

Renumbered from patches/0076.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
69602cdf41 patches: carry forward busybox DHCP supersede fix (0025)
Fixes issue where DHCP client would sometimes send supersede requests incorrectly.

Renumbered from patches/0087.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
bf3880a38e patches: carry forward busybox watchdog enable (0024)
Enables the watchdog tool in busybox configuration for device monitoring.

Renumbered from patches/0008.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
ef3447424f patches: carry forward nand.sh removal (0023)
Removes nand.sh from base-files as NAND handling is now done by the sysupgrade framework.

Renumbered and generalised from patches/0065.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
76d4a69ce4 patches: carry forward ucidef_set_wireless_macaddr_base (0022)
Adds helper function to set wireless MAC address base in board configuration.

Renumbered from patches/0083.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
af125ac6f8 patches: carry forward interface generation disable (0021)
Prevents automatic generation of default network interfaces on first boot, allowing full uCentral control.

Renumbered from patches/0082.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
0560e6cff3 patches: carry forward ucentral-schema hash tracking (0020)
Adds wlan-ucentral-schema revision hash to /etc/openwrt_release for version tracking.

Renumbered from patches/0087.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
8a2e9f9254 patches: carry forward CI_FWSETENV support (0019)
Adds support for CI_FWSETENV environment variable for firmware environment manipulation.

Renumbered from patches/0018.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
dbfaf32f40 patches: carry forward ucidef_set_wifi_country (0018)
Adds helper function to set WiFi country code in board configuration.

Renumbered from patches/0017.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
30b601ecee patches: carry forward sysupgrade safety flag (0017)
Makes sysupgrade default to not preserving configuration unless explicitly requested with -f flag.

Renumbered from patches/0013.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
a42b6874c7 patches: carry forward wlan-ap repo hash (0016)
Adds the wlan-ap repository hash to /etc/openwrt_release for version tracking.

Renumbered from patches/0012.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
018c1be6c5 patches: carry forward banner update (0015)
Updates the login banner with TIP/OpenWiFi branding.

Renumbered from patches/0011.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
635c9bf143 patches: carry forward default password setting (0014)
Sets the default root password to 'openwifi' for initial device access.

Renumbered from patches/0010.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
cf8de9e717 patches: add serial console login enforcement (0013)
Forces users to log in on the serial console for security, removing automatic root access.

New patch for 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
a2f98978f6 patches: fix DTC compatibility for older kernels (0012)
Removes --no-interrupt-parent flag when using older device tree compilers that don't support this option.

New patch for 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
47be5ffde3 patches: add kernel 6.1 hash support (0011)
Adds kernel 6.1 hash to build system for QSDK-based targets using this kernel version.

New patch for 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
9c796a9705 patches: add kernel 5.4 hash support (0010)
Adds kernel 5.4 hash to build system, enabling legacy kernel support for older targets.

New patch for 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
56afafa1b6 patches: add kernel 6.6 headers support (0009)
Always builds kernel 6.6 headers even for older kernels, ensuring compatibility for packages requiring newer kernel APIs.

New patch for 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:50 +01:00
John Crispin
e38a8cb9a5 patches: fix GENERIC_PLATFORM_DIR handling (0008)
Fixes GENERIC_PLATFORM_DIR handling for external targets to prevent build system conflicts.

New patch for 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
d6fb039b54 patches: add external target directory support (0007)
Introduces default location for external target directories, allowing custom targets to be maintained outside the main tree.

New patch for 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
3b17786488 patches: add QSDK kernel support (0006)
Adds build system support for Qualcomm SDK kernels, enabling builds with vendor-specific kernel versions.

New patch for 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
64d009f25d patches: carry forward MMC/QSDK image build support (0005)
Adds build system support for creating MMC and QSDK-format images.

Renumbered from patches/0004.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
9ec7be6312 patches: carry forward mbedtls to openssl replacement (0004)
Replaces libustream-mbedtls with libustream-openssl throughout the tree for consistency with TIP infrastructure.

Renumbered from patches/0007.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
5d511891bf patches: carry forward uCentral state integration (0003)
Integrates uCentral state management into OpenWrt's base system, allowing device configuration and monitoring through the uCentral framework.

Renumbered from patches/0019.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
aa883fd181 patches: carry forward feed script updates (0002)
Updates the feed management script with TIP-specific modifications.

Carried forward from patches/0002.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
6850331f6f patches: carry forward gen_config.py script (0001)
This script sets up the OpenWrt build tree based on profile definitions in profiles/.

Carried forward from patches/0001.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
63b9a0e574 patches: remove ubus uc_ubus_have_uloop fix
Remove ubus uc_ubus_have_uloop fix as this change is already upstreamed in OpenWrt 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
3f00e57fff patches: remove ipq50xx scsi-core compile fix
Remove ipq50xx scsi-core compile error fix as this is no longer needed in OpenWrt 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
1faf5dbf5e patches: remove firewall SSH on WAN patch
Remove firewall SSH on WAN patch as this is now handled in /etc/ucentral/ucentral.cfg.0000000001.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
e81efc6cf7 patches: remove ath79 patches
Remove ath79 device support and bridge-vlan patches as the ath79 target is no longer supported.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
5a336bbc27 patches: remove generic patch folders patch
Remove patch allowing generic patch folders in targets as this is now handled differently in 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
19d432a9a9 patches: remove busybox udhcpc endless loop fix
Remove busybox udhcpc endless loop fix as this issue no longer exists in the busybox version included in OpenWrt 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
e37f47c6ad patches: remove patches no longer needed in 24.10
Remove mac80211 hostapd dependency, iwinfo 6E support, wireguard-tools kernel module selection, generic pstore, feed.conf, and download.mk git patches as these are no longer needed in OpenWrt 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
6270440ea4 patches: remove lldp TIP tweaks patch
Remove lldp TIP tweaks patch as we now carry the lldpd package with TIP modifications in our feed.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
d28bd82600 patches: remove ipq53xx KERNEL_IPQ_MEM_PROFILE patch
Remove ipq53xx KERNEL_IPQ_MEM_PROFILE patch as this functionality has been merged into the main patch.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
6a31b3fe0d patches: remove kernel v4.4 support patches
Remove patches for kernel v4.4 support as old kernel versions are no longer supported in 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
e031b897f9 patches: remove uboot-envtools patches
Remove ipq807x, ipq50xx, and udaya-id5 uboot-envtools patches as this logic has been moved to the target feeds.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
06a41ea060 patches: remove netifd various backports
Remove netifd various backports patch as these changes are already upstreamed in OpenWrt 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
5aea4b8b14 patches: remove netifd VLAN awareness fix
Remove netifd VLAN awareness fix as this change is already upstreamed in OpenWrt 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
6f78703b0f patches: remove netifd bridge_isolate backport
Remove netifd bridge_isolate patch as this change is already upstreamed in OpenWrt 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
4676e41ae9 patches: remove rstrip.sh FW binary patch
Remove rstrip.sh patch as this change is already upstreamed in OpenWrt 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
46fc56fe71 patches: remove package version bump patches
Remove version bump patches for netifd, libubox, umdns, ustream-ssl, uclient, ugps, dropbear, and ubus as package versions are already updated in 24.10.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
10457cfd3d ucentral-ap: remove deprecated packages
Remove usteer, usteer2, ustp, and udevmand from the common package list as they are no longer used.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
22d89c916c config: update to OpenWrt 24.10
Update the base OpenWrt branch from 23.05 to 24.10.3 and adjust the patch folder accordingly.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
86481428fc edgecore_eap111: update profile for 24.10
Update subtarget from mt7981 to filogic and simplify profile by removing mediatek feed and redundant configuration options.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
f66e07ea2f hostapd: fix package version format in EXTRA_DEPENDS
Fix EXTRA_DEPENDS to use correct version format with 'r' prefix
(e.g., 2023.09.08~e5ccbfc6-r4 instead of 2023.09.08~e5ccbfc6-4)
to match OpenWrt 24.10's package versioning scheme. This resolves
the dependency resolution failure where wpad-openssl couldn't find
the matching hostapd-common version.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
aa568141d1 mm61xx: fix enum type mismatch for GCC 13 compatibility
Fix enum type mismatch issues that cause compilation errors with GCC 13.
The patch corrects function signatures to use proper enum types instead
of generic integer types where appropriate.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
f0bba5508a mediatek-sdk: mac80211: fix kconf host tool compilation
Fix kconf Makefile to explicitly use gcc for host tools instead of
allowing the cross compiler to leak in. This ensures the build tools
are compiled with the host toolchain rather than the target toolchain.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
c71ac7cd84 feeds: reorganise mediatek-sdk patch structure for OpenWrt 24.10
OpenWrt 24.10 changed the expected directory structure for kernel
patches in feeds. Patches that were previously in feeds/<feed>/mediatek/
now need to be in feeds/<feed>/linux/generic/ to align with the new
feed structure.

This commit moves all kernel backport and configuration files from
feeds/mediatek-sdk/mediatek/ to feeds/mediatek-sdk/linux/generic/
to comply with the new layout requirements.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
80064be97f ucentral-schema: update to latest HEAD
34379aa cleanup: remove unused MDNS service schema (no-op service)
26ae111 cleanup: remove unused HTTP service template and schema
f080ab3 cleanup: remove unused rtty service template and schema
c0c1d97 cleanup: remove unused files
e142706 fix: restore missing admin_ui variable assignment and validation
25582fa fix: restore correct file path in quality_of_service.uc
b3da9da base/interface-ssid: fix certificates variable scoping for validation
41ae448 base/interface: comprehensive refactoring to new templating pattern
3ec4415 base/switch: refactor to new templating pattern
a4a6f08 base/spotfilter: refactor to new templating pattern
5cd9b66 base/interface-firewall: comprehensive refactoring to new templating pattern
0910040 base/interface-ssid: comprehensive refactoring to new templating pattern
1f7a122 base/interface-mesh: update to new templating pattern
146068d base/interface-ieee8021x: update to new templating pattern
c272931 base/interface-bridge-vlan: update to new templating pattern
ffd4c2c base/interface-captive: update to new templating pattern
696648b base/interface-ipv6: update to new templating pattern
7034597 base/interface-ipv4: update to new templating pattern
3ca71c1 base/interface-dhcp: update to new templating pattern
5626faa base/interface-common: update to new templating pattern
4d030b5 tests: remove example files and fix wpa2-radius.json comment issue
728a10b renderer: add shell.system() method and update captive template
b5ff4fd tests: remove vxlan and gre tests and improve failure reporting
097351f tests: standardize unit test inputs with minimal valid schema pattern
c2bd383 renderer: add math import and remove local requires for deterministic testing
5cc3039 tests: add deterministic math mock and fix copy-to-expected functionality
a0c03a2 tests: add getopt-style CLI and rename to clean executable
a5f15cc tests: improve debug output structure for integration tests
51375e6 tests: add silent debug output for integration tests
ff81174 tests: simplify directory structure by renaming integration/full to full
1ac83ce tests: consolidate duplicate filesystem imports
a50e8d1 tests: remove unnecessary global mock variable assignments
ce32b74 tests: standardize context creation pattern to eliminate mutation anti-patterns
ffb830b tests: add generic single test runner and shared process execution utilities
a79f8a5 tests: create generic single test runner and remove redundant code
4c5bda4 tests: create generic single test runner for both unit and integration tests
404e9ae tests: move integration/base tests to unit/base for proper override support
1018c6f tests: update integration test expected outputs for eap101 board
0f1bd51 tests: fix error handling to preserve stacktrace display for exceptions
49d94f4 tests: consolidate test framework execution and eliminate remaining duplication
91e71b6 tests: consolidate context creation and eliminate duplication patterns
6df4283 tests: consolidate helper utilities and eliminate code duplication
038a514 renderer: extract captive object to shared library and fix integration test mocking
2ae2590 renderer: extract routing_table object to shared library and fix mock files state
2b1bcfb tests: implement process isolation for integration tests to prevent file descriptor leaks
47b67e4 tests: add comprehensive integration testing for all example configurations
cd19590 tests: implement dynamic service discovery and fix MPSK mock
e16284a tests: implement dynamic board-specific wiphy and wifi device loading
5317dd2 tests: integrate wiphy library with real board wiphy data
901f177 renderer: extract wiphy object to shared library
8187b56 tests: use real board configuration files in mock filesystem
39470a0 tests: consolidate code between real and mock renderer
17448da tests: improve error reporting in test framework
a0d463e tests: extract UCI helpers to shared library and update test outputs
3f2f3e3 renderer: minor fixes found while testing on real HW
383bf8e renderer: extract ethernet object to shared library
84cd3db schema: generate updated files
4b426c8 tests: fix integration test framework missing functions
5adba79 tests: implement full configuration integration test framework
dcf2ef8 tests: enhance board test context with dynamic wiphy mock
7a17791 tests: enhance test runner reporting for unit vs integration tests
21fb3c6 base/base: update to new templating pattern
b96def9 tests: implement board-specific integration test framework
4b78b03 renderer: move board.json loading to global scope
81041b3 renderer/templates: remove redundant fs require calls
3231152 renderer/templates/base: remove redundant fs import
bc961e0 base/ethernet: update to new templating pattern
8afa7ae renderer/templates: merge poe.uc into ethernet.uc
62eaa5e tests: add ethernet base template test cases (Step 1)
7e1d756 renderer/templates/ethernet: fix missing boolean wrappers
c82a7a9 schema: validate timeouts field descriptions
f5f6c43 base/timeout: update to new templating pattern
ae504fa tests: add timeout base template test cases (Step 1)
02f6fa9 renderer/templates/timeout: fix syntax error with extra closing tag
0748776 schema: validate unit field descriptions
355ad67 base/unit: update to new templating pattern
ec1b712 renderer/templates/unit: refactor to use helper functions (Step 2)
f3dcc79 tests: add unit base template test cases (Step 1)
12fc839 tests: add mock shell object for password management functions
2ae69f4 docs: update TESTING.md to reflect new test framework architecture
8e1eb31 tests: add support for base template testing infrastructure
0173636 schema: validate admin_ui field descriptions
49fb411 services/admin_ui: update to new templating pattern
b6b298a tests: add admin_ui test cases
b3bcd80 tests: refactor test runner to import-based architecture with individual test counts
0906e81 tests: consolidate test framework and eliminate code duplication
437df91 schema: validate wifi_scan metrics field descriptions
7f83f39 metrics/wifi_scan: update to new templating pattern
9cdc01c tests: add wifi_scan metrics test cases
b5964e5 schema: validate wifi_frames metrics field descriptions
dc96fdf metrics/wifi_frames: update to new templating pattern
8530e1e tests: add wifi_frames metrics test cases
a96f4d8 schema: validate telemetry metrics field descriptions
050ac26 metrics/telemetry: update to new templating pattern
ee43cdb tests: add telemetry metrics test cases
5a5721d schema: validate statistics metrics field descriptions
66ecd0d metrics/statistics: update to new templating pattern
eab7543 tests: add statistics metrics test cases
107a562 schema: enhance realtime metrics documentation
6fe7857 metric/realtime: refactor to new templating patterns
7c5775d tests: add realtime metrics template test cases
ee67163 schema: regenerate the files
3d4da1f schema: validate health metrics field descriptions
7c13c52 metrics/health: update to new templating pattern
d1f2169 tests: add health metric test cases
90f6e60 tests: fix mock renderer to extract metrics variables
4ea8eec schema: validate dhcp_snooping metrics field descriptions
1b3fb93 metrics/dhcp_snooping: update to new templating pattern
ce1582c tests: add dhcp_snooping metric test cases
5bbe42e docs: extend REFACTOR.md to cover metric templates
0994c85 schema: validate rrm field descriptions
00b0079 services/rrm: update to new templating pattern
0f7fa1c tests: add rrm test cases
c7b7130 services/radius_proxy: enhance schema documentation
237c0b3 services/radius_proxy: update to new templating pattern
6185a5a tests: add radius_proxy test cases
569d14a services/radius_gw_proxy: update to new templating pattern
2893469 schema: validate quality_of_service field descriptions
4535634 services/quality_of_service: update to new templating pattern
435744e tests: add quality_of_service test cases
c6c89b5 tests: enhance mock-renderer with QoS JSON support
bd054a5 schema: enhance online-check service documentation
b83b9ac services/online_check: refactor to new templating pattern
59c4a07 tests: add online_check test cases
8abc697 schema: validate gps field descriptions
ed33d61 services/gps: update to new templating pattern
59dca34 tests: add gps test cases
2c6b87f schema: validate fingerprint field descriptions
8d58237 services/fingerprint: update to new templating pattern
5f8be0c tests: add fingerprint test cases
5f1dcff services/dhcp_snooping: update to new templating pattern
e6cfd5f tests: add dhcp_snooping test cases
acf3763 tests: enhance mock-renderer with lookup_by_interface_vlan function
9313004 schema: validate airtime_fairness field descriptions
9a483c9 services/airtime_fairness: update to new templating pattern
bcd446f tests: add airtime_fairness test cases
157f7cf captive: enhance schema documentation and examples
d0388e7 services/captive: update to new templating pattern
1c8c736 tests: add captive test cases
db3d220 tests: enhance mock-renderer with SSID-based interface lookup
5799615 schema: validate dhcp_relay field descriptions
f58a2b3 services/dhcp_relay: update to new templating pattern
21f1d72 tests: add dhcp_relay test cases
0c96e96 schema: validate dhcp_inject field descriptions
670c57f services/dhcp_inject: update to new templating pattern
d7895a2 tests: add dhcp_inject test cases
9925450 tests: enhance mock-renderer with SSID and ethernet port lookups
4adc799 docs: update REFACTOR.md with NTP service example
79a9dcc services/ntp: update to new templating pattern
1f3c2ea tests: add ntp test cases
dc99ee6 schema: validate mdns field descriptions
56cede4 services/mdns: update to new templating pattern
3f86a6d tests: add mdns test cases
2aef7f6 docs: add refactoring guidelines
b42e3cd services/ssh: update to new templating pattern
37ca498 tests: add ssh test cases
c005ec3 tests: add proper mockup service for the files module
962a961 services/ieee8021x: update to new templating pattern
2a6a151 tests: add ieee8021x test cases
faaa0ba services/lldp: update to new templating pattern
b9fdbb0 services/log: update to new templating pattern
f9dbf48 tests: add unit test harness
8851342 add new template guidelines and helper functions
5e88dcb .gitignore: update docs/ filtering
3c822a5 ipcalc: split the implementation out into a library
f7f3937 ip-collide: start using the log module
54dd256 health.uc: refactor the code
3cd8d1f state: split code up into modules and add try/catch block around everything

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
a928bd6e75 ucentral-client: update package hash
Update package mirror hash as 24.10 uses a new digest algorithm.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
f5bae60a46 profiles: remove qcom al02 eval kit profiles
Remove the qcom_al02-c15 and qcom_al02-c4 profiles as they are early evaluation kit builds no longer in use.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
f6abc3c8f8 modemmanager: update PKG_MIRROR_HASH for 24.10
Update the package mirror hash as OpenWrt 24.10 uses a new digest
algorithm.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
a28e149af8 wpa_supplicant_s1g: update PKG_MIRROR_HASH for 24.10
Update the package mirror hash as OpenWrt 24.10 uses a new digest
algorithm.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
1978a8cd87 morsecli: update PKG_MIRROR_HASH for 24.10
Update the package mirror hash as OpenWrt 24.10 uses a new digest
algorithm.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
cb73bbc063 hostapd_s1g: update PKG_MIRROR_HASH for 24.10
Update the package mirror hash as OpenWrt 24.10 uses a new digest
algorithm.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
19152b3b67 mm61xx: update PKG_MIRROR_HASH for 24.10
Update the package mirror hash as OpenWrt 24.10 uses a new digest
algorithm.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
8b1058ff14 mt76: update PKG_MIRROR_HASH for 24.10
Update the package mirror hash as OpenWrt 24.10 uses a new digest
algorithm.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
c979d1ed5d hostapd: update PKG_MIRROR_HASH for 24.10
Update the package mirror hash as OpenWrt 24.10 uses a new digest
algorithm.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
45ae2a6dcb nat46-qca: update PKG_MIRROR_HASH for 24.10
Update the package mirror hash as OpenWrt 24.10 uses a new digest
algorithm.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
b4da508757 hostapd: update PKG_MIRROR_HASH for 24.10
Update the package mirror hash as OpenWrt 24.10 uses a new digest
algorithm.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
bb9fe3136f feeds: update package hashes
Update package mirror hashes for ucrun and bridger as 24.10 uses a new digest algorithm.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
f9fe288583 ucentral-schema: fix ucentral-gps init script to prevent boot log spam
Add quiet flag to uci command to suppress error messages when GPS
configuration doesn't exist, preventing unnecessary log spam during
boot.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
623ead48e9 ucentral-schema: fix onlinecheck init script to prevent boot log spam
Add quiet flag to uci command and check for empty interval to suppress
error messages when onlinecheck configuration doesn't exist, preventing
unnecessary log spam during boot.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
3a285940b8 ucentral-event: fix wifiscan init script to prevent boot log spam
Add quiet flag to uci command to suppress error messages when event
configuration doesn't exist, preventing unnecessary log spam during
boot.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
1d6a3923ef ucentral-client: fix init script file handling
Add file existence checks before reading gateway.json and initialise
variables to prevent boot log spam when configuration file doesn't
exist.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
d97c74f2b9 cloud_discovery: fix init script file handling
Add file existence check before reading gateway.json, fix variable
assignment typo, and improve error output redirection to prevent boot
log spam when configuration files don't exist.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
63b0d6a674 rtty: fix init script error handling
Fix variable quoting in test conditions and remove explicit stderr
redirects to improve error message handling and prevent boot log spam.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
62ad4abfeb udnssnoop: fix init script to prevent boot log spam
Add quiet flag to uci command to suppress error messages when qosify
configuration doesn't exist, preventing unnecessary log spam during
boot.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
71537384e4 ucentral-tools: add clang-format configuration
Add clang-format configuration file used for code formatting.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
0374d9d8f8 ucentral-tools: format radiusprobe.c with clang-format
Apply clang-format and fix code quality issues found by cppcheck:
- Consistent pointer style
- Standardise indentation and brace style
- Improve code readability

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
d2fa75f426 ucentral-tools: format firstcontact.c with clang-format
Apply clang-format and fix code quality issues found by cppcheck:
- Consistent pointer style
- Standardise indentation and brace style
- Improve code readability

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
edd40cffb0 ucentral-tools: format dnsprobe.c with clang-format
Apply clang-format and fix code quality issues found by cppcheck:
- Consistent pointer style
- Standardise indentation and brace style
- Improve code readability

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
7483cb6250 ucentral-tools: format dhcpdiscover.c with clang-format
Apply clang-format and fix code quality issues found by cppcheck:
- Consistent pointer style (char* → char *)
- Fix variable shadowing issues
- Improve error message formatting
- Standardise indentation and brace style

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
aa3edda956 ucentral-tools: modernise build system and remove ip-collide
Update CMakeLists.txt to CMake 3.10 with comprehensive compiler
warnings and security hardening flags. Add strict warning flags
(-Wall, -Wextra, -Werror plus ~30 additional checks) and security
features (stack protector, RELRO). Separate Debug/Release
configurations with appropriate optimisation flags.

Remove ip-collide tool from build and installation as it's no longer
needed.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
45f79509e9 ucentral: add custom lldpd package
Add custom lldpd package with older UCI and SYSV init scripts. The
upstream init scripts have changed significantly in 24.10, and we
want to keep the tested version that is known to work.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
adcc9403d9 spotfilter: fix compilation with gcc13
Add missing header includes (linux/if_vlan.h and net/ndisc.h) for
gcc13 compatibility.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
a87d52d175 rtty: fix compilation with gcc13
Add missing libgen.h header and fix basename usage for gcc13
compatibility.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
1edaf727b5 libwebsockets: fix lws_tls_server_abort_connection compilation
Fix return type declaration for lws_tls_server_abort_connection to
match the expected signature for gcc13 compatibility.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
a0fb0eaf52 qca-ssdk: fix rtl826xb PHY driver compilation with gcc13
Fix return type mismatch in phy_common_general_reg_mmd_set function
for gcc13 compatibility.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
6b76c7afcb mac80211: fix ath12k driver compilation with gcc13
Fix various compilation issues in the ath12k driver for gcc13:
- Remove invalid ATH12K_DBG_WMI parameter from ath12k_warn calls
- Fix return type mismatch in ath12k_mac_he_gi_to_nl80211_he_gi

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
b09253fc4a mac80211: fix kconf compilation with gcc13
Fix kconf Makefile to explicitly use gcc instead of $(CC) variable
for compatibility with gcc13 build environment.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
13c2a2f5a2 ipq53xx: fix bootconfig driver compilation with gcc13
Fix CONFIG_EMMC macro to CONFIG_MMC for compatibility with gcc13
and newer kernel configurations.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
4ab2704264 qca-wifi-7: add batctl and batman-adv packages
Copy batctl and batman-adv packages from 23.05 as the 24.10 versions
do not compile after the upgrade.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:49 +01:00
John Crispin
f056e66ba8 qca-wifi-7: update iwinfo and add wifi-scripts dependency
Update iwinfo to latest version (2024-10-20) and add the wifi-scripts
package to work with the latest WiFi configuration changes in OpenWrt
24.10.

The mac80211 package now depends on wifi-scripts, and the mirror hash
has been updated for the new digest algorithm.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:48 +01:00
John Crispin
8884ef4e78 ipq53xx: rename sysupgrade images from .tar to .bin
Standardise the sysupgrade image format across all IPQ5332-based
devices by renaming the output from .tar to .bin format.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:48 +01:00
John Crispin
2d990397cc qca-wifi-7: remove qca-nss-clients package
Remove the qca-nss-clients package as it is not actively used and
causes errors during feed setup.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:48 +01:00
John Crispin
fff69b5038 profiles: update feed name and sysupgrade image extension
Update device profiles to reflect the feed rename from ipq807x_v5.4
to qca-wifi-6, and change sysupgrade image extension from .tar to
.bin to match the new image format.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:48 +01:00
John Crispin
6638ad082d feeds: rename ipq807x_v5.4 to qca-wifi-6
Rename the ipq807x_v5.4 feed to qca-wifi-6 to align with the naming
convention used for qca-wifi-7. This change improves consistency and
better reflects the content, which encompasses WiFi 6 (802.11ax)
packages across various Qualcomm IPQ platforms (IPQ5018, IPQ6018,
IPQ8074, etc.).

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:48 +01:00
John Crispin
7509d9c342 feeds: remove hfcl feed
Remove the hfcl feed which contained workarounds for old bugs that
are now resolved in the mainline code.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:48 +01:00
John Crispin
8decd511c2 feeds: remove qosify package
Remove the custom qosify package as the new upstream version from
OpenWrt 24.10 is now being used.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:48 +01:00
John Crispin
a20ce87ebc feeds: remove udevmand package
Remove the deprecated udevmand package. Its functionality is now
handled directly in ucentral-schema.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:48 +01:00
John Crispin
99acb3cc05 feeds: remove ustp package
Remove the deprecated and unused ustp package.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:48 +01:00
John Crispin
1696f30881 feeds: remove usteer package
Remove the deprecated and unused usteer package.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:48 +01:00
John Crispin
646a811da6 feeds: remove mcu feed
Remove the old and unused mcu feed which provided MCU firmware
management and communication utilities for Bluetooth-related
hardware.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:48 +01:00
John Crispin
c606b9acbf feeds: remove edgecore feed
Remove the old and unused edgecore feed which provided the ELTT2
(Edgecore Link Layer Test Tool) utility.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:48 +01:00
John Crispin
2000a456f9 feeds: remove bluetooth feed
Remove the old and unused bluetooth feed which provided generic
Bluetooth support including 6LoWPAN, iBeacon, NRF52840, and LED
indicator utilities.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:48 +01:00
John Crispin
4dc1b4d067 feeds: remove bluetooth-csr feed
Remove the old and unused bluetooth-csr feed which provided BlueZ
and CSR8811 Bluetooth chip support.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:47 +01:00
John Crispin
41d91513c3 feeds: remove bluetooth-cc2652 feed
Remove the old and unused bluetooth-cc2652 feed which provided BLE
scanning and firmware flashing support for TI CC2652 chips.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-09 10:19:47 +01:00
John Crispin
baa3cbf134 tip-defaults: update insta.pem certificates
Fixes: PKI2-209
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-04 20:07:49 +01:00
John Crispin
9db344d4ea ucentral-schema: fix SSID basename to use global count
Use the global count instead of per_band_counters for the basename
to keep it in sync with the captive portal logic.

Fixes: WIFI-15327
Signed-off-by: John Crispin <john@phrozen.org>
2026-03-04 10:12:50 +01:00
Tanya Singh
515afeae6b ipq807x_v5.4: Update 2.4G radio BDF for EAP104 to improve Tx Power
Fixes: WIFI-15353
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2026-03-04 08:21:36 +01:00
Venkat Chimata
50f92c87c2 ucentral-event: Add BSSID/SSID to client stats payload
Populate bssid and ssid in the nl_cb client event payload by
resolving the hostapd instance using msg.msg.dev. Defaults to empty
values if hostapd context is unavailable.

Improves client visibility in multi-BSS deployments.

Fixes WiFi-15352

Signed-off-by: Venkat Chimata <venkat@nearhop.com>
2026-03-02 16:15:41 +01:00
800246@emplustech.com
64bcc609eb Emplus_WAP588m: Certificates Not Retained on Factory Reset
Signed-off-by: 800246@emplustech.com <cp.chang@emplustech.com>
2026-03-02 16:15:41 +01:00
800246@emplustech.com
d62881c70a mediatek: Add missed set lan wan mac function for emplus,wap588m
Signed-off-by: 800246@emplustech.com <cp.chang@emplustech.com>
2026-03-02 16:15:41 +01:00
John Crispin
333a8fb2a0 git: OpenWrt git servers have been migrated
The servers have been migrated to newer hardware. Switch back to using https.

Signed-off-by: John Crispin <john@phrozen.org>
2026-03-02 06:14:45 +01:00
dhileep
8eb37d825d ucentral-event: Client connectivity fails during DVLAN + MPSK mode
Duplicate VLAN validation fails in EAP105, which causes the client connectivity to fail.
Interface prefix (phy-*) not handled in the vlan validation

Fixes: WIFI-15351

Signed-off-by: dhileep <c-dsridhar@shasta.cloud>
Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2026-03-02 06:13:51 +01:00
John Crispin
d7b578c58d Revert "profiles/edgecore_eap111.yml: use the sdk kernel for v4.2"
This reverts commit 20f5fa0284.

Signed-off-by: John Crispin <john@phrozen.org>
2026-02-05 16:57:15 +01:00
Arif Alam
bab5db5bf5 cloud_discovery: check operational cert in /etc/ucentral to determine reenroll
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2026-02-05 08:35:41 +01:00
John Crispin
be9783e7db ratelimit: use sfq leaf qdisc on mediatek targets
fq_codel is not available on mediatek platforms. Replace it with sfq
during package install when CONFIG_TARGET_mediatek is set.

Fixes: WIFI-15285
Signed-off-by: John Crispin <john@phrozen.org>
2026-01-30 09:40:12 +01:00
John Crispin
e928d555e9 qca-wifi-7: fix syntax error in ipq53xx platform upgrade script
Remove extra 'fi' in edgecore,eap105 case block introduced by
commit 1d4cbc46 which replaced a two-level if/else with a
three-level nesting but kept both original closing 'fi' lines.

Fixes: 1d4cbc46 ("ipq807x_v5.4, qca-wifi-7: enable/disable boot bank switch based on upgrade_available value during fw upgrade for Edgecore APs")
Signed-off-by: John Crispin <john@phrozen.org>
2026-01-29 10:14:07 +01:00
John Crispin
ce1f7df73a certificates: unmount empty alternate bank to preserve birth certs
On a factory fresh dual boot bank device with birth certificates only
in the primary bank, the alternate bank mount would shadow the primary
with an empty filesystem. The script then exited with failure despite
birth certificates being available underneath.

After checking the alternate bank, unmount it if empty and re-check so
the primary bank's birth certificates remain accessible for EST
enrolment.

Fixes: WIFI-15292
Signed-off-by: John Crispin <john@phrozen.org>
2026-01-28 09:46:07 +01:00
Venkat Chimata
e7af38b198 rrmd: Update Tx Power control to use interface instead of wiphy
1. Update TX power control to use interface (dev) instead of wiphy, improving
   compatibility on Wi-Fi 7 platforms.
2. Introduce bssid_to_ifname() helper to reliably map BSSID to interface name.
3. Add a short delay (10 milliseconds) after setting TX power to allow
   driver/firmware state to settle before reading back the value.

Tested on EAP014 and EAP105.

Fixes WIFI-14964

Signed-off-by: Venkat Chimata <venkat@nearhop.com>
2026-01-28 09:06:58 +01:00
Venkat Chimata
34a5e87363 hostapd: fix 6 GHz center frequency adjustment condition
Ensure that the center frequency segment 0 index adjustment for
320 MHz bandwidth is applied only for valid 6 GHz frequencies.

Previously, the bandwidth check alone could trigger the adjustment
even when the operating center index did not correspond to a 6 GHz
frequency. Add an explicit is_6ghz_freq() check to avoid incorrect
center frequency offset calculations.

Fixes: WIFI-15238

Signed-off-by: Venkat Chimata <venkat@nearhop.com>
2026-01-28 08:50:21 +01:00
John Crispin
666642480a ucentral-schema: update to latest HEAD
8491119 renderer: make SSID naming band-aware for stable section names
69cf683 renderer: derive no_reconf from radio reconf capability
13f797e radio: use PHY-reported channels instead of hardcoded lists
e5a6295 state: guard against null devstats in iface_add_counters

Signed-off-by: John Crispin <john@phrozen.org>
2026-01-24 09:57:38 +01:00
Venkat Chimata
a60d3b0190 qca-wifi-7: wifi-detect: mark radios as reconf-capable
Set reconf=true in wiphy info during radio detection, indicating that
Wi-Fi 7 radios support BSS reconfiguration without requiring full
interface teardown.

This complements the bss_reload fix by ensuring the reconfiguration
capability is advertised to netifd, allowing it to choose the hot
reload path when appropriate.

Signed-off-by: Venkat Chimata <venkat@nearhop.com>
2026-01-24 09:45:50 +01:00
Venkat Chimata
becce0e6c6 wifi7: allow BSS reload with reconf flag instead of forcing full restart
On Wi-Fi 7 platforms, BSS reload events were always propagated with
reconf=false, forcing netifd/hostapd into a full teardown path even
when a reconfiguration reload was requested.

This change restores the original intent by propagating the reconf
flag correctly from the reload path, allowing hostapd to distinguish
between reconfiguration-capable reloads and teardown-required cases.

With this change, hot reload works consistently on Wi-Fi 7 APs in the
same way as on Wi-Fi 6 platforms, avoiding unnecessary wireless
teardown and driver reinitialization.

Signed-off-by: Venkat Chimata <venkat@nearhop.com>
2026-01-24 09:44:54 +01:00
ruanyaoyu
871834bae5 ipq807x_v5.4: hostapd: fix 6G MBSSID MAC address generation
Fix three issues preventing 6G non-primary SSIDs from connecting on
CIG WF-196:

1. Fix #num_global_macaddr config parsing: the value was stored with
   the '#' prefix but accessed without it, causing the setting to be
   silently ignored (always defaulting to 1).

2. Fix MBSSID config parsing: look for 'multiple_bssid' (the actual
   hostapd config key) instead of 'mbssid'.

3. Fix B5 MAC generation for MBSSID: swap bytes 3 and 5, clear lower
   nibble of byte 5, then set locally-administered bit. This avoids
   MAC collisions with 6G multi-BSSID interfaces.

4. Add iface_macaddr_init() wrapper to ensure mbssid parameter is
   passed consistently during both iface_restart and iface_reload_config.

Signed-off-by: ruanyaoyu <ruanyaoyu@cigtech.com>
2026-01-24 09:42:20 +01:00
Tanya Singh
1d4cbc46d1 ipq807x_v5.4, qca-wifi-7: enable/disable boot bank switch based on upgrade_available value during fw upgrade for Edgecore APs
Fixes: WIFI-15304
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2026-01-24 09:25:41 +01:00
Tanya Singh
6765ca15d0 qca-wifi-7/ipq53xx: Increase ramoops size for EAP105
Fixes: WIFI-15305
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2026-01-24 09:25:15 +01:00
Marek Kwaczynski
81a358f52e mtk: mac80211: fix CSA crash with dynamic VLAN
When using dynamic VLAN (AP_VLAN) on 5 GHz, CSA finalize may call
_ieee80211_sta_cap_rx_bw() with a non-NULL chandef whose ->chan is NULL.
This leads to a NULL pointer dereference at chandef->chan->band and a
kernel panic.

Avoid the crash by validating chandef->chan before accessing the band and
fall back to the existing non-chandef path when the channel pointer is not
available during CSA.

Trace:
Unable to handle kernel read from unreadable memory at virtual address 0000000000000000
Internal error: Oops: 0000000096000005 [#1] SMP
CPU: 0 PID: 59 Comm: kworker/u4:2
Workqueue: events_unbound wiphy_delayed_work_pending [cfg80211]
Hardware name: Edgecore EAP111 (DT)
pc : _ieee80211_sta_cap_rx_bw+0x14/0xcc [mac80211]
lr : _ieee80211_sta_cur_vht_bw+0x20/0xb0 [mac80211]

Call trace:
  _ieee80211_sta_cap_rx_bw+0x14/0xcc [mac80211]
  ieee80211_iter_chan_contexts_atomic+0x260/0xf38 [mac80211]
  ieee80211_link_unreserve_chanctx+0x430/0xab8 [mac80211]
  ieee80211_link_use_reserved_context+0xac/0xf4 [mac80211]
  ieee80211_nan_func_terminated+0x3f8c/0x4f00 [mac80211]
  ieee80211_csa_finalize_work+0x2c/0x34 [mac80211]
  wiphy_delayed_work_pending+0x298/0x3bc [cfg80211]
  process_one_work+0x178/0x2f0
  worker_thread+0x2e8/0x4d4
  kthread+0xdc/0xe0
  ret_from_fork+0x10/0x20

  Kernel panic - not syncing: Oops: Fatal exception

Fixes: WIFI-15312

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2026-01-24 09:23:58 +01:00
jackcybertan
2710848a63 ipq8074/rap630e: Fix the LAN and WAN MAC addresses
Fixes: WIFI-15286
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2026-01-14 08:32:46 +01:00
John Crispin
b0918f55be certificates: fix dual boot bank certificate handling
On dual boot bank devices, avoid running EST twice by checking for
operational certificates before falling back to the alternate bank.

Previously, after an upgrade the AP would boot from the alternate bank,
find only birth certificates there, and run EST again - resulting in
duplicate operational certificates.

Now the flow is:
- If operational.pem exists in current bank, use it
- If only birth certs in current bank, check alternate bank
- Single boot bank devices behave as before

Fixes: WIFI-15292
Signed-off-by: John Crispin <john@phrozen.org>
2026-01-14 08:30:28 +01:00
John Crispin
815006f3e7 ucentral: set version to 4.2.0
Signed-off-by: John Crispin <john@phrozen.org>
2025-12-12 16:02:07 +01:00
John Crispin
a7a9458d81 profiles/sonicfi_rap63xc-211g: add missing hostap feed
Signed-off-by: John Crispin <john@phrozen.org>
2025-12-12 16:02:07 +01:00
ruanyaoyu
e366742c1b ipq807x: enable CPTCFG_ATH12K_DEBUG for CIG devices
Signed-off-by: ruanyaoyu <ruanyaoyu@cigtech.com>
2025-12-12 14:12:06 +01:00
Sebastian Huang
ee601508d9 qca-wifi-7/hostapd: keep BSS coloring enabled with the same color if there is no free colors
Fixes: WIFI-15279

Signed-off-by: Sebastian Huang <sebastian_huang@accton.com>
2025-12-12 14:11:37 +01:00
Tanya Singh
5c5eb7891c rrmd: Add DFS channel exclusion support to the RCS (Random Channel Selection) algo when DFS is disabled
Fixes: WIFI-15270
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-12-12 14:11:23 +01:00
Venkat Chimata
501c11be52 bandwidth: Correct handling of RADIUS-assigned bandwidth limits
Description:
Hostapd successfully parsed the uplink and downlink bandwidth attributes from
the RADIUS server, but the values were not being propagated correctly into
sta_info. As a result, the bandwidth information was missing in the UBUS
events sent to ucentral-event.

Fix:
Ensure the parsed bandwidth values are correctly passed to sta_info so they
 are included in subsequent UBUS notifications.

Tests Performed:
Configured per-client bandwidth limits on the RADIUS server and verified that:

 - The AP enforces the configured uplink/downlink limits, and
 - The correct bandwidth values appear in the UBUS events.

Signed-off-by: Venkat Chimata <venkat@nearhop.com>
2025-12-11 16:04:46 +01:00
Venkat Chimata
352e94a133 ratelimit: generate shorter IFB names for phy-based interfaces
Interfaces like phy6g-ap0 can produce overly long IFB device names
(e.g., i-phy6g-ap0), which may exceed kernel name-length limits,
specifically in case of VLANs.
This patch normalizes such interface names by replacing the phy
prefix with p and shortening ap → a, producing more compact
IFB device names (e.g., i-p2g-a0).

Other interfaces continue using their original names.

Signed-off-by: Venkat Chimata <venkat@nearhop.com>
2025-12-11 16:04:46 +01:00
John Crispin
20f5fa0284 profiles/edgecore_eap111.yml: use the sdk kernel for v4.2
Signed-off-by: John Crispin <john@phrozen.org>
2025-12-11 08:06:49 +01:00
John Crispin
aa1d2b1c73 feeds/morse: update mirror hashes
Signed-off-by: John Crispin <john@phrozen.org>
2025-12-11 06:24:44 +01:00
John Crispin
09a7f53fb4 ucentral-schema: update to latest HEAD
a6fdd32 cmd_upgrade: enable curl to follow redirects
1c3e51f fix: Updated schema to fix issue with fingerprinting raw mode

Signed-off-by: John Crispin <john@phrozen.org>
2025-12-11 06:24:44 +01:00
Yang-Yongzhi
7665eefe1d qca-wifi-7: Add Asterfusion AP7330 model (WIFI-15267)
Enable the CONFIG_GPIO_WATCHDOG of kernel config
Add the 'wdt' watchdog service in /etc/init.d/

Signed-off-by: Yang-Yongzhi <yangyongzhi@asterfusion.com>
2025-12-11 06:24:44 +01:00
ruanyaoyu
099726eff6 ipq60xx: Fix issue where ipq60xx chip would not compile ftm
Fixes: WIFI-15271
Signed-off-by: ruanyaoyu <ruanyaoyu@cigtech.com>
2025-12-11 06:18:58 +01:00
John Crispin
7d641524e1 ucentral-schema: fix vxlan.json
the upstream section had no DNS

Fixes: WIFI-15256
Signed-off-by: John Crispin <john@phrozen.org>
2025-12-05 11:14:07 +01:00
John Crispin
bf3781e793 ucentral-schema: update to latest HEAD
384eba5 radio: apply HE settings for EHT modes

Signed-off-by: John Crispin <john@phrozen.org>
2025-12-05 10:55:25 +01:00
Venkat Chimata
415a512450 ath11k: Synchronize num_peers with the actual peer count when out of sync
Description:
The num_peers counter does not always update at the exact moment a peer is deleted.
Since deletion and decrement are not fully atomic, there are scenarios where
num_peers can drift out of sync with the actual number of peers.

Fix:
A complete rewrite of the num_peers update logic—ensuring fully correct
increment/decrement handling during peer insertion and deletion—would require
significant effort and QA validation. As an immediate and effective solution,
this patch synchronizes num_peers with the actual peer count whenever a mismatch
is detected.

Fixes WIFI-14998 and indirectly resolves WIFI-15202.

Signed-off-by: Venkat Chimata <venkat@nearhop.com>
2025-12-05 07:28:59 +01:00
Venkat Chimata
194109d317 ath11k: Fix memory leak in ath11k_qmi_driver_event_work
The buffer pointed to by event is not freed in case
ATH11K_FLAG_UNREGISTERING bit is set, resulting in
memory leak, so fix it.

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1

Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Signed-off-by: Baochen Qiang <bqiang@codeaurora.org>
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210913180246.193388-4-jouni@codeaurora.org

Signed-off-by: Venkat Chimata <venkat@nearhop.com>
2025-12-05 07:28:59 +01:00
Venkat Chimata
d64e3c8d14 wifi: ath11k: Fix memory leak in ath11k_peer_rx_frag_setup
crypto_alloc_shash() allocates resources, which should be released by
crypto_free_shash(). When ath11k_peer_find() fails, there has memory
leak. Add missing crypto_free_shash() to fix this.

Fixes: 243874c64c81 ("ath11k: handle RX fragments")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230102081142.3937570-1-linmq006@gmail.com

Signed-off-by: Venkat Chimata <venkat@nearhop.com>
2025-12-05 07:28:59 +01:00
Oleksandr Mazur
a81fe1274b ath11k: fix memory leak when peer lookup fails in dp rx path
In the DP RX path, fast_rx is set to true by default.
Currently, if peer lookup fails in ath11k_dp_rx_h_mpdu(), the SKB is not sent
to the network stack or mac80211 because fast_rx remains true. This results
in a memory leak.

Fix this by setting fast_rx = false when peer lookup fails in
ath11k_dp_rx_h_mpdu(), ensuring the SKB is properly delivered to mac80211
via ath11k_dp_rx_deliver_msdu().

Fixes: WIFI-15202

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-12-05 07:28:59 +01:00
John Crispin
05b5bae4aa ath11k: fix num_peers counter corruption and add debug logging
The num_peers counter becomes corrupted during peer deletion due to race
conditions between ath11k_peer_delete() and ath11k_peer_unmap_event().
The firmware may or may not send unmap events, and the timing varies,
causing the counter to either leak (increment without decrement) or
underflow (double decrement).

Root causes:
1. ath11k_peer_delete() doesn't decrement num_peers, relying on
   ath11k_peer_unmap_event() to do it
2. Firmware sometimes doesn't send unmap events, leaving num_peers
   inflated
3. When unmap events do arrive, timing races with ath11k_peer_delete()
   can cause missed decrements
4. Cleanup paths may double-decrement if delete_in_progress not checked
5. num_peers modified outside proper locking in some paths

This fix:
- Moves num_peers decrement into ath11k_peer_delete() after successful
  peer deletion wait, ensuring exactly one decrement per deletion
- Handles both cases: peer removed by unmap event, or peer still in list
- Removes num_peers decrement from ath11k_peer_unmap_event() to prevent
  double-decrement when unmap event arrives
- Adds ath11k_dp_peer_cleanup() call before ath11k_peer_delete() in
  roaming path to ensure datapath structures properly cleaned up
- Adds delete_in_progress checks in cleanup paths to prevent
  double-delete
- Ensures all num_peers modifications happen under base_lock
- Adds comprehensive debug logging to track num_peers throughout peer
  lifecycle

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
Signed-off-by: John Crispin <john@phrozen.org>
2025-12-05 07:28:59 +01:00
Venkat Chimata
fbca032f4c WIFI-14998: wifi: ap: mitigate peer-delete WMI timeout to reduce blind period & prevent peer leaks
1. When a connected client roams to another AP, the AP is trying to delete the peer
   but for some reason the WMI command times out and while driver is waiting for
   the response, we observed that the AP doesn't respond to any frames from STA
   (probe requests, authentication etc) and once the response times out (3seconds default)
   then AP starts responding to the older requets but client has already connected to
   another AP. As the root cause for the response timing out is in the FW, we added
   a WAR to reduce the timeout to minimize this blind period, with this AP responds
   after 100ms and client connects successfully. And 100ms timeout is also reasonable
   for this internal operation.
2. In case of peer deletion timeout, the driver peer database is not cleared, so,
   if this happens often (which it is) then eventually we hit the max peers in the
   driver and all subsequent operations fail, so, in case of timeout ignore the failure
   and proceed with driver peer database cleanup.

Signed-off-by: Venkat Chimata <venkat@nearhop.com>
2025-12-05 07:28:59 +01:00
John Crispin
e2083316cc ucentral-client: update to latest HEAD
cb17a78 ucentral-client: Add command-line options for certificate paths

Signed-off-by: John Crispin <john@phrozen.org>
2025-12-04 12:42:31 +01:00
John Crispin
0173442dc0 cloud_discovery: add bind-dig dependency
Add bind-dig package dependency required for CAA record lookups
in est_client, which uses the dig command to query DNS for EST
server discovery.

Signed-off-by: John Crispin <john@phrozen.org>
2025-12-04 12:31:17 +01:00
John Crispin
cd0bbfb9c3 cloud_discovery: use .local TLD for standard FQDN discovery
Change standard FQDN from 'openwifi.network' to 'openwifi.wlan.local'
to prevent DNS hijacking attacks. The .local TLD is reserved for local
network use (mDNS) and cannot be registered in public DNS, ensuring
that discovery traffic cannot be redirected to attacker-controlled
infrastructure.

Signed-off-by: John Crispin <john@phrozen.org>
2025-12-04 12:31:17 +01:00
John Crispin
0f979f2b1f cloud_discovery: run EST enrollment within DHCP discovery flow
Move EST client enrollment to occur immediately after successful DHCP
discovery and before starting the ucentral client. This ensures
controller-specific certificates are enrolled before attempting to
connect. If EST enrollment fails during DHCP discovery, the client
will not be started.

Adjust interval_handler to call EST enrollment after DHCP discovery
attempt rather than before, ensuring proper certificate handling for
DHCP-discovered controllers.

Signed-off-by: John Crispin <john@phrozen.org>
2025-12-04 12:31:17 +01:00
John Crispin
371edb568f est_client: switch to dig for CAA lookups and improve logging
Replace resolv module usage with dig command for CAA record lookups
to simplify DNS query handling. Reorganise cert_prefix_determine() to
prioritise controller-specific FQDN from cloud.json before checking
discovery method.

Add extensive debug logging throughout to aid troubleshooting of EST
enrollment process, including curl commands and exit codes.

Signed-off-by: John Crispin <john@phrozen.org>
2025-12-04 12:31:17 +01:00
John Crispin
0ce1a987da tip-defaults: add OpenLAN Server Issuing CA certificate
The air-gapped EST server uses a certificate signed by the OpenLAN
Server Issuing CA. This certificate is used to ensure mTLS
authentication when the device connects to the EST server.

Signed-off-by: John Crispin <john@phrozen.org>
2025-12-04 12:31:17 +01:00
John Crispin
af9a7bdb35 cloud_discovery: allow DNS rebind for controller FQDNs
Add dnsmasq_rebind_allow() function to automatically whitelist controller
FQDNs for private IP resolution in air-gapped deployments.

When dnsmasq's boguspriv option is enabled (default), it blocks DNS
responses containing private IP addresses (RFC 1918) as a security
measure. This prevents DHCP Option 224 from resolving controller FQDNs
to local private IPs in air-gapped networks.

Solution: Inject rebind-domain-ok directives into /tmp/dnsmasq.d/
directory, which dnsmasq automatically includes via --conf-dir option.

Behaviour:
- DHCP discovery: Whitelist FQDN from dhcp_server field
- Standard FQDN discovery: Whitelist openwifi.network
- Centralized discovery: No changes (public IPs not affected)

This maintains security by only allowing specific controller domains
to resolve to private IPs whilst filtering all other RFC 1918 responses.

Signed-off-by: John Crispin <john@phrozen.org>
2025-12-04 12:31:17 +01:00
John Crispin
0589fb7f5f est_client: support FQDN-based certificate naming
Add cert_prefix_determine() function that reads discovery method from
/tmp/discovery.method and determines appropriate certificate naming:

- Centralized (OpenLAN redirector): operational.pem/operational.ca
- Air-gapped (DHCP/FQDN/Flash): <controller-fqdn>.pem/<controller-fqdn>.ca

The FQDN is extracted from the controller address in /tmp/cloud.json
(DHCP Option 224).

This enables APs to enrol and store separate operational certificates
for multiple controllers, supporting portability between centralized
and air-gapped deployments without certificate conflicts.

Signed-off-by: John Crispin <john@phrozen.org>
2025-12-04 12:31:17 +01:00
John Crispin
2009b5eb90 cloud_discovery: add certificate paths to gateway.json
Extend gateway.json to include cert and ca fields specifying which
certificate files the client should use for the connection.

Certificate naming strategy:
- Centralized (redirector discovery): operational.pem/operational.ca
- Air-gapped (DHCP/FQDN/Flash): <fqdn>.pem/<fqdn>.ca

Write discovery method to /tmp/discovery.method so est_client can
determine appropriate certificate naming when enrolling.

This enables APs to maintain separate operational certificates for
multiple controllers and automatically select the correct certificates
based on which controller they're connecting to.

Signed-off-by: John Crispin <john@phrozen.org>
2025-12-04 12:31:17 +01:00
John Crispin
4865aabdb3 certificates: copy all certificates at boot
Modify early_boot init script to copy all .pem and .ca files from
/certificates/ to /etc/ucentral/ instead of only operational.pem
and operational.ca.

This enables support for multiple trust chains where certificates
are stored with FQDN-based names (e.g., controller.example.com.pem)
alongside the traditional operational.pem.

The simple wildcard copy allows air-gapped deployments to maintain
certificates for multiple controllers without complex logic.

Signed-off-by: John Crispin <john@phrozen.org>
2025-12-04 12:31:17 +01:00
John Crispin
90e2f3452d cloud_discovery: add standard FQDN fallback discovery
Add discovery method that attempts to resolve a standard FQDN when DHCP
discovery fails. This enables zero-touch provisioning in environments
where administrators configure DNS without modifying DHCP infrastructure.

The standard FQDN is configurable via STANDARD_FQDN constant (defaults
to "openwifi.network"). Administrators can configure their local DNS to
resolve this FQDN to their controller, allowing APs to discover the
controller automatically.

Discovery priority order:
1. EST enrollment (blocking)
2. DHCP discovery (Option 224/138)
3. Flash-based configuration
4. Standard FQDN resolution (NEW)
5. Cloud redirector service (internet-connected only)

The implementation uses the resolv module for DNS queries, performing
A record lookups. If resolution fails, discovery continues to the next
method. The standard FQDN method integrates with the existing discovery
block list mechanism to prevent repeated failed attempts.

Note: The boguspriv dnsmasq option may prevent FQDNs from resolving to
private IPs. Administrators should either use CG NAT Safe IP addresses
(100.64.0.0/10) or configure dnsmasq with rebind-domain-ok exceptions.

Signed-off-by: John Crispin <john@phrozen.org>
2025-12-04 12:31:17 +01:00
John Crispin
b499eceebe cloud_discovery: add CAA DNS-based EST server discovery
Implement EST server discovery via CAA DNS records for air-gapped
deployments. When DHCP Option 224 provides a controller FQDN, query
CAA records to determine the appropriate EST server endpoint.

The discovery flow:
1. Read controller FQDN from /tmp/cloud.json (set by DHCP handler)
2. Query CAA records for the controller domain
3. Use EST server from CAA 'issue' tag if present
4. Fall back to certificate issuer-based selection if CAA lookup fails

This allows network administrators to configure local EST servers via
DNS rather than relying on hardcoded public endpoints. Air-gapped
deployments can now specify private EST servers through standard DNS
infrastructure.

Example DNS configuration:
  controller.local. IN CAA 0 issue "est.local:8001"

When an AP receives controller.local via DHCP Option 224, it will
query CAA records and use est.local:8001 for certificate enrollment
instead of the public est.certificates.open-lan.org endpoint.

Signed-off-by: John Crispin <john@phrozen.org>
2025-12-04 12:31:17 +01:00
Jimmy Cheng
2e316ef076 qca-wifi-7: Add Zyxel NWA210BE model
Signed-off-by: YenLin Pan <YenLin.Pan@zyxel.com.tw>
2025-12-04 12:30:45 +01:00
ruanyaoyu
eac3e7dc2e qca-wifi-7: fix 6Ghz multiple_bssid configuration
Fixes: WIFI-15260
Signed-off-by: ruanyaoyu <ruanyaoyu@cigtech.com>
2025-12-04 12:29:04 +01:00
Kumiko18
61c858f3a9 udhcpinject: Fail to get interface information for SSIDs with space
Quote SSIDs as string literal

Fixes: WIFI-15239
Signed-off-by: Kumiko18 <alex18_huang@accton.com>
2025-12-04 12:26:49 +01:00
John Crispin
f6dbae7866 mediatek: fix missing case terminator in LED board config
Add missing ';;' after edgecore,eap111/eap112 LED configuration to
prevent fall-through to subsequent case statements.

Signed-off-by: John Crispin <john@phrozen.org>
2025-11-25 07:28:10 +01:00
Ian Chen
acd6318de2 morse: upgrade BCF to enhance HaLow TX power (from 12->20dbm)
Fixes: WIFI-15226
Signed-off-by: Ian Chen <ian77_chen@accton.com>
2025-11-24 06:29:36 +01:00
Sebastian Huang
d82c07ee2f patches: update MT7981 WiFi firmware to optimize scanning time (0062)
Signed-off-by: Sebastian Huang <sebastian_huang@accton.com>
2025-11-24 06:28:34 +01:00
Tanya Singh
487bc8057b ipq807x_v5.4/ipq50xx: fix OAP101e wireless MAC calibration data loading
Fixes: WIFI-15225
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-11-24 06:28:18 +01:00
Justin.Guo
ef4f095c96 ucentral-schema: add GPS default configuration for WF-660A and WF-672
Fixes: WIFI-15223
Signed-off-by: Justin.Guo <guoxijun@actiontec.com>
2025-11-24 06:26:15 +01:00
Tanya Singh
81c289ee66 mediatek: Fix the LED behavior for Edgecore EAP111 and EAP112
Fixes: WIFI-15222
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-11-24 06:24:34 +01:00
Justin.Guo
f53faaff5a qca-wifi-7: WF-189 update BDF
Fixes: WIFI-15220
Signed-off-by: Justin.Guo <guoxijun@actiontec.com>
2025-11-24 06:24:06 +01:00
Marek Kwaczynski
046ed8deb0 mac80211: scan: Decrease passive scan channel time in sw_scan
Allow configuring small values of duration time for passive
scanning in software scan.

Fixes: WIFI-14822

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-11-03 09:50:34 +01:00
Tanya Singh
e9bf367aed ipq807x_v5.4/ipq50xx: Enable ramoops for EAP104, OAP101, and OAP101e
Fixes: WIFI-15203
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-11-03 09:49:12 +01:00
Jimmy Cheng
dc64ce6f31 ath12k-wifi: update NWA130BE BDF files
change DFS RSSI Threshold for CE DFS test
 - BW160: 19 -> 22
 - BW320: 16 -> 19

Signed-off-by: Jimmy Cheng <jimmy.cheng@zyxel.com.tw>
2025-11-03 09:48:41 +01:00
800246@emplustech.com
1a66b68242 mediatek: Add emplus,wap588m to support kernel 6.6 at staging-upstream-mediatek
Signed-off-by: 800246@emplustech.com <cp.chang@emplustech.com>
2025-11-03 09:48:00 +01:00
Sebastian Huang
759c806a70 mediatek: disable ubi auto attach to retain dualboot behavior for EAP111
Signed-off-by: Sebastian Huang <sebastian_huang@accton.com>
2025-11-03 09:35:08 +01:00
Sebastian Huang
488eddb0b9 mediatek: Update ethernet driver to support PHY AN8801 on Edgecore EAP111
Signed-off-by: Sebastian Huang <sebastian_huang@accton.com>
2025-11-03 09:35:08 +01:00
John Crispin
b687eba6e7 mediatek: import v6.6 kernel + drivers from OpenWrt 24.10
Signed-off-by: John Crispin <john@phrozen.org>
2025-11-03 09:35:08 +01:00
jackcybertan
8304f3897b ipq807x_v5.4/ipq50xx: When device is booting, it causes lan/wan ports bridge together
Fixes: WIFI-14849
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-10-24 07:57:21 +02:00
Shubham Vishwakarma
7beac05946 ipq807x: add support for indio um345ax
**SPECIFICATION:**
- Chipset: IPQ8072A+QCN5054+QCN5024+QCA80812
- Flash: NOR-8MB AND NAND-128MB
- Memory: 1Gb DDR
- IEEE 802.11: 802.11ax/ac/b/g/n
- 44 2.4G Wi-Fi standard 802.11b/g/n/ax
- 4*4 5.8G Wi-Fi Standard 802.11 a/n/ac/ax
- 2x 1 Gbps Ethernet (QCA8081) with 802.3at PoE input support
- 1x DC Port 12V 3A
- 4x Antenna IPEX Connector, 3dBi omni antennas
- Data Rate: 3657Mbps ( 2.4G: 1182Mbps (11ax 4x4); 5.8G: 2475Mbps (11ax 4x4))
- RF Power: 2.4g ≤ 20dBm; 5.8g ≤ 19dBm
- Max Power Consumption: ≤ 22W

**BACKUP YOUR STOCK FIRMWARE:**
- Put openwrt-*-initramfs-kernel.bin to your TFTP server and rename it to initramfs.bin
- Enable serial console and enter to u-boot cli and exec these commands:
	```
	tftpboot <your_tftp_server_ip>:initramfs.bin
	bootm
	```
- Once boot completed and you get the openwrt shell execute below commands:
	```
	device=<divice_name>
	mkdir -p /tmp/fw_backup; cd /tmp/fw_backup
	rootfs=$(cat /proc/mtd | grep \"rootfs\" | cut -d: -f1)
	rootfs_1=$(cat /proc/mtd | grep \"rootfs_1\" | cut -d: -f1)
	dd if=/dev/${rootfs} of=rootfs_${rootfs} bs=1M
	dd if=/dev/${rootfs_1} of=rootfs_1_${rootfs_1} bs=1M
	cp /sys/firmware/fdt fdt.dtb
	md5sum * > md5sum
	tar -cvzf /tmp/${device}.tar.gz .
	sum=$(md5sum /tmp/${device}.tar.gz | cut -d' ' -f1)
	mv /tmp/${device}.tar.gz /tmp/${device}_${sum}.tar.gz
	echo "stock fw backup saved to: /tmp/${device}_${sum}.tar.gz"
	```
- Upload/save your backup to a safe place.

**STOCK FIRMWARE RECOVERY:**
- Boot initramfs image
- Upload your backed-up stock fw tarball to the device
	using scp or download it from the device using wget.
- Enter device ssh cli or tty and exec:
	```
	cd /tmp && wget <your_web_server_ip>/${stock_fw_backup}.tar.gz`
	tar -xpzf ${stock_fw_backup}.tar.gz
	rootfs=$(cat /proc/mtd | grep \"rootfs\" | cut -d: -f1)
	rootfs_1=$(cat /proc/mtd | grep \"rootfs_1\" | cut -d: -f1)
	ubiformat /dev/${rootfs} -y -f /tmp/rootfs_${rootfs}
	ubiformat /dev/${rootfs_1} -y -f /tmp/rootfs_1_${rootfs_1}
	reboot
	```

**INSTALLATION:**
1. initramfs method
- Put openwrt-*-initramfs-kernel.bin to your TFTP server and rename it to initramfs.bin
- Enable serial console and enter to u-boot cli and exec these commands:
	```
	tftpboot <your_tftp_server_ip>:initramfs.bin
	bootm
	```
- Once boot completed and you get the openwrt shell execute below commands:
	```
	cd /tmp && wget <your_web_server_ip>/factory.ubi`
	export rootfs=$(cat /proc/mtd | grep rootfs | cut -d: -f1)
	export rootfs_1=$(cat /proc/mtd | grep rootfs_1 | cut -d: -f1)
	ubiformat /dev/${rootfs} -y -f factory.ubi
	ubiformat /dev/${rootfs_1} -y -f factory.ubi
	reboot
	```

2. u-boot nand-factory.bin image method
- Put openwrt-*-squashfs-nand-factory.bin to your TFTP server and enter u-boot cli and exec these commands:
	```
	tftpboot <your_tftp_server_ip>:factory.bin
	#After downloading is finished:
	imxtract 0x44000000 ubi
	flash rootfs
	flash rootfs_1
	reset
	```

Signed-off-by: Shubham Vishwakarma <shubhamvis98@fossfrog.in>
2025-10-24 07:56:52 +02:00
Shubham Vishwakarma
4713ba9acb ipq6018: add support for um-310ax-v1
**SPECIFICATIONS:**
SOC: Qualcomm IPQ6018 (64-bit quad-core ARM Cortex-A53 @ 1.8Ghz)
Flash: SPI NOR 8MB + NAND 128MB
Memory: 1GB
2.4GHz Frequency Band: 2.4GHz ~ 2.484GHz (802.11 b/g/n/ax)
5GHz Frequency Band: 5.150GHz~5.850GHz (802.11 a/n/ac/ax)
Wireless Speed: 2.4GHz: 574Mbps, 5GHz: 1201Mbps

**BACKUP YOUR STOCK FIRMWARE:**
- Put openwrt-*-initramfs-kernel.bin to your TFTP server and rename it to initramfs.bin
- Enable serial console and enter to u-boot cli and exec these commands:
	```
	tftpboot <your_tftp_server_ip>:initramfs.bin
	bootm
	```
- Once boot completed and you get the openwrt shell execute below commands:
	```
	device=<device_name>
	mkdir -p /tmp/fw_backup; cd /tmp/fw_backup
	rootfs=$(cat /proc/mtd | grep \"rootfs\" | cut -d: -f1)
	rootfs_1=$(cat /proc/mtd | grep \"rootfs_1\" | cut -d: -f1)
	dd if=/dev/${rootfs} of=rootfs_${rootfs} bs=1M
	dd if=/dev/${rootfs_1} of=rootfs_1_${rootfs_1} bs=1M
	cp /sys/firmware/fdt fdt.dtb
	md5sum * > md5sum
	tar -cvzf /tmp/${device}.tar.gz .
	sum=$(md5sum /tmp/${device}.tar.gz | cut -d' ' -f1)
	mv /tmp/${device}.tar.gz /tmp/${device}_${sum}.tar.gz
	echo "stock fw backup saved to: /tmp/${device}_${sum}.tar.gz"
	```
- Upload/save your backup to a safe place.

**STOCK FIRMWARE RECOVERY:**
- Boot initramfs image
- Upload your backed-up stock fw tarball to the device
	using scp or download it from the device using wget.
- Enter device ssh cli or tty and exec:
	```
	cd /tmp && wget <your_web_server_ip>/${stock_fw_backup}.tar.gz`
	tar -xpzf ${stock_fw_backup}.tar.gz
	rootfs=$(cat /proc/mtd | grep \"rootfs\" | cut -d: -f1)
	rootfs_1=$(cat /proc/mtd | grep \"rootfs_1\" | cut -d: -f1)
	ubiformat /dev/${rootfs} -y -f /tmp/rootfs_${rootfs}
	ubiformat /dev/${rootfs_1} -y -f /tmp/rootfs_1_${rootfs_1}
	reboot
	```

**INSTALLATION:**
1. initramfs method
- Put openwrt-*-initramfs-kernel.bin to your TFTP server and rename it to initramfs.bin
- Enable serial console and enter to u-boot cli and exec these commands:
	```
	tftpboot <your_tftp_server_ip>:initramfs.bin
	bootm
	```
- Once boot completed and you get the openwrt shell execute below commands:
	```
	cd /tmp && wget <your_web_server_ip>/factory.ubi`
	export rootfs=$(cat /proc/mtd | grep rootfs | cut -d: -f1)
	export rootfs_1=$(cat /proc/mtd | grep rootfs_1 | cut -d: -f1)
	ubiformat /dev/${rootfs} -y -f factory.ubi
	ubiformat /dev/${rootfs_1} -y -f factory.ubi
	reboot
	```

2. u-boot nand-factory.bin image method
- Put openwrt-*-squashfs-nand-factory.bin to your TFTP server and enter u-boot cli and exec these commands:
	```
	tftpboot <your_tftp_server_ip>:factory.bin
	#After downloading is finished:
	imxtract 0x44000000 ubi
	flash rootfs
	flash rootfs_1
	reset
	```

Signed-off-by: Shubham Vishwakarma <shubhamvis98@fossfrog.in>
2025-10-24 07:56:52 +02:00
John Crispin
1a3955554a ucentral-schema: update to latest HEAD
dc9cad9 Update state schema to add chanUtil field in radio

Signed-off-by: John Crispin <john@phrozen.org>
2025-10-16 11:10:03 +02:00
John Crispin
427ad99151 ucentral-schema: update to latest HEAD
c836eb5 ssid: fix roaming defaults for PSK and RADIUS configurations

Signed-off-by: John Crispin <john@phrozen.org>
2025-10-09 12:14:13 +02:00
John Crispin
02ed19e3ac ucentral-event: fix VLAN bridge membership during FT roaming
During 802.11r Fast Transition roaming, when a client moves between
APs (e.g., wlan0 to wlan1) with the same dynamic VLAN assignment, the
vlan_add handler's refcount mechanism prevented the new WiFi interface
from being added to the bridge.

When wlan0-v100 and wlan1-v100 exist simultaneously with VLAN ID 100,
the refcount becomes 2, causing vlan_add to exit early for wlan1-v100.
This left wlan1-v100 out of the bridge VLAN table, breaking connectivity
after roaming despite correct VLAN assignment via RADIUS and RRB frames.

Fix by detecting WiFi VLAN interfaces (wlan*-v*) and always adding them
to the bridge regardless of refcount. The refcount mechanism now only
controls WAN port VLAN configuration, which should only occur once per
VLAN ID.

Also reorganise vlan_add/vlan_remove to check swconfig early for clarity.

Signed-off-by: John Crispin <john@phrozen.org>
2025-10-09 12:14:13 +02:00
John Crispin
60968f8c89 profiles: fix syntax error / trailing spaces
Fixes: WIFI-15170
Signed-off-by: John Crispin <john@phrozen.org>
2025-10-08 17:45:53 +02:00
John Crispin
207a592896 ucentral-client: set version to v4.1.1
Signed-off-by: John Crispin <john@phrozen.org>
2025-10-07 11:31:11 +02:00
John Crispin
1bae90f681 ucentral-schema: set version to v4.1.1
Signed-off-by: John Crispin <john@phrozen.org>
2025-10-07 11:30:57 +02:00
John Crispin
f2afe49977 ipq53xx: enable LED heartbeat trigger in kernel config
Enable CONFIG_LEDS_TRIGGER_HEARTBEAT to allow LED heartbeat
functionality when device goes offline. Without this kernel option,
the LED trigger mechanism was unavailable, preventing the LED from
flashing to indicate offline status.

Fixes: WIFI-14646
Signed-off-by: John Crispin <john@phrozen.org>
2025-10-02 15:38:50 +02:00
Jimmy Cheng
04cc064026 ath12k-wifi: update NWA50BE BDF files
Adjust 2.4G CCA threshold from 32 to 38 to avoid false detection

Fixes: WIFI-15164
Signed-off-by: Jimmy Cheng <jimmy.cheng@zyxel.com.tw>
2025-10-02 07:43:18 +02:00
John Crispin
14778e1d2f ucentral-event: add VLAN reference counting to prevent race condition
When a station roams between bands on the same VLAN, the vlan_remove
event from the old band can arrive after the vlan_add event from the
new band, causing the VLAN to be incorrectly deleted whilst still in use.

Add reference counting that tracks how many interfaces are using each
VLAN ID. Only create VLAN devices on the first reference and only
remove them when the last reference is dropped.

On startup, initialise refcounts from current station state to handle
daemon restarts correctly.

Signed-off-by: John Crispin <john@phrozen.org>
2025-10-01 16:19:01 +02:00
John Crispin
9712ce581f ucentral-schema: update to latest HEAD
676e155 dhcp_inject: fix a syntax issue in dhcp_inject
e594c44 captive.uam.mac-auth: the default was wrong

Signed-off-by: John Crispin <john@phrozen.org>
2025-10-01 16:19:01 +02:00
pratibha
a4dbeb376e ipq50xx: Add support for Indio-525AXM outdoor AP
Fixes: WIFI-14454
Signed-off-by: pratibha <pratibha.kuril@indionetworks.com>
2025-10-01 16:19:01 +02:00
jackcybertan
02b0457b28 ipq53xx: fix RAP750W-311A LAN ports
LAN switch exposes single eth1 instead of per-port interfaces for RAP750W-311A.
Using VLAN to separate LAN to each physical port for RAP750W-311A.

Fixes: WIFI-15163
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-10-01 16:19:01 +02:00
Shubham Vishwakarma
42007a147f update setup.py: make the profiles symlink relative instead of absolute
make openwrt/profiles relative so moving or renaming the repo directory won't break the symlink

Signed-off-by: Shubham Vishwakarma <shubhamvis98@fossfrog.in>
2025-10-01 07:44:35 +02:00
Shubham Vishwakarma
d1e18425b0 ramips: mt7621: update mt7621 indio um-305ax patch file
Changelog:
- Fix MAC address assignment for Ethernet ports
- Fix Ethernet port configuration (was not working in the current DTS
  because GPIOs 23 and 24, used for LEDs, are RGMII2 pins)
- Add package kmod-7915-firmware to enable Wi-Fi

Signed-off-by: Shubham Vishwakarma <shubhamvis98@fossfrog.in>
2025-10-01 07:44:35 +02:00
Arif Alam
d98e18a143 wifi_max_user: read data from correct phy index for EAP112
Set max_ap_assoc at wiphy init instead of vif init for mt7915.
Hard code max_ap_assoc to 128 for EAP112 in wifi_max_user.uc

Fixes WIFI-15027
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2025-09-29 06:31:51 +02:00
Tanya Singh
fd170fabed hostapd: initialize ht/vht/he mode on channel switch by default while using hostapd_cli chan_switch command
Fixes: WIFI-14859
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-09-25 11:01:52 +02:00
John Crispin
9b2d80f2b4 ucentral-schema: update to latest HEAD
100c045 Fix cloud cannot show association list when WDS-AP in state.uc
168f6a4 dhcp_inject: Support multiple upstream

Signed-off-by: John Crispin <john@phrozen.org>
2025-09-24 13:10:36 +02:00
Sebastian Huang
5c892e7a0c mediatek-sdk: Support AN8801SB PHY for EAP112
Signed-off-by: Sebastian Huang <sebastian_huang@accton.com>
2025-09-24 12:51:49 +02:00
Shubham Vishwakarma
6ed93db422 ipq5018: add support for indio um-335ax
**Specifications:**
SOC: Qualcomm IPQ5018 (64-bit dual-core ARM Cortex-A53 @ 1.0Ghz)
Flash: SPI NOR 8MB (Winbond W25Q64DW) + NAND 128MB (Winbond W25N01GWZEIG)
Memory: 512MB DDR3L
Standard: 802.11ax/ac/b/g/n
2.4G Frequency: 2.4GHz - 2.484GHz
2.4G Wi-Fi standard: 802.11b/g/n/ax
5G Chipset: QCN9074
5G Frequency: 5.150GHz~5.850GHz
5G Wi-Fi Standard: 802.11 a/n/ac/ax
Buttons: 1 * Reset button, press 10 seconds to revert to default setting
2.4G Antenna: 2*2.4GHz/5.8GHz dual band antenna: 4dBi
5G Antenna: 2*5.8G antenna: 4dBi
Data Rate: 2.4GHz: 574Mbps, 5GHz:4800Mbps
Power: PoE 802.3at,DC2.0 12V/2A
Max Power Consumption: < 22W
LED Light: WAN, LAN, tricolor LED(sys-red, 2.4G-green, 5.8G-blue)

**BACKUP YOUR STOCK FIRMWARE:**
- Put openwrt-*-initramfs-kernel.bin to your TFTP server and rename it to initramfs.bin
- Enable serial console and enter to u-boot cli and exec these commands:
	```
	tftpboot <your_tftp_server_ip>:initramfs.bin
	bootm
	```
- Once boot completed and you get the openwrt shell execute below commands:
	```
	device=um335ax
	mkdir -p /tmp/fw_backup; cd /tmp/fw_backup
	rootfs=$(cat /proc/mtd | grep \"rootfs\" | cut -d: -f1)
	rootfs_1=$(cat /proc/mtd | grep \"rootfs_1\" | cut -d: -f1)
	dd if=/dev/${rootfs} of=rootfs_${rootfs} bs=1M
	dd if=/dev/${rootfs_1} of=rootfs_1_${rootfs_1} bs=1M
	cp /sys/firmware/fdt fdt.dtb
	md5sum * > md5sum
	tar -cvzf /tmp/${device}.tar.gz .
	sum=$(md5sum /tmp/${device}.tar.gz | cut -d' ' -f1)
	mv /tmp/${device}.tar.gz /tmp/${device}_${sum}.tar.gz
	echo "stock fw backup saved to: /tmp/${device}_${sum}.tar.gz"
	```
- Upload/save your backup to a safe place.

**STOCK FIRMWARE RECOVERY:**
- Boot initramfs image
- Upload your backed-up stock fw tarball to the device
	using scp or download it from the device using wget.
- Enter device ssh cli or tty and exec:
	```
	cd /tmp && wget <your_web_server_ip>/${stock_fw_backup}.tar.gz`
	tar -xpzf ${stock_fw_backup}.tar.gz
	rootfs=$(cat /proc/mtd | grep \"rootfs\" | cut -d: -f1)
	rootfs_1=$(cat /proc/mtd | grep \"rootfs_1\" | cut -d: -f1)
	ubiformat /dev/${rootfs} -y -f /tmp/rootfs_${rootfs}
	ubiformat /dev/${rootfs_1} -y -f /tmp/rootfs_1_${rootfs_1}
	reboot
	```

**INSTALLATION:**
1. initramfs method
- Put openwrt-*-initramfs-kernel.bin to your TFTP server and rename it to initramfs.bin
- Enable serial console and enter to u-boot cli and exec these commands:
	```
	tftpboot <your_tftp_server_ip>:initramfs.bin
	bootm
	```
- Once boot completed and you get the openwrt shell execute below commands:
	```
	cd /tmp && wget <your_web_server_ip>/factory.ubi`
	export rootfs=$(cat /proc/mtd | grep rootfs | cut -d: -f1)
	export rootfs_1=$(cat /proc/mtd | grep rootfs_1 | cut -d: -f1)
	ubiformat /dev/${rootfs} -y -f factory.ubi
	ubiformat /dev/${rootfs_1} -y -f factory.ubi
	reboot
	```

2. u-boot nand-factory.bin image method
- Put openwrt-*-squashfs-nand-factory.bin to your TFTP server and enter u-boot cli and exec these commands:
	```
	tftpboot <your_tftp_server_ip>:factory.bin
	#After downloading is finished:
	imxtract 0x44000000 ubi
	flash rootfs
	flash rootfs_1
	reset
	```

Signed-off-by: Shubham Vishwakarma <shubhamvis98@fossfrog.in>
2025-09-24 12:51:18 +02:00
Jimmy Cheng
92d67c15dd qca-ssdk: remove the unused patch of pinctrl
Signed-off-by: Jimmy Cheng <jimmy.cheng@zyxel.com.tw>
2025-09-24 12:50:29 +02:00
Marek Kwaczynski
460180f42e cloud_discovery: add blocklist for discovery methods
Introduce a blocklist mechanism to avoid retrying failed discovery
methods within the same discovery cycle. Each time a method fails
validation, it is added to the blacklist. The blacklist is cleared
once the device transitions to ONLINE or after all discovery methods
have been attempted.

This prevents repeated attempts of failing methods and ensures the
discovery process progresses more reliably.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-09-24 12:48:50 +02:00
Marek Kwaczynski
ed57759824 cloud_discovery: Skip rewriting discovery.state.json when no discovery metho d is set
In cases where gateway.json exists, the discovery method may be unset.
Writing an empty value to discovery.state.json is not useful, so
avoid updating the file in this case.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-09-24 12:48:50 +02:00
Marek Kwaczynski
957e3ca997 cloud_discovery: run est_client enroll before discovery process
Always obtain EST certificates before starting the discovery process.
This ensures certificates are already available from the EST server, since
the FQDN may be provided via DHCP discovery or another discovery method,
and requires valid certificates to proceed.

Fixes: WIFI-15123

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-09-24 12:48:50 +02:00
John Crispin
7c2b8e8de0 ipq53xx: fix missing KERNEL_IPQ_MEM_PROFILE for multiple boards
Commit 2e4972e9ad ("ipq53xx: Add KERNEL_IPQ_MEM_PROFILE for IPQ53XX")
introduced KERNEL_IPQ_MEM_PROFILE but didn't set it for all IPQ53xx
boards, causing them to boot with incorrect RAM size settings.

This adds CONFIG_KERNEL_IPQ_MEM_PROFILE=0 to the affected board profiles:
- cig_wf189, cig_wf189h, cig_wf189w, cig_wf672
- edgecore_eap105
- sonicfi_rap7110c-341x

Signed-off-by: John Crispin <john@phrozen.org>
2025-09-24 11:57:42 +02:00
wingate5678
741007178f mount_certs: sonicfi squashfs certifiacte storage improve
Fixes: WIFI-15120
Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
2025-09-21 10:20:25 +02:00
Tanya Singh
e9d3e39d5e netifd: support DHCP options 138 and 224
Fixes: WIFI-14694
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-09-21 10:20:25 +02:00
wingate5678
b82a2c5da1 qca-wifi-7: sonicfi wifi7 thermal setting
Fixes: WIFI-15138
Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
2025-09-21 10:20:25 +02:00
Kumiko18
15429f39d8 udhcpinject: Support multiple upstream
Support multiple ssid <-> upstream bindings

Fixes: WIFI-15125
Signed-off-by: Kumiko18 <alex18_huang@accton.com>
2025-09-21 10:20:25 +02:00
Justin.Guo
5df274325b qca-wifi-7: Update WF672 FCC BDF
only support 2-band mode

Fixes: WIFI-15130
Signed-off-by: Justin.Guo <guoxijun@actiontec.com>
2025-09-21 10:20:25 +02:00
jackcybertan
2e4972e9ad ipq53xx: Add KERNEL_IPQ_MEM_PROFILE for IPQ53XX
Fixes: WIFI-15124
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-09-21 10:20:25 +02:00
John Crispin
a25480d479 hostapd: fix MAC overlap with MBSSID enabled
Reverse byte order in non-OUI part of MAC address to prevent overlap
when MBSSID is enabled. Swaps bytes 3 and 5 and masks lower nibble
of byte 5 before applying index XOR.

Signed-off-by: John Crispin <john@phrozen.org>
2025-09-21 10:20:25 +02:00
Jimmy Cheng
2f625c35f0 zyxel_nwa130be: use LED of DTS instead of ssdk cmd
Signed-off-by: Jimmy Cheng <jimmy.cheng@zyxel.com.tw>
2025-09-12 08:16:16 +02:00
Jimmy Cheng
b5422f80e4 qca-wifi-7: Zyxel NWA130BE save crash log into pstore
Signed-off-by: Jimmy Cheng <jimmy.cheng@zyxel.com.tw>
2025-09-12 08:16:16 +02:00
YenLin Pan
1ed503613d qca-wifi-7: Add Zyxel NWA50BE model
Signed-off-by: YenLin Pan <YenLin.Pan@zyxel.com.tw>
2025-09-12 08:16:16 +02:00
pratibha
f8954418f1 ipq50xx: Add support for Indio-525AXP wifi6 AP
Fixes: WIFI-14455
Signed-off-by: pratibha <pratibha.kuril@indionetworks.com>
2025-09-12 08:16:16 +02:00
John Crispin
3abc6a4463 ucentral-schema: update to latest HEAD
a1e7571 state: fix unassigned access

Signed-off-by: John Crispin <john@phrozen.org>
2025-09-12 08:16:16 +02:00
pratibha
811b63de93 ipq50xx: Support for Indio UM-325AX-V2 WiFi6 Indoor AP
Fixes: WIFI-14493
Signed-off-by: pratibha <pratibha.kuril@indionetworks.com>
2025-09-07 10:14:05 +02:00
Justin.Guo
c66020fbc6 qca-wifi-7: WF-672A, AFC pending, enable only 2-band mode
Fixes: WIFI-15000
Signed-off-by: Justin.Guo <guoxijun@actiontec.com>
2025-09-07 10:12:34 +02:00
jackcybertan
da7682166f ipq807x_v5.4/ipq50xx: enable pstore for rap630c-311g/rap630w-311g/rap630w-312g mt7621: enable pstore for rap63xc-211g
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-09-07 10:12:09 +02:00
John Crispin
bd50dfdf96 udhnssnoop: move the code directly into the repo
Signed-off-by: John Crispin <john@phrozen.org>
2025-09-07 10:05:15 +02:00
John Crispin
cbf0e536df udevmand: move the code directly into the repo
Signed-off-by: John Crispin <john@phrozen.org>
2025-09-07 10:04:06 +02:00
John Crispin
20a7a48c9f ucentral-tools: the git repo is gone, move the code into the package
Signed-off-by: John Crispin <john@phrozen.org>
2025-09-07 10:02:15 +02:00
Arif Alam
c27b015a63 est_client: fix certificate issuer matching
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2025-08-29 22:52:28 -04:00
Arif Alam
02c2e6945b est_client: cloud_discovery: fixup demo environment
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2025-08-28 21:39:54 -04:00
Sebastian Huang
e7cd5038ac mediatek-sdk: Disable surge protection mode for AN8801SB PHY driver
Signed-off-by: Sebastian Huang <sebastian_huang@accton.com>
2025-08-20 08:16:30 +02:00
Paul White
34e4a01e25 ucentral-state: Respect LED config before enabling
Ensure that LEDs are configured to be ON before attempting to change their state.

Previously, if the LED was configured to be OFF, it would still enter a double-blink
state when the cloud connection was lost, and then switch to solid ON upon
reconnection—ignoring the configured OFF state.

This update changes that behavior:
    - If LEDs are configured OFF, they will remain OFF even during cloud
      disconnection (no double-blink).
    - After temporary state changes (e.g., during factory reset), the LED will
      return to its configured state (either OFF or ON).

Signed-off-by: Paul White <paul@shasta.cloud>
2025-08-20 08:16:08 +02:00
Tanya Singh
60e9fb2645 cloud_discover: typo fix in DHCP script option 138
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-08-19 07:33:01 +02:00
John Crispin
b995833a03 cloud_discovery: fix typo
Signed-off-by: John Crispin <john@phrozen.org>
2025-08-14 16:58:33 +02:00
John Crispin
9866d4a86e cloud_discovery: update CDS QA endpoint
Signed-off-by: John Crispin <john@phrozen.org>
2025-08-14 16:14:42 +02:00
John Crispin
143d4e3b58 cloud_discovery: make the reenrollment process more robust
Signed-off-by: John Crispin <john@phrozen.org>
2025-08-14 11:44:04 +02:00
John Crispin
0735fd8c9a elfutils: fix build with GCC11
Signed-off-by: John Crispin <john@phrozen.org>
2025-08-14 10:31:04 +02:00
Tanya Singh
c7f9061eee cloud_discovery: Fix typo in cloud_discovery script
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-08-14 07:57:59 +02:00
Paul White
f4a58c0989 qca-ssdk: Move MIB loop cnt variable to handle
The MIB loop cnt variable was defined as a static variable in the function that
implements the loop, however this function can be called for more than one switch
on some platforms.   This results in a race condition that leads to memory
corruption and kernel crashes.

The fix moves the loop cnt variable to the passed in switch handle, this way
there is one per switch chip.   Thix fix was identified by looking at newer
versions of the qca-ssdk software package from QCA.

Signed-off-by: Paul White <paul@shasta.cloud>
2025-08-13 14:39:38 +02:00
John Crispin
cd78a832e3 cloud_discovery: use production CDS for migration path
Signed-off-by: John Crispin <john@phrozen.org>
2025-08-13 14:35:42 +02:00
Paul White
7b6fc736f6 base-files: boot: add sync after uci-defaults
A scenario was seen where UCI config was not flushed to disk before
an AP power-cycle after uci-defaults was completed.  Since these
scripts are deleted after being ran once, there is no way to recover
without a factory reset.

Adding this sync operation proved to help avoid this situation from
happening

Signed-off-by: Paul White <paul@shasta.cloud>
2025-08-12 19:19:10 +02:00
John Crispin
f997f8dff0 tip-defaults: add operational OpenLan root CA
Signed-off-by: John Crispin <john@phrozen.org>
2025-08-12 19:11:54 +02:00
John Crispin
c4b3eeed81 est_client: switch to production environment
Signed-off-by: John Crispin <john@phrozen.org>
2025-08-11 06:36:22 +02:00
John Crispin
b2ba9d7c1b ucentral-client: update to latest HEAD
549e84e ucentral-client: Add discovery metadata to connect payload

Signed-off-by: John Crispin <john@phrozen.org>
2025-08-11 06:13:02 +02:00
Marek Kwaczynski
b982f3f4c2 cloud_discovery: Track and persist discovery method
Adds support for recording the method used to discover the cloud
controller (e.g. DHCP, FLASH, OpenLAN).
The selected method  records the current date and time along
with the discovery method into "/etc/ucentral/discovery.state.json".
The date is stored in epoch format.

Fixed: WIFI-14966

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-08-11 05:41:36 +02:00
John Crispin
68dfd58303 wireless-regdb: disable channel 14 in JP
Fixes: WIFI-14962
Signed-off-by: John Crispin <john@phrozen.org>
2025-08-07 14:51:33 +02:00
John Crispin
6ba26cba2b est_client: add a function to validate that the CN is correct
cloud_discovery will not start if the CN does not match the devices serial.
an error will be written to syslog

---
Wed Aug  6 14:23:23 2025 user.notice root: ERROR
Wed Aug  6 14:23:23 2025 user.notice root: ERROR
Wed Aug  6 14:23:23 2025 user.notice root: ERROR
Wed Aug  6 14:23:23 2025 user.notice root: The certificate used has a CN that does not match the serial of the device
Wed Aug  6 14:23:23 2025 user.notice root: ERROR
Wed Aug  6 14:23:23 2025 user.notice root: ERROR
Wed Aug  6 14:23:23 2025 user.notice root: ERROR
---

Signed-off-by: John Crispin <john@phrozen.org>
2025-08-06 16:23:57 +02:00
John Crispin
b5b276bfcc est_client: check if a cert is present inside the fwtool helper
This was causing devices without a birt cert being present from doing a
sysupgrade.

Signed-off-by: John Crispin <john@phrozen.org>
2025-08-06 11:03:59 +02:00
Tanya Singh
de7dc7e01a ipq50xx: Fix bootbank switching when firmware upgrade is triggered for Edgecore EAP104 and OAP101 series
Fixes: WIFI-14957
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-08-06 10:54:55 +02:00
jackcybertan
a967d67af3 qca-wifi-7: Added ramoops support for SonicFi IPQ5332 devices
Fixes: WIFI-14869
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-08-06 10:53:52 +02:00
John Crispin
8a68073f4f ucentral-schema: update to latest HEAD
remove a patch that was accidentally merged

Signed-off-by: John Crispin <john@phrozen.org>
2025-08-04 16:33:15 +02:00
John Crispin
efd804987e rtty: there was an error in the operationalpem passed to the client
Signed-off-by: John Crispin <john@phrozen.org>
2025-08-04 15:44:21 +02:00
jackcybertan
b036ba37e3 certificates: Store-PKI2.0-key-for-RAP6x-production
Fixes: WIFI-14951
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-08-04 08:39:53 +02:00
John Crispin
7352de2421 update to latest HEAD
e27ecb4 ssid: decouple batman tunnel from meshpoint interfaces

Signed-off-by: John Crispin <john@phrozen.org>
2025-08-04 08:36:13 +02:00
John Crispin
8c11eb23a3 mt7621: add insta1/2 partitions for yuncore ax820
Signed-off-by: John Crispin <john@phrozen.org>
2025-08-04 08:35:42 +02:00
Tanya Singh
83874b75f3 mediatek-sdk: Remove extra lines (for logging) from 99-mtk-sr-scene-cond
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-08-04 08:08:24 +02:00
John Crispin
694cf6ded8 rtty: use the operational certificate
Fixes: WIFI-14943
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-31 17:50:14 +02:00
John Crispin
0a3a207584 uboot-envtools: add udaya-id5 support
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-31 14:54:56 +02:00
Tanya Singh
b0e95e68a2 afc: Use either ca-cert or access-token to get authorization in curl command for the AFC server
Fixes:WIFI-14427
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-07-31 10:03:02 +02:00
Tanya Singh
26ed5acb60 rrmd: update timeout for RRM during self-healing and fix center channel mapping in RRM with Channel Utilization
Fixes: WIFI-14901
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-07-31 10:02:27 +02:00
John Crispin
d1e4c48617 cloud_discovery: add automatic reenrolment of operational certificates
The daemon will check the vailidity of the operational certificate once and hour.
If the certificate is valid for less than three days, a reenrollment is attempted.
Once the reenroll happened the connection to the cloud controller will be restarted.

Fixes: WIFI-14900
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-31 09:48:10 +02:00
Tanya Singh
3a8fc316f2 qca-wifi-7/afc: Use curl instead of uclient to send/receive AFC request/response using hostapd
Fixes: WIFI-14427
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-07-30 09:34:26 +02:00
jackcybertan
d85dc2a819 certificates: Enhance PKI enrollment on squashfs (SonicFi RAP6* series)
The updated flow:
- Mount /dev/mtdblock* (the certificates partition) to /mnt
- Copy its contents to /certificates
- Unmount /mnt
- Extract the PKI 2.0 certificates into /certificates

Fixes: WIFI-14904
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-07-30 09:04:52 +02:00
John Crispin
acca9737e4 ucentral-schema: update to latest HEAD
30c7374 Add 'access-token' to AFC server config

Fixes: WIFI-14427
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-30 09:02:17 +02:00
Tanya Singh
6d2fd1de0d afc: Use curl instead of uclient to send/receive AFC request/response using hostapd
Fixes: WIFI-14427
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-07-30 09:02:05 +02:00
John Crispin
1d822a10d2 toolchain: use gcc11 for legacy targets
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-28 09:51:18 +02:00
John Crispin
ebdc88ee1f certificates: improvements
* make the code more generic
* add udaya a2 support

Signed-off-by: John Crispin <john@phrozen.org>
2025-07-28 09:50:22 +02:00
John Crispin
778cc679a0 profiles: add more wifi-5 profiles
* edgecore_spw2ac1200
* hfcl_ion4

Signed-off-by: John Crispin <john@phrozen.org>
2025-07-27 19:35:04 +02:00
YenLin Pan
088d78faa7 qca-ssdk: adjust the amplitude level of SGMII for Zyxel NWA130BE
To fix EMI and avoid Ethernet RX stuck after reboot for Zyxel NWA130BE.
Ethernet Rx stuck was sometimes happened when we do stress reboot,
need to adjust the amplitude level of SGMII for CPU and QCA8385 side.
And those settings come from the result that Zyxel HW team and Manufacturer
co-work to fine tune for NWA130BE.

Signed-off-by: YenLin Pan <YenLin.Pan@zyxel.com.tw>
2025-07-27 19:24:15 +02:00
Tanya Singh
5306f7db27 cloud_discovery: Add 'sync' after file generation in Cloud discovery process
Fixes: WIFI-14906
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-07-27 17:40:03 +02:00
Tanya Singh
c8bffdc250 rrmd: Add self-healing in ucentral-state and channel switching improvements to RRM with channel utilization
Fixes: WIFI-14901
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-07-27 17:39:21 +02:00
John Crispin
3a3de9e146 ucentral-schema: update to latest HEAD
92fb3c1 WIFI-14901: Add rrm_chanutil status to health.uc (when it fails) and save health metric in /tmp/ucentral.health
6313892 WIFI-14906: Add 'sync' after file generation in Cloud discovery process

Signed-off-by: John Crispin <john@phrozen.org>
2025-07-27 17:03:48 +02:00
John Crispin
4d5c9a2d4c ucentral-client: update to latest HEAD
c536f69 cloud package manager

Fixes: WIFI-14588
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-27 16:54:44 +02:00
John Crispin
41aa4c2978 cloud_discovery: set correct timeouts inside UCI
Fixes: WIFI-14897
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-27 16:35:15 +02:00
Marek Kwaczynski
7795c51947 netifd: add GCMP-256 support for WPA3 on 6 GHz bands
This patch enhances WPA3 encryption support in netifd by introducing GCMP-256
cipher handling for wireless interfaces operating on the 6 GHz band with HE/EHT
modes.

Fixes: WIFI-14594

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-07-24 14:45:26 +02:00
Justin.Guo
9e68fc6e66 ipq807x_v5.4/qca-wifi-7: Support dual BDF
Support dual BDF for WF186H/WF186W/WF189/WF189H/WF189W/WF672A

Fixes: WIFI-14890
Signed-off-by: Justin.Guo <guoxijun@actiontec.com>
2025-07-24 13:34:27 +02:00
Jesse Wu
b60c244d93 qca-wifi-7: add support for EMPLUS WAP7635
Signed-off-by: Jesse Wu <Jesse.Wu@emplustech.com>
2025-07-24 13:32:21 +02:00
Ian Chen
ae1f394e28 mediatek-sdk: Support HaLow Mesh on EAP112
enable MESH function in feeds/morse/utils/wpa_supplicant_s1g/Config.in

ticket: WIFI-14896
Signed-off-by: Ian Chen <ian77_chen@accton.com>
2025-07-24 13:31:35 +02:00
John Crispin
d09126c674 ucentral-schema: updte to latest HEAD
b971b73 Support HaLow Mesh on EAP112
7d28320 Fix in ucode script of config_raw to add multiple UCI sections via config-raw object of the schema
1453f2e chanUtil per radio shall be obtained from the policy_chanutil.uc script
fa26853 enable multiple bssid by default on 6G

Signed-off-by: John Crispin <john@phrozen.org>
2025-07-24 13:30:25 +02:00
Marek Kwaczynski
810bc501e1 ratelimit: fix rate limiting on WiFi-7 devices
Rate limiting was not applied on WiFi-7 devices because their
hostapd interface names use the phy* prefix instead of wlan*.
This patch extends the match pattern to include both wlan* and phy*.

Fixes: WIFI-14884

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-07-22 15:19:57 +02:00
John Crispin
3001fa88fb include/download.mk: switch to using git:// instead of https://
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-21 13:28:00 +02:00
John Crispin
89a1be09d9 est_client: set 10s as the max timeout when calling the EST server
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-21 11:35:47 +02:00
CarosLiang
3cb1f9c4dd ipq50xx: add smp-affinity for wf186h and wf186w
Fixes: WIFI-14873
Signed-off-by: CarosLiang <cliang@actiontec.com>
2025-07-21 11:06:19 +02:00
Tanya Singh
63ef3588ce mediatek: Support RRM based on Channel Utilization for Edgecore EAP111 and EAP112
Fixes: WIFI-14837
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-07-21 11:05:27 +02:00
Arif Alam
bd97e5693e mediatek-sdk: mt7981: enable ramoops / pstore
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2025-07-21 06:50:18 +02:00
John Crispin
b44147b162 target-ipq40xx: update/move feed to wlan-ap-legacy-targets
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-21 06:49:34 +02:00
John Crispin
69da9125c5 qca-wifi-7/hostapd: increase socket buffer sizes
Fixes: WIFI-14742
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-18 10:04:50 +02:00
John Crispin
66df8d3946 est_client: properly populate the re-enrolled certificate
Fixes: WIFI-14864
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-17 14:40:01 +02:00
John Crispin
20de4fe438 est_client: allow overriding CERT_PREFIX via an env variable
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-17 09:50:45 +02:00
John Crispin
f56fb3c0d3 est_client: allow setting the EST_SERVER via an env variable
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-17 09:50:45 +02:00
John Crispin
5aca134364 est_client: reduce number of flash writes
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-17 09:50:45 +02:00
John Crispin
89ac58b48f add incremental interval backoff
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-17 09:50:45 +02:00
John Crispin
4a5cf875d9 hostapd: convert to using hostapd_utils package
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-17 07:55:04 +02:00
John Crispin
65bbcbbd6b ucentral-event: ignore vlan_remove on swconfig devices
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-17 07:47:16 +02:00
CarosLiang
fc7750b900 hostapd: 6G CBP Test Will fail Sometimes
Fixes: WIFI-14840
Signed-off-by: CarosLiang <cliang@actiontec.com>
2025-07-16 17:02:35 +02:00
wingate5678
6c4ca10e74 certificates: change Sonicfi RAP7 series certicate type from squashfs to ext4
Fixes: WIFI-14834
Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
2025-07-16 17:00:53 +02:00
Tanya Singh
d71b803708 qca-wifi-7: Edgecore WiFi 7 Product Save crash log into pstore
Fixes: WIFI-14842
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-07-16 16:56:34 +02:00
YenLin Pan
07a8796acb qca-wifi-7: zyxel_nwa130be - fine tune thermal setting
Signed-off-by: YenLin Pan <YenLin.Pan@zyxel.com.tw>
2025-07-16 16:55:20 +02:00
Jimmy Cheng
40d46bf5ce ath12k-wifi: update NWA130BE BDF files
Signed-off-by: Jimmy Cheng <jimmy.cheng@zyxel.com.tw>
2025-07-16 16:55:01 +02:00
John Crispin
70e0942ce2 profiles/ucentral-ap: add hostapd-utils
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-16 16:54:19 +02:00
Tanya Singh
ae1bf679da Add hostapd_cli to hostapd package for EAP111 and EAP112
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-07-16 16:51:38 +02:00
Sebastian Huang
41a3317661 modemmanager: Use AT command to set username password for EAP112 LTE
1. For EAP112 LTE module (Quectel EM60 series), when username and password is configured, it is required to update the context with the QICSGP AT command.
2. Use a handler function to check if the AT command is stuck and retry.

Fixes: WIFI-14545
Signed-off-by: Sebastian Huang <sebastian_huang@accton.com>
2025-07-16 16:50:47 +02:00
Venkat Chimata
a488be045c ipq50xx: Fix missing ';;' in 02_network script
Description:
A missing ;; in the 02_network file for the ipq50xx target caused
improper network configuration across all ipq50xx platforms
(e.g., Edgecore EAP104, Cybertan RAP630C-311G).
This resulted in loss of Internet connectivity.

Fix:
Added the missing ;; in the appropriate case block.

Tests Performed:
Verified on Edgecore EAP104. Network configuration was applied
correctly and Internet connectivity was restored.

Fixes: WIFI-14847

Signed-off-by: Venkat Chimata <venkat@nearhop.com>
2025-07-16 16:49:29 +02:00
John Crispin
a73676abaf ucentral-event: prune dynamic vlans when they are no longer needed
Fixes: WIFI-14833
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-12 06:49:57 +02:00
John Crispin
867c7fe397 qca-wifi-7/iw/: nl80211.h was not in sync causing iw to incorrectly report NO_EHT
Fixes: WIFI-14569
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-11 13:29:21 +02:00
John Crispin
15d7fe5f2e ucentral-schema: update to latest HEAD
5276d0b use more explicit code when checking for the existence of a wiphy

Signed-off-by: John Crispin <john@phrozen.org>
2025-07-11 13:07:20 +02:00
John Crispin
a607aac99a cloud_discovery: set production timeouts
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-11 11:08:42 +02:00
John Crispin
5c84212bfd ucentral-schema: update to latest HEAD
8238eb6 HaLow: add a switch to enable/disable radio
3bda216 fix EAP112-L ucentral not working

Signed-off-by: John Crispin <john@phrozen.org>
2025-07-11 10:44:00 +02:00
John Crispin
84fc3d3bf1 qca-wifi-7/hostapd: increase socket buffer size
Fixes: WIFI-14742
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-11 10:40:16 +02:00
CarosLiang
9f93e24219 ath12k-firmware: update QCN92xx firmware
fixes 6G CBP fail on 20MHz BW

Fixes: WIFI-14817
Signed-off-by: CarosLiang <cliang@actiontec.com>
2025-07-11 07:41:28 +02:00
YenLin Pan
63766bb505 qca-wifi-7: zyxel_nwa130be - fine tune thermal setting
Signed-off-by: YenLin Pan <YenLin.Pan@zyxel.com.tw>
2025-07-11 06:59:36 +02:00
CarosLiang
bd918f55c4 qca-wifi-7: CIG WiFi 7 Product Save crash log into pstore
Fixes: WIFI-14631
Signed-off-by: CarosLiang <cliang@actiontec.com>
2025-07-11 06:56:08 +02:00
CarosLiang
03d158d32a profiles/: Enable mpstats and iperf3 On CIG WiFi 7 Products
Fixes: WIFI-14825
Signed-off-by: CarosLiang <cliang@actiontec.com>
2025-07-11 06:55:27 +02:00
Sebastian Huang
195e1734bf modemmanager: EAP112 LTE to reconnect automatically after reboot
1. Copy modemmanager to feeds/ucentral.
2. Add function to find the device sysfs path when protocol is "wwan".
3. Call ifup when modem is ready for connection.
4. Add trigger to restart modemmanager when network uci is updated.

Fixes: WIFI-14751
Signed-off-by: Sebastian Huang <sebastian_huang@accton.com>
2025-07-11 06:53:50 +02:00
YenLin Pan
f67a2c404b qca-wifi-7: change patches-zyxel_nwa130be path
The original path cannot be patched

Signed-off-by: YenLin Pan <YenLin.Pan@zyxel.com.tw>
2025-07-09 06:42:18 +02:00
John Crispin
974351335f ucentral-schema: update to latest HEAD
f3d1356 add reenroll command

Signed-off-by: John Crispin <john@phrozen.org>
2025-07-08 10:25:21 +02:00
Justin.Guo
311b1a620c cig-device-boot: update WF672A configuration
* Reduce the i2c frequency to enable the encryption chip to be recognized
* Add USB xr Serial driver and init gps uart param
* Factory reset when switching wifi mode
* SFP gpio should be input mode

Fixes: WIFI-14789
Signed-off-by: Justin.Guo <guoxijun@actiontec.com>
2025-07-08 09:47:15 +02:00
John Crispin
066b442247 ucentral-client: prevent client from starting before cloud was discovered
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-08 09:42:57 +02:00
John Crispin
f2b69ce972 est_client: fix reenroll call
the wrong certificate was being used

Signed-off-by: John Crispin <john@phrozen.org>
2025-07-08 09:41:12 +02:00
John Crispin
88830b2537 ucentral-client: update to latest HEAD
69829f6 Revert "Cloud Package Manager"
c3a3e05 remove certupdate from proto.c
4c4710a add reenroll to proto.c

Signed-off-by: John Crispin <john@phrozen.org>
2025-07-08 09:40:30 +02:00
John Crispin
842b21fb5e certificates: add an explicit uci commit call
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-08 09:40:06 +02:00
John Crispin
8f8eb63ac4 ubus: fix PKG_MIRROR_HASH
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-08 08:45:48 +02:00
Justin.Guo
367a919d67 qca-wifi-7: WF-189w/h add temperature control
1.Change the WiFi temperature threshold.
2.Use single antenna when temperature is too high.

Fixes: WIFI-14788
Signed-off-by: Justin.Guo <guoxijun@actiontec.com>
2025-07-08 08:14:39 +02:00
Jesse Wu
919fe12372 ipq807x: add EMPLUS WAP380C support
Fixes: WIFI-14791
Signed-off-by: Jesse Wu <Jesse.Wu@emplustech.com>
2025-07-08 08:13:39 +02:00
John Crispin
d6d22433c5 ucentral-schema: update to latest HEAD
50ba97e allow sta-authorized and ft-finish to wifi-frames enum

Signed-off-by: John Crispin <john@phrozen.org>
2025-07-07 16:43:35 +02:00
John Crispin
eff579f3ec ucentral-schema: update to latest HEAD
e062b7c properly detect 320MHz channel width

Fixes: WIFI-14607
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-07 07:55:49 +02:00
John Crispin
0768008764 ucentral-schema: update to latest HEAD
2819f87 HaLow: fix channel 8/24/40 cannot be set
3b04c09 HaLow: set default channel to avoid HaLow not working when no channel set by JSON

Signed-off-by: John Crispin <john@phrozen.org>
2025-07-07 07:53:19 +02:00
John Crispin
53c45dfaeb udevmand: update to latest HEAD
e56be31 udevmand: fix segmentation fault during iface flushing

Fixes: WIFI-14752
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-04 08:39:43 +02:00
John Crispin
7e3f851788 ucentral-schema: update to latest HEAD
2b8a58b dont crash if udevmand does not reply
985f3cb WIFI-14588: Cloud Package Manager

Fixes: WIFI-14752
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-04 08:39:26 +02:00
John Crispin
205484080e Revert "netifd: add gcmp-256 as a cipher suite when SAE is enabled on HE/EHT"
This reverts commit b17db16c15.

Signed-off-by: John Crispin <john@phrozen.org>
2025-07-03 16:46:02 +02:00
cpchangemplu
f1fc99ccbe ipq50xx: Add back emplus,wap385c
Signed-off-by: cpchangemplu <cp.chang@emplustech.com>
2025-07-03 14:26:46 +02:00
jackcybertan
db36e09553 ipq50xx : add sonicfi rap630e
Fixes: WIFI-14728
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-07-03 14:23:37 +02:00
John Crispin
b3174a0434 ubus: bump to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-03 09:21:59 +02:00
John Crispin
5f8c4d31cc cloud_discovery: use the correct certificte for CDS
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
aa78f40843 certificates: add support for tar file based certificate storage
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
721fb4cc4d est_client: fixup typo
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
f75a36f89f est_client: prevent downgrades to FW not supporting EST
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
a375b9f774 est_client: add reenroll support
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
16d029f10f cloud_discovery: split EST code out into its own tool
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
bb45e09e8b cloud_discovery: place intermediate files into the /tmp folder
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
2798088cec cloud_discovery: rtrim() the extracted subject
this removes trailing \n\n characters

Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
470703a490 luci-mod-ucentral: update certupdate for insta birth certificates
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
c56d60b2d3 certificates: do not check for cas.pem when mounting certs
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
1178c3b6f1 certificates: set new certs inside UCI
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
0db44ca55b cloud_discovery: add insta EST support
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
ae5015424b cloud_discovery: add initial ubus status call
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
32c7a7ff1d cloud_discovery: add support for hostname_validation
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
39e601cbd4 luci-mod-ucentral: remove digicert specific files
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
ce9c896371 cloud_discovery: depend on the certificates package
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
0008cb20dd cloud_discovery: add option 138 support
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
701242ed25 netifd: drop dhcp option 138 patch
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
67dd4bfca7 cloud_discovery: remove pki2 env lookup
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
88fb4cafbc firstcontact: remove now unused digicert client
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
Justin.Guo
feb410ddc3 cig-poe-judgment: add package
Support reading WAN PoE type from /proc/poe_info for WF189/WF189W/WF189H/WF672A

Fixes: WIFI-14697
Signed-off-by: Justin.Guo <guoxijun@actiontec.com>
2025-06-27 12:39:58 +02:00
jackcybertan
43a8dd1303 poe: add userland helpers scripts/tools
Support user to control PSE on/off (chip: tps23861) via ucentral config file.
Use uci-default to write poe's uci default file.

Fixes: WIFI-14724
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-06-27 12:38:19 +02:00
Ian Chen
188f6b33e0 netifd-morse: fix HaLow client cannot access network
add wds_bridge in hostapd for HaLow radio

Fixes: WIFI-14615
Signed-off-by: Ian Chen <ian77_chen@accton.com>
2025-06-27 12:37:20 +02:00
John Crispin
27e4eb3685 ucentral-client: update to latest HEAD
08a842d Cloud Package Manager

Fixes: WIFI-14588
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-27 09:41:44 +02:00
John Crispin
cd8294eca0 ucentral-schema: update to latest HEAD
125a148 add PoE support for client ports
17b6c18 Cloud Package Manager
a86b8b0 Fix typo in enhanced MPSK property name
57852ed update schema.json to 4.1.0
e155483 command: update upgrade and factory commands to handle new operational certs

Signed-off-by: John Crispin <john@phrozen.org>
2025-06-27 07:39:52 +02:00
Kumiko18
e12ecf831e cpm: Cloud Package Manager
Added cpm init.d file to list installed package on remote APs

Fixes: WIFI-14588
Signed-off-by: Kumiko18 <alex18_huang@accton.com>
2025-06-27 07:38:23 +02:00
Marek Kwaczynski
1213182012 mpskd: fix incorrect MPSK value assignment
If MPSK is enabled on any interface, `ssid.mpsk` should be true.
Prevents overwriting true with a false value when multiple interfaces
share the same SSID.

Also allow handling of the 'reload' event even when MPSK is not enabled,
to ensure config reloads are not skipped, e.g. when configuration is empty.

Fixes: WIFI-14484

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-06-27 07:37:20 +02:00
Sundareswar P
d5df71619a qca-wifi7: hostapd: Fix for roaming failure during PSK2-RADIUS configuration
After roaming to EAP105, the roaming frames were exchanged successfully,
but the STA sent a deauthentication frame to the AP with an "INVALID IE" error.

The RSNXE subfield in the FTIE was set in the Reassociation Response frame.
The STA validated the Reassociation frame and was unable to process the
RSNXE subfield.

Modified SAE options (sae_pwe=4 and sae_require_pmf=0).

Fixes: WIFI-14544
Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-06-27 07:37:20 +02:00
John Crispin
a177884893 .github/workflows/build-dev.yml: add cig_wf660a
Fixes: WIFI-14630
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-26 11:38:08 +02:00
Jesse Wu
1f7d8a7bb7 ipq50xx: add EMPLUS WAP385C support
Signed-off-by: Jesse Wu <Jesse.Wu@emplustech.com>
2025-06-18 07:01:49 +02:00
jackcybertan
dc02d2722a ipq807x_v5.4: update BDF for SonicFi RAP650C
Fixes: WIFI-14574
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-06-18 06:58:41 +02:00
jackcybertan
13ac9166ef ipq807x_v5.4: change SonicFi RAP650C Wi-Fi MAC address sequence
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-06-18 06:58:41 +02:00
John Crispin
3d6f360cb6 ucentral-client: set version.json to 4.1.0
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-13 08:19:37 +02:00
John Crispin
6659e77bd0 qca-wifi-7/ipq53xx: consolidate phy_quirk handling
Fixes: WIFI-14680
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-13 08:19:37 +02:00
wingate5678
b061cc55ce ipq807x_v5.4: cooling daemon with configuration file support
Fixes: WIFI-14682
Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
2025-06-13 08:19:37 +02:00
John Crispin
b17db16c15 netifd: add gcmp-256 as a cipher suite when SAE is enabled on HE/EHT
Fixes: WIFI-14594
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-11 14:26:29 +02:00
John Crispin
d36866301f feeds/hostapd: fix/improve rssi_threshold handling
* add an ucentral-event
* turn thresholds into bss options

Fixes: WIFI-14679
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-11 09:18:09 +02:00
John Crispin
ffccb65d1b qca-wifi-7/hostapd: fix/improve rssi_threshold handling
* add an ucentral-event
* turn thresholds into bss options

Fixes: WIFI-14679
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-11 09:18:07 +02:00
John Crispin
af165342ed ipq807x_v5.4/hostapd: fix/improve rssi_threshold handling
* add an ucentral-event
* turn thresholds into bss options

Fixes: WIFI-14679
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-11 09:18:04 +02:00
John Crispin
ed62236d31 ucentral-schema: update to latest HEAD
ac3a1c7 convert rssi threshold to interface options

Fixes: WIFI-14679
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-11 09:17:55 +02:00
wingate5678
346bdd9c16 qca-wifi-7: sonicfi rap7110c-341x change BDF
Fixes: WIFI-14661
Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
2025-06-10 10:53:33 +02:00
Jesse Wu
dc41a0fd0c ipq60xx: Support EMPLUS WAP386V2 model
Device specifications:
======================

SoC: Qualcomm IPQ6018
RAM: 1 x 1G DDR4 RAM
Flash: NAND 128MB
Radio: 2T2R@2.4GHz, 2T2R@5GHz
Ethernet: 1 x 1GbE PHY
Reset Button: 1
Power Source: AC, Standard PoE 802.3af/at
LED Indicator: 4 x Single-color LED indicator (GPIO Control)

Signed-off-by: Jesse Wu <Jesse.Wu@emplustech.com>
2025-06-10 10:46:38 +02:00
cpchangemplu
2b26a4e68a mediatek: Add thermal protection for EMPLUS WAP588M model
Signed-off-by: cpchangemplu <cp.chang@emplustech.com>
2025-06-10 10:43:53 +02:00
cpchangemplu
fa96b2b24d mediatek: Fix image upgrade fail for EMPLUS WAP588M
Signed-off-by: cpchangemplu <cp.chang@emplustech.com>
2025-06-10 08:55:54 +02:00
John Crispin
36f00adc7a ucentral-schema: update to latest HEAD
827ccc2 setting probe_request_rssi incorrectly turned the SSID into a hidden one

Fixes: WIFI-14678
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-10 08:52:16 +02:00
Tanya Singh
5314a752bd mediatek: Enable dualboot for EAP111 and EAP112 by default
Fixes: WIFI-14579
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-06-10 07:39:11 +02:00
Marek Kwaczynski
0f6683f31e iwinfo.uc: Fix access to undefined htmode object
iwinfo command failed due to undefined htmode object

Fixes: WIFI-14666
Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-06-10 07:10:57 +02:00
Paul White
8ee96c36c9 ipq807x: fix silent reboot caused by broken printk
A printk() was previously introduced that is passing the log level as the first argument
instead of prefixing the format with the level.  Given this code path, this is causing a
kernel fault and CPU reboot without any kernel panic/stack trace, since it's crashing
inside of printk().

CPU:0 ts:206871944795 ffffffc008dcf828  ffffffc008dfe914  cleanup_module [batman_adv] <- cfg80211_vendor_cmd_reply+0x7ff4/0xa064 [cfg80211]
CPU:0 ts:206871944800 ffffffc0108e69d0  ffffffc008dcf80c  printk <- cleanup_module+0xb22c/0xa20 [batman_adv]
CPU:0 ts:206871944802 ffffffc0101173c0  ffffffc0108e6a08  vprintk_func <- printk+0x60/0x6c
CPU:0 ts:206871944806 ffffffc010115e44  ffffffc0101160ec  vprintk_emit <- vprintk_default+0x4c/0x60
CPU:0 ts:206871944809 ffffffc0101172d0  ffffffc010115e88  __printk_safe_enter <- vprintk_emit+0x84/0x29c
CPU:0 ts:206871944812 ffffffc010115c20  ffffffc010115ec4  vprintk_store <- vprintk_emit+0xc0/0x29c
CPU:0 ts:206871944816 ffffffc0100a53a4  ffffffc010080fb4  do_translation_fault <- do_mem_abort+0x54/0xb0
CPU:0 ts:206871944819 ffffffc0100a4eb4  ffffffc0100a5448  do_page_fault <- do_translation_fault+0xc8/0xe0
CPU:0 ts:206871944821 ffffffc0100a4d08  ffffffc0100a5038  __do_kernel_fault <- do_page_fault+0x1a8/0x4f0
CPU:0 ts:206871944837 ffffffc0100a4c88  ffffffc0100a4df0  die_kernel_fault <- __do_kernel_fault+0x110/0x1b0

After applying the fix, we can see this code path is being hit:
    [26799.175166] cfg80211_calculate_bitrate_he: invalid rate->nss: 0

This still doesn't fix the original issue triggering this code path, which is why a nss value
of 0 is being reported.

Fixes: eb9cbaec7 ("ipq807x: Shorten the kernel backtrace warning msg for ieee80211_bss_get_elem")
Fixes: WIFI-14677
Signed-off-by: Paul White <paul@shasta.cloud>
2025-06-10 06:53:50 +02:00
Arif Alam
89789900f5 ath11k: fix roaming firmware crash
Fix the case where firmware crashes when STA sends AUTH with same
MAC address to multiple SSIDs on the same radio.

Fixes: WIFI-13276
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2025-06-10 06:46:41 +02:00
Ken
6add44ae27 qca-wifi-7: fix invalid port mapping due to syntax error in 02_network
issue was introduced by edfd2883f5

Fixes: WIFI-14650
Signed-off-by: Ken <xshi@actiontec.com>
2025-05-30 07:24:33 +02:00
John Crispin
14a0c2d272 qca-wifi-7: add missing Kbuild symbols
Signed-off-by: John Crispin <john@phrozen.org>
2025-05-27 13:48:08 +02:00
John Crispin
9e769c85cb .github/workflows/: add more boards
Signed-off-by: John Crispin <john@phrozen.org>
2025-05-27 10:39:57 +02:00
mike_ding
d6e1008c7a Support dual image and fix reset button does not work issue
Signed-off-by: mike_ding <mike_ding@sdc.sercomm.com>
2025-05-27 10:39:57 +02:00
John Crispin
0a4c10d6cc ucentral-schema: update to latest HEAD
b4cfdc6 cmd_upgrade: implement secure download

Signed-off-by: John Crispin <john@phrozen.org>
2025-05-26 16:23:17 +02:00
jackcybertan
edfd2883f5 qca-wifi-7: Support for CyberTAN RAP750E-S AP
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-05-26 16:23:17 +02:00
Tanya Singh
f6ac6f791e mediatek: Fix typo in the name of the /etc/init.d/bootcount script
Fixes: WIFI-14579
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-05-26 16:23:17 +02:00
Tanya Singh
88fe15a985 mediatek: include patched hostapd for EAP112
Fixes: WIFI-14645
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-05-26 16:23:17 +02:00
Justin.Guo
a9f47c9e1e qca-wifi-7: CIG WiFi7 WF-672A bring up
* bring up wf672a
* add drivers lsm303agr rtl8221d ilps22qs
* add cig-wifi-mode-sw for switching radio to 2 bands or 3 bands

Fixes: WIFI-14509
Signed-off-by: Justin.Guo <guoxijun@actiontec.com>
2025-05-26 16:23:17 +02:00
Marek Kwaczynski
f17314a2d3 qca-wifi-7: hostapd: fix missing PSK assignment for EMPSK
When using psk2-radius in combination with enhanced MPSK,
the passphrase was not properly propagated to user scripts
via the ucode interface, because the PSK field was not set
in the connected station context.

This patch fixes that by copying the passphrase into the
psk field.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-05-26 16:23:17 +02:00
Marek Kwaczynski
29739ebd13 qca-wifi-7: EAP-105: Derive WLAN MAC addresses from WAN MAC
For the Edgecore EAP-105 platform, configure the 2.4GHz, 5GHz,
and 6GHz WLAN interfaces to use MAC addresses derived
from the base WAN MAC address.

Fixes: WIFI-14624

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-05-26 16:23:17 +02:00
Sundareswar
3caba52dba EAP105: Roaming failed, if MPSK (AAA server) is configured (#515)
* While Roaming the AP couldn't find the wildcard R0KH and R1KH ids,
which are required by Fast transistion.
* Issue caused by the placement of conf parser in the invalid location.

Fixes: WIFI-14544

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-05-26 16:23:17 +02:00
Ken
44bcc50815 qcom-wifi-7: Default TC fq_codel queue on GRE cause low GRE RX throughput
Fixes: WIFI-14603
Signed-off-by: Ken <xshi@actiontec.com>
2025-05-26 16:23:17 +02:00
Ken
942d7c15b4 ipq807x: WF188n/WF196 lost the certificates files after upgrade
Fixes: WIFI-14623
Signed-off-by: Ken <xshi@actiontec.com>
2025-05-26 16:23:17 +02:00
John Crispin
25be7aef1a ucentral-schema: update to latest HEAD
b4635dc add 138 to default requested DHCP options

Signed-off-by: John Crispin <john@phrozen.org>
2025-05-26 16:23:17 +02:00
800246@emplustech.com
a2e1ffe089 mediatek: Swiitch LAN and WAN port for EMPLUS WAP588M
Signed-off-by: 800246@emplustech.com <cp.chang@emplustech.com>
2025-05-19 06:11:46 +02:00
polun
911f8eaa4c qca-wifi-7: Add Zyxel NWA130BE model
Signed-off-by: YenLin Pan <YenLin.Pan@zyxel.com.tw>
2025-05-19 06:11:20 +02:00
Tanya Singh
590ee6d514 mediatek: Update ethernet driver to support PHY AN8801 on Edgecore EAP111
Fixes: WIFI-14576
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-05-19 06:10:35 +02:00
Ken
5054a71062 qca-wifi-7: WF189 Save crash log into pstore
Fixes: WIFI-14582
Signed-off-by: Ken <xshi@actiontec.com>
2025-05-19 06:09:53 +02:00
John Crispin
d69c1c3176 ucentral-schema: update to latest HEAD
9710867 (HEAD -> main, origin/main, origin/HEAD) make the MTU configurable on GRE tunnels
4dd0904 SSH IdleTimeout can be configured from JSON config
6faaa1f HaLow: Extend ucentral schema & state for HaLow

Signed-off-by: John Crispin <john@phrozen.org>
2025-05-19 06:09:01 +02:00
John Crispin
8d0da5a086 ucentral-schema: update to latest HEAD
6faaa1f HaLow: Extend ucentral schema & state for HaLow
aa9cac5 dhcp_inject: Use same keyword "dhcp-inject" in config file

Signed-off-by: John Crispin <john@phrozen.org>
2025-05-12 10:45:38 +02:00
Wingate Chi
eb66feb5c5 qca-wifi-7: Support Sonicfi RAP750E-H
Fixes: WIFI-14563
Signed-off-by: Wingate Chi <wingate.chi@cybertan.com.tw>
2025-05-12 10:45:38 +02:00
800246@emplustech.com
89b6ebd518 mediatek: Add EMPLUS WAP588M model
Specifications:
SoC: MediaTek MT7981B
RF Chipset: MT7976C @2.4GHz 2T2R
MT7976C @5ghz 2T2R
RAM: 512MB DDR4 RAM
Flash: SPI-NAND 128 MiB
Ethernet: 2 x 1GbE PHY
Reset Button: 1
Power on/off switch dip: 1
Power Source: Standard PoE 802.3af/at
LED Indicator: 5x Single-color LED indicator (GPIO Control)

Signed-off-by: 800246@emplustech.com <cp.chang@emplustech.com>
2025-05-12 10:45:38 +02:00
Tanya Singh
e3dfe5ea74 rrmd: RRM with Channel Utilization - update radio status check
Fixes: WIFI-14575
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-05-12 10:45:38 +02:00
ian77_chen
f39339564a mediatek-sdk: Support HaLow on EAP112
1. porting MorseMicro HaLow driver to support HaLow on EAP112
2. Only support FCC regulation because of hardware limitation
3. Add /etc/init.d/halow-gpio-reset to initialize HaLow chip in early stage
4. Add /etc/uci-defaults/aaa-fix-phy0-to-morse to correct the default uci for HaLow radio.

Signed-off-by: Ian Chen <ian77_chen@accton.com>
2025-05-12 10:45:38 +02:00
John Crispin
adac3818a4 ucentral-schema: update to latest HEAD
52afdf8 fix wifi-scan on wifi-7 devices

Fixes: WIFI-14541
Fixes: WIFI-14537
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-30 08:03:26 +02:00
Ken
a516b035ab qca-wifi-7: WF189 10G PHY code optimization
* add "limit_rtlphy_10g_ablity" in DTS , no side effect on other product.
* disable 10G capability if DTS defined limit_rtlphy_10g_ablity , no side effect on other product.
* revert the last 0006-qca-ssdk-Fix-10G-rtl-phy-driver-for-c45-mdio-read-wr.patch and based on 0005 patch.

Fixes: WIFI-14567
Signed-off-by: Ken Shi <xshi@actiontec.com>
2025-04-29 08:25:22 +02:00
Ken
29b088ef21 qca-wifi-7: fix WF189 WAN port link issues
Fixes: WIFI-14546
Signed-off-by: Ken <xshi@actiontec.com>
2025-04-28 17:06:48 +02:00
John Crispin
10b875d42c ucentral-schema: update to latest HEAD
3b88fc1 dhcp_inject: Multiple ssids sometime didn't display dhcp option 82 rules

Fixes: WIFI-14564
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-28 12:35:34 +02:00
alex18_huang
1f0a24a941 udhcpinject: Multiple ssids sometime didn't display dhcp option 82 rules
Added check when parsing ssid info retrieved from iwinfo.
Program will exit if expected interface count and iwinfo entry count mismatch.

Fixes: WIFI-14564
Signed-off-by: alex18_huang <alex18_huang@accton.com>
2025-04-28 12:33:00 +02:00
Marek Kwaczynski
ea3afcda56 qca-wifi-7: hostapd.sh: add missed functionality from ipq807x_v5.4
The main reason was adding missed functionality for Radius
configuration which caused rejecting WiFi clients on
authentication level.

Still some changes not included:
* AFC,
* hs20_release,
* multiple_bssid,
* he_co_locate

Fixes: WIFI-14459
Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-04-25 08:16:02 +02:00
mike_ding
b5987cc2a7 qca-wifi-7: Support for AP72TIP and AP72TIP-v4 on APNOS v4.x
Signed-off-by: mike_ding <mike_ding@sdc.sercomm.com>
2025-04-25 08:15:00 +02:00
jackcybertan
fc700364d1 ipq807x: add sonicfi rap650c
Fixes: WIFI-14494
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-04-25 08:14:14 +02:00
Tanya Singh
f2fec9dd87 rrmd : Update file names from /tmp dir in rrmd init script that need to be removed when rrmd (re)starts
Fixes: WIFI-14560
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-04-25 08:13:22 +02:00
Ken
2de57bf167 qca-wifi-7: WF189 Reset button does not work
Fixes: WIFI-14538
Signed-off-by: Ken <xshi@actiontec.com>
2025-04-22 06:30:39 +02:00
John Crispin
7d31bebdb0 ucentral-schema: update to latest HEAD
048a53d state.uc: Fix the calculation of Channel Utilization (chanUtil) in statistics

Fixes: WIFI-14531
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-18 07:56:34 +02:00
Tanya Singh
fcb5a972cf rrmd: Update Channel Utilization Calculation in RRM
- avoid calculated Channel Utilization value to be 'infinity' from cycle_count_delta being '0'

Fixes: WIFI-14536
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-04-18 07:52:11 +02:00
Wingate Chi
082d04025c qca-wifi-7: change RAP750W-311A LED to PWM mode
Fixes: WIFI-14530
Signed-off-by: Wingate Chi <wingate.chi@cybertan.com.tw>
2025-04-17 13:33:56 +02:00
alex18_huang
9ef7d2c227 udhcpinjecti: missing from the package list in ucentral-ap.yml
Add package udhcpinject into profiles/ucentral-ap.yml

Fixes: WIFI-14529
Signed-off-by: Alex Huang <alex18_huang@accton.com>
2025-04-17 13:32:37 +02:00
Ken
e0d61cb0fb qca-wifi-7: WF189/W/H Add 189H support
Fixes: WIFI-14524
Signed-off-by: Ken Shi <xshi@actiontec.com>
2025-04-17 13:31:56 +02:00
Ken
ed2795b30b qca-wifi-7: CIG smp affinity for supporting 53XX platform with wikiki and pebble
Fixes: WIFI-14526
Signed-off-by: Ken Shi <xshi@actiontec.com>
2025-04-17 13:30:45 +02:00
alex18_huang
4b31e481ec udhcpinject: qdisk didn't create successfully for some interfaces while using dhcpinject
Program sometimes did not setup tc qdisc on some interfaces when creating SSID with dhcpinject enabled initially.

Added delayed startup.

Fixes: WIFI-14522
Signed-off-by: alex18_huang <alex18_huang@accton.com>
2025-04-10 16:17:34 +02:00
John Crispin
ba10a88ab3 ucentral-schema: update to latest HEAD
5a6d23b fix/improve swconfig detection

Fixes: WIFI-14525
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-10 16:13:58 +02:00
John Crispin
b85bc5db9c ipq50xx: fix swconfig setup to align with latest schema changes
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-10 16:13:26 +02:00
John Crispin
e998711444 ipq807x/hostapd: backport FT VLAN fix
The bug was in the upstream hostapd codebase, backport/rebase the fix

--> ba150059d1ec964add8f29eb2c92dd6dfde97308

Fixes: WIFI-14508
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-10 14:26:04 +02:00
John Crispin
2d6bea18df Revert "ipq53xx: add smp-affinity for wifi IRQs"
This reverts commit e5bcda17e7.

The patch was causing crashes

Fixes: WIFI-14523
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-10 13:06:05 +02:00
John Crispin
1bf9e40987 ucentral-schema: update to latest HEAD
43c7375 default max-inactivity to 300

Fixes: WIFI-14520
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-10 09:46:30 +02:00
John Crispin
a20b96eb31 ucentral-schema: update to latest HEAD
7624d43 set generate_local_psk to false if roaming and multi_psk are enabled

Fixes: WIFI-14484
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-10 09:10:45 +02:00
John Crispin
c83ac67492 cloud_discovery: make use of the new TIP cloud discovery server
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-10 08:30:15 +02:00
John Crispin
2b0c600fb3 ucentral-schema: update to latest HEAD
246873b add max-inactivity to ssid config
3b5a5c4 Allow option 82 DHCP fields to be transparently injected into client DHCP requests

Signed-off-by: John Crispin <john@phrozen.org>
2025-04-10 08:25:21 +02:00
alex18_huang
c5793bae3a udhcpinject: Allow option 82 DHCP fields to be transparently injected into client DHCP requests
1. Added userspace application udhcpinject to inject DHCP option 82 transparently
2. Added README.md for example usage

Fixes: WIFI-14018
Signed-off-by: alex18_huang <alex18_huang@accton.com>
2025-04-10 07:56:13 +02:00
Marek Kwaczynski
6afbb92dec qca-wifi-7: hostapd.sh: add psk2-radius encryption
Fixes: WIFI-14459
Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-04-10 07:55:37 +02:00
John Crispin
89cb9d63bd ucentral-schema: update to latest HEAD
10b5c36 extend swconfig support for dual cpu port swconfig switches

Signed-off-by: John Crispin <john@phrozen.org>
2025-04-09 09:36:43 +02:00
Ken Shi
16963c997f qca-ssdk: increase number of vlans on qca8337
Signed-off-by: Ken Shi <xshi@actiontec.com>
2025-04-09 09:22:41 +02:00
Ken Shi
f7a9ad770d ipq533x: add CIG WF189W support
Signed-off-by: Ken Shi <xshi@actiontec.com>
2025-04-09 09:14:50 +02:00
Ken Shi
dcdccc7ba0 ath12k-firmware: add miami pebble pebble firmware
Signed-off-by: Ken <xshi@actiontec.com>
2025-04-09 09:07:51 +02:00
Rick Sommerville
b67f97f213 hostapd: proxy arp: fail gracefully
Disable proxy arp and continue if snoop interface setup fail.

Fixes: WIFI-14507
Signed-off-by: Rick Sommerville <rick.sommerville@netexperience.com>
2025-04-09 08:53:01 +02:00
jackcybertan
e9dcf3d953 mediatek: RAP630W-211G change ethernet label and led behavior
Fixes: WIFI-14519
Signed-off-by: Jack Tsai <jack.tsai@cybertan.com.tw>
2025-04-08 14:26:19 +02:00
John Crispin
cc5edd4446 ucentral-schema: update to latest HEAD
0683d04 Add pdev_stats and channel utilization for each radio in the statistics

Fixes: WIFI-14460
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-08 07:25:33 +02:00
Marek Kwaczynski
79adece623 mediatek/hostap: fix roaming ASSOC REJECT
During roaming validation, an issue was detected with
the ASSOC-REJECT event, which had a status code of 55.

To resolve this, the SNonce from the Auth Request Frame
was copied, and the random ANonce is now used
only when expired.

Fixes: WIFI-14326

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-04-08 06:55:15 +02:00
John Crispin
49b64ec93f feed.conf.default: use the github.com based trees
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-07 18:10:23 +02:00
Marek Kwaczynski
b1e3686124 ipq807x_v5.4/mac80211: ath11k: fix peer addition/deletion error on sta band migration
Fix removing rhash when station is roaming between radios and
apply logic from opensource driver during adding/removing
peer.

Fixes: 7374c39d ("ath11k: fix STA roaming between radios")
Fixes: WIFI-14457

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-04-07 16:32:04 +02:00
John Crispin
e5bcda17e7 ipq53xx: add smp-affinity for wifi IRQs
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-07 13:32:14 +02:00
Ken Shi
7c04ed76bd ipq53xx: fix CIF WF189 MDIO clock speed
Fixes: WIFI-14510
Signed-off-by: Ken Shi <xshi@actiontec.com>
2025-04-07 12:46:06 +02:00
John Crispin
04a5cc67e0 ipq53xx: fix rap750w-311a calibration data and memory profile
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-07 11:42:53 +02:00
Wingate Chi
80b2c6d080 WIFI-14511 support Sonicfi RAP750W-311A
Signed-off-by: Wingate Chi <wingate.chi@cybertan.com.tw>
2025-04-07 10:47:47 +02:00
Ken
c683f19b7c ipq60xx: WF188n update the BDF to support FCC/CE/MY/AU/ES/SE/FR
Fixes: WIFI-14512
Signed-off-by: Ken Shi <xshi@actiontec.com>
2025-04-07 10:07:14 +02:00
John Crispin
1b10507cf1 busybox: the DHCP client would sometimes send a superflous port unreachable frame
Fixes: WIFI-14149
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-01 13:26:24 +02:00
John Crispin
50abd015b3 ucentral-schema: update to latest HEAD
a2133a8 always regenerate the default /e/c/wireless config
505e1a1 ssh: add IdleTimeout=60

Fixes: WIFI-14473
Fixes: WIFI-14470
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-28 09:44:37 +01:00
Tanya Singh
5dd212829f WIFI-14502: Add wlan-ucentral-schema revision hash to /etc/openwrt_release
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-03-28 08:06:00 +01:00
Sebastian Huang
3abc947f8f WIFI-14503: Update BDF (EEPROM file) for Edgecore EAP112
Signed-off-by: Sebastian Huang <sebastian_huang@accton.com>
2025-03-28 08:05:38 +01:00
John Crispin
5f42e9db58 mac80211: AP VLAN interfaces did not inheret the HE capabilities correctly
Fixes: WIFI-14491
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-28 08:04:28 +01:00
Ken
b181add059 WIFI-14490 WF189 eth1 and eth0 swapped on 12.5
Signed-off-by: Ken <xshi@actiontec.com>
2025-03-26 14:56:43 +01:00
Tanya Singh
7eae0397f1 WIFI-14500: Fixes for Edgecore OAP103 1. Support bluetooth 2. Allow certificate loading on dual boot 3. Support RRM with Channel Utilization 4. Remove EAP102 from supported devices
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-03-26 14:56:31 +01:00
Tanya Singh
1033a63140 WIFI-14180: Update BDF for Edgecore EAP111
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-03-26 14:56:21 +01:00
Tanya Singh
954108d742 WIFI-14460: Update RRM using Channel Utilization script - Improve policy_chanutil.uc script - Improve scripts reading pdev_stats - Support 6G radio AP - Support WiFi7 AP
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-03-26 07:42:03 +01:00
John Crispin
caee55a61f hostapd: correctly set the sta->psk_id on 6G band
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-26 07:40:55 +01:00
John Crispin
502727ad6d qca-wifi7: add DVLAN multicast too unicast workaround
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 11:56:50 +01:00
Venkat Chimata
1868e369d3 WIFI-14489: Adding Edgecore OAP103 to the list of supported APs
1. Integrated WiFi boarddata
2. Integrated LEDs
3. sysupgrade changes are integrated
4. Network ports are enumerated
5. A new profile is added under profiles

Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2025-03-24 11:56:34 +01:00
John Crispin
5a597c912d ipq807x/hostapd: merge missing e-mspk sta/psk index patch
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 10:47:05 +01:00
John Crispin
82ae3766fa ucentral-schema: update to latest HEAD
d183922 WIFI-14477: Get switch carrier, speed & duplex info from swconfig command

Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 10:08:24 +01:00
John Crispin
d250f91bb3 ipq95xx: drop ATH12.3 support
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 08:11:43 +01:00
John Crispin
76d112144f ucentral-client: update version.json to 4.0.0
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 08:11:14 +01:00
John Crispin
d218c15419 ucentral-schema: update to latest HEAD
c2338ad snmp: fix schema/yaml syntax
50c4ead set schema version to 4.0.0
d8260f8 add property that allows disabling MPSK

Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 08:09:40 +01:00
John Crispin
2bf2093305 github/workflow: re-enable CIG WF189
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 08:05:59 +01:00
John Crispin
c548edfe89 qca-wifi-7: update CIG WF189 BDF files
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 07:37:39 +01:00
John Crispin
82a6e24e91 qca-wifi-7: add RTK phy fixes from CIG
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 07:36:09 +01:00
Wingate Chi
c0e6b523c4 WIFI-14488 RAP7110C-341X enable PWM LED config.
Signed-off-by: Wingate Chi <wingate.chi@cybertan.com.tw>
2025-03-24 07:30:25 +01:00
steven.lin
195fc01d06 mediatek: Add SENAO IAP2300M model
Signed-off-by: steven.lin <steven.lin@senao.com>
2025-03-24 07:29:55 +01:00
John Crispin
19959d016b ucentral-schema: update to latest HEAD
5a39d23 remove beacon-interval option

Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 07:28:40 +01:00
John Crispin
03b34b062e ucentral-schema: update to latest HEAD
1c11c1b WIFI-14284: Use swconfig to get the correct port to VLAN ID mapping for statistics

Fixes: WIFI-14284
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-17 12:09:37 +01:00
Wingate Chi
076bc0712e ipq807x_v5.4: change RAP630W-312G and RAP63XC vendor name
Fixes: WIFI-14471
Signed-off-by: Wingate Chi <wingate.chi@cybertan.com.tw>
2025-03-14 10:55:22 +01:00
John Crispin
486cc7983a qca-wifi-7: re-enable CIG wf189 support
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-14 08:41:43 +01:00
John Crispin
80343e9dad dropbear: update to upstream version
Fixes: WIFI-14466
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-14 08:40:51 +01:00
steven.lin
dd14c1c6d1 mediatek: Add SENAO models into mount_certs scripts
Signed-off-by: steven.lin <steven.lin@senao.com>
2025-03-14 08:06:21 +01:00
John Crispin
71748f4cd4 ucentral-schema: update to latest HEAD
481fd77 WIFI-14472: JSON config should allow to set channels above 196 to support channels in 6G band

Signed-off-by: John Crispin <john@phrozen.org>
2025-03-14 07:40:01 +01:00
Wingate Chi
49c51594a3 WIFI-14452 Fix Crash Observed on Cybertan rap7110c-341x with TIP dbdc168 image
Signed-off-by: Wingate Chi <wingate.chi@cybertan.com.tw>
2025-03-14 07:35:49 +01:00
John Crispin
739b6b29b2 ucentral-schema: update to latest HEAD
d2ff805 Change realtime events type from enum to string
a518b02 schema, ssid: add mpsk-radius encryption

Signed-off-by: John Crispin <john@phrozen.org>
2025-03-11 10:27:27 +01:00
John Crispin
7e393c4831 qca-wifi-7: add preliminary support for rap750w_311a
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-11 10:26:33 +01:00
Marek Kwaczynski
1149cd41aa ucentral: Add example for mpsk-radius config
Create example how to configure EMPSK with AAA using
new crypto method: mpsk-radius.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:09:12 +01:00
Marek Kwaczynski
18bb47be4d hostapd: mpskd: use mpsk from wireless config
In MPSK AAA need to use mpsk info to block scans
becasue keys are not configured.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:09:12 +01:00
Marek Kwaczynski
7847e1778e netifd: hostapd.sh add multi_psk param
Notification about enabling multi_psk for specific
wireless network.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:09:12 +01:00
Marek Kwaczynski
57735bcd18 hostapd: mpskd: fix checking addr in ssid_cache
Fix ucode syntax.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:09:12 +01:00
Marek Kwaczynski
376072ad97 hostapd: mpskd: minor: remove white spaces end of the line
Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:09:12 +01:00
Marek Kwaczynski
afa7e2bbb3 rrmd: scan: fix setting center_freq1 in params
Add casting center frequency to int, previosly was used
string.

{
	"dev": "wlan1",
	"wiphy_freq": "5180",
	"measurement_duration": "70",
	"center_freq1": "518030",
	"scan_ssids": [
		""
	],
	"scan_flags": 4
}

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:08:45 +01:00
Marek Kwaczynski
52f2e31892 rrmd: Update scanning for WiFi 7 devices
Update scan module to support WiFi 7 devices
which have virtual phys defined. Scanning on
the different virtual phys but on the same physical
phy isn't allowed.
Add NL CBs to notify about scanning progress.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:08:45 +01:00
Marek Kwaczynski
b791a723ca qca-wifi-7/mac80211: Add tip patch to fix scanning on WiFi 7 devices
Need to unblock chandef as scanning definitions which
is used by TIP modules for scanning trigger.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:08:45 +01:00
Marek Kwaczynski
a9e0e16a80 rrmd: phy: Use wiphy_name if exists
When wiphy_name is defined should be used instead of
creating name using wiphy index.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:08:45 +01:00
Marek Kwaczynski
4d55d427d7 ucentral-event: fix null pointers checking in channel switch
Invalid logical operator was used for checking null
pointers in channel_switch function: AND instead OR

Fixes: 7477963b ("ucentral-event: add channel switch handler")

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:08:44 +01:00
John Crispin
53ff49eb6f Revert "ath11k: fix STA roaming between radios"
This reverts commit 7374c39dea.

Signed-off-by: John Crispin <john@phrozen.org>
2025-03-07 09:38:38 +01:00
John Crispin
1a3c87cf35 .github/workflows: remove aercom ap72 from CI
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-07 09:38:07 +01:00
John Crispin
75df7bb794 ath12k-wifi: use SDK BDF for rap7110c_341x
Use the SDK BDF for now until the ODM provides a fixed version.

Signed-off-by: John Crispin <john@phrozen.org>
2025-03-07 09:36:52 +01:00
Tanya Singh
b61850ff18 WIFI-14462: hostapd_cli command missing from Wifi7 AP
Signed-off-by: Tanya Singh <tanya.singh@4ipnet.com>
2025-03-07 09:35:54 +01:00
Venkat Chimata
3738f5b884 mac80211: workaround: Send multicast frames as multiple unicast frames in DVLAN mode
Broadcast / Multciast transmission is not working in DVLAN mode in the driver.
If we send the frames as unicast frames, it works. This is a workaround for now.
Need to rollback once we add a clean fix.

Fixes: WIFI-14441
Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2025-03-04 06:51:45 +01:00
John Crispin
708895e7ae ucentral-schema: update to latest HEAD
39e380e enforce PMF for sae-mixed mode

Fixes: WIFI-14450
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-03 15:40:27 +01:00
John Crispin
dbdc16804d ipq5322: update rap7110c_341x to ATH12.5.5
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-27 15:54:48 +01:00
John Crispin
98375061da .github/workflows/: disable wf189 until we have an updated BDF
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-27 12:45:53 +01:00
John Crispin
e3edb1fdd5 qca: drop ath12.4 support
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-27 12:45:53 +01:00
John Crispin
68cf54d9f7 qca-wifi-7: update to ath12.5.5
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-27 12:45:52 +01:00
John Crispin
28161aff6e ucentral-schema: update to latest HEAD
90aa0ee system: Fix the delta_counters for dynamic vlan stations

Signed-off-by: John Crispin <john@phrozen.org>
2025-02-27 09:47:06 +01:00
steven.lin
c2ea273bea WIFI-14432: Fix MAC address assignment on SENAO IAP4300M
Signed-off-by: steven.lin <steven.lin@senao.com>
2025-02-27 09:43:32 +01:00
Tanya Singh
9d611028fd WIFI-14438: Fix LAN port issue in Edgecore EAP105
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-02-27 09:43:15 +01:00
steven.lin
24dbba4c5a WIFI-14424: Add SENAO models into auto build list
Signed-off-by: steven.lin <steven.lin@senao.com>
2025-02-12 13:31:42 +01:00
John Crispin
4c84a3dbdd mac80211/hostapd: more wifi bringup fixes
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-11 11:06:38 +01:00
John Crispin
664fa78572 hostapd: only enforce multiple bssid on 6G
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-10 17:10:15 +01:00
John Crispin
26e782627b rrmd: the daemon was crashing on wifi-7 devices.
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-10 12:05:45 +01:00
John Crispin
9105d688b9 mac80211: fix typo that caused device entry duplication
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-10 12:05:27 +01:00
Wingate Chi
a9694847cd WIFI-14410: Wifi7 driver with RAP7110C-341X support
Signed-off-by: Wingate Chi <wingate.chi@cybertan.com.tw>
2025-02-06 08:33:33 +01:00
Tanya Singh
426943c1c0 WIFI-14411: Fix typo in bootcount script for Edgecore EAP104
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-02-06 08:31:36 +01:00
John Crispin
6014103032 ucentral-schema: update to latest HEAD
Fixes: WIFI-14409
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-06 08:22:39 +01:00
John Crispin
56eee37052 iwinfo: move ucode based version into a feed
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-06 08:22:36 +01:00
Arif Alam
7374c39dea ath11k: fix STA roaming between radios
Fixes: WIFI-14396
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2025-02-06 08:22:35 +01:00
Tanya Singh
b77e80cf14 WIFI-14404: Enable dual boot support on EAP105 and certificate loading on dual boot for EAP104 and OAP101 series
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-02-06 08:22:35 +01:00
Tanya Singh
7544c1921b WIFI-14406: Fix MAC address assignment on Edgecore EAP105
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-02-06 08:22:35 +01:00
John Crispin
2d45944ba3 hostapd: add script support for acs_exclude_6ghz_non_psc
Fixes: WIFI-14187
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-06 08:22:34 +01:00
John Crispin
58d0932dee hostapd: fix ubus handler crash during teardown
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-06 08:22:34 +01:00
John Crispin
4f0f25ad05 hostapd: improve multi radio ACS
Fixes: WIFI-14402
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-06 08:22:33 +01:00
John Crispin
b74f824b3a mac80211: multiple_bssid is mandatory on 6e when using 11be
Fixes: WIFI-14343
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-06 08:22:32 +01:00
John Crispin
3e7fd62fc2 hostapd: fix wifi-7 e-mpsk
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-03 14:26:00 +01:00
John Crispin
4050db8ed6 ipq53xx: disable ujail
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-03 13:01:41 +01:00
John Crispin
8b5a449f6d ucentral-schema: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-03 11:43:33 +01:00
John Crispin
55e3e90513 ucode: fix none wifi-7 builds
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
Ken
0d1ea98328 WIFI-14357 WF189 enable dual image support on wifi7 platform
Signed-off-by: Ken <xshi@actiontec.com>
2025-01-30 13:08:28 +01:00
John Crispin
aaaef76d7d ath12k: fix race condition when generating shadow config for wireless
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
John Crispin
4b09108f72 iwinfo: use new ucode based code for wifi-7
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
John Crispin
c02b5922d9 base-files: add ucidef_set_wireless_macaddr_base()
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
John Crispin
9d54cda767 ipq53xx: fix ethernet link issues
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
John Crispin
1f10af2355 base-files: do not generate default interfaces on firstboot
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
John Crispin
0df07d514e ipq53xx: fix cig wf189 eth MAC addr assignment
Fixes: WIFI-14313
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
John Crispin
9587fb3fee only build new ATH12.4 images
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:27 +01:00
John Crispin
4d4d356c1f qcom: fixes
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
64b1f96721 ucentral-schema: update to latest HEAD
61e5802 add multi radio support

Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
f3f070acb1 unetd: do not build on wifi-7 AP
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
aa909d9ab8 ucentral-event: fix phy name splitting
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
1de1426a80 kernel-6.1: add checksums
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
8279bae9db ucode: add multi-radio support
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
3554480103 ucode: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
e4b535f6cb ath12.4-cs1: update to latest SDK
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
Ken
ed7e047514 WIFI-14371 WF660A reset button for 5.4 kernel
Signed-off-by: Ken <xshi@actiontec.com>
2025-01-27 07:00:38 +01:00
wingate5678
7ced0ea2cc WIFI-14350 add platfrom into auto build list
Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
2025-01-27 07:00:05 +01:00
wingate5678
a3a957f688 WIFI-14350 RAP630W-311G fix wifi data memory region
Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
2025-01-27 07:00:05 +01:00
wingate5678
afcaa6dea2 WIFI-14348 RAP630W-312G fix interface mdio bus assign error
Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
2025-01-27 06:59:44 +01:00
Tanya Singh
605406e191 WIFI-14170: Update BDF for Edgecore EAP104
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-01-27 06:59:20 +01:00
Jaspreet Sachdev
d639c02ec1 Reverting to ubuntu-22.04
Signed-off-by: Jaspreet Sachdev <jaspreet.sachdev@kinarasystems.com>
2025-01-06 10:50:33 -05:00
Jaspreet Sachdev
cf45b65214 Fix the docker removal of images
Signed-off-by: Jaspreet Sachdev <jaspreet.sachdev@kinarasystems.com>
2025-01-06 10:32:52 -05:00
John Crispin
258c26e7e6 ipq60xx: disable sdhci LEDs
Fixes: WIFI-14340
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-06 11:49:40 +01:00
John Crispin
ed4f03a1a9 ipq60xx: make LEDs work on CIG WF660
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-06 11:38:59 +01:00
Marek Kwaczynski
7477963b1f ucentral-event: add channel switch handler
Add channel switch handler to update hapd object
with new frequency and channel info.

Fixes: WIFI-14336

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-01-06 11:02:08 +01:00
Tanya Singh
1cf48ae6d9 mediatek: Set GPIO pins to reset the LTE module on Edgecore EAP112
Fixes: WIFI-14098
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-01-06 11:01:34 +01:00
Firas Shaari
77144209e9 ucentral-schema: Fix typo qos.json
"bandwidth_up", and "bandwidth_down" had typos. The correct attributes are
"bandwidth-up", and "bandwidth-down"

Signed-off-by: Firas Shaari <firas.shaari@shaariconsultancy.com>
2025-01-06 11:00:46 +01:00
Ken
71315b140a ipq807x: WF188n/WF196 dual image support
Fixes: WIFI-14339
Signed-off-by: Ken <xshi@actiontec.com>
2025-01-06 10:59:16 +01:00
Jaspreet Sachdev
8332ba86e1 Removed WallysTech target builds
Signed-off-by: Jaspreet Sachdev <jaspreet.sachdev@kinarasystems.com>
2024-12-30 18:03:21 -05:00
John Crispin
6a94323a59 udevmand: update to latest HEAD
be0f45e udevmand: fix segmentation fault during deinit

Signed-off-by: John Crispin <john@phrozen.org>
2024-12-19 06:49:31 +01:00
John Crispin
3d43f4fc95 Revert "mediatek-sdk: update SDK to mp2.3 final"
This reverts commit 5f1d562f61.

Signed-off-by: John Crispin <john@phrozen.org>
2024-12-19 06:42:47 +01:00
Tanya Singh
ee80309fc3 mediatek: Fix MAC assignment for eth ports on Edgecore EAP112
Fixes: WIFI-14319
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-12-12 08:40:45 +01:00
John Crispin
5f1d562f61 mediatek-sdk: update SDK to mp2.3 final
We previously had a beta release.

Fixes: WIFI-14322
Signed-off-by: John Crispin <john@phrozen.org>
2024-12-10 16:42:40 +01:00
Felix Fietkau
5aa975b70c mediatek-sdk: fix roaming issue
Fixes: WIFI-14321
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-12-10 16:42:35 +01:00
John Crispin
47f71743f4 cloud_discovery: fix firstcontact fallback mode
Fixes: WIFI-14320
Signed-off-by: John Crispin <john@phrozen.org>
2024-12-10 14:40:21 +01:00
steven.lin
e6f20ce347 mediatek: Add SENAO JEAP6500
Specifications:
SoC: MediaTek MT7981BA
RF Chipset: MT7976DA @2.4GHz 2T2R
MT7976DA @5ghz 2T2R
RAM: 512MB DDR4 RAM
Flash: SPI-NAND 256 MiB
Ethernet: 2 x 1GbE PHY
Reset Button
Power Source: DC IN 12v, Standard PoE 802.3af/at
LED Indicator: 1 x single color LED (GPIO Control)

Fixes: WIFI-14312
Signed-off-by: steven.lin <steven.lin@senao.com>
2024-12-10 09:48:13 +01:00
jackcybertan
717b0ce261 ipq50xx: Support Cybertan RAP630W-312G
Fixes: WIFI-14318
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2024-12-10 09:47:56 +01:00
John Crispin
e3c805a714 workflows/build-dev.yml: remove cybertan board that does not exist
Signed-off-by: John Crispin <john@phrozen.org>
2024-12-09 16:23:37 +01:00
John Crispin
3047402b91 Revert "ath11k: fix multi band roaming"
This reverts commit 1d106efd51.

Fixes: WIFI-14201
Signed-off-by: John Crispin <john@phrozen.org>
2024-12-09 16:22:45 +01:00
John Crispin
4dcd206466 ucentral-schema: update to latest HEAD
1ddca91 set schema version to 3.2.1

Signed-off-by: John Crispin <john@phrozen.org>
2024-12-09 08:31:09 +01:00
jackcybertan
d3bb3be528 ramips: Support Cybertan RAP63XC-211G (MTK) solution
Fixes: WIFI-14317
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2024-12-09 08:22:27 +01:00
Ken
958ac1b6b0 ipq53xx: WF189 set the eth mac address
Fixes: WIFI-14313
Signed-off-by: Ken <xshi@actiontec.com>
2024-12-09 08:19:11 +01:00
John Crispin
405ec9c524 setup.py: add option to define build tree
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-28 15:42:45 +01:00
John Crispin
c321d6f6b1 cloud_discovery: correctly convert timeouts to integers
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-28 08:56:07 +01:00
John Crispin
9a941f2ee3 cloud_discovery: improve firstcontact support
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-28 08:44:13 +01:00
John Crispin
2e27d22a48 ucentral-schema: update wwan.json
Fixes: WIFI-14291
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-27 10:28:52 +01:00
John Crispin
9cfa767d7e ucentral-schema: update to latest HEAD
6e3e2df add support for configuring snmpd service using ucentral.

Fixes: WIFI-14152
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-27 10:24:26 +01:00
tanya.singh
78449ee633 mediatek: Add netfilter configs to mt7981, and packages to bring up LTE (wwan) on EAP112
Fixes: WIFI-14098
Signed-off-by: tanya.singh <tanya_singh@accton.com>
2024-11-21 06:05:52 +01:00
Arif Alam
5b9863a019 ipq60xx: wf188n: fix reset button
Fixes WIFI-14296

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2024-11-21 06:05:52 +01:00
Tanya Singh
5839ae9593 ucentral-schema: Add sleep time of 1 second before sending the command to add GST (NMEA) message to /dev/ttyMSM1 port
Fixes: WIFI-14270
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-11-21 06:05:49 +01:00
John Crispin
36ce8d2abb certificates: stage gateway.json
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-15 07:50:16 +01:00
John Crispin
656cc231a8 firstcontact: cloud_discovery will start the service
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-15 07:50:16 +01:00
John Crispin
35e073fb59 ucentral-schema: update to latest HEAD
b7207ae allow setting cloud_discovery timeouts

Signed-off-by: John Crispin <john@phrozen.org>
2024-11-15 07:50:16 +01:00
John Crispin
4bc2b9c821 ucentral-client: add default cloud_discovery timeouts
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-15 07:50:16 +01:00
John Crispin
41f4d5e619 ucentral-client: update to latest HEAD
8c45f96 send on/offline events to cloud discovery service

Signed-off-by: John Crispin <john@phrozen.org>
2024-11-15 07:50:16 +01:00
John Crispin
bd7bb9b74b busybox: do not use pool servers if DHCP provided NTP
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-15 07:50:16 +01:00
John Crispin
80358cf755 profiles: add cloud_discovery to default images
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-15 07:50:16 +01:00
John Crispin
09f3dba767 cloud_discovery: add new service
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-15 07:50:15 +01:00
John Crispin
a21f520666 ucentral-schema: update to latest HEAD
7ac7ed5 schema: configure sae on 6G when SSID is sae-mixed

Signed-off-by: John Crispin <john@phrozen.org>
2024-11-15 07:49:54 +01:00
John Crispin
7300252b07 hostapd: allow clients to refresh the used PSK if band is not 6G
Fixes: WIFI-14256
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-13 15:03:28 +01:00
John Crispin
dcfc17a150 uspot: fix idle timeout handling
Fixes: WIFI-14263
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-13 12:40:03 +01:00
John Crispin
e6f1cef31d ucentral-client: update to latest HEAD
c719c1b Include DHCP VSI information in CONNECT message

Signed-off-by: John Crispin <john@phrozen.org>
2024-11-11 07:59:40 +01:00
John Crispin
5c9c516ea1 ucentral-schema: update to latest HEAD
f0dfb40 Include DHCP VSI information in state message
44da3d6 Add config for vendor-class and request-options
a21635b always request option 43 and 224 when doing DHCP

Signed-off-by: John Crispin <john@phrozen.org>
2024-11-11 07:58:43 +01:00
Paul White
9cc151165e ucentral-schema: add udhcpc-vsi-parse script
Fixes: WIFI-14271
Signed-off-by: Paul White <paul@shasta.cloud>
2024-11-11 07:46:53 +01:00
Tanya Singh
ccd23cb4c1 hostapd: add afcd respawn
Customize the procd instance respawn time  parameters to avoid afcd instance
crash while creating afc-location.json

Fixes: WIFI-14261
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-11-11 07:00:41 +01:00
John Crispin
8ecd0c36dd netifd: various backports from HEAD branch
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-07 17:43:44 +01:00
John Crispin
7820775169 hostapd: more bss color improvements
Fixes: WIFI-14259
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-07 16:45:27 +01:00
John Crispin
bf37e6d4c9 mediatek: change default bss_color behaviour
Fixes: WIFI-14194
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-07 16:45:27 +01:00
John Crispin
d2845e7664 mediatek: swap eth0/1 on eap111
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-06 09:33:39 +01:00
Tanya Singh
eb9cbaec72 ipq807x: Shorten the kernel backtrace warning msg for ieee80211_bss_get_elem
Fixes: WIFI-11006
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-11-06 09:33:21 +01:00
Tanya Singh
f15e10bfdb ipq95xx: Update phy driver for EAP105 LAN port
Fixes: WIFI-14171
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-11-06 09:33:05 +01:00
Ken
08861e1db0 ipq807x: add ARQ114C support
Fixes: WIFI-14253
Signed-off-by: Ken <xshi@actiontec.com>
2024-11-06 09:32:40 +01:00
Arif Alam
064fac36b0 uspot: fix setting passwords greater than 16 characters
Fixes WIFI-13737

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2024-11-04 16:31:29 +01:00
John Crispin
786cdeb1c8 ucentral-schema: set 3.2.1 as the version
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-04 15:12:16 +01:00
John Crispin
010e10e7e8 ucentral-state: improve led blink handling
Fixes: WIFI-14194
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-04 14:58:33 +01:00
John Crispin
c0095b3ef9 ucentral-client: update to latest HEAD
cac85d9 improve blink command

Fixes: WIFI-14194
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-04 14:57:28 +01:00
John Crispin
413885f07b hostapd: change default bss_color behaviour
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-04 14:44:38 +01:00
John Crispin
7b0e041bac ucentral-client: update to latest HEAD
62e0b2d This is a combination of commits for handling compressed configuration.

Signed-off-by: John Crispin <john@phrozen.org>
2024-10-23 13:44:13 +02:00
John Crispin
828cc9e597 ucentral-schema: update to latest HEAD
ad1c322 flag to denote compressed commands (configure for now) are supported

Signed-off-by: John Crispin <john@phrozen.org>
2024-10-23 13:43:44 +02:00
John Crispin
008ca9618d ipq95xx: import ath12.4-cs kernel and drivers
Signed-off-by: John Crispin <john@phrozen.org>
2024-10-20 09:25:13 +02:00
John Crispin
a3bc629684 ipq807x: import QCOM ath11k patch
Fixes: WIFI-13926
Signed-off-by: John Crispin <john@phrozen.org>
2024-10-20 09:24:08 +02:00
Tanya Singh
514210fd7e ipq95xx: Fix mac address assignment for eth0 (wan) and eth1 (lan) interfaces in Edgecore EAP105
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-10-20 07:53:37 +02:00
jackcybertan
d6f822a00b ipq807x: wifi thermal mitigation daemon
Fixes: WIFI-14202
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2024-10-20 07:52:50 +02:00
John Crispin
e8b9ec1234 ath11k-firmware: update ipq6018/8074 FW to 2.7.0.1-02409
Signed-off-by: John Crispin <john@phrozen.org>
2024-10-20 07:42:34 +02:00
John Crispin
f1a1d29f99 ucentral-client: update to latest HEAD
62e0b2d This is a combination of commits for handling compressed configuration.
3f0ad16 remove CI

Signed-off-by: John Crispin <john@phrozen.org>
2024-10-20 07:20:32 +02:00
Shashi
0c2c59f7c0 .github/workflows/build-dev.yml: add 'udaya_a6-od2'
Signed-off-by: Shashi <shashi.kushwaha@inventum.net>
2024-10-09 13:01:15 +02:00
Shashi
ab9a301155 ipq807x: add new files & made change for udaya outdoor wifi-6
Signed-off-by: Shashi <shashi.kushwaha@inventum.net>
2024-10-04 16:21:16 +02:00
John Crispin
a6cb3249c4 ucentral-schema: update to latest HEAD
a0f26ac disable OKC when MPSK is enabled

Signed-off-by: John Crispin <john@phrozen.org>
2024-10-01 15:51:29 +02:00
John Crispin
6616afca10 wireguard: update mirror URL
Signed-off-by: John Crispin <john@phrozen.org>
2024-10-01 10:25:23 +02:00
John Crispin
40ef18e788 ucentral-schema: update to latest HEAD
df95905 do not restart the mpsk daemon upon cfg reload

Signed-off-by: John Crispin <john@phrozen.org>
2024-10-01 10:24:41 +02:00
John Crispin
d2b6fc73f7 wireguard: change download URL to a mirror server
Signed-off-by: John Crispin <john@phrozen.org>
2024-09-30 15:36:46 +02:00
jackcybertan
621e9a4551 ipq50xx: RAP630 series support PWM-LED
Fixes: WIFI-14153
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2024-09-29 16:24:38 +02:00
Steven Lin
d518e5988d mediatek: Add SENAO IAP4300M
Specifications:
SoC: MediaTek MT7986A
RF Chipset: MT7976G @2.4GHz 4T4R
MT7976A @5ghz 4T4R
RAM: 1GB DDR4 RAM (2x 512MB)
Flash: SPI-NAND 256 MiB
Ethernet: 1x 2.5GbE PHY
Reset Button
Power Source: DC IN 12v, Standard PoE 802.3af/at
LED Indicator: 4 x single color LED (GPIO Control)

Fixes: WIFI-13983
Signed-off-by: Steven Lin <steven.lin@senao.com>
2024-09-27 15:42:30 +02:00
John Crispin
911da1bb41 mpskd: kick all 6G clients upon reload
Signed-off-by: John Crispin <john@phrozen.org>
2024-09-23 14:57:21 +02:00
John Crispin
b2e778221e ucentral-schema: update to latest HEAD
baeef76 Revert "ucentral-schema: add support for configuring snmpd service using ucentral."
684a1aa firewall: upon up NAT'ed port 53 for ipv6
83a30b4 enable reconf for mpsk interfaces

Signed-off-by: John Crispin <john@phrozen.org>
2024-09-23 14:55:20 +02:00
John Crispin
34b0405238 ucentral-schema: update to latest HEAD
42e59d5 Add system-password to the schema
8b3701b ucentral-schema: add support for configuring snmpd service using ucentral.

Signed-off-by: John Crispin <john@phrozen.org>
2024-09-22 14:14:57 +02:00
John Crispin
0d6245fbcf ucode: improve hostpkg compile
Signed-off-by: John Crispin <john@phrozen.org>
2024-09-22 14:05:10 +02:00
John Crispin
207dba8af6 hostapd: make patched hostapd available for all MTK based boards
Signed-off-by: John Crispin <john@phrozen.org>
2024-09-22 13:45:23 +02:00
Tanya Singh
09e6ea31a5 ipq53xx: Modify DTS for Edgecore EAP105 to read NOR flash correctly
Fixes: WIFI-14146
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-09-19 09:29:30 +02:00
Firas Shaari
c9c2137a54 hostapd: Removing 802.11w and SHA256 encryption from PSK-Radius
Signed-off-by: Firas Shaari <firas.shaari@shaariconsultancy.com>
2024-09-18 08:55:18 +02:00
John Crispin
ddbf50b673 ratelimit: delete iface data when a radio gets restarted
Fixes: WIFI-14050
Signed-off-by: John Crispin <john@phrozen.org>
2024-09-17 07:59:25 +02:00
John Crispin
cf599560e7 ucentral-schema: update to latest HEAD
Fixes: WIFI-14094
Signed-off-by: John Crispin <john@phrozen.org>
2024-09-16 16:11:54 +02:00
John Crispin
83a6710095 ucentral-schema: add more mpsk examples
Signed-off-by: John Crispin <john@phrozen.org>
2024-09-16 15:49:56 +02:00
Tanya Singh
ecff108ac9 afc: Add more fields to ubus command for GPS to send location info to AFC server
Fixes: WIFI-14065
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-09-16 11:49:02 +02:00
John Crispin
18f357a06b ucentral-schema: update to latest HEAD
9e7873a command: add fixed_config

Fixes: WIFI-14136
Signed-off-by: John Crispin <john@phrozen.org>
2024-09-16 11:48:30 +02:00
John Crispin
aedbf9794e hostapd: sync patches
Fixes: WIFI-14118
Signed-off-by: John Crispin <john@phrozen.org>
2024-09-10 16:00:57 +02:00
John Crispin
c235143c16 hostapd: allow using psk2-radius in combination with enhanced MPSK
Signed-off-by: John Crispin <john@phrozen.org>
2024-09-09 15:47:42 +02:00
John Crispin
17a97e5060 ucentral-schema: update to latest HEAD
79f8158 wrap up psk2-radius / enhanced MPSK

Signed-off-by: John Crispin <john@phrozen.org>
2024-09-09 15:46:52 +02:00
Tanya Singh
b5d5af41f0 ipq95xx: Update bdf for Edgecore EAP105
FIxes: WIFI-14127
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-09-09 15:45:01 +02:00
Firas Shaari
2a4d4f6a2e hostapd: Higher WAP2 SHA256 breaks MPSK deployments
Fixes: WIFI-14092
Signed-off-by: Firas Shaari <firas.shaari@shaariconsultancy.com>
2024-09-09 15:27:22 +02:00
John Crispin
8cd635c895 hostapd: fix radius rate limit while roaming
Fixes: WIFI-14054
Signed-off-by: John Crispin <john@phrozen.org>
2024-09-09 15:27:08 +02:00
John Crispin
249b24c3c6 ratelimit: add a dump function
Signed-off-by: John Crispin <john@phrozen.org>
2024-09-09 15:27:07 +02:00
John Crispin
e479001b36 ucentral-event: tell rate-limit the BSS a STA was connected to
Fixes: WIFI-14053
Signed-off-by: John Crispin <john@phrozen.org>
2024-09-09 15:27:07 +02:00
John Crispin
c312d45e21 ratelimit: re-init device settings upon radio level config changes
The device was not re-initialized if ony radio settings get updated without the
device settings changing.

Fixes: WIFI-14050
Signed-off-by: John Crispin <john@phrozen.org>
2024-09-09 15:27:07 +02:00
John Crispin
1f5f5a1a06 ucentral-schema: update to latest HEAD
658a29d state.uc: Fixing negative coutners
06745bc handle multi-band phys for encryption check
c113cac fix 80211w value for "none" encryption

Signed-off-by: John Crispin <john@phrozen.org>
2024-09-09 15:27:07 +02:00
John Crispin
9ac52bd77a hostapd: fix mac specific multi-psk
Fixes: WIFI-14095
Signed-off-by: John Crispin <john@phrozen.org>
2024-09-09 15:27:07 +02:00
Ken
ba5074c57f ipq95xx: WF189 update BDF and set eth mac address
Fixes: WIFI-14096
Signed-off-by: Ken <xshi@actiontec.com>
2024-09-09 15:27:07 +02:00
Venkat Chimata
67c62ce445 ucentral-state: Set the LED state back to online on blink timeout
Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2024-09-09 15:27:07 +02:00
Tanya Singh
ef9a22bec7 ipq50xx: Update BDF for EAP104
Fixes: WIFI-14051
Fixes: WIFI-14055
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-09-09 15:27:07 +02:00
Tanya Singh
347b12e4dd ipq50xx: Update BDF for OAP101 series
Fixes: WIFI-13540
Fixes: WIFI-13578
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-09-09 15:27:07 +02:00
Marek Kwaczynski
06e3d3678d wireguard: update package hash
Update wireguard hash package, previous is not available.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2024-08-30 09:19:23 -04:00
John Crispin
3357f668ee ucentral-event: add band / channel to join events
Signed-off-by: John Crispin <john@phrozen.org>
2024-08-15 10:32:38 +02:00
John Crispin
ed82b878c0 ucentral-schema: add gps support
Signed-off-by: John Crispin <john@phrozen.org>
2024-08-15 10:24:57 +02:00
CybertanYingWei
308c83263c mediatek: modify sonicfi rap630c-311g and sonicfi rap630w-311g company information
Signed-off-by: CybertanYingWei <Yingwei.Huang@cybertan.com.tw>
2024-08-15 07:20:30 +02:00
CybertanYingWei
06b8b32623 mediatek: add sonicfi rap630w 211g
Signed-off-by: CybertanYingWei <Yingwei.Huang@cybertan.com.tw>
2024-08-15 07:20:30 +02:00
John Crispin
16ebaf4fa3 hostapd: always override r0k_holder
Signed-off-by: John Crispin <john@phrozen.org>
2024-08-15 07:11:29 +02:00
Yin Ni
7d336070d7 ipq50xx: add initial support for GL.iNet B3000
Hardware:
* SoC: Qcom IPQ5018
* RAM: DDR3L 512MB
* Flash: 128MB Nand
* Ethernet: 3x GbE
* WLAN: 2x2 2.4GHz 574Mbps + 2x2 5GHz 2402Mbps (builtin + builtin)
* LEDS: 1x white, 1x blue
* Buttons: 1x reset
* Power: 12VDC, 1.5A

Installation:
* from qsdk to openwifi:
    upgrade "openwrt-ipq50xx-glinet_b3000-squashfs-nand-factory.bin" via web ui without keep config.
* upgrade "openwrt-ipq50xx-glinet_b3000-squashfs-sysupgrade.tar" if you are already in openwifi.

Signed-off-by: Yin Ni <yin.ni@gl-inet.com>
2024-08-12 15:59:03 +02:00
Tanya Singh
18889cfb54 mediatek: Support Edgecore EAP112
Fixes: WIFI-13753
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-08-12 10:24:11 +02:00
Venkat Chimata
9a3337c49e ipq807x: edgecore_oap101: Configure wifi and power leds correctly
Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2024-08-12 10:24:06 +02:00
Venkat Chimata
b8a4373e56 ipq807x: edgecore_oap101: Update upgrade_available correctly in the bootcount init.d script
Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2024-08-12 10:24:01 +02:00
Venkat Chimata
d5feaf2d4b ipq807x: Generate WiFi MAC Addresses correctly for Edgecore OAP101
Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2024-08-12 10:23:49 +02:00
John Crispin
e6ca8a30d5 ucentral-schema: update to latest HEAD
a626097 add schema for RRM based on Channel Utilization
39aed21 captive: allow loading the web-root from an external http server
37e3895 add multi-psk2-radius

Signed-off-by: John Crispin <john@phrozen.org>
2024-08-07 07:10:34 +02:00
John Crispin
ebe0b3ea52 hostapd: do not auto generate r0/1k keys when ft_key is set
Signed-off-by: John Crispin <john@phrozen.org>
2024-08-07 06:38:24 +02:00
Venkat Chimata
93b4735ca5 leds: Add controllable power LED option for multiple platforms
Add controllable power LED support for -

CIG WF186W, CIG WF186H, CIG WF188N, CIG WF196, Edgecore EAP101 and
Edgecore EAP102 and Edgecore EAP104

Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2024-08-07 06:27:10 +02:00
Tanya Singh
6d4f5b961e RRM: Channel Optimization based on Channel Utilization
Fixes: WIFI-13220
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-08-07 06:26:33 +02:00
Firas Shaari
63899e09ce Update rate-limit.json
Removing unnecessarily roaming configs from the rate-limit example.
2024-08-07 06:26:08 +02:00
John Crispin
028b96ee88 ipq95xx: fix multiple_bssid support
Fixes: WIFI-13906
Signed-off-by: John Crispin <john@phrozen.org>
2024-08-05 13:30:23 +02:00
John Crispin
b5eef3e284 uspot: use static html files
Signed-off-by: John Crispin <john@phrozen.org>
2024-08-05 09:12:47 +02:00
John Crispin
51437a78c0 mt76: populate wiphy->max_ap_assoc_sta
Fixes: WIFI-13513
Signed-off-by: John Crispin <john@phrozen.org>
2024-08-02 13:56:32 +02:00
John Crispin
a619e59c1d mt76: de-duplicate package
Signed-off-by: John Crispin <john@phrozen.org>
2024-08-02 13:55:15 +02:00
John Crispin
06cfa19b79 ucentral-client: detect 0 byte capabilities file
Fixes: WIFI-14023
Signed-off-by: John Crispin <john@phrozen.org>
2024-08-02 13:19:41 +02:00
John Crispin
c82e67b45b mediatek: fix /certificates mounting
latest mass production samples use ZSTD compression for certificates

Signed-off-by: John Crispin <john@phrozen.org>
2024-08-02 13:03:24 +02:00
John Crispin
d603ecd10a ratelimit: apply updated ratelimit to associated stations
Fixes: WIFI-13453
Fixes: WIFI-13840
Signed-off-by: John Crispin <john@phrozen.org>
2024-08-02 12:41:00 +02:00
John Crispin
0c19ddddca hostapd: fix wpa3-192 + 11r AKM
Fixes: WIFI-14016
Signed-off-by: John Crispin <john@phrozen.org>
2024-08-02 11:06:37 +02:00
John Crispin
c128391b58 ipq807x: update WF186 BDF files
Signed-off-by: John Crispin <john@phrozen.org>
2024-08-02 10:47:24 +02:00
Ken
4996cbd313 ipq807x: CIG-WF660a 5.4 Kernel/Firmware upgrade
Fixes: WIFI-13041
Signed-off-by: Ken <xshi@actiontec.com>
2024-08-02 10:44:10 +02:00
Your Name
c48d145889 add sonicfi rap630c-311g and sonicfi rap630w-311g
Signed-off-by: Your Name <you@example.com>
2024-07-31 10:13:36 +02:00
Venkat Chimata
bbc78828fc ieee8021x: Fix connectivity issues with a non-vlan based event Non-vlan based ieee8021x client was not able get IP Addess through the AP. The reason was that ieee8021x.uc subscriptions could n't subscribe hostapd events as the subscribe functions are called before creating the interfaces.
To handle this, invoke hapd_subscriber.subscribe after the interface is created.
Also dont delete the interface from ifaces as ifaces should always contain the
configured ports (from uci config) per ieee8021x.uc design.
Deleting interfaces from ifaces will lead to ieee8021x.uc crashes.

Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2024-07-24 16:08:04 +02:00
John Crispin
51a71c2224 ubox: add log_priority patch
Fixes: WIFI-14006
Signed-off-by: John Crispin <john@phrozen.org>
2024-07-24 07:19:07 +02:00
John Crispin
b99e374fae ucentral-schema: update to latest HEAD
bf512cd (HEAD -> main, origin/main, origin/HEAD) fix wifi assoc with main PSK in MPSK scenarios

Fixes: WIFI-13953
Signed-off-by: John Crispin <john@phrozen.org>
2024-07-24 06:52:44 +02:00
John Crispin
03e06c52d8 ucentral-schema: update to latest HEAD
f4924dc roaming: add support for 256 bit AES keys

Fixes: WIFI-14005
Fixes: WIFI-13980
Fixes: WIFI-13979
Fixes: WIFI-13968
Signed-off-by: John Crispin <john@phrozen.org>
2024-07-24 06:35:59 +02:00
John Crispin
273bce6f76 hostapd: fix extended radius AVPs
Signed-off-by: John Crispin <john@phrozen.org>
2024-07-24 06:14:00 +02:00
John Crispin
0a21b9d254 hostapd: enable FT-PSK for psk2-radius
Signed-off-by: John Crispin <john@phrozen.org>
2024-07-24 06:14:00 +02:00
Shashi Kushwaha
a5b132fc72 ipq50xx: hard reset issue resolved udaya wifi 6
Signed-off-by: Shashi Kushwaha <shashi.kushwaha@inventum.net>
2024-07-18 16:08:08 +02:00
Firas Shaari
644f6ebcd6 ucentral-schema: Update wpa2-radius.json
Fix configurations for the WPA2 Enterprise example with 802.11r enabled for fast transitioning.

Signed-off-by: Firas Shaari <fshaari-c@telecominfraproject.com>
2024-07-18 16:08:08 +02:00
John Crispin
a0c0abb6ac qca-ssdk: use INFO severity to indicate FDB flush
Signed-off-by: John Crispin <john@phrozen.org>
2024-07-18 16:08:08 +02:00
John Crispin
ed8311e4e4 hostapd: add ft_key easy button
Signed-off-by: John Crispin <john@phrozen.org>
2024-07-18 16:08:08 +02:00
John Crispin
3085bf3ccc hostapd: add rate support to FT
Signed-off-by: John Crispin <john@phrozen.org>
2024-07-18 16:08:08 +02:00
John Crispin
27ad029ceb hostapd: add origin_ap to events for FT associations
Signed-off-by: John Crispin <john@phrozen.org>
2024-07-13 15:35:43 +02:00
John Crispin
92dbb0e408 ucentral-schema: update to latest HEAD
2b14486 Fixing issues with section names in network config

Signed-off-by: John Crispin <john@phrozen.org>
2024-07-12 11:44:53 +02:00
John Crispin
5eb9df2df6 mediatek: mt76: Fix null pointer access
Fix null pointer dereference issue during Authentication stage and
add sanity check in mt7915_sta_statistics

Signed-off-by: John Crispin <john@phrozen.org>
2024-07-11 12:25:59 +02:00
John Crispin
6f2bd226f8 ucentral-schema: update to latest HEAD
9ccc1e0 add enhanced mpsk support

Signed-off-by: John Crispin <john@phrozen.org>
2024-07-11 12:17:15 +02:00
John Crispin
65eca97d16 ucentral-schema: update to latest HEAD
3cdfe8b Increase MAX MTU to 1600

Signed-off-by: John Crispin <john@phrozen.org>
2024-07-11 12:17:15 +02:00
John Crispin
9596f15742 ipq40xx: drop support
Signed-off-by: John Crispin <john@phrozen.org>
2024-07-11 12:17:15 +02:00
Venkat Chimata
131a26bcc0 eap104: Update the environment variable bootcount properly for EAP104
In the bootcount script there was no entry for Edgecore EAP104 to
set the bootcount. This commit adds support for Edgecore EAP104 in
bootcount script to set the environment variable correctly

Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2024-07-11 12:17:15 +02:00
Venkat Chimata
4b50ff9798 ipq50xx: Adjust ubootenv_size for ipq50xx
ubootenv_size is computed dynamically similar to ipq807x.
This resolves the issue where fw_setenv fails with the following error.

MTD erase error on /dev/mtd13: Invalid argument
Error: can't write fw_env to flash

Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2024-07-11 12:17:15 +02:00
Venkat Chimata
0b0de111e2 mac80211: Update tx stats correctly in case of AP mode
In the backports driver the tx stats are updated in ieee80211_8023_xmit.
However in AP mode the packets are transmitted in ieee80211_8023_xmit_ap.
ieee80211_8023_xmit is not hit in case of AP mode. Update the stats just
before calling ieee80211_8023_xmit_ap

Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2024-07-11 12:17:15 +02:00
HaiBac
0f999a54c1 ipq807x: add wallys DR5018 support
Signed-off-by: HaiBac <mail@bacnh.com>
2024-07-11 12:17:15 +02:00
Arif Alam
4b0297ba07 wireguard: update package hash
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2024-07-11 12:17:15 +02:00
John Crispin
a438d39486 ath11k: fix monitor mode
Enabling CPTCFG_ATH11K_MEM_PROFILE_512M will change the layout of
struct hal_rx_desc_ipq8074. This broke monitor mode. Fix it by not modifying
the struct even if the 512MB profile is enabled.

Fixes: WIFI-12102
Signed-off-by: John Crispin <john@phrozen.org>
2024-07-11 12:17:15 +02:00
John Crispin
33f8f22375 hostapd: add enhanced MPSK support
Signed-off-by: John Crispin <john@phrozen.org>
2024-07-11 12:17:15 +02:00
Felix Fietkau
6afc11838e hostapd: add support for authenticating with multiple PSKs via ubus helper
Also supports assigning a VLAN ID based on the PSK

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-07-11 09:34:28 +02:00
Felix Fietkau
b5048d8305 hostapd: reject probe/assoc/auth requests if any subscriber rejects them
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-07-03 08:41:03 +02:00
John Crispin
03d14daf20 ucentral-schema: update to latest HEAD
dd31b74 set 3.2.0 as the version

Signed-off-by: John Crispin <john@phrozen.org>
2024-07-03 08:23:33 +02:00
John Crispin
76c16ccc96 ucentral-schema: set 3.2.0 as the version
Signed-off-by: John Crispin <john@phrozen.org>
2024-07-03 08:15:12 +02:00
John Crispin
8b6e73477b ipq53xx: fix lan/wan mapping on cig wf-189
Signed-off-by: John Crispin <john@phrozen.org>
2024-07-03 06:52:55 +02:00
joydeepbenison
c51a24db43 ucentral-event: Fix Modifying VLAN-ID Under LAN Port
This commit is an improvement over previous
commit 3598a243b3 which added a
fix for traffic disruption when vlan id of the lan port is
changed on devices with internal switches such as fap655,
CIG_WF186w,EAP-104.
This commit reconfigures the vlans for the mpsk clients on the
switch using the ucentral-event subsystem by tracking the
netifd_add events.

Fixes: WIFI-13797
Signed-off-by: joydeepbenison <joydeep.ghosh@benisontech.com>
2024-07-03 06:40:52 +02:00
Venkat Chimata
45eb5c9a6b ieee8021x / hostapd: Fix 802.1x + DVLAN issues
ieee8021x
---------
1. Handle link_up events and update hostapd config
2. For certains scenarios, we need to remove and add
   instead of reload (reload did not work).
   Consider the following scenario -
   Say on CIG 186w as an example
   eth0.4086 interface exists with some non-ieee8021x config.
   Push ieee8021x config. In general the flow is that
   reload_config is called followed by invocation of services (from ucentral-schema)
   Services inovation does n't wait until the configi reloaded ie in this context
   ieee8021x service is invoked much before the network interfaces are recreated.
   That is not correct. To handle this, we capture link-up events
   and remove the existing interface (in hostapd as shown below) and add again
3. For swconfig platforms, the names contain a dot. Handle that gracefully in
   ubus_unsub_object while adding hostapd interface
4. Add better logging using log.syslog

hostapd
---------
In case of swconfig switches, the basename of the interface should be based on the last dot.
Earlier it was done based on the first dot, which would result in incorrect basename.
For example if the interface name is eth0.4087 then the vlan->ifname would be eth0.4087.  (A dot at the end) .
Before this patch, the basename was returned as eth0. It should be eth0.4087

Also fixed the return code by adding a default value of 0 and removed an unncessary check
for if_add before ubus add call.

Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2024-07-03 06:37:47 +02:00
John Crispin
a449f08839 hostapd: run afc client in insecure mode if the CA is not present
Signed-off-by: John Crispin <john@phrozen.org>
2024-06-28 06:21:36 +02:00
John Crispin
70b8ad926c ipq53xx: add EAP105 to CI
Signed-off-by: John Crispin <john@phrozen.org>
2024-06-28 06:21:26 +02:00
John Crispin
431ad6c09d ath11k-wifi: update CIG WF-188n BDF files
Signed-off-by: John Crispin <john@phrozen.org>
2024-06-20 11:43:15 +02:00
tanya.singh
276f039964 ipq53xx: Update board data file for EAP102 to support DFS channels correctly on India (IN) country code
Fixes: WIFI-13858
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-06-20 08:40:46 +02:00
John Crispin
962f84ca24 ucentral-schema: update to latest HEAD
83218cf use the correct path when removing old config files

Signed-off-by: John Crispin <john@phrozen.org>
2024-06-19 16:32:52 +02:00
John Crispin
10d8c47272 hostapd: drop wispr rate patch
this was breaking EAP-TTLS roaming

Signed-off-by: John Crispin <john@phrozen.org>
2024-06-19 13:54:58 +02:00
John Crispin
ad51d1788c hostapd: fix OWE vendor IE content
Signed-off-by: John Crispin <john@phrozen.org>
2024-06-18 13:09:37 +02:00
John Crispin
381265f8b3 ucentral-schema: update to latest HEAD
6e90f22 captive: fix NAT mode traffic capturing

Signed-off-by: John Crispin <john@phrozen.org>
2024-06-13 16:45:32 +02:00
John Crispin
1d106efd51 ath11k: fix multi band roaming
when roaming between 2 radios the following error messages would show up in the logs

[681066.503943] ath11k c000000.wifi: Failed to add peer: 38:f9:d3:bf:b2:d4 for VDEV: 1
[681066.503979] ath11k c000000.wifi: Failed to add station: 38:f9:d3:bf:b2:d4 for VDEV: 1

Signed-off-by: John Crispin <john@phrozen.org>
2024-06-13 08:23:05 +02:00
Hugo Yuan
bb7d78cd7d ipq50xx: fix typo in Makefile
Signed-off-by: Hugo Yuan <429632952@163.com>
2024-06-12 19:58:21 +02:00
John Crispin
f59883ec8e ucentral-schema: update to latest HEAD
857c3ba OWE: reorder config sections to ensure that the vendor IE gets populated with the correct SSID

Signed-off-by: John Crispin <john@phrozen.org>
2024-06-12 17:49:49 +02:00
John Crispin
ef0242c148 wireless-regdb: add DFS region for india
Signed-off-by: John Crispin <john@phrozen.org>
2024-06-12 14:48:21 +02:00
Felix Fietkau
0a758ca5fc mediatek-sdk: fix mt76 crash
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-06-12 14:47:14 +02:00
Felix Fietkau
9569b46398 ipq807x_v5.4: support sending FT refresh frames for switch learning tables
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-06-12 14:46:54 +02:00
John Crispin
2b536f9bdb captive: impove local mode /logoff support
Signed-off-by: John Crispin <john@phrozen.org>
2024-06-10 17:23:36 +02:00
John Crispin
95940b4fc7 ipq50xx: fix udaya a6-id2 image path
Signed-off-by: John Crispin <john@phrozen.org>
2024-06-10 13:14:44 +02:00
John Crispin
b5f0d205a3 ipq50xx: add LED support for udaya a6-id2
Signed-off-by: John Crispin <john@phrozen.org>
2024-06-10 08:59:47 +02:00
John Crispin
60a5609427 ucentral-schema: add more fingerprint sample config files
Signed-off-by: John Crispin <john@phrozen.org>
2024-06-10 08:26:36 +02:00
John Crispin
5784fbc9d0 ucentral-schema: update to latest HEAD
dcd571e allow only psc on 6GHz auto channel selection
310095a captive: handle /logoff and /logout paths
7aceedc ratelimit: reload the service rather than restarting it
ce41668 fingerprint: add missing allow_wan option to render code
721568b Merge pull request #17 from Telecominfraproject/WIFI-431-fix-update-internal-schema-validation
7d05e70 more AFC fixes

Signed-off-by: John Crispin <john@phrozen.org>
2024-06-10 06:11:00 +02:00
John Crispin
0037af2a6b afcd: allow starting the daemon without a CA
Signed-off-by: John Crispin <john@phrozen.org>
2024-06-10 06:08:30 +02:00
John Crispin
ed543017a3 ip807x: add missing yaml file for Udaya a6-id2
Signed-off-by: John Crispin <john@phrozen.org>
2024-06-10 06:07:53 +02:00
Arif Alam
5162c60dae hostapd: add config for acs to only pick psc in 6GHz band
Fixes WIFI-13750

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2024-06-10 06:06:36 +02:00
John Crispin
1ff690c3f7 captive: allow /login endpoint
Signed-off-by: John Crispin <john@phrozen.org>
2024-06-08 09:55:12 +02:00
John Crispin
e17c6e5918 uspot: add logoff/out support to local captive
Signed-off-by: John Crispin <john@phrozen.org>
2024-06-07 16:44:11 +02:00
John Crispin
4ca64012ef ipq50xx: add Udaya A6-ID2 support
Fixes: WIFI-13058
Signed-off-by: John Crispin <john@phrozen.org>
2024-06-07 11:57:35 +02:00
John Crispin
470983bba3 ratelimit: allow flushing all default values
Signed-off-by: John Crispin <john@phrozen.org>
2024-06-07 09:38:55 +02:00
John Crispin
5b168597de certificates: fix cert loading on dual boot EAP111
Signed-off-by: John Crispin <john@phrozen.org>
2024-06-07 07:22:29 +02:00
John Crispin
54072c22a4 ucentral-schema: update to latest HEAD
5226dc8 fix afc_op_class

Signed-off-by: John Crispin <john@phrozen.org>
2024-06-06 14:21:13 +02:00
John Crispin
82ef44048b afcd: do not require a CA
Signed-off-by: John Crispin <john@phrozen.org>
2024-06-06 14:20:42 +02:00
Tanya Singh
ce1590492c WIFI-13540: Update board data files for OAP101 model series
Signed-off-by: Tanya Singh <tanya.singh@4ipnet.com>
2024-06-04 19:09:32 +02:00
joydeepbenison
71252ca3ed WIFI-13428 : Fix traffic disruption for MPSK clients for yuncore_fap655,CIG_WF186w,EAP-104
Fixes WIFI-13428 : traffic disruption for FAP655,CIG_WF186w,EAP-104 for MPSK Clients when vlan id
of the lan port is modified . This Commit configures the dynamic vlans
on the switch of fap655 again after reset.

Signed-off-by: joydeepbenison <joydeep.ghosh@benisontech.com>
2024-06-04 19:09:14 +02:00
esha
ebb2d4df69 ipq60xx: Add support for HFCL ion4x_3
Signed-off-by: Esha Aggarwal <esha.aggarwal@hfcl.com>
2024-05-31 12:21:58 +02:00
John Crispin
5ee55fa1f9 ucentral-schema: update to latest HEAD
8045e6c add full fingerprinting data model

Signed-off-by: John Crispin <john@phrozen.org>
2024-05-31 12:13:43 +02:00
John Crispin
7fb9b5230c ucentral-client: update to latest HEAD
815ad09 add fingerprint command
2e88c13 do not immediatley reply to upgrade commands

Signed-off-by: John Crispin <john@phrozen.org>
2024-05-31 12:13:04 +02:00
John Crispin
4fb4a30910 ufpd: add fingerprint aging
Signed-off-by: John Crispin <john@phrozen.org>
2024-05-31 12:12:46 +02:00
John Crispin
cef663ab58 udevmand: automatically respawn the service
Signed-off-by: John Crispin <john@phrozen.org>
2024-05-29 17:59:20 +02:00
John Crispin
efbd084f57 mediatek: turn mtk_eth_soc into a late_init_call
Fixes: WIFI-13776
Signed-off-by: John Crispin <john@phrozen.org>
2024-05-27 13:36:52 +02:00
John Crispin
a72add7ec3 ucentral-schema: update to latest HEAD
409e444 Fix strict-forwarding for Yuncore_fap655
e5dc7ea add AFC support to the rendering code

Signed-off-by: John Crispin <john@phrozen.org>
2024-05-27 12:00:38 +02:00
John Crispin
bf95822a44 ipq807x: enable afc by default
Signed-off-by: John Crispin <john@phrozen.org>
2024-05-20 08:07:30 +02:00
Felix Fietkau
836a411d5d ipq807x_v5.4: afc support fixes
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-20 08:07:30 +02:00
Tanya Singh
675205a427 ipq807x: fix typo in profiles/edgecore_eap105.yml
Fixes: WIFI-13745
Signed-off-by: Tanya Singh <tanya.singh@accton.com>
2024-05-20 08:07:25 +02:00
John Crispin
759cd0774d ucentral-schema: update to latest HEAD
e1487e5 fix factory reset command.

Signed-off-by: John Crispin <john@phrozen.org>
2024-05-14 15:41:43 +02:00
John Crispin
5384751901 ucentral-schema: update to latest HEAD
79e1a9d explicitly set owe_transition_ssid in OWE transition mode

Fixes: WIFI-13676
Signed-off-by: John Crispin <john@phrozen.org>
2024-05-14 10:18:22 +02:00
Ken
a339935d1e ipq807x: CIG WF-186WH - BDF update for ath11k (US only)
CIG WF-196 - BDF update for ath11k (US/DE/MY)
CIG WF-188N - BDF update for ath11k (US/DE/MY)

Fixes: WIFI-13569
Fixes: WIFI-13570
Fixes: WIFI-13571
Signed-off-by: Ken <xshi@actiontec.com>
2024-05-14 09:37:28 +02:00
Ken
f6df594d64 ipq807x: CIG WF-196 - BDF update for ath11k (CA)
Fixes: WIFI-13642
Signed-off-by: Ken <xshi@actiontec.com>
2024-05-14 09:36:43 +02:00
John Crispin
9a3503f1df ucentral-schema: update to latest HEAD
a0a420f gracefully close the websocket during factory reset

Signed-off-by: John Crispin <john@phrozen.org>
2024-05-13 14:08:20 +02:00
John Crispin
a2724e8139 ipq807x: bring back the ubidetach -f patch
Fixes: WIFI-13681
Signed-off-by: John Crispin <john@phrozen.org>
2024-05-09 10:43:10 +02:00
John Crispin
c989866b08 ucentral-schema: update to latest HEAD
73c3d5d fix roaming auto mode

Signed-off-by: John Crispin <john@phrozen.org>
2024-05-09 10:10:24 +02:00
John Crispin
ba93041afc spotfilter: use ARP as fallback for IP discovery
Signed-off-by: John Crispin <john@phrozen.org>
2024-05-02 13:50:34 +02:00
John Crispin
37b234800c ubus: fix uc_ubus_have_uloop for eloop+uloop combination
Signed-off-by: John Crispin <john@phrozen.org>
2024-05-02 13:50:12 +02:00
Felix Fietkau
ae9d1b64c3 spotfilter: discover ip address via ARP
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 07:48:17 +02:00
John Crispin
de425e8f17 ipq807x: drop v4.4 kernel
Signed-off-by: John Crispin <john@phrozen.org>
2024-05-01 17:29:09 +02:00
Marek Kwaczynski
f74dd74cef hostapd: fix opclass during CSA with DFS channels
During CSA with DFS channels, disable, enable interface
is a part of the algorithm.
When interface was enabled old operating class before switch
and new channel were used causing mismatch in
configured_fixed_chan_to_freq function.

Example of log when switch from channel 157 to 108 was triggered:
"Could not convert op_class 124 channel 108 to operating frequency"

Fixes: WIFI-13385

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2024-04-30 18:02:23 +02:00
Marek Kwaczynski
b1474acf2f hostapd: ubus: add DFS channels support during CSA
Add options to trigger CSA with DFS channels, without
this patch ubus request was rejected:
ubus call hostapd.wlan0 switch_chan '{"freq":5260,"bcn_count":10}'
Command failed: Operation not supported

Fixes: WIFI-13385

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2024-04-30 18:02:13 +02:00
John Crispin
f4254b1611 ucentral-state: skip state messages when the AP is offline
Fixes: WIFI-13643
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-30 16:52:53 +02:00
John Crispin
fc32096ddf ucentral-state: update to latest HEAD
c24f1db captive: add nftables support
bda8143 captive: /tmp/ucentral/ was not being created correctly

Signed-off-by: John Crispin <john@phrozen.org>
2024-04-30 16:46:51 +02:00
John Crispin
32501705b4 mediatek: disable CONFIG_BRIDGE_NETFILTER
this fixes bridged wifi

Signed-off-by: John Crispin <john@phrozen.org>
2024-04-30 16:46:51 +02:00
John Crispin
a13d373edd bridger: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-30 16:46:51 +02:00
John Crispin
ae161bad8f treewide: fix base-files/* install
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-30 08:45:45 +02:00
Felix Fietkau
f6ea5dd273 ipq807x_5.4: fix hostapd ap+sta issue
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-04-29 17:35:36 +02:00
John Crispin
e56a53e541 mediatek: update to mp2.3 SDK
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-29 11:19:26 +02:00
John Crispin
3823f267d7 ipq807x: move v4.4 patches into platform directory
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
99e9fe5d8d ucentral-schema: update to latest HEAD
a7cff0c set v3.1.0 version

Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
cc8a036d87 ucentral-client: set v3.1.0 version
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
d329e3a9ca patches/: re-order and fold patches
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
f3086ab528 ipq53xx: apply patch dir fixes
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
6d785c9f78 ipq53xx: move uboot-envtool support into the platform folder
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
ec808b0c4a patches: drop another patch that is no longer needed
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
20ae6e18ca patches: drop unused patches
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
6e2893cc44 profiles: drop unused profiles
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
5ee5e6dd85 profiles: remove legacy profiles
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
b29802c8be ipq807x_5.4: cleanup include/target.mk integration
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
bb6b882a44 kernel-5.4: consolidate checksum patches
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
dcc5e96690 ipq40xx: cleanup backport patches
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
034481d063 include/target: allow placing generic patch folders into the platrom directory
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
9e5327ca38 ucentral-schema: update to latest HEAD
ed08058 properly setup up/down macs

Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
d779808f88 hostapd: backport get_sta_ies
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
aa293e250e hostapd: enable OWE
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
6205d7a6a9 ufp: allow filtering by minimum age
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
a110e46fcc ufp: properly track assoc IEs
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
e87e017ada mediatek: drop hostapd patches for now
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
1e7cf483a4 mediatek-sdk: update to latest SDK kernel
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 16:15:25 +02:00
John Crispin
1e3c449235 mediatek: drop 5.15 eap111 support
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 13:09:13 +02:00
John Crispin
e1e33dd8ed ucentral-schema: update to latest HEAD
3a34665 delete old config files after applying a new one

Fixes: WIFI-13590
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-27 13:09:02 +02:00
John Crispin
84dbda52c4 ipq53xx: add Edgecore EAP105 support
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-20 14:04:46 +02:00
John Crispin
4dcc4edfcd packages: update various packages
this is required by for the AFC feature

Signed-off-by: John Crispin <john@phrozen.org>
2024-04-20 11:46:03 +02:00
Felix Fietkau
49560ef3d3 ipq807x_v5.4: backport AFC support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-04-20 11:44:38 +02:00
John Crispin
3ca02ca424 uboot-envtools: add ipq53xx support
Fixes: WIFI-13568
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-20 11:41:36 +02:00
Ken
934817e1bb ipq807x: CIG WF-188N - BDF update for ath11k (CA)
dbd285f484b84c15e7adc4ddb1528f4e  feeds/ipq807x_v5.4/ath11k-wifi/board-cig-wf188n-ca.bin.IPQ6018

Fixes: WIFI-13595
Signed-off-by: Ken <xshi@actiontec.com>
2024-04-20 11:24:31 +02:00
Arif Alam
9e2a07402c wf188n: fixup eth0/eth1 mac
Fixes WIFI-13594

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2024-04-20 11:22:44 +02:00
John Crispin
ffb843b486 Revert "hostapd: ubus: add DFS channels support during CSA"
This reverts commit 4b5eeb48cc.
2024-04-13 07:56:38 +02:00
John Crispin
741f7a299a Revert "hostapd: fix opclass during CSA with DFS channels"
This reverts commit 5c37272cd6.
2024-04-13 07:56:36 +02:00
Marek Kwaczynski
5c37272cd6 hostapd: fix opclass during CSA with DFS channels
During CSA with DFS channels, disable, enable interface
is a part of the algorithm.
When interface was enabled old operating class before switch
and new channel were used causing mismatch in
configured_fixed_chan_to_freq function.

Example of log when switch from channel 157 to 108 was triggered:
"Could not convert op_class 124 channel 108 to operating frequency"

Fixes: WIFI-13385

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2024-04-12 17:55:50 +02:00
Marek Kwaczynski
4b5eeb48cc hostapd: ubus: add DFS channels support during CSA
Add options to trigger CSA with DFS channels, without
this patch ubus request was rejected:
ubus call hostapd.wlan0 switch_chan '{"freq":5260,"bcn_count":10}'
Command failed: Operation not supported

Fixes: WIFI-13385

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2024-04-12 17:55:50 +02:00
Marek Kwaczynski
1ca8f18b9d udevstats: fix adding the same vlans to the config
Add filtering the same vlans before adding to
the vlan config. The issue was detected during
connection many WiFi client using dynamic vlans
on the network.

Fixes: WIFI-13538

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2024-04-12 17:55:36 +02:00
John Crispin
856ac16e86 ucentral-schema: update to latest HEAD
cc0bf95 fix un-tagged swconfig upstream ports

Signed-off-by: John Crispin <john@phrozen.org>
2024-04-12 15:17:38 +02:00
Arif Alam
cc3906e550 ratelimit: notify ratelimit on vlan remove
Fixes WIFI-13560

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2024-04-10 18:04:53 +02:00
John Crispin
6b3eb3ef99 ucentral-schema: update to latest HEAD
b81c129 Revert "do not add a default valid channels list"

Fixes: WIFI-13575
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-10 14:49:24 +02:00
John Crispin
bc6da62f1b ucentral-schema: update to latest HEAD
a3b7e31 add the option for providing vendor specific versioning info

Signed-off-by: John Crispin <john@phrozen.org>
2024-04-09 16:22:52 +02:00
John Crispin
0eeb14d4d1 ucentral-client: add version.json
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-09 16:14:15 +02:00
John Crispin
8a43d39572 ucentral-schema: update to latest HEAD
377c2ab add ap/schema version to capabilities

Signed-off-by: John Crispin <john@phrozen.org>
2024-04-09 08:59:44 +02:00
John Crispin
9a80d8b1de Revert "ucentral-client: update to latest HEAD"
This reverts commit 98ef44fc34.

Signed-off-by: John Crispin <john@phrozen.org>
2024-04-09 08:58:57 +02:00
John Crispin
c22767540e uspot: auto delete radius files from /tmp
Fixes: WIFI-13547
Signed-off-by: John Crispin <john@phrozen.org>
2024-04-05 16:42:55 +02:00
Arif Alam
dff6a6e3d8 ipq807x: oap101-6e: fix BSSIDs
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2024-04-04 11:18:30 +02:00
Arif Alam
a7c9a5f780 hostapd: WISPr bandwidth for psk2-radius
Get bandwidth limits from WISPr RADIUS AVPs for RADIUS ACL.

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2024-04-03 11:34:36 +02:00
Arif Alam
f8eca25f7e base-files/ipq807x: wf196: fixup eth0/eth1 mac
Fixes WIFI-13561

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2024-04-03 11:34:08 +02:00
Rick Sommerville
be59b10acc bridger: block forward to same ifindex/vlan
Fixes WIFI-13482

Signed-off-by: Rick Sommerville <rick.sommerville@netexperience.com>
2024-04-03 11:33:32 +02:00
Arif Alam
1ec29f6705 Fix psk2-radius feature
Add psk2-radius functionality in hostapd and fix config via netifd.

Fixes WIFI-13183
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2024-03-25 15:57:26 +01:00
John Crispin
3ae0a1f1d5 ipq95xx: add FTM support
Fixes: WIFI-13546
Signed-off-by: John Crispin <john@phrozen.org>
2024-03-25 15:56:50 +01:00
John Crispin
f362b7139e ucentral-schema: update to latest HEAD
cb1c18d add support for device fingerprinting

Fixes: WIFI-13429
Signed-off-by: John Crispin <john@phrozen.org>
2024-03-25 15:56:42 +01:00
John Crispin
bdd2074d78 ufp: fix package dependencies
Fixes: WIFI-13429
Signed-off-by: John Crispin <john@phrozen.org>
2024-03-25 15:56:16 +01:00
John Crispin
98ef44fc34 ucentral-client: update to latest HEAD
7628b5c add schema version to connect message

Fixes: WIFI-13548
Signed-off-by: John Crispin <john@phrozen.org>
2024-03-25 15:56:12 +01:00
Arif Alam
9bb982460a Add ufp
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2024-03-22 07:29:59 +01:00
Arif Alam
22126a3410 ratelimit: fix ratelimit with dynamic vlan
Fixes WIFI-13512

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2024-03-22 07:06:21 +01:00
Tanya Singh
0412bf03eb treewide: Fix dual boot fw upgrade for Edgecore APs
Fixes: WIFI-13497
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-03-21 08:25:42 +01:00
John Crispin
afcffbc418 ucentral-schema: update to latest HEAD
da09093 fix bss color handling

Signed-off-by: John Crispin <john@phrozen.org>
2024-03-14 08:16:48 +01:00
John Crispin
c29c179b9e .github: fix CIG WF-189 CI build
Signed-off-by: John Crispin <john@phrozen.org>
2024-03-10 12:36:31 +01:00
wingate5678
36c4008c68 ipq8074: cybertan eww631 a1/b1 - support v5.4
Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
2024-03-10 08:26:46 +01:00
John Crispin
07f5deefce ipq53xx: rename wf198->wf189
Signed-off-by: John Crispin <john@phrozen.org>
2024-03-08 09:23:18 +01:00
John Crispin
0d21a66d0a ipq95xx: fix mac80211 loop dependency
This broke CI builds.

Signed-off-by: John Crispin <john@phrozen.org>
2024-03-06 14:13:08 +01:00
Arif Alam
206b4348fc ath11k: add support to set txpower for 6GHz via iw
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2024-03-05 07:30:11 +01:00
John Crispin
f0c34c39da .github/: add wifi-7 boards to CI
Signed-off-by: John Crispin <john@phrozen.org>
2024-03-04 15:08:17 +01:00
John Crispin
b85b388eb5 ipq95xx: make the ucentral-schema data model work
Signed-off-by: John Crispin <john@phrozen.org>
2024-03-04 14:57:58 +01:00
John Crispin
556f8880bc ipq95xx: fix kernel download hash
Signed-off-by: John Crispin <john@phrozen.org>
2024-03-01 09:54:12 +01:00
tip-admin
bf2ca9a9e4 Create LICENSE 2024-02-29 08:48:14 -08:00
Tanya Singh
b24846cce3 mediatek: Update edgecore eap111 dts file to fix eth0 and eth1 MAC addr assignment
Fixes: WIFI-13253
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-02-29 08:49:47 +01:00
John Crispin
4bcc60934e rrmd: fix CSA on 6G channels
Fixes: WIFI-13384
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-29 07:28:13 +01:00
John Crispin
2b4fd7911a ipq807x: cybertan_eww631-b1: Fix LED control
Define the blue sys LED from the device tree as the POWER LED for the
CyberTAN EWW631-B1 platform. This allows LED control through uCentral
Signed-off-by: Paul White <paul@shasta.cloud>

Fixes: WIFI-13435
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-29 07:28:13 +01:00
John Crispin
7b0f05d11b CI: add cig_wf198.yml
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-29 07:28:13 +01:00
John Crispin
af4c7e4ce5 ucentral-schema: update to latest HEAD
e3d9064 captive: fix custom webroot config

Signed-off-by: John Crispin <john@phrozen.org>
2024-02-28 18:56:22 +01:00
Tanya Singh
bfeea74870 WIFI-13437: Update edgecore eap111 dts file to fix the model name to "EdgeCore EAP111"
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-02-28 18:56:22 +01:00
HaiBac
3b5f90b339 ipq807x: v5.4: add Wallys DR6018-V4 support
Signed-off-by: HaiBac <mail@bacnh.com>
2024-02-28 18:56:21 +01:00
John Crispin
8870e802a7 ipq807x: add sercomm ap72tip profile
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-28 18:56:21 +01:00
John Crispin
775af3700f ipq95xx: more fixes
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-28 18:56:21 +01:00
John Crispin
c95b91c399 ipq95xx: various updates
* finalize CIG WF198 support
* add Sercomm AP72tip support
* update BDF files
* improve firmware package

Signed-off-by: John Crispin <john@phrozen.org>
2024-02-28 18:56:21 +01:00
John Crispin
460050a114 ipq50xx: add CIF WF-198 support
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-28 18:56:21 +01:00
John Crispin
01adebbd6f ipq9574: update kernel/drivers to ath12.3-cs
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-28 18:56:21 +01:00
John Crispin
dcdbb4f091 ipq95xx/hostapd: update to ath12.3-cs
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-28 18:56:21 +01:00
John Crispin
144c5d00f4 ipq95xx/mac80211: update to ATH12.3-CS
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-28 18:56:21 +01:00
John Crispin
2826c6d487 ipq807x: unify US/CA image for CIG WF196
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-28 18:56:21 +01:00
John Crispin
367415663f cfg80211: pass default country code to cfg80211 during module load
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-28 18:56:21 +01:00
John Crispin
3ce4088499 ipq60xx: unify wf188n profile
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-28 18:56:21 +01:00
John Crispin
37f1ef534e ipq807x: use v5.4 kernel on fap655
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-22 16:12:12 +01:00
John Crispin
1142deb3d0 ucentral-schema: update to latest HEAD
a3ea74a Provide Input Validation for Romaing Mobility Domain

Signed-off-by: John Crispin <john@phrozen.org>
2024-02-19 14:18:14 +01:00
Piotr Dymacz
922067a652 feeds: mcu: umcumgr: update to latest HEAD
6704b5b83e9d smp: fix minor spelling typos
a0c5a18fa2a5 zcbor: upgrade zcbor to 0.7.0
52aee9047ec2 zcbor/smp: replace auto-generated code with zcbor functions
09606bc8e449 smp: print {en,de}code error with 'zcbor_peek_error'
b91c19ef5106 umcumgr/smp: allow disabling 'confirm' and 'test' commands
5849f7a503cd smp: restore timeout value for select()
45d9523c0c13 umcumgr: use 'stderr' for 'usage' only if error occurred
28d0044ab5b3 umcumgr: introduce support for TI serial bootloader
db34a3645b21 umcumgr: add support for 'dump' in TI serial bootloader mode
df3f235bcb3c smp: fix images list print
bde8686bac61 zcbor: upgrade zcbor to 0.8.1
ed34b2816f2b smp: adapt to changes introduced in zcbor 0.8.0

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2024-02-15 06:47:12 +01:00
Piotr Dymacz
62b9c6e257 ipq807x: v5.4: {e,o}ap102: export MCU and USB related pins
This exports MCU/USB related pins in sysfs using 'gpio-export' on the
EdgeCore {E,O}AP102 boards as:
- mcu-enable
- usb-rear-power
- usb-side-power
- usb-hub-enable

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2024-02-15 06:46:55 +01:00
Piotr Dymacz
63dd51cbc4 ipq807x: v5.4: {e,o}ap102: add pin configs for USB and MCU
This adds configuration for pins connected with nRF52840 MCU (reset and
one apparently used by device vendor for DTM enable) and related to USB
(GL850G HUB reset and rear/side ports power) on the EdgeCore {E,O}AP102.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2024-02-15 06:46:42 +01:00
Piotr Dymacz
80c55c2d82 ipq807x: v5.4: tidy up EdgeCore {E,O}AP102 DTS files
This change focuses on the I/O related cleanups for EdgeCore {E,O}AP102
DTS files. List of changes:

1. Remove 'usb_mux_sel' pinctrl mux
   Defined label isn't used as reference in any other node and defined
   GPIO isn't used as well.

2. Remove 'pci@20000000', related PHY and pinctrl mux nodes
   {E,O}AP102 doesn't use of any of the IPQ8071A PCIe buses.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2024-02-15 06:46:32 +01:00
Piotr Dymacz
4e2b42e95a ipq807x: v5.4: wf196: export MCU reset pin
This exports MCU reset pin as 'mcu-enable' in sysfs with 'gpio-export'.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2024-02-15 06:46:21 +01:00
Piotr Dymacz
1949f602bf ipq807x: v5.4: wf196: add pin config for MCU reset
This adds config for nRF52833 MCU reset pin on the CIG WF196.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2024-02-15 06:46:11 +01:00
Piotr Dymacz
84f86bfc98 ipq807x: v5.4: wf196: enable and add pin config for MCU UART
This was lost during kernel v4.4 to v5.4 migration. Bring back correct
pin configuration (only 2-pin) and UART node used by the on-board MCU.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2024-02-15 06:45:49 +01:00
John Crispin
ed9d29fb03 ucentral-schema: update to latest HEAD
fda6ded fix tracking of upstream swconfig vlans

Fixes: WIFI-13316
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-08 06:04:09 +01:00
John Crispin
c587a12ee5 ipq807x: fix typo when loading ath11k-macs
Fixes: WIFI-13368
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-08 06:03:33 +01:00
John Crispin
2197badcde ipq807x: make FTM work
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-06 14:56:25 +01:00
Arif Alam
84c8eb5ccf base-files/ipq807x: wf196: fix BSSIDs
Use base MAC address to generate PHY BSSIDs.

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2024-02-06 10:27:44 +01:00
Paul White
16ebb7cec3 eap-104: fix dualboot: reset bootcount
The bootcount wasn't getting reset to 0 upon a successful boot,
resulting in falling back to the previous firmware version after three
reboots of the AP.

Fixes: WIFI-13359
Signed-off-by: Paul White <paul@shasta.cloud>
2024-02-06 10:26:52 +01:00
Paul White
75a51e3cd9 ucentral-event: fix 802.1x with dynamic VLAN
This adds a workaround to fix an issue with 802.1x + DVLANs on platforms
where LAN ports are through an integrated switch (swconfig).

Netifd is tracking the wired ports as part of a bridge-vlan: either a
static one, or 4090 for the default untagged bridge.  When hostapd
authorizes the wired port, netifd is automatically adding this bridge
vlan as PVID untagged to the port.  The vlan_add event then adds the
dynamic VLAN as untagged to the same port.  The result is that the
port is operating on the PVID bridge vlan, and not the dynamic VLAN.
Fixing this in netifd is going to be complex and take time, so this
change includes a workaround.   When a wired client is authorized
using a dynamic VLAN, ucentral-event takes the following actions:
   - Remove the bridge VLAN from the port
       bridge vlan del dev <port> vid <bridge-vlan>
   - Modify the dynamic VLAN to PVID
       bridge vlan add dev <port> vid <dynamic-vlan> pvid untagged

Fixes: WIFI-13358
Signed-off-by: Paul White <paul@shasta.cloud>
2024-02-06 10:25:02 +01:00
Paul White
832fbb8898 hostapd: include vlan_id in sta-authorized event
There are use cases where it's helpful to know the vlan_id assigned to a
client (dynamic VLAN) when consuming the sta-authorized ubus event

Signed-off-by: Paul White <paul@shasta.cloud>
2024-02-06 10:25:02 +01:00
Paul White
4d2603b4ce ucentral-event: Add DVLAN uplink to dhcpsnoop
When an uplink interface is created for a DVLAN due to swconfig support,
add this new interface to dhcpsnoop

Signed-off-by: Paul White <paul@shasta.cloud>
2024-02-06 10:24:21 +01:00
Paul White
6fc396682c udhcpsnoop: added ubus 'add_devices' command
Added the new ubus command 'add_devices' which takes the same devies
JSON schema data as the 'config' command does.   This is needed, for
example, to add dynamic VLAN uplink devices once they are created

Signed-off-by: Paul White <paul@shasta.cloud>
2024-02-06 10:24:21 +01:00
John Crispin
d5ffdffd8c ucentral-state: with swconfig dvlan/local break-out mode
Fixes: WIFI-13316
Signed-off-by: John Crispin <john@phrozen.org>
2024-01-23 17:27:49 +01:00
John Crispin
a14df28bd6 rstrip.sh: do not strip FW binaries
Signed-off-by: John Crispin <john@phrozen.org>
2024-01-23 17:27:49 +01:00
Paul White
25bec55d4a cybertan_eww631-b1: Fix LAN port mappings
The LAN port mappings were reversed, causing the port with LAN1 label to
be reported as LAN3 in uCentral

Signed-off-by: Paul White <paul@shasta.cloud>
2024-01-23 17:27:49 +01:00
John Crispin
575686449a ucentral-schema: update to latest HEAD
3093a56 track upstream vlans created by swconfig
605ed2f bridge-vlan: add wan port only behind swconfig
bfd4a07 Fix state/interface.ssid.yml

Fixes: WIFI-13316
Signed-off-by: John Crispin <john@phrozen.org>
2024-01-23 17:27:49 +01:00
Kishan Shukla
a849ad6e39 ath11k-wifi: update HFCL ION4xe BDF file
Fixes: WIFI-13250
Signed-off-by: Kishan Shukla <kishan.shukla@hfcl.com>
2024-01-23 17:27:49 +01:00
John Crispin
de834a7d07 ramips: reduce yuncore ax820 SPI clock speed to 20MHz
Signed-off-by: John Crispin <john@phrozen.org>
2024-01-23 17:27:49 +01:00
John Crispin
d8fd2b8f39 rrmd: do not automatically trigger beacon reports when a station joins
Signed-off-by: John Crispin <john@phrozen.org>
2024-01-23 17:27:49 +01:00
John Crispin
e1745cae9b netifd: only reload swconfig if something changed
Fixes: WIFI-13251
Signed-off-by: John Crispin <john@phrozen.org>
2024-01-23 17:27:49 +01:00
John Crispin
bfa3b829ee ipq50xx: fix yuncore fap655 switch reset GPIO on v5.4 kernel
Signed-off-by: John Crispin <john@phrozen.org>
2024-01-23 17:27:49 +01:00
John Crispin
91dacf0e93 ucentral-state: minor rework of the offline_timer
Fixes: WIFI-12974
Signed-off-by: John Crispin <john@phrozen.org>
2024-01-23 17:27:49 +01:00
John Crispin
c0dcc4aea2 ucentral-schema: update to latest HEAD
ecc742a allow sending multiple DNS servers to dhcp clients
70bd716 move switch-vlan generation to brige-vlan

Fixes: WIFI-13278
Signed-off-by: John Crispin <john@phrozen.org>
2024-01-23 17:27:49 +01:00
John Crispin
c97ac2da72 ipq807x_v5.4: enable dual boot support
the V54. kernel port was missing the BOOTCONFIG module

Fixes: WIFI-13279
Signed-off-by: John Crispin <john@phrozen.org>
2024-01-23 17:27:49 +01:00
John Crispin
f21fa9ab80 hostapd: add missing NULL pointer check on radar notification
Fixes: WIFI-13266
Fixes: WIFI-13265
Signed-off-by: John Crispin <john@phrozen.org>
2024-01-23 17:27:49 +01:00
Felix Fietkau
9305bc609b ipq807x_v5.4: fix ath11k crash on invalid band with legacy rates
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-01-23 17:27:49 +01:00
John Crispin
6d81e1e587 ucentral-client: update to latest HEAD
f19b1e8 add support for the "fixedconfig" command
ca090c4 add default settings section to connect message

Signed-off-by: John Crispin <john@phrozen.org>
2024-01-23 17:27:49 +01:00
John Crispin
0c55b1f97a ucentral-schema: update to latest HEAD
c544ab0 state: ignore non connected thermal zones

Fixes: WIFI-13274
Signed-off-by: John Crispin <john@phrozen.org>
2024-01-23 17:27:49 +01:00
John Crispin
d3a4a73c15 ucentral-event: apply ratelimit to captive portal interfaces
Fixes: WIFI-1324
Signed-off-by: John Crispin <john@phrozen.org>
2023-12-19 16:58:10 +01:00
John Crispin
73cb19e2be ath11k-wifi: update Yuncore FAP655 BDF files
Fixes: WIFI-13244
Signed-off-by: John Crispin <john@phrozen.org>
2023-12-19 16:57:42 +01:00
John Crispin
9e5d1ae848 ip807x: backport bridge port forwarding patch
Fixes: WIFI-13234
Signed-off-by: John Crispin <john@phrozen.org>
2023-12-15 15:04:07 +01:00
John Crispin
01240ada80 ucentral-schema: update to latest HEAD
e77cd3f radio: force auto channel if a STA is present

Signed-off-by: John Crispin <john@phrozen.org>
2023-12-14 12:14:32 +01:00
John Crispin
7fae3ebb90 ucentral-schema: update to latest HEAD
fd4d755 only check for port usage duplication on non-swconfig devices

Signed-off-by: John Crispin <john@phrozen.org>
2023-12-13 15:31:24 +01:00
John Crispin
00efc6f224 uspot: terminate ACCT sessions upon logoff request
Signed-off-by: John Crispin <john@phrozen.org>
2023-12-13 10:57:35 +01:00
John Crispin
5bf9d31001 ucentral-schema: update to latest HEAD
e2cef05 return a success message before triggering FW upgrade

Signed-off-by: John Crispin <john@phrozen.org>
2023-12-13 10:07:12 +01:00
John Crispin
118dd7d224 ucentral-client: upgrade to latest HEAD
6ca7b2e do not immediatley reply to upgrade commands

Signed-off-by: John Crispin <john@phrozen.org>
2023-12-13 10:06:40 +01:00
John Crispin
559e67036d ucentral-schema: update to latest HEAD
9338ea9 bridge-vlan: track wan ports behind swconfig

Signed-off-by: John Crispin <john@phrozen.org>
2023-12-12 15:26:45 +01:00
John Crispin
c66a1f1fa6 ipq50xx: fix cig wf186h image path
Signed-off-by: John Crispin <john@phrozen.org>
2023-12-11 07:37:13 +01:00
John Crispin
9b77fb297c ipq807x: use US country code as default on wf196
Signed-off-by: John Crispin <john@phrozen.org>
2023-12-11 07:37:13 +01:00
John Crispin
95dae95031 ipq50xx: Add wf186h to CI builds
Signed-off-by: John Crispin <john@phrozen.org>
2023-12-11 07:37:13 +01:00
Arif Alam
a29aadbc90 uspot: fix uam CHAP password and challenge
Add missing last byte in uam CHAP password and challenge

Fixes WIFI-13178

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2023-12-11 07:37:13 +01:00
OutBack Dingo
753967bf6b ipq807x: remove all Xu related and add OptimCloud support
Signed-off-by: OutBack Dingo <outbackdingo@gmail.com>
2023-12-11 07:37:13 +01:00
John Crispin
9a9f9e1cb9 ucentral-state: reuse timers
Signed-off-by: John Crispin <john@phrozen.org>
2023-12-11 07:37:13 +01:00
Ken
4db54ce3d9 ipq50xx: CIG-WF-186W - LEDs are not configurable
Signed-off-by: Ken <xshi@actiontec.com>
2023-12-11 07:37:13 +01:00
Ken
f7f913ab14 ipq50xx: CIG-WF-186W - LEDs are not configurable
Signed-off-by: Ken <xshi@actiontec.com>
2023-12-11 07:37:13 +01:00
John Crispin
6d4788c26f ucentral-state: properly track online state
Signed-off-by: John Crispin <john@phrozen.org>
2023-12-11 07:37:13 +01:00
John Crispin
6872bd6964 ucentral-schema: fix stray character in the default config
Signed-off-by: John Crispin <john@phrozen.org>
2023-12-11 07:37:13 +01:00
John Crispin
a4a9a7692c netifd: fix vlan-awareness reload
Signed-off-by: John Crispin <john@phrozen.org>
2023-12-11 07:37:13 +01:00
John Crispin
c22ad0089c ramips: add yuncore_ax820.yml to CI
Signed-off-by: John Crispin <john@phrozen.org>
2023-12-11 07:37:13 +01:00
Esha Aggarwal
14c6a1a482 ipq50xx: HFCL-ion4x_w Kernel/Firmware upgrade
Fixes: WIFI-13048
Signed-off-by: Esha Aggarwal <esha.aggarwal@hfcl.com>
2023-12-11 07:37:11 +01:00
Esha Aggarwal
984faeae9a ipq60xx: HFCL-ion4x Kernel/Firmware upgrade
Fixes: WIFI-13051
Signed-off-by: Esha Aggarwal <esha.aggarwal@hfcl.com>
2023-12-11 07:37:06 +01:00
Esha Aggarwal
c98c7edc6a ipq60xx: HFCL-ion4x_2 Kernel/Firmware upgrade
Fixes: WIFI-13193
Signed-off-by: Esha Aggarwal <esha.aggarwal@hfcl.com>
2023-12-11 07:37:03 +01:00
Esha Aggarwal
e8b3a76fd9 ipq60xx: HFCL-ion4xi Kernel/Firmware upgrade
Fixes: WIFI-13053
Signed-off-by: Esha Aggarwal <esha.aggarwal@hfcl.com>
2023-12-11 07:36:58 +01:00
Esha Aggarwal
140d8ba1e6 ipq60xx: HFCL-ion4xe Kernel/Firmware upgrade
Fixes: WIFI-13052
Signed-off-by: Esha Aggarwal <esha.aggarwal@hfcl.com>
2023-12-11 07:36:48 +01:00
John Crispin
c4bdf03787 hostapd: fix wpa3 regression
Signed-off-by: John Crispin <john@phrozen.org>
2023-12-01 11:50:25 +01:00
John Crispin
371b287db4 ucentral-schema: update to latest HEAD
75222fe udevstats: fix UCI generation for swconfig ports

Signed-off-by: John Crispin <john@phrozen.org>
2023-12-01 09:59:15 +01:00
John Crispin
3ed959bf25 ipq807x: revert yuncore fap655 back to v4.4 kernel
the BDF is too old to make DFS channels work

Signed-off-by: John Crispin <john@phrozen.org>
2023-12-01 09:56:40 +01:00
HaiBac
0e077cf39a ipq807x: add support for OptimCloud D series
Since QC only supports IPQ5018 + QCN9000 combination perfectly in kernel
4.4, thus remove OptimCloud D series support in ipq807x_v5.4 and migrate
  to ipq807x

Signed-off-by: HaiBac <mail@bacnh.com>
2023-12-01 09:06:10 +01:00
John Crispin
ef0d3c6fdd ipq50xx: fix uncore fap655 base mac
Signed-off-by: John Crispin <john@phrozen.org>
2023-12-01 09:06:10 +01:00
John Crispin
5ca04b5fb8 ipq50xx: fix 5G wifi on yuncore fap655
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-30 12:10:29 +01:00
John Crispin
98453fce9b ath79: fix indio um-305ac compile
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-26 16:53:10 +01:00
John Crispin
f6d6341ba0 ipq807x: fix CIG profile names
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-25 09:45:22 +01:00
John Crispin
1e844e2668 ipq807x: enable CIG wf188/196 for RC1
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-24 19:06:22 +01:00
John Crispin
7fa9861cfc ipq807x: update several image paths
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-24 09:31:23 +01:00
John Crispin
6500b62920 hostapd: always create a dummy psk file
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-24 09:24:31 +01:00
John Crispin
9423f9d6ab ipq8074: make the v5.4 profile default for supported boards
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-24 06:15:24 +01:00
John Crispin
75374d2765 hostapd: fix dynamic_vlan
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-22 18:37:43 +01:00
jaspreetsachdev
c8c5f14071 Update build-dev.yml 2023-11-22 14:11:52 +01:00
jaspreetsachdev
f12bbe2cac Update build-dev.yml 2023-11-22 14:11:52 +01:00
Piotr Dymacz
2ed8df9b10 ipq807x: v5.4: eap104: export MCU related pins
Export MCU related 'reset' and 'serial bootloader' pins in sysfs using
'gpio-export' as 'mcu-enable' and 'mcu-bootloader'.

Default configuration of MCU related pins will keep MCU in reset state,
with the serial bootloader enabled.

While at it, fix also trailing white space error in 'gpio_keys' node.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-11-22 13:17:22 +01:00
Piotr Dymacz
85374fbbe6 ipq807x: v5.4: eap104: add pin configs for MCU
This adds configuration for 'reset' and 'serial bootloader' dedicated
pins connected to the on-board CC2652R MCU.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-11-22 13:17:22 +01:00
Piotr Dymacz
4348221b62 ipq807x: v5.4: eap104: fix I2C interface pin configuration
Use correct (taken from 4.4 based sources) pin and bus numbers for the
I2C interface.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-11-22 13:17:22 +01:00
Piotr Dymacz
0036dba689 ipq807x: v5.4: eap104: drop unused audio related nodes
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-11-22 13:17:22 +01:00
Piotr Dymacz
c1a1c21643 ipq807x: v5.4: eap104: enable 'blsp1_uart2'
The 'blsp1_uart2' interface is connected with the on-board MCU.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-11-22 13:17:22 +01:00
Piotr Dymacz
4c495e7be2 ipq807x: eap104: export MCU related pins
Export MCU related 'reset' and 'serial bootloader' pins in sysfs using
'gpio-export' as 'mcu-enable' and 'mcu-bootloader'.

Default configuration of MCU related pins will keep MCU in reset state,
with the serial bootloader enabled.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-11-22 13:17:22 +01:00
Piotr Dymacz
42239fb1ba ipq807x: eap104: add pin configs for MCU
This adds configuration for 'reset' and 'serial bootloader' dedicated
pins connected to the on-board CC2652R MCU. While at it, drop probably
unused 'ble_coex_grant' pin configuration node.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-11-22 13:17:22 +01:00
Scott V. Kamp
89766b187d ipq807x: remove XU series
Signed-off-by: Scott V. Kamp <scott.kamp@optimcloud.com>
2023-11-22 13:16:42 +01:00
John Crispin
eaa9e8585d netifd: backport bridge_isolate patches
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-22 12:17:32 +01:00
John Crispin
89b3f9c6a9 ucentral-schema: update to latest HEAD
f8608f6 enable bridge port isolation for wifi devices

Signed-off-by: John Crispin <john@phrozen.org>
2023-11-22 12:16:15 +01:00
John Crispin
ecfaf9a263 ucentral-state: fix periodic interval on v4.4 kernel
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-22 06:55:43 +01:00
John Crispin
5d43925874 mediatek: fix mac addr assignment on eap111
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-21 14:57:25 +01:00
John Crispin
d2af552c5a rrmd: make the global_ban option default:true
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-20 14:09:48 +01:00
John Crispin
b60c18ea3d hostapd: add back the wds 4aadr mode hack
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-20 11:53:56 +01:00
John Crispin
2e3de0eb66 hostapd: sync built-in version
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-20 08:34:25 +01:00
John Crispin
49dcafdbff ucode: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-20 08:32:58 +01:00
John Crispin
3beecaa683 libubox: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-20 08:32:46 +01:00
John Crispin
5240ac395f hostapd: fix wpa3 modes
the latest netifd update sets auth_type differently. adapt hostapd.sh for this.

Signed-off-by: John Crispin <john@phrozen.org>
2023-11-17 16:48:42 +01:00
John Crispin
56e0b3b50c hostapd: globally ban clients when they are kicked
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-17 08:54:26 +01:00
John Crispin
daf67c582f ucentral-state: trigger state and health using the new uloop.interval API
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-16 16:33:41 +01:00
John Crispin
dfbbb01ea9 ipq50xx: update the ath11k-macs patch
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-16 09:05:59 +01:00
John Crispin
b4faeefc29 ucentral-schema: update to latest HEAD
29d6715 make it possible to set vlan_awareness for STA interfaces

Signed-off-by: John Crispin <john@phrozen.org>
2023-11-15 15:59:27 +01:00
John Crispin
2416019d87 mac80211: apply wds fix
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-15 11:23:24 +01:00
John Crispin
d3c0df1a4f netifd: update to latest HEAD
fixes various STA issues

Signed-off-by: John Crispin <john@phrozen.org>
2023-11-15 11:22:33 +01:00
John Crispin
009c003b48 mediatek: add factory image support for eap111
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-14 16:55:16 +01:00
John Crispin
8f7369a71c rrmd: allow kicking clients globally of from the AP
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-14 16:54:09 +01:00
John Crispin
78eb88ed26 ucentral-schema: update to latest HEAD
950bd83 fix NTP enable logic

Signed-off-by: John Crispin <john@phrozen.org>
2023-11-14 15:58:31 +01:00
John Crispin
a48e7ce72e ucentral-schema: update to latest HEAD
b6da915 make interface.isolate-hosts imply bridge port and ap isolation

Signed-off-by: John Crispin <john@phrozen.org>
2023-11-14 12:33:56 +01:00
HaiBac
d804a61cd6 ipq50xx: add optimcloud D series support
Signed-off-by: HaiBac <mail@bacnh.com>
2023-11-14 11:09:27 +01:00
John Crispin
04f10325a1 switch-fabric: fix port mirroring
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-14 11:08:19 +01:00
John Crispin
2f5b612837 busybox: fix udhcpc endless loop
if the interface is down due to ip-collide detection, config apply
fail as the dnsmasq init script would loop endlessly.

Signed-off-by: John Crispin <john@phrozen.org>
2023-11-09 12:30:29 +01:00
John Crispin
b0ef1b3221 ucentral-schema: update to latest HEAD
b287fee prevent duplicate usage of untagged ports

Signed-off-by: John Crispin <john@phrozen.org>
2023-11-09 08:54:47 +01:00
John Crispin
6d3cc970da ucentral-schema: update to latest HEAD
16ef7bc tip name and serial fields are swapped when triggering a wifi scan

Signed-off-by: John Crispin <john@phrozen.org>
2023-11-09 07:28:48 +01:00
John Crispin
2e5c9fbeb8 ucentral-schema: update to latest HEAD
7615f04 allow preventing downstream interfaces from reaching rfc1918 subnets

Signed-off-by: John Crispin <john@phrozen.org>
2023-11-07 14:05:29 +01:00
John Crispin
546a7df54d ucentral-schema: update to latest HEAD
2b884b3 fix state messages on single port devices

Signed-off-by: John Crispin <john@phrozen.org>
2023-11-07 11:29:37 +01:00
John Crispin
b1c9f75fc8 ucentral-schema: update to latest HEAD
eff094d ipv4/dhcp - allow setting a DNS server that clients shall use

Signed-off-by: John Crispin <john@phrozen.org>
2023-11-07 11:13:30 +01:00
John Crispin
14ba074b95 firstcontact: also write server to UCI
the server is now stored in /etc/ucentral/gateway.json. keep old
behaviour aswell.

Signed-off-by: John Crispin <john@phrozen.org>
2023-11-07 07:06:04 +01:00
John Crispin
4612fcfa00 ucentral-schema: update to latest HEAD
7b4cb42 always enable rrm until the new data model is added
3d9bd65 add channel utilization and assoc count to wifi scan results

Signed-off-by: John Crispin <john@phrozen.org>
2023-11-07 07:01:37 +01:00
John Crispin
e32a9de55f uspot: add ipt script that was accidentally dropped
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-06 14:55:12 +01:00
John Crispin
0c4f7e9e9d netifd: update to latest HEAD
40ed736 device: fix build error on 32 bit systems

Signed-off-by: John Crispin <john@phrozen.org>
2023-11-06 14:39:23 +01:00
John Crispin
af9a47ad72 hostapd: add ieee8021x wired patches to v4.4 kernel
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-06 06:02:41 +01:00
Ken
d6f0a1a2cf ipq50xx: CIG-WF186h Kernel/Firmware upgrade
Upgrade to 5018 ath11k 12.0 wireless driver +  kernel 5.4

Fixes: WIFI-13038
Signed-off-by: Ken <xshi@actiontec.com>
2023-11-03 10:02:59 +01:00
wingate.chi
2b8e68551e ipq5018: Update EWW631-B1 to support 512M Memory
Signed-off-by: wingate.chi <wingate.chi@cybertan.com.tw>
2023-11-03 10:00:10 +01:00
John Crispin
b2ad71e97d ieee8021x: replace c code with ucode
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-03 09:39:38 +01:00
John Crispin
f1363f70e9 ucentral-schema: update to latest HEAD
a473a2d fix CS1/UP1 WMM mapping

Fixes: WIFI-13004
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-23 10:08:37 +02:00
John Crispin
10c765076c ipq50xx: make 5G radio work on eap104
Fixes: WIFI-13098
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-23 09:22:32 +02:00
John Crispin
35c36a9bff ucentral-schema: update to latest HEAD
6b85f3f add channel survey to state messages

Fixes: WIFI-13099
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-23 09:01:34 +02:00
Piotr Dymacz
bd1ff8c649 Revert "feeds: ucentral: include BlueZ 5.66"
This reverts commit 8111566f35.

After switching to 'OpenWrt 23.05' release tree we no longer need
separate BlueZ 5.66 package as it's available in upstream feed.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-10-23 08:38:45 +02:00
Piotr Dymacz
e976d56575 ipq807x: ipq5018: fix EdgeCore EAP104 pinctrl configuration
Drop 'phy_led_pins' node which duplicates configuration for 'gpio46',
used in different place ('led_cloud' node). This solves below error:

'pin GPIO_46 already requested by 1000000.pinctrl; cannot claim for leds'

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-10-23 08:38:26 +02:00
John Crispin
99f6881a36 hostapd: add internal radius server
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-23 08:38:02 +02:00
John Crispin
de2fb200a2 hostapd: add rate-limit to FT
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-23 08:38:02 +02:00
John Crispin
c8835ec6ba ipq807x: enable HEARTBEAT trigger by defaukt
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-06 12:40:54 +02:00
John Crispin
7e52502793 ucentral-schema: update to latest HEAD
01e80a6 add delta counters for upstream vlan interfaces
0aaefff fix generation of udevstats config

Signed-off-by: John Crispin <john@phrozen.org>
2023-10-05 10:27:13 +02:00
Tanya Singh
e2f0258407 ipq50xx: Update ETH port MAC address assignment for OAP101 series APs
Fixes: WIFI-12980
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2023-10-05 10:26:47 +02:00
John Crispin
64cfe870ec hostapd: make the ubus binding aware of the wired driver
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-05 09:53:22 +02:00
John Crispin
265c289235 qca-kernel: disable SWITCHDEV
this broke wired ports that are not part of a bridge

Signed-off-by: John Crispin <john@phrozen.org>
2023-10-05 09:52:48 +02:00
John Crispin
f822dce124 .github/workflows: drop wifi-4 targets
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-04 06:18:33 +02:00
John Crispin
7d090a8363 ipq807x: fix edgecore OAP102 image name
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-04 06:17:46 +02:00
John Crispin
1a889b1ebe uspot: improve CoA handling in case of a hostapd restart
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-04 06:17:22 +02:00
John Crispin
0df37f97d8 profiles: fix ath10k includes
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-03 18:53:42 +02:00
John Crispin
fa1c620df3 ucentral-schema: update to latest HEAD
d42d7c0 add delta counters to state messages

Fixes: WIFI-12914
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-03 10:00:49 +02:00
John Crispin
ad6f4241c4 gen_config.py: automatically flush target feeds
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-03 07:22:49 +02:00
John Crispin
dba8d27d19 23.05: rebase on 23.05-rc4
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-03 07:22:31 +02:00
John Crispin
f7c79205e9 hostapd: sync hot-reload with latest upstream
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-03 07:21:51 +02:00
John Crispin
1205d0e5b6 .github/workflows: disable OAP100
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-03 06:31:34 +02:00
John Crispin
b4f73f165d ucode: enable NL80211_ATTR_NOT_IMPLEMENTED for ipq40xx
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-03 06:30:57 +02:00
John Crispin
ebdce386e4 uspot: make CoA work with radius-gw-proxy
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-02 18:50:52 +02:00
John Crispin
fcc7b8dfac hostapd: drop hostapd-common dependency
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-02 17:55:20 +02:00
John Crispin
9a04d5cb66 uspot: add CoA support
Fixes: WIFI-12103
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-02 17:20:45 +02:00
Tanya Singh
e185a49c5b ipq807x: Support OAP102
Fixes: WIFI-12794
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2023-10-02 12:55:33 +02:00
John Crispin
11bc8c143e mediatek: fix eap111 uboot-env and image meta-data
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-02 12:38:13 +02:00
John Crispin
05bab57b1d netifd: remove stray patch
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-02 11:22:31 +02:00
John Crispin
773040e099 ustream: switch to openssl
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-02 11:20:16 +02:00
John Crispin
47fe3e420e ipq950xx 2023-10-02 11:19:50 +02:00
John Crispin
2e0301cacb ucode: add EHT support
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-02 11:19:22 +02:00
Ken
3c868746a0 ipq807x: CIG WF186w: support port and autoNego setting from user space
Fixes: WIFI-12963
Signed-off-by: Ken <xshi@actiontec.com>
2023-10-02 11:09:00 +02:00
John Crispin
4cdb20fea4 ipq50xx: fix cig wf186w support
Fixes: WIFI-12962
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-02 11:07:40 +02:00
John Crispin
08ded0c3f9 ucentral-schema: update to latest HEAD
aa79c72 add EHT support to data model
0a77e9c add EHT detection to phy.uc

Signed-off-by: John Crispin <john@phrozen.org>
2023-10-02 11:07:40 +02:00
John Crispin
0080a5fb15 ipq95xx: make the target work with the full stack
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-02 11:07:40 +02:00
Tanya Singh
bd67a6646a WIFI-12964: Update rootfs for OAP101 series AP
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2023-10-01 14:38:37 +02:00
John Crispin
8706a596e1 ipq9574: update kernel and network drivers to v5.4
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-29 15:32:38 +02:00
John Crispin
aa245da361 ipq9574: add wifi hot-reload
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-29 13:22:13 +02:00
Tanya Singh
171607a03d ipq8074: Fix sysupgrade for OAP101 series
Fixes: WIFI-12960
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2023-09-28 14:52:07 +02:00
John Crispin
9ec40d6baa rrm: add background scanning
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:52:07 +02:00
John Crispin
d824ff4cf5 libwebsockets: add back library package
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:52:07 +02:00
John Crispin
81862f70db hostapd: update to latest hot-reload
ipq807x_v5.4/hostapd/0001-hostapd-fix-client-ban_time.patch
ipq807x_v5.4/hostapd/0002-hostapd-use-phy-name-for-hostapd-interfaces-instead-.patch
ipq807x_v5.4/hostapd/0003-hostapd-fix-ewma-for-mgmt-frame-signal-strength.patch
ipq807x_v5.4/hostapd/0004-hostapd-enable-coredumps.patch
ipq807x_v5.4/hostapd/0005-hostapd-fix-crash-on-disabling-an-interface-during-c.patch

Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:52:07 +02:00
John Crispin
0f0a861a6d ipq50xx: add qcom-ipq5018-cig-wf186w.dts
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:52:07 +02:00
Tanya Singh
c4b49e5190 ipq50xx: Support OAP101 and OAP101e-6E (update board files for OAP101e and OAP101e-6E)
Fixes: WIFI-12943
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2023-09-28 14:52:07 +02:00
John Crispin
5f787d92bb ucentral-client: update to latest HEAD
3025bf9 add certupdate command

Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:52:07 +02:00
John Crispin
ee30e1c9c1 ucentral-schema: update to latest HEAD
4cfe432 add certupdate command handler

Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:52:07 +02:00
John Crispin
1841c74d16 certificates: improve the certupdate script
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:52:07 +02:00
John Crispin
1c2e5c91d9 usteer2: rename to rrmd
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:52:07 +02:00
John Crispin
203f5ca2e6 ucentral-schema: update to latest HEAD
1fe5413 add transfer command handler

Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:52:07 +02:00
John Crispin
75be792560 firstcontact: convert to using gateway.json
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:52:05 +02:00
Felix Fietkau
d321c9c3a9 ipq807x_v5.4: fix kernel live renaming patch
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-09-28 14:51:48 +02:00
John Crispin
98d0f7b285 ucentral-schema: update to latest HEAD
41e3b03 revert "public_ip_lookup" patch
a711d79 add wifi-bands to admin-ui
a83832d trigger ucentral-state reload once apply is complete
cbb858d add admin-ui support
a1ff9ba unify the state uci file
aae470c set default port for uhttpd
acb08a4 trigger health/state via the new state daemon

Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:51:47 +02:00
John Crispin
0cbe985599 ucentral-client: update commit hash after rebase
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:51:28 +02:00
John Crispin
e61b923048 maverick: remove old code
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:51:28 +02:00
John Crispin
39ca4eedaa ucentral-state: add admin_ui support
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:51:28 +02:00
John Crispin
ce20001751 certificates: decouple mount and copy logic
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:51:28 +02:00
Tanya Singh
3b68f33298 ipq50xx: Support OAP101 and OAP101e-6E
Fixes: WIFI-12943
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2023-09-28 14:51:28 +02:00
John Crispin
aea4c20bfa ucentral-schema: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:51:28 +02:00
John Crispin
79d5972643 23.05: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:51:28 +02:00
John Crispin
539e288247 ipq807x: add cig-wf186w support to v5.4 kernel
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:51:28 +02:00
John Crispin
5ff383df91 ucentral-state: add unified state management
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:51:26 +02:00
John Crispin
eef130b2fe 23.05: update to latest release branch
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:27 +02:00
John Crispin
6517fff793 mediatek: add edgecore eap111 support
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:27 +02:00
John Crispin
2c6cc0d1d7 luci: remove dependency on ancient commit
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:27 +02:00
John Crispin
ba5fd5f252 unetd: set proper dependencies
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:27 +02:00
John Crispin
eb1003f215 ucentral-client: 23.05 time_t format fix
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:27 +02:00
John Crispin
ec613bb6f7 usb-console: drop unused code
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:27 +02:00
John Crispin
ce1448b770 udevmand: make it work with latest musl
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:27 +02:00
John Crispin
8801e89090 ipq40xx: add target feed
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:27 +02:00
John Crispin
2947136db9 ipq807x: make the target work on 23.05
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:26 +02:00
John Crispin
554e4fd90f ipq807x: add kernel modules Makefiles
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:26 +02:00
John Crispin
771fc7f369 profiles: fixes and cleanups
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:26 +02:00
John Crispin
0a2cc59f49 23.05: various ipq807x_v5.4 fixes
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:26 +02:00
John Crispin
1617b399c1 23.05: drop ucode-mod-bpf backport
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:26 +02:00
John Crispin
4dae21fbdb 23.05: drop firewall4 backport
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:26 +02:00
John Crispin
0dd9f0e042 23.05: drop ucode backport
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:26 +02:00
John Crispin
49959b644b 23.05: drop the libwebsockets backport
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:26 +02:00
John Crispin
5236542275 23.05: point the config at the latest openwrt release
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:26 +02:00
John Crispin
73d949cf3f 23.05: update patches
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:26 +02:00
John Crispin
d9f237b450 hostapd: update to latest hot reload
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-25 11:52:41 +02:00
John Crispin
4f5a3b0c2b ucentral-schema: update to latest HEAD
Fixes: WIFI-12956
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-25 07:10:33 +02:00
John Crispin
007cfe9c16 ipq807x: update ifname rename patches
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-19 06:44:06 +02:00
Ken
52884b2835 ipq807x: CIG wf660ag: support both EMMC and SPI NOR+EMCC H/W
Using one firmware to support the board which has EMMC only and SPI NOR+EMMC equipped

Fixes: WIFI-12941
Signed-off-by: Ken <xshi@actiontec.com>
2023-09-18 16:19:17 +02:00
John Crispin
6a6af16f48 hostapd: add CSA event
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-18 15:58:39 +02:00
John Crispin
2818722b19 usteer2: improve gateway command handling
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-18 15:58:39 +02:00
John Crispin
194eba2d21 ucentral-schema: update to latest HEAD
e99eaf9 add rrm cmd handler

Signed-off-by: John Crispin <john@phrozen.org>
2023-09-18 15:58:39 +02:00
John Crispin
3d41a22fba ucentral-client: update to latest HEAD
3bbcd36 handle rrm command

Signed-off-by: John Crispin <john@phrozen.org>
2023-09-18 09:56:50 +02:00
John Crispin
acd4b79dd4 ipq807x: backport latest wifi hot-reload to v5.4 kernel
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-17 06:50:23 +02:00
John Crispin
befac1e065 netifd: backport vlan rewrite
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-16 17:29:49 +02:00
John Crispin
7e4e221ccb netifd: add dynamic interface patch
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-16 17:29:49 +02:00
Felix Fietkau
1d9b69ee6f hostapd: add vlan reload support and ap+sta fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-09-16 17:29:49 +02:00
Felix Fietkau
018f20119d netifd: add wireless vlan/sta fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-09-16 17:29:49 +02:00
Felix Fietkau
9a6e41adb8 hostapd: fix ucode reload issues
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-09-16 17:29:49 +02:00
Felix Fietkau
970b22856f mac80211: fix reconfiguration on DFS channels in non-ETSI regdomains
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-09-16 17:29:49 +02:00
Felix Fietkau
95032994fe hostapd: move ubus.c changes from patches to src
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-09-16 17:29:49 +02:00
John Crispin
48cda63dc5 hostapd: backport latest reload patches
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-16 17:29:49 +02:00
Ken
8e9f79964a ipq807x: Apply CE TX power to wf-186w
Apply CE TX power for WF186w and WF186H include FCC as well.

Fixes: WIFI-12920
Signed-off-by: Ken <xshi@actiontec.com>
2023-09-16 17:20:11 +02:00
John Crispin
3c7df86373 certificates: fix mounting on cig,wf186w|cig,wf186h
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-16 17:20:11 +02:00
Ken
38e6aee074 ipq807x: BSP patch for WF-186H
Fixes: WIFI-12922
Signed-off-by: Ken <xshi@actiontec.com>
2023-09-16 17:19:55 +02:00
John Crispin
0a13684bb6 ipq807x: fix certificates mounting in dual-boot scenario on yuncore,fap655
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-16 17:17:15 +02:00
John Crispin
e7ca6e8455 hostapd: fix ft-anonce behavior for broken clients
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-13 16:37:12 +02:00
John Crispin
f17e635d34 ucentral-schema: update to latest HEAD
f113e61 fix uci for network devices that have a dot in the name

Signed-off-by: John Crispin <john@phrozen.org>
2023-09-13 16:35:50 +02:00
John Crispin
90e78c6068 ucentral-schema: update to latest HEAD
58d7d72 fix beacon rates

Fixes: WIFI-12935
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-12 16:58:23 +02:00
John Crispin
550bb6fb7e hostapd: update the snooping patch
Fixes: WIFI-12929
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-12 16:18:01 +02:00
John Crispin
b3a0ebe534 ipq807x: disable SWITCHDEV support
It is not used by the firmware.

Signed-off-by: John Crispin <john@phrozen.org>
2023-09-12 16:16:43 +02:00
John Crispin
6d16e50bbe ipq807x: do not include kmod-qca-nss-drv-bridge-mgr
This was causing issues with bridge-vlans that have mixed tagged and untagged ports.

Signed-off-by: John Crispin <john@phrozen.org>
2023-09-12 16:16:04 +02:00
Paul White
513eec1c5f ipq807x: cig.wf186w: Add MPSK Dynamic VLAN support
When a MPSK VLAN netdev is created on the cig.wf186w board, this script
will configure switch0 via swconfig for the corresponding VLAN

Signed-off-by: Paul White <paul@shasta.cloud>
2023-09-12 04:15:24 +02:00
Paul White
6a797e8a64 ucentral-schema: cig.wf186w: wan_port set to eth0
Reset the ucentral UCI config 'event.config.wan_port' to eth0 for
the WF186W board

Signed-off-by: Paul White <paul@shasta.cloud>
2023-09-12 04:15:24 +02:00
John Crispin
082134bc43 ucentral-schema: update to latest HEAD
fd6a079 dhcp-relay: dhcp relay option 82 parameters

Signed-off-by: John Crispin <john@phrozen.org>
2023-09-11 07:31:55 +02:00
Arif Alam
03ec2de777 ucentral-event: dhcp relay option 82 parameters
Add the ability to configure circuit-id and remote-id sub-options.

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2023-09-11 07:29:17 +02:00
John Crispin
989d39d1f2 ucentral-schema: update to latest HEAD
a4c8a13 increase reassociation_deadline to 3s when using multi-psk

Fixes: WIFI-12598
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-06 16:15:11 +02:00
John Crispin
b6b298ad68 hostapd: fix association of clients on Open/VLAN SSIDs
Fixes: WIFI-12929
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-06 16:14:42 +02:00
Ken
be1cb862f1 ipq807x: CIG WF-186w - Adjust the LAN ID to match printed labels
Fixes: WIFI-12915
Signed-off-by: Ken <xshi@actiontec.com>
2023-09-06 11:55:01 +02:00
John Crispin
eb6e95f760 hostapd: add proxy-state to DAS frames
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:36 +02:00
John Crispin
f04eb1d604 netifd: revert upstream wpa3 cypher fixes
Fixes: WIFI-12906
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:36 +02:00
John Crispin
cc1512e42a CI: fix oap101_/-e profile name
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:36 +02:00
John Crispin
88d6633c85 ipq807x: update the eap101 BDF
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:36 +02:00
John Crispin
1773435a2c .github/workflows: drop ununsed targets
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:36 +02:00
John Crispin
cf12abc92e ucentral-schema: update to latest HEAD
708b1de override dynamic_authorization settings when radius-gw-proxy is enabled

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:36 +02:00
John Crispin
d8c4b1f0e2 ucentral-schema: update to latest HEAD
81a786d add radius support to the ieee8021x service
ee0a87c ethernet port UCI sections should be named to prevent duplicate sections

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:36 +02:00
John Crispin
45cbd5d93a ipq95xx: fix sysupgrade on reference kit
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:36 +02:00
John Crispin
2646db0826 ipq807x: update NSS patch
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:36 +02:00
John Crispin
0289ea7293 ipq95xx: basic uci support for wifi-7
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:36 +02:00
John Crispin
c02c293651 ipq95xx: enable wifi-7
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:36 +02:00
John Crispin
e6786115cc ipq807x: add more v5.4 profiles
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:36 +02:00
John Crispin
89b9596e27 ipq807x: fix edgecore_oap101_6e profile name
Fixes: WIFI-12882
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
23cd3b3e99 ucentral-schema: update to latest HEAD
e5ff553 channel 40 was not set correctly during wifi-scan

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
5a8cf73137 mac80211: fix ath11k mimo/nss calculation
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
79dfb1e861 ieee8021x: update to latest HEAD
560fe30 allow the use of an external AAA server

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
4eb30ba080 mac80211: drop hostapd dependency
This fixes build dependency errors introduced by the latest wifi hot reload update.

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
1829c9c96f hostapd: update builtin version to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
fa2424750b netifd: update to latest HEAD
Fixes: WIFI-12878
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
441cb82d32 ucentral-schema: update to latest HEAD
0220fbc fix a null expression in capabilities code

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
c34d346b57 hostapd: update v5.4 version to latest hot-reload version
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
Ken
f7a766be20 ipq807x: CIG WF188n: wrong wan mac address
eth0 is configured as WAN but set with LAN mac.

Fixes: WIFI-12869
Signed-off-by: Ken <xshi@actiontec.com>
2023-08-31 16:08:35 +02:00
Ken
54e8411980 ipq807x: CIG-WF Apply FCC TX power to 660a (20230804)
Add new FCC tx power, MD5 79a4b5cd48bcd8de82d3f0d30cc57cca

Fixes: WIFI-12873
Signed-off-by: Ken <xshi@actiontec.com>
2023-08-31 16:08:35 +02:00
John Crispin
09ebd5f406 hostapd: more hot-reload backports
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
44aef94d82 ath11k: fix capability recalc when changing the mimo mask
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
aeac214236 hostapd: backport more hot-reload fixes
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
81f8a368d1 hostapd: mimo was not always applied correctly
Fixes: WIFI-12854
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
cde9d148b8 netifd: update to latest HEAD
Fixes: WIFI-12854
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
b1bf054d74 ucentral-schema: update to latest HEAD
2defc8e fix mimo 3x3 calculation

Fixes: WIFI-12854
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
wingate.chi
18100e0b4e ipq807x: update qca-thermald
Let qca thermald support IPQ50xx platform and has cooling function to limit the
duty cycle of tx queues

Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
2023-08-31 16:08:35 +02:00
John Crispin
42f0c520da ucentral-schema: update to latest HEAD
5df48b7 fix malformed beacon when enabling TIP OUI

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
fbee159481 hostapd: backport 2 hot-reload fixes
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
ca4a4365d6 ucentral-schema: update to latest HEAD
ea269d6 add strict validation support

Fixes: WIFI-12852
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
54ffbadc2d ipq807x: enable dual-boot on cig,wf186w
Fixes: WIFI-12761
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
Ken
a4cd9cb03b ipq807x: Apply FCC TX power to 186w and 660a
Fixes: WIFI-12864
Signed-off-by: Ken <xshi@actiontec.com>
2023-08-31 16:08:35 +02:00
John Crispin
f3406891b2 ucentral-client: update to latest HEAD
d898a7a prevent ip-collide script and apply task running in parallel

Fixes: WIFI-12849
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
6f7c5995ad ipq807x: fix eap102-ath12 image path
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
8046c336c3 ipq807x: add more ath12 profiles to CI
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
c39f92eea7 ucentral-schema: update to latest HEAD
5746d3d make the wifi scanning code aware of the TIP OUI

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
37d1da8b01 ucentral-event: always respawn the service
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
6f65229d66 ucentral-event: fix possible null pointer deref
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
7bf62b76bd hostapd: fix stray unused interfaces in the hot reload code
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
693e147cd9 ucentral-schema: update to latest HEAD
122135c add becaon-adverrtisment support using TIP IE

Fixes: WIFI-12535
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
eab2445d14 mac80211: hot-reload backport added an unknown option
acs_survey is not known by the QCA hapd, revert to the previous value

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
5c53054de9 mac80211: hot reload was not working reliably when going from single STA to any other mode
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
1866ffcccc ipq807x: make cig wf-188n work on v5.4 kernel
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
5c7fe1a0fa mac80211: hot reload was not working reliably when going from single STA to any other mode
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
672578af01 mac80211: update v5.4 patches
add recent patches made to the v4.4 kernel to the v5.4 kernel

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
9c27a4b878 unetd: improve kernel dependencies for v5.4 kernel
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
4cf4a5152e ipq807x: update v5.4 patches
add recent patches made to the v4.4 kernel to the v5.4 kernel

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
7daf37be9e ucentral-schema: update to latest HEAD
fa2cdb2 add tip-information-element support

Fixes: WIFI-12535
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
7975de1101 ipq807x: add eap102 v5.4 profile
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
Gg
2d1bbeedd9 ipq807x: Add the corresponding software content for the <wallys-dr5018> hardware device
Fixes: WIFI-12804
Signed-off-by: Gg <gxg@wallystech.com>
2023-08-31 16:08:35 +02:00
John Crispin
e0fc96b950 ucentral-schema: add qos-class example
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
835909f3cc hostapd: fix a use-after-free bug
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
Felix Fietkau
e02d9261df add missing patch for hostapd update
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-08-31 16:08:35 +02:00
John Crispin
2f7a1e5952 ucentral-event: fix dynamic vlan
since the latest netifd update, dynamic vlans need to be set to untagged explicitly

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
0ad0aa8255 netifd: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
4db35c127b ucentral-schema: update to latest HEAD
6de905f add QoS classes and services

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
f6ae95da15 qosify: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
daec2bef52 hostapd: fix compile error introduced by recent update
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
4e5e483743 ucentral-schema: update to latest HEAD
249788e fix state messages when no devices are configured

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
ea1cb7a4a6 ucentral-schema: update to latest HEAD
36f815c fix static upstream interfaces

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
ce33b86c6f hostapd: update wifi-reload code
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
8e0e4d81d8 netifd: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
74616bda9a qca-ssdk: fix max vlan support on qca8337
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
47afa20ff1 ipq807x_v5.4: fix maple/oap101-(6)e support
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
b4c68157c8 ath11k-wifi: add new wf188n BDF files
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:35 +02:00
John Crispin
5dd721b206 ucentral-schema: update to latest HEAD
19f4910 allow setting proto: none on ipv4 interfaces
3f98df2 Fix definitions, to match other schema yml definitions

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
9ef59ba079 ucentral-schema: update to latest HEAD
f56f754 allow multiple fixe country codes on an AP

Fixes: WIFI-12744
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
fafb5cbffd ucentral-schema: update to latest HEAD
77031d1 swconfig: fix interfaces with mixed switch and raw ports

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
Ken
dca6ea517f ipq807x: CIG WF-186w : Fixed the vlan issue when add two vlan interface into one bridge
Fixes: WIFI-12743
Signed-off-by: Ken <xshi@actiontec.com>
2023-08-31 16:08:34 +02:00
John Crispin
43436e4726 ucentral-schema: update to latest HEAD
2d702af add swconfig support

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
18c6087d56 wifi-ax: backport hostapd reload support - fixes
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-08-31 16:08:34 +02:00
John Crispin
a5eaccb29a ipq807x: enable 4k vlan by default on realtek switches
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
ee090f6230 ucentral-schema: update to latest HEAD
2c8fb4a enable wifi hot-reload on all phys

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
Felix Fietkau
5b397d54ce wifi-ax: backport hostapd reload support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-08-31 16:08:34 +02:00
Felix Fietkau
323dc65770 ucode: update to the latest version
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-08-31 16:08:34 +02:00
John Crispin
bccdb175b0 ucentral-schema: update to latest HEAD
5255152 use logical names instead of linux netdev ones inside state messages
f129469 remove outdated test cases
57e1ff5 149 is not a 160mhz channel

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
esha
92f59a3f22 Add Support for hfcl_ion4xi_w, hfcl_ion4x_w and hfcl_ion4xi_HMR
Fixes: WIFI-12710
Signed-off-by: Esha Aggarwal <esha.aggarwal@hfcl.com>
2023-08-31 16:08:34 +02:00
John Crispin
ccdca73cd6 mac80211: add the HTC+ / iPhone fix
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
Ken
3fde7d88fb ipq807x: add stty to configure the uart on CIG 660A
Fixes: WIFI-12712
Signed-off-by: Ken <xshi@actiontec.com>
2023-08-31 16:08:34 +02:00
John Crispin
79dcd8a900 ucentral-schema: update to latest HEAD
6085276 reject upstream interfaces with invalid config

Fixes: WIFI-12695
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
3d851f6343 libubox: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
ed3142aa10 bridger: update to latest HEAD
3159bbe improve isolation when selecting a fixed output port

Fixes: WIFI-12577
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
5d0a5e377e ath11k: disable HE160/80+80 on cypress/hawkeye
[  307.970726] qcom-q6v5-wcss-pil cd00000.qcom_q6v5_wcss: fatal error received:
[  307.970726] QC Image Version: QC_IMAGE_VERSION_STRING=WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1
[  307.970726] Image Variant : IMAGE_VARIANT_STRING=6018.wlanfw.evalQ
[  307.970726]
[  307.970726] phyrf_reset.c:1131 Assertion (boardOpFlags == WHAL_WLAN_11AG_CAPABILITY) || ((boardOpFlags == WHALparam0 :zero, param1 :zero, param2 :zero.
[  307.970726] Thread ID      : 0x00000068  Thread name    : WLAN RT0  Process ID     : 0
[  307.970726] Register:
[  307.970726] SP : 0x4bb6e720
[  307.970726] FP : 0x4bb6e728
[  307.970726] PC : 0x4ac8d44c
[  307.970726] SSR : 0x00000008
[  307.970726] BADVA : 0x00020000
[  307.970726] LR : 0x4ac8cbe8
[  307.970726]
[  307.970726] Stack Dump
[  307.970726] from : 0x4bb6e720
[  307.970726] to   : 0x4bb6eec0
[  307.970726]
[  308.023043] remoteproc remoteproc0: crash detected in cd00000.qcom_q6v5_wcss: type fatal error
[  308.045307] remoteproc remoteproc0: handling crash #1 in cd00000.qcom_q6v5_wcss
[  308.053681] remoteproc remoteproc0: recovering cd00000.qcom_q6v5_wcss

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
439c386506 ucentral-schema: update to latest HEAD
0c0a741 fix 160 and 80+80 modes
dbc38ab start bridger early

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
1371a9d3d8 ucentral-event: add option82 handling
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
Felix Fietkau
52f6189c10 udhcpsnoop: allow processing other hooks after ingress mirror
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-08-31 16:08:34 +02:00
John Crispin
cf63cb94aa udhcprelay: add new package
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
94a442abcf ucentral-schema: update to latest HEAD
0986e5a improve vlan-awareness support

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
6cf990f142 netifd: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
8422d572e7 ipq807x: add profiles/hfcl_ion4xi_w.yml
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
659e7c52ba ipq807x: fix xunison-d50 leds
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
2536cfdc9e ipq807x: fix xunison-d50 BDF files
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
e9b64b0dfd ipq807x: fix certificates on hfcl-ion4xi_w
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
b4ed6a8367 ipq807x: fix hfcl-ion4xi_w ethernet ports
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
5362455444 ipq807x: fix hfcl-ion4xi_w calibration data
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
eff55cc055 ipq807x: fix hfcl-ion4xi_w board files
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
295a81450b ipq807x: fix hfcl-ion4xi_w wifi macs
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
ad48758229 ipq807x: fix hfcl-ion4xi_w wifi firmware selection
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
0f5302044d ipq807x: add hfcl-ion4xi_w support
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
398e17a583 hostapd: add usteer2 patches
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
b303909c83 ipq807x: add xunison-d50 support
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
d7c88de1a7 ucentral-schema: update to latest HEAD
e156652 FWsignature->signature
d324707 fix typo
08ee70c add vlan-awareness support

Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
c144aeed12 usteer2: WIP
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
John Crispin
b3d791b34e base-files/ipq807x: allow setting the dual boot env in the sysupgrade sucess handler
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-31 16:08:34 +02:00
Stephane Bourque
9b77f6ed22 Update x64_vm-build-test.yml
Reverting a bad commit
2023-07-16 21:15:42 -07:00
Stephane Bourque
7eb5d45bb8 Update x64_vm-build-test.yml
xx
2023-07-16 20:48:49 -07:00
Stephane Bourque
8b64db3c7a Update x64_vm-build-test.yml
x
2023-07-16 20:48:17 -07:00
John Crispin
cd461e555e ucentral-schema: update to latest HEAD
9797d7e allow using a shared service->captive for multiple instances
ad7eb8e rename strict-isolation -> strict-forwarding
43c44c1 force spotfilter off prior to config apply
11fffcf captive: fix credentials configuration

Signed-off-by: John Crispin <john@phrozen.org>
2023-06-26 16:24:08 +02:00
John Crispin
9195806206 ucentral-event: rename strict-isolation -> strict-forwarding
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-26 16:20:14 +02:00
John Crispin
9621c21535 spotfilter: add a delay after setting up a captive portal
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-26 16:20:14 +02:00
John Crispin
f74cee802b uspot: fix rate limiting in captive portal/UAM
Fixes: WIFI-12305
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-15 16:22:27 +02:00
Ken
0c7aecde9f ipq807x: CIG WF-186w / update uart pin setting for commucation between ble and soc
Fixes: WIFI-12679
Signed-off-by: Ken <xshi@actiontec.com>
2023-06-15 16:22:27 +02:00
John Crispin
9ab2f5ede9 ucentral-schema: update to latest HEAD
9637b4a disable bridger by default

Fixes: WIFI-12670
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-15 16:22:27 +02:00
John Crispin
a7fe885dc5 radius-gw-proxy: improve header length sanity check
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-15 16:22:27 +02:00
John Crispin
105e55c01a ucentral-schema: update to latest HEAD
48ee8f0 fix cpu core utilisation

Fixes: WIFI-12440
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-15 16:22:27 +02:00
John Crispin
200b759d6f ipq807x: update ion4x_wp dts config
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-15 16:22:27 +02:00
John Crispin
5da87dc07d uspot: fix a typo int he CHAP/PAP handler code
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-15 16:22:27 +02:00
John Crispin
25f42bdcaf ucentral-schema: update to latest HEAD
47f39e9 cmd_upgrade: signature requirement was not properly detected

Fixes: WIFI-12675
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-15 16:22:27 +02:00
John Crispin
43361d0ee7 ucentral-schema: update to latest HEAD
4ddcb12 properly indicate apply errors via an exit() call

Fixes: WIFI-12673
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-15 16:22:27 +02:00
John Crispin
93a8a764a8 ucentral-schema: update to latest HEAD
eea75b3 do not enable vlan accounting for untagged interfaces

Fixes: WIFI-12674
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-15 16:22:27 +02:00
John Crispin
1e515ed1e1 ucentral-schema: update to latest HEAD
04ce23b fix udevstats counters

Fixes: WIFI-12674
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-15 16:22:27 +02:00
John Crispin
78388a8ecf ucentral-event: fix radius rate limiting
Fixes: WIFI-12665
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-15 16:22:27 +02:00
John Crispin
1e1c286f06 ipq40xx: disable the unused container feed
Fixes: WIFI-12672
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-15 16:22:27 +02:00
John Crispin
81f7d7d7ce ramips: enable vlan offloading
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-15 16:22:27 +02:00
John Crispin
2403eb2a87 ipq807x: do not bounce arp frames back in proxy_arp mode
Fixes: WIFI-12653
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-08 11:13:23 +02:00
John Crispin
5a686344e8 ipq807x: update wf-186 5GHz BDF
Fixes: WIFI-12656
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-08 06:32:38 +02:00
Thibaut VARÈNE
ff1214b1dc uspot: portal: avoid null dereference, always define ctx.ssid
This commit fixes a bug where the SSID value would be set to "unknown"
in spotfilter data when the hostapd call returned without SSID data; but
this value  was not propagated internally, resulting in a null value
being used in other parts of the portal code. Furthermore, if the
hostapd call returned null data, the spotfilter assignment correctly
handled this case but not the subsequent internal assignment, resulting
in a potential null dereference and crash.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-06 17:51:37 +02:00
Thibaut VARÈNE
cf8769e4b5 uspot: def_captive may not exist
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 19:28:38 +02:00
Thibaut VARÈNE
f770253a52 uspot: don't use CONNMARK
This commit removes CONNMARK marking of all authenticated clients
packets. In client_kick() we now delete all conntrack entries for the
client.

This simplifies firewall.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
bb4b7cb95c uspot: handler-uam: fix CHAP challenge
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
d3f4afd4a7 uspot: handler.uc: remove unused payload attribute
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
35e1cbd15b uspot: use a single fwmark
Default firewall rules apply to unauthenticated clients, there is no
need to specifically fwmark their packets. This reduces the firewall
complexity and makes very clear what happens "by default".

Add a preliminary README with a sample firewall illustrating this setup.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
cf2f80fd3c uspot: handle_request: abort on spotfilter error
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
56549a44ea uspot: rename accounting.uc -> uspot.uc
This file is run by /etc/init.d/uspot, uses /etc/config/uspot and
basically handles uspot state (beyond mere accounting).

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
59b3387ece uspot: handle client removal in accounting.uc
mirror the client_add call

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
1ebc3f59ba uspot: regroup ratelimiting start/stop under accounting
Avoid again having the init and exit stages of a specific subsystem
spread across multiple modules.

We no longer need to lowercase the MAC address and can use the
spotfilter native (uppercase) format for ratelimit calls.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
5d93a1ddc0 uspot: accounting: cleanup ratelimit rules on removal
When a client is removed, call ratelimit client_delete to remove any
lingering related bandwidth limits.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
5d0f75f68e uspot: handler: use Call-Check for MAC auth
Reading [1] and [2], it appears that the hard-coded value "2" is
incorrect and "10" should be used instead. [1] provides that:

  Checks for the presence of a Service-Type == 'Call-Check' AVP as an
  explicit indication that the NAS wants to do Mac-Auth.

"Call-Check" is defined in [2] as value 10.

[1]: https://wiki.freeradius.org/guide/mac-auth#web-auth-safe-mac-auth
[2]: https://freeradius.org/rfc/rfc2865.html#Service-Type

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
eeec28eb4a uspot: remove references to radius accounting
Now that accounting is entirely handled in accounting.uc, the rest of
the system no longer needs to carry around that information.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
1c38559cf0 uspot: handle accounting start in accounting.uc
This commit introduces an "acct_start" ubus endpoint for accounting.uc
that is used to register a new client and start accounting.

This moves the entirety of accounting management under accounting.uc,
instead of having e.g. the RADIUS Start call separate in handler-uam.uc.

Furthermore, accounting.uc no longer needs to poll for new clients: they
are now registered from portal.allow_client().

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
c9b2877de1 uspot: accounting: use provided nas_port_type
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
21d79d1a9e uspot: portal: increase sessionid uniqueness
RFC[1] says that Acct-Session-Id should be an UTF-8-encoded string.
Increase uniqueness by using hex values instead of decimal ones.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
95a7b6d54d uspot: accounting: implement Accounting-On/Off
The RFC[1] says about Acct-Status-Type:

    It MAY be used by the client to mark the start of accounting (for
    example, upon booting) by specifying Accounting-On and to mark the
    end of accounting (for example, just before a scheduled reboot) by
    specifying Accounting-Off.

The RFC errata[2] further specifies that Accounting-On and
Accounting-Off messages apply to the whole NAS.

The RFC also mandates that[3]:

    Either NAS-IP-Address or NAS-Identifier MUST be present in a
    RADIUS Accounting-Request.  It SHOULD contain a NAS-Port or NAS-
    Port-Type attribute or both unless the service does not involve a
    port or the NAS does not distinguish among its ports.

And[4]:

    An Accounting-Request packet MUST have an Acct-Session-Id.
    The Acct-Session-Id SHOULD contain UTF-8 encoded 10646 characters.

Finally the freeRADIUS recommendations here[5] suggest that:

 1. Acct-Status-Type = Accounting-On should not be used to indicate
    sub-system reboot.
 2. IANA should allocate two new values for Acct-Status-Type:
    Subsystem-On, and Subsystem-Off. These values have meaning similar
    to Accounting-On and Accounting-Off, except that they apply to a
    subystem of the NAS.
 3. NASes should use these new values to indicate subsystem on/off.
 4. The Called-Station-Id attribute should contain values unique to each
    subsystem.
 5. The NAS should signal that the entire system has rebooted by using
    the existing Accounting-On and Accounting-Off values, with a value
    for Called-Station-Id that is global to the NAS, or to omit it
    entirely.

In order to reconcile all this, this commit implements Accounting-On and
Accounting-Off requests as follows:

- When accounting.uc is started, it loops through each uspot interface
  and keeps track of the acct_server seen for each interface. Then for
  each interface that do not use a previously seen server, it generates
  a unique session ID, and sends an Accounting-On request to the
  RADIUS server, using this session ID and the configured NAS-ID.
- When accounting.uc stops, it sends an Accounting-Off request for each
  uspot interface for which an Accounting-On message was previously sent,
  using the same global session ID.

If/when the Subsystem-On/Subsystem-Off values are implemented, this
commit can be revisited to simply lift the restriction on unique servers
and change the acct_type value accordingly.

Finally, it appears that while NAS-ID is provided in the request thus
making NAS-IP unnecessary, libradcli still includes this field in the
request. Likewise, it also insists on sending a NAS-Port attribute.

[1]: https://datatracker.ietf.org/doc/html/rfc2866#section-5.1
[2]: https://www.rfc-editor.org/errata_search.php?rfc=2866
[3]: https://datatracker.ietf.org/doc/html/rfc2866#section-4.1
[4]: https://datatracker.ietf.org/doc/html/rfc2866#section-5.5
[5]: https://freeradius.org/rfc/acct_status_type_subsystem.html

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
a647368f15 uspot: accounting: allow radius calls from non-clients
In order to send RADIUS accounting requests at the NAS level (for e.g.
Accounting-On/Off), radius_init() and radius_call() are made to accept a
null mac argument.

For radius_call() we fall back to the acct_session value (which is
required to be present per RFC) to construct the temporary file name.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
97f641a16b uspot: accounting: quote syslog() logger argument
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
1252ca6778 uspot: accounting: use NAS-ID from settings
NAS-ID is a mandatory setting in configuration. This will be useful to
support Accounting-Off frames.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
e561f4a82e uspot: don't publish radius secrets
Now that accounting.uc no longer needs the per-client radius server
information, there is no reason to publish these sensitive secrets in
cleartext in spotfiler data.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
395e98dc66 uspot: accounting: build radius payload from settings
Address RADIUS accounting server from the global settings, and call
client_interim() only if accounting is globally enabled for that
interface.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
b5e33cec05 uspot: accouting: save interface-wide settings
Before this commit, interface-wide settings (mainly radius) were stored
per client, resulting in duplicate data.

This commit runs a first pass that renames the "clients" global variable
to "interfaces" which is expected to have the following content:

interfaces {
	settings {},
	clients {},
}

Thus the settings are stored per interface now, and the list of clients
belonging to that interface is stored within the object.

This change enables us to also remove direct calls to uci configuration
in the code and thus we no longer need to store it locally.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
ec924ea3d7 uspot: accounting: send RADIUS acct Stop on disconnect
If a client "disappears" from wireless, spotfilter eventually wipes
their state data before the accounting removal occurs. Thus in
radius_acct(), the ubus call returns empty and no RADIUS accounting Stop
frame is sent in this condition, leaving a dangling accounting for the
client.

This commit solves this issue by maintaining a local copy of the most
recent accounting data and sending that when the live data is no longer
available.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
e30cfbf36b spotfilter: move accounting totals to "acct_data" table
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
39510a6728 uspot: accounting: relax loop timer
For accounting purposes, a 10s resolution seems adequate. Accounting
session start is handled asynchronously in handler-uam.uc anyway.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
0abc0c17ff uspot: accounting: refactor interim reporting
Instead of running one timer per client, handle interim reports in the
main loop through a simple comparison between current time and expected
time of next report.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
3375803a26 uspot: accounting: add_client(): fix integer types
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
16e06ad7aa uspot: accounting: remove on logoff, reset on idle
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
a12f43e912 uspot: accounting: s/client_flush/client_reset/g
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
a6a9ef6c1b uspot: add nftables firewall snippet
This enables CONNMARK'ing allowed traffic, and is used by accounting to
selectively delete conntrack entries on client removal.

To be used with the following fw4 config:

config include
	option type 'nftables'
	option path '/usr/share/uspot/firewall.nft'
	option position 'chain-post'
	option chain 'mangle_postrouting'

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
866583625b uspot: accounting: local config overrides Acct-Interim-Interval
Per RFC: https://www.rfc-editor.org/rfc/rfc2869.html#section-2.1

   It is also possible to statically configure an interim value on the
   NAS itself. Note that a locally configured value on the NAS MUST
   override the value found in an Access-Accept.

Don't start the interim reporting timer if no interval is configured.

Also add the config option to the documented config template

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
4c272fe5f5 uspot: accounting: setup interim only when needed
There is no point in setting up the interim timer if the relevant radius
data is not available. Furthermore, the return value check would only
fail if the client was unknown to spotfilter at the query time, which
isn't a failure to *send* data.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
45def78972 uspot: accounting: coalesce radius stop requests
Define constants for terminate causes, see:
https://www.iana.org/assignments/radius-types/radius-types.xhtml#radius-types-12

Use "Lost Carrier" for disconnected client (matching Chilli).

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
f1c4a39540 uspot: accounting: correctly handle ipv4/v6 conntrack
Only run conntrack deletion on defined client IP(s) and process both
IPv4 and IPv6.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
a9df4b8549 uspot: accounting: use variables instead of function calls
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
4d8bc3c5bd uspot: accounting: client timeouts are always defined
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
245b062db8 uspot: accounting: fix loop logic
When looping through known clients:
- removal of client in spotfilter list is checked first
- checks for known client existence are redundant by construction

Also format the max_total check similarly to the timeout one

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
c6d07ca178 uspot: accounting: use explicit variable names
And avoid enumerating unused values in k,v pairs

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
60c708dce9 uspot: accounting: s/radius_stop/client_kick/
radius_stop() had nothing to do with RADIUS.
Simplify the function prototype by handling spotfilter args internally.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
dfdf25834c uspot: accounting: remove redundant function
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
1e82a24192 uspot: accounting: radius_stop(): reduce args redundancy
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
ce20be0b3b uspot: accounting: config[interface] is always defined
By construction:
- interface is one of clients[] keys
- clients[] is built from config uspot 'interface'

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
3e483bd524 uspot: accounting: avoid redundant assignments
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
1cded2e983 uspot: radius: regroup redundant checks
Clarifies intent.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
3219fceb48 uspot: move RADIUS NAS_PORT_TYPE to portal.uc
Currently still hardcoded to "19" aka Wireless.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
78c7a3cbfa uspot: handler-uam: improve auth-client()
Simplify the query string parsing logic, allow empty password.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
0a390bea0b uspot: rename common.uc -> portal.uc
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
cad21f394e ucentral-tools: remove dictionary.CoovaChilli
This dictionary uses vendor 14122, which is the WISPr vendor code. The
first few attributes defined in this dictionary as integers masked their
WISPr string counterparts, resulting in truncated attributes in RADIUS
requests.

From a quick Google Search, there is no CoovaChilli RADIUS vendor ID, it
seems to use the ChilliSpot ones:
https://support.ignitenet.com/portal/en/kb/articles/what-are-the-supported-radius-attributes-in-coovachilli-captive-portal

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
3384986bef uspot: support ChilliSpot radius ratelimits
This commit introduces a helper function "ratelimit_client()", invoked
from allow_client(), which parses the radius reply for known
ratelimiting attributes:

- WISPr-Bandwidth-Max-{Up,Down}
- ChilliSpot-Bandwidth-Max-{Up,Down}

WISPr attributes are expressed in bits/s, ChilliSpot in kbits/s.

If none of the attributes are present, the function is a NOP.
If any of the -Up or -Down is missing, the corresponding limit is not
set. NB: ratelimit currently does not support setting only up OR down
ratelimiting if defaults are not set.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
Thibaut VARÈNE
23073a8ae5 uspot: captive: restart(): include uspot accounting
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-06-05 13:19:19 +02:00
John Crispin
3ab700de32 ipq807x: fix yuncore fap655 filename
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-04 18:04:41 +02:00
John Crispin
454856e5c2 ipq807x: always power on phys when an interface is started
Fixes: WIFI-12648
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-04 17:14:18 +02:00
John Crispin
7e4030c0bc ipq807x: add yuncore fap655 support
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-04 12:36:46 +02:00
John Crispin
1deab06c09 ucentral-schema: update to latest HEAD
1279e7c fix section names for swconfig devices

Signed-off-by: John Crispin <john@phrozen.org>
2023-06-04 12:34:24 +02:00
John Crispin
a4bc2913e1 ipq807x: add edgecore OAP101e support
Fixes: WIFI-12617
Signed-off-by: tanya.singh <tanya.singh@4ipnet.com>
2023-06-01 10:06:39 +02:00
Ken
87dbd3e289 ipq807x: various improvements for CIG-WF-186w
1. Using rtl8367c.c file for rtl8367S switch driver  to support vlan 
2. Configure eth0.1 as WAN and eth0.2 as LAN
3. Add mdio read/write in smi driver  followed 5.4 kernel driver
4. add mido clock setting followed 5.4 kernel driver for 186w board
5. Add eth and wifi mac address allocation based of BaseMacAddress
6. Update new bdf for 2G radio

Fixes: WIFI-12650
Signed-off-by: Ken <xshi@actiontec.com>
2023-06-01 08:58:14 +02:00
John Crispin
3f79bc76ac ucentral-schema: update to latest HEAD
137615d add vlan_id to uci sections

Signed-off-by: John Crispin <john@phrozen.org>
2023-06-01 08:58:14 +02:00
John Crispin
4820218fc2 netifd: backport 2 status fixes
Fixes: WIFI-12513
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-01 08:58:14 +02:00
John Crispin
b30bcf501a ramips: fix fap640 mac addresses
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-01 08:58:14 +02:00
John Crispin
d9e62da73d ucentral-client: update to latest HEAD
feadd83 handle configuration load/parse error

Fixes: WIFI-12380
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
John Crispin
404a3a4813 ucentral-schema: add strict-isolation example
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
John Crispin
e9f5aec955 ucentral-schema: update to latest HEAD
c3d8380 add new dhcp-relay render code
a39410a remove old dhcp-relay code

Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
John Crispin
9eada6166c ucentral-event: add dhcp-relay support
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
John Crispin
e8875a7375 ucode: backport uci.foreach fix
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
John Crispin
33c4c732c9 dnsmasq: drop old option 82 patch
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
John Crispin
2c8e736fa8 ucentral-schema: update to latest HEAD
84f53b2 add strict_isolation support

Fixes: WIFI-12577
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
John Crispin
e18d485bdc ucentral-schema: update to latest HEAD
11d7374 always set the developer mode flag when generating capabilities

Fixes: WIFI-12270
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
John Crispin
a1678619be ucentral-client: update to latest HEAD
ffd9d6f indicate crashlog inside the connect reason

Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
John Crispin
eec945417d ucentral-schema: upodate to latest HEAD
3afde47 fix generation of bridger block list

Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
John Crispin
cd3fb41eb0 ipq807x: update wf196ca 6G BDF file
Fixes: WIFI-12538
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
John Crispin
0445caf2b8 ipa807x: various fixes for wf186
Fixes: WIFI-12616
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
Venkat Chimata
3bb4304fe4 cybertan: Specify correct images in cybertan profiles
Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2023-05-30 07:56:09 +02:00
Venkat Chimata
2edf5d750c cybertan: Fix build issues with Cybertan APs
Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2023-05-30 07:56:09 +02:00
John Crispin
89d1213f39 ucentral-client: update to latest HEAD
cb5030f crashlog->rebootlog

Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
John Crispin
3eb13481c9 ucentral-schema: update to latest HEAD
27b1d45 cmd_upgrade: create /ucentral.upgrade
7109e62 add captive portal devices to the bridger block list

Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
John Crispin
e2ffc6650c bridger: re-enable inside default images
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
John Crispin
42be849af8 generic: use latest kernel headers when building eBPF tools
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
Felix Fietkau
d9adc8f7a1 hostapd: fix double free in coa-multi patch
Fixes: WIFI-12586
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-05-30 07:56:09 +02:00
John Crispin
399f862bb9 ipq807x: various cig,wf660a improvements
* fix wifi macs
* reset button had the wrong polarity

Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
John Crispin
e73633402c ipq807x: whitespace cleanup
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
Felix Fietkau
acc3d67cff wifi-ax: fix mac80211 crash when dealing with AP vlans
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-05-30 07:56:09 +02:00
John Crispin
c3ab147246 ucentral-schema: update to latest HEAD
694fd64 convert vlan_ifaces to an array

Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
John Crispin
8cbc9e4fb1 bridger: do not include in builds until it is used
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
John Crispin
3fc4414a84 uspot: fix compile error in radius.c for older GCC
/openwrt/build_dir/target-arm_cortex-a7_musl_eabi/uspot/radius.c:264:4: error: label at end of compound statement
    default:
    ^
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:09 +02:00
Thibaut VARÈNE
5d7650a69c uspot: radius.c: use rc_apply_config()
This is required per documentation and may result in segfault if not
used.
Also remove the "servers" settings which is unnecessary in the context
of a single server.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:09 +02:00
Thibaut VARÈNE
e4d81ee5b9 uspot: add support for radius location name
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:09 +02:00
Thibaut VARÈNE
8ec07e0588 uspot: partial rewrite of radius-client
Streamline the code to make it easier to extend supported attributes,
and to clarify code flow. Improve error checking.

Add licensing information (with permission from John Crispin, original
author).

NB: a few things are still hardcoded toward the end of radius(), to be
revisited.

Cc: John Crispin <john@phrozen.org>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:09 +02:00
Thibaut VARÈNE
8262342e1c uspot: initial documentation of config options
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:09 +02:00
Thibaut VARÈNE
a7341b418e uspot: introduce mac_passwd and mac_suffix options
This carries over two Chilli options used during mac authentication:

- macpasswd, which sets a static password when performing mac-auth
- macsuffix, which allows suffixing the mac address provided as username

These options are implemented in config uspot section as:

- option mac_passwd 'password'
- option mac_suffix 'suffix'

If unset, this commit is a NOP.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:09 +02:00
Thibaut VARÈNE
fc80a4aa84 uspot: radius_call: unlink tmp file after exec
If debug is disabled, this commit deletes the temporary json files
passed to radius-client.

Furthermore, to reduce the risk of collision, use a different prefix in
accounting.uc ('uacct') vs common.uc ('acct').

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:09 +02:00
Thibaut VARÈNE
db37e3727d uspot: captive: honor 'debugoff'
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:09 +02:00
Thibaut VARÈNE
d667c2e2b9 uspot: correctly honor "debug=0" configs
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:09 +02:00
Thibaut VARÈNE
b7f8c7e788 uspot: accouting: spell out config load failure
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:09 +02:00
Thibaut VARÈNE
243f42454f uspot/spotfilter: implement captive generate
For basic uspot setups, this commit implements a 'generate' verb to
uspot /usr/bin/captive that takes a config uspot section name, and
parses the following extra options to generate the relevant spotfilter
config:

  option generate_spotfilter (bool) # if unset/false, generate is a NOP
  option interface 'name' # config/network interface name to redirect to
  option client_autoremove (bool) # if set/true, sets client_autoremove
  list wl_hosts '*.example.com' # optional list of whitelist hostnames
  list wl_addrs '1.2.3.4' # optional list of whitelist IPs

"captive generate" is called in spotfilter.init to optionally (depending
on 'generate_spotfilter') create the required spotfilter-XXX.json before
starting spotfilter.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:09 +02:00
Thibaut VARÈNE
74651831ef uspot: configure devices ifnames in section uspot
The current uspot config uses a single named section to assign ifnames
to uspot interfaces like so:

config devices 'devices'
	option wlanc0 'hotspot1'
	option wlanc1 'hotspot1'

Where 'wlanc0' and 'wlanc1' are physical ifnames.

Code in common.uc also hardcodes a check to match ifnames with 'wlanc*'.

This comit gets rid of the "config device" sections and accepts in the
"config uspot" sections e.g.:

	option ifname 'wlanc0'
or
	list ifname 'wlanc0'
	list ifname 'wlanc1'

The listed devices are then associated with the current uspot config
exactly as they were with the previous configuration system.

The hardcoded check in common.uc is also removed, allowing arbitrary
ifnames to be used.

Malformed sections are ignored with a warning. Subsequent duplicate
entries for a given ifname are be ignored with a warning.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:09 +02:00
Thibaut VARÈNE
b44c7b09db uspot: track client sessionid and provide it to UAM
This commit moves session id creation outside of radius_init() and
stores the identifier in ctx and client data, making it available to
various handlers.

The id is added to the list of uam_url parameters to be sent to the
backend.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:09 +02:00
Thibaut VARÈNE
ecc8829a01 uspot: handler: correctly honor mac_auth setting
Suggested-by: John Crispin <john@phrozen.org>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:09 +02:00
Thibaut VARÈNE
8029c318d0 uspot: handler-uam: stop processing after error
The current code would still issue a radius request after showing the
error boilerplate.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:09 +02:00
Thibaut VARÈNE
16cf91b3d2 uspot: fix malformed hex string and buffer overflow
Because _md[32] is defined as "char" instead of "unsigned char" in
uc_md5() and sprintf() is used instead of snprintf(), the resulting
string can be malformed (padded with FF for negative values) and
can overflow the target buffer, producing strings like:

21FFFF0D12FFFF6A48651050FFFF4CFFFFFFBA
FFFFFF16FF3EFF7C6560FFFF6BFFFFFFFFFFE7

The same issue affects the hex_to_str() helper function which uc_md5()
does not use.

This commit addresses these issues by:
- refactoring hex_to_str():
  - accept a const void * input buffer internally cast to uchar
  - use snprintf() and the correct format length modifier 'hh'
- use hex_to_str() in uc_md5()
- adjust uses in other callers to pass sizeof(inbuf)/2 instead of a
  hardcoded number

str_to_hex() is also refactored with the same guidelines to simplify the
code and minimally address sscanf() failures by ending conversion.

While there, document these two helpers.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:09 +02:00
Thibaut VARÈNE
7bbad0ed50 uspot: handler-uam.uc: use ctx.config.uam_port/logoff
Remove hardcoded port and specify the actual logoff request endpoint.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:09 +02:00
Thibaut VARÈNE
c89b054324 uspot: accounting.uc: fix typo
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:08 +02:00
Thibaut VARÈNE
e2abfd7b72 spotfilter: adjust DEPENDS
Add missing kmod-ifb
Remove unused kmod-sched-cake

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:08 +02:00
Thibaut VARÈNE
e55abc109c uspot: fix missing DEPENDS
Add missing:
- ratelimit
- ucode-mod-math
- ucode-mod-nl8011
- ucode-mod-rtnl
- ucode-mod-uloop

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:08 +02:00
John Crispin
7d68d6d5c3 ucentral-schema: update to latest HEAD
e30b05f propagate reboot_cause
11dff2a add dynamic vlans to state messages
505ac1a fix captive uci code for latest captive PR

Fixes: WIFI-12590
Fixes: WIFI-12582
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:08 +02:00
John Crispin
d16b3d6919 ucentra-client: update to latest HEAD
cca938b send connect reason

Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:08 +02:00
John Crispin
e91f49bdbd udevstats: add support for dynamic vlans
Fixes: WIFI-12582
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:08 +02:00
John Crispin
4688ba6996 bridger: add new package
Fixes: WIFI-12577
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:08 +02:00
Venkata Chimata
4a6bc07d61 ipq50xx: Addp support for Cybertan EWW631-A1 and EWW631-B1 APs
EWW631-A1 (Ceiling mount)

Specifications are:

* CPU: Qualcomm IPQ5018
* RAM: 512 MB
* Storage:  256MB NAND-optional.
* Ethernet: 1x GbE
* UART header
* WLAN: 2.4GHz: IPQ5018, 5GHz:  QCN6102
* 3x LED-s à R/G/B PWM control

 Installation instructions:
Connect to UART, pins are like this

XA/XB PCBA UART :
PIN #5   |  #4 |  #3  |  #2  |  #1
GND | x | RX | TX | VCC

XC PCBA UART : (next version hardware board)
PIN  #4  |   #3  |  #2   |  #1
GND | RX | TX | VCC

Settings are 115200 8n1

1. Copy openwrt-ipq807x-cybertan_eww631_a1-squashfs-nand-factory.bin onto the board into /tmp/
2. At board's command prompt, issue sysupgrade -n /tmp/openwrt-ipq807x-cybertan_eww631_a1-squashfs-nand-factory.bin

-----------------------------------------------------------------------

EWW631-B1 (Wall mount)

Specifications are:

* CPU: Qualcomm IPQ5000
* RAM: 256 MB (IPQ5000 inside)
* Storage:  256MB NAND-optional.
* Ethernet: 4x GbE
* UART header
* WLAN: 2.4GHz: IPQ5000, 5GHz:  QCN6102
* 3x LED-s à R/G/B PWM control

Installation instructions:
Connect to UART, pins are like this

Fixes: WIFI-12579
Signed-off-by: Venkata Chimata <venkata@shasta.cloud>
2023-05-30 07:56:08 +02:00
John Crispin
6f5f7bf068 ipq807x: fix reset button on wf666a
Fixes: WIFI-12591
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:08 +02:00
John Crispin
5b27dc31fc ipq807x: fix dualboot on emmc flash chips
Fixes: WIFI-12537
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:08 +02:00
John Crispin
d9d0ae77e9 ipq807x: turn bootconfig into a module
Fixes: WIFI-12537
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:08 +02:00
John Crispin
a195b9e316 ucentral-schema: update to latest HEAD
689b111 make crashlog handler generic for pstore items

Fixes: WIFI-12590
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:08 +02:00
John Crispin
e211647656 ucentral-schema: update to latest HEAD
5d8e9b0 add boot time to the state message

Fixes: WIFI-12593
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:08 +02:00
John Crispin
64b248fad1 ipq807x: various improvements to cig,wf660a
Fixes: WIFI-12592
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:08 +02:00
John Crispin
d792176347 ucentral-schema: update to latest HEAD
4b86496 fix generation of upgrade.tgz

Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:08 +02:00
John Crispin
5bd7b4bc51 ucentral-schema: update to latest HEAD
c112a0c rtty: allow configuration of the mutual tls feature

Signed-off-by: John Crispin <john@phrozen.org>
2023-05-30 07:56:08 +02:00
Felix Fietkau
929ca004c4 ipq807x: backport act_pedit changes
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-05-08 12:19:38 +02:00
John Crispin
848b09b6e1 ucentral-schema: update to latest HEAD
37d7a26 add per core cpu_load to the state message

Signed-off-by: John Crispin <john@phrozen.org>
2023-05-08 10:56:18 +02:00
John Crispin
1061890189 ucentral-client: update to latest HEAD
5597621 improve the logic that detects stale gateway connections

Signed-off-by: John Crispin <john@phrozen.org>
2023-05-08 10:56:18 +02:00
Kishan Shukla
39b1211541 ipq807x: Add ION4XI_WP support
Fixes: WIFI-12581
Signed-off-by: Kishan Shukla <kishan.shukla@hfcl.com>
2023-05-08 10:56:18 +02:00
Piotr Dymacz
08e976af26 ipq807x: include support for dual-image in YunCore AX840
This adds support for dual-image ('rootfs' partitions rotation), for
the YunCore AX840 board. Implementation details are included in the
'base-files' patch this commit adds:

  0060-base-files-minimal-support-for-QCA-runtime-failsafe.patch

Fixes: WIFI-12537
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-05-08 10:56:18 +02:00
Piotr Dymacz
b89ba787fe ipq807x: enable BOOTCONFIG partition support in kernel
This is required for dual-image support ('rootfs' partitions rotation)
used for example on the YunCore AX840.

Fixes: WIFI-12537
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-05-08 09:16:32 +02:00
John Crispin
1548fac62a ipq807x: add dosilicon nand flash support
Fixes: WIFI-12580
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-06 09:21:12 +02:00
John Crispin
3dafdff716 ipq807x: make pstore/pmsg work
Fixes: WIFI-12578
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-04 12:57:52 +02:00
John Crispin
5cd786fb9a ucentral-event: do not flush rate-limit on captive interfaces
Fixes: WIFI-12305
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-04 09:09:21 +02:00
John Crispin
be67c7fa07 ucentral-client: update to latest HEAD
a94e2df added the support to remove old public IP file once it is connected successfully to controller

Fixes: WIFI-12474
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-03 08:57:09 +02:00
John Crispin
5f3f788955 ucentral-client: update to latest HEAD
c500514 reduce PING interval to 60s

Fixes: WIFI-12573
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-02 18:49:35 +02:00
John Crispin
8667eecdcf ucentral-schema: update to latest HEAD
0af4f34 Added support of retrieval of public IP if not existed and reporting in state msg

Fixes: WIFI-12474
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-02 17:46:43 +02:00
John Crispin
47b396873b ucentral-schema: update to latest HEAD
99cd625 captive: allow mutliple instances

Fixes: WIFI-12366
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-02 17:42:17 +02:00
John Crispin
74dd8fc89e uspot: add support for multiple captive portals
Fixes: WIFI-12366
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-02 17:42:17 +02:00
John Crispin
2a75855f23 ucentral-schema: update to latest HEAD
f2a7137 add roaming 'auto' button to data model

Fixes: WIFI-12570
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-02 17:42:17 +02:00
John Crispin
7895a40487 ipq807x: disable GRO by default
Fixes: WIFI-12526
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-25 16:20:54 +02:00
John Crispin
1f9a41b386 mac80211/ath11k: fix num_iface_combinations
Fixes: WIFI-12019
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-24 17:51:34 +02:00
John Crispin
efb57bcc5a ucentral-schema: update to latest HEAD
d7dbe23 allow passing hex values as radius request attributes

Fixes: WIFI-12534
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-24 08:21:07 +02:00
John Crispin
70cdfe7103 ipq807x: update 6G CA BDF
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-12 06:57:02 +02:00
John Crispin
082e96d546 ip807x: fix ath11k-fwtest on cig wf196
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-12 06:57:02 +02:00
John Crispin
3aa1ff70bb certificates: add a mount_cert helper script
Fixes: WIFI-12461
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-12 06:57:02 +02:00
John Crispin
28623fb4b3 ucentral-schema: update to latest HEAD
b918e6a state: some devices will report temperature in milli celssius

Fixes: WIFI-12500
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-12 06:57:02 +02:00
John Crispin
e35aacca4b profiles: update profiles to allow v4.4 and v5.4 to co-exist in CI
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-12 06:57:02 +02:00
John Crispin
91e3140f5a .github/workflows: add additional CI jobs
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-10 14:25:49 +02:00
Ken
5c84541011 ipq807x: Add WF-186w support
Add WF-186w support

Signed-off-by: Ken <xshi@actiontec.com>
2023-04-10 14:25:48 +02:00
John Crispin
b9b03a6e38 ipq95xx: add Qualcomm wifi-7 support
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-10 14:25:48 +02:00
John Crispin
3b6582117b ipq807x: add ath12 / v5.4 support
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-10 14:25:48 +02:00
John Crispin
50cbd4688b ipq807x: make v4.4 and v5.4 co-exist
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-10 14:25:48 +02:00
John Crispin
354089a7f2 base-files: fix target feeds
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-10 14:25:48 +02:00
John Crispin
f669fdaddc cleanup: drop obselete code
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-10 14:25:48 +02:00
John Crispin
267147f971 edgecore: add TPM support
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-10 14:25:48 +02:00
John Crispin
63e8acadfc bluetooth-cc2652: update feed to latest version
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-10 14:25:48 +02:00
John Crispin
690d7655a0 ucentral-event: fix dynamic vlan for devices where the WAN port is not eth0
Fixes: WIFI-12372
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-10 14:25:22 +02:00
jaspreetsachdev
52c39cd3bf Merge pull request #539 from Telecominfraproject/staging-fix-nns-feed
ipq807x: fix qca-nss-clients feed
2023-04-01 08:05:35 -04:00
Arif Alam
ebd7c79e65 ipq807x: fix qca-nss-clients feed
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2023-03-31 18:36:56 -04:00
Piotr Dymacz
560e9f326d mcu: fix host support for multi-slot UART based MCUs
In case of MCU with multiple firmware slots support, change of active
slot requires reset. This obviously results in MCU entering the serial
recovery mode in bootloader, with 5 sec timeout, which in case of UART
based MCUs isn't automatically detected and handled in the same way as
USB based devices (hotplug).

Starting host side support script when the MCU is waiting for MCUmgr
commands during recovery is wrong. This fixes the problem by requesting
UART based MCU to boot the firmware after active slot change followed by
reset. While at it, change also how single slot type MCUs are handled
during upgrade (always request reset after the upgrade).

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-23 08:06:42 +01:00
John Crispin
3da1530926 ratelimit: SSIDs with spaces failed to be configured
Fixes: WIFI-12421
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-23 07:39:11 +01:00
Arif Alam
abcf6dd1fd ipq807x: fix mac address assignment
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2023-03-21 07:57:13 +01:00
Chaitanya Kiran Godavarthi
2bcedafe0d ipa807x: generate an ath11k-macs file on eap104
Signed-off-by: Chaitanya Kiran Godavarthi <chaitanya.kiran@netexperience.com>
2023-03-21 06:23:39 +01:00
Piotr Dymacz
c0cf066900 mcu-firmware: include host support for 'hci_uart' firmware
This includes shell script for host side support of the 'hci_uart' MCU
firmware type. The script calls 'btattach' with matching tty interface
and baud rate as arguments, resulting in new Bluetooth HCI controller
registration in the system. Both UART and USB interfaces are supported.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-20 08:26:50 +01:00
Piotr Dymacz
6462efd6bc mcu: execute host side support script for firmware type
This adds support for executing a host side support script per firmware
type (in our case, full MCU firmware name is a combination of two terms:
'version__type', e.g. 'zephyr-v3.3.x__hci_uart') which currently runs on
the MCU. Additionally, support for calling the init script with 'stop'
argument is included.

The host side support scripts will be placed in '/etc/mcu.d/' and should
have executable flag set and be named after the firmware type, with 'sh'
extension (e.g. 'hci_uart.sh'). This solution assumes also that PID of a
running, related service will be stored in '/var/run/mcu.SN.pid' where
'SN' is the associated MCU serial number.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-20 08:26:50 +01:00
Piotr Dymacz
0bce7dc7a4 mcu-firmware: update 'zephyr-main' to 'cf50a3c570bb' (2023-03-10)
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-20 08:26:50 +01:00
Piotr Dymacz
a3f0fb23b7 mcu-firmware: add support for host side support packages
In case of some of the MCU firmware types, additional setup on the host
side is required before the target application can be used. Example of
such a requirement is a BLE HCI controller on UART bus (firmware type:
'hci_uart') which, before can be registered in system, needs to be
attached to Bluetooth stack (with e.g. 'btattach').

This includes code for generating hidden packages under 'mcu-firmware'
with all the files required for host side support (stored in directory
with the same name as firmware type, under local 'files' directory),
for a selected MCU firmware. For example, below tree:

  ./feeds/mcu/mcu-firmware/files/hci_uart/etc/...

would result in creation of new package 'zephyr-hci_uart-host-support',
included in dependencies lists for all MCU firmware versions of the
'hci_uart' type, with everything from '.../files/hci_uart/'.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-20 08:26:50 +01:00
Piotr Dymacz
b9d20e083c mcu: simplify and fix 'mcu.sh' and 'mcu.hotplug' scripts
This reduces amount of helper functions and fixes also global variables
handle inside 'mcu.sh' and 'mcu.hotplug' shell scripts. While at it,
provide additional debug information when fetching images list and
system information.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-20 08:26:50 +01:00
Piotr Dymacz
725899248a mcu: update MCU if firmware hash doesn't match
This includes simple upgrade (downgrade) capability in the MCU support
package. If hash of firmware installed on the MCU doesn't match the one
available on host's local file system, it will get upgraded.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-20 08:26:50 +01:00
John Crispin
c8685f2352 ucentral-schema: update to latest HEAD
caac3f1 add support for secondary radius server

Fixes: WIFI-11979
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-20 08:26:35 +01:00
John Crispin
7d10d77e35 udevmand: update to latest HEAD
979aca4 mac addresses were never flushed

Fixes: WIFI-11973
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-16 17:08:59 +01:00
John Crispin
96c391eaac ucentral-event: fix captive portal rate-limiting
Fixes: WIFI-12305
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-16 17:08:14 +01:00
John Crispin
c700795895 ipq807x: add cig_wf660a to the CI workflow
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-16 08:30:28 +01:00
John Crispin
8bcb4c2063 ucentral-schema: update to latest HEAD
59c8214 hostapd parses psk-files in reverse order

Fixes: WIFI-12383
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-15 18:23:28 +01:00
John Crispin
ea95356ebd rtty: improve patch indenting
Newer version of GCC complained about inconsistent indenting.

Signed-off-by: John Crispin <john@phrozen.org>
2023-03-15 09:56:09 +01:00
Piotr Dymacz
8111566f35 feeds: ucentral: include BlueZ 5.66
Copy 'bluez' package from OpenWrt's packages master branch to 'ucentral'
feed so that we can use latest version and add custom, local changes.

Keep this within 'ucentral' feeds directory to override version provided
by community based 'packages' feed from OpenWrt 21.02.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-14 15:53:43 +01:00
John Crispin
c952b34858 ucentral-schema: update to latest HEAD
54453a6 cmd_script: custom scripts with no uri failed to send the stdout to the server

Fixes: WIFI-12358
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-14 14:52:23 +01:00
John Crispin
792e3a8a2e rtty: throttle the amount of data being pushed to the server
The socket died when too much data was sent too fast

Fixes: WIFI-12334
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-14 14:41:08 +01:00
John Crispin
ae75067938 ucentral-schema: default to 32 STA max assoc if the driver does not report a valid value
Fixes: WIFI-12355
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-13 15:03:24 +01:00
John Crispin
81b66ad44b dnsmasq: fix handling of option 38
Fixes: WIFI-12260
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-13 11:55:28 +01:00
John Crispin
e193250291 ucentral-schema: update to latest HEAD
5e08879 add additional event types

Signed-off-by: John Crispin <john@phrozen.org>
2023-03-13 07:49:54 +01:00
Piotr Dymacz
dc0dae6284 mcu: select host dependencies based on MCU firmware type
In case of some types of MCU firmware, additional tools, daemons, kernel
drivers, etc. are required on the host side. For example, for Bluetooth
HCI controller, at least kernel module and BlueZ should be included.

This adds a simple recipe which generates dependencies list per firmware
type/name and for existing 'hci_usb' and 'hci_uart', selects 3 packages:
'bluez-daemon', 'kmod-bluetooth' and 'kmod-crypto-user'.

Kernel crypto interface in user space has to be also included because
the BlueZ isn't able to create static address for LE-only controller
without it, which results in no registration of new BT interface:

  bluetoothd[668]: src/adapter.c:get_static_addr() Failed to open crypto
  bluetoothd[668]: No Bluetooth address for index 0

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-10 12:11:06 +01:00
John Crispin
7c535de60d ucentral-schema: update to latest HEAD
204341f state: add port_id and port_desc to lldp state

Fixes: WIFI-11975
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-09 16:40:58 +01:00
John Crispin
26192989cd ipq807x: add CIG WF196 BDF
split the image into 2 SKUs for CA/US.

Fixes: WIFI-12357
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-09 15:14:36 +01:00
John Crispin
317aaadcbd ucentral-schema: update to latest HEAD
0f40765 turn telemetry and realtime filter into an enum

Signed-off-by: John Crispin <john@phrozen.org>
2023-03-08 17:35:43 +01:00
Satya-sc
c670733ea5 ucentral-event: added support to queue the events when there is no ucentral client is running and send those once it is available
Signed-off-by: Satya-sc <Satya@shasta.cloud>
2023-03-08 17:20:21 +01:00
John Crispin
f92617f24a ipq807x: add zephyr specific profiles
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-08 17:18:53 +01:00
Piotr Dymacz
337a68cf1d mcu: ipq807x: add support for CIG WF-196
This includes default configuration for the on-board Nordic nRF52833 MCU
in CIG WF-196. A Zephyr based sample 'hci_uart' firmware is selected.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
e09633fc2a ipq807x: add Zephyr HCI UART MCU firmware to CIG WF-196
Include Zephyr v3.3.x based Bluetooth LE HCI UART firmware package in
default packages list for the CIG WF-196. This brings initial support
for the on-board nRF52833 MCU.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
d838391850 profiles: cig_wf196: include 'mcu' feed
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
d59e58b794 mcu: ipq807x: add support for EdgeCore EAP102
This includes default configuration for the on-board Nordic nRF52840 MCU
in EdgeCore EAP102. A Zephyr based sample 'hci_usb' firmware is selected.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
ee7bf9671a ipq807x: add Zephyr HCI USB MCU firmware to EdgeCore EAP102
Include Zephyr v3.3.x based Bluetooth LE HCI USB firmware package in
default packages list for the EdgeCore EAP102. This brings initial
support for the on-board nRF52840 MCU.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
c4f0f367bc profiles: edgecore_eap102: include 'mcu' feed
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
5f649ea1f4 mcu-firmware: include firmware based on latest Zephyr
This adds Zephyr firmware builds from custom git branch based on the
latest's upstream branch name 'main': 'main__mcu-on-wifi-boards'.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
397c6df34a feeds: mcu: introduce 'mcu-firmware' package
The new 'mcu-firmware' package will provide binary firmware dedicated
for MCU embedded on Wi-Fi boards (and also standalone, e.g. USB based),
supported by the OpenWrt/OpenWiFi projects. Currently, only Zephyr RTOS
based sample firmware ('BLE HCI controller' and 'hello world') files are
provided, for Wi-Fi boards and one standalone development module, listed
below:

- CIG WF-196 (Nordic nRF52833, UART bus)
- EdgeCore EAP102 (Nordic nRF52840, USB bus)
- Nordic nRF52840 Dongle (Nordic nRF52840, USB bus)

Different firmware types planned in future include Nordic's nRF Connect
SDK, OpenThread and others.

The Zephyr based firmware comes from a custom fork available in GitLab:
'https://gitlab.com/pepe2k/zephyr' (firmware in this package were built
from a v3.3.0 release based branch 'zephyr-v3.3.x__mcu-on-wifi-boards').

MCU firmware from this package is compatible only with OpenWrt/OpenWiFi
generic MCU support stack which, among others, assumes availability of
compatible bootloader (MCUboot is currently the only one supported) and
e.g. multiple firmware slots. MCUboot fork development takes part in git
repository hosted in GitLab: 'https://gitlab.com/pepe2k/mcuboot/'.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
7a37e9bf0b mcu: support default configuration with uci-defaults
This adds support for creating initial MCU configuration with use of
'uci-defaults' in a same was as for example 'uboot-envtools' package.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
e4ed881dd7 mcu: support OpenWiFi with uCentral
On device running OpenWiFi with uCentral, additional copy of the initial
UCI configuration will be generated in '/etc/config-shadow/'. As part of
the MCU configuration is done during runtime, after the 'config-shadow'
is created, we should update it as well to keep everything in sync.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
9aff26b7fb mcu: provide example UCI configuration file
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
5603442a37 feeds: mcu: introduce 'mcu' package
This introduces new package 'mcu' which is a collection of shell based
scripts used as glue code for generic MCU configuration and management.

The scripts are responsible for communicating with embedded MCU running
compatible MCUboot bootloader version over MCUmgr/SMP protocol.
The communication is realized based on usage of the introduced earlier
dedicated CLI tool called 'umcumgr.

The most important function of this package is a simple MCU's firmware
management (checking firmware available in the MCU's internal flash,
uploading new and selecting active on multi-firmware slot capable MCU).

This solution requires MCU running modified version of MCUboot,
available in GitLab: https://gitlab.com/pepe2k/mcuboot

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
8a86ae3b7d feeds: add mcu feed with 'umcumgr' package
The 'umcumgr' is a simple command line tool for MCU firmware management
over MCUmgr/SMP protocol. It will be used together with MCUboot running
on the on-board (or external, e.g. in form of a dongle) MCU.

While at it, add also dedicated 'mcu.yml' profile file.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Ken
9997af10a5 CIG WF-660A : Add WF-660a support [patch 3]
Fixed caldata.bin can NOT be generated with EMMC issue.
2023-03-06 10:41:39 +01:00
John Crispin
5fec90d4ca uspot: fix userurl and allow cleartext password
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-06 09:37:17 +01:00
Piotr Dymacz
f1a56edd09 ipq807x: backport some additional fixes for Bluetooth
This backports more fixes for the Bluetooth subsystem from 4.9.
They were found missing during some initial Bluetooth LE testing.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-02 16:43:05 +01:00
Piotr Dymacz
3f03cfa7c4 ipq807x: backport fix for Bluetooth LE-only HCI controllers
This backports an essential fix for Bluetooth LE-only HCI devices from
kernel 4.9: 39385cb5f327 ("Bluetooth: Fix using the correct source
address type").

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-02 16:43:05 +01:00
John Crispin
f34db0bb24 ucentral-schema: update to latest HEAD
5517c1c wifiscan: add additional options to the periodic scan feature

Fixes: WIFI-11993
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-01 17:36:38 +01:00
John Crispin
94d154c628 qca-ssdk: reduce log noise
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-28 16:08:59 +01:00
John Crispin
071962440e ucentral-schema: update to latest HEAD
5287f72 fix wifiscan channel

Fixes: WIFI-11993
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-28 12:21:17 +01:00
John Crispin
5171b52570 hostapd: do not use ubus return codes as auth/assoc errors
Fixes: WIFI-12330
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-27 13:06:32 +01:00
John Crispin
fb282e2aff qca-ssdk: fix UE Roaming between vlans
Fixes: WIFI-11886
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-27 11:52:40 +01:00
John Crispin
5013b9c7fe ipq807x: update WF196 BDF files
Fixes: WIFI-12333
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-24 15:14:50 +01:00
John Crispin
0e2fcfcb95 ucentral-schema: update to latest HEAD
86dc187 the developer mode indication should be in the top level of the capa dictionary
f4aca9b indicate secure-rtty by default

Signed-off-by: John Crispin <john@phrozen.org>
2023-02-24 15:08:32 +01:00
John Crispin
a7ea6ef398 ucentral-event: fix ubus notification and band detect
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-24 15:06:56 +01:00
John Crispin
b4a2291dce ucentral-event: fix boot detection
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-23 11:35:49 +01:00
John Crispin
9348c426e5 ipq807x: fixup yuncore fap650 support
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-23 09:21:12 +01:00
John Crispin
678c4db8f0 ucentral-schema: update to latest HEAD
35cf7bf add more verbose error code to the script command

Signed-off-by: John Crispin <john@phrozen.org>
2023-02-22 15:21:29 +01:00
John Crispin
e979df64d1 ucentral-schema: update to latest HEAD
2ee157f fix health.uc: the events patch left a stray sprintf( breaking compile
ac9e8cf capabilities: add developer mode info to restrictions

Signed-off-by: John Crispin <john@phrozen.org>
2023-02-22 10:57:41 +01:00
Ken
43fa167f14 ipq807x: Add WF-660a support
Fixes: WIFI-12280
Signed-off-by: Ken <xshi@actiontec.com>
2023-02-22 10:03:05 +01:00
John Crispin
2a8858a3a2 uspot: fix an exception in the idle timeout handler
Fixes: WIFI-12282
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-22 09:41:48 +01:00
John Crispin
977d16557a ucentral-event: do not reset rate limit for captive clients
Fixes: WIFI-12305
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-21 15:56:19 +01:00
Satya-sc
3db254c306 ucentral-event: add unit boot-up event 2023-02-20 15:40:30 +01:00
John Crispin
9274c3a719 rtty: enable mTLS support
Fixes: WIFI-10516
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-20 15:40:30 +01:00
John Crispin
993ff2624e ucentral-event: add wired events
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-20 15:40:30 +01:00
John Crispin
60f6565d18 ucentral-event: make the ssh event payload a dictionary
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-20 10:41:14 +01:00
John Crispin
924d30af74 ucentral-event: add bssid to wifi events
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-20 10:40:08 +01:00
John Crispin
c55d19c3c5 ucentral-event: fix polled telemetry stream
Fixes: WIFI-12341
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-20 10:35:53 +01:00
John Crispin
9221c3e7e7 ucentral-schema: update to latest HEAD
bf8c384 properly stream state in telemetry mode

Fixes: WIFI-12314
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-20 10:33:03 +01:00
John Crispin
eb862cf2d2 ucentral-client: update to latest HEAD
2917158 ubus fix dump all telemetry

Fixes: WIFI-12314
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-20 10:32:19 +01:00
John Crispin
1e3cef1a26 mac80211: backport 230-get_txpower.patch
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-15 15:46:39 +01:00
Piotr Dymacz
50fd49fd3d ipq807x: eap102: keep MCU disabled by default
This would simplify MCU setup after bootup.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-02-15 15:21:45 +01:00
Piotr Dymacz
8e8a763485 ipq807x: eap102: export more USB related pins
This exports USB related pins in sysfs using 'gpio-export' as:
- usb-rear-power
- usb-side-power
- usb-hub-enable (renamed from 'usb-enable')

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-02-15 15:21:45 +01:00
Piotr Dymacz
ab47566e82 ipq807x: eap102: add more pin configs for USB and MCU
This adds few more pin configs for USB (rear and side ports power) and
MCU (reserved pin, apparently used by device vendor for DTM enable).

While at it, align labels and nodes names with staging branch.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-02-15 15:21:45 +01:00
Piotr Dymacz
e9a834c205 ipq807x: wf196: keep MCU disabled by default
This would simplify MCU setup after bootup.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-02-15 15:21:45 +01:00
Piotr Dymacz
6dc524e67b ipq807x: wf196: export MCU reset pin
This exports MCU reset pin as 'mcu-enable' in sysfs with 'gpio-export'.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-02-15 15:21:45 +01:00
Piotr Dymacz
b61b3aa06f ipq807x: wf196: add pin config for MCU reset
This adds config for nRF52833 MCU reset pin on the CIG WF-196.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-02-15 15:21:45 +01:00
Piotr Dymacz
b9d43eb897 ipq807x: tidy up CIG WF-196 DTS file
This change focuses on the I/O related cleanups for the CIG WF-196 DTS
file. Most of the removed definitions come from QCA reference files and
should have been adjusted for a custom board. List of changes:

1. Drop 'btcoex' pinctrl mux define
   WF-196 includes nRF52833 MCU which doesn't have dedicated PTA coex
   hardware interface (see [1] for software based solution in Nordic's
   nRF Connect SDK). Based on the real hardware research, defined pins
   from 'btcoex' mux aren't routed to nRF52833 MCU.

2. Drop 'spi_3' pinctrl mux define
   Defined label isn't used as reference in any other node and defined
   GPIOs most likely aren't used as well.

3. Drop GPIO 46 and 47 from hsuart pinctrl mux define
   It turned out that only UART TX and RX lines are routed between the
   main SOC (IPQ8072A) and the MCU (nRF52833).

While at it, fix also some broken indentation and redundant new lines.

[1] https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/mpsl/doc/bluetooth_coex.html

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-02-15 15:21:45 +01:00
John Crispin
c069ba71cc ucentral-schema: update to latest HEAD
8c71638 fix listing mesh interfaces inside state
c3f6981 sysupgrade: GW sends FWsignature and not signature
94543ee state: cleanup and document the data model
6056d32 state: add [ avg, max ] cpu thermal sensor
900ce67 add phy temperature to state messages

Signed-off-by: John Crispin <john@phrozen.org>
2023-02-13 17:15:08 +01:00
John Crispin
df01a9acc0 ucentral-event: fix rtnl support
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-13 17:13:37 +01:00
Felix Fietkau
e0aa0eec98 ucode: add refcount fixes for rtnl/nl80211
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-13 15:24:52 +01:00
Tanya Singh
2a145ba46a WIFI-12182: Support Edgecore OAP100e
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2023-02-13 09:13:57 +01:00
John Crispin
9f34e57df8 ucentral-event: fix typo in events.json
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-08 09:04:30 +01:00
John Crispin
9c8affad09 ucode: backport rtnl notifications
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-08 08:43:31 +01:00
John Crispin
cd76797336 ucentral-schema: update to latest HEAD
17e7a3e fix lldp_description

Fixes: WIFI-12269
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-08 08:42:21 +01:00
John Crispin
feb26f21fd ucentral-event: add wifi-scan service
Fixes: WIFI-11993
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-06 11:52:46 +01:00
Tanya Singh
5ff23ce3cf busybox: Fix Zero touch provisioning with DHCP option 138
Fixes: WIFI-12260
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2023-02-06 07:47:17 +01:00
Ravi Vaishnav
cacb8a23dd hostapd: Code for secondary RADIUS
Signed-off-by: Ravi Vaishnav <ravi.vaishnav@netexperience.com>
2023-02-05 09:41:55 +01:00
John Crispin
f5604d42f6 upgs: add package to default package selection
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 15:55:21 +01:00
John Crispin
8f74933b37 ucentral-schema: update to latest HEAD
f4f2e69 add cig_sha256

Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 14:32:15 +01:00
Venkat Chimata
2d92eeab07 openssl is needed to verify the command signatures 1. Enable openssl in AP firmware 2. Copy /certificates/sign_pubkey.pem into /etc/ucentral at boot time
Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2023-01-27 14:29:54 +01:00
John Crispin
c44ab8b4e6 ugps: update to latest HEAD
Fixes: WIFI-12238
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 14:25:41 +01:00
John Crispin
d3ad594940 ucentral-schema: update to latest HEAD
242a1a1 gps: add support to the data model

Fixes: WIFI-12238
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 13:41:58 +01:00
John Crispin
8f53da4f79 hostapd: make radius rate-limit work with new event listener framework
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
John Crispin
1cc9673e8c disable none active services
Fixes: WIFI-12237
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
Ravi Vaishnav
258e484d5f uboot-envtools: Fix syntax on number of sectors
ProblemStatement: On EAP104, "fw_setenv" fails with the error "MTD erase error on /dev/mtd10: Invalid argument"
RootCause: uboot-envtools expects hex format for the number of sectors while the config file (/etc/fw_env.config) contains a decimal number format for the number of sectors. This leads to out-of-boundary size calculation within the function "environment_end()".
Solution: Update the scripts to write a hex value instead of a decimal value in the config file.

Reference for the expected format from the config file: Please check the function "get_config" in the file "fw_env.c", where the function uses sscanf to read the parameters from the config file.

Fixes: WIFI-12189
Signed-off-by: Ravi Vaishnav <ravi.vaishnav@netexperience.com>
2023-01-27 12:18:37 +01:00
John Crispin
7edbe99599 ucentral-schema: update to latest HEAD
cd97d41 make sure that restricted country code errors get propagated

Fixes: WIFI-12001
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
John Crispin
fbcfddfbdc initial events support
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
John Crispin
0e75b82eb6 uspot: allow adding IPs to the walled-garden
Fixes: WIFI-12032
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
John Crispin
492db67f64 base-files: sysupgrade: always imply -n if -f is not provided
This ensures that no random config giles get carried over.

Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
John Crispin
6129f525d5 udevstats: add new package
This package uses eBPF to do traffic accounting ont he WAN port

Fixes: WIFI-12183
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
Oleksandr Mazur
2ec381534e ucentral-client: health: remove redundant check for zero value
config_get is issued with a default (120) parameter, which makes a check for 0
a redundant.
It can be safely removed, as the check for "[ "$interval" -eq 0 ]" is
always non-zero.

Fixes 396e2bd06c ("ucentral-client: cleanup health parameter")

Tested on virtual Wlan-AP img: no syntax error occured.

Signed-off-by: Oleksandr Mazur <cahbua@gmail.com>
2023-01-27 12:18:37 +01:00
John Crispin
29d6d9f1ea ucentral-schema: update to latest HEAD
47b470f make captive portal radius-gw-proxy aware

Fixes: WIFI-11705
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
John Crispin
a530af9354 uspot: fix endless STOP frames and add radius-gw-proxy
Fixes: WIFI-12044
Fixes: WIFI-11705
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
John Crispin
e42fd1e3a4 ucentral-client: update to latest HEAD
568a84a do not enforce CN validation when in self-signed mode

Fixes: WIFI-12099
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
John Crispin
30cfc34e1c opennds: drop package
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
John Crispin
0737a706ec ubpf: drop feed
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
John Crispin
b3589c92dc p4: drop feed
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
John Crispin
0f40cb8e77 ucentral-schema: update to latest HEAD
7f77f02 state: add [ avg, max ] cpu thermal sensor
e635ab8 add phy temperature to state messages

Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
John Crispin
a051edcd00 ucentral-client: remove sysupgrade preserved config
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
John Crispin
18b19c92be ucentral-wifi: deprecate package
Fixes: WIFI-11926
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
John Crispin
a2eabf35e3 ucentral-schema: update to latest HEAD
9dc66d7 fix listing mesh interfaces inside state
ad84690 only set port counter if they are available

Fixes: WIFI-11994
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
Johann Hoffmann
0dfe43f1e6 Add patches/x86 directory to config.yml
Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
2023-01-27 12:18:37 +01:00
John Crispin
20cda84f47 netifd: allow disabling unicast_to_multicast conversion on bridged wifi
Fixes: WIFI-11550
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
John Crispin
0228173d53 uspot: add mac-auth support
Fixes: WIFI-11895
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-27 12:18:37 +01:00
John Crispin
0db604ad1e Revert "ucentral-schema: update to latest HEAD"
This reverts commit e8bd819e39.
2023-01-16 16:46:48 +01:00
John Crispin
c53d342b6a uspot: fix exception during rediret
Fixes: WIFI-11995
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-16 14:56:17 +01:00
John Crispin
42e77e6f5a ipq807x: fix MAC assignment on WF188n
Fixes: WIFI-12090
Signed-off-by: John Crispin <john@phrozen.org>
2023-01-16 12:57:15 +01:00
John Crispin
e8bd819e39 ucentral-schema: update to latest HEAD
ec657b5 improve stability of reading counters

Signed-off-by: John Crispin <john@phrozen.org>
2023-01-13 14:09:25 +01:00
John Crispin
0c03b63c0f ucentral-schema: update to latest HEAD
ad84690 only set port counter if they are available

Signed-off-by: John Crispin <john@phrozen.org>
2023-01-12 06:02:39 +01:00
jaspreetsachdev
5ed2f1d964 Merge pull request #509 from Telecominfraproject/v2.8.0-rc4
V2.8.0 rc4
2022-12-20 10:16:06 -05:00
Jaspreet Sachdev
515793450e Merge branch 'main' into v2.8.0 2022-12-20 10:14:56 -05:00
John Crispin
541e9b0b4f ucentral-schema: update to latest HEAD
4278dfb gre: add dont fragment flag

Signed-off-by: John Crispin <john@phrozen.org>
2022-12-20 11:00:42 +01:00
jaspreetsachdev
24611df4c6 Merge pull request #508 from Telecominfraproject/v2.8.0-rc3
V2.8.0 rc3
2022-12-19 17:47:11 -05:00
Jaspreet Sachdev
083010d43c Merge branch 'main' into v2.8.0 2022-12-19 13:38:29 -05:00
John Crispin
f9b46fd6b0 ucentral-schema: update to latest HEAD
39dad34 wireguard: fix reload after reboot

Fixes: WIFI-12002
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-19 13:02:46 +01:00
John Crispin
74eb6f96ab atfpolicy: reduce ubus_wait timeout to 2s
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-19 13:01:49 +01:00
John Crispin
4967fcd2be hostapd: improve multi CoA support
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-18 15:25:27 +01:00
John Crispin
e973110de7 ath11k: fix mac assignment on cig wf196
Fixes: WIFI-11976
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-17 10:43:04 +01:00
John Crispin
a62503328b .github/workflows: add cig,wf194c4
Fixes: WIFI-11983
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-16 16:15:47 +01:00
John Crispin
e42051d3a9 hostapd: add dynamic_own_ip support
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-15 12:03:31 +01:00
John Crispin
e5336b7351 ucentral-schema: update to latest HEAD
b539203 include APVLAN associations inside state messages

Fixes: WIFI-11861
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-14 17:09:46 +01:00
John Crispin
5469af35f1 ucentral-schema: update to latest HEAD
6049cd7 various state improvements

Fixes: WIFI-11967
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-14 11:53:51 +01:00
John Crispin
8c9cd8f9d2 ratelimit: fix syntax error during parsing of wlanX-Y
Fixes: WIFI-11965
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-13 16:50:58 +01:00
John Crispin
8b3ac5ea36 uspot: purge pending flows during flush
Fixes: WIFI-11908
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-12 11:46:09 +01:00
John Crispin
c230825486 uspot: do not send accounting off upon logoff
Fixes: WIFI-11907
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-12 11:45:57 +01:00
John Crispin
e8b0f5da60 ucentral-schema: update to latest HEAD
53e3bb4 radio.channel should not be an array

Signed-off-by: John Crispin <john@phrozen.org>
2022-12-12 10:43:34 +01:00
John Crispin
bc45e11824 ucentral-schema: update to latest HEAD
e336aa4 add username to captive state

Fixes: WIFI-11896
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-12 08:22:56 +01:00
John Crispin
d6b3e97c34 ucentral-schema: update to latest HEAD
195ed80 fix multicast to unicast conversion on wifi

Fixes: WIFI-11550
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-12 07:44:48 +01:00
jaspreetsachdev
d35a12b4f4 Merge pull request #506 from Telecominfraproject/v2.8.0-rc2
V2.8.0 rc2
2022-12-09 13:33:12 -05:00
John Crispin
a42f103500 .github/workflows/: add yuncore fap640 to CI builds
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-08 18:14:44 +01:00
John Crispin
dc2a48c515 ucentral-schema: update to latest HEAD
f3c9972 state: add ssid counters
0329b38 state: make the tid-stats opt-in

Fixes: WIFI-11234
Fixes: WIFI-11928
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-08 18:09:20 +01:00
John Crispin
db617e23f0 ipq807x: do no keep uboot-env config during sysupgrade
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-08 15:31:30 +01:00
John Crispin
71189b1b74 ramips: add yuncore fap640 support
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-08 15:31:13 +01:00
John Crispin
5567de89e6 ipq807x: add yuncore fap650
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-08 10:12:54 +01:00
John Crispin
5430d79f53 .github/workflows/: add yuncore devices to CI
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-08 07:45:19 +01:00
John Crispin
9d82d88a0c ucentral-schema: update to latest HEAD
084fa1a use ucode handler to get channel survey
870a719 improve DFS channel restrictions

Signed-off-by: John Crispin <john@phrozen.org>
2022-12-07 17:48:18 +01:00
John Crispin
0e264203de luci-mod-ucentral: add diagnostic download button
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-07 17:47:33 +01:00
John Crispin
469443da2a profiles: fix indio image paths
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-07 12:03:04 +01:00
John Crispin
692958d2fd uspot: fix idle-timeout handling
Fixes: WIFI-11208
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-07 11:55:20 +01:00
Kishan Shukla
e65fa74071 ucentral-schema: add gre6 example config
Signed-off by: Kishan Shukla <kishan.shukla@hfcl.com>
2022-12-05 18:49:29 +01:00
Sohail Ahmad
fb64d45c39 From: Sohail Ahmad <sohail@indionetworks.com> Date: Mon Dec 5 02:58:36 2022 +0000 Subject: [PATCH] dnsmasq: enabled EDNS configuration options- CPE ID and subnet
Signed-off-by: Sohail Ahmad <sohail@indionetworks.com>
2022-12-05 11:45:06 +01:00
John Crispin
71e5c8f441 ucentral-schema: update to latest HEAD
c6ba7ce add diagnostic script support
5d70069 cmd_script: add an additional return json when upload was triggered

Signed-off-by: John Crispin <john@phrozen.org>
2022-12-05 11:13:46 +01:00
John Crispin
8e34f6653c .github/workflows/: add Indio's 11ax 2x2 models (indoor and outdoor) targets
Signed-off-by: Sohail Ahmad <sohail@indionetworks.com>
2022-12-02 14:45:06 +01:00
Rick Sommerville
bee060b9bb udhcpsnoop: snoop clients in GRE tunnel
Fixes WIFI-11710

Signed-off-by: Rick Sommerville <rick.sommerville@netexperience.com>
2022-12-02 14:16:01 +01:00
Arif Alam
e3e94fe520 base-files: make EAP104 switch ports configurable
Fixes WIFI-11709

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2022-12-02 14:14:41 +01:00
John Crispin
237c090cb4 uspot: add max octet support
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-02 14:06:43 +01:00
John Crispin
74ea7a7a1e ucentral-schema: update to latest HEAD
efd60c9 add maximum_clients_ignore_probe support

Signed-off-by: John Crispin <john@phrozen.org>
2022-11-29 14:30:54 +01:00
John Crispin
330dbd49e6 uspot: properly set the ssid inside a UEs state
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-29 14:30:54 +01:00
John Crispin
a84b047061 ucode: fix a memory corruption
the uloop binding was not closing the uloop epoll fd correcttl when forking.

Signed-off-by: John Crispin <john@phrozen.org>
2022-11-29 14:30:54 +01:00
John Crispin
3795060bf2 uspot: properly terminate Acct when /logoff happens
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-29 14:30:54 +01:00
Johann Hoffmann
e61ab97815 .github/: Patch workflows with regard to deprecated Github actions commands (#502)
* Update checkout action version and replace set-output command
* Put whole echo statement in double quotes
* Replace set-output commands in action as well

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
2022-11-29 14:30:34 +01:00
Piotr Dymacz
0162828df8 ipq807x: eap102: export MCU and USB reset pins
This exports MCU and USB reset pins in sysfs using 'gpio-export' as
'mcu-enable' and 'usb-enable'.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-11-23 14:55:03 +01:00
Piotr Dymacz
73cfef1203 ipq807x: eap102: add pin configs for USB and MCU reset
This adds configuration for reset pins connected with nRF52840 MCU and
the GL850G USB HUB on the EdgeCore EAP102.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-11-23 14:54:53 +01:00
Piotr Dymacz
3eb6360054 ipq807x: tidy up EdgeCore EAP102 DTS file
This change focuses on the I/O related cleanups for the EdgeCore EAP102
DTS file. Most of the removed definitions come from QCA reference files
and should have been adjusted for a custom board. List of changes:

1. Drop 'btcoex' pinctrl mux define
   EAP102 includes nRF52840 MCU which doesn't have dedicated PTA coex
   hardware interface (see [1] for software based solution in Nordic's
   nRF Connect SDK). Based on the real hardware research, defined pins
   from 'btcoex' mux aren't routed to nRF52840 MCU.

2. Drop 'hsuart' pinctrl mux define and 'serial_blsp2' node
   Only one UART interface is used on the EAP102.

3. Drop 'usb_mux_sel' pinctrl mux
   Defined label isn't use as reference in any other node and defined
   GPIO most likely isn't used as well.

4. Disable 'pcie0' and remove 'pcie0' pinctrl mux
   EAP102 doesn't use of any of the IPQ8071A PCIe buses.

[1] https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/mpsl/doc/bluetooth_coex.html

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-11-23 14:54:49 +01:00
Piotr Dymacz
47e4bc585a ipq807x: add named gpio exports
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-11-23 14:54:12 +01:00
John Crispin
3746722a4d uspot: redirect to UAM server upon /logoff
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-23 13:34:31 +01:00
John Crispin
5828971cfe uspot: add support for propagating the Class VAP (25)
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-23 09:00:38 +01:00
John Crispin
dd911cbf21 uncentral-schema: update to latest HEAD
74fc62b captive: add /logout as a valid logoff path
18f7d08 captive: block remaining non-auth traffic in NAT mode
eb0c25c add signature verification wrapper
ef06d00 Add Support for EOGREv6

Fixes: WIFI-10887
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-23 09:00:38 +01:00
John Crispin
f167553348 spotfilter: do not flush ip addresses upon logoff
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-23 09:00:38 +01:00
John Crispin
d483c55c14 uspot: allow /logout in addition to /logoff
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-23 09:00:38 +01:00
John Crispin
d9815c0f62 radius-gw-proxy: fix possible memory corruption
Fixes: WIFI-10964
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-23 09:00:38 +01:00
John Crispin
daadf043d8 spotfilter: fix idle detection
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-23 09:00:38 +01:00
John Crispin
1a56d5820d ratelimit: improve hotplug trigger
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-23 09:00:38 +01:00
John Crispin
8e2f2fcce3 hostapd: add dynamic_probe_resp support
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-23 09:00:38 +01:00
John Crispin
fc5a841563 ucentral-schema: update to latest HEAD
c72603f wifi.station: code was incorrectly reporting MCS value inside NSS field

Fixes: WIFI-11599
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-14 16:05:36 +01:00
John Crispin
d511a338df uspot: add userurl to uam redirect parameters
Fixes: WIFI-11539
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-14 10:44:14 +01:00
John Crispin
a3d348b664 ipq807x: add initial support for MUXI AP3220L
Hardware:
* SoC: Qcom IPQ5018
* RAM: 512MB
* Flash: 4MB Nor + 128MB Nand
* Ethernet: 2x GbE
* WLAN: 2x2 2.4GHz 574Mbps(builtin) + 2x2 5GHz 2400Mbps(qcn6122)
* BT: BT5.1(builtin) / nrf52840(option)
* LEDS: 1x power, 1x 2G, 1x 5G
* Buttons: 1x reset
* USB: 1x 2.0(Type-A)
* Power: DC 12V/2A, PoE 48V/0.6A
* UART: 1x RJ45

Flash instruction under U-Boot:
tftpboot 0x44000000 openwrt-ipq807x-muxi_ap3220l-squashfs-nand-factory.bin
imxtract 0x44000000 ubi
flash rootfs
reset

Signed-off-by: angliu-muxi <ang.liu@muxi-connect.com>
2022-11-14 09:21:06 +01:00
Kishan
b48506b156 ip807x: HFCL WiFi6 ION4X and ION4X_2 target addition
Fixes: WIFI-11576
Signed-off by: Kishan Shukla <kishan.shukla@hfcl.com>
2022-11-14 08:19:36 +01:00
Isaev Ruslan
17bb88b67a ipq807x: wifi-ax/ath11-firmware/Makefile yuncore ax840 fix This define recipe for yuncore ax840 device to copy firmware to the correct location.
Signed-off-by: Isaev Ruslan <legale.legale@gmail.com>
2022-11-14 07:47:20 +01:00
John Crispin
578a616b00 ipq807x: ipq6018 based boards caldata size fix
This fixes size of the caldata for ipq60xx based boards and moves the
YunCore AX840 to correct case block (the board is IPQ60xx based, so
the driver looks for ath11k/IPQ6018/hw1.0/caldata.bin,
not ath11k/IPQ8074/hw2.0/caldata.bin). Without this fix, the driver
isn't able to fetch caldata:
[ 16.792551] ath11k c000000.wifi: qmi failed to load CAL data file:caldata.bin

Signed-off-by: Isaev Ruslan <legale.legale@gmail.com>
2022-11-14 07:47:20 +01:00
Piotr Dymacz
93f603e27c base-files: fix foreign sysupgrade detection
Backups are gzipped, include the missing 'z' parameter in 'tar' call.
While at it, make 'grep' call quiet (add 'q' parameter).

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-11-14 07:47:20 +01:00
John Crispin
09b513550c ucentral-schema: update to latest HEAD
b4b8e19 fix wifi unicast conversion
83761f9 fix dtim-period handling

Fixes: WIFI-11550
Fixes: WIFI-11546
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-14 07:47:20 +01:00
John Crispin
5e451461cf central-client: update to latest HEAD
5f69da7 send restricted=1 on locked units

Signed-off-by: John Crispin <john@phrozen.org>
2022-11-14 07:47:20 +01:00
John Crispin
fd33396acb ucentral-schema: update to latest HEAD
129d75a add final-redirect-rul for cpative portal support

Signed-off-by: John Crispin <john@phrozen.org>
2022-11-14 07:47:20 +01:00
John Crispin
3bdfa68ff5 dnsmasq: ignore dhcp events on spotfilter-ifb
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-14 07:47:20 +01:00
John Crispin
3dbc070f2c uspot: add final-redirect-url
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-14 07:47:20 +01:00
John Crispin
b48e5eb057 ucentral-schema: add ASB bundle.uc
Fixes: WIFI-10967
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-14 07:47:20 +01:00
John Crispin
3501bd9c11 ucentral-schema: update to latest HEAD
a509308 rssi thresholds are iface and not bss options

Signed-off-by: John Crispin <john@phrozen.org>
2022-11-14 07:47:20 +01:00
John Crispin
70635ac911 ucentral-schema: update to latest HEAD
85698d2 move health_check settings tp the metric deictionary

Fixes: WIFI-11262
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-14 07:47:20 +01:00
John Crispin
f9a00b7ebd ucentral-schema: update to latest HEAD
9968cb6 cmd_trace: limit maximum file size to 25% of free mem

Fixes: WIFI-11224
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-14 07:47:20 +01:00
John Crispin
5bec28b7e5 ucentral-client: update to latest HEAD
6e774f6 upload: delete files after the upload completed

Fixes: WIFI-11224
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-14 07:47:20 +01:00
Venkat Chimata
e41818470f Updating the board files for Liteon WPX8324.
Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2022-11-14 07:47:20 +01:00
John Crispin
a31422d3d7 ucentral-schema: update to latest HEAD
f941f47 healthcheck: set 60s as the minimum interval
85495ab wifi.iface was not converting 6G channels correctly

Signed-off-by: John Crispin <john@phrozen.org>
2022-11-14 07:47:20 +01:00
John Crispin
bea3d2c4f8 usteer2: add new package
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-14 07:47:20 +01:00
John Crispin
4c4cb58027 ucentral-schema: update to latest HEAD
8d4384b add session-timeout to captive support
516829a add client kick threshold support
5a5085b add uci_section to wifi uci

Signed-off-by: John Crispin <john@phrozen.org>
2022-11-14 07:47:20 +01:00
John Crispin
4312a42b62 ucentral-client: update to latest HEAD
e39e9c2 add wildcard CN validation

Fixes: WIFI-10419
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-14 07:47:20 +01:00
John Crispin
011e5b6e1a ucentral-schema: update to latest HEAD
0856cd5 add support for wifi mac acl

Signed-off-by: John Crispin <john@phrozen.org>
2022-11-14 07:47:20 +01:00
John Crispin
8233c10569 .github: add wallys_dr6018_v4 to the build pipeline
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-04 11:20:07 +01:00
John Crispin
fb73d889ed udevmand: update to latest HEAD
3d2b67b use u64 when reporting interface counters

Fixes: WIFI-11235
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-02 16:34:38 +01:00
John Crispin
80bfb8671d spotfilter: fix sta detection when multiple ifaces are tracked
Fixes: WIFI-11272
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-29 08:56:04 +02:00
John Crispin
521df1a142 mac80211-ax: add NL80211_EXT_FEATURE_CAN_REPLACE_PTK0
Rekeying PTK for STA 2e:54:0a:55:25:c6 but driver can't safely do that.
Rekeying PTK for STA 48:26:2c:3e:b0:f4 but driver can't safely do that.
ath11k c000000.wifi: failed to flush transmit queue 0

Fixes: WIFI-11004
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-28 16:32:53 +02:00
John Crispin
72a75b72ac ipq807x: properly assign macs on wf196
Fixes: WIFI-10939
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-28 16:32:42 +02:00
jaspreetsachdev
c22dce10d3 Merge pull request #486 from elludraon/readme
Update README.md
2022-10-20 15:24:47 -04:00
Jeffrey Han
8eb801a0cc Update README.md
Signed-off-by: Jeffrey Han <39203126+elludraon@users.noreply.github.com>
2022-10-19 17:04:14 -07:00
jaspreetsachdev
6eaef7adad Merge pull request #484 from Telecominfraproject/2.7.1-fixes-from-next
2.7.1 fixes from next
2022-10-17 15:41:09 -04:00
John Crispin
0272d4bcad hostapd: AAA WISPr rates are sent as mbit
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-17 15:35:20 -04:00
John Crispin
41c64e9978 spotfilter: fix a use-after-free
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-17 15:35:20 -04:00
John Crispin
9c2f0a098d uspot: dns_state was not getting reset correctly when flushing a client
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-17 15:35:20 -04:00
John Crispin
0bb8d0dcc0 uspot: Session-Timeout AVP was not correctly honoured
Fixes: WIFI-10663
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-17 15:35:19 -04:00
John Crispin
a542660072 uspot: idle-timeout failed for non radius backed clients
Fixes: WIIF-11208
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-17 15:35:19 -04:00
John Crispin
8ee15d0053 uspot: fix unreolved variable in mac-format handler
Fixes: WIFI-11204
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-17 15:35:19 -04:00
John Crispin
311515867c uspot: add ssid to called-station-id
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-17 15:35:19 -04:00
jaspreetsachdev
16bbcddd40 Merge branch 'main' of github.com:Telecominfraproject/wlan-ap 2022-10-17 14:24:06 -04:00
John Crispin
a4b663b824 ucentral-schema: update to latest HEAD
329dffa add captive portal info to state messages
f3ee560 start the uspot service if captive is enabled
7da0185 allow defining the format of MAC sent to AAA in captive mode
2dfbeff rename wlancaptive -> wlanc, netdev name got too long when creating the IFB device
1784f7e add 'none' mode to wifi-steering
abeb712 broadband: the DNS was not getting applied in static configuration
0fbe7d5 various captive portal improvements

Fixes: WIFI-10665
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-06 07:02:49 +02:00
John Crispin
736ab2b803 uhttpd: update to latest HEAD
Fixes: WIFI-10665
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-06 07:02:49 +02:00
John Crispin
cd2fbd11f2 captive: add missing UAM/ACCT/rate features
Fixes: WIFI-10665
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-05 16:26:01 +02:00
John Crispin
708fe70e75 ucentral-schema: update to latest HEAD
a473fe2 restart ratelimit daemon after config apply
ec58d3a do not auto-expire captive clients

Fixes: WIFI-10190
Fixes: WIFI-10194
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-05 16:25:50 +02:00
John Crispin
0c9499c085 ratelimit: replace script with daemon
Fixes: WIFI-10190
Fixes: WIFI-10194
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-05 16:25:48 +02:00
John Crispin
d52d4ff627 ucode: update to latest HEAD
Fixes: WIFI-10190
Fixes: WIFI-10194
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-05 16:25:37 +02:00
Venkat Chimata
324df56861 ipq50xx: Addp support for Liteon WPX8324 AP
Specifications are:
* CPU: Qualcomm IPQ5018
* RAM: 512 MB
* Storage: 16MB ROR, 128MB NAND-optional.
* Ethernet: 2x GBe
* UART header
* WLAN: QCN6122 + QCN8080
* 3x LED-s

Installation instructions:
Connect to UART, pins are like this (from the edge on LEDS):
-> GND | RX | TX | GND | VCC

Settings are 115200 8n1

1. Copy openwrt-ipq807x-liteon_wpx8324-squashfs-nand-factory.bin (attached) onto the board into /tmp/
2. At board's command prompt, issue sysupgrade -n /tmp/openwrt-ipq807x-liteon_wpx8324-squashfs-nand-factory.bin

Fixes: WIFI-10929
Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2022-10-05 16:25:14 +02:00
Felix Fietkau
a21a08e8bf ipq807x: backport sched matchall classifier support
Fixes: WIFI-10190
Fixes: WIFI-10194
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-10-05 16:24:34 +02:00
John Crispin
393db0ec2a mac80211: fix typo
The detection of multi_bssid was using bad syntx, this caused the wifi MAC
of some boards to change.

Signed-off-by: John Crispin <john@phrozen.org>
2022-10-04 07:21:27 +02:00
jaspreetsachdev
ca26d347eb Merge branch 'main' of github.com:Telecominfraproject/wlan-ap 2022-09-29 21:53:47 -04:00
Sohail Ahmad
c56b7adea8 ipq807x: Support for Indio WiFi6 AP -indoor and outdoor models based on IPQ6000
Fixes: WIFI-10802
Signed-off-by: Sohail Ahmad <sohail.ahmad@wifi-soft.com>
2022-09-26 22:06:53 +02:00
Felix Fietkau
84d31765db qosify: update to the latest version
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-26 22:06:53 +02:00
Arif Alam
fb617ea136 ipq807x: Fix EAP104 upgrade
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2022-09-26 22:06:53 +02:00
John Crispin
47468145c6 spotfilter: add a maissing v5.4 kernel backport
fixes an off-by-one bug in the validator

Signed-off-by: John Crispin <john@phrozen.org>
2022-09-26 22:06:53 +02:00
John Crispin
854c8a44d4 ucentral-client: update to latest HEAD
update wifi-scan timeout to 120s

Signed-off-by: John Crispin <john@phrozen.org>
2022-09-26 22:06:53 +02:00
John Crispin
86948e1052 ucentral-schema: update to latest HEAD
55b8272 add support for overriding country codes

Signed-off-by: John Crispin <john@phrozen.org>
2022-09-26 22:06:53 +02:00
Felix Fietkau
39053d366d qosify: update to the latest version
fixes classification on linux 4.4

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-26 22:06:53 +02:00
Felix Fietkau
daaed910da wifi-ax: backport mac80211 WME classification fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-26 22:06:53 +02:00
John Crispin
bf6abd80dd mac80211: fix multiple bssid mac addresses
Fixes: WIFI-10596
Signed-off-by: John Crispin <john@phrozen.org>
2022-09-26 22:06:53 +02:00
Jaspreet Sachdev
e74e22e184 .github/workflows: Removed deprecated targets
Signed-off-by: Jaspreet Sachdev <jaspreetsachdev@fb.com>
2022-09-26 22:06:53 +02:00
John Crispin
b8f5e17e38 uspot: fix a typo causing config to not load correctly
Signed-off-by: John Crispin <john@phrozen.org>
2022-09-26 22:06:53 +02:00
Simon Kinane
956a31db8f uspot: Improve HTML for captive portal UI
Signed-off-by: Simon Kinane <skinane@fb.com>
2022-09-26 22:06:15 +02:00
Sohail Ahmad
9eeefa2fbf ipq807x: Support for Indio WiFi6 AP -indoor and outdoor models based on IPQ6000
Fixes: WIFI-10802
Signed-off-by: Sohail Ahmad <sohail.ahmad@wifi-soft.com>
2022-09-26 18:00:41 +02:00
Felix Fietkau
c33705ca60 qosify: update to the latest version
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-26 15:00:33 +02:00
Arif Alam
ba41e6773b ipq807x: Fix EAP104 upgrade
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2022-09-23 17:19:01 +02:00
John Crispin
8ebf884436 spotfilter: add a maissing v5.4 kernel backport
fixes an off-by-one bug in the validator

Signed-off-by: John Crispin <john@phrozen.org>
2022-09-23 17:19:01 +02:00
John Crispin
7d4353caf0 ucentral-client: update to latest HEAD
update wifi-scan timeout to 120s

Signed-off-by: John Crispin <john@phrozen.org>
2022-09-23 17:19:01 +02:00
John Crispin
fa6220a615 ucentral-schema: update to latest HEAD
55b8272 add support for overriding country codes

Signed-off-by: John Crispin <john@phrozen.org>
2022-09-22 15:14:05 +02:00
Felix Fietkau
26517bb6ae qosify: update to the latest version
fixes classification on linux 4.4

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-22 07:47:21 +02:00
Felix Fietkau
ea4c4b3fe5 wifi-ax: backport mac80211 WME classification fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-22 07:47:01 +02:00
John Crispin
00f273000e mac80211: fix multiple bssid mac addresses
Fixes: WIFI-10596
Signed-off-by: John Crispin <john@phrozen.org>
2022-09-21 09:45:05 +02:00
Jaspreet Sachdev
6014d3a04d .github/workflows: Removed deprecated targets
Signed-off-by: Jaspreet Sachdev <jaspreetsachdev@fb.com>
2022-09-20 08:56:55 +02:00
John Crispin
08f082acfe uspot: fix a typo causing config to not load correctly
Signed-off-by: John Crispin <john@phrozen.org>
2022-09-19 09:19:01 +02:00
Simon Kinane
12e5efcda4 uspot: Improve HTML for captive portal UI 2022-09-19 09:19:01 +02:00
John Crispin
26be5ba20e udhcpsnoop: fix an endianness error
Signed-off-by: John Crispin <john@phrozen.org>
2022-09-16 17:06:54 +02:00
John Crispin
dc2feb3cc7 ucentral-client: update to latest HEAD
90d276f force SIGKILL when terminating a runqueu task

Signed-off-by: John Crispin <john@phrozen.org>
2022-09-09 13:40:03 +02:00
John Crispin
ed397f5ce4 ucentral-client: update to latest HEAD
f5e5a61 propagate "cancelled" when a runqueue job timed out

Fixes: WIFI-10768
Signed-off-by: John Crispin <john@phrozen.org>
2022-09-09 13:40:03 +02:00
John Crispin
19f0260c0a ucentral-schema: update to latest HEAD
b27df64 add support for setting an interfaces MTU

Fixes: WIFI-10556
Signed-off-by: John Crispin <john@phrozen.org>
2022-09-09 13:40:03 +02:00
John Crispin
49c55bdec5 ucentral-schema: update to latest HEAD
19df069 update fils-discovery-interval max value

Fixes: WIFI-10710
Signed-off-by: John Crispin <john@phrozen.org>
2022-09-09 13:40:03 +02:00
John Crispin
2ab86ee29d ucentral-client: update to latest HEAD
b0e7432 proto: limit wifiscans to 30s
597aab3 task: add an additional runqueue for admin commands

Signed-off-by: John Crispin <john@phrozen.org>
2022-09-09 13:40:02 +02:00
Krishna
888aa40057 ipq807x: Add support for Mesh++ S618 devices
Mesh++ S618 has below products based on Qualcomm IPQ6018:

  * cp03-c1
  * cp01-c1

These are Wi-Fi 6 (IEEE 80211.ax) dual band 2x2 mesh routers.

Fixes: WIFI-10561
Signed-off-by: Krishna <krishna@meshplusplus.com>
Signed-off-by: Edward Cheung <edward@meshplusplus.com>
Signed-off-by: Alex Ballmer <alexb@meshplusplus.com>
2022-09-08 12:49:58 +02:00
Sven Eckelmann
2291ccf198 ipq807x: Fix build of kmod-br-netfilter
QCA is still backporting the old OpenWrt hack for BR_HOOK to newer kernels.
This change was identified as a source for bugs and also caused performance
problems in certain scenarios.

And since OpenWrt is now building the bridge as part of the kernel and the
br-netfilter code as module, the build of the QCA kernel fork will also
fail because the kernel binary is depending on a module:

  net/built-in.o: in function `BR_HOOK':
  net/bridge/br_private.h:929: undefined reference to `br_netfilter_run_hooks'
  net/bridge/br_private.h:929: undefined reference to `br_netfilter_run_hooks'
  net/bridge/br_private.h:929: undefined reference to `br_netfilter_run_hooks'
  net/bridge/br_private.h:929: undefined reference to `br_netfilter_run_hooks'
  net/bridge/br_private.h:929: undefined reference to `br_netfilter_run_hooks'
  net/built-in.o:net/bridge/br_private.h:929: more undefined references to `br_netfilter_run_hooks' follow

Just getting rid of this patch (as OpenWrt did) is therefore the best
option.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-09-08 12:49:27 +02:00
John Crispin
1d031a0535 unetd: add bpf-headers dependency
This fixes a spurious build issue

Signed-off-by: John Crispin <john@phrozen.org>
2022-09-08 12:49:27 +02:00
John Crispin
cb7ed7a37b hostapd: backport multicast_to_unicast patch
Fixes: WIFI-10766
Signed-off-by: John Crispin <john@phrozen.org>
2022-09-08 12:49:27 +02:00
John Crispin
e692aea19e uspot: refactor code
* add a common.uc class
* add ucode ubus calls

Signed-off-by: John Crispin <john@phrozen.org>
2022-09-08 12:49:27 +02:00
John Crispin
a8bb06fb1c ath1kk-wifi: update the WF188n BDF file
This is the BDF that passed FCC certification.

Signed-off-by: John Crispin <john@phrozen.org>
2022-09-08 12:49:27 +02:00
John Crispin
63b5803086 uspot: add MS CHAP support
* extend the radius-client to also support MS CHAP

Signed-off-by: John Crispin <john@phrozen.org>
2022-09-08 12:49:27 +02:00
John Crispin
68689674b7 uspot: various fixes
* add web-root override support
* various cleanups

Signed-off-by: John Crispin <john@phrozen.org>
2022-08-30 15:35:54 +02:00
John Crispin
fccdccdba3 ipq807x: add firmware downgrade support for eap101/2
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-30 08:29:07 +02:00
Tanya Singh
21176badf7 firstcontact: Zero touch provisioning with DHCP option 138
Fixes: WIFI-7266
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2022-08-30 07:22:25 +02:00
John Crispin
87adc56e60 ipq807x: make wifi 6e work on wallytech dr6018-v4
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-25 10:01:28 +02:00
John Crispin
0f8be3bbde hostapd: do not enforce multiple_bssid on 6G band
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-24 10:28:39 +02:00
John Crispin
a3fc407f25 hostapd: manually generate roaming keys when SAE is used
Fixes: WIFI-10570
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-23 17:09:08 +02:00
John Crispin
30c2c68579 ucentral-schema: update to latest HEAD
bab27cb add support for advanced captive-portal

Signed-off-by: John Crispin <john@phrozen.org>
2022-08-23 15:09:35 +02:00
John Crispin
736e3e58cf uhttp: update to latest HEAD and add 2 pending fixes
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-23 15:09:35 +02:00
John Crispin
b38cd9bb9f profiles: switch from OpenNDS to uSpot for captive portal
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-23 15:09:35 +02:00
John Crispin
d69a8f159d spotfilter: add advance captive packet filter
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-23 15:09:35 +02:00
John Crispin
baaa31f445 uspot: add advanced captive http components
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-23 15:09:35 +02:00
John Crispin
cf18242ee5 mac80211-qsdk: default multiple_ssid to 1 if not set
Fixes: WIFI-10597
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-23 09:14:06 +02:00
John Crispin
fdcfffd81d luci: update to version used in 22.03-rc6
Fixes: WIFI-10390
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-23 09:14:02 +02:00
John Crispin
c9a76b8d76 openssl: update to 22.03-rc6 version
Fixes: WIFI-10390
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-23 09:01:07 +02:00
John Crispin
9bd53e7d91 ucentral-schema: update to latest HEAD
b2ce495 ucentral-schema: set passpoint version

Fixes: WIFI-10575
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-23 07:23:07 +02:00
John Crispin
812fb18160 ath11k-wifi: update cig wf196 BDF files to latest FCC version
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-22 10:36:10 +02:00
Kishan
0571cc73da ath11k-wifi: add hfcl-ion4xi specific BDF
Signed-off-by: Kishan Shukla <kishan.shukla@hfcl.com>
2022-08-22 10:36:08 +02:00
John Crispin
6bdd93ce0f radius-gw-proxy: fix CoA port
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-19 08:17:00 +02:00
John Crispin
0603953d9f hostapd: add multi CoA support
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-19 08:17:00 +02:00
John Crispin
098c81376f udhcpsnoop: look at more options for the cache expiry
make the code look for leasetime, rebind and renew options to
determine the cache expiry time.

Signed-off-by: John Crispin <john@phrozen.org>
2022-08-16 17:57:46 +02:00
John Crispin
7ef10fcfb4 ucentral-schema: update to latest HEAD
a074cc0 improve dhcp probe on GRE tunnels
2a66b4c enable the noscan flag on radios to make 40MHz work
4c36050 improve ipv4 wifi client reporting in bridge mode
aed8805 remove openflow support
4597721 add dhcp discovery on gre tunnel interface

Fixes: WIFI-7838
Fixes: WIFI-10549
Fixes: WIFI-10538
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-15 11:42:09 +02:00
Venkat Chimata
823ac590ff ipq807x: fix proxy_arp
sk_buff's cb should be cleared in the entry point for both incoming and outgoing packets at each layer.
At bridge, it is already handled in the outgoing path, but not in the incoming path. We have seen cases
where proxyarp_replied was 1 on sk_buffs coming from the WLAN driver and they were getting dropped in
forwarding path.

Fixes: WIFI-10552
Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2022-08-15 11:41:43 +02:00
John Crispin
9b68205dc0 ucentral-schema: rename psk-radius.json to psk2-radius.json
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-15 11:41:43 +02:00
John Crispin
d8216dc583 ucentral-schema: update to latest HEAD
9b24058 fix gre for non vlan setups

Signed-off-by: John Crispin <john@phrozen.org>
2022-08-15 11:41:43 +02:00
John Crispin
2e3c52160c ipq807x: backport an off-by-one error inside the BFP verifier
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-15 11:41:43 +02:00
John Crispin
8686846a09 hostapd: backport several CVE fixes
Fixes: WIFI-10412
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-15 11:41:41 +02:00
John Crispin
8de22ca44b ucentral-schema: update to latest HEAD
52e27a1 enable unicast conversion on wifi instead of bridge layer

Fixes: WIFI-10430
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-10 06:45:51 +02:00
Sven Eckelmann
3e692ed95a ipq807x: Add support for Plasma Cloud PAX1800 v1
Device specifications:
======================

* Qualcomm IPQ6000
* 256 MB of RAM
* 64 MB of SPI NOR flash
  - 2x 28 MB available; but one of the 28 MB regions is the recovery image
* 2T2R 2.4 GHz Wi-Fi (11ax)
* 2T2R 5 GHz Wi-Fi (11ax)
* multi-color LED (controlled via red/green/blue GPIOs)
* 1x GPIO-button (reset)
* external h/w watchdog (enabled by default))
* TTL pins are on board
* 2x ethernet
  - eth0
    + 1000 Mbps Ethernet
    + used as LAN interface
  - eth1
    + 1000 Mbps Ethernet
    + 802.3at POE
    + used as WAN interface
* 12 2A DC
* internal antennas

This device is not exported via a profile in TIP because there were
concerns about the 256MB limitations. But the actual OpenWrt support is
still added for interested parties.

Flashing instructions:
======================

Various methods can be used to install the actual image on the flash.
Two easy ones are:

ap51-flash
----------

The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be
used to transfer the image to the u-boot when the device boots up.

initramfs from TFTP
-------------------

The serial console must be used to access the u-boot shell during bootup.
It can then be used to first boot up the initramfs image from a TFTP server
(here with the IP 192.168.1.21):

   setenv serverip 192.168.1.21
   setenv ipaddr 192.168.1.1
   setenv bootargs 'console=ttyMSM0,115200n8 rootfstype=squashfs,jffs2 board=PAX1800 root=31:10 mtdparts=spi32766.0:768k(0:SBL1),64k(0:MIBIB),1664k(0:QSEE),64k(0:DEVCFG),128k(0:RPM),64k(0:CDT),64k(0:APPSBLENV),640k(0:APPSBL),256k(0:ART),28672k(inactive),28672k(inactive2),64k(custom),64k(0:KEYS),2304k(0:WIFIFW)'
   tftpboot <filename-of-initramfs-kernel>.bin && bootm

The actual sysupgrade image can then be transferred (on the LAN port) to the
device via

  scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/

On the device, the sysupgrade must then be started using

  sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-08-10 06:45:51 +02:00
Marek Lindner
128bd3a17e ipq807x: Add post-flash check of written data
If it already looks to the system that the flashing of the image data
failed, it is not a good idea to inform the u-boot to switch the inactive
(newly flashed) partition to the active one

Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-08-10 06:45:51 +02:00
Sven Eckelmann
cc54c8654f ipq807x: Add support for Plasma Cloud PAX1800 v2
Device specifications:
======================

* Qualcomm IPQ6000
* 512 MB of RAM
* 64 MB of SPI NOR flash
  - 2x 28 MB available; but one of the 28 MB regions is the recovery image
* 2T2R 2.4 GHz Wi-Fi (11ax)
* 2T2R 5 GHz Wi-Fi (11ax)
* multi-color LED (controlled via red/green/blue GPIOs)
* 1x GPIO-button (reset)
* external h/w watchdog (enabled by default))
* TTL pins are on board
* 2x ethernet
  - eth0
    + 1000 Mbps Ethernet
    + used as LAN interface
  - eth1
    + 1000 Mbps Ethernet
    + 802.3at POE
    + used as WAN interface
* 12 2A DC
* internal antennas

Flashing instructions:
======================

Various methods can be used to install the actual image on the flash.
Two easy ones are:

ap51-flash
----------

The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be
used to transfer the image to the u-boot when the device boots up.

initramfs from TFTP
-------------------

The serial console must be used to access the u-boot shell during bootup.
It can then be used to first boot up the initramfs image from a TFTP server
(here with the IP 192.168.1.21):

   setenv serverip 192.168.1.21
   setenv ipaddr 192.168.1.1
   setenv bootargs 'console=ttyMSM0,115200n8 rootfstype=squashfs,jffs2 board=PAX1800v2 root=31:10 mtdparts=spi32766.0:768k(0:SBL1),64k(0:MIBIB),1664k(0:QSEE),64k(0:DEVCFG),128k(0:RPM),64k(0:CDT),64k(0:APPSBLENV),640k(0:APPSBL),256k(0:ART),28672k(inactive),28672k(inactive2),64k(custom),64k(0:KEYS),2304k(0:WIFIFW)'
   tftpboot <filename-of-initramfs-kernel>.bin && bootm

The actual sysupgrade image can then be transferred (on the LAN port) to the
device via

  scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/

On the device, the sysupgrade must then be started using

  sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-08-10 06:45:51 +02:00
Sven Eckelmann
200f627a9c ipq807x: Fix installation of FTBFS gcc 5.5 patch
The toolchain path will not automatically be copied to OpenWrt. So the
build will still fail on recent Debian unstable version. Instead, it must
be applied during the setup.py process via the normal patch procedure.

Reported-by: Marek Lindner <marek.lindner@plasma-cloud.com>
Fixes: 6f6b40a94f ("toolchain/gcc: fix building gcc 5.5 on newer systems")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-08-10 06:45:51 +02:00
John Crispin
0134c1cb64 ucentral-wifi: update to latest HEAD
d55f2d5 nl80211: increase IEEE80211_CHAN_MAX to 234

Signed-off-by: John Crispin <john@phrozen.org>
2022-08-10 06:45:50 +02:00
John Crispin
5519ab913b ucentral-schema: update to latest HEAD
37707f1 allow OWE encryption on 6G band

Fixes: WIFI-10426
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-10 06:45:50 +02:00
John Crispin
530332fb51 fix packet captures when packet count is set
Fixes: WIFI-10290
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-07 14:55:32 +02:00
John Crispin
8bb8c16b34 drop openflow support
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-07 14:55:32 +02:00
John Crispin
a6a7d82607 drop fbwifi support
Signed-off-by: John Crispin <john@phrozen.org>
2022-08-07 14:55:32 +02:00
John Crispin
f78dc0cd77 ucentral-schema: update to latest HEAD
21c2709 add owe-transition support

Signed-off-by: John Crispin <john@phrozen.org>
2022-08-07 14:55:32 +02:00
John Crispin
aaf830ae27 ucentral-schema: update to latest HEAD
29cfbca owe: hide the encrypted BSS
ec4284b expose PMKSA caching via the data model

Fixes: WIFI-10235
Fixes: WIFI-10233
Signed-off-by: John Crispin <john@phrozen.org>
2022-07-22 11:10:55 +02:00
John Crispin
555e1a2b1b .github/workflow: add wallys_dr6018 to CI builds
Signed-off-by: John Crispin <john@phrozen.org>
2022-07-21 18:53:24 +02:00
John Crispin
0fbe2e9089 ratelimit: fix flowid generation on flow delete
The ID was not properly generated causing the code to delete all flow rules.

Signed-off-by: John Crispin <john@phrozen.org>
2022-07-18 10:35:05 +02:00
John Crispin
e87c1ca2dd ipq8074: fix yuncore ax840 port mapping and wifi macs
Signed-off-by: John Crispin <john@phrozen.org>
2022-07-15 16:36:17 +02:00
John Crispin
c0b3e38215 ucentral-schema: update to latest HEAD
Fixes: WIFI-4237
Signed-off-by: John Crispin <john@phrozen.org>
2022-07-12 10:44:57 +02:00
John Crispin
0bf5ea74b3 xtables-addon: import version 2.14
This is only used for the v4.4 QCA kernel.

Fixes: WIFI-10095
Signed-off-by: John Crispin <john@phrozen.org>
2022-07-12 10:44:57 +02:00
John Crispin
1c4c82a9df bpftools: backport latest version from OpenWrt HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2022-07-12 10:44:57 +02:00
John Crispin
4d1022f29b ucentral-schema: update to latest HEAD
5d5bc06 enable igmp snooping and unicast conversion by default

Fixes: WIFI-7723
Signed-off-by: John Crispin <john@phrozen.org>
2022-07-11 17:35:42 +02:00
John Crispin
a652e6c8d2 ucentral-schema: add OWE encryption example
Signed-off-by: John Crispin <john@phrozen.org>
2022-07-11 14:02:04 +02:00
John Crispin
7b91863cba ucentral-schema: update to latest HEAD
257185a state: make sure that snooped IP addresses are also shown inside the clients table
7f157d8 qos: use fn_match instead of regex
6a68c03 wireguard-overlay: use correct default port for vxlan

Fixes: WIFI-7838
Fixes: WIFI-7208
Signed-off-by: John Crispin <john@phrozen.org>
2022-07-11 14:01:30 +02:00
John Crispin
c7ad6eaf2c ieee8021x: update to latest HEAD
c526967 improve reconnect logic

Signed-off-by: John Crispin <john@phrozen.org>
2022-07-11 14:01:30 +02:00
John Crispin
c06923a022 dynamic-vlan: add support for multiple wan ports
the code did not handle devices that have more than one uplink
device.

Fixes: WIFI-9954
Signed-off-by: John Crispin <john@phrozen.org>
2022-07-11 14:01:27 +02:00
Tanya Singh
d9a8e771ae firstcontact: Zero touch provisioning with DHCP option 138
Fixes: WIFI-7266
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2022-07-11 07:45:23 +02:00
Jianhui Zhao
7e2cec9d91 ath11k-wifi: update GL-AXT1800 BDF
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
2022-07-11 07:42:23 +02:00
John Crispin
84add765fe ucentral-schema: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2022-07-11 07:41:47 +02:00
John Crispin
f050d53ed4 ucode: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2022-07-11 07:41:47 +02:00
John Crispin
26be8ab162 qosify: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2022-07-11 07:41:47 +02:00
John Crispin
3f93f7c972 unetd: update to latest HEAD
this makes vxlan work

Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-07-11 07:41:47 +02:00
Felix Fietkau
7bab50dd3c ipq807x: backport vxlan path mtu changes
Fixes: WIFI-7571
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-07-11 07:40:09 +02:00
jaspreetsachdev
cf657dbd94 Merge pull request #461 from Telecominfraproject/next
Next
2022-06-30 17:34:02 -04:00
jaspreetsachdev
33c9876760 Merge pull request #460 from Telecominfraproject/release/v2.6.0
Release/v2.6.0
2022-06-30 17:30:42 -04:00
John Crispin
4d6d7405d6 ucentral-schema: update to latest HEAD
9691cc6 improve custom config handling
b4a3a56 add support for OWE encryption

Fixes: WIFI-9811
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-30 12:19:41 +02:00
John Crispin
e249701c34 profile: add bind-dig to default package selection
This makes openroaming NAPTR work

Fixes: WIFI-9962
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-30 12:19:41 +02:00
John Crispin
0d50975152 hostapd: backport OWE patches
Fixes: WIFI-9811
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-30 12:19:41 +02:00
John Crispin
6d87847d15 radius-gw-proxy: update to latest HEAD
Fixes: WIFI-9620
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-30 12:19:41 +02:00
jaspreetsachdev
eebe021780 Merge pull request #459 from Telecominfraproject/main
ucentral-client: update to latest HEAD
2022-06-23 15:02:37 -04:00
John Crispin
c6e0384f21 ucentral-client: update to latest HEAD
68fe6c2 fix the ping command

Signed-off-by: John Crispin <john@phrozen.org>
2022-06-23 14:06:26 +02:00
jaspreetsachdev
23ae850f72 Merge pull request #458 from Telecominfraproject/main
Fixes for WIFI-7687, WIFI-9620
2022-06-22 08:59:02 -04:00
John Crispin
708cf2dec6 ucentral-schema: update to latest HEAD
fc8fdcf point radsec proxy at the correct radius accounting server
886a650 Add missing paramters to uC state schema
c8b15b7 chain the radius vendor attributes inside a single AVP

Fixes: WIFI-7687
Fixes: WIFI-9620
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-22 11:06:35 +02:00
John Crispin
a95745d95b ucentral-client: update to latest HEAD
62efd45 add radius-proxy RX path

Fixes: WIFI-9620
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-22 11:06:21 +02:00
John Crispin
83ccea0abf radius-gw-proxy: add RX path support
Fixes: WIFI-9620
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-22 11:02:16 +02:00
John Crispin
bfeaf89238 ucentral-schema: update to latest HEAD
548ce37 point radsec proxy at the correct radius accounting server
c49ce29 Add missing paramters to uC state schema
1c55872 chain the radius vendor attributes inside a single AVP

Signed-off-by: John Crispin <john@phrozen.org>
2022-06-20 19:24:29 +02:00
jaspreetsachdev
7439217b3c Merge pull request #456 from Telecominfraproject/main
Merging Fixes for WIFI-9630 and others
2022-06-17 09:32:12 -04:00
John Crispin
ae2377f4d2 ucentral-schema: update to latest HEAD
4df0373 renderer: quote wireless encryption key

Fixes: WIFI-9630
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-16 16:37:37 +02:00
John Crispin
b81d0aaf0e ipq40xx: add dual boot support for ecw5211
Fixes: WIFI-7712
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-16 12:47:13 +02:00
John Crispin
1546bef93f ucentral-schema: update to latest HEAD
1d7e565 optimize the bridge/uci config for gre tunnels

Signed-off-by: John Crispin <john@phrozen.org>
2022-06-16 12:44:53 +02:00
Stijn Tintel
32b1aade42 ipq807x: force ext4 creation in emmc_do_upgrade
Running mkfs.ext4 on a partition that already contains an ext4
filesystem asks for input:

  mke2fs 1.45.6 (20-Mar-2020)
  /dev/mmcblk0p9 contains a ext4 file system
          created on Sat Jun 11 12:23:42 2022
  Proceed anyway? (y,N) y

This breaks the ability to run sysupgrade non-interactively. Add the -F
switch to force ext4 creation to fix this.

Fixes: WIFI-9419
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-06-15 12:42:34 +02:00
Stijn Tintel
2a92b75fe1 ipq807x: silence dd errors in do_flash_emmc
Running dd if=/dev/zero to a partition will always throw an ENOSPC error
when reaching the end of the partition. Silence those errors to avoid
confusion.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-06-15 12:42:34 +02:00
John Crispin
cb30d9e20a ipq807x: add motorola q14 support
Fixes: WIFI-8040
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-15 12:42:34 +02:00
John Crispin
588206b93b ucentral-schema: update to latest HEAD
417fcc4 fix selection of radius proxy ip

Fixes: WIFI-9461
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-13 14:57:48 +02:00
John Crispin
6399649038 ipq807x: improve dual boot on eap101/2
inverse the logic that figures out if we want to set upgrade_available.

Fixes: WIFI-7712
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-13 14:57:48 +02:00
John Crispin
aa3cb95233 wireguard-tools: do not select the kernel module
unetd will select the correct kernel module.

Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-13 14:57:48 +02:00
John Crispin
3ea06dac40 dhcpsnoop: update code
* Update to latest version of dhcpsnoop
* always snoop all upstream interfaces
* add snooped leases to state

Fixes: WIFI-7838
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-13 14:57:21 +02:00
jaspreetsachdev
a70dda4a8e Merge pull request #453 from Telecominfraproject/main
Merge Main to release/v2.6.0
2022-06-09 15:43:49 -04:00
John Crispin
a01f1add81 ipq807x: disable Q14 image generation
Fixes: WIFI-7570
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 14:06:39 +02:00
Felix Fietkau
57849591d7 ipq807x: backport act_mirred changes
Fixes: WIFI-7838
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-06-09 14:06:25 +02:00
John Crispin
b4a09e7167 ucentral-schema: update to latest HEAD
96324e2 fix a typo inside the state handler

Fixes: WIFI-7838
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 14:05:34 +02:00
John Crispin
96bb8b1372 ucentral-schema: update to latest HEAD
6974baa add data model support for wireguard overlay networks

Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 14:05:24 +02:00
John Crispin
99ea9da785 ipq807x: add kmod-wireguard backport package
Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 14:05:00 +02:00
John Crispin
bfe7fadfc5 ucentral-schema: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 14:04:04 +02:00
John Crispin
ad1dcc4f45 radius-gw-proxy: fix compile error on gcc5
Fixes: WIFI-7570
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 14:03:53 +02:00
John Crispin
f371c789d0 ipq807x: revert all 11.5 changes
Fixes: WIFI-7570
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 14:03:42 +02:00
John Crispin
386eca1f65 wifi-ax: revert all ath11.5 changes
Fixes: WIFI-7570
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 14:03:05 +02:00
John Crispin
8b9047952d ipq807x: make USB work on wallys-dr6018 and disable sdhci
Fixes: WIFI-9306
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 14:01:49 +02:00
John Crispin
5a105ef06e hostapd: make psk2-radius work on wifi-5 devices
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 13:59:43 +02:00
John Crispin
c60dc1e045 wifi-ax: disable encap offloading in WDS / STA mode
Fixes: WIFI-9305
Signed-off-by: John Crispin <john@phrozen.org>
2022-06-09 13:58:06 +02:00
John Crispin
1e1bd19429 ucentral-schema: update to latest HEAD
bfa2647 make sure that vxlan tunnels endup inside a bridge

Fixes: WIFI-9121
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-30 08:26:51 +02:00
John Crispin
cfe07f6e15 ipq807x: backport the skb->cb fix from upstream
This was causing sporadic proxy_arp failures.

Fixes: WIFI-7154
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-30 06:03:02 +02:00
John Crispin
a64039db20 mac80211-qca: properly rebase a patch
The patch had a line skew due to a bad rebase.

Fixes: WIFI-7570
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-29 18:11:58 +02:00
John Crispin
7f81ddb8cc ucentral-schema: update to latest HEAD
27f451b add script command handler

Fixes: WIFI-9120
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-29 18:11:58 +02:00
John Crispin
3c0d495334 ucode: package the uloop library
Fixes: WIFI-9120
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-29 17:33:14 +02:00
John Crispin
38a7c54cce ucentral-client: update to latest HEAD
a4671bb fix an error reported by CI
a82c3f0 add handling for the "script" command

Fixes: WIFI-9120
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-29 17:31:00 +02:00
Jianhui Zhao
1aead07444 ath11k-wifi: update GL-AXT1800 BDF
Fixes: WIFI-8042
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
2022-05-29 10:31:54 +02:00
John Crispin
d2f44cbb12 ucentral-schema: update to latest HEAD
d1c7ab8 add ip-collide handler

Fixes: WIFI-7830
Fixes: WIFI-7989
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-29 10:30:45 +02:00
John Crispin
43d7ca31d6 wifi-ax/mac80211: make the 11.4 ath11k work inside the v5.4 kernel
Fixes: WIFI-7570
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-27 10:05:52 +02:00
John Crispin
0985c573b0 ipq807x: fix MAC assign on cig-wf19* units
The mtd offset changed in the v5.4 kernel causing MAC lookup to fail.

Fixes: WIFI-7997
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-27 07:34:07 +02:00
John Crispin
d9ed861c1d ipq807x: add support for wallytech dr6018(-v4)
Fixes: WIFI-7570
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-26 16:20:34 +02:00
John Crispin
8ef9989147 ipq807x: fix a null pointer crash in ip_tunnel
Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-26 09:51:07 +02:00
John Crispin
7d5eab4bf3 libnl-tine: update to latest HEAD
Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-26 09:50:34 +02:00
John Crispin
5e03e04bbd unetd: add wireshark overlay service
Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-26 09:30:11 +02:00
John Crispin
6fabaeca53 kernel-headers: make sure that the QSDK v5.4 kernel has access to the wireshark headers
Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-26 09:28:59 +02:00
John Crispin
be4ca445f5 netifd: update to latest HEAD
Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-26 09:28:36 +02:00
John Crispin
e99c8b27e1 libubox: update to latest HEAD
Fixes: WIFI-7571
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-26 09:28:11 +02:00
John Crispin
e9055b4f08 ucentral-schema: update to latest HEAD
6d83248 add missing radsec features

Fixes: WIFI-7077
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-26 09:13:23 +02:00
John Crispin
cfcafb676b ipq807x: backport the wireguard patches from the generic folder
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-24 17:28:11 +02:00
GL.iNet-Xinfa.Deng
899b4d6bfd ipq807x: fix gl-ax1800 switch button high active level
The active status of the switch button in the DTS configuration
is the opposite of that marked on the product housing.

The switch button should be activated at high GPIO level.

Fixes: WIFI-8042
Signed-off-by: GL.iNet-Xinfa.Deng <xinfa.deng@gl-inet.com>
2022-05-24 15:07:19 +02:00
John Crispin
2003632ddb ucentral-schema: update to latest HEAD
db15ed7 third-party services were not getting shut down properly

Fixes: WIFI-6907
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-24 14:05:14 +02:00
John Crispin
d4a14106b7 radius_gw_proxy: add support for a radius/gateway proxy
This will allow the AP to send radius requests via the websocket
to the gateway for routing to the correct AAA.

Fixes: WIFI-7328
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-24 14:05:14 +02:00
John Crispin
85af9d7e0b ipq807x: add motorola q14 support
Fixes: WIFI-8040
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-24 14:05:06 +02:00
John Crispin
d4442efbfe ipq807x: disable bluetooth on eap102
this causes units to take several minutes if the nrf8 chip has not been flashed yet

Signed-off-by: John Crispin <john@phrozen.org>
2022-05-20 15:37:10 +02:00
John Crispin
3a26ae2695 ipq807x: re-add patches that got lost during the v5.4 update
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-20 15:36:42 +02:00
John Crispin
09af596e85 ipq807x: fix the lan port on EAP102
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-20 15:36:20 +02:00
John Crispin
5985187316 .github: remove wallys cypress from CI until bootloop on v5.4 is resolved
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-20 12:12:22 +02:00
John Crispin
33ac83a309 wifi-ax: enable fils_discovery and multiple_ssid by default on 6g band
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-20 11:29:36 +02:00
John Crispin
921c1b553d ipq807x: enable ethernet LEDs on wf196
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-20 11:29:11 +02:00
Jianhui Zhao
d160507230 ipq807x: fix dts for gl-ax1800
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
2022-05-19 13:16:26 +02:00
Jianhui Zhao
7368620fd2 ipq807x: bump glinet ax1800/axt1800 to ath11.5/v5.4
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
2022-05-19 11:21:21 +02:00
John Crispin
a910e297a3 ucentral-schema: update to latest HEAD
7ead16a add device serial as an additional TLV inside radius requests

Signed-off-by: John Crispin <john@phrozen.org>
2022-05-18 13:02:32 +02:00
John Crispin
f819bb8753 wifi-ax: update hostapd to latest 11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-18 10:59:06 +02:00
John Crispin
cc0d4bded2 ipq807x: bump wf194c4 to ath11.5/v5.4
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:33 +02:00
Felix Fietkau
e3b2b7f232 ipq807x: enable threaded napi on ethernet
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-05-17 07:45:32 +02:00
Felix Fietkau
c8dde50eba ath11k: enable threaded napi support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-05-17 07:45:32 +02:00
Felix Fietkau
3c355f96eb ipq807x: backport threaded NAPI support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-05-17 07:45:32 +02:00
John Crispin
93dd24ef6e qca-nss-fw: update maple firmware
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
107bc8ef65 ucentral-schema: update to latest HEAD
a18efc1 add psk2-radius support

Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
9a8278afcc hostapd: add psk2-radius support
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
1c48765913 ipq807x: add the diagchar module
This is required for FTM to correctly work

Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
c6a45184fd ipq807x: fix buildsystem for ath11.5-csu
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
18d5b8cba7 batman-adv: drop v4.4 backport
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
65c08ade18 ath11k-wifi: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
3f6fee91e9 ath11k-firmware: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
d29c4e49b3 mac80211-qsdk: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
f162000749 qca-thermald-10.4: drop legacy package
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
c804333bc0 kmod-sched-cake: drop legacy v4.4 backport
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:32 +02:00
John Crispin
449795db97 ipq807x: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-17 07:45:31 +02:00
John Crispin
af92a2c7aa qca-nss-clients: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-12 14:31:52 +02:00
John Crispin
b68affdf6a qca-nss-dp: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-12 14:31:33 +02:00
John Crispin
7a95f9ac2d qca-nss-drv: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-12 14:31:16 +02:00
John Crispin
8b5d9d84de qca-ssdk-shell: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-12 14:30:59 +02:00
John Crispin
93d93c7708 qsdk-ssdk: update to ath11.5-cs
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-12 14:30:21 +02:00
John Crispin
b35232ab4a wifi-ax: enable fils_discovery and multiple_ssid by default on 6g band
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-12 11:51:06 +02:00
John Crispin
770a2bdd36 wifi-ax: add ftm package as default selection
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-12 11:46:21 +02:00
John Crispin
9650f8eaa8 iwinfo: fix 6e channel calculation
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-12 11:45:30 +02:00
John Crispin
63ab76bb30 ucentral-schema: add various 6e fixes
ba2bc69 fix wifi 6e channel calculation

Signed-off-by: John Crispin <john@phrozen.org>
2022-05-12 11:39:58 +02:00
John Crispin
fcb21ca0b6 ucentral-schema: add a sample wifi 6e config file
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-06 12:44:35 +02:00
John Crispin
d6d5422152 ipq40xx: add indio UM510/550AC support
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-06 09:08:59 +02:00
John Crispin
5b970a3f12 .github: add Indio UM-305ax to the CI job
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-05 10:38:59 +02:00
Matthew Hagan
a4a7c1f9f3 usteer: uchannel.uc: check host_info exists
If another host has not set a status, for example when autochannel is
disabled, it will not show host_info when remote_hosts is called. This
fix adds a check for this condition.

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2022-05-05 09:50:35 +02:00
John Crispin
5cbac23e3f ramips: disable switch/bridge offload
This is breaking win10 laptops when vlan_filtering is enabled

Signed-off-by: John Crispin <john@phrozen.org>
2022-05-04 17:09:53 +02:00
John Crispin
172c0d3690 bpf.mk: backport a fix that unbreaks bpf compile on armv7
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-03 07:44:34 +02:00
John Crispin
535f41d58b hostapd: fix phy level max-assoc settings
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-02 08:47:12 +02:00
John Crispin
2be18091a4 proxy_arp: backport skb->cb fix from upstream kernel
this caused proxy_arp to misbehave

Signed-off-by: John Crispin <john@phrozen.org>
2022-04-26 12:24:51 +02:00
John Crispin
73f42e3c6f ipq807x: enable dual boot on HFCL ION4X*
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-26 07:59:41 +02:00
John Crispin
cff778d8ca treewide: update ucode to work with latest interpreter
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-26 07:59:41 +02:00
John Crispin
94d4498a2d ucode: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-26 07:59:41 +02:00
John Crispin
eb0ab17f58 ipq807x: enable dual boot on EdgeCore devices
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-21 11:18:58 +02:00
John Crispin
1ab99d50b2 certificates: add support for finding certificates on dual boot devices
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-21 11:18:58 +02:00
Johann Hoffmann
dfeddc0d89 x86: add CI workflows
Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
2022-04-21 11:18:58 +02:00
Johann Hoffmann
efde86be9d x86: add vm images
Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
2022-04-21 11:18:58 +02:00
John Crispin
739e8c12fb ramips: fix actiontect web7200 wifi macs
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-21 11:18:58 +02:00
John Crispin
3fdbbff9f7 ucentral-schema: update to latest HEAD
4829132 properly honour mac addresses that are inside board.json
ba9a2ee various 6G improvements
0a05052 interface: fix wan side STA-only interfaces

Signed-off-by: John Crispin <john@phrozen.org>
2022-04-21 11:18:58 +02:00
Sohail Ahmad
0a56755bef ramips: Support for Indio UM-305AX AP
Signed-off-by: Sohail Ahmad <sohail@indionetworks.com>
2022-04-21 11:18:58 +02:00
John Crispin
c35290772d ipq40xx: add certificate partition to cig-wf610
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-19 10:28:15 +02:00
John Crispin
cedcbcbc2b ratelimit: fix ratelimit for multiple bss
The function looking up the rate was leaking a local variable into the global space

Signed-off-by: John Crispin <john@phrozen.org>
2022-04-19 07:40:58 +02:00
Stijn Tintel
9de96deca8 usteer: rename uptime to executed in uchannel.uc state
The uptime value in the uchannel state contains the uptime at the time
the script was last executed. This is a rather confusing name, and
possibly this is what lead to WIFI-7613. Rename it to executed to avoid
confusion in the future.

Keep the original name in the usteerd node status, as it is unclear what
impact this has, and could lead to breakage elsewhere.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-04-19 06:35:42 +02:00
Stijn Tintel
19dbb1d5e3 usteer: fix uchannel.uc script
Once the uchannel.uc script sets its status to waiting, it becomes
defunct. The next invocation of the script will compare uptime to
state.uptime, and if the difference is less than 12h, it will change
state.uptime to the current uptime and return. As the script runs every
5 minutes, the difference will always be less than 12h.

Fix this by comparing uptime against state.changed rather than
state.uptime.

Fixes: WIFI-7613
Fixes: 670bc9d2e2 ("ucentral: development update")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-04-19 06:35:42 +02:00
Stijn Tintel
83b6ccf562 usteer: fix init script
The uchannel instance of the usteer init script contains a typo, causing
the following error when autochannel is enabled:

/etc/rc.common: line 147: procd_close_instancea: not found

Fixes: WIFI-7577
Fixes: c467a62af3 ("usteer: update to latest HEAD")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-04-19 06:35:12 +02:00
Owen Anderson
ea86593835 profiles: Fixed typo in cig_wf610d profile name
Signed-off-by: Owen Anderson <owen.anderson@netexperience.com>
2022-04-19 06:33:24 +02:00
John Crispin
36b5478005 ipq807x: fix dwc3 module dependency
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-06 08:54:20 +02:00
John Crispin
1ad19297c1 ipq807x: factory images for wf196 were generated with a bad page size
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-06 08:53:20 +02:00
John Crispin
f5357f7854 ath11k: add ath11k-fwtest support
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-05 17:21:55 +02:00
Johann Hoffmann
8a3140b89b Add dummy workflow to test workflow modifications in PR branch
Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
2022-04-05 15:13:54 +02:00
John Crispin
16e0724ace ramips: fix actiontec web7200 dual boot
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-04 16:09:55 +02:00
wenij
17ff9eecf5 ipq807x: cybertan eww622 usb xchi driver not work
Signed-off-by: wenij <wenij.chang@cybertan.com.tw>
2022-04-04 10:54:46 +02:00
wenij
4b870f978c ipq807x: Cybertan EWW622-A1 get mac address from nand devinfo partition.
Signed-off-by: wenij <wenij.chang@cybertan.com.tw>
2022-04-04 10:53:10 +02:00
John Crispin
8b83365961 ucentral-schema: update to latest HEAD
7015feb improve wifi reload

Signed-off-by: John Crispin <john@phrozen.org>
2022-04-04 06:54:06 +02:00
John Crispin
c6ebb5537a ucentral-schema: update to latest HEAD
e12bc03 revert hostapd restart hack as the root cause of the channel issue was found

Signed-off-by: John Crispin <john@phrozen.org>
2022-04-01 14:15:50 +02:00
John Crispin
6ebe189d71 ramips: fix uboot-env-tools mtd offset
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-31 13:41:16 +02:00
John Crispin
98b56551d5 mac80211: automatically restart wifi if bringup failed
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-31 10:58:50 +02:00
John Crispin
606e27e256 wifi: fix channel select when using ACS
there were several small issues that caused ACS to leave the radio in a bad state
during sanity runs.

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-31 10:58:45 +02:00
John Crispin
94fe14b9f9 ucentral-schema: update to latest HEAD
4cff999 add a 5s delay on config re-apply to give wifi time to restart

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-30 16:46:43 +02:00
John Crispin
58388f84b6 ipq40xx: add status led support on udaya board
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-29 13:44:54 +02:00
John Crispin
79ea04af49 ipq807x: re-add accidentially deleted config-default
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-29 13:22:38 +02:00
John Crispin
396e2bd06c ucentral-client: cleanup health parameter
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-29 07:29:12 +02:00
John Crispin
1a484c7f39 protobuf: drop legacy out of tree package
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-28 15:12:04 +02:00
John Crispin
e6b1030991 ucentral-schema: update to latest HEAD
9ac9f7e health: add a 75s delay when applying a new config

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-25 16:08:34 +01:00
John Crispin
6e32e68302 ucentral-client: update to latest HEAD
6cb4485 drop healthcheck from the client and move it to its own service

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-25 16:08:34 +01:00
John Crispin
0f13f7f5cd ipq40xx: add support for udaya a5 id2
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-25 16:08:34 +01:00
John Crispin
2ac4f9ef1d ucentral-schema: update to latest HEAD
fb6db0f force hapd restart upon cfg apply
ee0a8a4 broadband username was not getting applied correctly

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-24 15:59:34 +01:00
wenij
f1a75c25f9 ipq807x: Cybertan EWW622-A1 LED fixes
Signed-off-by: wenij <wenij.chang@cybertan.com.tw>
2022-03-24 15:59:34 +01:00
John Crispin
ff8d70753d ucentral-event: update to latest HEAD
24b7fb3 use async invoke when sending events

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-23 12:09:25 +01:00
John Crispin
caea6baecd certificates: create ubivolume with LEBs instead of MiB
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-23 11:51:32 +01:00
John Crispin
2e914c9b35 ipq807x: use CIG mac address hack on wf196
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-23 11:50:34 +01:00
Jianhui Zhao
da65d7e06f ipq807x: add initial support for GL.iNet AXT1800
Hardware:
* SoC: Qcom IPQ6000
* RAM: DDR3L 512MB
* Flash: 128MB Nand
* Ethernet: 3x GbE
* WLAN: 2x2 2.4GHz 600Mbps + 2x2 5GHz 1200Mbps (builtin + builtin)
* LEDS: 1x white, 1x blue
* Buttons: 1x switch, 1x reset
* USB: 1x 3.0(Type-A)
* SD: 1x microSD
* PWM Fan
* Power: 12VDC, 2A
* UART (4-pin, 2.54 mm pitch) pad on PCB
* JTAG (8-pin, 2.54 mm pitch) pad on PCB

Installation: upgrade "openwrt-ipq807x-glinet_ax1800-squashfs-sysupgrade.tar" directly.

Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
2022-03-22 08:19:50 +01:00
Sohail Ahmad
d18eef480c ipq40xx: add Support for Indio's UM-325AC AP
Changes made in OpenWrt supported targets to Include Indio's UM-325AC AP which is an indoor WiFi5 AP based on ipq4019 chipset.

Signed-off-by: Sohail Ahmad <sohail@indionetworks.com>
2022-03-22 08:04:40 +01:00
John Crispin
f3532c66e5 ucentral-client: update to latest HEAD
63eddd2 send the original size when using compress_64

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-21 09:44:32 +01:00
Felix Fietkau
9678b1d6a5 ipq807x: backport clsact support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-03-21 09:00:35 +01:00
John Crispin
379a4e2382 ucentral-schema: update to latest HEAD
fb537b9 enhance healthcheck to provide verbose error messages
2b65900 sysinfo: add helper tool to monitor memory consumption per service/instance

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-21 08:44:43 +01:00
John Crispin
edb33cd560 ucentral-schema: update to latest HEAD
5865d5a fix detection of pci radios

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-17 16:11:55 +01:00
John Crispin
2ff425ddeb ucentral-schema: update to latest HEAD
6dbd602 fix gre bridges
611af3d fix vxlan bridges

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-17 10:22:28 +01:00
John Crispin
7d016ac27f ucentral-schema: update to latest HEAD
d97a35c do not allow roaming for none, psk and wpa

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-15 18:49:51 +01:00
John Crispin
9790377dec ath11k-wifi: update cig wf196 BDF files
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-15 17:25:25 +01:00
John Crispin
597c547101 ipq807x: fix vmalloc on wf196
the built in wifi failed to start

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-15 16:24:33 +01:00
John Crispin
73b2645027 ucentral-schema: update to latest HEAD
9dfff17 fix include paths of the new wifi module

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-15 10:37:02 +01:00
John Crispin
8d58387d15 ucentral-schema: update to latest HEAD
ef7649f fix channel 140
302c5bf drop dependency on ucentral-wifi

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-14 17:19:07 +01:00
John Crispin
54dac4d348 ucode: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-14 17:17:59 +01:00
John Crispin
a0880ed0f1 edgecore: disable dual boot on eap10x/ecw5211
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-11 16:28:41 +01:00
John Crispin
ed6d683980 ramips: add bmtv2 and nbnm support
this fixes the nand issue on the actiontec web7200

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-11 14:57:54 +01:00
John Crispin
4c72c6a35a ucentral-wifi: update to latest HEAD
aa9c3ee set the AP bssid inside the assoc list

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-11 07:59:34 +01:00
Sven Eckelmann
125d56866e batman-adv: Merge bugfixes from 2022.0
* allow netlink usage in unprivileged containers
* mcast: don't send link-local multicast to mcast routers

Origin: upstream, https://git.openwrt.org/?p=feed/routing.git;a=commit;h=9e2383e9b42087d5a3892366bed8b6bb4f868fe3
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-03-10 15:10:05 +01:00
Hendrik Borghorst
a70a767ec0 batman-adv: Prevent use from libc headers to not build with BIG_ENDIAN
Commit 97d35a552ec5b6ddf7923dd2f9a8eb973526acea of musl introduced the
macros __LITTLE_ENDIAN and __BIG_ENDIAN in alltypes.h. These are pulled
into the compilation of batman-adv. This has the side effect that the
function is_multicast_ether_addr of etherdevice.h in Linux kernel is
compiled as the big endian version and so fails to work properly on
little endian devices.

This commits prevents pulling in header files of musl libc similar to
OpenWRT commit 9ac47ee46918c45b91f4e4d1fa76b1e26b9d57fe

Origin: upstream, https://git.openwrt.org/?p=feed/routing.git;a=commit;h=47436b04fd32cf3b6e6b46c25cb9c1fff3a995fd
Signed-off-by: Hendrik Borghorst <hendrikborghorst@gmail.com>
(cherry picked from commit 523821c1959cb288b55b7fcc8761c83f6ff48c4d)
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-03-10 15:10:05 +01:00
Sven Eckelmann
b8a6764207 batman-adv: Merge bugfixes from 2021.4
* fix error handling during interface initialization

Origin: upstream, https://git.openwrt.org/?p=feed/routing.git;a=commit;h=6d10a01dfa68eb5e25b84b33e33aefd312f46f4d
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-03-10 15:10:05 +01:00
Sven Eckelmann
98c9fcfd5d batman-adv: Refresh patches with quilt
The test builds are now requiring quilt refreshed patches instead of git
patches. Otherwise the build check will not even try to build something.

Origin: upstream, https://git.openwrt.org/?p=feed/routing.git;a=commit;h=e294a224640e03791a101a9302dbf72b06efab80
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-03-10 15:10:05 +01:00
Sven Eckelmann
eac5504fec batman-adv: Merge bugfixes from 2021.2
* Avoid WARN_ON timing related checks

Origin: upstream, https://git.openwrt.org/?p=feed/routing.git;a=commit;h=519ef4ad29a8e53c1763df1553d386e3abf6206d
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-03-10 15:10:05 +01:00
Piotr Dymacz
c2c75b67eb ipq807x: add initial support for YunCore AX840
This adds initial support for the YunCore AX840, an IPQ6010 based
802.11ax ceiling AP.

Specifications:

- Qualcomm IPQ6010
- 1 GB of RAM (DDR3)
- 8 MB of serial flash (SPI NOR)
- 256 MB of parallel flash (NAND)
- 2x2 2.4 GHz WiFi (IPQ6010)
- 2x2 5 GHz WiFi (IPQ6010)
- 2x IPEX/U.FL antenna connectors
- 4x 3 dBi dual-band antennas
- 2x 1 Gbps Ethernet (QCA8075) with 802.3at PoE input support
- 1x RGB LED
- 1x push-button (reset)
- DC jack for main power input (12 V)
- UART (4-pin, 2.54 mm pitch) header on PCB

Flash instruction under stock QSDK image:

  sysupgrade -n openwrt-ipq807x-yuncore_ax840-squashfs-nand-factory.bin

Flash instruction under U-Boot:

  tftpb 0x44000000 openwrt-ipq807x-yuncore_ax840-squashfs-nand-factory.ubi
  flash rootfs
  reset

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-03-10 14:50:37 +01:00
John Crispin
ef3eacefa7 ath11k-wifi: update WF188n BDF
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-10 08:21:58 +01:00
John Crispin
ef7481596a qosify: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-10 08:18:47 +01:00
Paul Spooren
6f4e00aa46 README: fix linksys_ea8300 example
The profile is no longer called just `ea8300`.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2022-03-10 07:59:59 +01:00
Jianhui Zhao
be65578a7f profile: add gl-ax1800 support
Because we have an another similar device named gl-axt1800,
so we put the common functions in a dtsi file. And we'll
submit a PR for gl-axt1800 soon.

Hardware:
* SoC: Qcom IPQ6000
* RAM: DDR3L 512MB
* Flash: 128MB Nand
* Ethernet: 5x GbE
* WLAN: 2x2 2.4GHz 600Mbps + 2x2 5GHz 1200Mbps (builtin + builtin)
* LEDS: 1x white, 1x blue
* Buttons: 1x switch, 1x reset
* USB: 1x 3.0(Type-A)
* Power: 12VDC, 1.5A

Installation:
* from qsdk to openwifi:
upgrade "openwrt-ipq807x-glinet_ax1800-squashfs-nand-factory.bin" via web ui
without keep config.
* upgrade "openwrt-ipq807x-glinet_ax1800-squashfs-sysupgrade.tar" if you are already in openwifi.

Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
2022-03-10 07:59:21 +01:00
John Crispin
20d4bd0c7d ucentral-schema: fix online-check
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-10 07:52:13 +01:00
John Crispin
531f4eb811 ucentral-schema: update to latest HEAD
4532c47 fix downstream bridges with no eth ports
04edaef ntp: open firewall port if ntpd is enabled
bf11105 fix led-active restart
c95667a a failed apply should return the error code 2
72e225e capabilities: add label_macaddr to capabilities

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-10 07:52:13 +01:00
John Crispin
3b0dae7189 ucentral-schema: update to latest HEAD
72e225e capabilities: add label_macaddr to capabilities
f09f2b2 state: improve link metric, add ssid location
5586b93 unit: improve password generation
959a40d system: add sysinfo / resource consumption reporting
cdfb209 state: fix link state reporting

Fixes: WIFI-7210
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-03 17:12:31 +01:00
John Crispin
79395593ba ipq807x: add support for label_macaddr
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-03 17:09:21 +01:00
John Crispin
61248b98e0 ucentral-schema: set executable bit for wifi_max_user.uc
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-02 16:02:18 +01:00
Felix Fietkau
72b5abb72a ath10k: enable threaded napi support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-03-02 15:45:08 +01:00
Felix Fietkau
673a029a02 ipq807x: enable threaded napi on ethernet
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-03-02 15:45:08 +01:00
Felix Fietkau
7efb85180f ipq807x: backport threaded napi support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-03-02 15:45:08 +01:00
Felix Fietkau
f95eadaa8f ipq807x: backport kbuild fix to avoid spurious rebuilds
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-03-02 15:45:08 +01:00
Felix Fietkau
6f6b40a94f toolchain/gcc: fix building gcc 5.5 on newer systems
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-03-02 15:45:08 +01:00
John Crispin
d84982f161 ath11k: fix WDS when encap offload is enabled
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-02 15:45:08 +01:00
John Crispin
4b07afe59f ucentral-schema: update to latest HEAD
19fcc8d update schemareader
bef2a8f state: add the upstream dhcp servers ip to the state message

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-02 15:12:50 +01:00
John Crispin
5d53d138b0 maverick: add the last 3 bytes of the serial to the Maverick ssid
Fixes: WIFI-7202
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-02 15:12:21 +01:00
John Crispin
e40631b8cd ucentral-schema: update to latest HEAD
ba41897 radio: enable 'allow-dfs' by default

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-01 17:36:54 +01:00
John Crispin
22135129bd treewide: fix pkg hashes
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-01 17:36:52 +01:00
John Crispin
de4b3c4edc ucentral-wifi: update to latest HEAD
40d0eb9 use the real usec value for tx/rx duration

Signed-off-by: John Crispin <john@phrozen.org>
2022-03-01 17:36:48 +01:00
John Crispin
e3b1fe36e5 hostapd: enable CONFIG_ERP
This caused local EAP to not work on wifi-qsdk targets.

Fixes: WIFI-7203
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-28 11:16:02 +01:00
John Crispin
5af7e1e7d8 ucode: add tool to read out the max clients an AP can handle per phy
Fixes: WIFI-7197
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-28 10:52:40 +01:00
John Crispin
057ebb8660 ucentral-schema: update to latest HEAD
1c46544 5G was not allowing specific 20MHz channels and would fall back to ACS

Fixes: WIFI-7179
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-28 10:08:43 +01:00
John Crispin
17fe72c6e9 wifi: revert some tweaks that are causing stability issues
this will come back in 2.6 once stability is restored

Signed-off-by: John Crispin <john@phrozen.org>
2022-02-25 17:34:27 +01:00
John Crispin
834ff2fe4f certificates: improve the code loading sqsh certificates
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-23 07:54:22 +01:00
John Crispin
ce3849e131 ipq40xx: revert an upstream patch causing problem with ea8300 eth ports
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-23 07:54:00 +01:00
John Crispin
66640cdd1a ipq807x: add cig wf196 to the CI builds
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-22 16:33:52 +01:00
John Crispin
300924a4be hostapd: fix syntax error inside hostapd.sh
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-22 15:13:28 +01:00
John Crispin
8fb088bcc8 ucentral-schema: update to latest HEAD
b3ce69e wifiscan: allow bandwith override
6d59acc trace: improve tracing code

Fixes: WIFI-7167
Fixes: WIFI-7168
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-22 08:59:48 +01:00
John Crispin
b08455228f ipq807x: point edgecore eap104 profile at the correct image
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-18 15:09:18 +01:00
John Crispin
09563eadaf ipq807x: do not enable bridge-vlan in maverick mode
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-18 10:29:25 +01:00
John Crispin
2df46a2c77 ipq807x: fix LEDs on wf196
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-18 10:29:25 +01:00
John Crispin
e4fa57b4d0 proxy_arp: backport skb->cb fix from upstream kernel
this caused proxy_arp to misbehave

Signed-off-by: John Crispin <john@phrozen.org>
2022-02-17 08:28:21 +01:00
John Crispin
48677a6943 ipq807x: add edgecore eap104 support
Fixes: WIFI-7117
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-16 15:44:24 +01:00
John Crispin
e79970ce04 ath11k: disable napi threading
The code causes 15% softirq in idle causing issue, drop until resolved.

Signed-off-by: John Crispin <john@phrozen.org>
2022-02-15 20:46:06 +01:00
John Crispin
b4d1d58fc9 hostapd: improve acs_exclude_dfs support
Fixes: WIFI-6933
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-15 17:06:22 +01:00
John Crispin
d33447709e ipq807x: fix sysupgrade on WF196
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-15 15:54:47 +01:00
John Crispin
dd995426a5 hostapd: always install the cli
Fixes: WIFI-6834
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-15 12:50:31 +01:00
John Crispin
4dcd0ad1da uvol: update to latest version
Fixes: WIFI-368
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-15 07:54:43 +01:00
John Crispin
9285fd2670 ucentral-switch: add hostapd to the build
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-15 07:54:43 +01:00
John Crispin
187326b7ce hostapd: add acs_exclude support
Fixes: WIFI-6933
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-14 14:09:49 +01:00
John Crispin
f8a2de68aa hostapd: backport rrm/wnm features
Fixes: WIFI-7049
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-14 13:57:38 +01:00
John Crispin
41dd91559a hostapd: update to latest stable upstream release
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-13 11:34:40 +01:00
John Crispin
fc3eec9075 ucentral-schema: update to latest HEAD
07cb6e9 fix time_advertise

Fixes: WIFI-7058
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-13 09:24:44 +01:00
John Crispin
e7a6f497a3 ucentral-schema: add support for valid-channel and allow-dfs
Fixes: WIFI-6933
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
011340ed6e ipq40xx: fix wallytech ubi size
Fixes: WIFI-7048
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
Max
52ea8459e0 add release tag to S3 objects (#426)
Signed-off-by: Max Brenner <xamrennerb@gmail.com>
2022-02-12 17:52:30 +01:00
John Crispin
116b1982ab .github: add hfcl_ion4x* to CI runs
Fixes: WIFI-6842
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
c467a62af3 usteer: update to latest HEAD
Fixes: WIFI-7049
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
88d783c8ad hostapd: improve switch_chan support
Make the code retain current op_class if no new one was provided
via ubus.

Fixes: WIFI-7050
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
b04759322c hostapd: add the ability to use radius based mac-ACL
Fixes: WIFI-5425
Fixes: WIFI-6007
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
b0af666cb4 opennds: fix a segfault caused that can be triggered via a bad url parameter
Fixes: WIFI-6724
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
27947a07f7 ubox: add priority filtering to logread
Fixes: WIFI-6388
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
c1903ae2f9 ucode: enable rtnl plugin
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
d5fed93ec0 ucode: update to latest git HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
dc35dd1ce5 procd: add service measurement support
Fixes: WIFI-7051
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
c59c646a5c certificates: fix a syntax error inside the init.d script
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
8419c94742 ucentral-wifi: add msdu retransmission stats
Fixes: WIFI-6330
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
8eb24a36f3 ucentral-schema: update to latest HEAD
5f769a0 wifisca: add CSA support
9eb55fd state: fix carier state wehn the device is not up
cf8f383 add radios DAE support
ad6ac65 move radius auth mac acl property into the authentication node
7bc2f00 improve wifi scanning
f8f458a always use the systems hostname when streaming the syslog
b2dc0b7 add radius based mac-filters
34671ba ass priority to syslog data model
d7d73d8 fix carrier state reporting NaN
0a49566 add new wifi-scanning code
8f5beb1 add versioning to the state messages
8968d62 counters were not correctly added inside state messages
77b57b8 generate-reader.uc: fix validation of hostname labels with two characters
311bf98 fix radius proxy server settings
fa9ad34 add unit.hostname support
c101acd state: properly split telemetry and state messages
8da20fd renderer.uc: make code scanning radio aware
404a9a3 renderer: restructure and extend documentation
8ecb351 jsdoc: add proper ucode->JS transpiler
ca4ef47 templates: broadband.uc: fix deprecated syntax

Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
22b0f780b0 udevmand: update to latest HEAD
065f75c make delta counters an opt-in property

Fixes: WIFI-7052
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
3093fda383 ucentral-client: update to latest HEAD and silence warning
e3b71c6 fix a memory leak

* Silence the warning by adding the -p switch to mkdir.

Fixes: WIFI-6190
Fixes: WIFI-6761
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
198aaefbdb ath79: make the indio profile use the ath10k feed
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
5dd85e4bb5 profiles: add actiontec web7200
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
ff118acdea ramips: add actiontec web7200 support
Fixes: WIFI-7057
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
83cdabf037 qca-nss-clients: fix ipq50xx support
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
40c0875adf ath11k: fix ipq50xx support
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
d3cf1f6b70 ipq807x: fix wifi mac on hfcl,ion4x*
Fixes: WIFI-6843
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00
John Crispin
9a01085401 ipq807x: fix mac assignment on eap101
Fixes: WIFI-6193
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 12:41:42 +01:00
John Crispin
1833a9a3fb ipq807x: variuos performance tweaks
2x2 wifi is now just below 1.1gbit and 4x4 just below 2gbit

Fixes: WIFI-6174
Fixes: WIFI-7053
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 12:41:42 +01:00
John Crispin
827edf3c1d ipq807x: add latest AQ FW
Fixes: WIFI-6763
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 12:41:42 +01:00
John Crispin
eb9bdfaed9 ipq807x: add certification support
Fixes: WIFI-7055
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 12:41:42 +01:00
John Crispin
c6f7b415d0 ipq807x: fix arp in hairpin mode
Fixes: WIFI-7056
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 12:41:38 +01:00
John Crispin
4da61c2cab ipq807x: make sure the macs are assigned correctly on eap101/102
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 11:42:59 +01:00
John Crispin
ab6e7576db ipq807x: make sure that uboot assigns the correct mac to eap101 lan2
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 11:42:59 +01:00
John Crispin
c140e29589 ipq807x: enable uboot-envtools by default
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 11:42:59 +01:00
John Crispin
2972abf7e3 ipq807x: add cybertan eww622-a1
Fixes: WIFI-7054
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 11:42:16 +01:00
John Crispin
42cc2f0e78 ucentral: drop legacy packages
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-04 08:06:06 +01:00
John Crispin
19128346ae openwrt-21.02: update to latest upstream commit
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-04 08:06:06 +01:00
John Crispin
75ed221675 mediatek: add SDK target
This adds support for panther and merlin.

Signed-off-by: John Crispin <john@phrozen.org>
2022-02-04 08:06:06 +01:00
John Crispin
34138032a7 rtkmipsel: add target support
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-04 08:06:06 +01:00
John Crispin
65e1a72b57 bluetooth: add support for various chips
This makes BT/LE work on eap101/2/6

Signed-off-by: John Crispin <john@phrozen.org>
2022-02-04 08:06:05 +01:00
John Crispin
6448427eec mt7621: add support for CIG WF808
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-04 08:06:05 +01:00
John Crispin
bb2b6db088 patches: restructure patches and backports
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-04 08:06:05 +01:00
John Crispin
48a091a3a2 ipq807x: merge target patches and convert to a feed
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-04 08:06:05 +01:00
John Crispin
6d9d4ab47a ipq807x: add latest AQ FW
Fixes: WIFI-3487
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-01 18:19:58 +01:00
John Crispin
0406b7cb95 .github: add hfcl_ion4x* to CI runs
Signed-off-by: John Crispin <john@phrozen.org>
2022-01-31 07:38:52 +01:00
John Crispin
211e9c39e9 ucentral-client: update to latest HEAD
b4e8fc8 add connection watchdog
48e89d8 send a success message if the config had already been applied.
9bb8cfe properly decrement the event counter when deleting entries
2e53c8f add event_dump_all support to uboot
7ebeaca add ping command handler

Signed-off-by: John Crispin <john@phrozen.org>
2022-01-31 07:38:52 +01:00
John Crispin
64009d7d2a ipq807x: fix mac assingment on eap101
Fixes: WIFI-3487
Signed-off-by: John Crispin <john@phrozen.org>
2022-01-31 07:38:52 +01:00
John Crispin
70e922f609 udnssnoop: update to latest HEAD
Fixes: WIFI-3487
Signed-off-by: John Crispin <john@phrozen.org>
2022-01-31 07:02:37 +01:00
John Crispin
b41b53b9d8 Docker: do not install llvm
Let the buildsystem build the toolchain.

Fixes: WIFI-3487
Signed-off-by: John Crispin <john@phrozen.org>
2022-01-31 07:01:31 +01:00
John Crispin
92d03f5283 ipq807x: update WF188n BDF file
Fixes: WIFI-3487
Signed-off-by: John Crispin <john@phrozen.org>
2022-01-31 06:58:56 +01:00
John Crispin
8529d7471a ipq40xx: fix wifi mac assignment on on hfcl-ion4
Signed-off-by: John Crispin <john@phrozen.org>
2022-01-05 12:41:12 +01:00
8159 changed files with 1437514 additions and 1145026 deletions

View File

@@ -0,0 +1,39 @@
name: Create AMI from firmware image in S3 bucket
inputs:
firmware_image_name:
description: Name of the firmware image
required: true
firmware_image_s3_bucket:
description: Name of the S3 bucket where the image resides
required: true
runs:
using: "composite"
steps:
- name: Import snapshot based on firmware image
id: import_snapshot
shell: bash
run: |
echo "import_task_id=$(aws ec2 import-snapshot --description '${{ inputs.firmware_image_name }}' --disk-container 'Format=raw,UserBucket={S3Bucket=${{ inputs.firmware_image_s3_bucket }},S3Key=${{ inputs.firmware_image_name }}}' | jq -r '.ImportTaskId')" >> $GITHUB_OUTPUT
- name: Wait for import task to complete and get snapshot ID
id: get_snapshot_id
shell: bash
run: |
IMPORT_TASK_STATUS=""
while [[ $IMPORT_TASK_STATUS != 'completed' ]]; do
IMPORT_TASK_STATUS=$(aws ec2 describe-import-snapshot-tasks --import-task-ids ${{ steps.import_snapshot.outputs.import_task_id }} | jq -r '.ImportSnapshotTasks[].SnapshotTaskDetail.Status')
echo "Import task status is $IMPORT_TASK_STATUS, waiting for completion."
done
echo "id=$(aws ec2 describe-import-snapshot-tasks --import-task-ids ${{ steps.import_snapshot.outputs.import_task_id }} | jq -r '.ImportSnapshotTasks[].SnapshotTaskDetail.SnapshotId')" >> $GITHUB_OUTPUT
- name: Tag snapshot with image name
shell: bash
run: |
aws ec2 create-tags --resources ${{ steps.get_snapshot_id.outputs.id }} --tags 'Key=Name,Value=${{ inputs.firmware_image_name }}'
- name: Register AMI based on snapshot
shell: bash
run: |
aws ec2 register-image --name '${{ inputs.firmware_image_name }}' --root-device-name /dev/xvda --block-device-mappings 'DeviceName=/dev/xvda,Ebs={SnapshotId=${{ steps.get_snapshot_id.outputs.id }}}'

52
.github/workflows/build-dev.yml vendored Normal file → Executable file
View File

@@ -1,5 +1,13 @@
name: Build OpenWrt/uCentral images
env:
AWS_DEFAULT_OUTPUT: json
AWS_DEFAULT_REGION: us-east-1
AWS_S3_BUCKET_NAME: ucentral-ap-firmware
AWS_ACCOUNT_ID: ${{ secrets.UCENTRAL_S3_ACCOUNT_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.UCENTRAL_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.UCENTRAL_S3_ACCESS_KEY_SECRET }}
on:
push:
branches: [ main, next, staging-* ]
@@ -7,14 +15,20 @@ on:
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
x64_vm_image_name: ${{ steps.package_and_upload_image.outputs.x64_vm_image_name }}
strategy:
fail-fast: false
matrix:
target: ['cig_wf188n', 'cig_wf194c', 'cig_wf194c4', 'cig_wf160d', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_ecs4100-12ph', 'edgecore_ecw5211', 'edgecore_ecw5410', 'edgecore_oap100', 'edgecore_ssw2ac2600', 'edgecore_spw2ac1200', 'edgecore_spw2ac1200-lan-poe', 'hfcl_ion4', 'indio_um-305ac', 'linksys_ea6350-v4', 'linksys_e8450-ubi', 'linksys_ea8300', 'tp-link_ec420-g1', 'tplink_ex227', 'tplink_ex228', 'tplink_ex447', 'wallys_dr40x9', 'wallys_dr6018', 'wallys_dr6018_v4' ]
target: [ 'cig_wf189h', 'cig_wf189w', 'cig_wf660a', 'cig_wf672', 'cig_wf186h', 'cig_wf186w', 'cig_wf188n', 'cig_wf189', 'cig_wf196', 'cig_wf196', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'sonicfi_rap630w-312g', 'sonicfi_rap630c-311g', 'sonicfi_rap630w-311g', 'sonicfi_rap650c', 'sonicfi_rap7110c-341x', 'sonicfi_rap750e-h', 'sonicfi_rap750e-s', 'sonicfi_rap750w-311a', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_eap105', 'edgecore_eap111', 'edgecore_oap101', 'edgecore_oap101-6e', 'edgecore_oap101e', 'edgecore_oap101e-6e', 'edgecore_oap103', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4x_3', 'hfcl_ion4xi_w', 'hfcl_ion4x_w', 'indio_um-305ax', 'udaya_a6-id2', 'udaya_a6-od2', 'yuncore_ax820', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655', 'zyxel_nwa130be', 'sercomm_ap72tip-v4', 'asterfusion_ap7330']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# Clean unnecessary files to save disk space
- name: clean unncessary files to save space
run: |
docker rmi `docker images -q` || true
- name: Build image for ${{ matrix.target }}
id: build
@@ -24,17 +38,12 @@ jobs:
make -j TARGET=${{ matrix.target }}
- name: Package and upload image for ${{ matrix.target }}
id: package_and_upload_image
env:
GH_BUILD_USERNAME: ${{ secrets.GH_BUILD_USERNAME }}
GH_BUILD_PASSWORD: ${{ secrets.GH_BUILD_PASSWORD }}
ARTIFACTORY_USERNAME: cicd-indoor-main
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
AWS_S3_BUCKET_NAME: ucentral-ap-firmware
AWS_DEFAULT_OUTPUT: json
AWS_DEFAULT_REGION: us-east-1
AWS_ACCOUNT_ID: ${{ secrets.UCENTRAL_S3_ACCOUNT_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.UCENTRAL_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.UCENTRAL_S3_ACCESS_KEY_SECRET }}
run: |
LOWERCASE_TARGET=`echo ${{ matrix.target }} | tr '[:upper:]' '[:lower:]'`
HASH=$(git rev-parse --short HEAD)
@@ -42,8 +51,10 @@ jobs:
if [[ ${GITHUB_REF} == "refs/heads/"* ]]
then
REF=$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')
IS_RELEASE="false"
else
REF=$(echo ${GITHUB_REF#refs/tags/} | tr '/' '-')
IS_RELEASE="true"
fi
BASENAME="$(date +%Y%m%d)-$LOWERCASE_TARGET-$REF-$HASH"
@@ -60,10 +71,16 @@ jobs:
[ -f openwrt/tmp/image-file ] && curl -u $GH_BUILD_USERNAME:$GH_BUILD_PASSWORD -T "latest-upgrade.json" "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/$LOWERCASE_TARGET/latest-upgrade.json"
[ -f openwrt/tmp/image-file ] && aws s3 cp --acl public-read --content-type "application/octet-stream" "openwrt/$(cat openwrt/tmp/image-file)" "s3://$AWS_S3_BUCKET_NAME/$IMG_NAME"
[ -f openwrt/tmp/image-file ] && aws s3api put-object-tagging --bucket "$AWS_S3_BUCKET_NAME" --key "$IMG_NAME" --tagging "{\"TagSet\":[{\"Key\":\"release\",\"Value\":\"$IS_RELEASE\"}]}"
[ -f openwrt/tmp/image-file ] && aws s3 cp --acl public-read --content-type "application/json" "latest-upgrade.json" "s3://$AWS_S3_BUCKET_NAME/$JSON_NAME"
[ -f openwrt/tmp/image-file ] && aws s3api put-object-tagging --bucket "$AWS_S3_BUCKET_NAME" --key "$JSON_NAME" --tagging "{\"TagSet\":[{\"Key\":\"release\",\"Value\":\"$IS_RELEASE\"}]}"
if [ ${{ matrix.target }} == 'x64_vm' ]; then
echo "x64_vm_image_name=$(echo $IMG_NAME)" >> $GITHUB_OUTPUT
fi
trigger-testing:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
@@ -74,3 +91,16 @@ jobs:
repository: Telecominfraproject/wlan-testing
event-type: new-ap-release
client-payload: '{"ref": "${GITHUB_REF#refs/tags/}", "sha": "${{ github.sha }}"}'
create-x64_vm-ami:
runs-on: ubuntu-22.04
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- name: Use create-ami-from-image composite action
uses: ./.github/actions/create-ami-from-image
with:
firmware_image_name: ${{ needs.build.outputs.x64_vm_image_name }}
firmware_image_s3_bucket: ${{ env.AWS_S3_BUCKET_NAME }}

88
.github/workflows/x64_vm-build-test.yml vendored Normal file
View File

@@ -0,0 +1,88 @@
name: Test x64_vm build and AMI creation
env:
AWS_DEFAULT_OUTPUT: json
AWS_DEFAULT_REGION: us-east-1
AWS_S3_BUCKET_NAME: ucentral-ap-firmware
AWS_ACCOUNT_ID: ${{ secrets.UCENTRAL_S3_ACCOUNT_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.UCENTRAL_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.UCENTRAL_S3_ACCESS_KEY_SECRET }}
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
outputs:
x64_vm_image_name: ${{ steps.package_and_upload_image.outputs.x64_vm_image_name }}
strategy:
fail-fast: false
matrix:
target: ['x64_vm']
steps:
- uses: actions/checkout@v3
- name: Build image for ${{ matrix.target }}
id: build
run: |
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
make -j TARGET=${{ matrix.target }} make -j TARGET=${{ matrix.target }}
- name: Package and upload image for ${{ matrix.target }}
id: package_and_upload_image
env:
GH_BUILD_USERNAME: ${{ secrets.GH_BUILD_USERNAME }}
GH_BUILD_PASSWORD: ${{ secrets.GH_BUILD_PASSWORD }}
ARTIFACTORY_USERNAME: cicd-indoor-main
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
run: |
LOWERCASE_TARGET=`echo ${{ matrix.target }} | tr '[:upper:]' '[:lower:]'`
HASH=$(git rev-parse --short HEAD)
if [[ ${GITHUB_REF} == "refs/heads/"* ]]
then
REF=$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')
IS_RELEASE="false"
else
REF=$(echo ${GITHUB_REF#refs/tags/} | tr '/' '-')
IS_RELEASE="true"
fi
BASENAME="$(date +%Y%m%d)-$LOWERCASE_TARGET-$REF-$HASH"
TAR_NAME="$BASENAME.tar.gz"
IMG_NAME="$BASENAME-upgrade.bin";
JSON_NAME="$BASENAME.json";
tar cfz "$TAR_NAME" -C openwrt/bin/targets/ .
curl -s -u $GH_BUILD_USERNAME:$GH_BUILD_PASSWORD -T "$TAR_NAME" "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/$LOWERCASE_TARGET/"$TAR_NAME""
IMG_NAME="$BASENAME-upgrade.bin";
TIP_VERSION="$(grep DISTRIB_TIP= openwrt/tmp/openwrt_release | cut -d\' -f2)"
echo -e "{\n\t\"image\":\""${IMG_NAME}"\",\n\t\"revision\": \""${TIP_VERSION}"\",\n\t\"timestamp\":\""$(date +%s)"\",\n\t\"compatible\": \""${LOWERCASE_TARGET}"\"\n}" > latest-upgrade.json
[ -f openwrt/tmp/image-file ] && curl -s -u $GH_BUILD_USERNAME:$GH_BUILD_PASSWORD -T "openwrt/$(cat openwrt/tmp/image-file)" "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/$LOWERCASE_TARGET/"$IMG_NAME""
[ -f openwrt/tmp/image-file ] && curl -s -u $GH_BUILD_USERNAME:$GH_BUILD_PASSWORD -T "latest-upgrade.json" "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/$LOWERCASE_TARGET/latest-upgrade.json"
[ -f openwrt/tmp/image-file ] && aws s3 cp --acl public-read --content-type "application/octet-stream" "openwrt/$(cat openwrt/tmp/image-file)" "s3://$AWS_S3_BUCKET_NAME/$IMG_NAME"
[ -f openwrt/tmp/image-file ] && aws s3api put-object-tagging --bucket "$AWS_S3_BUCKET_NAME" --key "$IMG_NAME" --tagging "{\"TagSet\":[{\"Key\":\"release\",\"Value\":\"$IS_RELEASE\"}]}"
[ -f openwrt/tmp/image-file ] && aws s3 cp --acl public-read --content-type "application/json" "latest-upgrade.json" "s3://$AWS_S3_BUCKET_NAME/$JSON_NAME"
[ -f openwrt/tmp/image-file ] && aws s3api put-object-tagging --bucket "$AWS_S3_BUCKET_NAME" --key "$JSON_NAME" --tagging "{\"TagSet\":[{\"Key\":\"release\",\"Value\":\"$IS_RELEASE\"}]}"
if [[ ${{ matrix.target }} == 'x64_vm' ]]; then
echo "x64_vm_image_name=$(echo $IMG_NAME)" >> $GITHUB_OUTPUT
fi
create-x64_vm-ami:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
with:
ref: WIFI-7206-add-workflow-to-build-virtual-ap-image
- name: Use create-ami-from-image composite action
uses: ./.github/actions/create-ami-from-image
with:
firmware_image_name: ${{ needs.build.outputs.x64_vm_image_name }}
firmware_image_s3_bucket: ${{ env.AWS_S3_BUCKET_NAME }}

28
LICENSE Normal file
View File

@@ -0,0 +1,28 @@
BSD 3-Clause License
Copyright (c) 2024, Telecom Infra Project
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,20 +1,83 @@
# Setting up your build machine
# OpenWiFi AP NOS
Requires a recent linux installation. Older systems without python 3.7 will have trouble. See this link for details: https://openwrt.org/docs/guide-developer/quickstart-build-images
OpenWrt-based access point network operating system (AP NOS) for TIP OpenWiFi.
Read more at [openwifi.tip.build](https://openwifi.tip.build/).
Install build packages: sudo apt install build-essential libncurses5-dev gawk git libssl-dev gettext zlib1g-dev swig unzip time rsync python3 python3-setuptools python3-yaml.
## Building
# Doing a native build on Linux
First we need to clone and setup our tree. This will result in an openwrt/.
### Setting up your build machine
Building requires a recent Linux installation. Older systems without Python 3.7
will have trouble. See this guide for details:
https://openwrt.org/docs/guide-developer/toolchain/beginners-build-guide
Install build packages on Debian/Ubuntu (or see above guide for other systems):
```
./setup.py --setup
sudo apt install build-essential libncurses5-dev gawk git libssl-dev gettext zlib1g-dev swig unzip time rsync python3 python3-setuptools python3-yaml
```
Next we need to select the profile and base package selection. This setup will install the feeds, packages and generate the .config file.
### Doing a native build on Linux
Use `./build.sh <target>`, or follow the manual steps below:
1. Clone and set up the tree. This will create an `openwrt/` directory.
```shell
./setup.py --setup # for subsequent builds, use --rebase instead
```
2. Select the profile and base package selection. This setup will install the
feeds and packages and generate the `.config` file.
```shell
cd openwrt
./scripts/gen_config.py ea8300
./scripts/gen_config.py linksys_ea8300
```
Finally we can build the tree.
```
make -j X V=s
3. Build the tree (replace `-j 8` with the number of cores to use).
```shell
make -j 8 V=s
```
### Build output
The build results are located in the `openwrt/bin/` directory:
| Type | Path |
| ---------------- | ---------------------------------------------------- |
| Firmware images | `openwrt/bin/targets/<target>/<subtarget>/` |
| Kernel modules | `openwrt/bin/targets/<target>/<subtarget>/packages/` |
| Package binaries | `openwrt/bin/packages/<platform>/<feed>/` |
## Developer Notes
### Branching model
- `main` - Stable dev branch
- `next` - Integration branch
- `staging-*` - Feature/bug branches
- `release/v#.#.#` - Release branches (*major.minor.patch*)
### Repository structure
Build files:
- `Makefile` - Calls Docker environment per target
- `dock-run.sh` - Dockerized build environment
- `docker/Dockerfile` - Dockerfile for build image
- `build.sh` - Build script
- `setup.py` - Clone and set up the tree
- `config.yml` - Specifies OpenWrt version and patches to apply
Directories:
- `feeds/` - OpenWiFi feeds
- `patches/` - OpenWiFi patches applied during builds
- `profiles/` - Per-target kernel configs, packages, and feeds
- [wifi-ax](profiles/wifi-ax.yml): Wi-Fi AX packages
- [ucentral-ap](profiles/ucentral-ap.yml): uCentral packages
- [x64_vm](profiles/x64_vm.yml): x86-64 VM image
### uCentral packages
AP-NOS packages implementing the uCentral protocol include the following
repositories (refer to the [ucentral](feeds/ucentral/) feed for a full list):
- ucentral-client: https://github.com/Telecominfraproject/wlan-ucentral-client
- ucentral-schema: https://github.com/Telecominfraproject/wlan-ucentral-schema
- ucentral-wifi: https://github.com/blogic/ucentral-wifi

View File

@@ -1,48 +0,0 @@
From c51ac602aff1a9b0093687fe39164a3b895fd4a2 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Thu, 22 Oct 2020 10:29:34 +0200
Subject: [PATCH 01/27] build: build kernel image before building
modules/packages
This is needed for linux 5.10, where modules.builtin is generated from
vmlinux.o
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
include/kernel-defaults.mk | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index 3aa1baa761..c02e0d34ca 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -115,7 +115,7 @@ endef
define Kernel/CompileModules/Default
rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map
- +$(KERNEL_MAKE) modules
+ +$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
endef
OBJCOPY_STRIP = -R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
@@ -139,7 +139,7 @@ endef
define Kernel/CompileImage/Default
rm -f $(TARGET_DIR)/init
- +$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
+ +$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all)
$(call Kernel/CopyImage)
endef
@@ -149,7 +149,7 @@ define Kernel/CompileImage/Initramfs
$(CP) $(GENERIC_PLATFORM_DIR)/other-files/init $(TARGET_DIR)/init
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR)/init)
rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio*
- +$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
+ +$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all)
$(call Kernel/CopyImage,-initramfs)
endef
else
--
2.25.1

View File

@@ -1,46 +0,0 @@
From 6c50e27b166b30c0b3f7b730717ab4b7f446e4d0 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Wed, 17 Feb 2021 13:49:14 +0100
Subject: [PATCH 02/27] build: fix build with CONFIG_STRIP_KERNEL_EXPORTS
Only use symtab.h on the final kernel link
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
include/kernel-defaults.mk | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index c02e0d34ca..f9316fc3f9 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -3,7 +3,7 @@
# Copyright (C) 2006-2020 OpenWrt.org
ifdef CONFIG_STRIP_KERNEL_EXPORTS
- KERNEL_MAKEOPTS += \
+ KERNEL_MAKEOPTS_IMAGE += \
EXTRA_LDSFLAGS="-I$(KERNEL_BUILD_DIR) -include symtab.h"
endif
@@ -139,7 +139,7 @@ endef
define Kernel/CompileImage/Default
rm -f $(TARGET_DIR)/init
- +$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all)
+ +$(KERNEL_MAKE) $(KERNEL_MAKEOPTS_IMAGE) $(if $(KERNELNAME),$(KERNELNAME),all)
$(call Kernel/CopyImage)
endef
@@ -149,7 +149,7 @@ define Kernel/CompileImage/Initramfs
$(CP) $(GENERIC_PLATFORM_DIR)/other-files/init $(TARGET_DIR)/init
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR)/init)
rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio*
- +$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all)
+ +$(KERNEL_MAKE) $(KERNEL_MAKEOPTS_IMAGE) $(if $(KERNELNAME),$(KERNELNAME),all)
$(call Kernel/CopyImage,-initramfs)
endef
else
--
2.25.1

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,74 +0,0 @@
From 7ed003d57f1c5273fecddabcdc7bd6845c3854a0 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sat, 20 Feb 2021 08:36:43 +0100
Subject: [PATCH 05/27] sysupgrade-nand: allow limiting rootfs_data by setting
env variable
Check if firmware environment variable 'rootfs_data_max' exists and is
set to a numerical value greater than 0. If so, limit rootfs_data
volume to that size instead of using the maximum available size.
This is useful on devices with lots of flash where users may want to
have eg. a volume for persistent logs and statistics or for external
applications/containers. Persistence on rootfs overlay is limited by
the size of memory available during the sysugprade process as that
data needs to be copied to RAM while the volume is being recreated
during sysupgrade. Hence it is unsuitable for keeping larger amounts
of data accross upgrade which makes additional volume(s) for
application data desirable.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
package/base-files/files/lib/upgrade/nand.sh | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh
index 5bc9ff83f9..e335d940ed 100644
--- a/package/base-files/files/lib/upgrade/nand.sh
+++ b/package/base-files/files/lib/upgrade/nand.sh
@@ -117,6 +117,9 @@ nand_restore_config() {
nand_upgrade_prepare_ubi() {
local rootfs_length="$1"
local rootfs_type="$2"
+ local rootfs_data_max="$(fw_printenv -n rootfs_data_max 2>/dev/null)"
+ [ -n "$rootfs_data_max" ] && rootfs_data_max=$(printf %d "$rootfs_data_max")
+
local kernel_length="$3"
local has_env="${4:-0}"
@@ -176,11 +179,11 @@ nand_upgrade_prepare_ubi() {
# update rootfs
if [ -n "$rootfs_length" ]; then
- local root_size_param
+ local rootfs_size_param
if [ "$rootfs_type" = "ubifs" ]; then
- root_size_param="-m"
+ rootfs_size_param="-m"
else
- root_size_param="-s $rootfs_length"
+ rootfs_size_param="-s $rootfs_length"
fi
if ! ubimkvol /dev/$ubidev -N $CI_ROOTPART $rootfs_size_param; then
echo "cannot create rootfs volume"
@@ -190,7 +193,16 @@ nand_upgrade_prepare_ubi() {
# create rootfs_data for non-ubifs rootfs
if [ "$rootfs_type" != "ubifs" ]; then
- if ! ubimkvol /dev/$ubidev -N rootfs_data -m; then
+ local availeb=$(cat /sys/devices/virtual/ubi/$ubidev/avail_eraseblocks)
+ local ebsize=$(cat /sys/devices/virtual/ubi/$ubidev/eraseblock_size)
+ local avail_size=$(( $availeb * $ebsize ))
+ local rootfs_data_size_param="-m"
+ if [ -n "$rootfs_data_max" ] &&
+ [ "$rootfs_data_max" != "0" ] &&
+ [ "$rootfs_data_max" -le "$avail_size" ]; then
+ rootfs_data_size_param="-s $rootfs_data_max"
+ fi
+ if ! ubimkvol /dev/$ubidev -N rootfs_data $rootfs_data_size_param; then
echo "cannot initialize rootfs_data volume"
return 1
fi
--
2.25.1

View File

@@ -1,70 +0,0 @@
From 1a9921bab861dd2c89337c3e4833c716a0474653 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Fri, 12 Feb 2021 03:09:39 +0000
Subject: [PATCH 07/27] uboot-envtools: add defaults for linksys-e8450-ubi
Add U-Boot environment configuration for the Linksys E8450 (UBI) to
allow access to the bootloader environment from OpenWrt via
'fw_printenv' and 'fw_setenv'.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
package/boot/uboot-envtools/files/mediatek | 46 ++++++++++++++++++++++
1 file changed, 46 insertions(+)
create mode 100644 package/boot/uboot-envtools/files/mediatek
diff --git a/package/boot/uboot-envtools/files/mediatek b/package/boot/uboot-envtools/files/mediatek
new file mode 100644
index 0000000000..495a837274
--- /dev/null
+++ b/package/boot/uboot-envtools/files/mediatek
@@ -0,0 +1,46 @@
+#
+# Copyright (C) 2021 OpenWrt.org
+#
+
+[ -e /etc/config/ubootenv ] && exit 0
+
+touch /etc/config/ubootenv
+
+. /lib/uboot-envtools.sh
+. /lib/functions.sh
+
+board=$(board_name)
+
+case "$board" in
+linksys,e8450-ubi)
+ ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1"
+ ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
+ ;;
+bananapi,bpi-r64)
+ . /lib/upgrade/common.sh
+ export_bootdevice
+ export_partdevice rootdev 0
+ case "$rootdev" in
+ mmc*)
+ local envdev=/dev/$(get_partition_by_name $rootdev ubootenv)
+ ubootenv_add_uci_config "$envdev" "0x0" "0x80000" "0x80000" "1"
+ ubootenv_add_uci_config "$envdev" "0x80000" "0x80000" "0x80000" "1"
+ ;;
+ *)
+ ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1"
+ ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
+ ;;
+ esac
+ ;;
+buffalo,wsr-2533dhp2)
+ ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x1000" "0x20000"
+ ;;
+ubnt,unifi-6-lr-ubootmod)
+ ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
+ ;;
+esac
+
+config_load ubootenv
+config_foreach ubootenv_add_app_config ubootenv
+
+exit 0
--
2.25.1

File diff suppressed because it is too large Load Diff

View File

@@ -1,33 +0,0 @@
From 4ed9b7d04405d5109681643f3ceebbd25f3f28e2 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Wed, 7 Apr 2021 10:46:26 +0200
Subject: [PATCH 09/27] include: set kernel-version.mk
Signed-off-by: John Crispin <john@phrozen.org>
---
include/kernel-version.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index fe81dbf603..3c109c13c8 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -6,9 +6,15 @@ ifdef CONFIG_TESTING_KERNEL
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
endif
+LINUX_VERSION-4.4 = .60
+LINUX_VERSION-4.14 = .193
LINUX_VERSION-5.4 = .142
+LINUX_VERSION-5.10 = .27
+LINUX_KERNEL_HASH-4.4.60 = 2cd8df6f1ac6a5329c5a286ec9b5956215977221a1b731597ed169fff74a9659
+LINUX_KERNEL_HASH-4.14.193 = 0b0fb41d4430e1a42738b341cbfd2f41951aa5cd02acabbd53f076119c8b9f03
LINUX_KERNEL_HASH-5.4.142 = 99785728968564ba27c7e552d024b560072dcbc885540912eabb5c021e231451
+LINUX_KERNEL_HASH-5.10.27 = d99dc9662951299c53a0a8d8c8d0a72a16ff861d20e927c0f9b14f63282d69d9
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
--
2.25.1

View File

@@ -1,266 +0,0 @@
From ad860cb413d1934332de60658d5eb8fb64d19663 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sun, 9 May 2021 12:23:00 +0200
Subject: [PATCH 11/27] backport: mkits.sh
969083634481c3ab5fb80509f385ef10ab45b55f
e991c1b8a2385397fc1e657ed73878938997d951
9f714398e060c6338fbfad44cdbfa8c940dbb84b
Signed-off-by: John Crispin <john@phrozen.org>
---
include/image-commands.mk | 2 +-
include/image.mk | 2 +-
scripts/mkits.sh | 101 +++++++++++++++++++++++++---
target/linux/ipq40xx/image/Makefile | 1 +
target/linux/ipq806x/image/Makefile | 1 +
5 files changed, 95 insertions(+), 12 deletions(-)
diff --git a/include/image-commands.mk b/include/image-commands.mk
index 2c917d613e..c6e8eb0293 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -203,7 +203,7 @@ define Build/fit
$(if $(word 3,$(1)),-r $(IMAGE_ROOTFS) -f $(subst _,$(comma),$(DEVICE_NAME))) \
-a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
$(if $(DEVICE_FDT_NUM),-n $(DEVICE_FDT_NUM)) \
- -c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config@1") \
+ -c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \
-A $(LINUX_KARCH) -v $(LINUX_VERSION)
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage $(if $(word 3,$(1)),-E -B 0x1000 -p 0x1000) -f $@.its $@.new
@mv $@.new $@
diff --git a/include/image.mk b/include/image.mk
index b6e8ab3c84..7c2dcf0e8b 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -139,7 +139,7 @@ endef
define Image/BuildKernel/MkFIT
$(TOPDIR)/scripts/mkits.sh \
-D $(1) -o $(KDIR)/fit-$(1).its -k $(2) $(if $(3),-d $(3)) -C $(4) -a $(5) -e $(6) \
- -c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config@1") \
+ -c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \
-A $(LINUX_KARCH) -v $(LINUX_VERSION)
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $(KDIR)/fit-$(1).its $(KDIR)/fit-$(1)$(7).itb
endef
diff --git a/scripts/mkits.sh b/scripts/mkits.sh
index 3d68fdacbc..7533baf799 100755
--- a/scripts/mkits.sh
+++ b/scripts/mkits.sh
@@ -24,22 +24,29 @@ usage() {
printf "\n\t-a ==> set load address to 'addr' (hex)"
printf "\n\t-e ==> set entry point to 'entry' (hex)"
printf "\n\t-f ==> set device tree compatible string"
+ printf "\n\t-i ==> include initrd Blob 'initrd'"
printf "\n\t-v ==> set kernel version to 'version'"
printf "\n\t-k ==> include kernel image 'kernel'"
printf "\n\t-D ==> human friendly Device Tree Blob 'name'"
printf "\n\t-n ==> fdt unit-address 'address'"
printf "\n\t-d ==> include Device Tree Blob 'dtb'"
- printf "\n\t-r ==> include RootFS blob"
+ printf "\n\t-r ==> include RootFS blob 'rootfs'"
printf "\n\t-H ==> specify hash algo instead of SHA1"
- printf "\n\t-o ==> create output file 'its_file'\n"
+ printf "\n\t-o ==> create output file 'its_file'"
+ printf "\n\t-O ==> create config with dt overlay 'name:dtb'"
+ printf "\n\t\t(can be specified more than once)\n"
exit 1
}
FDTNUM=1
ROOTFSNUM=1
+INITRDNUM=1
HASH=sha1
+LOADABLES=
+DTOVERLAY=
+DTADDR=
-while getopts ":A:a:c:C:D:d:e:f:k:n:o:v:r:S" OPTION
+while getopts ":A:a:c:C:D:d:e:f:i:k:n:o:O:v:r:S" OPTION
do
case $OPTION in
A ) ARCH=$OPTARG;;
@@ -50,9 +57,11 @@ do
d ) DTB=$OPTARG;;
e ) ENTRY_ADDR=$OPTARG;;
f ) COMPATIBLE=$OPTARG;;
+ i ) INITRD=$OPTARG;;
k ) KERNEL=$OPTARG;;
n ) FDTNUM=$OPTARG;;
o ) OUTPUT=$OPTARG;;
+ O ) DTOVERLAY="$DTOVERLAY ${OPTARG}";;
r ) ROOTFS=$OPTARG;;
S ) HASH=$OPTARG;;
v ) VERSION=$OPTARG;;
@@ -74,14 +83,20 @@ if [ -n "${COMPATIBLE}" ]; then
COMPATIBLE_PROP="compatible = \"${COMPATIBLE}\";"
fi
+[ "$DTOVERLAY" ] && {
+ dtbsize=$(wc -c "$DTB" | cut -d' ' -f1)
+ DTADDR=$(printf "0x%08x" $(($LOAD_ADDR - $dtbsize)) )
+}
+
# Conditionally create fdt information
if [ -n "${DTB}" ]; then
FDT_NODE="
- fdt@$FDTNUM {
+ fdt-$FDTNUM {
description = \"${ARCH_UPPER} OpenWrt ${DEVICE} device tree blob\";
${COMPATIBLE_PROP}
data = /incbin/(\"${DTB}\");
type = \"flat_dt\";
+ ${DTADDR:+load = <${DTADDR}>;}
arch = \"${ARCH}\";
compression = \"none\";
hash@1 {
@@ -92,13 +107,34 @@ if [ -n "${DTB}" ]; then
};
};
"
- FDT_PROP="fdt = \"fdt@$FDTNUM\";"
+ FDT_PROP="fdt = \"fdt-$FDTNUM\";"
fi
+if [ -n "${INITRD}" ]; then
+ INITRD_NODE="
+ initrd-$INITRDNUM {
+ description = \"${ARCH_UPPER} OpenWrt ${DEVICE} initrd\";
+ ${COMPATIBLE_PROP}
+ data = /incbin/(\"${INITRD}\");
+ type = \"ramdisk\";
+ arch = \"${ARCH}\";
+ os = \"linux\";
+ hash@1 {
+ algo = \"crc32\";
+ };
+ hash@2 {
+ algo = \"${HASH}\";
+ };
+ };
+"
+ INITRD_PROP="ramdisk=\"initrd-${INITRDNUM}\";"
+fi
+
+
if [ -n "${ROOTFS}" ]; then
dd if="${ROOTFS}" of="${ROOTFS}.pagesync" bs=4096 conv=sync
ROOTFS_NODE="
- rootfs@$ROOTFSNUM {
+ rootfs-$ROOTFSNUM {
description = \"${ARCH_UPPER} OpenWrt ${DEVICE} rootfs\";
${COMPATIBLE_PROP}
data = /incbin/(\"${ROOTFS}.pagesync\");
@@ -113,9 +149,50 @@ if [ -n "${ROOTFS}" ]; then
};
};
"
- ROOTFS_PROP="loadables = \"rootfs@${ROOTFSNUM}\";"
+ LOADABLES="${LOADABLES:+$LOADABLES, }\"rootfs-${ROOTFSNUM}\""
fi
+# add DT overlay blobs
+FDTOVERLAY_NODE=""
+OVCONFIGS=""
+[ "$DTOVERLAY" ] && for overlay in $DTOVERLAY ; do
+ overlay_blob=${overlay##*:}
+ ovname=${overlay%%:*}
+ ovnode="fdt-$ovname"
+ ovsize=$(wc -c "$overlay_blob" | cut -d' ' -f1)
+ echo "$ovname ($overlay_blob) : $ovsize" >&2
+ DTADDR=$(printf "0x%08x" $(($DTADDR - $ovsize)))
+ FDTOVERLAY_NODE="$FDTOVERLAY_NODE
+
+ $ovnode {
+ description = \"${ARCH_UPPER} OpenWrt ${DEVICE} device tree overlay $ovname\";
+ ${COMPATIBLE_PROP}
+ data = /incbin/(\"${overlay_blob}\");
+ type = \"flat_dt\";
+ arch = \"${ARCH}\";
+ load = <${DTADDR}>;
+ compression = \"none\";
+ hash@1 {
+ algo = \"crc32\";
+ };
+ hash@2 {
+ algo = \"${HASH}\";
+ };
+ };
+"
+ OVCONFIGS="$OVCONFIGS
+
+ config-$ovname {
+ description = \"OpenWrt ${DEVICE} with $ovname\";
+ kernel = \"kernel-1\";
+ fdt = \"fdt-$FDTNUM\", \"$ovnode\";
+ ${LOADABLES:+loadables = ${LOADABLES};}
+ ${COMPATIBLE_PROP}
+ ${INITRD_PROP}
+ };
+ "
+done
+
# Create a default, fully populated DTS file
DATA="/dts-v1/;
@@ -124,7 +201,7 @@ DATA="/dts-v1/;
#address-cells = <1>;
images {
- kernel@1 {
+ kernel-1 {
description = \"${ARCH_UPPER} OpenWrt Linux-${VERSION}\";
data = /incbin/(\"${KERNEL}\");
type = \"kernel\";
@@ -140,7 +217,9 @@ DATA="/dts-v1/;
algo = \"$HASH\";
};
};
+${INITRD_NODE}
${FDT_NODE}
+${FDTOVERLAY_NODE}
${ROOTFS_NODE}
};
@@ -148,11 +227,13 @@ ${ROOTFS_NODE}
default = \"${CONFIG}\";
${CONFIG} {
description = \"OpenWrt ${DEVICE}\";
- kernel = \"kernel@1\";
+ kernel = \"kernel-1\";
${FDT_PROP}
- ${ROOTFS_PROP}
+ ${LOADABLES:+loadables = ${LOADABLES};}
${COMPATIBLE_PROP}
+ ${INITRD_PROP}
};
+ ${OVCONFIGS}
};
};"
diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile
index 2be262936f..a0d6242a28 100644
--- a/target/linux/ipq40xx/image/Makefile
+++ b/target/linux/ipq40xx/image/Makefile
@@ -8,6 +8,7 @@ define Device/Default
KERNEL_PREFIX := $$(IMAGE_PREFIX)
KERNEL_LOADADDR := 0x80208000
DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
+ DEVICE_DTS_CONFIG := config@1
IMAGES := sysupgrade.bin
IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
IMAGE/sysupgrade.bin/squashfs :=
diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile
index bab1da0090..3bc60fa931 100644
--- a/target/linux/ipq806x/image/Makefile
+++ b/target/linux/ipq806x/image/Makefile
@@ -30,6 +30,7 @@ define Device/Default
KERNEL_PREFIX := $$(IMAGE_PREFIX)
KERNEL_LOADADDR = 0x42208000
DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
+ DEVICE_DTS_CONFIG := config@1
IMAGES := sysupgrade.bin
IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
IMAGE/sysupgrade.bin/squashfs :=
--
2.25.1

View File

@@ -1,39 +0,0 @@
From bb797fc82f8ade2a1c0b7a68dd7c920eae2f531f Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Tue, 18 May 2021 10:46:43 +0200
Subject: [PATCH 01/74] libubox: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
---
package/libs/libubox/Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile
index d2c07783e1..3b01930d6c 100644
--- a/package/libs/libubox/Makefile
+++ b/package/libs/libubox/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git
-PKG_MIRROR_HASH:=7dd1db1e0074a9c7c722db654cce3111b3bd3cff0bfd791c4497cb0f6c22d3ca
-PKG_SOURCE_DATE:=2021-05-16
-PKG_SOURCE_VERSION:=b14c4688612c05c78ce984d7bde633bce8703b1e
+PKG_MIRROR_HASH:=82d84fb97e725b0a18ceac639cae0c17d922754bb648ff58c62069d92798a6cd
+PKG_SOURCE_DATE:=2021-08-19
+PKG_SOURCE_VERSION:=c86a894ec63d83ecf2c373bbf9dc8fba9713d942
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
CMAKE_INSTALL:=1
@@ -67,7 +67,7 @@ define Package/libubox-lua
endef
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
-CMAKE_OPTIONS = \
+CMAKE_OPTIONS += \
-DLUAPATH=/usr/lib/lua \
-DABIVERSION="$(PKG_ABI_VERSION)"
--
2.25.1

View File

@@ -1,30 +0,0 @@
From 41db6b8282d09bd9d7ee453f54e592003904ab0e Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Wed, 30 Jun 2021 14:21:23 +0200
Subject: [PATCH 13/27] umdns: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
---
package/network/services/umdns/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/network/services/umdns/Makefile b/package/network/services/umdns/Makefile
index 9a5f46a705..908758e44b 100644
--- a/package/network/services/umdns/Makefile
+++ b/package/network/services/umdns/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_URL=$(PROJECT_GIT)/project/mdnsd.git
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2021-01-26
-PKG_SOURCE_VERSION:=78aa36b0e9808e801c527c6dc47320e593309522
-PKG_MIRROR_HASH:=241833f2bf2f3366f356703159be386862ef747d9b253af6c13555f252cc970d
+PKG_SOURCE_DATE:=2021-06-30
+PKG_SOURCE_VERSION:=4a8747193ab2b8f2d68a9d26334545e19d89cbe2
+PKG_MIRROR_HASH:=bdddec2793303e4cc1a90cb2ed2241c04fdd0a736b6c0cbbb1fab9de5527566a
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
PKG_LICENSE:=LGPL-2.1
--
2.25.1

View File

@@ -1,242 +0,0 @@
From 9df1500bde8e609dcbbecbefa0eb5a29d9e6f7f5 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Fri, 27 Aug 2021 16:52:34 +0200
Subject: [PATCH 14/27] kernel: add bdpu filter support
Signed-off-by: John Crispin <john@phrozen.org>
---
...l-knob-for-filtering-rx-tx-BPDU-pack.patch | 107 ++++++++++++++++++
...l-knob-for-filtering-rx-tx-BPDU-pack.patch | 107 ++++++++++++++++++
2 files changed, 214 insertions(+)
create mode 100644 target/linux/generic/pending-5.10/710-bridge-add-sysctl-knob-for-filtering-rx-tx-BPDU-pack.patch
create mode 100644 target/linux/generic/pending-5.4/710-bridge-add-sysctl-knob-for-filtering-rx-tx-BPDU-pack.patch
diff --git a/target/linux/generic/pending-5.10/710-bridge-add-sysctl-knob-for-filtering-rx-tx-BPDU-pack.patch b/target/linux/generic/pending-5.10/710-bridge-add-sysctl-knob-for-filtering-rx-tx-BPDU-pack.patch
new file mode 100644
index 0000000000..918ae05d12
--- /dev/null
+++ b/target/linux/generic/pending-5.10/710-bridge-add-sysctl-knob-for-filtering-rx-tx-BPDU-pack.patch
@@ -0,0 +1,107 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Fri, 27 Aug 2021 12:22:32 +0200
+Subject: [PATCH] bridge: add sysctl knob for filtering rx/tx BPDU packets on a
+ port
+
+Some devices (e.g. wireless APs) can't have devices behind them be part of
+a bridge topology with redundant links, due to address limitations.
+Additionally, broadcast traffic on these devices is somewhat expensive, due to
+the low data rate and wakeups of clients in powersave mode.
+This sysctl knob can be used to ensure that BPDU packets are never sent
+or forwarded to/from these devices
+
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+---
+
+--- a/include/linux/if_bridge.h
++++ b/include/linux/if_bridge.h
+@@ -56,6 +56,7 @@ struct br_ip_list {
+ #define BR_MRP_AWARE BIT(17)
+ #define BR_MRP_LOST_CONT BIT(18)
+ #define BR_MRP_LOST_IN_CONT BIT(19)
++#define BR_BPDU_FILTER BIT(20)
+
+ #define BR_DEFAULT_AGEING_TIME (300 * HZ)
+
+--- a/net/bridge/br_forward.c
++++ b/net/bridge/br_forward.c
+@@ -191,6 +191,7 @@ out:
+ void br_flood(struct net_bridge *br, struct sk_buff *skb,
+ enum br_pkt_type pkt_type, bool local_rcv, bool local_orig)
+ {
++ const unsigned char *dest = eth_hdr(skb)->h_dest;
+ struct net_bridge_port *prev = NULL;
+ struct net_bridge_port *p;
+
+@@ -206,6 +207,10 @@ void br_flood(struct net_bridge *br, str
+ case BR_PKT_MULTICAST:
+ if (!(p->flags & BR_MCAST_FLOOD) && skb->dev != br->dev)
+ continue;
++ if ((p->flags & BR_BPDU_FILTER) &&
++ unlikely(is_link_local_ether_addr(dest) &&
++ dest[5] == 0))
++ continue;
+ break;
+ case BR_PKT_BROADCAST:
+ if (!(p->flags & BR_BCAST_FLOOD) && skb->dev != br->dev)
+--- a/net/bridge/br_input.c
++++ b/net/bridge/br_input.c
+@@ -305,6 +305,8 @@ static rx_handler_result_t br_handle_fra
+ fwd_mask |= p->group_fwd_mask;
+ switch (dest[5]) {
+ case 0x00: /* Bridge Group Address */
++ if (p->flags & BR_BPDU_FILTER)
++ goto drop;
+ /* If STP is turned off,
+ then must forward to keep loop detection */
+ if (p->br->stp_enabled == BR_NO_STP ||
+--- a/net/bridge/br_sysfs_if.c
++++ b/net/bridge/br_sysfs_if.c
+@@ -233,6 +233,7 @@ BRPORT_ATTR_FLAG(multicast_flood, BR_MCA
+ BRPORT_ATTR_FLAG(broadcast_flood, BR_BCAST_FLOOD);
+ BRPORT_ATTR_FLAG(neigh_suppress, BR_NEIGH_SUPPRESS);
+ BRPORT_ATTR_FLAG(isolated, BR_ISOLATED);
++BRPORT_ATTR_FLAG(bpdu_filter, BR_BPDU_FILTER);
+
+ #ifdef CONFIG_BRIDGE_IGMP_SNOOPING
+ static ssize_t show_multicast_router(struct net_bridge_port *p, char *buf)
+@@ -285,6 +286,7 @@ static const struct brport_attribute *br
+ &brport_attr_group_fwd_mask,
+ &brport_attr_neigh_suppress,
+ &brport_attr_isolated,
++ &brport_attr_bpdu_filter,
+ &brport_attr_backup_port,
+ NULL
+ };
+--- a/net/bridge/br_stp_bpdu.c
++++ b/net/bridge/br_stp_bpdu.c
+@@ -80,7 +80,8 @@ void br_send_config_bpdu(struct net_brid
+ {
+ unsigned char buf[35];
+
+- if (p->br->stp_enabled != BR_KERNEL_STP)
++ if (p->br->stp_enabled != BR_KERNEL_STP ||
++ (p->flags & BR_BPDU_FILTER))
+ return;
+
+ buf[0] = 0;
+@@ -127,7 +128,8 @@ void br_send_tcn_bpdu(struct net_bridge_
+ {
+ unsigned char buf[4];
+
+- if (p->br->stp_enabled != BR_KERNEL_STP)
++ if (p->br->stp_enabled != BR_KERNEL_STP ||
++ (p->flags & BR_BPDU_FILTER))
+ return;
+
+ buf[0] = 0;
+@@ -172,6 +174,9 @@ void br_stp_rcv(const struct stp_proto *
+ if (!(br->dev->flags & IFF_UP))
+ goto out;
+
++ if (p->flags & BR_BPDU_FILTER)
++ goto out;
++
+ if (p->state == BR_STATE_DISABLED)
+ goto out;
+
diff --git a/target/linux/generic/pending-5.4/710-bridge-add-sysctl-knob-for-filtering-rx-tx-BPDU-pack.patch b/target/linux/generic/pending-5.4/710-bridge-add-sysctl-knob-for-filtering-rx-tx-BPDU-pack.patch
new file mode 100644
index 0000000000..586d264cd5
--- /dev/null
+++ b/target/linux/generic/pending-5.4/710-bridge-add-sysctl-knob-for-filtering-rx-tx-BPDU-pack.patch
@@ -0,0 +1,107 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Fri, 27 Aug 2021 12:22:32 +0200
+Subject: [PATCH] bridge: add sysctl knob for filtering rx/tx BPDU packets on a
+ port
+
+Some devices (e.g. wireless APs) can't have devices behind them be part of
+a bridge topology with redundant links, due to address limitations.
+Additionally, broadcast traffic on these devices is somewhat expensive, due to
+the low data rate and wakeups of clients in powersave mode.
+This sysctl knob can be used to ensure that BPDU packets are never sent
+or forwarded to/from these devices
+
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+---
+
+--- a/include/linux/if_bridge.h
++++ b/include/linux/if_bridge.h
+@@ -47,6 +47,7 @@ struct br_ip_list {
+ #define BR_BCAST_FLOOD BIT(14)
+ #define BR_NEIGH_SUPPRESS BIT(15)
+ #define BR_ISOLATED BIT(16)
++#define BR_BPDU_FILTER BIT(17)
+
+ #define BR_DEFAULT_AGEING_TIME (300 * HZ)
+
+--- a/net/bridge/br_forward.c
++++ b/net/bridge/br_forward.c
+@@ -191,6 +191,7 @@ out:
+ void br_flood(struct net_bridge *br, struct sk_buff *skb,
+ enum br_pkt_type pkt_type, bool local_rcv, bool local_orig)
+ {
++ const unsigned char *dest = eth_hdr(skb)->h_dest;
+ struct net_bridge_port *prev = NULL;
+ struct net_bridge_port *p;
+
+@@ -206,6 +207,10 @@ void br_flood(struct net_bridge *br, str
+ case BR_PKT_MULTICAST:
+ if (!(p->flags & BR_MCAST_FLOOD) && skb->dev != br->dev)
+ continue;
++ if ((p->flags & BR_BPDU_FILTER) &&
++ unlikely(is_link_local_ether_addr(dest) &&
++ dest[5] == 0))
++ continue;
+ break;
+ case BR_PKT_BROADCAST:
+ if (!(p->flags & BR_BCAST_FLOOD) && skb->dev != br->dev)
+--- a/net/bridge/br_input.c
++++ b/net/bridge/br_input.c
+@@ -300,6 +300,8 @@ rx_handler_result_t br_handle_frame(stru
+ fwd_mask |= p->group_fwd_mask;
+ switch (dest[5]) {
+ case 0x00: /* Bridge Group Address */
++ if (p->flags & BR_BPDU_FILTER)
++ goto drop;
+ /* If STP is turned off,
+ then must forward to keep loop detection */
+ if (p->br->stp_enabled == BR_NO_STP ||
+--- a/net/bridge/br_sysfs_if.c
++++ b/net/bridge/br_sysfs_if.c
+@@ -233,6 +233,7 @@ BRPORT_ATTR_FLAG(multicast_flood, BR_MCA
+ BRPORT_ATTR_FLAG(broadcast_flood, BR_BCAST_FLOOD);
+ BRPORT_ATTR_FLAG(neigh_suppress, BR_NEIGH_SUPPRESS);
+ BRPORT_ATTR_FLAG(isolated, BR_ISOLATED);
++BRPORT_ATTR_FLAG(bpdu_filter, BR_BPDU_FILTER);
+
+ #ifdef CONFIG_BRIDGE_IGMP_SNOOPING
+ static ssize_t show_multicast_router(struct net_bridge_port *p, char *buf)
+@@ -285,6 +286,7 @@ static const struct brport_attribute *br
+ &brport_attr_group_fwd_mask,
+ &brport_attr_neigh_suppress,
+ &brport_attr_isolated,
++ &brport_attr_bpdu_filter,
+ &brport_attr_backup_port,
+ NULL
+ };
+--- a/net/bridge/br_stp_bpdu.c
++++ b/net/bridge/br_stp_bpdu.c
+@@ -80,7 +80,8 @@ void br_send_config_bpdu(struct net_brid
+ {
+ unsigned char buf[35];
+
+- if (p->br->stp_enabled != BR_KERNEL_STP)
++ if (p->br->stp_enabled != BR_KERNEL_STP ||
++ (p->flags & BR_BPDU_FILTER))
+ return;
+
+ buf[0] = 0;
+@@ -125,7 +126,8 @@ void br_send_tcn_bpdu(struct net_bridge_
+ {
+ unsigned char buf[4];
+
+- if (p->br->stp_enabled != BR_KERNEL_STP)
++ if (p->br->stp_enabled != BR_KERNEL_STP ||
++ (p->flags & BR_BPDU_FILTER))
+ return;
+
+ buf[0] = 0;
+@@ -168,6 +170,9 @@ void br_stp_rcv(const struct stp_proto *
+ if (!(br->dev->flags & IFF_UP))
+ goto out;
+
++ if (p->flags & BR_BPDU_FILTER)
++ goto out;
++
+ if (p->state == BR_STATE_DISABLED)
+ goto out;
+
--
2.25.1

View File

@@ -1,33 +0,0 @@
From 8ba5feb6aaba50bda126db027490c7d37e428e3b Mon Sep 17 00:00:00 2001
From: Stijn Tintel <stijn@linux-ipv6.be>
Date: Fri, 20 Aug 2021 16:11:12 +0300
Subject: [PATCH 15/27] uhttpd: add config option for json_script
Add a config option for json_script instead of unconditionally including
all json files in /etc/uhttpd in every uhttpd instance. This makes it
possible to configure a single instance with an unconditional redirect,
which is currently not possible as it would render all other uhttpd
instances unusable.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
---
package/network/services/uhttpd/files/uhttpd.init | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init
index 869f79bea2..7020912c6c 100755
--- a/package/network/services/uhttpd/files/uhttpd.init
+++ b/package/network/services/uhttpd/files/uhttpd.init
@@ -195,7 +195,8 @@ start_instance()
append_bool "$cfg" redirect_https "-q" 0
}
- for file in /etc/uhttpd/*.json; do
+ config_get json_script "$cfg" json_script
+ for file in $json_script; do
[ -s "$file" ] && procd_append_param command -H "$file"
done
--
2.25.1

View File

@@ -1,41 +0,0 @@
From 63281b982b3692828ff453dcb9e68b8e43d628e5 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Mon, 21 Jun 2021 12:53:28 +0200
Subject: [PATCH 16/27] iwinfo: update to latest git HEAD
Signed-off-by: John Crispin <john@phrozen.org>
---
package/network/utils/iwinfo/Makefile | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile
index 815c477988..d235f07da9 100644
--- a/package/network/utils/iwinfo/Makefile
+++ b/package/network/utils/iwinfo/Makefile
@@ -11,12 +11,20 @@ PKG_RELEASE:=2.1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git
-PKG_SOURCE_DATE:=2021-04-30
-PKG_SOURCE_VERSION:=c45f0b584b4b86f8250f90ea19afca271c114fa2
-PKG_MIRROR_HASH:=24ad04791254a0523cd15a4fec6116d9ff121e006c93e5e41459f91347b33ec2
+PKG_SOURCE_DATE:=2021-06-09
+PKG_SOURCE_VERSION:=c0414642fead263a4a6a686ad3cb7e965ec8a23a
+PKG_MIRROR_HASH:=c5686bbae86753c53db03a686b034bbb80d31107cc359ebd8522ea1c82db35ea
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=GPL-2.0
+PKG_FLAGS := nonshared
+
+PKG_CONFIG_DEPENDS := \
+ CONFIG_PACKAGE_kmod-brcm-wl \
+ CONFIG_PACKAGE_kmod-brcm-wl-mini \
+ CONFIG_PACKAGE_kmod-brcm-wl-mimo \
+ CONFIG_PACKAGE_kmod-cfg80211
+
IWINFO_ABI_VERSION:=20210430
include $(INCLUDE_DIR)/package.mk
--
2.25.1

View File

@@ -1,111 +0,0 @@
From 1496ca5ceb941ba725311c6c0366193092035f32 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Thu, 27 May 2021 13:24:47 +0200
Subject: [PATCH 01/60] netifd: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
---
package/network/config/netifd/Makefile | 8 ++--
.../config/netifd/patches/100-script.patch | 21 +++++++++++
.../config/netifd/patches/hairpin.patch | 37 +++++++++++++++++++
3 files changed, 61 insertions(+), 5 deletions(-)
create mode 100644 package/network/config/netifd/patches/100-script.patch
create mode 100644 package/network/config/netifd/patches/hairpin.patch
diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index 4b5f110da2..d41bddfd56 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -5,16 +5,14 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
-PKG_SOURCE_DATE:=2021-07-26
-PKG_SOURCE_VERSION:=440eb0647708274cc8d7d9e7c2bb0cfdfba90023
-PKG_MIRROR_HASH:=eed957036ab608fdc49bdf801fc5b4405fcd2a3a5e5d3343ec39898e156c10e9
+PKG_SOURCE_DATE:=2021-10-20
+PKG_SOURCE_VERSION:=c61a1d432b34babe230e49a82712608b07410fc3
+PKG_MIRROR_HASH:=2b040d039c560cbc04dfe1e496aa81f714a032db88986803728dd6b724c11cd2
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=
-PKG_BUILD_PARALLEL:=1
-
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
diff --git a/package/network/config/netifd/patches/100-script.patch b/package/network/config/netifd/patches/100-script.patch
new file mode 100644
index 0000000000..e7ba83f4bb
--- /dev/null
+++ b/package/network/config/netifd/patches/100-script.patch
@@ -0,0 +1,21 @@
+Index: a/scripts/netifd-wireless.sh
+===================================================================
+--- a/scripts/netifd-wireless.sh
++++ b/scripts/netifd-wireless.sh
+@@ -252,11 +252,14 @@ wireless_vif_parse_encryption() {
+ auth_type=owe
+ ;;
+ wpa3-mixed*)
+- auth_type=eap-eap192
++ auth_type=eap-eap256
+ ;;
+- wpa3*)
++ wpa3-192*)
+ auth_type=eap192
+ ;;
++ wpa3*)
++ auth_type=eap256
++ ;;
+ psk3-mixed*|sae-mixed*)
+ auth_type=psk-sae
+ ;;
diff --git a/package/network/config/netifd/patches/hairpin.patch b/package/network/config/netifd/patches/hairpin.patch
new file mode 100644
index 0000000000..25515d75d4
--- /dev/null
+++ b/package/network/config/netifd/patches/hairpin.patch
@@ -0,0 +1,37 @@
+diff --git a/wireless.c b/wireless.c
+index b26c4e8c8f0b..bd847e72ab40 100644
+--- a/wireless.c
++++ b/wireless.c
+@@ -804,20 +804,13 @@ wireless_interface_init_config(struct wireless_interface *vif)
+ vif->network = cur;
+
+ cur = tb[VIF_ATTR_MODE];
+- if (cur)
+- vif->ap_mode = !strcmp(blobmsg_get_string(cur), "ap");
+-
+- if (!vif->ap_mode)
+- return;
++ vif->ap_mode = cur && !strcmp(blobmsg_get_string(cur), "ap");
+
+ cur = tb[VIF_ATTR_ISOLATE];
+- if (cur)
+- vif->isolate = blobmsg_get_bool(cur);
++ vif->isolate = vif->ap_mode && cur && blobmsg_get_bool(cur);
+
+ cur = tb[VIF_ATTR_PROXYARP];
+- if (cur)
+- vif->proxyarp = blobmsg_get_bool(cur);
+-
++ vif->proxyarp = vif->ap_mode && cur && blobmsg_get_bool(cur);
+ }
+
+ /* vlist update call for wireless interface list */
+@@ -846,8 +839,6 @@ vif_update(struct vlist_tree *tree, struct vlist_node *node_new,
+ wireless_interface_handle_link(vif_old, NULL, false);
+ free(vif_old->config);
+ vif_old->config = blob_memdup(vif_new->config);
+- vif_old->isolate = vif_new->isolate;
+- vif_old->ap_mode = vif_new->ap_mode;
+ wireless_interface_init_config(vif_old);
+ free(vif_new);
+ } else if (vif_new) {
--
2.25.1

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,179 +0,0 @@
From 006abf1773051ad355b52d70095f63f44a496b13 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sun, 25 Jul 2021 13:32:37 +0200
Subject: [PATCH 02/70] procd: add uxc support
Signed-off-by: John Crispin <john@phrozen.org>
---
package/system/procd/Makefile | 15 +++---
package/system/procd/files/procd.sh | 79 +++++++++++++++++++++++++++++
package/system/procd/files/uxc.init | 4 ++
3 files changed, 90 insertions(+), 8 deletions(-)
diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index 30d5adf427..b831f86639 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
-PKG_SOURCE_DATE:=2021-02-23
-PKG_SOURCE_VERSION:=37eed131e9967a35f47bacb3437a9d3c8a57b3f4
-PKG_MIRROR_HASH:=2b0131ff9055ccf987cbeb5f36c2c2585dc780999df6be312fbbbcd61ce676d4
+PKG_MIRROR_HASH:=0d51642d82d7bb4150355a6986e54504dce171c6fcb7eeff312d20a5d106bad8
+PKG_SOURCE_DATE:=2021-11-04
+PKG_SOURCE_VERSION:=0ee8e734a7f67220cf4a3412b60ff674b5fb20dd
CMAKE_INSTALL:=1
PKG_LICENSE:=GPL-2.0
@@ -32,7 +32,7 @@ include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
ifeq ($(DUMP),)
- STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell echo $(CONFIG_TARGET_INIT_PATH) | mkhash md5)
+ STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell echo $(CONFIG_TARGET_INIT_PATH) | $(MKHASH) md5)
endif
CMAKE_OPTIONS += -DEARLY_PATH="$(TARGET_INIT_PATH)"
@@ -68,7 +68,7 @@ define Package/procd-ujail
SECTION:=base
CATEGORY:=Base system
DEPENDS:=@KERNEL_NAMESPACES +@KERNEL_UTS_NS +@KERNEL_IPC_NS +@KERNEL_PID_NS \
- +libubox +libubus +libblobmsg-json
+ +libubox +libubus +libuci +libblobmsg-json
TITLE:=OpenWrt process jail helper
endef
@@ -82,15 +82,14 @@ endef
define Package/procd-seccomp
SECTION:=base
CATEGORY:=Base system
- DEPENDS:=@(arm||armeb||mips||mipsel||i386||powerpc||x86_64) @!TARGET_uml \
- @KERNEL_SECCOMP +libubox +libblobmsg-json
+ DEPENDS:=@SECCOMP +libubox +libblobmsg-json
TITLE:=OpenWrt process seccomp helper + utrace
endef
define Package/uxc
SECTION:=base
CATEGORY:=Base system
- DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json
+ DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json +blockd +PACKAGE_uxc:rpcd
TITLE:=OpenWrt container management
MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
endef
diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh
index d86b7219da..3549a5a914 100644
--- a/package/system/procd/files/procd.sh
+++ b/package/system/procd/files/procd.sh
@@ -329,6 +329,82 @@ _procd_add_config_trigger() {
json_close_array
}
+_procd_add_mount_trigger() {
+ json_add_array
+ _procd_add_array_data "$1"
+ local action="$2"
+ local multi=0
+ shift ; shift
+
+ json_add_array
+ _procd_add_array_data "if"
+
+ if [ "$2" ]; then
+ json_add_array
+ _procd_add_array_data "or"
+ multi=1
+ fi
+
+ while [ "$1" ]; do
+ json_add_array
+ _procd_add_array_data "eq" "target" "$1"
+ shift
+ json_close_array
+ done
+
+ [ $multi = 1 ] && json_close_array
+
+ json_add_array
+ _procd_add_array_data "run_script" /etc/init.d/$name $action
+ json_close_array
+
+ json_close_array
+ _procd_add_timeout
+ json_close_array
+}
+
+_procd_add_action_mount_trigger() {
+ local script=$(readlink "$initscript")
+ local name=$(basename ${script:-$initscript})
+ local action="$1"
+ local mpath
+ shift
+
+ _procd_open_trigger
+ _procd_add_mount_trigger mount.add $action "$@"
+ _procd_close_trigger
+}
+
+procd_get_mountpoints() {
+ (
+ __procd_check_mount() {
+ local cfg="$1"
+ local path="${2%%/}/"
+ local target
+ config_get target "$cfg" target
+ target="${target%%/}/"
+ [ "$path" != "${path##$target}" ] && echo "${target%%/}"
+ }
+
+ config_load fstab
+ for mpath in "$@"; do
+ config_foreach __procd_check_mount mount "$mpath"
+ done
+ ) | sort -u
+}
+
+_procd_add_restart_mount_trigger() {
+ local mountpoints="$(procd_get_mountpoints "$@")"
+ [ "${mountpoints//[[:space:]]}" ] &&
+ _procd_add_action_mount_trigger restart $mountpoints
+}
+
+_procd_add_reload_mount_trigger() {
+ local mountpoints="$(procd_get_mountpoints "$@")"
+ [ "${mountpoints//[[:space:]]}" ] &&
+ _procd_add_action_mount_trigger reload $mountpoints
+}
+
_procd_add_raw_trigger() {
json_add_array
_procd_add_array_data "$1"
@@ -560,8 +636,11 @@ _procd_wrapper \
procd_add_raw_trigger \
procd_add_config_trigger \
procd_add_interface_trigger \
+ procd_add_mount_trigger \
procd_add_reload_trigger \
procd_add_reload_interface_trigger \
+ procd_add_reload_mount_trigger \
+ procd_add_restart_mount_trigger \
procd_open_trigger \
procd_close_trigger \
procd_open_instance \
diff --git a/package/system/procd/files/uxc.init b/package/system/procd/files/uxc.init
index 035c8b0b9e..1e75b796f8 100644
--- a/package/system/procd/files/uxc.init
+++ b/package/system/procd/files/uxc.init
@@ -16,3 +16,7 @@ boot() {
__BOOT_UXC=1
start
}
+
+service_triggers() {
+ procd_add_raw_trigger "mount.add" 3000 /etc/init.d/uxc boot
+}
--
2.25.1

View File

@@ -1,174 +0,0 @@
From 23c15e2536d0fa5ed81c5bdfe7623d3370dca997 Mon Sep 17 00:00:00 2001
From: Paul Spooren <mail@aparcar.org>
Date: Fri, 2 Oct 2020 23:30:30 -1000
Subject: [PATCH 21/27] build: create APK files parrallel to IPK
Create APK files based on the folder and control files of IPK packages.
Signed-off-by: Paul Spooren <mail@aparcar.org>
---
include/package-ipkg.mk | 48 +++++++++++++++++++++++++------------
package/Makefile | 2 ++
package/base-files/Makefile | 4 ++++
rules.mk | 2 ++
scripts/apk-make-index.sh | 20 ++++++++++++++++
5 files changed, 61 insertions(+), 15 deletions(-)
create mode 100755 scripts/apk-make-index.sh
diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk
index e972b7de0b..5c31b1774f 100644
--- a/include/package-ipkg.mk
+++ b/include/package-ipkg.mk
@@ -102,6 +102,7 @@ ifeq ($(DUMP),)
ABIV_$(1):=$(call FormatABISuffix,$(1),$(ABI_VERSION))
PDIR_$(1):=$(call FeedPackageDir,$(1))
IPKG_$(1):=$$(PDIR_$(1))/$(1)$$(ABIV_$(1))_$(VERSION)_$(PKGARCH).ipk
+ APK_$(1):=$$(PDIR_$(1))/$(1)$$(ABIV_$(1))_$(VERSION)_$(PKGARCH).apk
IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1)
KEEP_$(1):=$(strip $(call Package/$(1)/conffiles))
@@ -200,7 +201,7 @@ $(_endef)
$(PKG_INFO_DIR)/$(1).provides $$(IPKG_$(1)): $(STAMP_BUILT) $(INCLUDE_DIR)/package-ipkg.mk
@rm -rf $$(IDIR_$(1)); \
$$(call remove_ipkg_files,$(1),$$(call opkg_package_files,$(call gen_ipkg_wildcard,$(1))))
- mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/CONTROL $(PKG_INFO_DIR)
+ mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1)) $(PKG_INFO_DIR)
$(call Package/$(1)/install,$$(IDIR_$(1)))
$(if $(Package/$(1)/install-overlay),mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/rootfs-overlay)
$(call Package/$(1)/install-overlay,$$(IDIR_$(1))/rootfs-overlay)
@@ -226,6 +227,37 @@ $(_endef)
) || true \
)
endif
+
+ ifneq ($$(KEEP_$(1)),)
+ @( \
+ keepfiles=""; \
+ for x in $$(KEEP_$(1)); do \
+ [ -f "$$(IDIR_$(1))/$$$$x" ] || keepfiles="$$$${keepfiles:+$$$$keepfiles }$$$$x"; \
+ done; \
+ [ -z "$$$$keepfiles" ] || { \
+ mkdir -p $$(IDIR_$(1))/lib/upgrade/keep.d; \
+ for x in $$$$keepfiles; do echo $$$$x >> $$(IDIR_$(1))/lib/upgrade/keep.d/$(1); done; \
+ }; \
+ )
+ endif
+
+ $(INSTALL_DIR) $$(PDIR_$(1))
+
+ $(FAKEROOT) apk mkpkg \
+ --info "name:$(1)" \
+ --info "version:$(VERSION)" \
+ --info "description:$()" \
+ --info "arch:$(PKGARCH)" \
+ --info "license:$(LICENSE)" \
+ --info "origin:$(SOURCE)" \
+ --info "maintainer:$(MAINTAINER)" \
+ $$(foreach dep,$$(Package/$(1)/DEPENDS),--info "depends:$$(subst $$(comma),,$$(dep))") \
+ --files "$$(IDIR_$(1))" \
+ --output "$$(APK_$(1))" \
+ --sign "$(BUILD_KEY_APK_SEC)"
+
+ mkdir -p $$(IDIR_$(1))/CONTROL
+
(cd $$(IDIR_$(1))/CONTROL; \
( \
echo "$$$$CONTROL"; \
@@ -249,20 +281,6 @@ $(_endef)
$($(1)_COMMANDS) \
)
- ifneq ($$(KEEP_$(1)),)
- @( \
- keepfiles=""; \
- for x in $$(KEEP_$(1)); do \
- [ -f "$$(IDIR_$(1))/$$$$x" ] || keepfiles="$$$${keepfiles:+$$$$keepfiles }$$$$x"; \
- done; \
- [ -z "$$$$keepfiles" ] || { \
- mkdir -p $$(IDIR_$(1))/lib/upgrade/keep.d; \
- for x in $$$$keepfiles; do echo $$$$x >> $$(IDIR_$(1))/lib/upgrade/keep.d/$(1); done; \
- }; \
- )
- endif
-
- $(INSTALL_DIR) $$(PDIR_$(1))
$(FAKEROOT) $(SCRIPT_DIR)/ipkg-build -m "$(FILE_MODES)" $$(IDIR_$(1)) $$(PDIR_$(1))
@[ -f $$(IPKG_$(1)) ]
diff --git a/package/Makefile b/package/Makefile
index ec503dc527..18a19fff13 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -60,6 +60,7 @@ $(curdir)/merge-index: $(curdir)/merge
ifndef SDK
$(curdir)/compile: $(curdir)/system/opkg/host/compile
+ $(patsubst %,$(curdir)/%/compile,$(filter-out %/apk/host,$($(curdir)/builddirs))): $(curdir)/system/apk/host/compile
endif
$(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(if $(CONFIG_TARGET_PER_DEVICE_ROOTFS),$(curdir)/merge-index)
@@ -84,6 +85,7 @@ $(curdir)/index: FORCE
@for d in $(PACKAGE_SUBDIRS); do ( \
mkdir -p $$d; \
cd $$d || continue; \
+ $(SCRIPT_DIR)/apk-make-index.sh . 2>&1; \
$(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages.manifest; \
grep -vE '^(Maintainer|LicenseFiles|Source|SourceName|Require|SourceDateEpoch)' Packages.manifest > Packages; \
case "$$(((64 + $$(stat -L -c%s Packages)) % 128))" in 110|111) \
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 8a1ddf96f5..9db4812981 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -107,6 +107,10 @@ ifdef CONFIG_SIGNED_PACKAGES
[ -s $(BUILD_KEY).ucert ] || \
$(STAGING_DIR_HOST)/bin/ucert -I -c $(BUILD_KEY).ucert -p $(BUILD_KEY).pub -s $(BUILD_KEY)
+ [ -s $(BUILD_KEY_APK_SEC) -a -s $(BUILD_KEY_APK_PUB) ] || \
+ openssl ecparam -name prime256v1 -genkey -noout -out $(BUILD_KEY_APK_SEC); \
+ openssl ec -in $(BUILD_KEY_APK_SEC) -pubout > $(BUILD_KEY_APK_PUB)
+
endef
ifndef CONFIG_BUILDBOT
diff --git a/rules.mk b/rules.mk
index f31d9bb113..de81b65d46 100644
--- a/rules.mk
+++ b/rules.mk
@@ -258,6 +258,8 @@ else
endif
BUILD_KEY=$(TOPDIR)/key-build
+BUILD_KEY_APK_SEC=$(TOPDIR)/private-key.pem
+BUILD_KEY_APK_PUB=$(TOPDIR)/public-key.pem
FAKEROOT:=$(STAGING_DIR_HOST)/bin/fakeroot
diff --git a/scripts/apk-make-index.sh b/scripts/apk-make-index.sh
new file mode 100755
index 0000000000..df1f1a2e2b
--- /dev/null
+++ b/scripts/apk-make-index.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+set -e
+
+pkg_dir=$1
+
+if [ -z "$pkg_dir" ] || [ ! -d "$pkg_dir" ]; then
+ echo "Usage: apk-make-index <package_directory>" >&2
+ exit 1
+fi
+
+(
+ cd "$pkg_dir" || exit 1
+ GLOBIGNORE="kernel*:libc*"
+ set -- *.apk
+ if [ "$1" = '*.apk' ]; then
+ echo "No APK packages found"
+ fi
+ apk index --output APKINDEX.tar.gz "$@"
+ unset GLOBIGNORE
+)
--
2.25.1

View File

@@ -1,69 +0,0 @@
From 8e8b3e443a7f1d0644f43888c8683698f26d4d13 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Sun, 25 Jul 2021 01:20:31 +0100
Subject: [PATCH 22/27] fstools: update to git HEAD
bad1835 fstools: add partname volume driver
19d7d93 libfstools: partname: several fixes
3c38f0c libfstools: fix build with glibc
d05ad93 libfstools: remove superflus include
964d1e3 partname: allow skipping existing 'rootfs_data' partition
c44b40b overlay: fix syncronizing typo
b5397a1 fstools: block: fix segfault on mount with no target
bd7cc8d block: use dynamically allocated target string
6d8450e blockd: use allocated strings instead of fixed buffers
d47909e libblkid-tiny: fix buffer overflow
67d2297 block: match device path instead of assuming /dev/%s
2aeba88 block: allow autofs and umount commands also on MTD/UBI
3d40a1b blockd: add missing #define _GNU_SOURCE
4d4dcfb blockd: detect mountpoint of /dev/mapper/*
2f42515 block: resolve /dev/mapper/* name for /dev/dm-0 when hotplugging
39558a1 blockd: also send ubus notification on mount hotplug
3386b6b blockd: fix trigger name
cdc9939 blockd: move to its own POSIX process group
59f7c11 blockd: create mountpoint parent folder if needed
9cc96af Revert "block: resolve /dev/mapper/* name for /dev/dm-0 when hotplugging"
06334ac Revert "blockd: detect mountpoint of /dev/mapper/*"
9ab3551 block: use /dev/dm-* instead of /dev/mapper/*
5114595 block: allow remove hotplug event to arrive at blockd
a846c6b blockd: fix length of timeout int passed to ioctl
1d681ca block: support umount device basename
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
package/system/fstools/Makefile | 6 +++---
package/system/fstools/files/blockd.init | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile
index 2da508d541..b582a17bae 100644
--- a/package/system/fstools/Makefile
+++ b/package/system/fstools/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
-PKG_MIRROR_HASH:=a485792d90c71cd4fb396ce97f42a57ee4d2a3d78e5f3fd0748270ffb14209e6
-PKG_SOURCE_DATE:=2021-01-04
-PKG_SOURCE_VERSION:=c53b18820756f6f32ad0782d3bf489422b7c4ad3
+PKG_MIRROR_HASH:=6a457b812166e04e2244ee1be92a4957666b5d1554315c0e18db1b30376cc617
+PKG_SOURCE_DATE:=2021-07-28
+PKG_SOURCE_VERSION:=cc63933faedd8d4fcdabb872cf4661ac04fe4ba2
CMAKE_INSTALL:=1
PKG_LICENSE:=GPL-2.0
diff --git a/package/system/fstools/files/blockd.init b/package/system/fstools/files/blockd.init
index a4ce57d40d..bdd8bbf622 100755
--- a/package/system/fstools/files/blockd.init
+++ b/package/system/fstools/files/blockd.init
@@ -16,6 +16,7 @@ reload_service() {
start_service() {
procd_open_instance
procd_set_param command "$PROG"
+ procd_set_param watch block
procd_set_param respawn
procd_close_instance
}
--
2.25.1

View File

@@ -1,40 +0,0 @@
From 873052b99d6597209957ec32898fa56324cf34a4 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Sat, 19 Jun 2021 14:45:11 -0700
Subject: [PATCH 23/27] tools/libressl: update to 3.3.3
Fix wrong FPIC variable usage. Fixes compilation under sparc64 host.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit bf4dbbb55e2b8e23f186e1334f1e9ce6a3a8ddfe)
---
tools/libressl/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/libressl/Makefile b/tools/libressl/Makefile
index 2b5a33450c..e25b5661ee 100644
--- a/tools/libressl/Makefile
+++ b/tools/libressl/Makefile
@@ -8,8 +8,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libressl
-PKG_VERSION:=3.3.1
-PKG_HASH:=a6d331865e0164a13ac85a228e52517f7cf8f8488f2f95f34e7857302f97cfdb
+PKG_VERSION:=3.3.3
+PKG_HASH:=a471565b36ccd1a70d0bd7d37c6e95c43a26a62829b487d9d2cdebfe58be3066
PKG_RELEASE:=1
PKG_CPE_ID:=cpe:/a:openbsd:libressl
@@ -25,7 +25,7 @@ include $(INCLUDE_DIR)/host-build.mk
HOSTCC := $(HOSTCC_NOCACHE)
HOST_CONFIGURE_ARGS += --enable-static --disable-shared --disable-tests
-HOST_CFLAGS += $(FPIC)
+HOST_CFLAGS += $(HOST_FPIC)
ifeq ($(GNU_HOST_NAME),x86_64-linux-gnux32)
HOST_CONFIGURE_ARGS += --disable-asm
--
2.25.1

File diff suppressed because it is too large Load Diff

View File

@@ -1,312 +0,0 @@
From bf98d3c1de524ca50cbc09f825a4b0648e353624 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Fri, 13 Aug 2021 08:47:11 +0200
Subject: [PATCH 25/27] apk: backport package
Signed-off-by: John Crispin <john@phrozen.org>
---
package/system/apk/Makefile | 93 +++++++++++++++++++
...vel@lists.alpinelinux.org-4a6a0840.rsa.pub | 9 ++
...vel@lists.alpinelinux.org-5243ef4b.rsa.pub | 9 ++
...vel@lists.alpinelinux.org-5261cecb.rsa.pub | 9 ++
package/system/apk/files/alpine-repositories | 3 +
.../apk/patches/000-Makefile-version.patch | 11 +++
.../patches/0001-remove-doc-generation.patch | 21 +++++
package/system/apk/patches/100-link.patch | 16 ++++
package/system/apk/patches/100-phtread.patch | 12 +++
...ude-limits.h-to-fix-build-with-glibc.patch | 20 ++++
package/system/apk/test.sh | 9 ++
11 files changed, 212 insertions(+)
create mode 100644 package/system/apk/Makefile
create mode 100644 package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub
create mode 100644 package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5243ef4b.rsa.pub
create mode 100644 package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub
create mode 100644 package/system/apk/files/alpine-repositories
create mode 100644 package/system/apk/patches/000-Makefile-version.patch
create mode 100644 package/system/apk/patches/0001-remove-doc-generation.patch
create mode 100644 package/system/apk/patches/100-link.patch
create mode 100644 package/system/apk/patches/100-phtread.patch
create mode 100644 package/system/apk/patches/100-tar-include-limits.h-to-fix-build-with-glibc.patch
create mode 100644 package/system/apk/test.sh
diff --git a/package/system/apk/Makefile b/package/system/apk/Makefile
new file mode 100644
index 0000000000..335f50c155
--- /dev/null
+++ b/package/system/apk/Makefile
@@ -0,0 +1,93 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=apk
+PKG_VERSION:=3.0.0_pre0
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://git.alpinelinux.org/apk-tools.git
+PKG_SOURCE_DATE:=2021-08-17
+PKG_SOURCE_VERSION:=a46043bcc4cc15b456ef1eac5c5f9d93bd905d53
+PKG_MIRROR_HASH:=e16fd04b18043e78a177acd8c6958fa03fd1484b62c879c2dd0bed8ce9c50625
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_DATE)-$(call version_abbrev,$(PKG_SOURCE_VERSION))
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_SOURCE_SUBDIR)
+PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
+PKG_RELEASE:=r$(PKG_SOURCE_DATE)-$(call version_abbrev,$(PKG_SOURCE_VERSION))-$(AUTORELEASE)
+
+PKG_MAINTAINER:=Paul Spooren <mail@aparcar.org>
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+HOST_BUILD_DEPENDS:=lua/host lua-lzlib/host
+PKG_BUILD_DEPENDS:=$(HOST_BUILD_DEPENDS)
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+
+define Package/apk
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=apk package manager
+ DEPENDS:=+liblua +libopenssl +zlib @!arc
+ URL:=$(PKG_SOURCE_URL)
+endef
+
+define Package/alpine-keys
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Alpine apk public signing keys
+ DEPENDS:=apk
+endef
+
+define Package/alpine-repositories
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Official Alpine repositories
+ DEPENDS:=apk
+endef
+
+MAKE_FLAGS += \
+ LUA=$(STAGING_DIR_HOSTPKG)/bin/lua \
+ LUA_VERSION=5.1 \
+ LUA_PC=lua
+
+HOST_MAKE_FLAGS += \
+ LUA=$(STAGING_DIR_HOSTPKG)/bin/lua \
+ LUA_VERSION=5.1 \
+ DESTDIR=$(STAGING_DIR_HOSTPKG) \
+ SBINDIR=/bin \
+ PREFIX=
+
+HOST_LDFLAGS+=-Wl,-rpath=$(STAGING_DIR_HOSTPKG)/lib -lpthread
+
+define Package/apk/install
+ $(INSTALL_DIR) $(1)/lib/apk/db
+
+ $(INSTALL_DIR) $(1)/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/apk $(1)/bin/apk
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/lib/*.so.* $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/etc/apk/
+ echo $(ARCH) > $(1)/etc/apk/arch
+ touch $(1)/etc/apk/world
+endef
+
+define Package/alpine-keys/install
+ $(INSTALL_DIR) $(1)/etc/apk/keys
+ $(INSTALL_DATA) ./files/alpine-keys/* $(1)/etc/apk/keys
+endef
+
+define Package/alpine-repositories/install
+ $(INSTALL_DIR) $(1)/etc/apk/keys
+ $(INSTALL_DATA) ./files/alpine-repositories $(1)/etc/apk/repositories
+endef
+
+$(eval $(call BuildPackage,apk))
+$(eval $(call BuildPackage,alpine-keys))
+$(eval $(call BuildPackage,alpine-repositories))
+$(eval $(call HostBuild))
diff --git a/package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub b/package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub
new file mode 100644
index 0000000000..bb4bdc80fd
--- /dev/null
+++ b/package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub
@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1yHJxQgsHQREclQu4Ohe
+qxTxd1tHcNnvnQTu/UrTky8wWvgXT+jpveroeWWnzmsYlDI93eLI2ORakxb3gA2O
+Q0Ry4ws8vhaxLQGC74uQR5+/yYrLuTKydFzuPaS1dK19qJPXB8GMdmFOijnXX4SA
+jixuHLe1WW7kZVtjL7nufvpXkWBGjsfrvskdNA/5MfxAeBbqPgaq0QMEfxMAn6/R
+L5kNepi/Vr4S39Xvf2DzWkTLEK8pcnjNkt9/aafhWqFVW7m3HCAII6h/qlQNQKSo
+GuH34Q8GsFG30izUENV9avY7hSLq7nggsvknlNBZtFUcmGoQrtx3FmyYsIC8/R+B
+ywIDAQAB
+-----END PUBLIC KEY-----
diff --git a/package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5243ef4b.rsa.pub b/package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5243ef4b.rsa.pub
new file mode 100644
index 0000000000..6cbfad7441
--- /dev/null
+++ b/package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5243ef4b.rsa.pub
@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvNijDxJ8kloskKQpJdx+
+mTMVFFUGDoDCbulnhZMJoKNkSuZOzBoFC94omYPtxnIcBdWBGnrm6ncbKRlR+6oy
+DO0W7c44uHKCFGFqBhDasdI4RCYP+fcIX/lyMh6MLbOxqS22TwSLhCVjTyJeeH7K
+aA7vqk+QSsF4TGbYzQDDpg7+6aAcNzg6InNePaywA6hbT0JXbxnDWsB+2/LLSF2G
+mnhJlJrWB1WGjkz23ONIWk85W4S0XB/ewDefd4Ly/zyIciastA7Zqnh7p3Ody6Q0
+sS2MJzo7p3os1smGjUF158s6m/JbVh4DN6YIsxwl2OjDOz9R0OycfJSDaBVIGZzg
+cQIDAQAB
+-----END PUBLIC KEY-----
diff --git a/package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub b/package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub
new file mode 100644
index 0000000000..83f0658e9c
--- /dev/null
+++ b/package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub
@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwlzMkl7b5PBdfMzGdCT0
+cGloRr5xGgVmsdq5EtJvFkFAiN8Ac9MCFy/vAFmS8/7ZaGOXoCDWbYVLTLOO2qtX
+yHRl+7fJVh2N6qrDDFPmdgCi8NaE+3rITWXGrrQ1spJ0B6HIzTDNEjRKnD4xyg4j
+g01FMcJTU6E+V2JBY45CKN9dWr1JDM/nei/Pf0byBJlMp/mSSfjodykmz4Oe13xB
+Ca1WTwgFykKYthoLGYrmo+LKIGpMoeEbY1kuUe04UiDe47l6Oggwnl+8XD1MeRWY
+sWgj8sF4dTcSfCMavK4zHRFFQbGp/YFJ/Ww6U9lA3Vq0wyEI6MCMQnoSMFwrbgZw
+wwIDAQAB
+-----END PUBLIC KEY-----
diff --git a/package/system/apk/files/alpine-repositories b/package/system/apk/files/alpine-repositories
new file mode 100644
index 0000000000..5babbb23b4
--- /dev/null
+++ b/package/system/apk/files/alpine-repositories
@@ -0,0 +1,3 @@
+https://dl-cdn.alpinelinux.org/alpine/edge/main
+https://dl-cdn.alpinelinux.org/alpine/edge/community
+
diff --git a/package/system/apk/patches/000-Makefile-version.patch b/package/system/apk/patches/000-Makefile-version.patch
new file mode 100644
index 0000000000..2e7f5b0f15
--- /dev/null
+++ b/package/system/apk/patches/000-Makefile-version.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -4,7 +4,7 @@
+ -include config.mk
+
+ PACKAGE := apk-tools
+-VERSION := 2.12.0
++VERSION := 3.0.0_pre0
+
+ export VERSION
+
diff --git a/package/system/apk/patches/0001-remove-doc-generation.patch b/package/system/apk/patches/0001-remove-doc-generation.patch
new file mode 100644
index 0000000000..dee05c56f2
--- /dev/null
+++ b/package/system/apk/patches/0001-remove-doc-generation.patch
@@ -0,0 +1,21 @@
+From b05a93c48fdbb50f0c464310dc2ce45777d32ea2 Mon Sep 17 00:00:00 2001
+From: Paul Spooren <mail@aparcar.org>
+Date: Fri, 2 Oct 2020 14:08:52 -1000
+Subject: [PATCH] remove doc generation
+
+Signed-off-by: Paul Spooren <mail@aparcar.org>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -25,7 +25,7 @@ export DESTDIR SBINDIR LIBDIR CONFDIR MA
+ ##
+ # Top-level subdirs
+
+-subdirs := libfetch/ src/ doc/
++subdirs := libfetch/ src/
+
+ ##
+ # Include all rules and stuff
diff --git a/package/system/apk/patches/100-link.patch b/package/system/apk/patches/100-link.patch
new file mode 100644
index 0000000000..9cae2787d9
--- /dev/null
+++ b/package/system/apk/patches/100-link.patch
@@ -0,0 +1,16 @@
+diff -urN apk-2021-08-17-a46043bc.orig/src/Makefile apk-2021-08-17-a46043bc/src/Makefile
+--- apk-2021-08-17-a46043bc.orig/src/Makefile 2021-08-17 14:21:04.117760513 +0200
++++ apk-2021-08-17-a46043bc/src/Makefile 2021-08-17 14:21:16.653830180 +0200
+@@ -65,7 +65,11 @@
+ app_convdb.o app_convndx.o app_del.o app_dot.o app_extract.o app_fetch.o \
+ app_fix.o app_index.o app_info.o app_list.o app_manifest.o app_mkndx.o \
+ app_mkpkg.o app_policy.o app_update.o app_upgrade.o app_search.o \
+- app_stats.o app_verify.o app_version.o app_vertest.o applet.o
++ app_stats.o app_verify.o app_version.o app_vertest.o applet.o \
++ adb.o adb_comp.o adb_walk_adb.o adb_walk_genadb.o adb_walk_gentext.o adb_walk_text.o apk_adb.o \
++ atom.o blob.o commit.o common.o context.o crypto_openssl.o database.o hash.o \
++ extract.o extract_v2.o extract_v3.o io.o io_gunzip.o io_url.o tar.o \
++ package.o pathbuilder.o print.o solver.o trust.o version.o
+
+ ifeq ($(ADB),y)
+ libapk.so.$(libapk_soname)-objs += apk_adb.o
diff --git a/package/system/apk/patches/100-phtread.patch b/package/system/apk/patches/100-phtread.patch
new file mode 100644
index 0000000000..c252e14dc1
--- /dev/null
+++ b/package/system/apk/patches/100-phtread.patch
@@ -0,0 +1,12 @@
+diff -urN apk-2021-07-23-3d203e8f.orig/src/Makefile apk-2021-07-23-3d203e8f/src/Makefile
+--- apk-2021-07-23-3d203e8f.orig/src/Makefile 2021-07-25 12:55:05.576564663 +0200
++++ apk-2021-07-23-3d203e8f/src/Makefile 2021-07-25 12:55:48.660862181 +0200
+@@ -87,7 +87,7 @@
+ apk.static-libs := $(apk-static-libs)
+ LDFLAGS_apk.static := -static
+ LIBS_apk.static := -Wl,--as-needed -ldl -Wl,--no-as-needed
+-LDFLAGS_apk += -L$(obj)
++LDFLAGS_apk += -L$(obj) -pthread
+ LDFLAGS_apk-test += -L$(obj)
+
+ CFLAGS_ALL += $(OPENSSL_CFLAGS) $(ZLIB_CFLAGS)
diff --git a/package/system/apk/patches/100-tar-include-limits.h-to-fix-build-with-glibc.patch b/package/system/apk/patches/100-tar-include-limits.h-to-fix-build-with-glibc.patch
new file mode 100644
index 0000000000..43ec7d5f1a
--- /dev/null
+++ b/package/system/apk/patches/100-tar-include-limits.h-to-fix-build-with-glibc.patch
@@ -0,0 +1,20 @@
+From c72ea983e287ec1d8b1f2b3aab1bf40aa7a30b03 Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel@makrotopia.org>
+Date: Wed, 4 Aug 2021 21:37:40 +0100
+Subject: [PATCH] tar: include <limits.h> to fix build with glibc
+
+Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+---
+ src/tar.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/src/tar.c
++++ b/src/tar.c
+@@ -9,6 +9,7 @@
+
+ #include <sys/stat.h>
+ #include <sys/sysmacros.h>
++#include <limits.h> /* for SSIZE_MAX with glibc */
+
+ #include "apk_defines.h"
+ #include "apk_tar.h"
diff --git a/package/system/apk/test.sh b/package/system/apk/test.sh
new file mode 100644
index 0000000000..814777fd70
--- /dev/null
+++ b/package/system/apk/test.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+case "$1" in
+ "apk")
+ apk --version | grep "${2/-r*/}"
+ ;;
+ *)
+ return 0;
+esac
--
2.25.1

View File

@@ -1,104 +0,0 @@
From ec862d472fca676cc04ce71b640e880ecefdd477 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Fri, 13 Aug 2021 08:48:02 +0200
Subject: [PATCH 26/27] lua-lzlib: backport package
Signed-off-by: John Crispin <john@phrozen.org>
---
package/libs/lua-lzlib/Makefile | 64 +++++++++++++++++++
.../patches/001-allow_optim_flags.patch | 12 ++++
2 files changed, 76 insertions(+)
create mode 100644 package/libs/lua-lzlib/Makefile
create mode 100644 package/libs/lua-lzlib/patches/001-allow_optim_flags.patch
diff --git a/package/libs/lua-lzlib/Makefile b/package/libs/lua-lzlib/Makefile
new file mode 100644
index 0000000000..5e0a16b135
--- /dev/null
+++ b/package/libs/lua-lzlib/Makefile
@@ -0,0 +1,64 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lua-lzlib
+PKG_VERSION:=0.4.3
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_MIRROR_HASH:=b6ef5e3f04b7f2137b39931a175ee802489a2486e70537770919bcccca10e723
+PKG_SOURCE_URL:=https://github.com/LuaDist/lzlib.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=79329a07d8f79c19eadd7ea2752b4c4e1574b015
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+HOST_BUILD_DEPENDS:=lua/host
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+
+define Package/lua-lzlib
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Lua zlib binding
+ URL:=http://github.com/LuaDist/lzlib
+ DEPENDS:= +lua +zlib
+endef
+
+define Package/lua-lzlib/description
+ A library to access zlib library functions and also to read/write gzip files using an interface similar to the base io package.
+endef
+
+MAKE_FLAGS += \
+ LUA="$(STAGING_DIR)/usr" \
+ OFLAGS="$(TARGET_CFLAGS)" \
+
+HOST_MAKE_FLAGS += \
+ LUA="$(STAGING_DIR_HOSTPKG)" \
+ OFLAGS="$(HOST_CFLAGS)" \
+
+define Package/lua-lzlib/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/zlib.so $(1)/usr/lib/lua/
+
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/gzip.lua $(1)/usr/lib/lua/
+endef
+
+define Host/Install
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/lib/lua/5.1
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/zlib.so $(STAGING_DIR_HOSTPKG)/lib/lua/5.1
+
+ $(INSTALL_DATA) $(HOST_BUILD_DIR)/gzip.lua $(STAGING_DIR_HOSTPKG)/lib/lua/5.1
+endef
+
+$(eval $(call BuildPackage,lua-lzlib))
+$(eval $(call HostBuild))
diff --git a/package/libs/lua-lzlib/patches/001-allow_optim_flags.patch b/package/libs/lua-lzlib/patches/001-allow_optim_flags.patch
new file mode 100644
index 0000000000..78f981d237
--- /dev/null
+++ b/package/libs/lua-lzlib/patches/001-allow_optim_flags.patch
@@ -0,0 +1,12 @@
+--- a/Makefile
++++ b/Makefile
+@@ -14,7 +14,8 @@ LUABIN= $(LUA)/bin
+ ZLIB=../zlib-1.2.3
+
+ # no need to change anything below here
+-CFLAGS= $(INCS) $(DEFS) $(WARN) -O0 -fPIC
++CFLAGS= $(INCS) $(DEFS) $(WARN) $(OFLAGS) -fPIC
++OFLAGS= -O0
+ WARN= -g -Werror -Wall -pedantic #-ansi
+ INCS= -I$(LUAINC) -I$(ZLIB)
+ LIBS= -L$(ZLIB) -lz -L$(LUALIB) -L$(LUABIN) #-llua51
--
2.25.1

View File

@@ -1,35 +0,0 @@
From 5fc717aa60b36934892d6d77c0637fc53aa7f761 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Sat, 10 Jul 2021 20:21:26 +0100
Subject: [PATCH 27/27] lua: make it easier to detect host-built Lua
Install pkg-config file also for host-build, clean up Lua symlinks.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 315f52e0f3bfa3d65ad14ca21a696c6d31c4edcd)
---
package/utils/lua/Makefile | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/package/utils/lua/Makefile b/package/utils/lua/Makefile
index d262d1e1fc..e15142d8d2 100644
--- a/package/utils/lua/Makefile
+++ b/package/utils/lua/Makefile
@@ -134,8 +134,12 @@ define Host/Install
INSTALL_TOP="$(STAGING_DIR_HOSTPKG)" \
install
- $(LN) $(STAGING_DIR_HOSTPKG)/bin/lua5.1 $(STAGING_DIR_HOSTPKG)/bin/lua
- $(LN) $(STAGING_DIR_HOSTPKG)/bin/luac5.1 $(STAGING_DIR_HOSTPKG)/bin/luac
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/lib/pkgconfig
+ $(CP) $(HOST_BUILD_DIR)/etc/lua.pc $(STAGING_DIR_HOSTPKG)/lib/pkgconfig/lua5.1.pc
+
+ $(LN) lua5.1 $(STAGING_DIR_HOSTPKG)/bin/lua
+ $(LN) luac5.1 $(STAGING_DIR_HOSTPKG)/bin/luac
+ $(LN) lua5.1.pc $(STAGING_DIR_HOSTPKG)/lib/pkgconfig/lua.pc
endef
define Build/InstallDev
--
2.25.1

View File

@@ -1,247 +0,0 @@
From 99b9f524e94b98ce8fd3e141bf7e07bfa96bbea0 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Tue, 14 Sep 2021 09:19:08 +0200
Subject: [PATCH] mt76: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
---
package/kernel/mt76/Makefile | 7 +-
...the-dst-buffer-to-of_get_mac_address.patch | 206 ++++++++++++++++++
2 files changed, 210 insertions(+), 3 deletions(-)
create mode 100644 package/kernel/mt76/patches/001-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index e4051d8347..431c57a240 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -8,11 +8,12 @@ PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2021-06-06
-PKG_SOURCE_VERSION:=22b690334c0f49b11534cc2e331c9d5e17c4a0bc
-PKG_MIRROR_HASH:=ff5e563935919d2e40c1e7254ef3bc06f7ecc5e69f8ddd12903e8f5de942d630
+PKG_SOURCE_DATE:=2021-07-15
+PKG_SOURCE_VERSION:=bbebea7d6dc64313132226adc3f7369d36e9359d
+PKG_MIRROR_HASH:=17cd74e72c1f6c8742b698bf6772afacc6fba71b233af8c4d59530600cf44d5b
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
+PKG_USE_NINJA:=0
PKG_BUILD_PARALLEL:=1
PKG_CONFIG_DEPENDS += \
diff --git a/package/kernel/mt76/patches/001-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch b/package/kernel/mt76/patches/001-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
new file mode 100644
index 0000000000..66075f2771
--- /dev/null
+++ b/package/kernel/mt76/patches/001-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
@@ -0,0 +1,206 @@
+From 83216e3988cd196183542937c9bd58b279f946af Mon Sep 17 00:00:00 2001
+From: Michael Walle <michael@walle.cc>
+Date: Mon, 12 Apr 2021 19:47:17 +0200
+Subject: of: net: pass the dst buffer to of_get_mac_address()
+
+of_get_mac_address() returns a "const void*" pointer to a MAC address.
+Lately, support to fetch the MAC address by an NVMEM provider was added.
+But this will only work with platform devices. It will not work with
+PCI devices (e.g. of an integrated root complex) and esp. not with DSA
+ports.
+
+There is an of_* variant of the nvmem binding which works without
+devices. The returned data of a nvmem_cell_read() has to be freed after
+use. On the other hand the return of_get_mac_address() points to some
+static data without a lifetime. The trick for now, was to allocate a
+device resource managed buffer which is then returned. This will only
+work if we have an actual device.
+
+Change it, so that the caller of of_get_mac_address() has to supply a
+buffer where the MAC address is written to. Unfortunately, this will
+touch all drivers which use the of_get_mac_address().
+
+Usually the code looks like:
+
+ const char *addr;
+ addr = of_get_mac_address(np);
+ if (!IS_ERR(addr))
+ ether_addr_copy(ndev->dev_addr, addr);
+
+This can then be simply rewritten as:
+
+ of_get_mac_address(np, ndev->dev_addr);
+
+Sometimes is_valid_ether_addr() is used to test the MAC address.
+of_get_mac_address() already makes sure, it just returns a valid MAC
+address. Thus we can just test its return code. But we have to be
+careful if there are still other sources for the MAC address before the
+of_get_mac_address(). In this case we have to keep the
+is_valid_ether_addr() call.
+
+The following coccinelle patch was used to convert common cases to the
+new style. Afterwards, I've manually gone over the drivers and fixed the
+return code variable: either used a new one or if one was already
+available use that. Mansour Moufid, thanks for that coccinelle patch!
+
+<spml>
+@a@
+identifier x;
+expression y, z;
+@@
+- x = of_get_mac_address(y);
++ x = of_get_mac_address(y, z);
+ <...
+- ether_addr_copy(z, x);
+ ...>
+
+@@
+identifier a.x;
+@@
+- if (<+... x ...+>) {}
+
+@@
+identifier a.x;
+@@
+ if (<+... x ...+>) {
+ ...
+ }
+- else {}
+
+@@
+identifier a.x;
+expression e;
+@@
+- if (<+... x ...+>@e)
+- {}
+- else
++ if (!(e))
+ {...}
+
+@@
+expression x, y, z;
+@@
+- x = of_get_mac_address(y, z);
++ of_get_mac_address(y, z);
+ ... when != x
+</spml>
+
+All drivers, except drivers/net/ethernet/aeroflex/greth.c, were
+compile-time tested.
+
+Suggested-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: Michael Walle <michael@walle.cc>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ arch/arm/mach-mvebu/kirkwood.c | 3 +-
+ arch/powerpc/sysdev/tsi108_dev.c | 5 +-
+ drivers/net/ethernet/aeroflex/greth.c | 6 +--
+ drivers/net/ethernet/allwinner/sun4i-emac.c | 10 ++--
+ drivers/net/ethernet/altera/altera_tse_main.c | 7 +--
+ drivers/net/ethernet/arc/emac_main.c | 8 +--
+ drivers/net/ethernet/atheros/ag71xx.c | 7 +--
+ drivers/net/ethernet/broadcom/bcm4908_enet.c | 7 +--
+ drivers/net/ethernet/broadcom/bcmsysport.c | 7 +--
+ drivers/net/ethernet/broadcom/bgmac-bcma.c | 10 ++--
+ drivers/net/ethernet/broadcom/bgmac-platform.c | 11 ++--
+ drivers/net/ethernet/cadence/macb_main.c | 11 ++--
+ drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 8 +--
+ drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 5 +-
+ drivers/net/ethernet/davicom/dm9000.c | 10 ++--
+ drivers/net/ethernet/ethoc.c | 6 +--
+ drivers/net/ethernet/ezchip/nps_enet.c | 7 +--
+ drivers/net/ethernet/freescale/fec_main.c | 7 +--
+ drivers/net/ethernet/freescale/fec_mpc52xx.c | 7 +--
+ drivers/net/ethernet/freescale/fman/mac.c | 9 ++--
+ .../net/ethernet/freescale/fs_enet/fs_enet-main.c | 5 +-
+ drivers/net/ethernet/freescale/gianfar.c | 8 +--
+ drivers/net/ethernet/freescale/ucc_geth.c | 5 +-
+ drivers/net/ethernet/hisilicon/hisi_femac.c | 7 +--
+ drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 7 +--
+ drivers/net/ethernet/lantiq_xrx200.c | 7 +--
+ drivers/net/ethernet/marvell/mv643xx_eth.c | 5 +-
+ drivers/net/ethernet/marvell/mvneta.c | 6 +--
+ .../net/ethernet/marvell/prestera/prestera_main.c | 11 ++--
+ drivers/net/ethernet/marvell/pxa168_eth.c | 9 +---
+ drivers/net/ethernet/marvell/sky2.c | 8 ++-
+ drivers/net/ethernet/mediatek/mtk_eth_soc.c | 11 ++--
+ drivers/net/ethernet/micrel/ks8851_common.c | 7 ++-
+ drivers/net/ethernet/microchip/lan743x_main.c | 5 +-
+ drivers/net/ethernet/nxp/lpc_eth.c | 4 +-
+ drivers/net/ethernet/qualcomm/qca_spi.c | 10 ++--
+ drivers/net/ethernet/qualcomm/qca_uart.c | 9 +---
+ drivers/net/ethernet/renesas/ravb_main.c | 12 +++--
+ drivers/net/ethernet/renesas/sh_eth.c | 5 +-
+ .../net/ethernet/samsung/sxgbe/sxgbe_platform.c | 13 ++---
+ drivers/net/ethernet/socionext/sni_ave.c | 10 ++--
+ .../net/ethernet/stmicro/stmmac/dwmac-anarion.c | 2 +-
+ .../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 2 +-
+ .../net/ethernet/stmicro/stmmac/dwmac-generic.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 2 +-
+ .../net/ethernet/stmicro/stmmac/dwmac-intel-plat.c | 2 +-
+ .../net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 2 +-
+ .../net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c | 2 +-
+ .../net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c | 2 +-
+ .../net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c | 2 +-
+ .../ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 2 +-
+ .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 2 +-
+ .../net/ethernet/stmicro/stmmac/dwmac-visconti.c | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 +-
+ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
+ .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 14 ++---
+ .../net/ethernet/stmicro/stmmac/stmmac_platform.h | 2 +-
+ drivers/net/ethernet/ti/am65-cpsw-nuss.c | 19 ++++---
+ drivers/net/ethernet/ti/cpsw.c | 7 +--
+ drivers/net/ethernet/ti/cpsw_new.c | 7 +--
+ drivers/net/ethernet/ti/davinci_emac.c | 8 +--
+ drivers/net/ethernet/ti/netcp_core.c | 7 +--
+ drivers/net/ethernet/wiznet/w5100-spi.c | 8 ++-
+ drivers/net/ethernet/wiznet/w5100.c | 2 +-
+ drivers/net/ethernet/xilinx/ll_temac_main.c | 8 +--
+ drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 15 +++---
+ drivers/net/ethernet/xilinx/xilinx_emaclite.c | 8 +--
+ drivers/net/wireless/ath/ath9k/init.c | 5 +-
+ drivers/net/wireless/mediatek/mt76/eeprom.c | 9 +---
+ drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 6 +--
+ drivers/of/of_net.c | 60 ++++++++++------------
+ drivers/staging/octeon/ethernet.c | 10 ++--
+ drivers/staging/wfx/main.c | 7 ++-
+ include/linux/of_net.h | 6 +--
+ include/net/dsa.h | 2 +-
+ net/dsa/dsa2.c | 2 +-
+ net/dsa/slave.c | 2 +-
+ net/ethernet/eth.c | 11 ++--
+ 85 files changed, 218 insertions(+), 364 deletions(-)
+
+diff --git a/drivers/net/wireless/mediatek/mt76/eeprom.c b/drivers/net/wireless/mediatek/mt76/eeprom.c
+index 665b54c5c8ae5..6d895738222ad 100644
+--- a/eeprom.c
++++ b/eeprom.c
+@@ -91,15 +91,9 @@ void
+ {
+ struct mt76_dev *dev = phy->dev;
+
+-#ifdef CONFIG_OF
+ struct device_node *np = dev->dev->of_node;
+- const u8 *mac = NULL;
+
+- if (np)
+- mac = of_get_mac_address(np);
+- if (!IS_ERR_OR_NULL(mac))
+- ether_addr_copy(phy->macaddr, mac);
+-#endif
++ of_get_mac_address(np, phy->macaddr);
+
+ if (!is_valid_ether_addr(phy->macaddr)) {
+ eth_random_addr(phy->macaddr);
+--
+cgit 1.2.3-1.el7
+
--
2.25.1

View File

@@ -1,47 +0,0 @@
From 4b2e6bb352b400e244646a7bc59bc5ca3ca6f5df Mon Sep 17 00:00:00 2001
From: Roman Yeryomin <roman@advem.lv>
Date: Fri, 3 Sep 2021 17:31:11 +0300
Subject: [PATCH 32/32] iproute2: m_xt.so depends on dynsyms.list
When doing parallel build on a fast machine with bottleneck in i/o,
m_xt.so may start linking faster than dynsyms.list gets populated,
resulting in error:
ld:dynsyms.list:0: syntax error in dynamic list
Fix this by adding dynsyms.list as make dependency to m_xt.so
Described also here:
https://bugs.openwrt.org/index.php?do=details&task_id=3353
Change from v1:
- add dynsysms.list dependancy only when shared libs are enabled
Signed-off-by: Roman Yeryomin <roman@advem.lv>
Fixes: FS#3353
---
.../utils/iproute2/patches/175-reduce-dynamic-syms.patch | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch
index da961a183b..c3892e5a0e 100644
--- a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch
+++ b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch
@@ -26,13 +26,14 @@
q_atm.so: q_atm.c
$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
-@@ -205,4 +206,15 @@ static-syms.h: $(wildcard *.c)
+@@ -205,4 +206,16 @@ static-syms.h: $(wildcard *.c)
sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
done > $@
+else
+
+tc: dynsyms.list
++m_xt.so: dynsyms.list
+dynsyms.list: $(wildcard *.c)
+ files="$(filter-out $(patsubst %.so,%.c,$(TCSO)), $^)" ; \
+ echo "{" > $@ ; \
--
2.25.1

View File

@@ -1,35 +0,0 @@
From d4e24006e05474b6dbe582f7c56a505cc0c45e81 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Mon, 1 Nov 2021 11:59:41 +0100
Subject: [PATCH] ubus: update to the latest version
b743a331421d ubusd: log ACL init errors
2099bb3ad997 libubus: use list_empty/list_first_entry in ubus_process_pending_msg
ef038488edc3 libubus: process pending messages in data handler if stack depth is 0
a72457b61df0 libubus: increase stack depth for processing obj msgs
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
package/system/ubus/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile
index 8a3fd1de7b..d5f86b6850 100644
--- a/package/system/ubus/Makefile
+++ b/package/system/ubus/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git
-PKG_SOURCE_DATE:=2021-06-30
-PKG_SOURCE_VERSION:=4fc532c8a55ba8217ad67d7fd47c5eb9a8aba044
-PKG_MIRROR_HASH:=a5c8205f2e2b2f1f9ad687592e66a6e2bf8900dc54cfe3ceefe6c297d18971a8
+PKG_SOURCE_DATE:=2021-08-09
+PKG_SOURCE_VERSION:=a72457b61df045d3c499a6211362b751710590d7
+PKG_MIRROR_HASH:=ac617577bcb2ff3dbc3039ad67200afcce910840223a2de15977d3224e6557fd
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
CMAKE_INSTALL:=1
--
2.25.1

View File

@@ -1,34 +0,0 @@
From 49ceb8a8d7009e5c81599c68b8aacc16d17d2e62 Mon Sep 17 00:00:00 2001
From: Stijn Tintel <stijn@linux-ipv6.be>
Date: Tue, 9 Nov 2021 17:20:41 +0100
Subject: [PATCH] rpcd: bump to git HEAD
20bf958 session: use uloop_timeout_remaining64
d11ffe9 session: use blobmsg_get_u64 for RPC_DUMP_EXPIRES
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
---
package/system/rpcd/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/system/rpcd/Makefile b/package/system/rpcd/Makefile
index 0896a7dada..af788dcfaa 100644
--- a/package/system/rpcd/Makefile
+++ b/package/system/rpcd/Makefile
@@ -12,10 +12,10 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git
-PKG_SOURCE_DATE:=2021-03-11
-PKG_SOURCE_VERSION:=ccb75178cf6a726896729c6904bd623636aa0b29
+PKG_MIRROR_HASH:=98071b4a1ce983a0e738d7e4a2f6e52b7f6db19f99510ddef430093314134ca4
+PKG_SOURCE_DATE:=2021-11-04
+PKG_SOURCE_VERSION:=d11ffe9383ae0ec34836421926364b24c1d891ca
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
-PKG_MIRROR_HASH:=87b1839275c209f9767057d6da5272cae973a064767fa28f380a37fb65e2e643
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=
--
2.25.1

View File

@@ -1,221 +0,0 @@
From 3937223beab0c3e4284fd916c0c3b6548c287e03 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Tue, 26 Oct 2021 20:41:22 +0200
Subject: [PATCH 050/102] bpf-headers: add a package with kernel headers for
ebpf
In order to genererate suitable kernel headers, a 5.10 kernel tree is
prepared with a default config for mips. The arch is forced to mips in
order to avoid issues with inline asm on various architectures in a way
that doesn't involve relying on the host toolchain/headers.
It also has the advantage of supporting both endian types
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
include/bpf.mk | 65 ++++++++++++
package/kernel/bpf-headers/Makefile | 99 +++++++++++++++++++
.../src/include/generated/bounds.h | 14 +++
3 files changed, 178 insertions(+)
create mode 100644 include/bpf.mk
create mode 100644 package/kernel/bpf-headers/Makefile
create mode 100644 package/kernel/bpf-headers/src/include/generated/bounds.h
diff --git a/include/bpf.mk b/include/bpf.mk
new file mode 100644
index 0000000000..3dc65c7685
--- /dev/null
+++ b/include/bpf.mk
@@ -0,0 +1,65 @@
+ifneq ($(CONFIG_BPF_TOOLCHAIN_HOST),)
+ BPF_TOOLCHAIN_HOST_PATH:=$(call qstrip,$(CONFIG_BPF_TOOLCHAIN_HOST_PATH))
+ ifneq ($(BPF_TOOLCHAIN_HOST_PATH),)
+ BPF_PATH:=$(BPF_TOOLCHAIN_HOST_PATH)/bin:$(PATH)
+ else
+ BPF_PATH:=$(BPF_PATH)
+ endif
+ CLANG:=$(firstword $(shell PATH='$(BPF_PATH)' which clang clang-13 clang-12 clang-11))
+ LLVM_VER:=$(subst clang,,$(notdir $(CLANG)))
+else
+ CLANG:=$(STAGING_DIR_HOST)/bin/clang
+ LLVM_VER:=
+endif
+
+LLVM_PATH:=$(dir $(CLANG))
+LLVM_LLC:=$(LLVM_PATH)/llc$(LLVM_VER)
+LLVM_DIS:=$(LLVM_PATH)/llvm-dis$(LLVM_VER)
+LLVM_OPT:=$(LLVM_PATH)/opt$(LLVM_VER)
+LLVM_STRIP:=$(LLVM_PATH)/llvm-strip$(LLVM_VER)
+
+BPF_KARCH:=mips
+BPF_ARCH:=mips$(if $(CONFIG_BIG_ENDIAN),,el)
+
+BPF_HEADERS_DIR:=$(STAGING_DIR)/bpf-headers
+
+BPF_KERNEL_INCLUDE := \
+ -nostdinc -isystem $(TOOLCHAIN_DIR)/include \
+ -I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include \
+ -I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/asm/mach-generic \
+ -I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/generated \
+ -I$(BPF_HEADERS_DIR)/include \
+ -I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/uapi \
+ -I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/generated/uapi \
+ -I$(BPF_HEADERS_DIR)/include/uapi \
+ -I$(BPF_HEADERS_DIR)/include/generated/uapi \
+ -I$(BPF_HEADERS_DIR)/tools/lib \
+ -I$(BPF_HEADERS_DIR)/tools/testing/selftests \
+ -I$(BPF_HEADERS_DIR)/samples/bpf \
+ -include linux/kconfig.h -include asm_goto_workaround.h
+
+BPF_CFLAGS := \
+ $(BPF_KERNEL_INCLUDE) -I$(PKG_BUILD_DIR) \
+ -D__KERNEL__ -D__BPF_TRACING__ \
+ -D__TARGET_ARCH_${BPF_KARCH} \
+ -m$(if $(CONFIG_BIG_ENDIAN),big,little)-endian \
+ -fno-stack-protector -Wall \
+ -Wno-unused-value -Wno-pointer-sign \
+ -Wno-compare-distinct-pointer-types \
+ -Wno-gnu-variable-sized-type-not-at-end \
+ -Wno-address-of-packed-member -Wno-tautological-compare \
+ -Wno-unknown-warning-option \
+ -fno-asynchronous-unwind-tables \
+ -Wno-uninitialized -Wno-unused-variable \
+ -Wno-unused-label \
+ -O2 -emit-llvm -Xclang -disable-llvm-passes
+
+define CompileBPF
+ $(CLANG) -g -target $(BPF_ARCH)-linux-gnu $(BPF_CFLAGS) $(2) \
+ -c $(1) -o $(patsubst %.c,%.bc,$(1))
+ $(LLVM_OPT) -O2 -mtriple=bpf-pc-linux < $(patsubst %.c,%.bc,$(1)) > $(patsubst %.c,%.opt,$(1))
+ $(LLVM_DIS) < $(patsubst %.c,%.opt,$(1)) > $(patsubst %.c,%.S,$(1))
+ $(LLVM_LLC) -march=bpf -filetype=obj -o $(patsubst %.c,%.o,$(1)) < $(patsubst %.c,%.S,$(1))
+ $(LLVM_STRIP) --strip-debug $(patsubst %.c,%.o,$(1))
+endef
+
diff --git a/package/kernel/bpf-headers/Makefile b/package/kernel/bpf-headers/Makefile
new file mode 100644
index 0000000000..5f5b89370d
--- /dev/null
+++ b/package/kernel/bpf-headers/Makefile
@@ -0,0 +1,99 @@
+#
+# Copyright (C) 2006-2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+override QUILT:=
+override HOST_QUILT:=
+
+include $(INCLUDE_DIR)/kernel.mk
+
+
+PKG_NAME:=linux
+PKG_PATCHVER:=5.10
+PKG_VERSION:=$(PKG_PATCHVER)$(strip $(LINUX_VERSION-$(PKG_PATCHVER)))
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=$(LINUX_SITE)
+PKG_HASH:=$(LINUX_KERNEL_HASH-$(strip $(PKG_VERSION)))
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/bpf-headers/$(PKG_NAME)-$(PKG_VERSION)
+
+GENERIC_BACKPORT_DIR := $(GENERIC_PLATFORM_DIR)/backport$(if $(wildcard $(GENERIC_PLATFORM_DIR)/backport-$(PKG_PATCHVER)),-$(PKG_PATCHVER))
+GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/pending$(if $(wildcard $(GENERIC_PLATFORM_DIR)/pending-$(PKG_PATCHVER)),-$(PKG_PATCHVER))
+GENERIC_HACK_DIR := $(GENERIC_PLATFORM_DIR)/hack$(if $(wildcard $(GENERIC_PLATFORM_DIR)/hack-$(PKG_PATCHVER)),-$(PKG_PATCHVER))
+GENERIC_FILES_DIR := $(foreach dir,$(wildcard $(GENERIC_PLATFORM_DIR)/files $(GENERIC_PLATFORM_DIR)/files-$(PKG_PATCHVER)),"$(dir)")
+PATCH_DIR := $(CURDIR)/patches
+FILES_DIR :=
+
+REAL_LINUX_DIR := $(LINUX_DIR)
+LINUX_DIR := $(PKG_BUILD_DIR)
+
+include $(INCLUDE_DIR)/bpf.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/bpf-headers
+ SECTION:=kernel
+ CATEGORY:=Kernel
+ TITLE:=eBPF kernel headers
+ BUILDONLY:=1
+ HIDDEN:=1
+endef
+
+export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include
+
+KERNEL_MAKE := \
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ ARCH=$(BPF_KARCH) \
+ CROSS_COMPILE=$(BPF_ARCH)-linux- \
+ LLVM=1 CC="$(CLANG)" LD="$(TARGET_CROSS)ld" \
+ HOSTCC="$(HOSTCC)" \
+ HOSTCXX="$(HOSTCXX)" \
+ HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib" \
+ KBUILD_HOSTLDLIBS="-L$(STAGING_DIR_HOST)/lib" \
+ CONFIG_SHELL="$(BASH)" \
+ INSTALL_HDR_PATH="$(PKG_BUILD_DIR)/user_headers"
+
+define Build/Patch
+ $(Kernel/Patch/Default)
+endef
+
+BPF_DOC = $(PKG_BUILD_DIR)/scripts/bpf_helpers_doc.py
+
+define Build/Configure
+ grep -vE 'CONFIG_(CPU_.*ENDIAN|HZ)' $(PKG_BUILD_DIR)/arch/mips/configs/generic_defconfig > $(PKG_BUILD_DIR)/.config
+ echo 'CONFIG_CPU_$(if $(CONFIG_BIG_ENDIAN),BIG,LITTLE)_ENDIAN=y' >> $(PKG_BUILD_DIR)/.config
+ grep CONFIG_HZ $(REAL_LINUX_DIR)/.config >> $(PKG_BUILD_DIR)/.config
+ yes '' | $(KERNEL_MAKE) oldconfig
+ grep 'CONFIG_HZ=' $(REAL_LINUX_DIR)/.config | \
+ cut -d= -f2 | \
+ bc -q $(LINUX_DIR)/kernel/time/timeconst.bc \
+ > $(LINUX_DIR)/include/generated/timeconst.h
+ $(BPF_DOC) --header \
+ --file $(LINUX_DIR)/tools/include/uapi/linux/bpf.h \
+ > $(PKG_BUILD_DIR)/tools/lib/bpf/bpf_helper_defs.h
+endef
+
+define Build/Compile
+ $(KERNEL_MAKE) archprepare headers_install
+endef
+
+define Build/InstallDev
+ mkdir -p $(1)/bpf-headers/arch $(1)/bpf-headers/tools
+ $(CP) \
+ $(PKG_BUILD_DIR)/arch/$(BPF_KARCH) \
+ $(1)/bpf-headers/arch/
+ $(CP) \
+ $(PKG_BUILD_DIR)/tools/lib \
+ $(PKG_BUILD_DIR)/tools/testing \
+ $(1)/bpf-headers/tools/
+ $(CP) \
+ $(PKG_BUILD_DIR)/include \
+ $(PKG_BUILD_DIR)/samples \
+ $(PKG_BUILD_DIR)/scripts \
+ $(PKG_BUILD_DIR)/user_headers \
+ $(1)/bpf-headers
+endef
+
+$(eval $(call BuildPackage,bpf-headers))
diff --git a/package/kernel/bpf-headers/src/include/generated/bounds.h b/package/kernel/bpf-headers/src/include/generated/bounds.h
new file mode 100644
index 0000000000..82ff01043c
--- /dev/null
+++ b/package/kernel/bpf-headers/src/include/generated/bounds.h
@@ -0,0 +1,14 @@
+#ifndef __LINUX_BOUNDS_H__
+#define __LINUX_BOUNDS_H__
+/*
+ * DO NOT MODIFY.
+ *
+ * This file was generated by Kbuild
+ */
+
+#define NR_PAGEFLAGS 23 /* __NR_PAGEFLAGS */
+#define MAX_NR_ZONES 4 /* __MAX_NR_ZONES */
+#define NR_CPUS_BITS 1 /* ilog2(CONFIG_NR_CPUS) */
+#define SPINLOCK_SIZE 64 /* sizeof(spinlock_t) */
+
+#endif
--
2.25.1

View File

@@ -1,29 +0,0 @@
From 32243b2148fd0dacd0630affaea59345c64df79a Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Tue, 2 Nov 2021 10:36:14 +0100
Subject: [PATCH 051/102] bpf-headers: unset PKG_CONFIG_PATH
This fixes an issue where the kernel would pick up an incompatible target
libyaml for building host tools
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
package/kernel/bpf-headers/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/kernel/bpf-headers/Makefile b/package/kernel/bpf-headers/Makefile
index 5f5b89370d..df24bfa13f 100644
--- a/package/kernel/bpf-headers/Makefile
+++ b/package/kernel/bpf-headers/Makefile
@@ -41,6 +41,8 @@ define Package/bpf-headers
HIDDEN:=1
endef
+PKG_CONFIG_PATH:=
+
export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include
KERNEL_MAKE := \
--
2.25.1

View File

@@ -1,99 +0,0 @@
From 1eb36bc2be4b54e4e4e4ceffc01be78d996205f0 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Sun, 17 Oct 2021 17:50:53 +0200
Subject: [PATCH 052/102] tools/llvm-bpf: add llvm+clang build suitable for
compiling code to eBPF
Preparation for building packages that ship eBPF code
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
toolchain/Config.in | 7 +++++++
tools/Makefile | 2 ++
tools/llvm-bpf/Makefile | 36 ++++++++++++++++++++++++++++++++++++
3 files changed, 45 insertions(+)
create mode 100644 tools/llvm-bpf/Makefile
diff --git a/toolchain/Config.in b/toolchain/Config.in
index 6dda9af92d..9062d6f65e 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -37,6 +37,13 @@ menuconfig TARGET_OPTIONS
Most people will answer N.
+config BUILD_LLVM_BPF
+ bool "Build LLVM toolchain for eBPF" if DEVEL
+ help
+ If enabled, a LLVM toolchain for building eBPF binaries will be built.
+ If this is not enabled, eBPF packages can only be built if the host
+ has a suitable toolchain
+
menuconfig EXTERNAL_TOOLCHAIN
bool
diff --git a/tools/Makefile b/tools/Makefile
index a2665dbc9a..83147014c6 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -35,6 +35,7 @@ tools-$(CONFIG_TARGET_mxs) += elftosb sdimage
tools-$(CONFIG_TARGET_tegra) += cbootimage cbootimage-configs
tools-$(CONFIG_USES_MINOR) += kernel2minor
tools-$(CONFIG_USE_SPARSE) += sparse
+tools-$(CONFIG_BUILD_LLVM_BPF) += llvm-bpf
# builddir dependencies
$(curdir)/autoconf/compile := $(curdir)/m4/compile
@@ -57,6 +58,7 @@ $(curdir)/libelf/compile := $(curdir)/libtool/compile
$(curdir)/libressl/compile := $(curdir)/pkgconf/compile
$(curdir)/libtool/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/automake/compile $(curdir)/missing-macros/compile
$(curdir)/lzma-old/compile := $(curdir)/zlib/compile
+$(curdir)/llvm-bpf/compile := $(curdir)/cmake/compile
$(curdir)/make-ext4fs/compile := $(curdir)/zlib/compile
$(curdir)/missing-macros/compile := $(curdir)/autoconf/compile
$(curdir)/mkimage/compile += $(curdir)/libressl/compile
diff --git a/tools/llvm-bpf/Makefile b/tools/llvm-bpf/Makefile
new file mode 100644
index 0000000000..a5ba2a4cb7
--- /dev/null
+++ b/tools/llvm-bpf/Makefile
@@ -0,0 +1,36 @@
+#
+# Copyright (C) 2006-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=llvm-project
+PKG_VERSION:=13.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).src.tar.xz
+PKG_SOURCE_URL:=https://github.com/llvm/llvm-project/releases/download/llvmorg-$(PKG_VERSION)
+PKG_HASH:=6075ad30f1ac0e15f07c1bf062c1e1268c241d674f11bd32cdf0e040c71f2bf3
+
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION).src
+
+HOST_BUILD_PARALLEL:=1
+
+CMAKE_BINARY_SUBDIR := build
+CMAKE_SOURCE_SUBDIR := llvm
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+CMAKE_HOST_OPTIONS += \
+ -DLLVM_ENABLE_BINDINGS=OFF \
+ -DLLVM_INCLUDE_DOCS=OFF \
+ -DLLVM_INCLUDE_EXAMPLES=OFF \
+ -DLLVM_INCLUDE_TESTS=OFF \
+ -DLLVM_ENABLE_PROJECTS="clang;lld" \
+ -DLLVM_TARGETS_TO_BUILD=BPF \
+ -DCLANG_BUILD_EXAMPLES=OFF
+
+$(eval $(call HostBuild))
--
2.25.1

View File

@@ -1,40 +0,0 @@
From 103a743e7ca4a2e98969d0f60d8aeb6cc7641f67 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Tue, 2 Nov 2021 19:38:12 +0100
Subject: [PATCH 053/102] llvm-bpf: move to staging_dir/host/llvm-bpf
This makes it easier to package it up for the download server
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
tools/llvm-bpf/Makefile | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/llvm-bpf/Makefile b/tools/llvm-bpf/Makefile
index a5ba2a4cb7..ae279d26d2 100644
--- a/tools/llvm-bpf/Makefile
+++ b/tools/llvm-bpf/Makefile
@@ -24,6 +24,8 @@ CMAKE_SOURCE_SUBDIR := llvm
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk
+CMAKE_HOST_INSTALL_PREFIX = $(STAGING_DIR_HOST)/llvm-bpf
+
CMAKE_HOST_OPTIONS += \
-DLLVM_ENABLE_BINDINGS=OFF \
-DLLVM_INCLUDE_DOCS=OFF \
@@ -31,6 +33,10 @@ CMAKE_HOST_OPTIONS += \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DLLVM_TARGETS_TO_BUILD=BPF \
- -DCLANG_BUILD_EXAMPLES=OFF
+ -DCLANG_BUILD_EXAMPLES=OFF \
+ -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON \
+ -DLLVM_LINK_LLVM_DYLIB=ON \
+ -DLLVM_TOOLCHAIN_TOOLS="llvm-objcopy;llvm-objdump;llvm-readelf;llvm-strip;llvm-ar;llvm-as;llvm-dis;llvm-link;llvm-nm;llvm-ranlib;llc;opt" \
+ -DCMAKE_SKIP_RPATH=OFF
$(eval $(call HostBuild))
--
2.25.1

View File

@@ -1,103 +0,0 @@
From a368d456ba1e9198fd8f473b7e82c0e066e4eb82 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Mon, 1 Nov 2021 18:40:03 +0100
Subject: [PATCH 054/102] build: fix bpf toolchain dependency for qosify
Add hidden symbols to fix defaults with CONFIG_DEVEL unset
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
include/bpf.mk | 2 ++
toolchain/Config.in | 45 +++++++++++++++++++++++++++++++++++++++++++++
tools/Makefile | 2 +-
3 files changed, 48 insertions(+), 1 deletion(-)
diff --git a/include/bpf.mk b/include/bpf.mk
index 3dc65c7685..5211ec4434 100644
--- a/include/bpf.mk
+++ b/include/bpf.mk
@@ -1,3 +1,5 @@
+BPF_DEPENDS := @HAS_BPF_TOOLCHAIN
+
ifneq ($(CONFIG_BPF_TOOLCHAIN_HOST),)
BPF_TOOLCHAIN_HOST_PATH:=$(call qstrip,$(CONFIG_BPF_TOOLCHAIN_HOST_PATH))
ifneq ($(BPF_TOOLCHAIN_HOST_PATH),)
diff --git a/toolchain/Config.in b/toolchain/Config.in
index 9062d6f65e..997cff59e4 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -44,6 +44,32 @@ config BUILD_LLVM_BPF
If this is not enabled, eBPF packages can only be built if the host
has a suitable toolchain
+ choice BPF_TOOLCHAIN
+ prompt "BPF toolchain" if DEVEL
+ default BPF_TOOLCHAIN_NONE
+
+ config BPF_TOOLCHAIN_NONE
+ bool "None"
+
+ config BPF_TOOLCHAIN_HOST
+ select USE_LLVM_HOST
+ bool "Use host LLVM toolchain"
+
+ config BPF_TOOLCHAIN_BUILD_LLVM
+ select USE_LLVM_BUILD
+ bool "Build LLVM toolchain for eBPF"
+ help
+ If enabled, a LLVM toolchain for building eBPF binaries will be built.
+ If this is not enabled, eBPF packages can only be built if the host
+ has a suitable toolchain
+ endchoice
+
+ config BPF_TOOLCHAIN_HOST_PATH
+ string
+ depends on BPF_TOOLCHAIN_HOST
+ prompt "Host LLVM toolchain path (prefix)" if DEVEL
+ default "/usr/local/opt/llvm" if HOST_OS_MACOS
+ default ""
menuconfig EXTERNAL_TOOLCHAIN
bool
@@ -266,6 +292,25 @@ config GDB
help
Enable if you want to build the gdb.
+config GDB_PYTHON
+ bool
+ depends on GDB
+ prompt "Build gdb with python binding"
+
+ help
+ Enable the python bindings for GDB to allow using python in the gdb shell.
+
+config HAS_BPF_TOOLCHAIN
+ bool
+
+config USE_LLVM_HOST
+ select HAS_BPF_TOOLCHAIN
+ bool
+
+config USE_LLVM_BUILD
+ select HAS_BPF_TOOLCHAIN
+ bool
+
config USE_GLIBC
default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (arc)
bool
diff --git a/tools/Makefile b/tools/Makefile
index 83147014c6..ae3cc5dfd6 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -35,7 +35,7 @@ tools-$(CONFIG_TARGET_mxs) += elftosb sdimage
tools-$(CONFIG_TARGET_tegra) += cbootimage cbootimage-configs
tools-$(CONFIG_USES_MINOR) += kernel2minor
tools-$(CONFIG_USE_SPARSE) += sparse
-tools-$(CONFIG_BUILD_LLVM_BPF) += llvm-bpf
+tools-$(CONFIG_USE_LLVM_BUILD) += llvm-bpf
# builddir dependencies
$(curdir)/autoconf/compile := $(curdir)/m4/compile
--
2.25.1

View File

@@ -1,26 +0,0 @@
From 2ae5b19a52da190ea342ec4210523407837c58ea Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Tue, 2 Nov 2021 09:56:10 +0100
Subject: [PATCH 055/102] include/bpf.mk: fix typo
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
include/bpf.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/bpf.mk b/include/bpf.mk
index 5211ec4434..6223648c5d 100644
--- a/include/bpf.mk
+++ b/include/bpf.mk
@@ -5,7 +5,7 @@ ifneq ($(CONFIG_BPF_TOOLCHAIN_HOST),)
ifneq ($(BPF_TOOLCHAIN_HOST_PATH),)
BPF_PATH:=$(BPF_TOOLCHAIN_HOST_PATH)/bin:$(PATH)
else
- BPF_PATH:=$(BPF_PATH)
+ BPF_PATH:=$(PATH)
endif
CLANG:=$(firstword $(shell PATH='$(BPF_PATH)' which clang clang-13 clang-12 clang-11))
LLVM_VER:=$(subst clang,,$(notdir $(CLANG)))
--
2.25.1

View File

@@ -1,39 +0,0 @@
From aff796bf3e60d7f09e5ca500cbf59221211dd218 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Tue, 2 Nov 2021 10:39:35 +0100
Subject: [PATCH 056/102] include/bpf.mk: fix compile for big-endian targets
llvm-opt and llc need endian flags in the target as well
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
include/bpf.mk | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/bpf.mk b/include/bpf.mk
index 6223648c5d..9636ad5165 100644
--- a/include/bpf.mk
+++ b/include/bpf.mk
@@ -22,6 +22,7 @@ LLVM_STRIP:=$(LLVM_PATH)/llvm-strip$(LLVM_VER)
BPF_KARCH:=mips
BPF_ARCH:=mips$(if $(CONFIG_BIG_ENDIAN),,el)
+BPF_TARGET:=bpf$(if $(CONFIG_BIG_ENDIAN),eb,el)
BPF_HEADERS_DIR:=$(STAGING_DIR)/bpf-headers
@@ -59,9 +60,9 @@ BPF_CFLAGS := \
define CompileBPF
$(CLANG) -g -target $(BPF_ARCH)-linux-gnu $(BPF_CFLAGS) $(2) \
-c $(1) -o $(patsubst %.c,%.bc,$(1))
- $(LLVM_OPT) -O2 -mtriple=bpf-pc-linux < $(patsubst %.c,%.bc,$(1)) > $(patsubst %.c,%.opt,$(1))
+ $(LLVM_OPT) -O2 -mtriple=$(BPF_TARGET) < $(patsubst %.c,%.bc,$(1)) > $(patsubst %.c,%.opt,$(1))
$(LLVM_DIS) < $(patsubst %.c,%.opt,$(1)) > $(patsubst %.c,%.S,$(1))
- $(LLVM_LLC) -march=bpf -filetype=obj -o $(patsubst %.c,%.o,$(1)) < $(patsubst %.c,%.S,$(1))
+ $(LLVM_LLC) -march=$(BPF_TARGET) -filetype=obj -o $(patsubst %.c,%.o,$(1)) < $(patsubst %.c,%.S,$(1))
$(LLVM_STRIP) --strip-debug $(patsubst %.c,%.o,$(1))
endef
--
2.25.1

View File

@@ -1,34 +0,0 @@
From d05fae42794c5fe76509935b1e8f900e1d17d9f0 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Fri, 5 Nov 2021 10:46:00 +0100
Subject: [PATCH] include/bpf.mk: add LD_LIBRARY_PATH
Signed-off-by: John Crispin <john@phrozen.org>
---
include/bpf.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/bpf.mk b/include/bpf.mk
index 9636ad5165..2f797625b6 100644
--- a/include/bpf.mk
+++ b/include/bpf.mk
@@ -58,11 +58,16 @@ BPF_CFLAGS := \
-O2 -emit-llvm -Xclang -disable-llvm-passes
define CompileBPF
+ LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(STAGING_DIR_HOST)/lib \
$(CLANG) -g -target $(BPF_ARCH)-linux-gnu $(BPF_CFLAGS) $(2) \
-c $(1) -o $(patsubst %.c,%.bc,$(1))
+ LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(STAGING_DIR_HOST)/lib \
$(LLVM_OPT) -O2 -mtriple=$(BPF_TARGET) < $(patsubst %.c,%.bc,$(1)) > $(patsubst %.c,%.opt,$(1))
+ LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(STAGING_DIR_HOST)/lib \
$(LLVM_DIS) < $(patsubst %.c,%.opt,$(1)) > $(patsubst %.c,%.S,$(1))
+ LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(STAGING_DIR_HOST)/lib \
$(LLVM_LLC) -march=$(BPF_TARGET) -filetype=obj -o $(patsubst %.c,%.o,$(1)) < $(patsubst %.c,%.S,$(1))
+ LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(STAGING_DIR_HOST)/lib \
$(LLVM_STRIP) --strip-debug $(patsubst %.c,%.o,$(1))
endef
--
2.25.1

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,7 @@
repo: https://github.com/openwrt/openwrt.git
branch: openwrt-21.02
revision: 378769b5551714ccaa821b481bfeecbf362f351e
branch: openwrt-25.12
revision: 1353227ad391b0008b8365eebd38495e01ed7577
output_dir: ./output
patch_folders:
- backports/
- patches/
- patches-25.12

View File

@@ -5,8 +5,7 @@ RUN apt-get update \
&& apt-get install -y \
time git-core build-essential gcc-multilib clang \
libncurses5-dev zlib1g-dev gawk flex gettext wget unzip python \
python3 python3-pip python3-yaml libssl-dev rsync llvm llvm-12 \
clang-12 \
python3 python3-pip python3-yaml libssl-dev rsync \
&& apt-get clean
RUN git config --global user.email "you@example.com"
RUN git config --global user.name "Your Name"

View File

@@ -1,53 +0,0 @@
#
# Copyright (C) 2016 Nordic Semiconductor ASA.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=bluetooth-6lowpand
PKG_VERSION:=0.0.1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=https://github.com/NordicSemiconductor/Linux-ble-6lowpan-joiner.git
PKG_SOURCE_VERSION:=5ce5b248846a6d4ac4a609eb0e8d023cf920b247
PKG_SOURCE_PROTO:=git
BLUEZ_DIR:=$(wildcard $(BUILD_DIR)/bluez-*)
TARGET_CFLAGS += -I$(BLUEZ_DIR)
TARGET_LDFLAGS += -L$(BLUEZ_DIR)/lib/.libs/ -L$(BLUEZ_DIR)/src/.libs/ -lshared-mainloop -lbluetooth-internal
include $(INCLUDE_DIR)/package.mk
define Package/bluetooth-6lowpand
SECTION:=base
CATEGORY:=Network
TITLE:=Bluetooth LE 6lowpan joiner daemon
URL:=http://www.nordicsemi.com/
DEPENDS:=+libusb-1.0 +bluez-libs
endef
define Package/bluetooth-6lowpand/description
Bluetooth Low Energy IPSP device scanner and connection daemon.
The Daemon can be used to whitelist certain IPSP Bluetooth LE MAC
addresses, or autoconnect using SSID and Key derived from Wifi AP
setup to authenticate the devices in order to connect. Also, manual
configuration of software SSID and Key can be used.
endef
define Package/bluetooth-6lowpand/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/bluetooth_6lowpand.init $(1)/etc/init.d/bluetooth_6lowpand
$(INSTALL_DIR) $(1)/etc/bluetooth
$(INSTALL_DATA) ./files/bluetooth_6lowpand.conf $(1)/etc/bluetooth
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/bluetooth_6lowpand $(1)/usr/sbin
endef
$(eval $(call BuildPackage,bluetooth-6lowpand))

View File

@@ -1,24 +0,0 @@
#!/bin/sh /etc/rc.common
START=63
PROG=/usr/sbin/bluetooth_6lowpand
HCICONFIG=/usr/bin/hciconfig
start() {
config_load btle
config_get enable bluetooth_6lowpand enable 0
[ "$enable" -eq 1 ] || return
echo "start bluetooth_6lowpand"
sleep 1
echo 1 > /sys/kernel/debug/bluetooth/6lowpan_enable
sleep 1
killall bluetoothd
sleep 1
$HCICONFIG hci0 reset
$PROG -w 3 -t 5 -a -d
}
stop() {
echo "stop bluetooth_6lowpand"
killall -9 bluetooth_6lowpand
}

View File

@@ -1,33 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bluez-ibeacon
PKG_RELEASE:=1
PKG_SOURCE_URL=https://github.com/blogic/bluez-ibeacon
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2022-10-31
PKG_SOURCE_VERSION:=07c082bf3e139ce061ff62a42b7876860256f4ea
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
PKG_LICENSE:=MIT
include $(INCLUDE_DIR)/package.mk
define Package/bluez-ibeacon
SECTION:=utils
CATEGORY:=Utilities
TITLE:=bluez-ibeacon
DEPENDS:=+bluez-libs
endef
define Build/Compile
$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/bluez-beacon $(MAKE_FLAGS)
endef
define Package/bluez-ibeacon/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bluez-beacon/ibeacon $(1)/usr/sbin/
$(INSTALL_BIN) ./files/ibeacon $(1)/etc/init.d/ibeacon
endef
$(eval $(call BuildPackage,bluez-ibeacon))

View File

@@ -1,25 +0,0 @@
#!/bin/sh /etc/rc.common
START=80
USE_PROCD=1
PROG=/usr/sbin/ibeacon
service_triggers() {
procd_add_reload_trigger btle
}
start_service() {
config_load btle
config_get enable ibeacon enable 0
config_get uuid ibeacon uuid 0
config_get major ibeacon major 0
config_get minor ibeacon minor 0
[ "$enable" -eq 1 ] || return
procd_open_instance
procd_set_param command "$PROG" 200 "${uuid}" "${major}" "${minor}" -29
procd_set_param respawn
procd_close_instance
}

View File

@@ -1,32 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ubtled
PKG_RELEASE:=1
PKG_SOURCE_URL=https://github.com/blogic/ubtled.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2022-10-31
PKG_SOURCE_VERSION:=7e01ab86c562fc8ab3777d04e60b8dce596a4c5f
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/ubtled
SECTION:=utils
CATEGORY:=Utilities
TITLE:=OpenWrt BTLE daemon
DEPENDS:=+libubox +libubus +bluez-libs
endef
define Package/ubtled/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/{config,init.d,uci-defaults}
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ubtled $(1)/usr/sbin/
$(INSTALL_BIN) ./files/ubtled.init $(1)/etc/init.d/ubtled
$(INSTALL_DATA) ./files/btle.config $(1)/etc/config/btle
$(INSTALL_DATA) ./files/99-btle $(1)/etc/uci-defaults/
endef
$(eval $(call BuildPackage,ubtled))

View File

@@ -1,8 +0,0 @@
#!/bin/sh
cat >> /etc/bluetooth/main.conf <<EOF
[General]
Name = TIP AP
[GATT]
[Policy]
EOF

View File

@@ -1,11 +0,0 @@
config ubtled ubtled
option enable 0
config bluetooth_6lowpand bluetooth_6lowpand
option enable 0
config ubtled ibeacon
option enable 0
option uuid 0
option major 0
option minor 0

View File

@@ -1,24 +0,0 @@
#!/bin/sh /etc/rc.common
START=80
USE_PROCD=1
PROG=/usr/sbin/ubtled
service_triggers() {
procd_add_reload_trigger btle
}
start_service() {
config_load btle
config_get enable ubtled enable 0
[ "$enable" -eq 1 ] || return
hciconfig hci0 up
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn
procd_close_instance
}

View File

@@ -1,77 +0,0 @@
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=fbwifi
PKG_VERSION:=2
PKG_RELEASE:=0
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Simon Kinane <skinane@fb.com>
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/fbwifi
SUBMENU:=Captive Portals
SECTION:=net
CATEGORY:=Network
DEPENDS:=+iptables +luasec +luasocket \
+libuci-lua +luaposix \
+lua-cjson +uhttpd
TITLE:=Facebook Wi-Fi
PKGARCH:=all
endef
define Package/fbwifi/description
Facebook Wi-Fi, an AP authorisation solution
endef
define Package/luci-app-fbwifi
SUBMENU:=3. Applications
SECTION:=luci
CATEGORY:=LuCI
TITLE:=LuCI support for Facebook Wi-Fi
DEPENDS:= \
+fbwifi \
+luci-base +luci-mod-network +luci-mod-status +luci-theme-bootstrap
endef
define Package/luci-app-fbwifi/description
LuCI support for Facebook Wi-Fi
endef
define Package/fbwifi/conffiles
/etc/config/fbwifi
endef
define Build/Prepare
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/fbwifi/install
$(INSTALL_DIR) $(1)
$(CP) ./files/fbwifi/* $(1)/
endef
define Package/luci-app-fbwifi/install
$(INSTALL_DIR) $(1)
$(CP) ./files/luci-app-fbwifi/* $(1)
endef
$(eval $(call BuildPackage,fbwifi))
$(eval $(call BuildPackage,luci-app-fbwifi))

View File

@@ -1,22 +0,0 @@
# Facebook Wi-Fi v2.0 Reference Implementation for OpenWrt
## Getting started
Case studies for OEM customers are available at the official page of [Facebook Wi-Fi](https://www.facebook.com/facebook-wifi).
For OEM engineers, start by reading the init script in [files/etc/init.d/fbwifi](https://github.com/facebookincubator/fbc_owrt_feed/blob/master/fbwifi/files/etc/init.d/fbwifi)
To enable Facebook Wi-Fi, configure the gateway_token in `/etc/config/fbwifi`, and run `fbwifi enable`.
To disable Facebook Wi-Fi, run `fbwifi disable`.
## Contents
The 'files' subdirectory contains two subdirectories, one for the fbwifi
package that implements the Facebook Wi-Fi v2.0 standard for OpenWrt, and
another one containing a LuCI application to configure Facebook Wi-Fi.
The folder structures follow *nix conventions:
- 'etc' is the boot time scripts and configuration
- 'usr' contains procedural scripts, lua common code module and GUI prototype for luci
- 'www' contains the HTTP endpoints as CGI handlers

View File

@@ -1,6 +0,0 @@
config fbwifi 'main'
option enabled '0'
option gateway_token 'FBWIFI:GATEWAY|123456789|0123456789|abcdeABCDE123456789'
option http_port '2060'
option https_port '2061'
option zone 'lan'

View File

@@ -1,10 +0,0 @@
#!/bin/sh
[ "$ACTION" = ifup ] || exit 0
/etc/init.d/fbwifi enabled || exit 0
ip route get fibmatch 1.1.1.1 | grep -q "$DEVICE" || exit 0
logger -t fbwifi "Reloading fbwifi due to $ACTION of $INTERFACE ($DEVICE)"
/etc/init.d/fbwifi restart

View File

@@ -1,43 +0,0 @@
#!/bin/sh /etc/rc.common
START=90
USE_PROCD=1
reload_service() {
restart
}
service_triggers() {
procd_add_reload_trigger fbwifi
}
start_service() {
config_load fbwifi
config_get_bool enabled 'main' 'enabled' '0'
[ "$enabled" -eq 0 ] && return
config_get http_port main http_port
[ -z "$http_port" ] && {
logger -t fbwifi "required option http_port not set"
exit 1
}
config_get https_port main https_port
[ -z "$https_port" ] && {
logger -t fbwifi "required option https_port not set"
exit 1
}
logger "[fbwifi] Enabled; starting"
mkdir -p /tmp/fbwifi
/usr/sbin/fbwifi reload
procd_open_instance
procd_set_param command /usr/sbin/fbwifi_validate_token_db
procd_set_param respawn 1 300 0
procd_close_instance
}

View File

@@ -1,156 +0,0 @@
-- SPDX-License-Identifier: GPL-2.0-only
-- Copyright (c) Facebook, Inc. and its affiliates.
--
-- FBWIFI Lua library
-- function table
local fbwifi = {}
local http = require("ssl.https")
local json = require("cjson")
local log = require("posix.syslog")
local uci = require("uci")
function fbwifi.gateway_token()
token = uci.get("fbwifi.main.gateway_token")
if token and string.len(token) > 0 then
return token
else
log.syslog( log.LOG_WARNING, "[fbwifi] UCI option fbwifi.main.gateway_token is missing" )
return nil
end
end
function fbwifi.validate_token( token )
local valid = false
if string.len(token or '' ) > 0 then
GATEWAY_TOKEN = fbwifi.gateway_token()
URL="https://api.fbwifi.com/v2.0/token"
BODY="token="..token
body, code, headers = http.request(URL.."?access_token="..GATEWAY_TOKEN, BODY)
if code==200 then
valid = true
else
log.syslog(log.LOG_WARNING, "[fbwifi] validate_token:"..body)
end
end
return valid
end
local mac_to_purge=''
function remove_client_by_mac(client)
state = uci.cursor("/var/state", "/tmp/fbwifi")
for key, value in pairs(client) do
if
key == 'mac' and
value == mac_to_purge
then
log.syslog(log.LOG_INFO, string.format("[fbwifi] Purging DB entry %s for MAC %s", client['.name'] or 'unknown', mac_to_purge) )
state:delete("fbwifi", client['.name'])
return
end
end
end
function fbwifi.instate_client_rule( token, client_mac )
log.syslog(log.LOG_INFO, "[fbwifi] Validating client "..client_mac)
state = uci.cursor("/var/state", "/tmp/fbwifi")
state_name = "token_" .. token
RULE_COND="iptables -w -L FBWIFI_CLIENT_TO_INTERNET -t mangle | grep -i -q \"%s\""
RULE_FMT="iptables -w -t mangle -%s FBWIFI_CLIENT_TO_INTERNET -m mac --mac-source \"%s\" -j MARK --set-mark 0xfb"
local RULE
log.syslog(log.LOG_INFO, string.format("[fbwifi] Cleaning DB for MAC %s", client_mac) )
mac_to_purge = client_mac
state:foreach("fbwifi", "client", remove_client_by_mac)
log.syslog(log.LOG_INFO, string.format("[fbwifi] Adding DB entry %s for MAC %s", state_name, client_mac) )
state:set("fbwifi", state_name, "client")
state:set("fbwifi", state_name, "token", token)
state:set("fbwifi", state_name, "mac", client_mac)
state:set("fbwifi", state_name, "authenticated", "true")
-- verify a rule exists for the given client MAC,
-- OR install it
RULE=string.format(RULE_COND.." || "..RULE_FMT, client_mac, "A", client_mac)
log.syslog(log.LOG_INFO, string.format( "[fbwifi] Opening iptables for %s", client_mac ) )
res = os.execute(RULE)
if res ~= 0 then
log.syslog(log.LOG_WARNING, string.format( "[fbwifi] Failed to update iptables (%s)", res ) )
end
log.syslog(log.LOG_INFO, "[fbwifi] "..RULE)
state:save('fbwifi')
state:commit('fbwifi')
end
function fbwifi.revoke_client_rule( token )
if (token == nil) then
log.syslog(log.LOG_INFO, "[fbwifi] Invalidating token, but token is Nil")
return
end
log.syslog(log.LOG_INFO, string.format( "[fbwifi] Invalidating token (%s)", token) )
state = uci.cursor("/var/state", "/tmp/fbwifi")
state_name = "token_" .. token
client_mac = state:get("fbwifi", state_name, "mac")
if client_mac then
RULE_COND="iptables -w -L FBWIFI_CLIENT_TO_INTERNET -t mangle | grep -i -q \"%s\""
RULE_FMT="iptables -w -t mangle -%s FBWIFI_CLIENT_TO_INTERNET -m mac --mac-source \"%s\" -j MARK --set-mark 0xfb"
-- verify a rule exists for the given client MAC,
-- AND delete it
RULE=string.format(RULE_COND.." && "..RULE_FMT, client_mac, "D", client_mac)
res = os.execute(RULE)
if res ~= 0 then
log.syslog(log.LOG_WARNING, string.format( "[fbwifi] Failed to update iptables (%s)", res ) )
end
log.syslog(log.LOG_INFO, "[fbwifi] "..RULE)
state:delete("fbwifi", state_name)
state:save('fbwifi')
state:commit('fbwifi')
else
log.syslog(log.LOG_WARNING, string.format( "[fbwifi] Client MAC not found in DB (%s)", state_name ) )
end
end
function fbwifi.reset()
local success = false
GATEWAY_TOKEN = fbwifi.gateway_token()
URL="https://api.fbwifi.com/v2.0/gateway/reset"
BODY="{}"
body, code, headers = http.request(URL.."?access_token="..GATEWAY_TOKEN, BODY)
if code==200 then
log.syslog(log.LOG_INFO, "[fbwifi] Reset committed")
success = true
else
log.syslog(log.LOG_WARNING, "[fbwifi] Reset failed : "..body)
end
return success
end
--
-- Return the function table to the host script
--
return fbwifi

View File

@@ -1,58 +0,0 @@
#!/bin/sh
case "$1" in
disable)
uci set fbwifi.main.enabled=0
uci delete firewall.fbwifi
uci delete uhttpd.fbwifi_redirect
uci delete uhttpd.main.json_script
uci set uhttpd.main.cert='/etc/uhttpd.crt'
uci set uhttpd.main.key='/etc/uhttpd.key'
uci set uhttpd.main.rfc1918_filter=1
;;
enable)
uci set fbwifi.main.enabled=1
uci set firewall.fbwifi=include
uci set firewall.fbwifi.enabled=1
uci set firewall.fbwifi.family=ipv4
uci set firewall.fbwifi.path=/usr/share/fbwifi/firewall.include
uci set firewall.fbwifi.reload=1
uci set firewall.fbwifi.type=script
uci set uhttpd.fbwifi_redirect=uhttpd
uci set uhttpd.fbwifi_redirect.enabled=1
uci set uhttpd.fbwifi_redirect.cert='/tmp/fbwifi/https_server_cert'
uci set uhttpd.fbwifi_redirect.home='/dev/null'
uci set uhttpd.fbwifi_redirect.json_script='/tmp/fbwifi/uhttpd-redirect.json'
uci set uhttpd.fbwifi_redirect.key='/tmp/fbwifi/https_server_key'
uci set uhttpd.fbwifi_redirect.listen_http='0.0.0.0:2060'
uci set uhttpd.fbwifi_redirect.listen_https='0.0.0.0:2061'
uci set uhttpd.main.cert='/tmp/fbwifi/https_server_cert'
uci set uhttpd.main.json_script='/usr/share/fbwifi/uhttpd.json'
uci set uhttpd.main.key='/tmp/fbwifi/https_server_key'
uci set uhttpd.main.rfc1918_filter=0
;;
reload)
/usr/sbin/fbwifi_get_config
login_url=$(uci -c /var/state get fbwifi.main.captive_portal_url)
[ -z "$login_url" ] && {
logger -t fbwifi "captive_portal_url not available yet"
exit 1
}
printf '{ "request": [ ["redirect", "%s", 302] ] }' "$login_url" > /tmp/fbwifi/uhttpd-redirect.json
/etc/init.d/uhttpd restart
exit 0
;;
esac
uci commit
/etc/init.d/uhttpd restart
reload_config

View File

@@ -1,8 +0,0 @@
echo -e "Runtime configuration and token DB\n"
uci -c /var/state export fbwifi
echo -e "\nDynamic firewall flow rules\n"
iptables -t mangle -L FBWIFI_CLIENT_TO_INTERNET
echo -e "\nDHCP leases\n"
cat /tmp/dhcp.leases

View File

@@ -1,39 +0,0 @@
#!/usr/bin/lua
http = require("ssl.https")
json = require("cjson")
log = require("posix.syslog")
socket = require("socket")
require("uci")
fbwifi = require("fbwifi")
GATEWAY_TOKEN = fbwifi.gateway_token()
state = uci.cursor("/var/state", "/tmp/fbwifi")
payload="name="..socket.dns.gethostname()
function queue_ssid_update(iface)
bssid_file="/sys/class/net/br-"..iface["network"].."/address"
local file = io.open(bssid_file)
if file then
for line in file:lines() do
payload=payload.."&bssid[]="..line
end
file:close()
payload=payload.."ssid[]="..iface["ssid"]
else
log.syslog(log.LOG_WARNING, "[fbwifi] Failed to find BSSID for interface br-"..iface["network"])
end
end
state:foreach("wireless", "wifi-iface", queue_ssid_update)
URL="https://api.fbwifi.com/v2.0/gateway"
body, code, headers = http.request(URL.."?access_token="..GATEWAY_TOKEN, payload)
if code == 200 then
log.syslog(log.LOG_INFO, "[fbwifi] gateway information updated "..body)
os.exit(0)
else
log.syslog(log.LOG_WARNING, "[fbwifi] gateway API failed "..body)
os.exit(code)
end

View File

@@ -1,111 +0,0 @@
#!/usr/bin/lua
http = require("ssl.https")
json = require("cjson")
require("uci")
log = require("posix.syslog")
fbwifi = require("fbwifi")
GATEWAY_TOKEN = fbwifi.gateway_token()
http_port = uci.get("fbwifi.main.http_port")
https_port = uci.get("fbwifi.main.https_port")
statefile = assert(io.open("/var/state/fbwifi", "a"), "could not create state file")
statefile:close()
state = uci.cursor("/var/state", "/tmp/fbwifi")
URL="https://api.fbwifi.com/v2.0/gateway"
body, code, headers = http.request(URL.."?access_token="..GATEWAY_TOKEN.."&fields=config,config_version")
if code == 200 then
log.syslog(log.LOG_INFO, "[fbwifi] Got gateway config ("..code..")")
else
log.syslog(log.LOG_CRIT, "[fbwifi] Failed to get gateway config ("..code..")")
os.exit(1)
end
obj = json.decode(body)
function save_cert(name, value)
log.syslog(log.LOG_INFO, "[fbwifi] Saving cert "..name)
local f = assert(io.open("/tmp/fbwifi/"..name, "w"))
f:write(value)
f:close()
end
function process_redirect(ix, host)
IP_SET = "ip addr replace dev lo "..host
local result = os.execute(IP_SET)
if result == 0 then
log.syslog(log.LOG_INFO, "[fbwifi] Redirect address applied "..host)
else
log.syslog(log.LOG_WARNING, "[fbwifi] Failed to apply redirect address "..host)
end
ip = string.match(host, '([0-9\.]*)/([0-9]*)')
RULE_FMT="grep -q \"%s\" /etc/hosts || echo \"%s\tstar.fbwifigateway.net\" >> /etc/hosts"
HOSTS_RULE = string.format(RULE_FMT, ip, ip)
result = os.execute(HOSTS_RULE)
if result == 0 then
log.syslog(log.LOG_INFO, "[fbwifi] Cached redirect host for DNS")
else
log.syslog(log.LOG_WARNING, "[fbwifi] Failed to amend /etc/hosts")
log.syslog(log.LOG_INFO, "[fbwifi] "..HOSTS_RULE)
end
result = os.execute("iptables -t nat -A FBWIFI_HOST_REDIRLIST -p tcp --dport 80 -d "..ip.." -j ACCEPT # REDIRECT --to-ports "..http_port)
--print(result)
result = os.execute("iptables -t nat -A FBWIFI_HOST_REDIRLIST -p tcp --dport 443 -d "..ip.." -j ACCEPT # REDIRECT --to-ports "..https_port)
--print(result)
end
save_cert("https_server_cert", obj['config']['https_server_cert'])
save_cert("https_server_key", obj['config']['https_server_key'])
result = os.execute("iptables -t nat -F FBWIFI_HOST_REDIRLIST")
--print(result)
table.foreach(obj['config']['host_redirect_ips'], process_redirect)
RULE_FORMAT = "iptables -t mangle -A FBWIFI_TRAFFIC_ALLOWLIST -d %s -p %s --dport %s -j MARK --set-mark 0xfb"
function process_traffic_rule(ix, rule)
log.syslog(log.LOG_INFO, "[fbwifi] Traffic rule "..ix)
if rule["protocol"] == 6 then
PROTO = "tcp"
elseif rule["protocol"] == 17 then
PROTO = "udp"
end
RULE = string.format(RULE_FORMAT, rule["ip"], PROTO, rule["port"])
local result = os.execute(RULE)
if result == 0 then
log.syslog(log.LOG_INFO, "[fbwifi] Traffic rule "..ix)
else
log.syslog(log.LOG_WARNING, "[fbwifi] Failed to install traffic rule ; "..RULE)
end
end
local cross_origin_list = {}
function process_cross_origin_rule(ix, url)
log.syslog(log.LOG_INFO, "[fbwifi] Cross origin rule "..url)
table.insert(cross_origin_list, url)
end
function process_url(url_purpose, fqdn)
log.syslog(log.LOG_INFO, "[fbwifi] Caching "..url_purpose)
state:set("fbwifi", "main", url_purpose, fqdn)
end
state:set("fbwifi", "main", "config")
result = os.execute("iptables -t mangle -F FBWIFI_TRAFFIC_ALLOWLIST ")
--print(result)
table.foreach(obj['config']['traffic_allowlist'], process_traffic_rule)
table.foreach(obj['config']['cross_origin_allowlist'], process_cross_origin_rule)
table.foreach(obj['config']['urls'], process_url)
state:set("fbwifi", "main", "cross_origin_allow_rules", cross_origin_list)
state:set("fbwifi", "main", "config_version", obj['config_version'])
state:save('fbwifi')
state:commit('fbwifi')

View File

@@ -1,75 +0,0 @@
#!/usr/bin/lua
https = require("ssl.https")
json = require("cjson")
log = require("posix.syslog")
fbwifi = require("fbwifi")
require("uci")
state = uci.cursor("/var/state", "/tmp/fbwifi")
GATEWAY_TOKEN = fbwifi.gateway_token()
request = {
tokens = {},
traffic_type = "total",
config_version = state:get("fbwifi", "main", "config_version")
}
function queue_token(client)
request.tokens[client.token]={
incoming = json.null,
outgoing = json.null,
connected_time_sec = json.null,
inactive_time_sec = json.null,
signal_rssi_dbm = json.null,
--expected_tpus_mbps = json.null,
is_connected = true
}
end
state:foreach("fbwifi", "client", queue_token)
print( "\nRequest:\n"..json.encode(request) )
URL="https://api.fbwifi.com/v2.0/tokens"
BODY=string.format(
"tokens=%s&traffic_type=%s&config_version=%s",
json.encode(request.tokens),
"total",
state:get("fbwifi", "main", "config_version")
)
body, code, headers = https.request(URL.."?access_token="..GATEWAY_TOKEN, BODY)
if code then
print( "\nResponse:\n"..body )
end
response = json.decode(body)
--print(response)
--table.foreach(response,print)
--table.foreach(response.tokens,print)
if response.config_valid then
log.syslog(log.LOG_INFO, "[fbwifi] Config validated")
else
log.syslog(log.LOG_WARNING, "[fbwifi] config is stale, refreshing config")
local result = os.execute("/usr/sbin/fbwifi reload")
if result == 0 then
log.syslog(log.LOG_INFO, "[fbwifi] successfully fetched and loaded new config ")
else
log.syslog(log.LOG_WARNING, "[fbwifi] failed to fetch and load new config, possible stale config")
end
end
function process_token(token, metadata)
table.foreach(metadata,print)
if metadata.valid then
print("OK: "..token)
else
print("Nok: "..token)
fbwifi.revoke_client_rule( token )
end
end
table.foreach(response.tokens,process_token)

View File

@@ -1,75 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (c) Facebook, Inc. and its affiliates.
IPT4="/usr/sbin/iptables"
set -- --wait 1 --wait-interval 100
fbwifi_http_port="$(uci get fbwifi.main.http_port)"
[ -n "$fbwifi_http_port" ] || {
logger -t fbwifi "required option http_port not set"
exit 1
}
fbwifi_https_port="$(uci get fbwifi.main.https_port)"
[ -n "$fbwifi_https_port" ] || {
logger -t fbwifi "required option https_port not set"
exit 1
}
fbwifi_zone="$(uci get fbwifi.main.zone)"
[ -n "$fbwifi_zone" ] || {
logger -t fbwifi "required option zone not set"
exit 1
}
fbwifi_ifaces="$(fw3 -q zone "$fbwifi_zone")"
## Create custom chains
"$IPT4" "$@" -t filter -N FBWIFI_FORWARD 2>/dev/null
"$IPT4" "$@" -t filter -N FBWIFI_INPUT 2>/dev/null
"$IPT4" "$@" -t mangle -N FBWIFI_CLIENT_TO_INTERNET 2>/dev/null
"$IPT4" "$@" -t mangle -N FBWIFI_PREROUTING 2>/dev/null
"$IPT4" "$@" -t mangle -N FBWIFI_TRAFFIC_ALLOWLIST 2>/dev/null
"$IPT4" "$@" -t nat -N FBWIFI_CLIENT_TO_INTERNET 2>/dev/null
"$IPT4" "$@" -t nat -N FBWIFI_PREROUTING 2>/dev/null
"$IPT4" "$@" -t nat -N FBWIFI_HOST_REDIRLIST 2>/dev/null
## Flush custom chains
"$IPT4" "$@" -t filter -F FBWIFI_FORWARD
"$IPT4" "$@" -t filter -F FBWIFI_INPUT
"$IPT4" "$@" -t mangle -F FBWIFI_CLIENT_TO_INTERNET
"$IPT4" "$@" -t mangle -F FBWIFI_PREROUTING
"$IPT4" "$@" -t mangle -F FBWIFI_TRAFFIC_ALLOWLIST
"$IPT4" "$@" -t nat -F FBWIFI_CLIENT_TO_INTERNET
"$IPT4" "$@" -t nat -F FBWIFI_PREROUTING
"$IPT4" "$@" -t nat -F FBWIFI_HOST_REDIRLIST
## Populate custom chains
"$IPT4" "$@" -t filter -A FBWIFI_FORWARD -p udp --dport 53 -m conntrack --ctstate NEW -j ACCEPT
"$IPT4" "$@" -t filter -A FBWIFI_FORWARD -m conntrack --ctstate NEW -m mark --mark 0xfb -j ACCEPT
"$IPT4" "$@" -t filter -A FBWIFI_FORWARD -j REJECT
"$IPT4" "$@" -t filter -A FBWIFI_INPUT -p tcp --dport "$fbwifi_http_port" -m conntrack --ctstate NEW -j ACCEPT
"$IPT4" "$@" -t filter -A FBWIFI_INPUT -p tcp --dport "$fbwifi_https_port" -m conntrack --ctstate NEW -j ACCEPT
"$IPT4" "$@" -t filter -A FBWIFI_INPUT -p tcp --dport 443 -m conntrack --ctstate NEW -j ACCEPT
"$IPT4" "$@" -t mangle -A FBWIFI_PREROUTING -j FBWIFI_CLIENT_TO_INTERNET
"$IPT4" "$@" -t mangle -A FBWIFI_PREROUTING -j FBWIFI_TRAFFIC_ALLOWLIST
"$IPT4" "$@" -t nat -A FBWIFI_PREROUTING -j FBWIFI_CLIENT_TO_INTERNET
"$IPT4" "$@" -t nat -A FBWIFI_CLIENT_TO_INTERNET -p tcp --dport 80 -m conntrack --ctstate NEW -j FBWIFI_HOST_REDIRLIST
"$IPT4" "$@" -t nat -A FBWIFI_CLIENT_TO_INTERNET -p tcp --dport 443 -m conntrack --ctstate NEW -j FBWIFI_HOST_REDIRLIST
"$IPT4" "$@" -t nat -A FBWIFI_CLIENT_TO_INTERNET -p udp --dport 443 -m conntrack --ctstate NEW -j FBWIFI_HOST_REDIRLIST
"$IPT4" "$@" -t nat -A FBWIFI_CLIENT_TO_INTERNET -p tcp --dport 80 -m conntrack --ctstate NEW -m mark --mark 0xfb -j ACCEPT
"$IPT4" "$@" -t nat -A FBWIFI_CLIENT_TO_INTERNET -p tcp --dport 443 -m conntrack --ctstate NEW -m mark --mark 0xfb -j ACCEPT
"$IPT4" "$@" -t nat -A FBWIFI_CLIENT_TO_INTERNET -p udp --dport 443 -m conntrack --ctstate NEW -m mark --mark 0xfb -j ACCEPT
"$IPT4" "$@" -t nat -A FBWIFI_CLIENT_TO_INTERNET -p tcp --dport 80 -m conntrack --ctstate NEW -j REDIRECT --to-ports "$fbwifi_http_port"
## Hook custom chains in firewall3 chains
"$IPT4" "$@" -t filter -I "zone_${fbwifi_zone}_input" 2 -j FBWIFI_INPUT
"$IPT4" "$@" -t filter -I "zone_${fbwifi_zone}_forward" 2 -j FBWIFI_FORWARD
"$IPT4" "$@" -t nat -I "zone_${fbwifi_zone}_prerouting" 2 -j FBWIFI_PREROUTING
# There are no firewall3 zone chains in the mangle table so we need to do this for all interfaces in the zone
for iface in $fbwifi_ifaces; do
"$IPT4" "$@" -t mangle -I PREROUTING -i "$iface" -j FBWIFI_PREROUTING
done

View File

@@ -1,8 +0,0 @@
{
"request": [
[ "if",
[ "regex", "REQUEST_URI", "^/fbwifi" ],
[ "rewrite", "/cgi-bin%REQUEST_URI%" ]
]
]
}

View File

@@ -1,70 +0,0 @@
#!/usr/bin/lua
require("uci")
log = require("posix.syslog")
fbwifi = require("fbwifi")
state = uci.cursor("/var/state", "/tmp/fbwifi")
function process_cors()
origin = os.getenv("HTTP_ORIGIN")
log.syslog(log.LOG_INFO, string.format("[fbwifi] [auth] process_cors origin %s", origin or 'not found') )
if string.len(origin or '') > 0 then
allow_list = state:get("fbwifi", "main", "cross_origin_allow_rules")
for _, value in pairs(allow_list) do
if value == origin then
log.syslog(log.LOG_INFO, "[fbwifi] [auth] process_cors Appending CORS Headers to HTTP")
print("Access-Control-Allow-Origin: "..origin)
print("Vary: Origin")
break
end
end
else
log.syslog(log.LOG_INFO, "[fbwifi] [auth] process_cors No CORS Headers added to Response")
end
end
method = os.getenv("REQUEST_METHOD")
if method == 'GET' then
log.syslog(log.LOG_INFO, "[fbwifi] [auth] GET handler")
print("Status: 302 Found")
print("Location: "..state:get("fbwifi", "main", "landing_page_url"))
process_cors()
print ('\n')
elseif method == 'POST' then
local token
log.syslog(log.LOG_INFO, "[fbwifi] [auth] POST handler")
process_cors()
print("Status: 200 OK")
form_data=io.read()
while form_data do
token = string.match(form_data, '[%d]+')
if string.len(token or '') > 14 then
client = os.getenv("REMOTE_ADDR")
f = io.popen("awk '/"..client..".*0x2/ { printf(\"%s\", $4) }' /proc/net/arp", 'r')
client_mac = assert(f:read('*a'))
f:close()
if fbwifi.validate_token(token) then
log.syslog(log.LOG_INFO, string.format( "[fbwifi] [auth] POST handler : Validating Token (%s) for MAC (%s)", token or 'nil', client_mac or 'nil') )
fbwifi.instate_client_rule(token, client_mac)
print("\n{\"valid\":true}\n")
else
log.syslog(log.LOG_WARNING, string.format( "[fbwifi] [auth] POST handler : ! Invalid token (%s) for mac (%s) !", token or 'nil', client_mac or 'nil') )
fbwifi.revoke_client_rule(token)
print("\n{\"valid\":false}\n")
end
log.syslog(log.LOG_INFO, "[fbwifi] [auth] POST handler completed")
return
end
form_data=io.read()
end
print ('\n')
log.syslog(log.LOG_WARNING, string.format("[fbwifi] [auth] POST handler : token not found" ))
fbwifi.revoke_client_rule(token)
print("\n{\"valid\":false}\n")
end

View File

@@ -1,42 +0,0 @@
#!/usr/bin/lua
json = require("cjson")
require("uci")
state = uci.cursor("/var/state", "/tmp/fbwifi")
client_mac = ""
token = ""
response = {}
response['venue-info-url'] = state:get("fbwifi", "main", "capport_venue_info_url")
function map_remote_mac_to_token(client)
for key, value in pairs(client) do
if
key == 'mac' and
value == client_mac
then
token = client.token
return false
end
end
end
function hasValidToken(client_ip)
f = io.popen("awk '/"..client_ip..".*0x2/ { printf(\"%s\", $4) }' /proc/net/arp", 'r')
client_mac = assert(f:read('*a'))
f:close()
state:foreach("fbwifi", "client", map_remote_mac_to_token)
return 0 < string.len(token)
end
print("Content-type: application/captive+json; charset=utf-8\n")
client = os.getenv("REMOTE_ADDR")
response['captive'] = not hasValidToken(client)
if response['captive'] then
response['user-portal-url'] = state:get("fbwifi", "main", "captive_portal_url")
end
print( json.encode(response) )

View File

@@ -1,57 +0,0 @@
#!/usr/bin/lua
json = require("cjson")
fbwifi = require("fbwifi")
state = uci.cursor("/var/state", "/tmp/fbwifi")
GATEWAY_TOKEN = fbwifi.gateway_token()
response = { api_version = "2.0", token = json.null }
client_mac = ""
function process_cors()
origin = os.getenv("HTTP_ORIGIN")
if string.len(origin or '') > 0 then
allow_list = state:get("fbwifi", "main", "cross_origin_allow_rules")
for _, value in pairs(allow_list) do
if value == origin then
print("Access-Control-Allow-Origin: "..origin)
print("Vary: Origin")
break
end
end
end
end
function map_remote_mac_to_token(client)
for key, value in pairs(client) do
if
key == 'mac' and
value == client_mac
then
response.token = client.token
return false -- escape outer loop
end
end
end
function getClientToken(client_ip)
f = io.popen("awk '/"..client_ip..".*0x2/ { printf(\"%s\", $4) }' /proc/net/arp", 'r')
client_mac = assert(f:read('*a'))
f:close()
state:foreach("fbwifi", "client", map_remote_mac_to_token)
end
function getGatewayId()
id = string.match(GATEWAY_TOKEN, 'FBWIFI:GATEWAY|[0-9]*|([0-9]*)')
return id
end
process_cors()
print("Content-type: application/json; charset=utf-8\n")
getClientToken(os.getenv("REMOTE_ADDR"))
response.gateway_id = getGatewayId()
print( json.encode(response) )

View File

@@ -1,12 +0,0 @@
-- SPDX-License-Identifier: GPL-2.0-only
-- Copyright (c) Facebook, Inc. and its affiliates.
module("luci.controller.fbwifi", package.seeall)
sys = require "luci.sys"
ut = require "luci.util"
function index()
entry({"admin", "network", "fbwifi"}, template("fbwifi"), "Facebook Wi-Fi", 90).dependent=false
end

View File

@@ -1,16 +0,0 @@
<%#
Copyright
Licensed to the public under the GNU General Public License v2.
-%>
<%+header%>
<h1>Facebook Wi-Fi</h1>
<%
require("uci")
state = uci.cursor("/var/state", "/tmp/fbwifi")
url = state:get("fbwifi", "main", "captive_portal_config_url")
%>
<a href="<% print(url) %>">Configure FB business page</a>
<%+footer%>

View File

@@ -1,42 +0,0 @@
#
# Copyright (C) 2016 LEDE
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=sched-cake
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/dtaht/sch_cake.git
PKG_SOURCE_DATE:=2021-07-09
PKG_SOURCE_VERSION:=d9e1398cc9091e9e7c7a740361e4617b75c24427
#PKG_MIRROR_HASH:=5bf06a804824db36ae393fc174aeec7b12633176e05a765c0931b39df5bd34df
PKG_MAINTAINER:=Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
include $(INCLUDE_DIR)/package.mk
define KernelPackage/sched-cake
SUBMENU:=Network Support
TITLE:=Cake fq_codel/blue derived shaper
URL:=https://github.com/dtaht/sch_cake
FILES:=$(PKG_BUILD_DIR)/sch_cake.ko
AUTOLOAD:=$(call AutoLoad,75,sch_cake)
DEPENDS:=+kmod-ipt-conntrack
endef
include $(INCLUDE_DIR)/kernel-defaults.mk
define KernelPackage/sched-cake/description
Common Applications Kept Enhanced fq_codel/blue derived shaper
endef
define Build/Compile
$(KERNEL_MAKE) SUBDIRS="$(PKG_BUILD_DIR)" modules
endef
$(eval $(call KernelPackage,sched-cake))

View File

@@ -1,20 +0,0 @@
Index: sched-cake-2021-07-09-d9e1398c/cobalt_compat.h
===================================================================
--- sched-cake-2021-07-09-d9e1398c.orig/cobalt_compat.h
+++ sched-cake-2021-07-09-d9e1398c/cobalt_compat.h
@@ -95,15 +95,6 @@ static inline unsigned int __tcp_hdrlen(
}
#endif
-#if KERNEL_VERSION(4, 6, 0) > LINUX_VERSION_CODE
-static inline int skb_try_make_writable(struct sk_buff *skb,
- unsigned int write_len)
-{
- return skb_cloned(skb) && !skb_clone_writable(skb, write_len) &&
- pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
-}
-#endif
-
#if KERNEL_VERSION(4, 11, 0) > LINUX_VERSION_CODE
static inline int skb_mac_offset(const struct sk_buff *skb)
{

View File

@@ -1,67 +0,0 @@
#
# Copyright (C) 2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libprotobuf-c
PKG_VERSION:=1.3.1
PKG_RELEASE:=2
PKG_SOURCE:=protobuf-c-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/protobuf-c/protobuf-c/releases/download/v$(PKG_VERSION)
PKG_HASH:=51472d3a191d6d7b425e32b612e477c06f73fe23e07f6a6a839b11808e9d2267
PKG_BUILD_DIR:=$(BUILD_DIR)/protobuf-c-$(PKG_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/protobuf-c-$(PKG_VERSION)
PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
PKG_LICENSE:=BSD-2c
PKG_BUILD_DEPENDS:=protobuf-c/host
HOST_BUILD_DEPENDS:=protobuf/host
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
define Package/libprotobuf-c
TITLE:=Protocol Buffers library
SECTION:=libs
CATEGORY:=Libraries
URL:=https://github.com/protobuf-c/protobuf-c
endef
define Package/libprotobuf-c/description
Runtime library to use Google Protocol Buffers from C applications.
Protocol Buffers are a way of encoding structured data in an efficient yet
extensible format. Google uses Protocol Buffers for almost all of its
internal RPC protocols and file formats.
endef
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
--disable-protoc
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.{a,la,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
endef
define Package/libprotobuf-c/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libprotobuf-c))
$(eval $(call HostBuild))

View File

@@ -1,13 +0,0 @@
Index: protobuf-c-1.3.1/t/generated-code2/cxx-generate-packed-data.cc
===================================================================
--- protobuf-c-1.3.1.orig/t/generated-code2/cxx-generate-packed-data.cc
+++ protobuf-c-1.3.1/t/generated-code2/cxx-generate-packed-data.cc
@@ -998,7 +998,7 @@ static void dump_test_packed_repeated_en
static void dump_test_unknown_fields (void)
{
EmptyMess mess;
- const google::protobuf::Message::Reflection *reflection = mess.GetReflection();
+ const google::protobuf::Reflection *reflection = mess.GetReflection();
google::protobuf::UnknownFieldSet *fs = reflection->MutableUnknownFields(&mess);
#if GOOGLE_PROTOBUF_VERSION >= 2001000

View File

@@ -1,110 +0,0 @@
#
# Copyright (C) 2007-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=protobuf
PKG_VERSION:=3.7.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
PKG_HASH:=97f6cdaa0724d5a8cd3375d5f5cf4bd253d5ad5291154f533ed0d94a9d501ef3
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_CPE_ID:=cpe:/a:google:protobuf
PKG_BUILD_DEPENDS:=protobuf/host
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
define Package/protobuf/Default
SECTION:=libs
CATEGORY:=Libraries
TITLE:=A structured data encoding library
URL:=https://github.com/google/protobuf
DEPENDS:=+zlib +libpthread +libatomic +libstdcpp
MAINTAINER:=Ken Keys <kkeys@caida.org>
endef
define Package/protobuf
$(call Package/protobuf/Default)
DEPENDS+=+protobuf-lite
endef
define Package/protobuf-lite
$(call Package/protobuf/Default)
endef
define Package/protobuf/description/Default
Protocol Buffers are a way of encoding structured data in an efficient
yet extensible format. Google uses Protocol Buffers for almost all
of its internal RPC protocols and file formats.
endef
define Package/protobuf/description
$(call Package/protobuf/description/Default)
This package provides the libprotoc, libprotobuf, and libprotobuf-lite
libraries. For a much smaller protobuf package, see "protobuf-lite".
endef
define Package/protobuf-lite/description
$(call Package/protobuf/description/Default)
This package provides the libprotobuf-lite library.
endef
EXTRA_CPPFLAGS+=-std=c++11
CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOSTPKG)/bin/protoc
define Build/InstallDev
$(INSTALL_DIR) \
$(1)/usr/lib \
$(1)/usr/include
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/* \
$(1)/usr/include/
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/* \
$(1)/usr/lib/
endef
define Package/protobuf-lite/install
$(INSTALL_DIR) \
$(1)/usr/lib
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/libprotobuf-lite.so* \
$(1)/usr/lib/
endef
define Package/protobuf/install
$(INSTALL_DIR) \
$(1)/usr/lib
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/libprotoc.so* \
$(1)/usr/lib/
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/libprotobuf.so* \
$(1)/usr/lib/
endef
$(eval $(call BuildPackage,protobuf))
$(eval $(call BuildPackage,protobuf-lite))
$(eval $(call HostBuild))

View File

@@ -1,634 +0,0 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=qca-nss-clients
PKG_SOURCE_PROTO:=git
PKG_BRANCH:=master
PKG_RELEASE:=2
PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-clients/
PKG_VERSION:=153998d70fdba508a59a28c13a606032cbf32686
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_VERSION)
#PKG_BUILD_DEPENDS := PACKAGE_kmod-qca-nss-crypto:kmod-qca-nss-crypto
MAKE_OPTS:=
include $(INCLUDE_DIR)/package.mk
# Keep default as ipq806x for branches that does not have subtarget framework
subtarget:=$(SUBTARGET)
# DTLS Manager v2.0 for Hawkeye/Cypress
DTLSMGR_DIR:=v2.0
# IPsec Manager v2.0 for Hawkeye/Cypress
IPSECMGR_DIR:=v2.0
define KernelPackage/qca-nss-drv-tun6rd
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
TITLE:=Kernel driver for NSS (connection manager) - tun6rd
DEPENDS:=+kmod-qca-nss-drv +kmod-sit @!LINUX_3_18
FILES:=$(PKG_BUILD_DIR)/qca-nss-tun6rd.ko
AUTOLOAD:=$(call AutoLoad,60,qca-nss-tun6rd)
endef
define KernelPackage/qca-nss-drv-tun6rd/Description
Kernel modules for NSS connection manager - Support for 6rd tunnel
endef
define KernelPackage/qca-nss-drv-dtlsmgr
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
TITLE:=Kernel driver for NSS (connection manager) - dtlsmgr
DEPENDS:=+kmod-qca-nss-drv +kmod-qca-nss-cfi-cryptoapi @!LINUX_3_18
FILES:=$(PKG_BUILD_DIR)/dtls/$(DTLSMGR_DIR)/qca-nss-dtlsmgr.ko
endef
define KernelPackage/qca-nss-drv-dtls/Description
Kernel modules for NSS connection manager - Support for DTLS sessions
endef
define KernelPackage/qca-nss-drv-tlsmgr
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
TITLE:=Kernel driver for NSS (connection manager) - tlsmgr
DEPENDS:=@TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_ipq807x||TARGET_ipq807x||TARGET_ipq807x_ipq807x||TARGET_ipq_ipq60xx||TARGET_ipq807x_ipq60xx +kmod-qca-nss-drv +kmod-qca-nss-cfi @!LINUX_3_18
FILES:=$(PKG_BUILD_DIR)/tls/qca-nss-tlsmgr.ko
endef
define KernelPackage/qca-nss-drv-tls/Description
Kernel modules for NSS connection manager - Support for TLS sessions
endef
define KernelPackage/qca-nss-drv-l2tpv2
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
TITLE:=Kernel driver for NSS (connection manager) - l2tp
DEPENDS:=+kmod-qca-nss-drv +kmod-ppp +kmod-l2tp @!LINUX_3_18
FILES:=$(PKG_BUILD_DIR)/l2tp/l2tpv2/qca-nss-l2tpv2.ko
AUTOLOAD:=$(call AutoLoad,51,qca-nss-l2tpv2)
endef
define KernelPackage/qca-nss-drv-l2tp/Description
Kernel modules for NSS connection manager - Support for l2tp tunnel
endef
define KernelPackage/qca-nss-drv-pptp
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
TITLE:=Kernel driver for NSS (connection manager) - PPTP
DEPENDS:=+kmod-qca-nss-drv +kmod-pptp @!LINUX_3_18
FILES:=$(PKG_BUILD_DIR)/pptp/qca-nss-pptp.ko
AUTOLOAD:=$(call AutoLoad,51,qca-nss-pptp)
endef
define KernelPackage/qca-nss-drv-pptp/Description
Kernel modules for NSS connection manager - Support for PPTP tunnel
endef
define KernelPackage/qca-nss-drv-pppoe
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
TITLE:=Kernel driver for NSS (connection manager) - PPPoE
DEPENDS:=+kmod-qca-nss-drv +kmod-pppoe @!LINUX_3_18 \
+!(TARGET_ipq_ipq807x_QSDK_256||TARGET_ipq_ipq60xx_QSDK_256):kmod-bonding
FILES:=$(PKG_BUILD_DIR)/pppoe/qca-nss-pppoe.ko
AUTOLOAD:=$(call AutoLoad,51,qca-nss-pppoe)
endef
define KernelPackage/qca-nss-drv-pppoe/Description
Kernel modules for NSS connection manager - Support for PPPoE
endef
define KernelPackage/qca-nss-drv-map-t
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
TITLE:=Kernel driver for NSS (connection manager) - MAP-T
DEPENDS:=+kmod-qca-nss-drv +kmod-nat46 @!LINUX_3_18
FILES:=$(PKG_BUILD_DIR)/map/map-t/qca-nss-map-t.ko
AUTOLOAD:=$(call AutoLoad,51,qca-nss-map-t)
endef
define KernelPackage/qca-nss-drv-map-t/Description
Kernel modules for NSS connection manager - Support for MAP-T
endef
define KernelPackage/qca-nss-drv-gre
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
TITLE:=Kernel driver for NSS (connection manager) - GRE
DEPENDS:=@TARGET_ipq_ipq806x||TARGET_ipq806x||TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_ipq807x||TARGET_ipq807x||TARGET_ipq807x_ipq807x||TARGET_ipq_ipq60xx||TARGET_ipq807x_ipq60xx||TARGET_ipq_ipq50xx||TARGET_ipq_ipq50xx_64 \
+kmod-qca-nss-drv @!LINUX_3_18 +kmod-gre6
FILES:=$(PKG_BUILD_DIR)/gre/qca-nss-gre.ko $(PKG_BUILD_DIR)/gre/test/qca-nss-gre-test.ko
AUTOLOAD:=$(call AutoLoad,51,qca-nss-gre)
endef
define KernelPackage/qca-nss-drv-gre/Description
Kernel modules for NSS connection manager - Support for GRE
endef
define KernelPackage/qca-nss-drv-tunipip6
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
TITLE:=Kernel driver for NSS (connection manager) - DS-lite and ipip6 Tunnel
DEPENDS:=+kmod-qca-nss-drv +kmod-iptunnel6 +kmod-ip6-tunnel @!LINUX_3_18
FILES:=$(PKG_BUILD_DIR)/tunipip6/qca-nss-tunipip6.ko
AUTOLOAD:=$(call AutoLoad,60,qca-nss-tunipip6)
endef
define KernelPackage/qca-nss-drv-tunipip6/Description
Kernel modules for NSS connection manager
Add support for DS-lite and ipip6 tunnel
endef
define KernelPackage/qca-nss-drv-profile
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
DEPENDS:=+kmod-qca-nss-drv @!LINUX_3_18
TITLE:=Profiler for QCA NSS driver (IPQ806x)
FILES:=$(PKG_BUILD_DIR)/profiler/qca-nss-profile-drv.ko
endef
define KernelPackage/qca-nss-drv-profile/Description
This package contains a NSS driver profiler for QCA chipset
endef
define KernelPackage/qca-nss-drv-ipsecmgr
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
TITLE:=Kernel driver for NSS (ipsec manager) - ipsecmgr
DEPENDS:=@TARGET_ipq806x||TARGET_ipq_ipq806x||TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_ipq807x||TARGET_ipq807x||TARGET_ipq807x_ipq807x||TARGET_ipq_ipq60xx||TARGET_ipq807x_ipq60xx \
+kmod-qca-nss-drv +kmod-qca-nss-cfi-cryptoapi +kmod-qca-nss-cfi-ocf @!LINUX_3_18
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-l2tpv2),)
DEPENDS:=+kmod-qca-nss-drv-l2tpv2
endif
FILES:=$(PKG_BUILD_DIR)/ipsecmgr/$(IPSECMGR_DIR)/qca-nss-ipsecmgr.ko
AUTOLOAD:=$(call AutoLoad,60,qca-nss-ipsecmgr)
endef
define KernelPackage/qca-nss-drv-ipsecmgr/Description
Kernel module for NSS IPsec offload manager
endef
define KernelPackage/qca-nss-drv-ipsecmgr-klips
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
TITLE:=Kernel driver for NSS (ipsec klips)
DEPENDS:=@TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_ipq807x||TARGET_ipq807x||TARGET_ipq_ipq60xx||TARGET_ipq807x_ipq60xx \
+kmod-qca-nss-drv-ipsecmgr kmod-qca-nss-ecm
FILES:=$(PKG_BUILD_DIR)/ipsecmgr/$(IPSECMGR_DIR)/plugins/klips/qca-nss-ipsec-klips.ko
endef
define KernelPackage/qca-nss-drv-ipsecmgr-klips/Description
NSS Kernel module for IPsec klips offload
endef
define KernelPackage/qca-nss-drv-capwapmgr
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
DEPENDS:=+kmod-qca-nss-drv +kmod-qca-nss-drv-dtlsmgr @!LINUX_3_18
TITLE:=NSS CAPWAP Manager for QCA NSS driver (IPQ806x)
FILES:=$(PKG_BUILD_DIR)/capwapmgr/qca-nss-capwapmgr.ko
endef
define KernelPackage/qca-nss-drv-capwapmgr/Description
This package contains a NSS CAPWAP Manager
endef
define KernelPackage/qca-nss-drv-bridge-mgr
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
TITLE:=Kernel driver for NSS bridge manager
DEPENDS:=@TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_ipq807x||TARGET_ipq807x||TARGET_ipq807x_ipq807x||TARGET_ipq_ipq60xx||TARGET_ipq807x_ipq60xx \
+TARGET_ipq_ipq807x:kmod-qca-nss-drv-vlan-mgr \
+TARGET_ipq_ipq807x_ipq807x:kmod-qca-nss-drv-vlan-mgr \
+TARGET_ipq807x:kmod-qca-nss-drv-vlan-mgr \
+TARGET_ipq807x_ipq807x:kmod-qca-nss-drv-vlan-mgr \
+TARGET_ipq_ipq60xx:kmod-qca-nss-drv-vlan-mgr \
+TARGET_ipq807x_ipq60xx:kmod-qca-nss-drv-vlan-mgr @!LINUX_3_18 \
+!(TARGET_ipq_ipq807x_QSDK_256||TARGET_ipq_ipq60xx_QSDK_256):kmod-bonding
FILES:=$(PKG_BUILD_DIR)/bridge/qca-nss-bridge-mgr.ko
AUTOLOAD:=$(call AutoLoad,51,qca-nss-bridge-mgr)
endef
define KernelPackage/qca-nss-drv-bridge-mgr/Description
Kernel modules for NSS bridge manager
endef
define KernelPackage/qca-nss-drv-vlan-mgr
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
TITLE:=Kernel driver for NSS vlan manager
DEPENDS:=@TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_ipq807x||TARGET_ipq807x||TARGET_ipq807x_ipq807x||TARGET_ipq_ipq60xx||TARGET_ipq807x_ipq60xx +kmod-qca-nss-drv @!LINUX_3_18 \
+!(TARGET_ipq_ipq807x_QSDK_256||TARGET_ipq_ipq60xx_QSDK_256):kmod-bonding
FILES:=$(PKG_BUILD_DIR)/vlan/qca-nss-vlan.ko
AUTOLOAD:=$(call AutoLoad,51,qca-nss-vlan)
endef
define KernelPackage/qca-nss-drv-vlan-mgr/Description
Kernel modules for NSS vlan manager
endef
define KernelPackage/qca-nss-drv-qdisc
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Support
TITLE:=Qdisc for configuring shapers in NSS
DEPENDS:=+kmod-qca-nss-drv @!LINUX_3_18
FILES:=$(PKG_BUILD_DIR)/nss_qdisc/qca-nss-qdisc.ko
AUTOLOAD:=$(call AutoLoad,58,qca-nss-qdisc)
endef
define KernelPackage/qca-nss-drv-qdisc/Description
Linux qdisc that aids in configuring shapers in the NSS
endef
define KernelPackage/qca-nss-drv-igs
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Support
TITLE:=Action for offloading traffic to an IFB interface to perform ingress shaping.
DEPENDS:=@TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_ipq807x||TARGET_ipq_ipq60xx||TARGET_ipq807x_ipq60xx||TARGET_ipq_ipq50xx||TARGET_ipq_ipq50xx_64 \
+kmod-qca-nss-drv +kmod-sched-core +kmod-ifb +kmod-qca-nss-drv-qdisc @!LINUX_3_18
FILES:=$(PKG_BUILD_DIR)/nss_qdisc/igs/act_nssmirred.ko
endef
define KernelPackage/qca-nss-drv-igs/Description
Linux action that helps in offloading traffic to an IFB interface to perform ingress shaping.
endef
define KernelPackage/qca-nss-drv-lag-mgr
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
TITLE:=Kernel driver for NSS LAG manager
DEPENDS:=+kmod-qca-nss-drv @!LINUX_3_18 \
+TARGET_ipq_ipq807x:kmod-qca-nss-drv-vlan-mgr \
+TARGET_ipq_ipq807x_ipq807x:kmod-qca-nss-drv-vlan-mgr @!LINUX_3_18 \
+TARGET_ipq807x:kmod-qca-nss-drv-vlan-mgr \
+TARGET_ipq807x_ipq807x:kmod-qca-nss-drv-vlan-mgr @!LINUX_3_18 \
+TARGET_ipq_ipq60xx:kmod-qca-nss-drv-vlan-mgr @!LINUX_3_18 \
+TARGET_ipq807x_ipq60xx:kmod-qca-nss-drv-vlan-mgr @!LINUX_3_18 \
+kmod-bonding
FILES:=$(PKG_BUILD_DIR)/lag/qca-nss-lag-mgr.ko
AUTOLOAD:=$(call AutoLoad,51,qca-nss-lag-mgr)
endef
define KernelPackage/qca-nss-drv-lag-mgr/Description
Kernel modules for NSS LAG manager
endef
define KernelPackage/qca-nss-drv-netlink
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
DEPENDS:=@TARGET_ipq807x||TARGET_ipq_ipq807x||TARGET_ipq807x_ipq807x||TARGET_ipq_ipq807x_ipq807x||TARGET_ipq_ipq60xx||TARGET_ipq807x_ipq60xx||TARGET_ipq_ipq50xx||TARGET_ipq_ipq50xx_64 \
+kmod-qca-nss-drv @!LINUX_3_18 \
+PACKAGE_kmod-qca-nss-drv-ipsecmgr:kmod-qca-nss-drv-ipsecmgr \
+PACKAGE_kmod-qca-nss-drv-dtlsmgr:kmod-qca-nss-drv-dtlsmgr \
+PACKAGE_kmod-qca-nss-drv-capwapmgr:kmod-qca-nss-drv-capwapmgr @!LINUX_3_18
TITLE:=NSS NETLINK Manager for QCA NSS driver
FILES:=$(PKG_BUILD_DIR)/netlink/qca-nss-netlink.ko
endef
define KernelPackage/qca-nss-drv-netlink/Description
Kernel module for NSS netlink manager
endef
define KernelPackage/qca-nss-drv-ovpn-mgr
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
TITLE:=Kernel driver for NSS OpenVPN manager
DEPENDS:=+kmod-qca-nss-drv +kmod-qca-nss-cfi +kmod-tun +kmod-ipt-conntrack @!LINUX_3_18 \
@TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_ipq807x||TARGET_ipq_ipq60xx||TARGET_ipq807x_ipq60xx
FILES:=$(PKG_BUILD_DIR)/openvpn/src/qca-nss-ovpn-mgr.ko
endef
define KernelPackage/qca-nss-drv-ovpn-mgr/Description
Kernel module for NSS OpenVPN manager
endef
define KernelPackage/qca-nss-drv-ovpn-link
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
TITLE:=Kernel driver for interfacing NSS OpenVPN manager with ECM
DEPENDS:=+kmod-qca-nss-drv-ovpn-mgr +kmod-qca-nss-ecm-premium @!LINUX_3_18 \
@TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_ipq807x||TARGET_ipq_ipq60xx||TARGET_ipq807x_ipq60xx
FILES:=$(PKG_BUILD_DIR)/openvpn/plugins/qca-nss-ovpn-link.ko
endef
define KernelPackage/qca-nss-drv-ovpn-link/Description
This module registers with ECM and communicates with NSS OpenVPN manager for supporting OpenVPN offload.
endef
define KernelPackage/qca-nss-drv-pvxlanmgr
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
DEPENDS:=+kmod-qca-nss-drv @!LINUX_3_18
TITLE:=NSS PVXLAN Manager for QCA NSS driver
FILES:=$(PKG_BUILD_DIR)/pvxlanmgr/qca-nss-pvxlanmgr.ko
endef
define KernelPackage/qca-nss-drv-pvxlanmgr/Description
Kernel module for managing NSS PVxLAN
endef
define KernelPackage/qca-nss-drv-eogremgr
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
DEPENDS:=+kmod-qca-nss-drv +kmod-qca-nss-drv-gre @!LINUX_3_18
TITLE:=NSS EOGRE Manager for QCA NSS driver
FILES:=$(PKG_BUILD_DIR)/eogremgr/qca-nss-eogremgr.ko
endef
define KernelPackage/qca-nss-drv-eogremgr/Description
Kernel module for managing NSS EoGRE
endef
define KernelPackage/qca-nss-drv-clmapmgr
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
DEPENDS:=+kmod-qca-nss-drv +kmod-qca-nss-drv-eogremgr @!LINUX_3_18
TITLE:=NSS clmap Manager for QCA NSS driver
FILES:=$(PKG_BUILD_DIR)/clmapmgr/qca-nss-clmapmgr.ko
endef
define KernelPackage/qca-nss-drv-clmapmgr/Description
Kernel module for managing NSS clmap
endef
define KernelPackage/qca-nss-drv-vxlanmgr
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
DEPENDS:=+kmod-qca-nss-drv +kmod-vxlan @!LINUX_3_18
TITLE:=NSS VxLAN Manager for QCA NSS driver
FILES:=$(PKG_BUILD_DIR)/vxlanmgr/qca-nss-vxlanmgr.ko
AUTOLOAD:=$(call AutoLoad,51,qca-nss-vxlanmgr)
endef
define KernelPackage/qca-nss-drv-vxlanmgr/Description
Kernel module for managing NSS VxLAN
endef
define KernelPackage/qca-nss-drv-match
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
DEPENDS:=+kmod-qca-nss-drv @!LINUX_3_18
TITLE:=NSS Match for QCA NSS driver
FILES:=$(PKG_BUILD_DIR)/match/qca-nss-match.ko
endef
define KernelPackage/qca-nss-drv-match/Description
Kernel module for managing NSS Match
endef
define KernelPackage/qca-nss-drv-mirror
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Support
TITLE:=Module for mirroring packets from NSS to host.
DEPENDS:=+kmod-qca-nss-drv @!LINUX_3_18
FILES:=$(PKG_BUILD_DIR)/mirror/qca-nss-mirror.ko
endef
define KernelPackage/qca-nss-drv-mirror/Description
Kernel module for managing NSS Mirror
endef
define Build/InstallDev/qca-nss-clients
$(INSTALL_DIR) $(1)/usr/include/qca-nss-clients
$(CP) $(PKG_BUILD_DIR)/netlink/include/* $(1)/usr/include/qca-nss-clients/
$(CP) $(PKG_BUILD_DIR)/exports/* $(1)/usr/include/qca-nss-clients/
endef
define KernelPackage/qca-nss-drv-wifi-meshmgr
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
DEPENDS:=+kmod-qca-nss-drv @!LINUX_3_18
TITLE:=NSS WiFi-Mesh Manager for QCA NSS driver
FILES:=$(PKG_BUILD_DIR)/wifi_meshmgr/qca-nss-wifi-meshmgr.ko
AUTOLOAD:=$(call AutoLoad,51,qca-nss-wifi-meshmgr)
endef
define KernelPackage/qca-nss-drv-wifi-meshmgr/Description
Kernel module for WiFi Mesh manager
endef
define Build/InstallDev
$(call Build/InstallDev/qca-nss-clients,$(1))
endef
define KernelPackage/qca-nss-drv-ovpn-mgr/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/qca-nss-ovpn.init $(1)/etc/init.d/qca-nss-ovpn
endef
define KernelPackage/qca-nss-drv-ipsecmgr-klips/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/qca-nss-ipsec $(1)/etc/init.d/qca-nss-ipsec
endef
define KernelPackage/qca-nss-drv-igs/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/qca-nss-mirred.init $(1)/etc/init.d/qca-nss-mirred
endef
EXTRA_CFLAGS+= \
-I$(STAGING_DIR)/usr/include/qca-nss-drv \
-I$(STAGING_DIR)/usr/include/qca-nss-crypto \
-I$(STAGING_DIR)/usr/include/qca-nss-cfi \
-I$(STAGING_DIR)/usr/include/qca-nss-gmac \
-I$(STAGING_DIR)/usr/include/qca-ssdk \
-I$(STAGING_DIR)/usr/include/qca-ssdk/fal \
-I$(STAGING_DIR)/usr/include/nat46
# Build individual packages if selected
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-profile),)
MAKE_OPTS+=profile=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-capwapmgr),)
MAKE_OPTS+=capwapmgr=y
EXTRA_CFLAGS += -DNSS_CAPWAPMGR_ONE_NETDEV
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-tun6rd),)
MAKE_OPTS+=tun6rd=m
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-dtlsmgr),)
MAKE_OPTS+=dtlsmgr=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-tlsmgr),)
MAKE_OPTS+=tlsmgr=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-l2tpv2),)
MAKE_OPTS+=l2tpv2=y
EXTRA_CFLAGS += -DNSS_L2TPV2_ENABLED
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-pptp),)
MAKE_OPTS+=pptp=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-map-t),)
MAKE_OPTS+=map-t=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-tunipip6),)
MAKE_OPTS+=tunipip6=m
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-qdisc),)
MAKE_OPTS+=qdisc=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-igs),)
MAKE_OPTS+=igs=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-ipsecmgr),)
EXTRA_CFLAGS+= -I$(PKG_BUILD_DIR)/exports
MAKE_OPTS+=ipsecmgr=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-ipsecmgr-klips),)
EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/qca-nss-ecm
MAKE_OPTS+=ipsecmgr-klips=m
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-bridge-mgr),)
MAKE_OPTS+=bridge-mgr=y
#enable OVS bridge if ovsmgr is enabled
ifneq ($(CONFIG_PACKAGE_kmod-qca-ovsmgr),)
MAKE_OPTS+= NSS_BRIDGE_MGR_OVS_ENABLE=y
EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/qca-ovsmgr
endif
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-vlan-mgr),)
MAKE_OPTS+=vlan-mgr=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-lag-mgr),)
MAKE_OPTS+=lag-mgr=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-gre),)
EXTRA_CFLAGS+= -I$(PKG_BUILD_DIR)/exports
MAKE_OPTS+=gre=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-pppoe),)
MAKE_OPTS+=pppoe=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-netlink),)
MAKE_OPTS+=netlink=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-ovpn-mgr),)
MAKE_OPTS+=ovpn-mgr=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-ovpn-link),)
MAKE_OPTS+=ovpn-link=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-pvxlanmgr),)
MAKE_OPTS+=pvxlanmgr=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-eogremgr),)
MAKE_OPTS+=eogremgr=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-clmapmgr),)
MAKE_OPTS+=clmapmgr=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-vxlanmgr),)
MAKE_OPTS+=vxlanmgr=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-match),)
MAKE_OPTS+=match=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-mirror),)
MAKE_OPTS+=mirror=y
endif
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-wifi-meshmgr),)
MAKE_OPTS+=wifi-meshmgr=y
endif
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" $(strip $(MAKE_OPTS)) \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCH="$(LINUX_KARCH)" \
M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
SoC="$(subtarget)" \
DTLSMGR_DIR="$(DTLSMGR_DIR)" \
IPSECMGR_DIR="$(IPSECMGR_DIR)" \
modules
endef
$(eval $(call KernelPackage,qca-nss-drv-profile))
#$(eval $(call KernelPackage,qca-nss-drv-capwapmgr))
$(eval $(call KernelPackage,qca-nss-drv-tun6rd))
#$(eval $(call KernelPackage,qca-nss-drv-dtlsmgr))
$(eval $(call KernelPackage,qca-nss-drv-l2tpv2))
$(eval $(call KernelPackage,qca-nss-drv-pptp))
$(eval $(call KernelPackage,qca-nss-drv-pppoe))
$(eval $(call KernelPackage,qca-nss-drv-map-t))
$(eval $(call KernelPackage,qca-nss-drv-tunipip6))
$(eval $(call KernelPackage,qca-nss-drv-qdisc))
$(eval $(call KernelPackage,qca-nss-drv-igs))
#$(eval $(call KernelPackage,qca-nss-drv-netlink))
#$(eval $(call KernelPackage,qca-nss-drv-ipsecmgr))
#$(eval $(call KernelPackage,qca-nss-drv-ipsecmgr-klips))
$(eval $(call KernelPackage,qca-nss-drv-bridge-mgr))
$(eval $(call KernelPackage,qca-nss-drv-vlan-mgr))
$(eval $(call KernelPackage,qca-nss-drv-lag-mgr))
$(eval $(call KernelPackage,qca-nss-drv-gre))
#$(eval $(call KernelPackage,qca-nss-drv-ovpn-mgr))
#$(eval $(call KernelPackage,qca-nss-drv-ovpn-link))
$(eval $(call KernelPackage,qca-nss-drv-pvxlanmgr))
$(eval $(call KernelPackage,qca-nss-drv-eogremgr))
$(eval $(call KernelPackage,qca-nss-drv-clmapmgr))
$(eval $(call KernelPackage,qca-nss-drv-vxlanmgr))
$(eval $(call KernelPackage,qca-nss-drv-match))
#$(eval $(call KernelPackage,qca-nss-drv-tlsmgr))
$(eval $(call KernelPackage,qca-nss-drv-mirror))
$(eval $(call KernelPackage,qca-nss-drv-wifi-meshmgr))

View File

@@ -1,92 +0,0 @@
#!/bin/sh /etc/rc.common
#
# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
NSS_IPSEC_LOG_FILE=/tmp/.nss_ipsec_log
NSS_IPSEC_LOG_STR_ECM="ECM_Loaded"
ecm_load () {
if [ ! -d /sys/module/ecm ]; then
/etc/init.d/qca-nss-ecm start
if [ -d /sys/module/ecm ]; then
echo ${NSS_IPSEC_LOG_STR_ECM} >> ${NSS_IPSEC_LOG_FILE}
fi
fi
}
ecm_unload () {
if [ -f /tmp/.nss_ipsec_log ]; then
str=`grep ${NSS_IPSEC_LOG_STR_ECM} ${NSS_IPSEC_LOG_FILE}`
if [[ $str == ${NSS_IPSEC_LOG_STR_ECM} ]]; then
/etc/init.d/qca-nss-ecm stop
`sed 's/${NSS_IPSEC_LOG_STR_ECM}/ /g' $NSS_IPSEC_LOG_FILE > $NSS_IPSEC_LOG_FILE`
fi
fi
}
ecm_disable() {
if [ ! -d /sys/module/ecm ]; then
return;
fi
echo 1 > /sys/kernel/debug/ecm/front_end_ipv4_stop
echo 1 > /sys/kernel/debug/ecm/front_end_ipv6_stop
echo 1 > /sys/kernel/debug/ecm/ecm_db/defunct_all
sleep 2
}
ecm_enable() {
if [ ! -d /sys/module/ecm ]; then
return;
fi
echo 0 > /sys/kernel/debug/ecm/ecm_db/defunct_all
echo 0 > /sys/kernel/debug/ecm/front_end_ipv4_stop
echo 0 > /sys/kernel/debug/ecm/front_end_ipv6_stop
}
start() {
ecm_load
local kernel_version=$(uname -r)
insmod /lib/modules/${kernel_version}/qca-nss-ipsec-klips.ko
if [ "$?" -gt 0 ]; then
echo "Failed to load plugin. Please start ecm if not done already"
ecm_enable
return
fi
/etc/init.d/ipsec start
sleep 2
ipsec eroute
ecm_enable
}
stop() {
ecm_disable
/etc/init.d/ipsec stop
rmmod qca-nss-ipsec-klips
ecm_unload
}
restart() {
stop
start
}

View File

@@ -1,52 +0,0 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=qca-nss-dp
PKG_SOURCE_PROTO:=git
PKG_BRANCH:=master
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define KernelPackage/qca-nss-dp
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
DEPENDS:=@TARGET_ipq807x +kmod-qca-ssdk
TITLE:=Kernel driver for NSS data plane
FILES:=$(PKG_BUILD_DIR)/qca-nss-dp.ko
AUTOLOAD:=$(call AutoLoad,31,qca-nss-dp)
endef
define KernelPackage/qca-nss-dp/Description
This package contains a NSS data plane driver for QCA chipset
endef
define Build/InstallDev
mkdir -p $(1)/usr/include/qca-nss-dp
$(CP) $(PKG_BUILD_DIR)/exports/* $(1)/usr/include/qca-nss-dp/
endef
EXTRA_CFLAGS+= \
-I$(STAGING_DIR)/usr/include/qca-ssdk
subtarget:=$(SUBTARGET)
NSS_DP_HAL_DIR:=$(PKG_BUILD_DIR)/hal
hal_arch:=$(subtarget)
define Build/Configure
$(LN) $(NSS_DP_HAL_DIR)/arch/$(hal_arch)/nss_$(hal_arch).h \
$(PKG_BUILD_DIR)/exports/nss_dp_arch.h
endef
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCH="$(LINUX_KARCH)" \
M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" SoC="$(subtarget)" \
modules
endef
$(eval $(call KernelPackage,qca-nss-dp))

View File

@@ -1,56 +0,0 @@
###################################################
# Makefile for the NSS data plane driver
###################################################
obj ?= .
obj-m += qca-nss-dp.o
qca-nss-dp-objs += nss_dp_attach.o \
nss_dp_ethtools.o \
nss_dp_main.o
ifneq ($(CONFIG_NET_SWITCHDEV),)
qca-nss-dp-objs += nss_dp_switchdev.o
endif
ifeq ($(SoC),$(filter $(SoC),ipq807x ipq807x_64 ipq60xx ipq60xx_64))
qca-nss-dp-objs += hal/edma/edma_cfg.o \
hal/edma/edma_data_plane.o \
hal/edma/edma_tx_rx.o \
hal/gmac_hal_ops/qcom/qcom_if.o \
hal/gmac_hal_ops/syn/xgmac/syn_if.o
endif
NSS_DP_INCLUDE = -I$(obj)/include -I$(obj)/exports -I$(obj)/gmac_hal_ops/include \
-I$(obj)/hal/include
ifeq ($(SoC),$(filter $(SoC),ipq50xx ipq50xx_64))
NSS_DP_INCLUDE += -I$(obj)/hal/gmac_hal_ops/syn/gmac
endif
ccflags-y += $(NSS_DP_INCLUDE)
ccflags-y += -Wall -Werror
ifeq ($(SoC),$(filter $(SoC),ipq807x ipq807x_64 ipq60xx ipq60xx_64))
ccflags-y += -DNSS_DP_PPE_SUPPORT
endif
ifeq ($(SoC),$(filter $(SoC),ipq60xx ipq60xx_64))
qca-nss-dp-objs += hal/arch/ipq60xx/nss_ipq60xx.o
ccflags-y += -DNSS_DP_IPQ60XX
endif
ifeq ($(SoC),$(filter $(SoC),ipq807x ipq807x_64))
qca-nss-dp-objs += hal/arch/ipq807x/nss_ipq807x.o
ccflags-y += -DNSS_DP_IPQ807X -DNSS_DP_EDMA_TX_SMALL_PKT_WAR
endif
ifeq ($(SoC),$(filter $(SoC),ipq50xx ipq50xx_64))
qca-nss-dp-objs += hal/arch/ipq50xx/nss_ipq50xx.o \
hal/gmac_hal_ops/syn/gmac/syn_if.o \
hal/syn_gmac_dp/syn_data_plane.o \
hal/syn_gmac_dp/syn_dp_tx_rx.o \
hal/syn_gmac_dp/syn_dp_cfg.o
ccflags-y += -DNSS_DP_IPQ50XX
endif

View File

@@ -1,219 +0,0 @@
/*
**************************************************************************
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**************************************************************************
*/
/**
* @file nss_dp_api_if.h
* nss-dp exported structures/apis.
*
* This file declares all the public interfaces
* for NSS data-plane driver.
*/
#ifndef __NSS_DP_API_IF_H
#define __NSS_DP_API_IF_H
#include "nss_dp_arch.h"
/**
* @addtogroup nss_dp_subsystem
* @{
*/
/*
* NSS DP status
*/
#define NSS_DP_SUCCESS 0
#define NSS_DP_FAILURE -1
/*
* NSS DP platform specific defines
*/
#define NSS_DP_START_IFNUM NSS_DP_HAL_START_IFNUM
/**< First GMAC interface number (0/1) depending on SoC. */
#define NSS_DP_MAX_MTU_SIZE NSS_DP_HAL_MAX_MTU_SIZE
#define NSS_DP_MAX_PACKET_LEN NSS_DP_HAL_MAX_PACKET_LEN
#define NSS_DP_MAX_INTERFACES (NSS_DP_HAL_MAX_PORTS + NSS_DP_HAL_START_IFNUM)
/**< Last interface index for the SoC, to be used by qca-nss-drv. */
/*
* NSS PTP service code
*/
#define NSS_PTP_EVENT_SERVICE_CODE 0x9
/**
* nss_dp_data_plane_ctx
* Data plane context base class.
*/
struct nss_dp_data_plane_ctx {
struct net_device *dev;
};
/**
* nss_dp_gmac_stats
* The per-GMAC statistics structure.
*/
struct nss_dp_gmac_stats {
struct nss_dp_hal_gmac_stats stats;
};
/**
* nss_dp_data_plane_ops
* Per data-plane ops structure.
*
* Default would be slowpath and can be overridden by nss-drv
*/
struct nss_dp_data_plane_ops {
int (*init)(struct nss_dp_data_plane_ctx *dpc);
int (*open)(struct nss_dp_data_plane_ctx *dpc, uint32_t tx_desc_ring,
uint32_t rx_desc_ring, uint32_t mode);
int (*close)(struct nss_dp_data_plane_ctx *dpc);
int (*link_state)(struct nss_dp_data_plane_ctx *dpc,
uint32_t link_state);
int (*mac_addr)(struct nss_dp_data_plane_ctx *dpc, uint8_t *addr);
int (*change_mtu)(struct nss_dp_data_plane_ctx *dpc, uint32_t mtu);
netdev_tx_t (*xmit)(struct nss_dp_data_plane_ctx *dpc, struct sk_buff *os_buf);
void (*set_features)(struct nss_dp_data_plane_ctx *dpc);
int (*pause_on_off)(struct nss_dp_data_plane_ctx *dpc,
uint32_t pause_on);
int (*vsi_assign)(struct nss_dp_data_plane_ctx *dpc, uint32_t vsi);
int (*vsi_unassign)(struct nss_dp_data_plane_ctx *dpc, uint32_t vsi);
int (*rx_flow_steer)(struct nss_dp_data_plane_ctx *dpc, struct sk_buff *skb,
uint32_t cpu, bool is_add);
void (*get_stats)(struct nss_dp_data_plane_ctx *dpc, struct nss_dp_gmac_stats *stats);
int (*deinit)(struct nss_dp_data_plane_ctx *dpc);
};
/**
* nss_dp_receive
* Called by overlay drivers to deliver packets to nss-dp.
*
* @datatypes
* net_device
* sk_buff
* napi_struct
*
* @param[in] netdev Pointer to netdev structure on which packet is received.
* @param[in] skb Pointer to the received packet.
* @param[in] napi Pointer to napi context.
*/
void nss_dp_receive(struct net_device *netdev, struct sk_buff *skb,
struct napi_struct *napi);
/**
* nss_dp_is_in_open_state
* Returns if a data plane is opened or not.
*
* @datatypes
* net_device
*
* @param[in] netdev Pointer to netdev structure.
*
* @return
* bool
*/
bool nss_dp_is_in_open_state(struct net_device *netdev);
/**
* nss_dp_override_data_palne
* API to allow overlay drivers to override the data plane.
*
* @datatypes
* net_device
* nss_dp_data_plane_ops
* nss_dp_data_plane_ctx
*
* @param[in] netdev Pointer to netdev structure.
* @param[in] dp_ops Pointer to respective data plane ops structure.
* @param[in] dpc Pointer to data plane context.
*
* @return
* int
*/
int nss_dp_override_data_plane(struct net_device *netdev,
struct nss_dp_data_plane_ops *dp_ops,
struct nss_dp_data_plane_ctx *dpc);
/**
* nss_dp_start_data_plane
* Dataplane API to inform netdev when it is ready to start.
*
* @datatypes
* net_device
* nss_dp_data_plane_ctx
*
* @param[in] netdev Pointer to netdev structure.
* @param[in] dpc Pointer to data plane context.
*/
void nss_dp_start_data_plane(struct net_device *netdev,
struct nss_dp_data_plane_ctx *dpc);
/**
* nss_dp_restore_data_plane
* Called by overlay drivers to detach itself from nss-dp.
*
* @datatypes
* net_device
*
* @param[in] netdev Pointer to netdev structure.
*/
void nss_dp_restore_data_plane(struct net_device *netdev);
/**
* nss_dp_get_netdev_by_nss_if_num
* Returns the net device of the corresponding id if it exists.
*
* @datatypes
* int
*
* @param[in] interface ID of the physical mac port.
*
* @return
* Pointer to netdev structure.
*/
struct net_device *nss_dp_get_netdev_by_nss_if_num(int if_num);
/**
* nss_phy_tstamp_rx_buf
* Receive timestamp packet.
*
* @datatypes
* sk_buff
*
* @param[in] app_data Pointer to the application context of the message.
* @param[in] skb Pointer to the packet.
*/
void nss_phy_tstamp_rx_buf(void *app_data, struct sk_buff *skb);
/**
* nss_phy_tstamp_tx_buf
* Transmit timestamp packet
*
* @datatypes
* net_device
* sk_buff
*
* @param[in] net_device Pointer to netdev structure.
* @param[in] skb Pointer to the packet.
*/
void nss_phy_tstamp_tx_buf(struct net_device *ndev, struct sk_buff *skb);
/**
*@}
*/
#endif /** __NSS_DP_API_IF_H */

View File

@@ -1,153 +0,0 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <linux/of.h>
#include <linux/clk.h>
#include <linux/ioport.h>
#include <linux/qcom_scm.h>
#include "nss_dp_hal.h"
/*
* nss_dp_hal_tcsr_base_get
* Reads TCSR base address from DTS
*/
static uint32_t nss_dp_hal_tcsr_base_get(void)
{
uint32_t tcsr_base_addr = 0;
struct device_node *dp_cmn;
/*
* Get reference to NSS dp common device node
*/
dp_cmn = of_find_node_by_name(NULL, "nss-dp-common");
if (!dp_cmn) {
pr_info("%s: NSS DP common node not found\n", __func__);
return 0;
}
if (of_property_read_u32(dp_cmn, "qcom,tcsr-base", &tcsr_base_addr)) {
pr_err("%s: error reading TCSR base\n", __func__);
}
of_node_put(dp_cmn);
return tcsr_base_addr;
}
/*
* nss_dp_hal_tcsr_set
* Sets the TCSR axi cache override register
*/
static void nss_dp_hal_tcsr_set(void)
{
void __iomem *tcsr_addr = NULL;
uint32_t tcsr_base;
int err;
tcsr_base = nss_dp_hal_tcsr_base_get();
if (!tcsr_base) {
pr_err("%s: Unable to get TCSR base address\n", __func__);
return;
}
/*
* Check if Trust Zone is enabled in the system.
* If yes, we need to go through SCM API call to program TCSR register.
* If TZ is not enabled, we can write to the register directly.
*/
if (qcom_scm_is_available()) {
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0))
err = qcom_scm_tcsr_reg_write((tcsr_base + TCSR_GMAC_AXI_CACHE_OVERRIDE_OFFSET),
TCSR_GMAC_AXI_CACHE_OVERRIDE_VALUE);
#else
err = qti_scm_tcsr_reg_write((tcsr_base + TCSR_GMAC_AXI_CACHE_OVERRIDE_OFFSET),
TCSR_GMAC_AXI_CACHE_OVERRIDE_VALUE);
#endif
if (err) {
pr_err("%s: SCM TCSR write error: %d\n", __func__, err);
}
} else {
tcsr_addr = ioremap_nocache((tcsr_base + TCSR_GMAC_AXI_CACHE_OVERRIDE_OFFSET),
TCSR_GMAC_AXI_CACHE_OVERRIDE_REG_SIZE);
if (!tcsr_addr) {
pr_err("%s: ioremap failed\n", __func__);
return;
}
writel(TCSR_GMAC_AXI_CACHE_OVERRIDE_VALUE, tcsr_addr);
iounmap(tcsr_addr);
}
}
/*
* nss_dp_hal_get_data_plane_ops
* Return the data plane ops for GMAC data plane.
*/
struct nss_dp_data_plane_ops *nss_dp_hal_get_data_plane_ops(void)
{
return &nss_dp_gmac_ops;
}
/*
* nss_dp_hal_clk_enable
* Function to enable GCC_SNOC_GMAC_AXI_CLK.
*
* These clocks are required for GMAC operations.
*/
void nss_dp_hal_clk_enable(struct nss_dp_dev *dp_priv)
{
struct platform_device *pdev = dp_priv->pdev;
struct device *dev = &pdev->dev;
struct clk *gmac_clk = NULL;
int err;
gmac_clk = devm_clk_get(dev, NSS_SNOC_GMAC_AXI_CLK);
if (IS_ERR(gmac_clk)) {
pr_err("%s: cannot get clock: %s\n", __func__,
NSS_SNOC_GMAC_AXI_CLK);
return;
}
err = clk_prepare_enable(gmac_clk);
if (err) {
pr_err("%s: cannot enable clock: %s, err: %d\n", __func__,
NSS_SNOC_GMAC_AXI_CLK, err);
return;
}
}
/*
* nss_dp_hal_init
* Sets the gmac ops based on the GMAC type.
*/
bool nss_dp_hal_init(void)
{
nss_dp_hal_set_gmac_ops(&syn_hal_ops, GMAC_HAL_TYPE_SYN_GMAC);
/*
* Program the global GMAC AXI Cache override register
* for optimized AXI DMA operation.
*/
nss_dp_hal_tcsr_set();
return true;
}
/*
* nss_dp_hal_cleanup
* Sets the gmac ops to NULL.
*/
void nss_dp_hal_cleanup(void)
{
nss_dp_hal_set_gmac_ops(NULL, GMAC_HAL_TYPE_SYN_GMAC);
}

View File

@@ -1,130 +0,0 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __NSS_DP_ARCH_H__
#define __NSS_DP_ARCH_H__
#define NSS_DP_HAL_MAX_PORTS 2
#define NSS_DP_HAL_CPU_NUM 2
#define NSS_DP_HAL_START_IFNUM 0
#define NSS_DP_GMAC_NORMAL_FRAME_MTU 1500
#define NSS_DP_GMAC_MINI_JUMBO_FRAME_MTU 1978
#define NSS_DP_GMAC_FULL_JUMBO_FRAME_MTU 9000
#define NSS_DP_HAL_MAX_MTU_SIZE NSS_DP_GMAC_FULL_JUMBO_FRAME_MTU
#define NSS_DP_HAL_MAX_PACKET_LEN 65535
/*
* TCSR_GMAC_AXI_CACHE_OVERRIDE register size
*/
#define TCSR_GMAC_AXI_CACHE_OVERRIDE_REG_SIZE 4
/*
* TCSR_GMAC_AXI_CACHE_OVERRIDE Register offset
*/
#define TCSR_GMAC_AXI_CACHE_OVERRIDE_OFFSET 0x6224
/*
* Value for TCSR_GMAC_AXI_CACHE_OVERRIDE register
*/
#define TCSR_GMAC_AXI_CACHE_OVERRIDE_VALUE 0x05050505
/*
* GCC_SNOC_GMAC_AXI_CLOCK
*/
#define NSS_SNOC_GMAC_AXI_CLK "nss-snoc-gmac-axi-clk"
/**
* nss_dp_hal_gmac_stats
* The per-GMAC statistics structure.
*/
struct nss_dp_hal_gmac_stats {
uint64_t rx_bytes; /**< Number of RX bytes */
uint64_t rx_packets; /**< Number of RX packets */
uint64_t rx_errors; /**< Number of RX errors */
uint64_t rx_receive_errors; /**< Number of RX receive errors */
uint64_t rx_descriptor_errors; /**< Number of RX descriptor errors */
uint64_t rx_late_collision_errors;
/**< Number of RX late collision errors */
uint64_t rx_dribble_bit_errors; /**< Number of RX dribble bit errors */
uint64_t rx_length_errors; /**< Number of RX length errors */
uint64_t rx_ip_header_errors; /**< Number of RX IP header errors read from rxdec */
uint64_t rx_ip_payload_errors; /**< Number of RX IP payload errors */
uint64_t rx_no_buffer_errors; /**< Number of RX no-buffer errors */
uint64_t rx_transport_csum_bypassed;
/**< Number of RX packets where the transport checksum was bypassed */
uint64_t tx_bytes; /**< Number of TX bytes */
uint64_t tx_packets; /**< Number of TX packets */
uint64_t tx_collisions; /**< Number of TX collisions */
uint64_t tx_errors; /**< Number of TX errors */
uint64_t tx_jabber_timeout_errors;
/**< Number of TX jabber timeout errors */
uint64_t tx_frame_flushed_errors;
/**< Number of TX frame flushed errors */
uint64_t tx_loss_of_carrier_errors;
/**< Number of TX loss of carrier errors */
uint64_t tx_no_carrier_errors; /**< Number of TX no carrier errors */
uint64_t tx_late_collision_errors;
/**< Number of TX late collision errors */
uint64_t tx_excessive_collision_errors;
/**< Number of TX excessive collision errors */
uint64_t tx_excessive_deferral_errors;
/**< Number of TX excessive deferral errors */
uint64_t tx_underflow_errors; /**< Number of TX underflow errors */
uint64_t tx_ip_header_errors; /**< Number of TX IP header errors */
uint64_t tx_ip_payload_errors; /**< Number of TX IP payload errors */
uint64_t tx_dropped; /**< Number of TX dropped packets */
uint64_t hw_errs[10]; /**< GMAC DMA error counters */
uint64_t rx_missed; /**< Number of RX packets missed by the DMA */
uint64_t fifo_overflows; /**< Number of RX FIFO overflows signalled by the DMA */
uint64_t rx_scatter_errors; /**< Number of scattered frames received by the DMA */
uint64_t tx_ts_create_errors; /**< Number of tx timestamp creation errors */
uint64_t gmac_total_ticks; /**< Total clock ticks spend inside the GMAC */
uint64_t gmac_worst_case_ticks; /**< Worst case iteration of the GMAC in ticks */
uint64_t gmac_iterations; /**< Number of iterations around the GMAC */
uint64_t tx_pause_frames; /**< Number of pause frames sent by the GMAC */
uint64_t mmc_rx_overflow_errors;
/**< Number of RX overflow errors */
uint64_t mmc_rx_watchdog_timeout_errors;
/**< Number of RX watchdog timeout errors */
uint64_t mmc_rx_crc_errors; /**< Number of RX CRC errors */
uint64_t mmc_rx_ip_header_errors;
/**< Number of RX IP header errors read from MMC counter*/
uint64_t mmc_rx_octets_g;
/**< Number of good octets received */
uint64_t mmc_rx_ucast_frames; /**< Number of Unicast frames received */
uint64_t mmc_rx_bcast_frames; /**< Number of Bcast frames received */
uint64_t mmc_rx_mcast_frames; /**< Number of Mcast frames received */
uint64_t mmc_rx_undersize;
/**< Number of RX undersize frames */
uint64_t mmc_rx_oversize;
/**< Number of RX oversize frames */
uint64_t mmc_rx_jabber; /**< Number of jabber frames */
uint64_t mmc_rx_octets_gb;
/**< Number of good/bad octets */
uint64_t mmc_rx_frag_frames_g; /**< Number of good ipv4 frag frames */
uint64_t mmc_tx_octets_g; /**< Number of good octets sent */
uint64_t mmc_tx_ucast_frames; /**< Number of Unicast frames sent*/
uint64_t mmc_tx_bcast_frames; /**< Number of Broadcast frames sent */
uint64_t mmc_tx_mcast_frames; /**< Number of Multicast frames sent */
uint64_t mmc_tx_deferred; /**< Number of Deferred frames sent */
uint64_t mmc_tx_single_col; /**< Number of single collisions */
uint64_t mmc_tx_multiple_col; /**< Number of multiple collisions */
uint64_t mmc_tx_octets_gb; /**< Number of good/bad octets sent*/
};
extern struct nss_dp_data_plane_ops nss_dp_gmac_ops;
#endif /* __NSS_DP_ARCH_H__ */

View File

@@ -1,53 +0,0 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "nss_dp_hal.h"
#include "edma.h"
/*
* nss_dp_hal_get_data_plane_ops()
* Return the data plane ops for edma data plane.
*/
struct nss_dp_data_plane_ops *nss_dp_hal_get_data_plane_ops(void)
{
return &nss_dp_edma_ops;
}
/*
* nss_dp_hal_init()
* Initialize EDMA and set gmac ops.
*/
bool nss_dp_hal_init(void)
{
nss_dp_hal_set_gmac_ops(&qcom_hal_ops, GMAC_HAL_TYPE_QCOM);
nss_dp_hal_set_gmac_ops(&syn_hal_ops, GMAC_HAL_TYPE_SYN_XGMAC);
if (edma_init()) {
return false;
}
return true;
}
/*
* nss_dp_hal_cleanup()
* Cleanup EDMA and set gmac ops to NULL.
*/
void nss_dp_hal_cleanup(void)
{
nss_dp_hal_set_gmac_ops(NULL, GMAC_HAL_TYPE_QCOM);
nss_dp_hal_set_gmac_ops(NULL, GMAC_HAL_TYPE_SYN_XGMAC);
edma_cleanup(false);
}

View File

@@ -1,34 +0,0 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __NSS_DP_ARCH_H__
#define __NSS_DP_ARCH_H__
#define NSS_DP_HAL_MAX_PORTS 5
#define NSS_DP_HAL_CPU_NUM 4
#define NSS_DP_HAL_START_IFNUM 1
#define NSS_DP_HAL_MAX_MTU_SIZE 9216
#define NSS_DP_HAL_MAX_PACKET_LEN 65535
#define NSS_DP_PREHEADER_SIZE 32
/**
* nss_dp_hal_gmac_stats
* The per-GMAC statistics structure.
*/
struct nss_dp_hal_gmac_stats {
};
#endif /* __NSS_DP_ARCH_H__ */

View File

@@ -1,53 +0,0 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "nss_dp_hal.h"
#include "edma.h"
/*
* nss_dp_hal_get_data_plane_ops()
* Return the data plane ops for edma data plane.
*/
struct nss_dp_data_plane_ops *nss_dp_hal_get_data_plane_ops(void)
{
return &nss_dp_edma_ops;
}
/*
* nss_dp_hal_init()
* Initialize EDMA and set gmac ops.
*/
bool nss_dp_hal_init(void)
{
nss_dp_hal_set_gmac_ops(&qcom_hal_ops, GMAC_HAL_TYPE_QCOM);
nss_dp_hal_set_gmac_ops(&syn_hal_ops, GMAC_HAL_TYPE_SYN_XGMAC);
if (edma_init()) {
return false;
}
return true;
}
/*
* nss_dp_hal_cleanup()
* Cleanup EDMA and set gmac ops to NULL.
*/
void nss_dp_hal_cleanup(void)
{
nss_dp_hal_set_gmac_ops(NULL, GMAC_HAL_TYPE_QCOM);
nss_dp_hal_set_gmac_ops(NULL, GMAC_HAL_TYPE_SYN_XGMAC);
edma_cleanup(false);
}

View File

@@ -1,34 +0,0 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __NSS_DP_ARCH_H__
#define __NSS_DP_ARCH_H__
#define NSS_DP_HAL_MAX_PORTS 6
#define NSS_DP_HAL_CPU_NUM 4
#define NSS_DP_HAL_START_IFNUM 1
#define NSS_DP_HAL_MAX_MTU_SIZE 9216
#define NSS_DP_HAL_MAX_PACKET_LEN 65535
#define NSS_DP_PREHEADER_SIZE 32
/**
* nss_dp_hal_gmac_stats
* The per-GMAC statistics structure.
*/
struct nss_dp_hal_gmac_stats {
};
#endif /* __NSS_DP_ARCH_H__ */

View File

@@ -1,967 +0,0 @@
/*
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
* USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <linux/interrupt.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/debugfs.h>
#include <linux/reset.h>
#include "nss_dp_dev.h"
#include "edma_regs.h"
#include "edma_data_plane.h"
#define EDMA_HW_RESET_ID "edma_rst"
/*
* edma_cleanup_rxfill_ring_res()
* Cleanup resources for one RxFill ring
*/
static void edma_cleanup_rxfill_ring_res(struct edma_hw *ehw,
struct edma_rxfill_ring *rxfill_ring)
{
struct platform_device *pdev = ehw->pdev;
struct sk_buff *skb;
uint16_t cons_idx, curr_idx;
struct edma_rxfill_desc *rxfill_desc;
uint32_t reg_data = 0;
struct edma_rx_preheader *rxph = NULL;
int store_idx;
/*
* Read RXFILL ring producer index
*/
reg_data = edma_reg_read(EDMA_REG_RXFILL_PROD_IDX(rxfill_ring->id));
curr_idx = reg_data & EDMA_RXFILL_PROD_IDX_MASK;
/*
* Read RXFILL ring consumer index
*/
reg_data = edma_reg_read(EDMA_REG_RXFILL_CONS_IDX(rxfill_ring->id));
cons_idx = reg_data & EDMA_RXFILL_CONS_IDX_MASK;
while (curr_idx != cons_idx) {
/*
* Get RXFILL descriptor
*/
rxfill_desc = EDMA_RXFILL_DESC(rxfill_ring, cons_idx);
/*
* Get Rx preheader
*/
rxph = (struct edma_rx_preheader *)
phys_to_virt(rxfill_desc->buffer_addr);
dma_unmap_single(&pdev->dev, rxfill_desc->buffer_addr,
EDMA_RX_BUFF_SIZE, DMA_FROM_DEVICE);
/*
* Get sk_buff and free it
*/
store_idx = rxph->opaque;
skb = ehw->rx_skb_store[store_idx];
ehw->rx_skb_store[store_idx] = NULL;
dev_kfree_skb_any(skb);
cons_idx++;
if (cons_idx == rxfill_ring->count)
cons_idx = 0;
}
/*
* Free RXFILL ring descriptors
*/
dma_free_coherent(&pdev->dev,
(sizeof(struct edma_rxfill_desc)
* rxfill_ring->count),
rxfill_ring->desc, rxfill_ring->dma);
}
/*
* edma_setup_rxfill_ring_res()
* Setup resources for one RxFill ring
*/
static int edma_setup_rxfill_ring_res(struct edma_hw *ehw,
struct edma_rxfill_ring *rxfill_ring)
{
struct platform_device *pdev = ehw->pdev;
/*
* Allocate RxFill ring descriptors
*/
rxfill_ring->desc = dma_alloc_coherent(&pdev->dev,
(sizeof(struct edma_rxfill_desc)
* rxfill_ring->count),
&rxfill_ring->dma, GFP_KERNEL);
if (!rxfill_ring->desc) {
pr_warn("Descriptor alloc for RXFILL ring %u failed\n",
rxfill_ring->id);
return -ENOMEM;
}
spin_lock_init(&rxfill_ring->lock);
return 0;
}
/*
* edma_setup_rxdesc_ring_res()
* Setup resources for one RxDesc ring
*/
static int edma_setup_rxdesc_ring_res(struct edma_hw *ehw,
struct edma_rxdesc_ring *rxdesc_ring)
{
struct platform_device *pdev = ehw->pdev;
/*
* Allocate RxDesc ring descriptors
*/
rxdesc_ring->desc = dma_alloc_coherent(&pdev->dev,
(sizeof(struct edma_rxdesc_desc)
* rxdesc_ring->count),
&rxdesc_ring->dma, GFP_KERNEL);
if (!rxdesc_ring->desc) {
pr_warn("Descriptor alloc for RXDESC ring %u failed\n",
rxdesc_ring->id);
return -ENOMEM;
}
return 0;
}
/*
* edma_cleanup_rxdesc_ring_res()
* Cleanup resources for RxDesc ring
*/
static void edma_cleanup_rxdesc_ring_res(struct edma_hw *ehw,
struct edma_rxdesc_ring *rxdesc_ring)
{
struct platform_device *pdev = ehw->pdev;
struct sk_buff *skb;
struct edma_rxdesc_desc *rxdesc_desc;
struct edma_rx_preheader *rxph = NULL;
uint16_t prod_idx = 0;
uint16_t cons_idx = 0;
int store_idx;
cons_idx = edma_reg_read(EDMA_REG_RXDESC_CONS_IDX(rxdesc_ring->id))
& EDMA_RXDESC_CONS_IDX_MASK;
prod_idx = edma_reg_read(EDMA_REG_RXDESC_PROD_IDX(rxdesc_ring->id))
& EDMA_RXDESC_PROD_IDX_MASK;
/*
* Free any buffers assigned to any descriptors
*/
while (cons_idx != prod_idx) {
rxdesc_desc = EDMA_RXDESC_DESC(rxdesc_ring, cons_idx);
rxph = (struct edma_rx_preheader *)
phys_to_virt(rxdesc_desc->buffer_addr);
dma_unmap_single(&pdev->dev, rxdesc_desc->buffer_addr,
EDMA_RX_BUFF_SIZE, DMA_FROM_DEVICE);
store_idx = rxph->opaque;
skb = ehw->rx_skb_store[store_idx];
ehw->rx_skb_store[store_idx] = NULL;
dev_kfree_skb_any(skb);
/*
* Update consumer index
*/
if (++cons_idx == rxdesc_ring->count)
cons_idx = 0;
}
/*
* Free RXDESC ring descriptors
*/
dma_free_coherent(&pdev->dev,
(sizeof(struct edma_rxdesc_desc)
* rxdesc_ring->count),
rxdesc_ring->desc, rxdesc_ring->dma);
}
/*
* edma_cleanup_txcmpl_ring_res()
* Cleanup resources for one TxCmpl ring
*/
static void edma_cleanup_txcmpl_ring_res(struct edma_hw *ehw,
struct edma_txcmpl_ring *txcmpl_ring)
{
struct platform_device *pdev = ehw->pdev;
/*
* Free any buffers assigned to any descriptors
*/
edma_clean_tx(ehw, txcmpl_ring);
/*
* Free TxCmpl ring descriptors
*/
dma_free_coherent(&pdev->dev,
(sizeof(struct edma_txcmpl_desc)
* txcmpl_ring->count),
txcmpl_ring->desc, txcmpl_ring->dma);
}
/*
* edma_setup_txcmpl_ring_res()
* Setup resources for one TxCmpl ring
*/
static int edma_setup_txcmpl_ring_res(struct edma_hw *ehw,
struct edma_txcmpl_ring *txcmpl_ring)
{
struct platform_device *pdev = ehw->pdev;
/*
* Allocate TxCmpl ring descriptors
*/
txcmpl_ring->desc = dma_alloc_coherent(&pdev->dev,
(sizeof(struct edma_txcmpl_desc)
* txcmpl_ring->count),
&txcmpl_ring->dma, GFP_KERNEL);
if (!txcmpl_ring->desc) {
pr_warn("Descriptor alloc for TXCMPL ring %u failed\n",
txcmpl_ring->id);
return -ENOMEM;
}
return 0;
}
/*
* edma_cleanup_txdesc_ring_res()
* Cleanup resources for one TxDesc ring
*/
static void edma_cleanup_txdesc_ring_res(struct edma_hw *ehw,
struct edma_txdesc_ring *txdesc_ring)
{
struct platform_device *pdev = ehw->pdev;
struct sk_buff *skb = NULL;
struct edma_txdesc_desc *txdesc = NULL;
uint16_t prod_idx, cons_idx;
size_t buf_len;
uint32_t data;
int store_idx;
/*
* Free any buffers assigned to any descriptors
*/
data = edma_reg_read(EDMA_REG_TXDESC_PROD_IDX(txdesc_ring->id));
prod_idx = data & EDMA_TXDESC_PROD_IDX_MASK;
data = edma_reg_read(EDMA_REG_TXDESC_CONS_IDX(txdesc_ring->id));
cons_idx = data & EDMA_TXDESC_CONS_IDX_MASK;
while (cons_idx != prod_idx) {
txdesc = EDMA_TXDESC_DESC(txdesc_ring, cons_idx);
store_idx = txdesc->buffer_addr;
skb = ehw->tx_skb_store[store_idx];
ehw->tx_skb_store[store_idx] = NULL;
buf_len = (txdesc->word1 & EDMA_TXDESC_DATA_LENGTH_MASK) >>
EDMA_TXDESC_DATA_LENGTH_SHIFT;
dma_unmap_single(&pdev->dev, (dma_addr_t)skb->data,
buf_len + EDMA_TX_PREHDR_SIZE, DMA_TO_DEVICE);
dev_kfree_skb_any(skb);
cons_idx = (cons_idx + 1) & (txdesc_ring->count - 1);
cons_idx++;
if (cons_idx == txdesc_ring->count)
cons_idx = 0;
}
/*
* Free Tx ring descriptors
*/
dma_free_coherent(&pdev->dev,
(sizeof(struct edma_txdesc_desc)
* txdesc_ring->count),
txdesc_ring->desc, txdesc_ring->dma);
}
/*
* edma_setup_txdesc_ring_res()
* Setup resources for one TxDesc ring
*/
static int edma_setup_txdesc_ring_res(struct edma_hw *ehw,
struct edma_txdesc_ring *txdesc_ring)
{
struct platform_device *pdev = ehw->pdev;
/*
* Allocate Tx ring descriptors
*/
txdesc_ring->desc = dma_alloc_coherent(&pdev->dev,
(sizeof(struct edma_txdesc_desc)
* txdesc_ring->count),
&txdesc_ring->dma, GFP_KERNEL);
if (!txdesc_ring->desc) {
pr_warn("Descriptor alloc for TXDESC ring %u failed\n",
txdesc_ring->id);
return -ENOMEM;
}
spin_lock_init(&txdesc_ring->tx_lock);
return 0;
}
/*
* edma_setup_ring_resources()
* Allocate/setup resources for EDMA rings
*/
static int edma_setup_ring_resources(struct edma_hw *ehw)
{
struct edma_txcmpl_ring *txcmpl_ring = NULL;
struct edma_txdesc_ring *txdesc_ring = NULL;
struct edma_rxfill_ring *rxfill_ring = NULL;
struct edma_rxdesc_ring *rxdesc_ring = NULL;
int i;
int ret;
int index;
/*
* Allocate TxDesc ring descriptors
*/
for (i = 0; i < ehw->txdesc_rings; i++) {
txdesc_ring = &ehw->txdesc_ring[i];
txdesc_ring->count = EDMA_RING_SIZE;
txdesc_ring->id = ehw->txdesc_ring_start + i;
ret = edma_setup_txdesc_ring_res(ehw, txdesc_ring);
if (ret != 0) {
while (i-- >= 0)
edma_cleanup_txdesc_ring_res(ehw,
&ehw->txdesc_ring[i]);
return -ENOMEM;
}
}
/*
* Allocate TxCmpl ring descriptors
*/
for (i = 0; i < ehw->txcmpl_rings; i++) {
txcmpl_ring = &ehw->txcmpl_ring[i];
txcmpl_ring->count = EDMA_RING_SIZE;
txcmpl_ring->id = ehw->txcmpl_ring_start + i;
ret = edma_setup_txcmpl_ring_res(ehw, txcmpl_ring);
if (ret != 0) {
while (i-- >= 0)
edma_cleanup_txcmpl_ring_res(ehw,
&ehw->txcmpl_ring[i]);
goto txcmpl_mem_alloc_fail;
}
}
/*
* Allocate Rx fill ring descriptors
*/
for (i = 0; i < ehw->rxfill_rings; i++) {
rxfill_ring = &ehw->rxfill_ring[i];
rxfill_ring->count = EDMA_RING_SIZE;
rxfill_ring->id = ehw->rxfill_ring_start + i;
ret = edma_setup_rxfill_ring_res(ehw, rxfill_ring);
if (ret != 0) {
while (--i >= 0)
edma_cleanup_rxfill_ring_res(ehw,
&ehw->rxfill_ring[i]);
goto rxfill_mem_alloc_fail;
}
}
/*
* Allocate RxDesc ring descriptors
*/
for (i = 0; i < ehw->rxdesc_rings; i++) {
rxdesc_ring = &ehw->rxdesc_ring[i];
rxdesc_ring->count = EDMA_RING_SIZE;
rxdesc_ring->id = ehw->rxdesc_ring_start + i;
/*
* Create a mapping between RX Desc ring and Rx fill ring.
* Number of fill rings are lesser than the descriptor rings
* Share the fill rings across descriptor rings.
*/
index = ehw->rxfill_ring_start + (i % ehw->rxfill_rings);
rxdesc_ring->rxfill =
&ehw->rxfill_ring[index - ehw->rxfill_ring_start];
ret = edma_setup_rxdesc_ring_res(ehw, rxdesc_ring);
if (ret != 0) {
while (--i >= 0)
edma_cleanup_rxdesc_ring_res(ehw,
&ehw->rxdesc_ring[i]);
goto rxdesc_mem_alloc_fail;
}
}
return 0;
rxdesc_mem_alloc_fail:
for (i = 0; i < ehw->rxfill_rings; i++)
edma_cleanup_rxfill_ring_res(ehw, &ehw->rxfill_ring[i]);
rxfill_mem_alloc_fail:
for (i = 0; i < ehw->txcmpl_rings; i++)
edma_cleanup_txcmpl_ring_res(ehw, &ehw->txcmpl_ring[i]);
txcmpl_mem_alloc_fail:
for (i = 0; i < ehw->txdesc_rings; i++)
edma_cleanup_txdesc_ring_res(ehw, &ehw->txdesc_ring[i]);
return -ENOMEM;
}
/*
* edma_free_rings()
* Free EDMA software rings
*/
static void edma_free_rings(struct edma_hw *ehw)
{
kfree(ehw->rxfill_ring);
kfree(ehw->rxdesc_ring);
kfree(ehw->txdesc_ring);
kfree(ehw->txcmpl_ring);
}
/*
* edma_alloc_rings()
* Allocate EDMA software rings
*/
static int edma_alloc_rings(struct edma_hw *ehw)
{
ehw->rxfill_ring = kzalloc((sizeof(struct edma_rxfill_ring) *
ehw->rxfill_rings), GFP_KERNEL);
if (!ehw->rxfill_ring)
return -ENOMEM;
ehw->rxdesc_ring = kzalloc((sizeof(struct edma_rxdesc_ring) *
ehw->rxdesc_rings), GFP_KERNEL);
if (!ehw->rxdesc_ring)
goto rxdesc_ring_alloc_fail;
ehw->txdesc_ring = kzalloc((sizeof(struct edma_txdesc_ring) *
ehw->txdesc_rings), GFP_KERNEL);
if (!ehw->txdesc_ring)
goto txdesc_ring_alloc_fail;
ehw->txcmpl_ring = kzalloc((sizeof(struct edma_txcmpl_ring) *
ehw->txcmpl_rings), GFP_KERNEL);
if (!ehw->txcmpl_ring)
goto txcmpl_ring_alloc_fail;
pr_info("Num rings - TxDesc:%u (%u-%u) TxCmpl:%u (%u-%u)\n",
ehw->txdesc_rings, ehw->txdesc_ring_start,
(ehw->txdesc_ring_start + ehw->txdesc_rings - 1),
ehw->txcmpl_rings, ehw->txcmpl_ring_start,
(ehw->txcmpl_ring_start + ehw->txcmpl_rings - 1));
pr_info("RxDesc:%u (%u-%u) RxFill:%u (%u-%u)\n",
ehw->rxdesc_rings, ehw->rxdesc_ring_start,
(ehw->rxdesc_ring_start + ehw->rxdesc_rings - 1),
ehw->rxfill_rings, ehw->rxfill_ring_start,
(ehw->rxfill_ring_start + ehw->rxfill_rings - 1));
return 0;
txcmpl_ring_alloc_fail:
kfree(ehw->txdesc_ring);
txdesc_ring_alloc_fail:
kfree(ehw->rxdesc_ring);
rxdesc_ring_alloc_fail:
kfree(ehw->rxfill_ring);
return -ENOMEM;
}
/*
* edma_cleanup_rings()
* Cleanup EDMA rings
*/
void edma_cleanup_rings(struct edma_hw *ehw)
{
int i;
/*
* Free any buffers assigned to any descriptors
*/
for (i = 0; i < ehw->txdesc_rings; i++)
edma_cleanup_txdesc_ring_res(ehw, &ehw->txdesc_ring[i]);
/*
* Free Tx completion descriptors
*/
for (i = 0; i < ehw->txcmpl_rings; i++)
edma_cleanup_txcmpl_ring_res(ehw, &ehw->txcmpl_ring[i]);
/*
* Free Rx fill ring descriptors
*/
for (i = 0; i < ehw->rxfill_rings; i++)
edma_cleanup_rxfill_ring_res(ehw, &ehw->rxfill_ring[i]);
/*
* Free Rx completion ring descriptors
*/
for (i = 0; i < ehw->rxdesc_rings; i++)
edma_cleanup_rxdesc_ring_res(ehw, &ehw->rxdesc_ring[i]);
edma_free_rings(ehw);
}
/*
* edma_init_rings()
* Initialize EDMA rings
*/
static int edma_init_rings(struct edma_hw *ehw)
{
int ret = 0;
ret = edma_alloc_rings(ehw);
if (ret)
return ret;
ret = edma_setup_ring_resources(ehw);
if (ret)
return ret;
return 0;
}
/*
* edma_configure_txdesc_ring()
* Configure one TxDesc ring
*/
static void edma_configure_txdesc_ring(struct edma_hw *ehw,
struct edma_txdesc_ring *txdesc_ring)
{
uint32_t data = 0;
uint16_t hw_cons_idx = 0;
/*
* Configure TXDESC ring
*/
edma_reg_write(EDMA_REG_TXDESC_BA(txdesc_ring->id),
(uint32_t)(txdesc_ring->dma &
EDMA_RING_DMA_MASK));
edma_reg_write(EDMA_REG_TXDESC_RING_SIZE(txdesc_ring->id),
(uint32_t)(txdesc_ring->count &
EDMA_TXDESC_RING_SIZE_MASK));
data = edma_reg_read(EDMA_REG_TXDESC_CONS_IDX(txdesc_ring->id));
data &= ~(EDMA_TXDESC_CONS_IDX_MASK);
hw_cons_idx = data;
data = edma_reg_read(EDMA_REG_TXDESC_PROD_IDX(txdesc_ring->id));
data &= ~(EDMA_TXDESC_PROD_IDX_MASK);
data |= hw_cons_idx & EDMA_TXDESC_PROD_IDX_MASK;
edma_reg_write(EDMA_REG_TXDESC_PROD_IDX(txdesc_ring->id), data);
}
/*
* edma_configure_txcmpl_ring()
* Configure one TxCmpl ring
*/
static void edma_configure_txcmpl_ring(struct edma_hw *ehw,
struct edma_txcmpl_ring *txcmpl_ring)
{
uint32_t tx_mod_timer;
/*
* Configure TxCmpl ring base address
*/
edma_reg_write(EDMA_REG_TXCMPL_BA(txcmpl_ring->id),
(uint32_t)(txcmpl_ring->dma & EDMA_RING_DMA_MASK));
edma_reg_write(EDMA_REG_TXCMPL_RING_SIZE(txcmpl_ring->id),
(uint32_t)(txcmpl_ring->count
& EDMA_TXDESC_RING_SIZE_MASK));
/*
* Set TxCmpl ret mode to opaque
*/
edma_reg_write(EDMA_REG_TXCMPL_CTRL(txcmpl_ring->id),
EDMA_TXCMPL_RETMODE_OPAQUE);
tx_mod_timer = (EDMA_TX_MOD_TIMER & EDMA_TX_MOD_TIMER_INIT_MASK)
<< EDMA_TX_MOD_TIMER_INIT_SHIFT;
edma_reg_write(EDMA_REG_TX_MOD_TIMER(txcmpl_ring->id),
tx_mod_timer);
edma_reg_write(EDMA_REG_TX_INT_CTRL(txcmpl_ring->id), 0x2);
}
/*
* edma_configure_rxdesc_ring()
* Configure one RxDesc ring
*/
static void edma_configure_rxdesc_ring(struct edma_hw *ehw,
struct edma_rxdesc_ring *rxdesc_ring)
{
uint32_t data;
edma_reg_write(EDMA_REG_RXDESC_BA(rxdesc_ring->id),
(uint32_t)(rxdesc_ring->dma & 0xffffffff));
data = rxdesc_ring->count & EDMA_RXDESC_RING_SIZE_MASK;
data |= (ehw->rx_payload_offset & EDMA_RXDESC_PL_OFFSET_MASK)
<< EDMA_RXDESC_PL_OFFSET_SHIFT;
edma_reg_write(EDMA_REG_RXDESC_RING_SIZE(rxdesc_ring->id), data);
data = (EDMA_RX_MOD_TIMER_INIT & EDMA_RX_MOD_TIMER_INIT_MASK)
<< EDMA_RX_MOD_TIMER_INIT_SHIFT;
edma_reg_write(EDMA_REG_RX_MOD_TIMER(rxdesc_ring->id), data);
/*
* Enable ring. Set ret mode to 'opaque'.
*/
edma_reg_write(EDMA_REG_RX_INT_CTRL(rxdesc_ring->id), 0x2);
}
/*
* edma_configure_rxfill_ring()
* Configure one RxFill ring
*/
static void edma_configure_rxfill_ring(struct edma_hw *ehw,
struct edma_rxfill_ring *rxfill_ring)
{
uint32_t data = 0;
edma_reg_write(EDMA_REG_RXFILL_BA(rxfill_ring->id),
(uint32_t)(rxfill_ring->dma & EDMA_RING_DMA_MASK));
data = rxfill_ring->count & EDMA_RXFILL_RING_SIZE_MASK;
edma_reg_write(EDMA_REG_RXFILL_RING_SIZE(rxfill_ring->id), data);
/*
* Alloc Rx buffers
*/
edma_alloc_rx_buffer(ehw, rxfill_ring);
}
/*
* edma_configure_rings()
* Configure EDMA rings
*/
static void edma_configure_rings(struct edma_hw *ehw)
{
int i = 0;
/*
* Initialize the store
*/
for (i = 0; i < EDMA_RING_SIZE; i++) {
ehw->tx_skb_store[i] = NULL;
ehw->rx_skb_store[i] = NULL;
}
/*
* Configure TXDESC ring
*/
for (i = 0; i < ehw->txdesc_rings; i++)
edma_configure_txdesc_ring(ehw, &ehw->txdesc_ring[i]);
/*
* Configure TXCMPL ring
*/
for (i = 0; i < ehw->txcmpl_rings; i++)
edma_configure_txcmpl_ring(ehw, &ehw->txcmpl_ring[i]);
/*
* Configure RXFILL rings
*/
for (i = 0; i < ehw->rxfill_rings; i++)
edma_configure_rxfill_ring(ehw, &ehw->rxfill_ring[i]);
/*
* Configure RXDESC ring
*/
for (i = 0; i < ehw->rxdesc_rings; i++)
edma_configure_rxdesc_ring(ehw, &ehw->rxdesc_ring[i]);
}
/*
* edma_hw_reset()
* Reset EDMA Hardware during initialization
*/
int edma_hw_reset(struct edma_hw *ehw)
{
struct reset_control *rst;
struct platform_device *pdev = ehw->pdev;
rst = devm_reset_control_get(&pdev->dev, EDMA_HW_RESET_ID);
if (IS_ERR(rst)) {
pr_warn("DTS Node: %s does not exist\n", EDMA_HW_RESET_ID);
return -EINVAL;
}
reset_control_assert(rst);
udelay(100);
reset_control_deassert(rst);
udelay(100);
pr_info("EDMA HW Reset completed succesfully\n");
return 0;
}
/*
* edma_hw_init()
* EDMA hw init
*/
int edma_hw_init(struct edma_hw *ehw)
{
int ret = 0;
int desc_index;
uint32_t i, data, reg = 0;
struct edma_rxdesc_ring *rxdesc_ring = NULL;
data = edma_reg_read(EDMA_REG_MAS_CTRL);
pr_info("EDMA ver %d hw init\n", data);
/*
* Setup private data structure
*/
ehw->misc_intr_mask = 0x0;
ehw->rxfill_intr_mask = EDMA_RXFILL_INT_MASK;
ehw->rxdesc_intr_mask = EDMA_RXDESC_INT_MASK_PKT_INT;
ehw->txcmpl_intr_mask = EDMA_TX_INT_MASK_PKT_INT |
EDMA_TX_INT_MASK_UGT_INT;
ehw->rx_payload_offset = EDMA_RX_PREHDR_SIZE;
ehw->active = 0;
ehw->edma_initialized = false;
/* Reset EDMA */
ret = edma_hw_reset(ehw);
if (ret)
return ret;
/*
* Disable interrupts
*/
for (i = 0; i < EDMA_MAX_TXCMPL_RINGS; i++)
edma_reg_write(EDMA_REG_TX_INT_MASK(i), 0);
for (i = 0; i < EDMA_MAX_RXFILL_RINGS; i++)
edma_reg_write(EDMA_REG_RXFILL_INT_MASK(i), 0);
for (i = 0; i < EDMA_MAX_RXDESC_RINGS; i++)
edma_reg_write(EDMA_REG_RX_INT_CTRL(i), 0);
/*
* Disable Rx rings
*/
for (i = 0; i < EDMA_MAX_RXDESC_RINGS; i++) {
data = edma_reg_read(EDMA_REG_RXDESC_CTRL(i));
data &= ~EDMA_RXDESC_RX_EN;
edma_reg_write(EDMA_REG_RXDESC_CTRL(i), data);
}
/*
* Disable RxFill Rings
*/
for (i = 0; i < EDMA_MAX_RXFILL_RINGS; i++) {
data = edma_reg_read(EDMA_REG_RXFILL_RING_EN(i));
data &= ~EDMA_RXFILL_RING_EN;
edma_reg_write(EDMA_REG_RXFILL_RING_EN(i), data);
}
/*
* Disable Tx rings
*/
for (desc_index = 0; desc_index < EDMA_MAX_TXDESC_RINGS; desc_index++) {
data = edma_reg_read(EDMA_REG_TXDESC_CTRL(desc_index));
data &= ~EDMA_TXDESC_TX_EN;
edma_reg_write(EDMA_REG_TXDESC_CTRL(desc_index), data);
}
#if defined(NSS_DP_IPQ807X)
/*
* Clear the TXDESC2CMPL_MAP_xx reg before setting up
* the mapping. This register holds TXDESC to TXFILL ring
* mapping.
*/
edma_reg_write(EDMA_REG_TXDESC2CMPL_MAP_0, 0);
edma_reg_write(EDMA_REG_TXDESC2CMPL_MAP_1, 0);
edma_reg_write(EDMA_REG_TXDESC2CMPL_MAP_2, 0);
desc_index = ehw->txcmpl_ring_start;
/*
* 3 registers to hold the completion mapping for total 24
* TX desc rings (0-9,10-19 and rest). In each entry 3 bits hold
* the mapping for a particular TX desc ring.
*/
for (i = ehw->txdesc_ring_start;
i < ehw->txdesc_ring_end; i++) {
if (i >= 0 && i <= 9)
reg = EDMA_REG_TXDESC2CMPL_MAP_0;
else if (i >= 10 && i <= 19)
reg = EDMA_REG_TXDESC2CMPL_MAP_1;
else
reg = EDMA_REG_TXDESC2CMPL_MAP_2;
pr_debug("Configure TXDESC:%u to use TXCMPL:%u\n",
i, desc_index);
data = edma_reg_read(reg);
data |= (desc_index & 0x7) << ((i % 10) * 3);
edma_reg_write(reg, data);
desc_index++;
if (desc_index == ehw->txcmpl_ring_end)
desc_index = ehw->txcmpl_ring_start;
}
#endif
/*
* Set PPE QID to EDMA Rx ring mapping.
* When coming up use only queue 0.
* HOST EDMA rings. FW EDMA comes up and overwrites as required.
* Each entry can hold mapping for 8 PPE queues and entry size is
* 4 bytes
*/
desc_index = ehw->rxdesc_ring_start;
data = 0;
data |= (desc_index & 0xF);
edma_reg_write(EDMA_QID2RID_TABLE_MEM(0), data);
pr_debug("Configure QID2RID reg:0x%x to 0x%x\n", reg, data);
ret = edma_init_rings(ehw);
if (ret)
return ret;
edma_configure_rings(ehw);
/*
* Set RXDESC2FILL_MAP_xx reg.
* There are two registers RXDESC2FILL_0 and RXDESC2FILL_1
* 3 bits holds the rx fill ring mapping for each of the
* rx descriptor ring.
*/
edma_reg_write(EDMA_REG_RXDESC2FILL_MAP_0, 0);
edma_reg_write(EDMA_REG_RXDESC2FILL_MAP_1, 0);
for (i = ehw->rxdesc_ring_start;
i < ehw->rxdesc_ring_end; i++) {
if ((i >= 0) && (i <= 9))
reg = EDMA_REG_RXDESC2FILL_MAP_0;
else
reg = EDMA_REG_RXDESC2FILL_MAP_1;
rxdesc_ring = &ehw->rxdesc_ring[i - ehw->rxdesc_ring_start];
pr_debug("Configure RXDESC:%u to use RXFILL:%u\n",
rxdesc_ring->id, rxdesc_ring->rxfill->id);
data = edma_reg_read(reg);
data |= (rxdesc_ring->rxfill->id & 0x7) << ((i % 10) * 3);
edma_reg_write(reg, data);
}
reg = EDMA_REG_RXDESC2FILL_MAP_0;
pr_debug("EDMA_REG_RXDESC2FILL_MAP_0: 0x%x\n", edma_reg_read(reg));
reg = EDMA_REG_RXDESC2FILL_MAP_1;
pr_debug("EDMA_REG_RXDESC2FILL_MAP_1: 0x%x\n", edma_reg_read(reg));
#if defined(NSS_DP_IPQ807X)
reg = EDMA_REG_TXDESC2CMPL_MAP_0;
pr_debug("EDMA_REG_TXDESC2CMPL_MAP_0: 0x%x\n", edma_reg_read(reg));
reg = EDMA_REG_TXDESC2CMPL_MAP_1;
pr_debug("EDMA_REG_TXDESC2CMPL_MAP_1: 0x%x\n", edma_reg_read(reg));
reg = EDMA_REG_TXDESC2CMPL_MAP_2;
pr_debug("EDMA_REG_TXDESC2CMPL_MAP_2: 0x%x\n", edma_reg_read(reg));
#endif
/*
* Configure DMA request priority, DMA read burst length,
* and AXI write size.
*/
data = EDMA_DMAR_BURST_LEN_SET(EDMA_BURST_LEN_ENABLE)
| EDMA_DMAR_REQ_PRI_SET(0)
| EDMA_DMAR_TXDATA_OUTSTANDING_NUM_SET(31)
| EDMA_DMAR_TXDESC_OUTSTANDING_NUM_SET(7)
| EDMA_DMAR_RXFILL_OUTSTANDING_NUM_SET(7);
edma_reg_write(EDMA_REG_DMAR_CTRL, data);
#if defined(NSS_DP_IPQ60XX)
data = edma_reg_read(EDMA_REG_AXIW_CTRL);
data |= EDMA_AXIW_MAX_WR_SIZE_EN;
edma_reg_write(EDMA_REG_AXIW_CTRL, data);
#endif
/*
* Misc error mask
*/
data = EDMA_MISC_AXI_RD_ERR_MASK_EN |
EDMA_MISC_AXI_WR_ERR_MASK_EN |
EDMA_MISC_RX_DESC_FIFO_FULL_MASK_EN |
EDMA_MISC_RX_ERR_BUF_SIZE_MASK_EN |
EDMA_MISC_TX_SRAM_FULL_MASK_EN |
EDMA_MISC_TX_CMPL_BUF_FULL_MASK_EN |
EDMA_MISC_DATA_LEN_ERR_MASK_EN;
#if defined(NSS_DP_IPQ807X)
data |= EDMA_MISC_PKT_LEN_LA_64K_MASK_EN |
EDMA_MISC_PKT_LEN_LE_40_MASK_EN;
#else
data |= EDMA_MISC_TX_TIMEOUT_MASK_EN;
#endif
edma_reg_write(EDMA_REG_MISC_INT_MASK, data);
/*
* Global EDMA enable and padding enable
*/
data = EDMA_PORT_PAD_EN | EDMA_PORT_EDMA_EN;
edma_reg_write(EDMA_REG_PORT_CTRL, data);
/*
* Enable Rx rings
*/
for (i = ehw->rxdesc_ring_start; i < ehw->rxdesc_ring_end; i++) {
data = edma_reg_read(EDMA_REG_RXDESC_CTRL(i));
data |= EDMA_RXDESC_RX_EN;
edma_reg_write(EDMA_REG_RXDESC_CTRL(i), data);
}
for (i = ehw->rxfill_ring_start; i < ehw->rxfill_ring_end; i++) {
data = edma_reg_read(EDMA_REG_RXFILL_RING_EN(i));
data |= EDMA_RXFILL_RING_EN;
edma_reg_write(EDMA_REG_RXFILL_RING_EN(i), data);
}
/*
* Enable Tx rings
*/
for (i = ehw->txdesc_ring_start; i < ehw->txdesc_ring_end; i++) {
data = edma_reg_read(EDMA_REG_TXDESC_CTRL(i));
data |= EDMA_TXDESC_TX_EN;
edma_reg_write(EDMA_REG_TXDESC_CTRL(i), data);
}
ehw->edma_initialized = true;
return 0;
}

View File

@@ -1,962 +0,0 @@
/*
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
* USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <linux/interrupt.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/debugfs.h>
#include <fal/fal_vsi.h>
#include "nss_dp_dev.h"
#include "edma_regs.h"
#include "edma_data_plane.h"
/*
* EDMA hardware instance
*/
struct edma_hw edma_hw;
/*
* edma_get_port_num_from_netdev()
* Get port number from net device
*/
static int edma_get_port_num_from_netdev(struct net_device *netdev)
{
int i;
for (i = 0; i < EDMA_MAX_GMACS; i++) {
/* In the port-id to netdev mapping table, port-id
* starts from 1 and table index starts from 0.
* So we return index + 1 for port-id
*/
if (edma_hw.netdev_arr[i] == netdev)
return i+1;
}
return -1;
}
/*
* edma_reg_read()
* Read EDMA register
*/
uint32_t edma_reg_read(uint32_t reg_off)
{
return (uint32_t)readl(edma_hw.reg_base + reg_off);
}
/*
* edma_reg_write()
* Write EDMA register
*/
void edma_reg_write(uint32_t reg_off, uint32_t val)
{
writel(val, edma_hw.reg_base + reg_off);
}
/*
* edma_disable_interrupts()
* Disable EDMA RX/TX interrupt masks.
*/
static void edma_disable_interrupts(void)
{
struct edma_rxdesc_ring *rxdesc_ring = NULL;
struct edma_rxfill_ring *rxfill_ring = NULL;
struct edma_txcmpl_ring *txcmpl_ring = NULL;
int i;
for (i = 0; i < edma_hw.rxdesc_rings; i++) {
rxdesc_ring = &edma_hw.rxdesc_ring[i];
edma_reg_write(EDMA_REG_RXDESC_INT_MASK(rxdesc_ring->id),
EDMA_MASK_INT_CLEAR);
}
for (i = 0; i < edma_hw.txcmpl_rings; i++) {
txcmpl_ring = &edma_hw.txcmpl_ring[i];
edma_reg_write(EDMA_REG_TX_INT_MASK(txcmpl_ring->id),
EDMA_MASK_INT_CLEAR);
}
for (i = 0; i < edma_hw.rxfill_rings; i++) {
rxfill_ring = &edma_hw.rxfill_ring[i];
edma_reg_write(EDMA_REG_RXFILL_INT_MASK(rxfill_ring->id),
EDMA_MASK_INT_CLEAR);
}
/*
* Clear MISC interrupt mask.
*/
edma_reg_write(EDMA_REG_MISC_INT_MASK, EDMA_MASK_INT_CLEAR);
}
/*
* edma_enable_interrupts()
* Enable RX/TX EDMA interrupt masks.
*/
static void edma_enable_interrupts(void)
{
struct edma_rxdesc_ring *rxdesc_ring = NULL;
struct edma_rxfill_ring *rxfill_ring = NULL;
struct edma_txcmpl_ring *txcmpl_ring = NULL;
int i;
for (i = 0; i < edma_hw.rxfill_rings; i++) {
rxfill_ring = &edma_hw.rxfill_ring[i];
edma_reg_write(EDMA_REG_RXFILL_INT_MASK(rxfill_ring->id),
edma_hw.rxfill_intr_mask);
}
for (i = 0; i < edma_hw.txcmpl_rings; i++) {
txcmpl_ring = &edma_hw.txcmpl_ring[i];
edma_reg_write(EDMA_REG_TX_INT_MASK(txcmpl_ring->id),
edma_hw.txcmpl_intr_mask);
}
for (i = 0; i < edma_hw.rxdesc_rings; i++) {
rxdesc_ring = &edma_hw.rxdesc_ring[i];
edma_reg_write(EDMA_REG_RXDESC_INT_MASK(rxdesc_ring->id),
edma_hw.rxdesc_intr_mask);
}
/*
* Enable MISC interrupt mask.
*/
edma_reg_write(EDMA_REG_MISC_INT_MASK, edma_hw.misc_intr_mask);
}
/*
* nss_dp_edma_if_open()
* Do slow path data plane open
*/
static int edma_if_open(struct nss_dp_data_plane_ctx *dpc,
uint32_t tx_desc_ring, uint32_t rx_desc_ring,
uint32_t mode)
{
if (!dpc->dev)
return NSS_DP_FAILURE;
/*
* Enable NAPI
*/
if (edma_hw.active++ != 0)
return NSS_DP_SUCCESS;
napi_enable(&edma_hw.napi);
/*
* Enable the interrupt masks.
*/
edma_enable_interrupts();
return NSS_DP_SUCCESS;
}
/*
* edma_if_close()
* Do slow path data plane close
*/
static int edma_if_close(struct nss_dp_data_plane_ctx *dpc)
{
if (--edma_hw.active != 0)
return NSS_DP_SUCCESS;
/*
* Disable the interrupt masks.
*/
edma_disable_interrupts();
/*
* Disable NAPI
*/
napi_disable(&edma_hw.napi);
return NSS_DP_SUCCESS;
}
/*
* edma_if_link_state()
*/
static int edma_if_link_state(struct nss_dp_data_plane_ctx *dpc,
uint32_t link_state)
{
return NSS_DP_SUCCESS;
}
/*
* edma_if_mac_addr()
*/
static int edma_if_mac_addr(struct nss_dp_data_plane_ctx *dpc, uint8_t *addr)
{
return NSS_DP_SUCCESS;
}
/*
* edma_if_change_mtu()
*/
static int edma_if_change_mtu(struct nss_dp_data_plane_ctx *dpc, uint32_t mtu)
{
return NSS_DP_SUCCESS;
}
/*
* edma_if_xmit()
* Transmit a packet using EDMA
*/
static netdev_tx_t edma_if_xmit(struct nss_dp_data_plane_ctx *dpc,
struct sk_buff *skb)
{
struct net_device *netdev = dpc->dev;
int ret;
uint32_t tx_ring, skbq, nhead, ntail;
bool expand_skb = false;
if (skb->len < ETH_HLEN) {
netdev_dbg(netdev, "skb->len < ETH_HLEN\n");
goto drop;
}
/*
* Select a Tx ring
*/
skbq = skb_get_queue_mapping(skb);
tx_ring = 0;
if ((edma_hw.txdesc_rings > 1) && (skbq > 0))
tx_ring = edma_hw.txdesc_rings % skbq;
/*
* Check for non-linear skb
*/
if (skb_is_nonlinear(skb)) {
netdev_dbg(netdev, "cannot Tx non-linear skb:%px\n", skb);
goto drop;
}
/*
* Check for headroom/tailroom and clone
*/
nhead = netdev->needed_headroom;
ntail = netdev->needed_tailroom;
if (skb_cloned(skb) ||
(skb_headroom(skb) < nhead) ||
(skb_headroom(skb) < ntail)) {
expand_skb = true;
}
/*
* Expand the skb. This also unclones a cloned skb.
*/
if (expand_skb && pskb_expand_head(skb, nhead, ntail, GFP_ATOMIC)) {
netdev_dbg(netdev, "cannot expand skb:%px\n", skb);
goto drop;
}
/*
* Transmit the packet
*/
ret = edma_ring_xmit(&edma_hw, netdev, skb,
&edma_hw.txdesc_ring[tx_ring]);
if (ret == EDMA_TX_OK)
return NETDEV_TX_OK;
/*
* Not enough descriptors. Stop netdev Tx queue.
*/
if (ret == EDMA_TX_DESC) {
netif_stop_queue(netdev);
return NETDEV_TX_BUSY;
}
drop:
dev_kfree_skb_any(skb);
netdev->stats.tx_dropped++;
return NETDEV_TX_OK;
}
/*
* edma_if_set_features()
* Set the supported net_device features
*/
static void edma_if_set_features(struct nss_dp_data_plane_ctx *dpc)
{
/*
* TODO - add flags to support HIGHMEM/cksum offload VLAN
* the features are enabled.
*/
}
/* TODO - check if this is needed */
/*
* edma_if_pause_on_off()
* Set pause frames on or off
*
* No need to send a message if we defaulted to slow path.
*/
static int edma_if_pause_on_off(struct nss_dp_data_plane_ctx *dpc,
uint32_t pause_on)
{
return NSS_DP_SUCCESS;
}
/*
* edma_if_vsi_assign()
* assign vsi of the data plane
*
*/
static int edma_if_vsi_assign(struct nss_dp_data_plane_ctx *dpc, uint32_t vsi)
{
struct net_device *netdev = dpc->dev;
int32_t port_num;
port_num = edma_get_port_num_from_netdev(netdev);
if (port_num < 0)
return NSS_DP_FAILURE;
if (fal_port_vsi_set(0, port_num, vsi) < 0)
return NSS_DP_FAILURE;
return NSS_DP_SUCCESS;
}
/*
* edma_if_vsi_unassign()
* unassign vsi of the data plane
*
*/
static int edma_if_vsi_unassign(struct nss_dp_data_plane_ctx *dpc, uint32_t vsi)
{
struct net_device *netdev = dpc->dev;
uint32_t port_num;
port_num = edma_get_port_num_from_netdev(netdev);
if (port_num < 0)
return NSS_DP_FAILURE;
if (fal_port_vsi_set(0, port_num, 0xffff) < 0)
return NSS_DP_FAILURE;
return NSS_DP_SUCCESS;
}
#ifdef CONFIG_RFS_ACCEL
/*
* edma_if_rx_flow_steer()
* Flow steer of the data plane
*
* Initial receive flow steering function for data plane operation.
*/
static int edma_if_rx_flow_steer(struct nss_dp_data_plane_ctx *dpc, struct sk_buff *skb,
uint32_t cpu, bool is_add)
{
return NSS_DP_SUCCESS;
}
#endif
/*
* edma_if_deinit()
* Free edma resources
*/
static int edma_if_deinit(struct nss_dp_data_plane_ctx *dpc)
{
/*
* Free up resources used by EDMA if all the
* interfaces have been overridden
* */
if (edma_hw.dp_override_cnt == EDMA_MAX_GMACS - 1) {
edma_cleanup(true);
} else {
edma_hw.dp_override_cnt++;
}
return NSS_DP_SUCCESS;
}
/*
* edma_irq_init()
* Initialize interrupt handlers for the driver
*/
static int edma_irq_init(void)
{
int err;
uint32_t entry_num, i;
/*
* Get TXCMPL rings IRQ numbers
*/
entry_num = 0;
for (i = 0; i < edma_hw.txcmpl_rings; i++, entry_num++) {
edma_hw.txcmpl_intr[i] =
platform_get_irq(edma_hw.pdev, entry_num);
if (edma_hw.txcmpl_intr[i] < 0) {
pr_warn("%s: txcmpl_intr[%u] irq get failed\n",
(edma_hw.device_node)->name, i);
return -1;
}
pr_debug("%s: txcmpl_intr[%u] = %u\n",
(edma_hw.device_node)->name,
i, edma_hw.txcmpl_intr[i]);
}
/*
* Get RXFILL rings IRQ numbers
*/
for (i = 0; i < edma_hw.rxfill_rings; i++, entry_num++) {
edma_hw.rxfill_intr[i] =
platform_get_irq(edma_hw.pdev, entry_num);
if (edma_hw.rxfill_intr[i] < 0) {
pr_warn("%s: rxfill_intr[%u] irq get failed\n",
(edma_hw.device_node)->name, i);
return -1;
}
pr_debug("%s: rxfill_intr[%u] = %u\n",
(edma_hw.device_node)->name,
i, edma_hw.rxfill_intr[i]);
}
/*
* Get RXDESC rings IRQ numbers
*
*/
for (i = 0; i < edma_hw.rxdesc_rings; i++, entry_num++) {
edma_hw.rxdesc_intr[i] =
platform_get_irq(edma_hw.pdev, entry_num);
if (edma_hw.rxdesc_intr[i] < 0) {
pr_warn("%s: rxdesc_intr[%u] irq get failed\n",
(edma_hw.device_node)->name, i);
return -1;
}
pr_debug("%s: rxdesc_intr[%u] = %u\n",
(edma_hw.device_node)->name,
i, edma_hw.rxdesc_intr[i]);
}
/*
* Get misc IRQ number
*/
edma_hw.misc_intr = platform_get_irq(edma_hw.pdev, entry_num);
pr_debug("%s: misc IRQ:%u\n",
(edma_hw.device_node)->name,
edma_hw.misc_intr);
/*
* Request IRQ for TXCMPL rings
*/
for (i = 0; i < edma_hw.txcmpl_rings; i++) {
err = request_irq(edma_hw.txcmpl_intr[i],
edma_handle_irq, IRQF_SHARED,
"edma_txcmpl", (void *)edma_hw.pdev);
if (err) {
pr_debug("TXCMPL ring IRQ:%d request failed\n",
edma_hw.txcmpl_intr[i]);
return -1;
}
}
/*
* Request IRQ for RXFILL rings
*/
for (i = 0; i < edma_hw.rxfill_rings; i++) {
err = request_irq(edma_hw.rxfill_intr[i],
edma_handle_irq, IRQF_SHARED,
"edma_rxfill", (void *)edma_hw.pdev);
if (err) {
pr_debug("RXFILL ring IRQ:%d request failed\n",
edma_hw.rxfill_intr[i]);
goto rx_fill_ring_intr_req_fail;
}
}
/*
* Request IRQ for RXDESC rings
*/
for (i = 0; i < edma_hw.rxdesc_rings; i++) {
err = request_irq(edma_hw.rxdesc_intr[i],
edma_handle_irq, IRQF_SHARED,
"edma_rxdesc", (void *)edma_hw.pdev);
if (err) {
pr_debug("RXDESC ring IRQ:%d request failed\n",
edma_hw.rxdesc_intr[i]);
goto rx_desc_ring_intr_req_fail;
}
}
/*
* Request Misc IRQ
*/
err = request_irq(edma_hw.misc_intr, edma_handle_misc_irq,
IRQF_SHARED, "edma_misc",
(void *)edma_hw.pdev);
if (err) {
pr_debug("MISC IRQ:%d request failed\n",
edma_hw.misc_intr);
goto misc_intr_req_fail;
}
return 0;
misc_intr_req_fail:
/*
* Free IRQ for RXDESC rings
*/
for (i = 0; i < edma_hw.rxdesc_rings; i++) {
synchronize_irq(edma_hw.rxdesc_intr[i]);
free_irq(edma_hw.rxdesc_intr[i],
(void *)&(edma_hw.pdev)->dev);
}
rx_desc_ring_intr_req_fail:
/*
* Free IRQ for RXFILL rings
*/
for (i = 0; i < edma_hw.rxfill_rings; i++) {
synchronize_irq(edma_hw.rxfill_intr[i]);
free_irq(edma_hw.rxfill_intr[i],
(void *)&(edma_hw.pdev)->dev);
}
rx_fill_ring_intr_req_fail:
/*
* Free IRQ for TXCMPL rings
*/
for (i = 0; i < edma_hw.txcmpl_rings; i++) {
synchronize_irq(edma_hw.txcmpl_intr[i]);
free_irq(edma_hw.txcmpl_intr[i],
(void *)&(edma_hw.pdev)->dev);
}
return -1;
}
/*
* edma_register_netdevice()
* Register netdevice with EDMA
*/
static int edma_register_netdevice(struct net_device *netdev, uint32_t macid)
{
if (!netdev) {
pr_info("nss_dp_edma: Invalid netdev pointer %px\n", netdev);
return -EINVAL;
}
if ((macid < EDMA_START_GMACS) || (macid > EDMA_MAX_GMACS)) {
netdev_dbg(netdev, "nss_dp_edma: Invalid macid(%d) for %s\n",
macid, netdev->name);
return -EINVAL;
}
netdev_info(netdev, "nss_dp_edma: Registering netdev %s(qcom-id:%d) with EDMA\n",
netdev->name, macid);
/*
* We expect 'macid' to correspond to ports numbers on
* IPQ807x. These begin from '1' and hence we subtract
* one when using it as an array index.
*/
edma_hw.netdev_arr[macid - 1] = netdev;
/*
* NAPI add
*/
if (!edma_hw.napi_added) {
netif_napi_add(netdev, &edma_hw.napi, edma_napi,
EDMA_NAPI_WORK);
/*
* Register the interrupt handlers and enable interrupts
*/
if (edma_irq_init() < 0)
return -EINVAL;
edma_hw.napi_added = 1;
}
return 0;
}
/*
* edma_if_init()
*/
static int edma_if_init(struct nss_dp_data_plane_ctx *dpc)
{
struct net_device *netdev = dpc->dev;
struct nss_dp_dev *dp_dev = (struct nss_dp_dev *)netdev_priv(netdev);
int ret = 0;
/*
* Register the netdev
*/
ret = edma_register_netdevice(netdev, dp_dev->macid);
if (ret) {
netdev_dbg(netdev,
"Error registering netdevice with EDMA %s\n",
netdev->name);
return NSS_DP_FAILURE;
}
/*
* Headroom needed for Tx preheader
*/
netdev->needed_headroom += EDMA_TX_PREHDR_SIZE;
return NSS_DP_SUCCESS;
}
/*
* nss_dp_edma_ops
*/
struct nss_dp_data_plane_ops nss_dp_edma_ops = {
.init = edma_if_init,
.open = edma_if_open,
.close = edma_if_close,
.link_state = edma_if_link_state,
.mac_addr = edma_if_mac_addr,
.change_mtu = edma_if_change_mtu,
.xmit = edma_if_xmit,
.set_features = edma_if_set_features,
.pause_on_off = edma_if_pause_on_off,
.vsi_assign = edma_if_vsi_assign,
.vsi_unassign = edma_if_vsi_unassign,
#ifdef CONFIG_RFS_ACCEL
.rx_flow_steer = edma_if_rx_flow_steer,
#endif
.deinit = edma_if_deinit,
};
/*
* edma_of_get_pdata()
* Read the device tree details for EDMA
*/
static int edma_of_get_pdata(struct resource *edma_res)
{
/*
* Find EDMA node in device tree
*/
edma_hw.device_node = of_find_node_by_name(NULL,
EDMA_DEVICE_NODE_NAME);
if (!edma_hw.device_node) {
pr_warn("EDMA device tree node (%s) not found\n",
EDMA_DEVICE_NODE_NAME);
return -EINVAL;
}
/*
* Get EDMA device node
*/
edma_hw.pdev = of_find_device_by_node(edma_hw.device_node);
if (!edma_hw.pdev) {
pr_warn("Platform device for node %px(%s) not found\n",
edma_hw.device_node,
(edma_hw.device_node)->name);
return -EINVAL;
}
/*
* Get EDMA register resource
*/
if (of_address_to_resource(edma_hw.device_node, 0, edma_res) != 0) {
pr_warn("Unable to get register address for edma device: "
EDMA_DEVICE_NODE_NAME"\n");
return -EINVAL;
}
/*
* Get id of first TXDESC ring
*/
if (of_property_read_u32(edma_hw.device_node, "qcom,txdesc-ring-start",
&edma_hw.txdesc_ring_start) != 0) {
pr_warn("Read error 1st TXDESC ring (txdesc_ring_start)\n");
return -EINVAL;
}
/*
* Get number of TXDESC rings
*/
if (of_property_read_u32(edma_hw.device_node, "qcom,txdesc-rings",
&edma_hw.txdesc_rings) != 0) {
pr_warn("Unable to read number of txdesc rings.\n");
return -EINVAL;
}
edma_hw.txdesc_ring_end = edma_hw.txdesc_ring_start +
edma_hw.txdesc_rings;
/*
* Get id of first TXCMPL ring
*/
if (of_property_read_u32(edma_hw.device_node, "qcom,txcmpl-ring-start",
&edma_hw.txcmpl_ring_start) != 0) {
pr_warn("Read error 1st TXCMPL ring (txcmpl_ring_start)\n");
return -EINVAL;
}
/*
* Get number of TXCMPL rings
*/
if (of_property_read_u32(edma_hw.device_node, "qcom,txcmpl-rings",
&edma_hw.txcmpl_rings) != 0) {
pr_warn("Unable to read number of txcmpl rings.\n");
return -EINVAL;
}
edma_hw.txcmpl_ring_end = edma_hw.txcmpl_ring_start +
edma_hw.txcmpl_rings;
/*
* Get id of first RXFILL ring
*/
if (of_property_read_u32(edma_hw.device_node, "qcom,rxfill-ring-start",
&edma_hw.rxfill_ring_start) != 0) {
pr_warn("Read error 1st RXFILL ring (rxfill-ring-start)\n");
return -EINVAL;
}
/*
* Get number of RXFILL rings
*/
if (of_property_read_u32(edma_hw.device_node, "qcom,rxfill-rings",
&edma_hw.rxfill_rings) != 0) {
pr_warn("Unable to read number of rxfill rings.\n");
return -EINVAL;
}
edma_hw.rxfill_ring_end = edma_hw.rxfill_ring_start +
edma_hw.rxfill_rings;
/*
* Get id of first RXDESC ring
*/
if (of_property_read_u32(edma_hw.device_node, "qcom,rxdesc-ring-start",
&edma_hw.rxdesc_ring_start) != 0) {
pr_warn("Read error 1st RXDESC ring (rxdesc-ring-start)\n");
return -EINVAL;
}
/*
* Get number of RXDESC rings
*/
if (of_property_read_u32(edma_hw.device_node, "qcom,rxdesc-rings",
&edma_hw.rxdesc_rings) != 0) {
pr_warn("Unable to read number of rxdesc rings.\n");
return -EINVAL;
}
edma_hw.rxdesc_ring_end = edma_hw.rxdesc_ring_start +
edma_hw.rxdesc_rings;
return 0;
}
/*
* edma_init()
* EDMA init
*/
int edma_init(void)
{
int ret = 0;
struct resource res_edma;
/*
* Get all the DTS data needed
*/
if (edma_of_get_pdata(&res_edma) < 0) {
pr_warn("Unable to get EDMA DTS data.\n");
return -EINVAL;
}
/*
* Request memory region for EDMA registers
*/
edma_hw.reg_resource = request_mem_region(res_edma.start,
resource_size(&res_edma),
EDMA_DEVICE_NODE_NAME);
if (!edma_hw.reg_resource) {
pr_warn("Unable to request EDMA register memory.\n");
return -EFAULT;
}
/*
* Remap register resource
*/
edma_hw.reg_base = ioremap_nocache((edma_hw.reg_resource)->start,
resource_size(edma_hw.reg_resource));
if (!edma_hw.reg_base) {
pr_warn("Unable to remap EDMA register memory.\n");
ret = -EFAULT;
goto edma_init_remap_fail;
}
if (edma_hw_init(&edma_hw) != 0) {
ret = -EFAULT;
goto edma_init_hw_init_fail;
}
platform_set_drvdata(edma_hw.pdev, (void *)&edma_hw);
edma_hw.napi_added = 0;
return 0;
edma_init_hw_init_fail:
iounmap(edma_hw.reg_base);
edma_init_remap_fail:
release_mem_region((edma_hw.reg_resource)->start,
resource_size(edma_hw.reg_resource));
return ret;
}
/*
* edma_disable_port()
* EDMA disable port
*/
static void edma_disable_port(void)
{
edma_reg_write(EDMA_REG_PORT_CTRL, EDMA_DISABLE);
}
/*
* edma_cleanup()
* EDMA cleanup
*/
void edma_cleanup(bool is_dp_override)
{
int i;
struct edma_txcmpl_ring *txcmpl_ring = NULL;
struct edma_rxdesc_ring *rxdesc_ring = NULL;
/*
* The cleanup can happen from data plane override
* or from module_exit, we want to cleanup only once
*/
if (!edma_hw.edma_initialized) {
/*
* Disable EDMA only at module exit time, since NSS firmware
* depends on this setting.
*/
if (!is_dp_override) {
edma_disable_port();
}
return;
}
/*
* Disable Rx rings used by this driver
*/
for (i = edma_hw.rxdesc_ring_start; i < edma_hw.rxdesc_ring_end; i++)
edma_reg_write(EDMA_REG_RXDESC_CTRL(i), EDMA_RING_DISABLE);
/*
* Disable Tx rings used by this driver
*/
for (i = edma_hw.txdesc_ring_start; i < edma_hw.txdesc_ring_end; i++) {
txcmpl_ring = &edma_hw.txcmpl_ring[i];
edma_reg_write(EDMA_REG_TXDESC_CTRL(i),
EDMA_RING_DISABLE);
}
/*
* Disable RxFill Rings used by this driver
*/
for (i = edma_hw.rxfill_ring_start; i < edma_hw.rxfill_ring_end; i++)
edma_reg_write(EDMA_REG_RXFILL_RING_EN(i), EDMA_RING_DISABLE);
/*
* Clear interrupt mask
*/
for (i = 0; i < edma_hw.rxdesc_rings; i++) {
rxdesc_ring = &edma_hw.rxdesc_ring[i];
edma_reg_write(EDMA_REG_RXDESC_INT_MASK(rxdesc_ring->id),
EDMA_MASK_INT_CLEAR);
}
for (i = 0; i < edma_hw.txcmpl_rings; i++) {
txcmpl_ring = &edma_hw.txcmpl_ring[i];
edma_reg_write(EDMA_REG_TX_INT_MASK(txcmpl_ring->id),
EDMA_MASK_INT_CLEAR);
}
edma_reg_write(EDMA_REG_MISC_INT_MASK, EDMA_MASK_INT_CLEAR);
/*
* Remove interrupt handlers and NAPI
*/
if (edma_hw.napi_added) {
/*
* Free IRQ for TXCMPL rings
*/
for (i = 0; i < edma_hw.txcmpl_rings; i++) {
synchronize_irq(edma_hw.txcmpl_intr[i]);
free_irq(edma_hw.txcmpl_intr[i],
(void *)(edma_hw.pdev));
}
/*
* Free IRQ for RXFILL rings
*/
for (i = 0; i < edma_hw.rxfill_rings; i++) {
synchronize_irq(edma_hw.rxfill_intr[i]);
free_irq(edma_hw.rxfill_intr[i],
(void *)(edma_hw.pdev));
}
/*
* Free IRQ for RXDESC rings
*/
for (i = 0; i < edma_hw.rxdesc_rings; i++) {
synchronize_irq(edma_hw.rxdesc_intr[i]);
free_irq(edma_hw.rxdesc_intr[i],
(void *)(edma_hw.pdev));
}
/*
* Free Misc IRQ
*/
synchronize_irq(edma_hw.misc_intr);
free_irq(edma_hw.misc_intr, (void *)(edma_hw.pdev));
netif_napi_del(&edma_hw.napi);
edma_hw.napi_added = 0;
}
/*
* Disable EDMA only at module exit time, since NSS firmware
* depends on this setting.
*/
if (!is_dp_override) {
edma_disable_port();
}
/*
* cleanup rings and free
*/
edma_cleanup_rings(&edma_hw);
iounmap(edma_hw.reg_base);
release_mem_region((edma_hw.reg_resource)->start,
resource_size(edma_hw.reg_resource));
/*
* Mark initialize false, so that we do not
* try to cleanup again
*/
edma_hw.edma_initialized = false;
}

View File

@@ -1,287 +0,0 @@
/*
**************************************************************************
* Copyright (c) 2016, 2018-2021, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**************************************************************************
*/
#include "nss_dp_dev.h"
#ifndef __NSS_DP_EDMA_DATAPLANE__
#define __NSS_DP_EDMA_DATAPLANE__
#define EDMA_BUF_SIZE 2000
#define EDMA_DEVICE_NODE_NAME "edma"
#define EDMA_RX_BUFF_SIZE (EDMA_BUF_SIZE + EDMA_RX_PREHDR_SIZE)
#define EDMA_RX_PREHDR_SIZE (sizeof(struct edma_rx_preheader))
#define EDMA_TX_PREHDR_SIZE (sizeof(struct edma_tx_preheader))
#define EDMA_RING_SIZE 128
#define EDMA_NAPI_WORK 100
#define EDMA_START_GMACS NSS_DP_START_IFNUM
#define EDMA_MAX_GMACS NSS_DP_HAL_MAX_PORTS
#define EDMA_TX_PKT_MIN_SIZE 33 /* IPQ807x EDMA needs a minimum packet size of 33 bytes */
#if defined(NSS_DP_IPQ60XX)
#define EDMA_MAX_TXCMPL_RINGS 24 /* Max TxCmpl rings */
#else
#define EDMA_MAX_TXCMPL_RINGS 8 /* Max TxCmpl rings */
#endif
#define EDMA_MAX_RXDESC_RINGS 16 /* Max RxDesc rings */
#define EDMA_MAX_RXFILL_RINGS 8 /* Max RxFill rings */
#define EDMA_MAX_TXDESC_RINGS 24 /* Max TxDesc rings */
#define EDMA_GET_DESC(R, i, type) (&(((type *)((R)->desc))[i]))
#define EDMA_RXFILL_DESC(R, i) EDMA_GET_DESC(R, i, struct edma_rxfill_desc)
#define EDMA_RXDESC_DESC(R, i) EDMA_GET_DESC(R, i, struct edma_rxdesc_desc)
#define EDMA_TXDESC_DESC(R, i) EDMA_GET_DESC(R, i, struct edma_txdesc_desc)
#define EDMA_RXPH_SRC_INFO_TYPE_GET(rxph) (((rxph)->src_info >> 8) & 0xf0)
#define EDMA_RXPH_SERVICE_CODE_GET(rxph) (((rxph)->rx_pre4) & 0xff)
/*
* Tx descriptor
*/
struct edma_txdesc_desc {
uint32_t buffer_addr;
/* buffer address */
uint32_t word1;
/* more bit, TSO, preheader, pool, offset and length */
};
/*
* TxCmpl descriptor
*/
struct edma_txcmpl_desc {
uint32_t buffer_addr; /* buffer address/opaque */
uint32_t status; /* status */
};
/*
* Rx descriptor
*/
struct edma_rxdesc_desc {
uint32_t buffer_addr; /* buffer address */
uint32_t status; /* status */
};
/*
* RxFill descriptor
*/
struct edma_rxfill_desc {
uint32_t buffer_addr; /* Buffer address */
uint32_t word1; /* opaque_ind and buffer size */
};
/*
* Tx descriptor ring
*/
struct edma_txdesc_ring {
uint32_t id; /* TXDESC ring number */
void *desc; /* descriptor ring virtual address */
dma_addr_t dma; /* descriptor ring physical address */
spinlock_t tx_lock; /* Tx ring lock */
uint16_t count; /* number of descriptors */
};
/*
* TxCmpl ring
*/
struct edma_txcmpl_ring {
uint32_t id; /* TXCMPL ring number */
void *desc; /* descriptor ring virtual address */
dma_addr_t dma; /* descriptor ring physical address */
uint16_t count; /* number of descriptors in the ring */
};
/*
* RxFill ring
*/
struct edma_rxfill_ring {
uint32_t id; /* RXFILL ring number */
void *desc; /* descriptor ring virtual address */
dma_addr_t dma; /* descriptor ring physical address */
spinlock_t lock; /* Rx ring lock */
uint16_t count; /* number of descriptors in the ring */
};
/*
* RxDesc ring
*/
struct edma_rxdesc_ring {
uint32_t id; /* RXDESC ring number */
struct edma_rxfill_ring *rxfill; /* RXFILL ring used */
void *desc; /* descriptor ring virtual address */
dma_addr_t dma; /* descriptor ring physical address */
uint16_t count; /* number of descriptors in the ring */
};
/*
* EDMA Tx Preheader
*/
struct edma_tx_preheader {
uint32_t opaque; /* Opaque, contains skb pointer */
uint16_t src_info; /* Src information */
uint16_t dst_info; /* Dest information */
uint32_t tx_pre2; /* SVLAN & CVLAN flag, drop prec, hash value */
uint32_t tx_pre3; /* STAG, CTAG */
uint32_t tx_pre4; /* CPU code, L3 & L4 offset, service code */
uint32_t tx_pre5; /* IP addr index, ACL index */
uint32_t tx_pre6; /* IP payload checksum, copy2cpu, timestamp, dscp */
uint32_t tx_pre7; /* Timestamp, QoS TAG */
};
/*
* EDMA Rx Preheader
*/
struct edma_rx_preheader {
uint32_t opaque;
/* Opaque, contains skb pointer*/
uint16_t src_info;
/* Src information */
uint16_t dst_info;
/* Dest information */
uint32_t rx_pre2;
/* SVLAN & CVLAN flag, drop prec, hash value */
uint32_t rx_pre3;
/* STAG, CTAG */
uint32_t rx_pre4;
/* CPU code, L3 & L4 offset, service code */
uint32_t rx_pre5;
/* IP addr index, ACL index */
uint32_t rx_pre6;
/* IP payload checksum, copy2cpu, timestamp, dscp */
uint32_t rx_pre7;
/* Timestamp, QoS TAG */
};
enum edma_tx {
EDMA_TX_OK = 0, /* Tx success */
EDMA_TX_DESC = 1, /* Not enough descriptors */
EDMA_TX_FAIL = 2, /* Tx failure */
};
/*
* EDMA private data structure
*/
struct edma_hw {
struct napi_struct napi;
/* napi structure */
struct net_device *netdev_arr[EDMA_MAX_GMACS];
/* netdev for each gmac port */
struct device_node *device_node;
/* Device tree node */
struct platform_device *pdev;
/* Platform device */
void __iomem *reg_base;
/* Base register address */
struct resource *reg_resource;
/* Memory resource */
uint16_t rx_payload_offset;
/* start of the payload offset */
uint32_t flags;
/* internal flags */
int active;
/* status */
int napi_added;
/* flag to indicate napi add status */
/*
* Debugfs entries
*/
struct dentry *edma_dentry;
struct dentry *txdesc_dentry;
struct dentry *txcmpl_dentry;
struct dentry *rxdesc_dentry;
/*
* Store for tx and rx skbs
*/
struct sk_buff *rx_skb_store[EDMA_RING_SIZE];
struct sk_buff *tx_skb_store[EDMA_RING_SIZE];
struct edma_rxfill_ring *rxfill_ring;
/* Rx Fill Ring, SW is producer */
struct edma_rxdesc_ring *rxdesc_ring;
/* Rx Descriptor Ring, SW is consumer */
struct edma_txdesc_ring *txdesc_ring;
/* Tx Descriptor Ring, SW is producer */
struct edma_txcmpl_ring *txcmpl_ring;
/* Tx Completion Ring, SW is consumer */
uint32_t txdesc_rings;
/* Number of TxDesc rings */
uint32_t txdesc_ring_start;
/* Id of first TXDESC ring */
uint32_t txdesc_ring_end;
/* Id of the last TXDESC ring */
uint32_t txcmpl_rings;
/* Number of TxCmpl rings */
uint32_t txcmpl_ring_start;
/* Id of first TXCMPL ring */
uint32_t txcmpl_ring_end;
/* Id of last TXCMPL ring */
uint32_t rxfill_rings;
/* Number of RxFill rings */
uint32_t rxfill_ring_start;
/* Id of first RxFill ring */
uint32_t rxfill_ring_end;
/* Id of last RxFill ring */
uint32_t rxdesc_rings;
/* Number of RxDesc rings */
uint32_t rxdesc_ring_start;
/* Id of first RxDesc ring */
uint32_t rxdesc_ring_end;
/* Id of last RxDesc ring */
uint32_t txcmpl_intr[EDMA_MAX_TXCMPL_RINGS];
/* TxCmpl ring IRQ numbers */
uint32_t rxfill_intr[EDMA_MAX_RXFILL_RINGS];
/* Rx fill ring IRQ numbers */
uint32_t rxdesc_intr[EDMA_MAX_RXDESC_RINGS];
/* Rx desc ring IRQ numbers */
uint32_t misc_intr;
/* Misc IRQ number */
uint32_t tx_intr_mask;
/* Tx interrupt mask */
uint32_t rxfill_intr_mask;
/* Rx fill ring interrupt mask */
uint32_t rxdesc_intr_mask;
/* Rx Desc ring interrupt mask */
uint32_t txcmpl_intr_mask;
/* Tx Cmpl ring interrupt mask */
uint32_t misc_intr_mask;
/* misc interrupt interrupt mask */
uint32_t dp_override_cnt;
/* number of interfaces overriden */
bool edma_initialized;
/* flag to check initialization status */
};
extern struct edma_hw edma_hw;
uint32_t edma_reg_read(uint32_t reg_off);
void edma_reg_write(uint32_t reg_off, uint32_t val);
int edma_alloc_rx_buffer(struct edma_hw *ehw,
struct edma_rxfill_ring *rxfill_ring);
enum edma_tx edma_ring_xmit(struct edma_hw *ehw,
struct net_device *netdev,
struct sk_buff *skb,
struct edma_txdesc_ring *txdesc_ring);
uint32_t edma_clean_tx(struct edma_hw *ehw,
struct edma_txcmpl_ring *txcmpl_ring);
irqreturn_t edma_handle_irq(int irq, void *ctx);
irqreturn_t edma_handle_misc_irq(int irq, void *ctx);
int edma_napi(struct napi_struct *napi, int budget);
void edma_cleanup_rings(struct edma_hw *ehw);
void edma_cleanup(bool is_dp_override);
int edma_hw_init(struct edma_hw *ehw);
#endif /* __NSS_DP_EDMA_DATAPLANE__ */

View File

@@ -1,454 +0,0 @@
/*
**************************************************************************
* Copyright (c) 2016,2019-2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**************************************************************************
*/
#ifndef __EDMA_REGS__
#define __EDMA_REGS__
/*
* IPQ807x EDMA register offsets
*/
#define EDMA_REG_MAS_CTRL 0x0
#define EDMA_REG_PORT_CTRL 0x4
#define EDMA_REG_VLAN_CTRL 0x8
#define EDMA_REG_RXDESC2FILL_MAP_0 0x18
#define EDMA_REG_RXDESC2FILL_MAP_1 0x1c
#define EDMA_REG_TXQ_CTRL 0x20
#define EDMA_REG_TXQ_CTRL_2 0x24
#define EDMA_REG_TXQ_FC_0 0x28
#define EDMA_REG_TXQ_FC_1 0x30
#define EDMA_REG_TXQ_FC_2 0x34
#define EDMA_REG_TXQ_FC_3 0x38
#define EDMA_REG_RXQ_CTRL 0x3c
#define EDMA_REG_RX_TX_FULL_QID 0x40
#define EDMA_REG_RXQ_FC_THRE 0x44
#define EDMA_REG_DMAR_CTRL 0x48
#define EDMA_REG_AXIR_CTRL 0x4c
#define EDMA_REG_AXIW_CTRL 0x50
#define EDMA_REG_MIN_MSS 0x54
#define EDMA_REG_LOOPBACK_CTRL 0x58
#define EDMA_REG_MISC_INT_STAT 0x5c
#define EDMA_REG_MISC_INT_MASK 0x60
#define EDMA_REG_DBG_CTRL 0x64
#define EDMA_REG_DBG_DATA 0x68
#define EDMA_REG_TXDESC_BA(n) (0x1000 + (0x1000 * n))
#define EDMA_REG_TXDESC_PROD_IDX(n) (0x1004 + (0x1000 * n))
#define EDMA_REG_TXDESC_CONS_IDX(n) (0x1008 + (0x1000 * n))
#define EDMA_REG_TXDESC_RING_SIZE(n) (0x100c + (0x1000 * n))
#define EDMA_REG_TXDESC_CTRL(n) (0x1010 + (0x1000 * n))
#if defined(NSS_DP_IPQ807X)
#define EDMA_REG_TXDESC2CMPL_MAP_0 0xc
#define EDMA_REG_TXDESC2CMPL_MAP_1 0x10
#define EDMA_REG_TXDESC2CMPL_MAP_2 0x14
#define EDMA_REG_TXCMPL_BASE 0x19000
#define EDMA_REG_TX_BASE 0x21000
#else
#define EDMA_REG_TXCMPL_BASE 0x79000
#define EDMA_REG_TX_BASE 0x91000
#endif
#define EDMA_REG_TXCMPL_BA_OFFSET 0x00000
#define EDMA_REG_TXCMPL_PROD_IDX_OFFSET 0x00004
#define EDMA_REG_TXCMPL_CONS_IDX_OFFSET 0x00008
#define EDMA_REG_TXCMPL_RING_SIZE_OFFSET 0x0000c
#define EDMA_REG_TXCMPL_UGT_THRE_OFFSET 0x00010
#define EDMA_REG_TXCMPL_CTRL_OFFSET 0x00014
#define EDMA_REG_TXCMPL_BPC_OFFSET 0x00018
#define EDMA_REG_TX_INT_STAT_OFFSET 0x00000
#define EDMA_REG_TX_INT_MASK_OFFSET 0x00004
#define EDMA_REG_TX_MOD_TIMER_OFFSET 0x00008
#define EDMA_REG_TX_INT_CTRL_OFFSET 0x0000c
#define EDMA_REG_TXCMPL_BA(n) (EDMA_REG_TXCMPL_BASE + EDMA_REG_TXCMPL_BA_OFFSET + (0x1000 * n))
#define EDMA_REG_TXCMPL_PROD_IDX(n) (EDMA_REG_TXCMPL_BASE + EDMA_REG_TXCMPL_PROD_IDX_OFFSET + (0x1000 * n))
#define EDMA_REG_TXCMPL_CONS_IDX(n) (EDMA_REG_TXCMPL_BASE + EDMA_REG_TXCMPL_CONS_IDX_OFFSET + (0x1000 * n))
#define EDMA_REG_TXCMPL_RING_SIZE(n) (EDMA_REG_TXCMPL_BASE + EDMA_REG_TXCMPL_RING_SIZE_OFFSET + (0x1000 * n))
#define EDMA_REG_TXCMPL_UGT_THRE(n) (EDMA_REG_TXCMPL_BASE + EDMA_REG_TXCMPL_UGT_THRE_OFFSET + (0x1000 * n))
#define EDMA_REG_TXCMPL_CTRL(n) (EDMA_REG_TXCMPL_BASE + EDMA_REG_TXCMPL_CTRL_OFFSET + (0x1000 * n))
#define EDMA_REG_TXCMPL_BPC(n) (EDMA_REG_TXCMPL_BASE + EDMA_REG_TXCMPL_BPC_OFFSET + (0x1000 * n))
#define EDMA_REG_TX_INT_STAT(n) (EDMA_REG_TX_BASE + EDMA_REG_TX_INT_STAT_OFFSET + (0x1000 * n))
#define EDMA_REG_TX_INT_MASK(n) (EDMA_REG_TX_BASE + EDMA_REG_TX_INT_MASK_OFFSET + (0x1000 * n))
#define EDMA_REG_TX_MOD_TIMER(n) (EDMA_REG_TX_BASE + EDMA_REG_TX_MOD_TIMER_OFFSET + (0x1000 * n))
#define EDMA_REG_TX_INT_CTRL(n) (EDMA_REG_TX_BASE + EDMA_REG_TX_INT_CTRL_OFFSET + (0x1000 * n))
#define EDMA_REG_RXFILL_BA(n) (0x29000 + (0x1000 * n))
#define EDMA_REG_RXFILL_PROD_IDX(n) (0x29004 + (0x1000 * n))
#define EDMA_REG_RXFILL_CONS_IDX(n) (0x29008 + (0x1000 * n))
#define EDMA_REG_RXFILL_RING_SIZE(n) (0x2900c + (0x1000 * n))
#define EDMA_REG_RXFILL_BUFFER1_SIZE(n) (0x29010 + (0x1000 * n))
#define EDMA_REG_RXFILL_FC_THRE(n) (0x29014 + (0x1000 * n))
#define EDMA_REG_RXFILL_UGT_THRE(n) (0x29018 + (0x1000 * n))
#define EDMA_REG_RXFILL_RING_EN(n) (0x2901c + (0x1000 * n))
#define EDMA_REG_RXFILL_DISABLE(n) (0x29020 + (0x1000 * n))
#define EDMA_REG_RXFILL_DISABLE_DONE(n) (0x29024 + (0x1000 * n))
#define EDMA_REG_RXFILL_INT_STAT(n) (0x31000 + (0x1000 * n))
#define EDMA_REG_RXFILL_INT_MASK(n) (0x31004 + (0x1000 * n))
#define EDMA_REG_RXDESC_BA(n) (0x39000 + (0x1000 * n))
#define EDMA_REG_RXDESC_PROD_IDX(n) (0x39004 + (0x1000 * n))
#define EDMA_REG_RXDESC_CONS_IDX(n) (0x39008 + (0x1000 * n))
#define EDMA_REG_RXDESC_RING_SIZE(n) (0x3900c + (0x1000 * n))
#define EDMA_REG_RXDESC_FC_THRE(n) (0x39010 + (0x1000 * n))
#define EDMA_REG_RXDESC_UGT_THRE(n) (0x39014 + (0x1000 * n))
#define EDMA_REG_RXDESC_CTRL(n) (0x39018 + (0x1000 * n))
#define EDMA_REG_RXDESC_BPC(n) (0x3901c + (0x1000 * n))
#define EDMA_REG_RXDESC_INT_STAT(n) (0x49000 + (0x1000 * n))
#define EDMA_REG_RXDESC_INT_MASK(n) (0x49004 + (0x1000 * n))
#define EDMA_REG_RX_MOD_TIMER(n) (0x49008 + (0x1000 * n))
#define EDMA_REG_RX_INT_CTRL(n) (0x4900c + (0x1000 * n))
#define EDMA_QID2RID_TABLE_MEM(q) (0x5a000 + (0x4 * q))
#define EDMA_REG_RXRING_PC(n) (0x5A200 + (0x10 * n))
#define EDMA_REG_RXRING_BC_0(n) (0x5A204 + (0x10 * n))
#define EDMA_REG_RXRING_BC_1(n) (0x5A208 + (0x10 * n))
#define EDMA_REG_TXRING_PC(n) (0x74000 + (0x10 * n))
#define EDMA_REG_TXRING_BC_0(n) (0x74004 + (0x10 * n))
#define EDMA_REG_TXRING_BC_1(n) (0x74008 + (0x10 * n))
/*
* EDMA_REG_PORT_CTRL register
*/
#define EDMA_PORT_PAD_EN 0x1
#define EDMA_PORT_EDMA_EN 0x2
/*
* EDMA_REG_TXQ_CTRL register
*/
#define EDMA_TXDESC_PF_THRE_MASK 0xf
#define EDMA_TXDESC_PF_THRE_SHIFT 0
#define EDMA_TXCMPL_WB_THRE_MASK 0xf
#define EDMA_TXCMPL_WB_THRE_SHIFT 4
#define EDMA_TXDESC_PKT_SRAM_THRE_MASK 0xff
#define EDMA_TXDESC_PKT_SRAM_THRE_SHIFT 8
#define EDMA_TXCMPL_WB_TIMER_MASK 0xffff
#define EDMA_TXCMPL_WB_TIMER_SHIFT 16
/*
* EDMA_REG_RXQ_CTRL register
*/
#define EDMA_RXFILL_PF_THRE_MASK 0xf
#define EDMA_RXFILL_PF_THRE_SHIFT 0
#define EDMA_RXDESC_WB_THRE_MASK 0xf
#define EDMA_RXDESC_WB_THRE_SHIFT 4
#define EDMA_RXDESC_WB_TIMER_MASK 0xffff
#define EDMA_RXDESC_WB_TIMER_SHIFT 16
/*
* EDMA_REG_RX_TX_FULL_QID register
*/
#define EDMA_RX_DESC_FULL_QID_MASK 0xff
#define EDMA_RX_DESC_FULL_QID_SHIFT 0
#define EDMA_TX_CMPL_BUF_FULL_QID_MASK 0xff
#define EDMA_TX_CMPL_BUF_FULL_QID_SHIFT 8
#define EDMA_TX_SRAM_FULL_QID_MASK 0x1f
#define EDMA_TX_SRAM_FULL_QID_SHIFT 16
/*
* EDMA_REG_RXQ_FC_THRE reister
*/
#define EDMA_RXFILL_FIFO_XOFF_THRE_MASK 0x1f
#define EDMA_RXFILL_FIFO_XOFF_THRE_SHIFT 0
#define EDMA_DESC_FIFO_XOFF_THRE_MASK 0x3f
#define EDMA_DESC_FIFO_XOFF_THRE_SHIFT 16
/*
* EDMA_REG_DMAR_CTRL register
*/
#define EDMA_DMAR_REQ_PRI_MASK 0x7
#define EDMA_DMAR_REQ_PRI_SHIFT 0
#define EDMA_DMAR_BURST_LEN_MASK 0x1
#define EDMA_DMAR_BURST_LEN_SHIFT 3
#define EDMA_DMAR_TXDATA_OUTSTANDING_NUM_MASK 0x1f
#define EDMA_DMAR_TXDATA_OUTSTANDING_NUM_SHIFT 4
#define EDMA_DMAR_TXDESC_OUTSTANDING_NUM_MASK 0x7
#define EDMA_DMAR_TXDESC_OUTSTANDING_NUM_SHIFT 9
#define EDMA_DMAR_RXFILL_OUTSTANDING_NUM_MASK 0x7
#define EDMA_DMAR_RXFILL_OUTSTANDING_NUM_SHIFT 12
#define EDMA_DMAR_REQ_PRI_SET(x) (((x) & EDMA_DMAR_REQ_PRI_MASK) << EDMA_DMAR_REQ_PRI_SHIFT)
#define EDMA_DMAR_TXDATA_OUTSTANDING_NUM_SET(x) (((x) & EDMA_DMAR_TXDATA_OUTSTANDING_NUM_MASK) << EDMA_DMAR_TXDATA_OUTSTANDING_NUM_SHIFT)
#define EDMA_DMAR_TXDESC_OUTSTANDING_NUM_SET(x) (((x) & EDMA_DMAR_TXDESC_OUTSTANDING_NUM_MASK) << EDMA_DMAR_TXDESC_OUTSTANDING_NUM_SHIFT)
#define EDMA_DMAR_RXFILL_OUTSTANDING_NUM_SET(x) (((x) & EDMA_DMAR_RXFILL_OUTSTANDING_NUM_MASK) << EDMA_DMAR_RXFILL_OUTSTANDING_NUM_SHIFT)
#define EDMA_DMAR_BURST_LEN_SET(x) (((x) & EDMA_DMAR_BURST_LEN_MASK) << EDMA_DMAR_BURST_LEN_SHIFT)
/*
* Enable 128 byte EDMA burts for IPQ60xx
*/
#if defined(NSS_DP_IPQ60XX)
#define EDMA_BURST_LEN_ENABLE 1
#else
#define EDMA_BURST_LEN_ENABLE 0
#endif
/*
* EDMA_REG_AXIW_CTRL_REG
*/
#define EDMA_AXIW_MAX_WR_SIZE_EN 0x400
/*
* EDMA DISABLE
*/
#define EDMA_DISABLE 0
/*
* EDMA_REG_TXDESC_PROD_IDX register
*/
#define EDMA_TXDESC_PROD_IDX_MASK 0xffff
/*
* EDMA_REG_TXDESC_CONS_IDX register
*/
#define EDMA_TXDESC_CONS_IDX_MASK 0xffff
/*
* EDMA_REG_TXDESC_RING_SIZE register
*/
#define EDMA_TXDESC_RING_SIZE_MASK 0xffff
/*
* EDMA_REG_TXDESC_CTRL register
*/
#define EDMA_TXDESC_ARB_GRP_ID_MASK 0x3
#define EDMA_TXDESC_ARB_GRP_ID_SHIFT 4
#define EDMA_TXDESC_FC_GRP_ID_MASK 0x7
#define EDMA_TXDESC_FC_GRP_ID_SHIFT 1
#define EDMA_TXDESC_TX_EN 0x1
/*
* EDMA_REG_TXCMPL_PROD_IDX register
*/
#define EDMA_TXCMPL_PROD_IDX_MASK 0xffff
/*
* EDMA_REG_TXCMPL_CONS_IDX register
*/
#define EDMA_TXCMPL_CONS_IDX_MASK 0xffff
/*
* EDMA_REG_TXCMPL_RING_SIZE register
*/
#define EDMA_TXCMPL_RING_SIZE_MASK 0xffff
/*
* EDMA_REG_TXCMPL_UGT_THRE register
*/
#define EDMA_TXCMPL_LOW_THRE_MASK 0xffff
#define EDMA_TXCMPL_LOW_THRE_SHIFT 0
#define EDMA_TXCMPL_FC_THRE_MASK 0x3f
#define EDMA_TXCMPL_FC_THRE_SHIFT 16
/*
* EDMA_REG_TXCMPL_CTRL register
*/
#define EDMA_TXCMPL_RET_MODE_BUFF_ADDR 0x0
#define EDMA_TXCMPL_RET_MODE_OPAQUE 0x1
/*
* EDMA_REG_TX_MOD_TIMER register
*/
#define EDMA_TX_MOD_TIMER_INIT_MASK 0xffff
#define EDMA_TX_MOD_TIMER_INIT_SHIFT 0
/*
* EDMA_REG_TX_INT_CTRL register
*/
#define EDMA_TX_INT_MASK 0x3
/*
* EDMA_REG_RXFILL_PROD_IDX register
*/
#define EDMA_RXFILL_PROD_IDX_MASK 0xffff
/*
* EDMA_REG_RXFILL_CONS_IDX register
*/
#define EDMA_RXFILL_CONS_IDX_MASK 0xffff
/*
* EDMA_REG_RXFILL_RING_SIZE register
*/
#define EDMA_RXFILL_RING_SIZE_MASK 0xffff
#define EDMA_RXFILL_BUF_SIZE_MASK 0x3fff
#define EDMA_RXFILL_BUF_SIZE_SHIFT 16
/*
* EDMA_REG_RXFILL_FC_THRE register
*/
#define EDMA_RXFILL_FC_XON_THRE_MASK 0x7ff
#define EDMA_RXFILL_FC_XON_THRE_SHIFT 12
#define EDMA_RXFILL_FC_XOFF_THRE_MASK 0x7ff
#define EDMA_RXFILL_FC_XOFF_THRE_SHIFT 0
/*
* EDMA_REG_RXFILL_UGT_THRE register
*/
#define EDMA_RXFILL_LOW_THRE_MASK 0xffff
#define EDMA_RXFILL_LOW_THRE_SHIFT 0
/*
* EDMA_REG_RXFILL_RING_EN register
*/
#define EDMA_RXFILL_RING_EN 0x1
/*
* EDMA_REG_RXFILL_INT_MASK register
*/
#define EDMA_RXFILL_INT_MASK 0x1
/*
* EDMA_REG_RXDESC_PROD_IDX register
*/
#define EDMA_RXDESC_PROD_IDX_MASK 0xffff
/*
* EDMA_REG_RXDESC_CONS_IDX register
*/
#define EDMA_RXDESC_CONS_IDX_MASK 0xffff
/*
* EDMA_REG_RXDESC_RING_SIZE register
*/
#define EDMA_RXDESC_RING_SIZE_MASK 0xffff
#define EDMA_RXDESC_PL_OFFSET_MASK 0x1ff
#define EDMA_RXDESC_PL_OFFSET_SHIFT 16
/*
* EDMA_REG_RXDESC_FC_THRE register
*/
#define EDMA_RXDESC_FC_XON_THRE_MASK 0x7ff
#define EDMA_RXDESC_FC_XON_THRE_SHIFT 12
#define EDMA_RXDESC_FC_XOFF_THRE_MASK 0x7ff
#define EDMA_RXDESC_FC_XOFF_THRE_SHIFT 0
/*
* EDMA_REG_RXDESC_UGT_THRE register
*/
#define EDMA_RXDESC_LOW_THRE_MASK 0xffff
#define EDMA_RXDESC_LOW_THRE_SHIFT 0
/*
* EDMA_REG_RXDESC_CTRL register
*/
#define EDMA_RXDESC_STAG_REMOVE_EN 0x8
#define EDMA_RXDESC_CTAG_REMOVE_EN 0x4
#define EDMA_RXDESC_QDISC_EN 0x2
#define EDMA_RXDESC_RX_EN 0x1
/*
* EDMA_REG_TX_INT_MASK register
*/
#define EDMA_TX_INT_MASK_PKT_INT 0x1
#define EDMA_TX_INT_MASK_UGT_INT 0x2
/*
* EDMA_REG_RXDESC_INT_STAT register
*/
#define EDMA_RXDESC_INT_STAT_PKT_INT 0x1
#define EDMA_RXDESC_INT_STAT_UGT_INT 0x2
/*
* EDMA_REG_RXDESC_INT_MASK register
*/
#define EDMA_RXDESC_INT_MASK_PKT_INT 0x1
#define EDMA_RXDESC_INT_MASK_TIMER_INT_DIS 0x2
#define EDMA_MASK_INT_DISABLE 0x0
#define EDMA_MASK_INT_CLEAR 0x0
/*
* EDMA_REG_RX_MOD_TIMER register
*/
#define EDMA_RX_MOD_TIMER_INIT_MASK 0xffff
#define EDMA_RX_MOD_TIMER_INIT_SHIFT 0
/*
* EDMA QID2RID register sizes
*/
#define EDMA_QID2RID_DEPTH 0x40
#define EDMA_QID2RID_QUEUES_PER_ENTRY 8
/*
* TXDESC shift values
*/
#define EDMA_TXDESC_MORE_SHIFT 31
#define EDMA_TXDESC_TSO_EN_SHIFT 30
#define EDMA_TXDESC_PREHEADER_SHIFT 29
#define EDMA_TXDESC_POOL_ID_SHIFT 24
#define EDMA_TXDESC_POOL_ID_MASK 0x1f
#define EDMA_TXDESC_DATA_OFFSET_SHIFT 16
#define EDMA_TXDESC_DATA_OFFSET_MASK 0xff
#define EDMA_TXDESC_DATA_LENGTH_SHIFT 0
#define EDMA_TXDESC_DATA_LENGTH_MASK 0xffff
#define EDMA_PREHDR_DSTINFO_PORTID_IND 0x20
#define EDMA_PREHDR_PORTNUM_BITS 0x0fff
#define EDMA_RING_DMA_MASK 0xffffffff
/*
* RXDESC shift values
*/
#define EDMA_RXDESC_RX_RXFILL_CNT_MASK 0x000f
#define EDMA_RXDESC_RX_RXFILL_CNT_SHIFT 16
#define EDMA_RXDESC_PKT_SIZE_MASK 0x3fff
#define EDMA_RXDESC_PKT_SIZE_SHIFT 0
#define EDMA_RXDESC_RXD_VALID_MASK 0x1
#define EDMA_RXDESC_RXD_VALID_SHIFT 31
#define EDMA_RXDESC_PACKET_LEN_MASK 0x3fff
#define EDMA_RXDESC_RING_INT_STATUS_MASK 0x3
#define EDMA_RING_DISABLE 0
#define EDMA_TXCMPL_RING_INT_STATUS_MASK 0x3
#define EDMA_TXCMPL_RETMODE_OPAQUE 0x0
#define EDMA_RXFILL_RING_INT_STATUS_MASK 0x1
/*
* TODO tune the timer and threshold values
*/
#define EDMA_RXFILL_FIFO_XOFF_THRE 0x3
#define EDMA_RXFILL_PF_THRE 0x3
#define EDMA_RXDESC_WB_THRE 0x0
#define EDMA_RXDESC_WB_TIMER 0x2
#define EDMA_RXDESC_XON_THRE 50
#define EDMA_RXDESC_XOFF_THRE 30
#define EDMA_RXDESC_LOW_THRE 0
#define EDMA_RX_MOD_TIMER_INIT 1000
#define EDMA_TXDESC_PF_THRE 0x3
#define EDMA_TXCMPL_WB_THRE 0X0
#define EDMA_TXDESC_PKT_SRAM_THRE 0x20
#define EDMA_TXCMPL_WB_TIMER 0x2
#define EDMA_TX_MOD_TIMER 150
/*
* EDMA misc error mask
*/
#define EDMA_MISC_AXI_RD_ERR_MASK_EN 0x1
#define EDMA_MISC_AXI_WR_ERR_MASK_EN 0x2
#define EDMA_MISC_RX_DESC_FIFO_FULL_MASK_EN 0x4
#define EDMA_MISC_RX_ERR_BUF_SIZE_MASK_EN 0x8
#define EDMA_MISC_TX_SRAM_FULL_MASK_EN 0x10
#define EDMA_MISC_TX_CMPL_BUF_FULL_MASK_EN 0x20
#if defined(NSS_DP_IPQ807X)
#define EDMA_MISC_PKT_LEN_LA_64K_MASK_EN 0x40
#define EDMA_MISC_PKT_LEN_LE_40_MASK_EN 0x80
#define EDMA_MISC_DATA_LEN_ERR_MASK_EN 0x100
#else
#define EDMA_MISC_DATA_LEN_ERR_MASK_EN 0x40
#define EDMA_MISC_TX_TIMEOUT_MASK_EN 0x80
#endif
#endif /* __EDMA_REGS__ */

View File

@@ -1,795 +0,0 @@
/*
* Copyright (c) 2016-2018, 2020-21, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
* USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <linux/version.h>
#include <linux/interrupt.h>
#include <linux/phy.h>
#include <linux/netdevice.h>
#include <linux/debugfs.h>
#include "nss_dp_dev.h"
#include "edma_regs.h"
#include "edma_data_plane.h"
/*
* edma_alloc_rx_buffer()
* Alloc Rx buffers for one RxFill ring
*/
int edma_alloc_rx_buffer(struct edma_hw *ehw,
struct edma_rxfill_ring *rxfill_ring)
{
struct platform_device *pdev = ehw->pdev;
struct sk_buff *skb;
uint16_t num_alloc = 0;
uint16_t cons, next, counter;
struct edma_rxfill_desc *rxfill_desc;
uint32_t reg_data = 0;
uint32_t store_index = 0;
struct edma_rx_preheader *rxph = NULL;
/*
* Read RXFILL ring producer index
*/
reg_data = edma_reg_read(EDMA_REG_RXFILL_PROD_IDX(rxfill_ring->id));
next = reg_data & EDMA_RXFILL_PROD_IDX_MASK & (rxfill_ring->count - 1);
/*
* Read RXFILL ring consumer index
*/
reg_data = edma_reg_read(EDMA_REG_RXFILL_CONS_IDX(rxfill_ring->id));
cons = reg_data & EDMA_RXFILL_CONS_IDX_MASK;
while (1) {
counter = next;
if (++counter == rxfill_ring->count)
counter = 0;
if (counter == cons)
break;
/*
* Allocate buffer
*/
skb = dev_alloc_skb(EDMA_RX_BUFF_SIZE);
if (unlikely(!skb))
break;
/*
* Get RXFILL descriptor
*/
rxfill_desc = EDMA_RXFILL_DESC(rxfill_ring, next);
/*
* Make room for Rx preheader
*/
rxph = (struct edma_rx_preheader *)
skb_push(skb, EDMA_RX_PREHDR_SIZE);
/*
* Store the skb in the rx store
*/
store_index = next;
if (ehw->rx_skb_store[store_index] != NULL) {
dev_kfree_skb_any(skb);
break;
}
ehw->rx_skb_store[store_index] = skb;
memcpy((uint8_t *)&rxph->opaque, (uint8_t *)&store_index, 4);
/*
* Save buffer size in RXFILL descriptor
*/
rxfill_desc->word1 = cpu_to_le32(EDMA_RX_BUFF_SIZE
& EDMA_RXFILL_BUF_SIZE_MASK);
/*
* Map Rx buffer for DMA
*/
rxfill_desc->buffer_addr = cpu_to_le32(dma_map_single(
&pdev->dev,
skb->data,
EDMA_RX_BUFF_SIZE,
DMA_FROM_DEVICE));
if (!rxfill_desc->buffer_addr) {
dev_kfree_skb_any(skb);
ehw->rx_skb_store[store_index] = NULL;
break;
}
num_alloc++;
next = counter;
}
if (num_alloc) {
/*
* Update RXFILL ring producer index
*/
reg_data = next & EDMA_RXFILL_PROD_IDX_MASK;
/*
* make sure the producer index updated before
* updating the hardware
*/
wmb();
edma_reg_write(EDMA_REG_RXFILL_PROD_IDX(rxfill_ring->id),
reg_data);
}
return num_alloc;
}
/*
* edma_clean_tx()
* Reap Tx descriptors
*/
uint32_t edma_clean_tx(struct edma_hw *ehw,
struct edma_txcmpl_ring *txcmpl_ring)
{
struct platform_device *pdev = ehw->pdev;
struct edma_txcmpl_desc *txcmpl = NULL;
uint16_t prod_idx = 0;
uint16_t cons_idx = 0;
uint32_t data = 0;
uint32_t txcmpl_consumed = 0;
struct sk_buff *skb;
uint32_t len;
int store_index;
dma_addr_t daddr;
/*
* Get TXCMPL ring producer index
*/
data = edma_reg_read(EDMA_REG_TXCMPL_PROD_IDX(txcmpl_ring->id));
prod_idx = data & EDMA_TXCMPL_PROD_IDX_MASK;
/*
* Get TXCMPL ring consumer index
*/
data = edma_reg_read(EDMA_REG_TXCMPL_CONS_IDX(txcmpl_ring->id));
cons_idx = data & EDMA_TXCMPL_CONS_IDX_MASK;
while (cons_idx != prod_idx) {
txcmpl = &(((struct edma_txcmpl_desc *)
(txcmpl_ring->desc))[cons_idx]);
/*
* skb for this is stored in tx store and
* tx header contains the index in the field
* buffer address (opaque) of txcmpl
*/
store_index = txcmpl->buffer_addr;
skb = ehw->tx_skb_store[store_index];
ehw->tx_skb_store[store_index] = NULL;
if (unlikely(!skb)) {
pr_warn("Invalid skb: cons_idx:%u prod_idx:%u status %x\n",
cons_idx, prod_idx, txcmpl->status);
goto next_txcmpl_desc;
}
len = skb_headlen(skb);
daddr = (dma_addr_t)virt_to_phys(skb->data);
pr_debug("skb:%px cons_idx:%d prod_idx:%d word1:0x%x\n",
skb, cons_idx, prod_idx, txcmpl->status);
dma_unmap_single(&pdev->dev, daddr,
len, DMA_TO_DEVICE);
dev_kfree_skb_any(skb);
next_txcmpl_desc:
if (++cons_idx == txcmpl_ring->count)
cons_idx = 0;
txcmpl_consumed++;
}
if (txcmpl_consumed == 0)
return 0;
pr_debug("TXCMPL:%u txcmpl_consumed:%u prod_idx:%u cons_idx:%u\n",
txcmpl_ring->id, txcmpl_consumed, prod_idx, cons_idx);
/*
* Update TXCMPL ring consumer index
*/
wmb();
edma_reg_write(EDMA_REG_TXCMPL_CONS_IDX(txcmpl_ring->id), cons_idx);
return txcmpl_consumed;
}
/*
* nss_phy_tstamp_rx_buf()
* Receive timestamp packet
*/
void nss_phy_tstamp_rx_buf(__attribute__((unused))void *app_data, struct sk_buff *skb)
{
struct net_device *ndev = skb->dev;
/*
* The PTP_CLASS_ value 0 is passed to phy driver, which will be
* set to the correct PTP class value by calling ptp_classify_raw
* in drv->rxtstamp function.
*/
if (ndev && ndev->phydev && ndev->phydev->drv &&
ndev->phydev->drv->rxtstamp)
if(ndev->phydev->drv->rxtstamp(ndev->phydev, skb, 0))
return;
netif_receive_skb(skb);
}
EXPORT_SYMBOL(nss_phy_tstamp_rx_buf);
/*
* nss_phy_tstamp_tx_buf()
* Transmit timestamp packet
*/
void nss_phy_tstamp_tx_buf(struct net_device *ndev, struct sk_buff *skb)
{
/*
* Function drv->txtstamp will create a clone of skb if necessary,
* the PTP_CLASS_ value 0 is passed to phy driver, which will be
* set to the correct PTP class value by calling ptp_classify_raw
* in the drv->txtstamp function.
*/
if (ndev && ndev->phydev && ndev->phydev->drv &&
ndev->phydev->drv->txtstamp)
ndev->phydev->drv->txtstamp(ndev->phydev, skb, 0);
}
EXPORT_SYMBOL(nss_phy_tstamp_tx_buf);
/*
* edma_clean_rx()
* Reap Rx descriptors
*/
static uint32_t edma_clean_rx(struct edma_hw *ehw,
int work_to_do,
struct edma_rxdesc_ring *rxdesc_ring)
{
struct platform_device *pdev = ehw->pdev;
struct net_device *ndev;
struct sk_buff *skb = NULL;
struct edma_rxdesc_desc *rxdesc_desc;
struct edma_rx_preheader *rxph = NULL;
uint16_t prod_idx = 0;
int src_port_num = 0;
int pkt_length = 0;
uint16_t cons_idx = 0;
uint32_t work_done = 0;
int store_index;
/*
* Read Rx ring consumer index
*/
cons_idx = edma_reg_read(EDMA_REG_RXDESC_CONS_IDX(rxdesc_ring->id))
& EDMA_RXDESC_CONS_IDX_MASK;
while (1) {
/*
* Read Rx ring producer index
*/
prod_idx = edma_reg_read(
EDMA_REG_RXDESC_PROD_IDX(rxdesc_ring->id))
& EDMA_RXDESC_PROD_IDX_MASK;
if (cons_idx == prod_idx)
break;
if (work_done >= work_to_do)
break;
rxdesc_desc = EDMA_RXDESC_DESC(rxdesc_ring, cons_idx);
/*
* Get Rx preheader
*/
rxph = (struct edma_rx_preheader *)
phys_to_virt(rxdesc_desc->buffer_addr);
/*
* DMA unmap Rx buffer
*/
dma_unmap_single(&pdev->dev,
rxdesc_desc->buffer_addr,
EDMA_RX_BUFF_SIZE,
DMA_FROM_DEVICE);
store_index = rxph->opaque;
skb = ehw->rx_skb_store[store_index];
ehw->rx_skb_store[store_index] = NULL;
if (unlikely(!skb)) {
pr_warn("WARN: empty skb reference in rx_store:%d\n",
cons_idx);
goto next_rx_desc;
}
/*
* Check src_info from Rx preheader
*/
if (EDMA_RXPH_SRC_INFO_TYPE_GET(rxph) ==
EDMA_PREHDR_DSTINFO_PORTID_IND) {
src_port_num = rxph->src_info &
EDMA_PREHDR_PORTNUM_BITS;
} else {
pr_warn("WARN: src_info_type:0x%x. Drop skb:%px\n",
EDMA_RXPH_SRC_INFO_TYPE_GET(rxph), skb);
dev_kfree_skb_any(skb);
goto next_rx_desc;
}
/*
* Get packet length
*/
pkt_length = rxdesc_desc->status & EDMA_RXDESC_PACKET_LEN_MASK;
if (unlikely((src_port_num < NSS_DP_START_IFNUM) ||
(src_port_num > NSS_DP_HAL_MAX_PORTS))) {
pr_warn("WARN: Port number error :%d. Drop skb:%px\n",
src_port_num, skb);
dev_kfree_skb_any(skb);
goto next_rx_desc;
}
/*
* Get netdev for this port using the source port
* number as index into the netdev array. We need to
* subtract one since the indices start form '0' and
* port numbers start from '1'.
*/
ndev = ehw->netdev_arr[src_port_num - 1];
if (unlikely(!ndev)) {
pr_warn("WARN: netdev Null src_info_type:0x%x. Drop skb:%px\n",
src_port_num, skb);
dev_kfree_skb_any(skb);
goto next_rx_desc;
}
if (unlikely(!netif_running(ndev))) {
dev_kfree_skb_any(skb);
goto next_rx_desc;
}
/*
* Remove Rx preheader
*/
skb_pull(skb, EDMA_RX_PREHDR_SIZE);
/*
* Update skb fields and indicate packet to stack
*/
skb->dev = ndev;
skb->skb_iif = ndev->ifindex;
skb_put(skb, pkt_length);
skb->protocol = eth_type_trans(skb, skb->dev);
#ifdef CONFIG_NET_SWITCHDEV
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0))
skb->offload_fwd_mark = ndev->offload_fwd_mark;
#else
/*
* TODO: Implement ndo_get_devlink_port()
*/
skb->offload_fwd_mark = 0;
#endif
pr_debug("skb:%px ring_idx:%u pktlen:%d proto:0x%x mark:%u\n",
skb, cons_idx, pkt_length, skb->protocol,
skb->offload_fwd_mark);
#else
pr_debug("skb:%px ring_idx:%u pktlen:%d proto:0x%x\n",
skb, cons_idx, pkt_length, skb->protocol);
#endif
/*
* Deliver the ptp packet to phy driver for RX timestamping
*/
if (unlikely(EDMA_RXPH_SERVICE_CODE_GET(rxph) ==
NSS_PTP_EVENT_SERVICE_CODE))
nss_phy_tstamp_rx_buf(ndev, skb);
else
netif_receive_skb(skb);
next_rx_desc:
/*
* Update consumer index
*/
if (++cons_idx == rxdesc_ring->count)
cons_idx = 0;
/*
* Update work done
*/
work_done++;
}
edma_alloc_rx_buffer(ehw, rxdesc_ring->rxfill);
/*
* make sure the consumer index is updated
* before updating the hardware
*/
wmb();
edma_reg_write(EDMA_REG_RXDESC_CONS_IDX(rxdesc_ring->id), cons_idx);
return work_done;
}
/*
* edma_napi()
* EDMA NAPI handler
*/
int edma_napi(struct napi_struct *napi, int budget)
{
struct edma_hw *ehw = container_of(napi, struct edma_hw, napi);
struct edma_txcmpl_ring *txcmpl_ring = NULL;
struct edma_rxdesc_ring *rxdesc_ring = NULL;
struct edma_rxfill_ring *rxfill_ring = NULL;
struct net_device *ndev;
int work_done = 0;
int i;
for (i = 0; i < ehw->rxdesc_rings; i++) {
rxdesc_ring = &ehw->rxdesc_ring[i];
work_done += edma_clean_rx(ehw, budget, rxdesc_ring);
}
for (i = 0; i < ehw->txcmpl_rings; i++) {
txcmpl_ring = &ehw->txcmpl_ring[i];
work_done += edma_clean_tx(ehw, txcmpl_ring);
}
for (i = 0; i < ehw->rxfill_rings; i++) {
rxfill_ring = &ehw->rxfill_ring[i];
work_done += edma_alloc_rx_buffer(ehw, rxfill_ring);
}
/*
* Resume netdev Tx queue
*/
/*
* TODO works currently since we have a single queue.
* Need to make sure we have support in place when there is
* support for multiple queues
*/
for (i = 0; i < EDMA_MAX_GMACS; i++) {
ndev = ehw->netdev_arr[i];
if (!ndev)
continue;
if (netif_queue_stopped(ndev) && netif_carrier_ok(ndev))
netif_start_queue(ndev);
}
/*
* TODO - rework and fix the budget control
*/
if (work_done < budget) {
/*
* TODO per core NAPI
*/
napi_complete(napi);
/*
* Set RXDESC ring interrupt mask
*/
for (i = 0; i < ehw->rxdesc_rings; i++) {
rxdesc_ring = &ehw->rxdesc_ring[i];
edma_reg_write(
EDMA_REG_RXDESC_INT_MASK(rxdesc_ring->id),
ehw->rxdesc_intr_mask);
}
/*
* Set TXCMPL ring interrupt mask
*/
for (i = 0; i < ehw->txcmpl_rings; i++) {
txcmpl_ring = &ehw->txcmpl_ring[i];
edma_reg_write(EDMA_REG_TX_INT_MASK(txcmpl_ring->id),
ehw->txcmpl_intr_mask);
}
/*
* Set RXFILL ring interrupt mask
*/
for (i = 0; i < ehw->rxfill_rings; i++) {
rxfill_ring = &ehw->rxfill_ring[i];
edma_reg_write(EDMA_REG_RXFILL_INT_MASK(
rxfill_ring->id),
edma_hw.rxfill_intr_mask);
}
}
return work_done;
}
/*
* edma_ring_xmit()
* Transmit a packet using an EDMA ring
*/
enum edma_tx edma_ring_xmit(struct edma_hw *ehw,
struct net_device *netdev,
struct sk_buff *skb,
struct edma_txdesc_ring *txdesc_ring)
{
struct nss_dp_dev *dp_dev = netdev_priv(netdev);
struct edma_txdesc_desc *txdesc = NULL;
uint16_t buf_len;
uint16_t hw_next_to_use, hw_next_to_clean, chk_idx;
uint32_t data;
uint32_t store_index = 0;
struct edma_tx_preheader *txph = NULL;
/*
* TODO - revisit locking
*/
spin_lock_bh(&txdesc_ring->tx_lock);
/*
* Read TXDESC ring producer index
*/
data = edma_reg_read(EDMA_REG_TXDESC_PROD_IDX(txdesc_ring->id));
hw_next_to_use = data & EDMA_TXDESC_PROD_IDX_MASK;
/*
* Read TXDESC ring consumer index
*/
/*
* TODO - read to local variable to optimize uncached access
*/
data = edma_reg_read(EDMA_REG_TXDESC_CONS_IDX(txdesc_ring->id));
hw_next_to_clean = data & EDMA_TXDESC_CONS_IDX_MASK;
/*
* Check for available Tx descriptor
*/
chk_idx = (hw_next_to_use + 1) & (txdesc_ring->count-1);
if (chk_idx == hw_next_to_clean) {
spin_unlock_bh(&txdesc_ring->tx_lock);
return EDMA_TX_DESC;
}
#if defined(NSS_DP_EDMA_TX_SMALL_PKT_WAR)
/*
* IPQ807x EDMA hardware can't process the packet if the packet size is
* less than EDMA_TX_PKT_MIN_SIZE (33 Byte). So, if the packet size
* is indeed less than EDMA_TX_PKT_MIN_SIZE, perform padding
* (if possible), otherwise drop the packet.
* Using skb_padto() API for padding the packet. This API will drop
* the packet if the padding is not possible.
*/
if (unlikely(skb->len < EDMA_TX_PKT_MIN_SIZE)) {
if (skb_padto(skb, EDMA_TX_PKT_MIN_SIZE)) {
netdev_dbg(netdev, "padding couldn't happen, skb is freed.\n");
netdev->stats.tx_dropped++;
spin_unlock_bh(&txdesc_ring->tx_lock);
return EDMA_TX_OK;
}
skb->len = EDMA_TX_PKT_MIN_SIZE;
}
#endif
buf_len = skb_headlen(skb);
/*
* Deliver the ptp packet to phy driver for TX timestamping
*/
if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP))
nss_phy_tstamp_tx_buf(netdev, skb);
/*
* Make room for Tx preheader
*/
txph = (struct edma_tx_preheader *)skb_push(skb,
EDMA_TX_PREHDR_SIZE);
memset((void *)txph, 0, EDMA_TX_PREHDR_SIZE);
/*
* Populate Tx preheader dst info, port id is macid in dp_dev
*/
txph->dst_info = (EDMA_PREHDR_DSTINFO_PORTID_IND << 8) |
(dp_dev->macid & 0x0fff);
/*
* Store the skb in tx_store
*/
store_index = hw_next_to_use & (txdesc_ring->count - 1);
if (unlikely(ehw->tx_skb_store[store_index] != NULL)) {
spin_unlock_bh(&txdesc_ring->tx_lock);
return EDMA_TX_DESC;
}
ehw->tx_skb_store[store_index] = skb;
memcpy(skb->data, &store_index, 4);
/*
* Get Tx descriptor
*/
txdesc = EDMA_TXDESC_DESC(txdesc_ring, hw_next_to_use);
memset(txdesc, 0, sizeof(struct edma_txdesc_desc));
/*
* Map buffer to DMA address
*/
txdesc->buffer_addr = cpu_to_le32(dma_map_single(&(ehw->pdev)->dev,
skb->data,
buf_len + EDMA_TX_PREHDR_SIZE,
DMA_TO_DEVICE));
if (!txdesc->buffer_addr) {
/*
* DMA map failed for this address. Drop it
* and make sure does not got to stack again
*/
dev_kfree_skb_any(skb);
ehw->tx_skb_store[store_index] = NULL;
spin_unlock_bh(&txdesc_ring->tx_lock);
return EDMA_TX_OK;
}
/*
* Populate Tx descriptor
*/
txdesc->word1 |= (1 << EDMA_TXDESC_PREHEADER_SHIFT)
| ((EDMA_TX_PREHDR_SIZE & EDMA_TXDESC_DATA_OFFSET_MASK)
<< EDMA_TXDESC_DATA_OFFSET_SHIFT);
txdesc->word1 |= ((buf_len & EDMA_TXDESC_DATA_LENGTH_MASK)
<< EDMA_TXDESC_DATA_LENGTH_SHIFT);
netdev_dbg(netdev, "skb:%px tx_ring:%u proto:0x%x\n",
skb, txdesc_ring->id, ntohs(skb->protocol));
netdev_dbg(netdev, "port:%u prod_idx:%u cons_idx:%u\n",
dp_dev->macid, hw_next_to_use, hw_next_to_clean);
/*
* Update producer index
*/
hw_next_to_use = (hw_next_to_use + 1) & (txdesc_ring->count - 1);
/*
* make sure the hw_next_to_use is updated before the
* write to hardware
*/
wmb();
edma_reg_write(EDMA_REG_TXDESC_PROD_IDX(txdesc_ring->id),
hw_next_to_use & EDMA_TXDESC_PROD_IDX_MASK);
spin_unlock_bh(&txdesc_ring->tx_lock);
return EDMA_TX_OK;
}
/*
* edma_handle_misc_irq()
* Process IRQ
*/
irqreturn_t edma_handle_misc_irq(int irq, void *ctx)
{
uint32_t misc_intr_status = 0;
uint32_t reg_data = 0;
struct edma_hw *ehw = NULL;
struct platform_device *pdev = (struct platform_device *)ctx;
ehw = platform_get_drvdata(pdev);
/*
* Read Misc intr status
*/
reg_data = edma_reg_read(EDMA_REG_MISC_INT_STAT);
misc_intr_status = reg_data & ehw->misc_intr_mask;
/*
* TODO - error logging
*/
if (misc_intr_status == 0)
return IRQ_NONE;
else
edma_reg_write(EDMA_REG_MISC_INT_MASK, EDMA_MASK_INT_DISABLE);
return IRQ_HANDLED;
}
/*
* edma_handle_irq()
* Process IRQ and schedule napi
*/
irqreturn_t edma_handle_irq(int irq, void *ctx)
{
uint32_t reg_data = 0;
uint32_t rxdesc_intr_status = 0;
uint32_t txcmpl_intr_status = 0;
uint32_t rxfill_intr_status = 0;
int i;
struct edma_txcmpl_ring *txcmpl_ring = NULL;
struct edma_rxdesc_ring *rxdesc_ring = NULL;
struct edma_rxfill_ring *rxfill_ring = NULL;
struct edma_hw *ehw = NULL;
struct platform_device *pdev = (struct platform_device *)ctx;
ehw = platform_get_drvdata(pdev);
if (!ehw) {
pr_info("Unable to retrieve platrofm data");
return IRQ_HANDLED;
}
/*
* Read RxDesc intr status
*/
for (i = 0; i < ehw->rxdesc_rings; i++) {
rxdesc_ring = &ehw->rxdesc_ring[i];
reg_data = edma_reg_read(
EDMA_REG_RXDESC_INT_STAT(rxdesc_ring->id));
rxdesc_intr_status |= reg_data &
EDMA_RXDESC_RING_INT_STATUS_MASK;
/*
* Disable RxDesc intr
*/
edma_reg_write(EDMA_REG_RXDESC_INT_MASK(rxdesc_ring->id),
EDMA_MASK_INT_DISABLE);
}
/*
* Read TxCmpl intr status
*/
for (i = 0; i < ehw->txcmpl_rings; i++) {
txcmpl_ring = &ehw->txcmpl_ring[i];
reg_data = edma_reg_read(
EDMA_REG_TX_INT_STAT(txcmpl_ring->id));
txcmpl_intr_status |= reg_data &
EDMA_TXCMPL_RING_INT_STATUS_MASK;
/*
* Disable TxCmpl intr
*/
edma_reg_write(EDMA_REG_TX_INT_MASK(txcmpl_ring->id),
EDMA_MASK_INT_DISABLE);
}
/*
* Read RxFill intr status
*/
for (i = 0; i < ehw->rxfill_rings; i++) {
rxfill_ring = &ehw->rxfill_ring[i];
reg_data = edma_reg_read(
EDMA_REG_RXFILL_INT_STAT(rxfill_ring->id));
rxfill_intr_status |= reg_data &
EDMA_RXFILL_RING_INT_STATUS_MASK;
/*
* Disable RxFill intr
*/
edma_reg_write(EDMA_REG_RXFILL_INT_MASK(rxfill_ring->id),
EDMA_MASK_INT_DISABLE);
}
if ((rxdesc_intr_status == 0) && (txcmpl_intr_status == 0) &&
(rxfill_intr_status == 0))
return IRQ_NONE;
for (i = 0; i < ehw->rxdesc_rings; i++) {
rxdesc_ring = &ehw->rxdesc_ring[i];
edma_reg_write(EDMA_REG_RXDESC_INT_MASK(rxdesc_ring->id),
EDMA_MASK_INT_DISABLE);
}
/*
*TODO - per core NAPI
*/
if (rxdesc_intr_status || txcmpl_intr_status || rxfill_intr_status)
if (likely(napi_schedule_prep(&ehw->napi)))
__napi_schedule(&ehw->napi);
return IRQ_HANDLED;
}

View File

@@ -1,697 +0,0 @@
/*
**************************************************************************
* Copyright (c) 2016-2017,2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF0
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**************************************************************************
*/
#ifndef __QCOM_DEV_H__
#define __QCOM_DEV_H__
#include <nss_dp_hal_if.h>
#include "qcom_reg.h"
#include <fal/fal_mib.h>
#include <fal/fal_port_ctrl.h>
/*
* Subclass for base nss_gmac_haldev
*/
struct qcom_hal_dev {
struct nss_gmac_hal_dev nghd; /* Base class */
fal_mib_counter_t stats; /* Stats structure */
};
/*
* qcom_set_rx_flow_ctrl()
*/
static inline void qcom_set_rx_flow_ctrl(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_ENABLE, QCOM_RX_FLOW_ENABLE);
}
/*
* qcom_clear_rx_flow_ctrl()
*/
static inline void qcom_clear_rx_flow_ctrl(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_ENABLE, QCOM_RX_FLOW_ENABLE);
}
/*
* qcom_set_tx_flow_ctrl()
*/
static inline void qcom_set_tx_flow_ctrl(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_ENABLE, QCOM_TX_FLOW_ENABLE);
}
/*
* qcom_clear_tx_flow_ctrl()
*/
static inline void qcom_clear_tx_flow_ctrl(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_ENABLE, QCOM_TX_FLOW_ENABLE);
}
/*
* qcom_clear_mac_ctrl0()
*/
static inline void qcom_clear_mac_ctrl0(struct nss_gmac_hal_dev *nghd)
{
hal_write_reg(nghd->mac_base, QCOM_MAC_CTRL0, 0);
}
/*
* qcom_rx_enable()
*/
static inline void qcom_rx_enable(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_ENABLE, QCOM_RX_MAC_ENABLE);
}
/*
* qcom_rx_disable()
* Disable the reception of frames on GMII/MII.
* GMAC receive state machine is disabled after completion of reception of
* current frame.
*/
static inline void qcom_rx_disable(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_ENABLE, QCOM_RX_MAC_ENABLE);
}
/*
* qcom_tx_enable()
*/
static inline void qcom_tx_enable(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_ENABLE, QCOM_TX_MAC_ENABLE);
}
/*
* qcom_tx_disable()
* Disable the transmission of frames on GMII/MII.
* GMAC transmit state machine is disabled after completion of
* transmission of current frame.
*/
static inline void qcom_tx_disable(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_ENABLE, QCOM_TX_MAC_ENABLE);
}
/*
* qcom_set_full_duplex()
*/
static inline void qcom_set_full_duplex(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_ENABLE, QCOM_DUPLEX);
}
/*
* qcom_set_half_duplex()
*/
static inline void qcom_set_half_duplex(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_ENABLE, QCOM_DUPLEX);
}
/*
* qcom_set_ipgt()
*/
static inline void qcom_set_ipgt(struct nss_gmac_hal_dev *nghd, uint32_t ipgt)
{
uint32_t data;
data = hal_read_reg(nghd->mac_base, QCOM_MAC_CTRL0);
data &= ~QCOM_IPGT_POS;
ipgt = ipgt << QCOM_IPGT_LSB;
data |= ipgt;
hal_write_reg(nghd->mac_base, QCOM_MAC_CTRL0, data);
}
/*
* qcom_set_ipgr()
*/
static inline void qcom_set_ipgr(struct nss_gmac_hal_dev *nghd, uint32_t ipgr)
{
uint32_t data;
data = hal_read_reg(nghd->mac_base, QCOM_MAC_CTRL0);
data &= ~QCOM_IPGR2_POS;
ipgr = ipgr << QCOM_IPGR2_LSB;
data |= ipgr;
hal_write_reg(nghd->mac_base, QCOM_MAC_CTRL0, data);
}
/*
* qcom_set_half_thdf_ctrl()
*/
static inline void qcom_set_half_thdf_ctrl(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL0, QCOM_HALF_THDF_CTRL);
}
/*
* qcom_reset_half_thdf_ctrl()
*/
static inline void qcom_reset_half_thdf_ctrl(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL0, QCOM_HALF_THDF_CTRL);
}
/*
* qcom_set_frame_len_chk()
*/
static inline void qcom_set_frame_len_chk(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL0, QCOM_FLCHK);
}
/*
* qcom_reset_frame_len_chk()
*/
static inline void qcom_reset_frame_len_chk(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL0, QCOM_FLCHK);
}
/*
* qcom_set_abebe()
*/
static inline void qcom_set_abebe(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL0, QCOM_ABEBE);
}
/*
* qcom_reset_abebe()
*/
static inline void qcom_reset_abebe(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL0, QCOM_ABEBE);
}
/*
* qcom_set_amaxe()
*/
static inline void qcom_set_amaxe(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL0, QCOM_AMAXE);
}
/*
* qcom_reset_amaxe()
*/
static inline void qcom_reset_amaxe(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL0, QCOM_AMAXE);
}
/*
* qcom_set_bpnb()
*/
static inline void qcom_set_bpnb(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL0, QCOM_BPNB);
}
/*
* qcom_reset_bpnb()
*/
static inline void qcom_reset_bpnb(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL0, QCOM_BPNB);
}
/*
* qcom_set_nobo()
*/
static inline void qcom_set_nobo(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL0, QCOM_NOBO);
}
/*
* qcom_reset_nobo()
*/
static inline void qcom_reset_nobo(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL0, QCOM_NOBO);
}
/*
* qcom_set_drbnib_rxok()
*/
static inline void qcom_set_drbnib_rxok(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL0, QCOM_DRBNIB_RXOK);
}
/*
* qcom_reset_drbnib_rxok()
*/
static inline void qcom_reset_drbnib_rxok(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL0, QCOM_DRBNIB_RXOK);
}
/*
* qcom_set_jam_ipg()
*/
static inline void qcom_set_jam_ipg(struct nss_gmac_hal_dev *nghd,
uint32_t jam_ipg)
{
uint32_t data;
data = hal_read_reg(nghd->mac_base, QCOM_MAC_CTRL1);
data &= ~QCOM_JAM_IPG_POS;
jam_ipg = jam_ipg << QCOM_JAM_IPG_LSB;
data |= jam_ipg;
hal_write_reg(nghd->mac_base, QCOM_MAC_CTRL1, data);
}
/*
* qcom_set_ctrl1_test_pause()
*/
static inline void qcom_set_ctrl1_test_pause(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL1, QCOM_TPAUSE);
}
/*
* qcom_reset_ctrl1_test_pause()
*/
static inline void qcom_reset_ctrl1_test_pause(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL1, QCOM_TPAUSE);
}
/*
* qcom_reset_ctrl1_test_pause()
*/
static inline void qcom_set_tctl(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL1, QCOM_TCTL);
}
/*
* qcom_reset_tctl()
*/
static inline void qcom_reset_tctl(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL1, QCOM_TCTL);
}
/*
* qcom_set_sstct()
*/
static inline void qcom_set_sstct(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL1, QCOM_SSTCT);
}
/*
* qcom_reset_sstct()
*/
static inline void qcom_reset_sstct(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL1, QCOM_SSTCT);
}
/*
* qcom_set_simr()
*/
static inline void qcom_set_simr(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL1, QCOM_SIMR);
}
/*
* qcom_reset_simr()
*/
static inline void qcom_reset_simr(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL1, QCOM_SIMR);
}
/*
* qcom_set_retry()
*/
static inline void qcom_set_retry(struct nss_gmac_hal_dev *nghd, uint32_t retry)
{
uint32_t data;
data = hal_read_reg(nghd->mac_base, QCOM_MAC_CTRL1);
data &= ~QCOM_RETRY_POS;
retry = retry << QCOM_RETRY_LSB;
data |= retry;
hal_write_reg(nghd->mac_base, QCOM_MAC_CTRL1, data);
}
/*
* qcom_set_prlen()
*/
static inline void qcom_set_prlen(struct nss_gmac_hal_dev *nghd, uint32_t prlen)
{
uint32_t data;
data = hal_read_reg(nghd->mac_base, QCOM_MAC_CTRL1);
data &= ~QCOM_PRLEN_POS;
prlen = prlen << QCOM_PRLEN_LSB;
data |= prlen;
hal_write_reg(nghd->mac_base, QCOM_MAC_CTRL1, data);
}
/*
* qcom_set_ppad()
*/
static inline void qcom_set_ppad(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL1, QCOM_PPAD);
}
/*
* qcom_reset_ppad()
*/
static inline void qcom_reset_ppad(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL1, QCOM_PPAD);
}
/*
* qcom_set_povr()
*/
static inline void qcom_set_povr(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL1, QCOM_POVR);
}
/*
* qcom_reset_povr()
*/
static inline void qcom_reset_povr(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL1, QCOM_POVR);
}
/*
* qcom_set_phug()
*/
static inline void qcom_set_phug(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL1, QCOM_PHUG);
}
/*
* qcom_reset_phug()
*/
static inline void qcom_reset_phug(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL1, QCOM_PHUG);
}
/*
* qcom_set_mbof()
*/
static inline void qcom_set_mbof(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL1, QCOM_MBOF);
}
/*
* qcom_reset_mbof()
*/
static inline void qcom_reset_mbof(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL1, QCOM_MBOF);
}
/*
* qcom_set_lcol()
*/
static inline void qcom_set_lcol(struct nss_gmac_hal_dev *nghd, uint32_t lcol)
{
uint32_t data;
data = hal_read_reg(nghd->mac_base, QCOM_MAC_CTRL1);
data &= ~QCOM_LCOL_POS;
lcol = lcol << QCOM_LCOL_LSB;
data |= lcol;
hal_write_reg(nghd->mac_base, QCOM_MAC_CTRL1, data);
}
/*
* qcom_set_long_jam()
*/
static inline void qcom_set_long_jam(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL1, QCOM_LONG_JAM);
}
/*
* qcom_reset_long_jam()
*/
static inline void qcom_reset_long_jam(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL1, QCOM_LONG_JAM);
}
/*
* qcom_set_ipg_dec_len()
*/
static inline void qcom_set_ipg_dec_len(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL2, QCOM_IPG_DEC_LEN);
}
/*
* qcom_reset_ipg_dec_len()
*/
static inline void qcom_reset_ipg_dec_len(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL2, QCOM_IPG_DEC_LEN);
}
/*
* qcom_set_ctrl2_test_pause()
*/
static inline void qcom_set_ctrl2_test_pause(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL2, QCOM_TEST_PAUSE);
}
/*
* qcom_reset_ctrl2_test_pause()
*/
static inline void qcom_reset_ctrl2_test_pause(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL2, QCOM_TEST_PAUSE);
}
/*
* qcom_set_mac_loopback()
*/
static inline void qcom_set_mac_loopback(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL2, QCOM_MAC_LOOPBACK);
}
/*
* qcom_reset_mac_loopback()
*/
static inline void qcom_reset_mac_loopback(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL2, QCOM_MAC_LOOPBACK);
}
/*
* qcom_set_ipg_dec()
*/
static inline void qcom_set_ipg_dec(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL2, QCOM_IPG_DEC);
}
/*
* qcom_reset_ipg_dec()
*/
static inline void qcom_reset_ipg_dec(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL2, QCOM_IPG_DEC);
}
/*
* qcom_set_crs_sel()
*/
static inline void qcom_set_crs_sel(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL2, QCOM_SRS_SEL);
}
/*
* qcom_reset_crs_sel()
*/
static inline void qcom_reset_crs_sel(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL2, QCOM_SRS_SEL);
}
/*
* qcom_set_crc_rsv()
*/
static inline void qcom_set_crc_rsv(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_CTRL2, QCOM_CRC_RSV);
}
/*
* qcom_reset_crc_rsv()
*/
static inline void qcom_reset_crc_rsv(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_CTRL2, QCOM_CRC_RSV);
}
/*
* qcom_set_ipgr1()
*/
static inline void qcom_set_ipgr1(struct nss_gmac_hal_dev *nghd, uint32_t ipgr1)
{
uint32_t data;
data = hal_read_reg(nghd->mac_base, QCOM_MAC_DBG_CTRL);
data &= ~QCOM_DBG_IPGR1_POS;
ipgr1 = ipgr1 << QCOM_DBG_IPGR1_LSB;
data |= ipgr1;
hal_write_reg(nghd->mac_base, QCOM_MAC_DBG_CTRL, data);
}
/*
* qcom_set_hihg_ipg()
*/
static inline void qcom_set_hihg_ipg(struct nss_gmac_hal_dev *nghd,
uint32_t hihg_ipg)
{
uint32_t data;
data = hal_read_reg(nghd->mac_base, QCOM_MAC_DBG_CTRL);
data &= ~QCOM_DBG_HIHG_IPG_POS;
data |= hihg_ipg << QCOM_DBG_HIHG_IPG_LSB;
hal_write_reg(nghd->mac_base, QCOM_MAC_DBG_CTRL, data);
}
/*
* qcom_set_mac_ipg_ctrl()
*/
static inline void qcom_set_mac_ipg_ctrl(struct nss_gmac_hal_dev *nghd,
uint32_t mac_ipg_ctrl)
{
uint32_t data;
data = hal_read_reg(nghd->mac_base, QCOM_MAC_DBG_CTRL);
data &= ~QCOM_DBG_MAC_IPG_CTRL_POS;
data |= mac_ipg_ctrl << QCOM_DBG_MAC_IPG_CTRL_LSB;
hal_write_reg(nghd->mac_base, QCOM_MAC_DBG_CTRL, data);
}
/*
* qcom_set_mac_len_ctrl()
*/
static inline void qcom_set_mac_len_ctrl(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_DBG_CTRL, QCOM_DBG_MAC_LEN_CTRL);
}
/*
* qcom_reset_mac_len_ctrl()
*/
static inline void qcom_reset_mac_len_ctrl(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_DBG_CTRL, QCOM_DBG_MAC_LEN_CTRL);
}
/*
* qcom_set_edxsdfr_transmit()
*/
static inline void qcom_set_edxsdfr_transmit(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, QCOM_MAC_DBG_CTRL, QCOM_DBG_EDxSDFR_TRANS);
}
/*
* qcom_reset_edxsdfr_transmit()
*/
static inline void qcom_reset_edxsdfr_transmit(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, QCOM_MAC_DBG_CTRL, QCOM_DBG_EDxSDFR_TRANS);
}
/*
* qcom_set_mac_dbg_addr()
*/
static inline void qcom_set_mac_dbg_addr(struct nss_gmac_hal_dev *nghd,
uint8_t mac_dbg_addr)
{
hal_write_reg(nghd->mac_base, QCOM_MAC_DBG_ADDR, mac_dbg_addr);
}
/*
* qcom_set_mac_dbg_data()
*/
static inline void qcom_set_mac_dbg_data(struct nss_gmac_hal_dev *nghd,
uint32_t mac_dbg_data)
{
hal_write_reg(nghd->mac_base, QCOM_MAC_DBG_DATA, mac_dbg_data);
}
/*
* qcom_set_mac_jumbosize()
*/
static inline void qcom_set_mac_jumbosize(struct nss_gmac_hal_dev *nghd,
uint16_t mac_jumbo_size)
{
hal_write_reg(nghd->mac_base, QCOM_MAC_JMB_SIZE, mac_jumbo_size);
}
/*
* qcom_clear_mib_ctrl()
*/
static inline void qcom_clear_mib_ctrl(struct nss_gmac_hal_dev *nghd)
{
hal_write_reg(nghd->mac_base, QCOM_MAC_MIB_CTRL, 0);
}
/*
* qcom_set_mib_ctrl()
*/
static inline void qcom_set_mib_ctrl(struct nss_gmac_hal_dev *nghd,
int mib_settings)
{
hal_set_reg_bits(nghd, QCOM_MAC_MIB_CTRL,
mib_settings);
}
/*
* qcom_get_stats()
*/
static int qcom_get_stats(struct nss_gmac_hal_dev *nghd)
{
struct qcom_hal_dev *qhd = (struct qcom_hal_dev *)nghd;
fal_mib_counter_t *stats = &(qhd->stats);
if (fal_mib_counter_get(0, nghd->mac_id, stats) < 0)
return -1;
return 0;
}
#endif /* __QCOM_DEV_H__ */

View File

@@ -1,479 +0,0 @@
/*
**************************************************************************
* Copyright (c) 2016-2018, 2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**************************************************************************
*/
#include <linux/delay.h>
#include <linux/ethtool.h>
#include <linux/vmalloc.h>
#include <linux/spinlock.h>
#include <linux/io.h>
#include <nss_dp_hal_if.h>
#include <nss_dp_dev.h>
#include "qcom_dev.h"
#define QCOM_STAT(m) offsetof(fal_mib_counter_t, m)
/*
* Ethtool stats pointer structure
*/
struct qcom_ethtool_stats {
uint8_t stat_string[ETH_GSTRING_LEN];
uint32_t stat_offset;
};
/*
* Array of strings describing statistics
*/
static const struct qcom_ethtool_stats qcom_gstrings_stats[] = {
{"rx_broadcast", QCOM_STAT(RxBroad)},
{"rx_pause", QCOM_STAT(RxPause)},
{"rx_unicast", QCOM_STAT(RxUniCast)},
{"rx_multicast", QCOM_STAT(RxMulti)},
{"rx_fcserr", QCOM_STAT(RxFcsErr)},
{"rx_alignerr", QCOM_STAT(RxAllignErr)},
{"rx_runt", QCOM_STAT(RxRunt)},
{"rx_frag", QCOM_STAT(RxFragment)},
{"rx_jmbfcserr", QCOM_STAT(RxJumboFcsErr)},
{"rx_jmbalignerr", QCOM_STAT(RxJumboAligenErr)},
{"rx_pkt64", QCOM_STAT(Rx64Byte)},
{"rx_pkt65to127", QCOM_STAT(Rx128Byte)},
{"rx_pkt128to255", QCOM_STAT(Rx256Byte)},
{"rx_pkt256to511", QCOM_STAT(Rx512Byte)},
{"rx_pkt512to1023", QCOM_STAT(Rx1024Byte)},
{"rx_pkt1024to1518", QCOM_STAT(Rx1518Byte)},
{"rx_pkt1519tox", QCOM_STAT(RxMaxByte)},
{"rx_toolong", QCOM_STAT(RxTooLong)},
{"rx_pktgoodbyte", QCOM_STAT(RxGoodByte)},
{"rx_pktbadbyte", QCOM_STAT(RxBadByte)},
{"rx_overflow", QCOM_STAT(RxOverFlow)},
{"tx_broadcast", QCOM_STAT(TxBroad)},
{"tx_pause", QCOM_STAT(TxPause)},
{"tx_multicast", QCOM_STAT(TxMulti)},
{"tx_underrun", QCOM_STAT(TxUnderRun)},
{"tx_pkt64", QCOM_STAT(Tx64Byte)},
{"tx_pkt65to127", QCOM_STAT(Tx128Byte)},
{"tx_pkt128to255", QCOM_STAT(Tx256Byte)},
{"tx_pkt256to511", QCOM_STAT(Tx512Byte)},
{"tx_pkt512to1023", QCOM_STAT(Tx1024Byte)},
{"tx_pkt1024to1518", QCOM_STAT(Tx1518Byte)},
{"tx_pkt1519tox", QCOM_STAT(TxMaxByte)},
{"tx_oversize", QCOM_STAT(TxOverSize)},
{"tx_pktbyte_h", QCOM_STAT(TxByte)},
{"tx_collisions", QCOM_STAT(TxCollision)},
{"tx_abortcol", QCOM_STAT(TxAbortCol)},
{"tx_multicol", QCOM_STAT(TxMultiCol)},
{"tx_singlecol", QCOM_STAT(TxSingalCol)},
{"tx_exesdeffer", QCOM_STAT(TxExcDefer)},
{"tx_deffer", QCOM_STAT(TxDefer)},
{"tx_latecol", QCOM_STAT(TxLateCol)},
{"tx_unicast", QCOM_STAT(TxUniCast)},
};
/*
* Array of strings describing private flag names
*/
static const char * const qcom_strings_priv_flags[] = {
"linkpoll",
"tstamp",
"tsmode",
};
#define QCOM_STATS_LEN ARRAY_SIZE(qcom_gstrings_stats)
#define QCOM_PRIV_FLAGS_LEN ARRAY_SIZE(qcom_strings_priv_flags)
/*
* qcom_set_mac_speed()
*/
static int32_t qcom_set_mac_speed(struct nss_gmac_hal_dev *nghd,
uint32_t mac_speed)
{
struct net_device *netdev = nghd->netdev;
netdev_warn(netdev, "API deprecated\n");
return 0;
}
/*
* qcom_get_mac_speed()
*/
static uint32_t qcom_get_mac_speed(struct nss_gmac_hal_dev *nghd)
{
struct net_device *netdev = nghd->netdev;
netdev_warn(netdev, "API deprecated\n");
return 0;
}
/*
* qcom_set_duplex_mode()
*/
static void qcom_set_duplex_mode(struct nss_gmac_hal_dev *nghd,
uint8_t duplex_mode)
{
struct net_device *netdev = nghd->netdev;
netdev_warn(netdev, "This API deprecated\n");
}
/*
* qcom_get_duplex_mode()
*/
static uint8_t qcom_get_duplex_mode(struct nss_gmac_hal_dev *nghd)
{
struct net_device *netdev = nghd->netdev;
netdev_warn(netdev, "API deprecated\n");
return 0;
}
/*
* qcom_rx_flow_control()
*/
static void qcom_rx_flow_control(struct nss_gmac_hal_dev *nghd, bool enabled)
{
if (enabled)
qcom_set_rx_flow_ctrl(nghd);
else
qcom_clear_rx_flow_ctrl(nghd);
}
/*
* qcom_tx_flow_control()
*/
static void qcom_tx_flow_control(struct nss_gmac_hal_dev *nghd, bool enabled)
{
if (enabled)
qcom_set_tx_flow_ctrl(nghd);
else
qcom_clear_tx_flow_ctrl(nghd);
}
/*
* qcom_get_mib_stats()
*/
static int32_t qcom_get_mib_stats(struct nss_gmac_hal_dev *nghd)
{
if (qcom_get_stats(nghd))
return -1;
return 0;
}
/*
* qcom_set_maxframe()
*/
static int32_t qcom_set_maxframe(struct nss_gmac_hal_dev *nghd,
uint32_t maxframe)
{
return fal_port_max_frame_size_set(0, nghd->mac_id, maxframe);
}
/*
* qcom_get_maxframe()
*/
static int32_t qcom_get_maxframe(struct nss_gmac_hal_dev *nghd)
{
int ret;
uint32_t mtu;
ret = fal_port_max_frame_size_get(0, nghd->mac_id, &mtu);
if (!ret)
return mtu;
return ret;
}
/*
* qcom_get_netdev_stats()
*/
static int32_t qcom_get_netdev_stats(struct nss_gmac_hal_dev *nghd,
struct rtnl_link_stats64 *stats)
{
struct qcom_hal_dev *qhd = (struct qcom_hal_dev *)nghd;
fal_mib_counter_t *hal_stats = &(qhd->stats);
if (qcom_get_mib_stats(nghd))
return -1;
stats->rx_packets = hal_stats->RxUniCast + hal_stats->RxBroad
+ hal_stats->RxMulti;
stats->tx_packets = hal_stats->TxUniCast + hal_stats->TxBroad
+ hal_stats->TxMulti;
stats->rx_bytes = hal_stats->RxGoodByte;
stats->tx_bytes = hal_stats->TxByte;
/* RX errors */
stats->rx_crc_errors = hal_stats->RxFcsErr + hal_stats->RxJumboFcsErr;
stats->rx_frame_errors = hal_stats->RxAllignErr +
hal_stats->RxJumboAligenErr;
stats->rx_fifo_errors = hal_stats->RxRunt;
stats->rx_errors = stats->rx_crc_errors + stats->rx_frame_errors +
stats->rx_fifo_errors;
stats->rx_dropped = hal_stats->RxTooLong + stats->rx_errors;
/* TX errors */
stats->tx_fifo_errors = hal_stats->TxUnderRun;
stats->tx_aborted_errors = hal_stats->TxAbortCol;
stats->tx_errors = stats->tx_fifo_errors + stats->tx_aborted_errors;
stats->collisions = hal_stats->TxCollision;
stats->multicast = hal_stats->RxMulti;
return 0;
}
/*
* qcom_get_strset_count()
* Get string set count for ethtool operations
*/
int32_t qcom_get_strset_count(struct nss_gmac_hal_dev *nghd, int32_t sset)
{
struct net_device *netdev = nghd->netdev;
switch (sset) {
case ETH_SS_STATS:
return QCOM_STATS_LEN;
case ETH_SS_PRIV_FLAGS:
return QCOM_PRIV_FLAGS_LEN;
}
netdev_dbg(netdev, "%s: Invalid string set\n", __func__);
return -EPERM;
}
/*
* qcom_get_strings()
* Get strings
*/
int32_t qcom_get_strings(struct nss_gmac_hal_dev *nghd, int32_t sset,
uint8_t *data)
{
struct net_device *netdev = nghd->netdev;
int i;
switch (sset) {
case ETH_SS_STATS:
for (i = 0; i < QCOM_STATS_LEN; i++) {
memcpy(data, qcom_gstrings_stats[i].stat_string,
strlen(qcom_gstrings_stats[i].stat_string));
data += ETH_GSTRING_LEN;
}
break;
case ETH_SS_PRIV_FLAGS:
for (i = 0; i < QCOM_PRIV_FLAGS_LEN; i++) {
memcpy(data, qcom_strings_priv_flags[i],
strlen(qcom_strings_priv_flags[i]));
data += ETH_GSTRING_LEN;
}
break;
default:
netdev_dbg(netdev, "%s: Invalid string set\n", __func__);
return -EPERM;
}
return 0;
}
/*
* qcom_get_eth_stats()
*/
static int32_t qcom_get_eth_stats(struct nss_gmac_hal_dev *nghd, uint64_t *data)
{
struct qcom_hal_dev *qhd = (struct qcom_hal_dev *)nghd;
fal_mib_counter_t *stats = &(qhd->stats);
uint8_t *p;
int i;
if (qcom_get_mib_stats(nghd))
return -1;
for (i = 0; i < QCOM_STATS_LEN; i++) {
p = (uint8_t *)stats + qcom_gstrings_stats[i].stat_offset;
data[i] = *(uint32_t *)p;
}
return 0;
}
/*
* qcom_send_pause_frame()
*/
static void qcom_send_pause_frame(struct nss_gmac_hal_dev *nghd)
{
qcom_set_ctrl2_test_pause(nghd);
}
/*
* qcom_stop_pause_frame()
*/
static void qcom_stop_pause_frame(struct nss_gmac_hal_dev *nghd)
{
qcom_reset_ctrl2_test_pause(nghd);
}
/*
* qcom_start()
*/
static int32_t qcom_start(struct nss_gmac_hal_dev *nghd)
{
qcom_set_full_duplex(nghd);
/* TODO: Read speed from dts */
if (qcom_set_mac_speed(nghd, SPEED_1000))
return -1;
qcom_tx_enable(nghd);
qcom_rx_enable(nghd);
netdev_dbg(nghd->netdev, "%s: mac_base:0x%px mac_enable:0x%x\n",
__func__, nghd->mac_base,
hal_read_reg(nghd->mac_base, QCOM_MAC_ENABLE));
return 0;
}
/*
* qcom_stop()
*/
static int32_t qcom_stop(struct nss_gmac_hal_dev *nghd)
{
qcom_tx_disable(nghd);
qcom_rx_disable(nghd);
netdev_dbg(nghd->netdev, "%s: mac_base:0x%px mac_enable:0x%x\n",
__func__, nghd->mac_base,
hal_read_reg(nghd->mac_base, QCOM_MAC_ENABLE));
return 0;
}
/*
* qcom_init()
*/
static void *qcom_init(struct gmac_hal_platform_data *gmacpdata)
{
struct qcom_hal_dev *qhd = NULL;
struct net_device *ndev = NULL;
struct nss_dp_dev *dp_priv = NULL;
struct resource *res;
ndev = gmacpdata->netdev;
dp_priv = netdev_priv(ndev);
res = platform_get_resource(dp_priv->pdev, IORESOURCE_MEM, 0);
if (!res) {
netdev_dbg(ndev, "Resource get failed.\n");
return NULL;
}
if (!devm_request_mem_region(&dp_priv->pdev->dev, res->start,
resource_size(res), ndev->name)) {
netdev_dbg(ndev, "Request mem region failed. Returning...\n");
return NULL;
}
qhd = (struct qcom_hal_dev *)devm_kzalloc(&dp_priv->pdev->dev,
sizeof(struct qcom_hal_dev), GFP_KERNEL);
if (!qhd) {
netdev_dbg(ndev, "kzalloc failed. Returning...\n");
return NULL;
}
/* Save netdev context in QCOM HAL context */
qhd->nghd.netdev = gmacpdata->netdev;
qhd->nghd.mac_id = gmacpdata->macid;
/* Populate the mac base addresses */
qhd->nghd.mac_base = devm_ioremap_nocache(&dp_priv->pdev->dev,
res->start, resource_size(res));
if (!qhd->nghd.mac_base) {
netdev_dbg(ndev, "ioremap fail.\n");
return NULL;
}
spin_lock_init(&qhd->nghd.slock);
netdev_dbg(ndev, "ioremap OK.Size 0x%x Ndev base 0x%lx macbase 0x%px\n",
gmacpdata->reg_len,
ndev->base_addr,
qhd->nghd.mac_base);
/* Reset MIB Stats */
if (fal_mib_port_flush_counters(0, qhd->nghd.mac_id)) {
netdev_dbg(ndev, "MIB stats Reset fail.\n");
}
return (struct nss_gmac_hal_dev *)qhd;
}
/*
* qcom_get_mac_address()
*/
static void qcom_get_mac_address(struct nss_gmac_hal_dev *nghd,
uint8_t *macaddr)
{
uint32_t data = hal_read_reg(nghd->mac_base, QCOM_MAC_ADDR0);
macaddr[5] = (data >> 8) & 0xff;
macaddr[4] = (data) & 0xff;
data = hal_read_reg(nghd->mac_base, QCOM_MAC_ADDR1);
macaddr[0] = (data >> 24) & 0xff;
macaddr[1] = (data >> 16) & 0xff;
macaddr[2] = (data >> 8) & 0xff;
macaddr[3] = (data) & 0xff;
}
/*
* qcom_set_mac_address()
*/
static void qcom_set_mac_address(struct nss_gmac_hal_dev *nghd,
uint8_t *macaddr)
{
uint32_t data = (macaddr[5] << 8) | macaddr[4];
hal_write_reg(nghd->mac_base, QCOM_MAC_ADDR0, data);
data = (macaddr[0] << 24) | (macaddr[1] << 16)
| (macaddr[2] << 8) | macaddr[3];
hal_write_reg(nghd->mac_base, QCOM_MAC_ADDR1, data);
}
/*
* MAC hal_ops base structure
*/
struct nss_gmac_hal_ops qcom_hal_ops = {
.init = &qcom_init,
.start = &qcom_start,
.stop = &qcom_stop,
.setmacaddr = &qcom_set_mac_address,
.getmacaddr = &qcom_get_mac_address,
.rxflowcontrol = &qcom_rx_flow_control,
.txflowcontrol = &qcom_tx_flow_control,
.setspeed = &qcom_set_mac_speed,
.getspeed = &qcom_get_mac_speed,
.setduplex = &qcom_set_duplex_mode,
.getduplex = &qcom_get_duplex_mode,
.getstats = &qcom_get_mib_stats,
.setmaxframe = &qcom_set_maxframe,
.getmaxframe = &qcom_get_maxframe,
.getndostats = &qcom_get_netdev_stats,
.getssetcount = &qcom_get_strset_count,
.getstrings = &qcom_get_strings,
.getethtoolstats = &qcom_get_eth_stats,
.sendpause = &qcom_send_pause_frame,
.stoppause = &qcom_stop_pause_frame,
};

View File

@@ -1,156 +0,0 @@
/*
**************************************************************************
* Copyright (c) 2016,2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF0
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**************************************************************************
*/
#ifndef __QCOM_REG_H__
#define __QCOM_REG_H__
/* Register Offsets */
/* Offsets of GMAC config and status registers within NSS_GMAC_QCOM_MAC_BASE */
#define QCOM_MAC_ENABLE 0x0000
#define QCOM_MAC_SPEED 0x0004
#define QCOM_MAC_ADDR0 0x0008
#define QCOM_MAC_ADDR1 0x000c
#define QCOM_MAC_CTRL0 0x0010
#define QCOM_MAC_CTRL1 0x0014
#define QCOM_MAC_CTRL2 0x0018
#define QCOM_MAC_DBG_CTRL 0x001c
#define QCOM_MAC_DBG_ADDR 0x0020
#define QCOM_MAC_DBG_DATA 0x0024
#define QCOM_MAC_JMB_SIZE 0x0030
#define QCOM_MAC_MIB_CTRL 0x0034
/* RX stats */
#define QCOM_RXBROAD 0x0040
#define QCOM_RXPAUSE 0x0044
#define QCOM_RXMULTI 0x0048
#define QCOM_RXFCSERR 0x004c
#define QCOM_RXALIGNERR 0x0050
#define QCOM_RXRUNT 0x0054
#define QCOM_RXFRAG 0x0058
#define QCOM_RXJMBFCSERR 0x005c
#define QCOM_RXJMBALIGNERR 0x0060
#define QCOM_RXPKT64 0x0064
#define QCOM_RXPKT65TO127 0x0068
#define QCOM_RXPKT128TO255 0x006c
#define QCOM_RXPKT256TO511 0x0070
#define QCOM_RXPKT512TO1023 0x0074
#define QCOM_RXPKT1024TO1518 0x0078
#define QCOM_RXPKT1519TOX 0x007c
#define QCOM_RXPKTTOOLONG 0x0080
#define QCOM_RXPKTGOODBYTE_L 0x0084
#define QCOM_RXPKTGOODBYTE_H 0x0088
#define QCOM_RXPKTBADBYTE_L 0x008c
#define QCOM_RXPKTBADBYTE_H 0x0090
#define QCOM_RXUNI 0x0094
/* TX stats */
#define QCOM_TXBROAD 0x00a0
#define QCOM_TXPAUSE 0x00a4
#define QCOM_TXMULTI 0x00a8
#define QCOM_TXUNDERUN 0x00aC
#define QCOM_TXPKT64 0x00b0
#define QCOM_TXPKT65TO127 0x00b4
#define QCOM_TXPKT128TO255 0x00b8
#define QCOM_TXPKT256TO511 0x00bc
#define QCOM_TXPKT512TO1023 0x00c0
#define QCOM_TXPKT1024TO1518 0x00c4
#define QCOM_TXPKT1519TOX 0x00c8
#define QCOM_TXPKTBYTE_L 0x00cc
#define QCOM_TXPKTBYTE_H 0x00d0
#define QCOM_TXCOLLISIONS 0x00d4
#define QCOM_TXABORTCOL 0x00d8
#define QCOM_TXMULTICOL 0x00dc
#define QCOM_TXSINGLECOL 0x00e0
#define QCOM_TXEXCESSIVEDEFER 0x00e4
#define QCOM_TXDEFER 0x00e8
#define QCOM_TXLATECOL 0x00ec
#define QCOM_TXUNI 0x00f0
/* Bit Masks */
/* GMAC BITs */
#define QCOM_RX_MAC_ENABLE 1
#define QCOM_TX_MAC_ENABLE 0x2
#define QCOM_DUPLEX 0x10
#define QCOM_RX_FLOW_ENABLE 0x20
#define QCOM_TX_FLOW_ENABLE 0x40
#define QCOM_MAC_SPEED_10 0
#define QCOM_MAC_SPEED_100 1
#define QCOM_MAC_SPEED_1000 2
/* MAC CTRL0 */
#define QCOM_IPGT_POS 0x0000007f
#define QCOM_IPGT_LSB 0
#define QCOM_IPGR2_POS 0x00007f00
#define QCOM_IPGR2_LSB 8
#define QCOM_HALF_THDF_CTRL 0x8000
#define QCOM_HUGE_RECV 0x10000
#define QCOM_HUGE_TRANS 0x20000
#define QCOM_FLCHK 0x40000
#define QCOM_ABEBE 0x80000
#define QCOM_AMAXE 0x10000000
#define QCOM_BPNB 0x20000000
#define QCOM_NOBO 0x40000000
#define QCOM_DRBNIB_RXOK 0x80000000
/* MAC CTRL1 */
#define QCOM_JAM_IPG_POS 0x0000000f
#define QCOM_JAM_IPG_LSB 0
#define QCOM_TPAUSE 0x10
#define QCOM_TCTL 0x20
#define QCOM_SSTCT 0x40
#define QCOM_SIMR 0x80
#define QCOM_RETRY_POS 0x00000f00
#define QCOM_RETRY_LSB 8
#define QCOM_PRLEN_POS 0x0000f000
#define QCOM_PRLEN_LSB 8
#define QCOM_PPAD 0x10000
#define QCOM_POVR 0x20000
#define QCOM_PHUG 0x40000
#define QCOM_MBOF 0x80000
#define QCOM_LCOL_POS 0x0ff00000
#define QCOM_LCOL_LSB 20
#define QCOM_LONG_JAM 0x10000000
/* MAC CTRL2 */
#define QCOM_IPG_DEC_LEN 0x2
#define QCOM_TEST_PAUSE 0x4
#define QCOM_MAC_LPI_TX_IDLE 0x8
#define QCOM_MAC_LOOPBACK 0x10
#define QCOM_IPG_DEC 0x20
#define QCOM_SRS_SEL 0x40
#define QCOM_CRC_RSV 0x80
#define QCOM_MAXFR_POS 0x003fff00
#define QCOM_MAXFR_LSB 8
/* MAC DEBUG_CTRL */
#define QCOM_DBG_IPGR1_POS 0x0000007f
#define QCOM_DBG_IPGR1_LSB 0
#define QCOM_DBG_HIHG_IPG_POS 0x0000ff00
#define QCOM_DBG_HIHG_IPG_LSB 8
#define QCOM_DBG_MAC_IPG_CTRL_POS 0x0000ff00
#define QCOM_DBG_MAC_IPG_CTRL_LSB 20
#define QCOM_DBG_MAC_LEN_CTRL 0x40000000
#define QCOM_DBG_EDxSDFR_TRANS 0x80000000
/* MAC MIB-CTRL*/
#define QCOM_MIB_ENABLE 1
#define QCOM_MIB_RESET 0x2
#define QCOM_MIB_RD_CLR 0x4
#endif /*__QCOM_REG_H__*/

View File

@@ -1,30 +0,0 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __SYN_DEV_H__
#define __SYN_DEV_H__
#include <nss_dp_dev.h>
/*
* Subclass for base nss_gmac_hal_dev
*/
struct syn_hal_dev {
struct nss_gmac_hal_dev nghd; /* Base class */
struct nss_dp_gmac_stats stats; /* Stats structure */
};
#endif /*__SYN_DEV_H__*/

View File

@@ -1,959 +0,0 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <fal/fal_mib.h>
#include <fal/fal_port_ctrl.h>
#include <linux/delay.h>
#include <linux/ethtool.h>
#include <linux/vmalloc.h>
#include <linux/spinlock.h>
#include <linux/io.h>
#include <nss_dp_hal.h>
#include "syn_dev.h"
#include "syn_reg.h"
#define SYN_STAT(m) offsetof(struct nss_dp_hal_gmac_stats, m)
#define HW_ERR_SIZE sizeof(uint64_t)
/*
* Array to store ethtool statistics
*/
struct syn_ethtool_stats {
uint8_t stat_string[ETH_GSTRING_LEN];
uint64_t stat_offset;
};
/*
* Array of strings describing statistics
*/
static const struct syn_ethtool_stats syn_gstrings_stats[] = {
{"rx_bytes", SYN_STAT(rx_bytes)},
{"rx_packets", SYN_STAT(rx_packets)},
{"rx_errors", SYN_STAT(rx_errors)},
{"rx_receive_errors", SYN_STAT(rx_receive_errors)},
{"rx_descriptor_errors", SYN_STAT(rx_descriptor_errors)},
{"rx_late_collision_errors", SYN_STAT(rx_late_collision_errors)},
{"rx_dribble_bit_errors", SYN_STAT(rx_dribble_bit_errors)},
{"rx_length_errors", SYN_STAT(rx_length_errors)},
{"rx_ip_header_errors", SYN_STAT(rx_ip_header_errors)},
{"rx_ip_payload_errors", SYN_STAT(rx_ip_payload_errors)},
{"rx_no_buffer_errors", SYN_STAT(rx_no_buffer_errors)},
{"rx_transport_csum_bypassed", SYN_STAT(rx_transport_csum_bypassed)},
{"tx_bytes", SYN_STAT(tx_bytes)},
{"tx_packets", SYN_STAT(tx_packets)},
{"tx_collisions", SYN_STAT(tx_collisions)},
{"tx_errors", SYN_STAT(tx_errors)},
{"tx_jabber_timeout_errors", SYN_STAT(tx_jabber_timeout_errors)},
{"tx_frame_flushed_errors", SYN_STAT(tx_frame_flushed_errors)},
{"tx_loss_of_carrier_errors", SYN_STAT(tx_loss_of_carrier_errors)},
{"tx_no_carrier_errors", SYN_STAT(tx_no_carrier_errors)},
{"tx_late_collision_errors", SYN_STAT(tx_late_collision_errors)},
{"tx_excessive_collision_errors", SYN_STAT(tx_excessive_collision_errors)},
{"tx_excessive_deferral_errors", SYN_STAT(tx_excessive_deferral_errors)},
{"tx_underflow_errors", SYN_STAT(tx_underflow_errors)},
{"tx_ip_header_errors", SYN_STAT(tx_ip_header_errors)},
{"tx_ip_payload_errors", SYN_STAT(tx_ip_payload_errors)},
{"tx_dropped", SYN_STAT(tx_dropped)},
{"rx_missed", SYN_STAT(rx_missed)},
{"fifo_overflows", SYN_STAT(fifo_overflows)},
{"rx_scatter_errors", SYN_STAT(rx_scatter_errors)},
{"tx_ts_create_errors", SYN_STAT(tx_ts_create_errors)},
{"pmt_interrupts", SYN_STAT(hw_errs[0])},
{"mmc_interrupts", SYN_STAT(hw_errs[0]) + (1 * HW_ERR_SIZE)},
{"line_interface_interrupts", SYN_STAT(hw_errs[0]) + (2 * HW_ERR_SIZE)},
{"fatal_bus_error_interrupts", SYN_STAT(hw_errs[0]) + (3 * HW_ERR_SIZE)},
{"rx_buffer_unavailable_interrupts", SYN_STAT(hw_errs[0]) + (4 * HW_ERR_SIZE)},
{"rx_process_stopped_interrupts", SYN_STAT(hw_errs[0]) + (5 * HW_ERR_SIZE)},
{"tx_underflow_interrupts", SYN_STAT(hw_errs[0]) + (6 * HW_ERR_SIZE)},
{"rx_overflow_interrupts", SYN_STAT(hw_errs[0]) + (7 * HW_ERR_SIZE)},
{"tx_jabber_timeout_interrutps", SYN_STAT(hw_errs[0]) + (8 * HW_ERR_SIZE)},
{"tx_process_stopped_interrutps", SYN_STAT(hw_errs[0]) + (9 * HW_ERR_SIZE)},
{"gmac_total_ticks", SYN_STAT(gmac_total_ticks)},
{"gmac_worst_case_ticks", SYN_STAT(gmac_worst_case_ticks)},
{"gmac_iterations", SYN_STAT(gmac_iterations)},
{"tx_pause_frames", SYN_STAT(tx_pause_frames)},
{"mmc_rx_overflow_errors", SYN_STAT(mmc_rx_overflow_errors)},
{"mmc_rx_watchdog_timeout_errors", SYN_STAT(mmc_rx_watchdog_timeout_errors)},
{"mmc_rx_crc_errors", SYN_STAT(mmc_rx_crc_errors)},
{"mmc_rx_ip_header_errors", SYN_STAT(mmc_rx_ip_header_errors)},
{"mmc_rx_octets_g", SYN_STAT(mmc_rx_octets_g)},
{"mmc_rx_ucast_frames", SYN_STAT(mmc_rx_ucast_frames)},
{"mmc_rx_bcast_frames", SYN_STAT(mmc_rx_bcast_frames)},
{"mmc_rx_mcast_frames", SYN_STAT(mmc_rx_mcast_frames)},
{"mmc_rx_undersize", SYN_STAT(mmc_rx_undersize)},
{"mmc_rx_oversize", SYN_STAT(mmc_rx_oversize)},
{"mmc_rx_jabber", SYN_STAT(mmc_rx_jabber)},
{"mmc_rx_octets_gb", SYN_STAT(mmc_rx_octets_gb)},
{"mmc_rx_frag_frames_g", SYN_STAT(mmc_rx_frag_frames_g)},
{"mmc_tx_octets_g", SYN_STAT(mmc_tx_octets_g)},
{"mmc_tx_ucast_frames", SYN_STAT(mmc_tx_ucast_frames)},
{"mmc_tx_bcast_frames", SYN_STAT(mmc_tx_bcast_frames)},
{"mmc_tx_mcast_frames", SYN_STAT(mmc_tx_mcast_frames)},
{"mmc_tx_deferred", SYN_STAT(mmc_tx_deferred)},
{"mmc_tx_single_col", SYN_STAT(mmc_tx_single_col)},
{"mmc_tx_multiple_col", SYN_STAT(mmc_tx_multiple_col)},
{"mmc_tx_octets_gb", SYN_STAT(mmc_tx_octets_gb)},
};
#define SYN_STATS_LEN ARRAY_SIZE(syn_gstrings_stats)
/*
* syn_set_rx_flow_ctrl()
*/
static inline void syn_set_rx_flow_ctrl(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, SYN_MAC_FLOW_CONTROL,
SYN_MAC_FC_RX_FLOW_CONTROL);
}
/*
* syn_clear_rx_flow_ctrl()
*/
static inline void syn_clear_rx_flow_ctrl(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, SYN_MAC_FLOW_CONTROL,
SYN_MAC_FC_RX_FLOW_CONTROL);
}
/*
* syn_set_tx_flow_ctrl()
*/
static inline void syn_set_tx_flow_ctrl(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, SYN_MAC_FLOW_CONTROL,
SYN_MAC_FC_TX_FLOW_CONTROL);
}
/*
* syn_send_tx_pause_frame()
*/
static inline void syn_send_tx_pause_frame(struct nss_gmac_hal_dev *nghd)
{
syn_set_tx_flow_ctrl(nghd);
hal_set_reg_bits(nghd, SYN_MAC_FLOW_CONTROL,
SYN_MAC_FC_SEND_PAUSE_FRAME);
}
/*
* syn_clear_tx_flow_ctrl()
*/
static inline void syn_clear_tx_flow_ctrl(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, SYN_MAC_FLOW_CONTROL,
SYN_MAC_FC_TX_FLOW_CONTROL);
}
/*
* syn_rx_enable()
*/
static inline void syn_rx_enable(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, SYN_MAC_CONFIGURATION, SYN_MAC_RX);
hal_set_reg_bits(nghd, SYN_MAC_FRAME_FILTER, SYN_MAC_FILTER_OFF);
}
/*
* syn_tx_enable()
*/
static inline void syn_tx_enable(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, SYN_MAC_CONFIGURATION, SYN_MAC_TX);
}
/************Ip checksum offloading APIs*************/
/*
* syn_enable_rx_chksum_offload()
* Enable IPv4 header and IPv4/IPv6 TCP/UDP checksum calculation by GMAC.
*/
static inline void syn_enable_rx_chksum_offload(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd,
SYN_MAC_CONFIGURATION, SYN_MAC_RX_IPC_OFFLOAD);
}
/*
* syn_disable_rx_chksum_offload()
* Disable the IP checksum offloading in receive path.
*/
static inline void syn_disable_rx_chksum_offload(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd,
SYN_MAC_CONFIGURATION, SYN_MAC_RX_IPC_OFFLOAD);
}
/*
* syn_rx_tcpip_chksum_drop_enable()
* Instruct the DMA to drop the packets that fail TCP/IP checksum.
*
* This is to instruct the receive DMA engine to drop the recevied
* packet if they fails the tcp/ip checksum in hardware. Valid only when
* full checksum offloading is enabled(type-2).
*/
static inline void syn_rx_tcpip_chksum_drop_enable(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd,
SYN_DMA_OPERATION_MODE, SYN_DMA_DISABLE_DROP_TCP_CS);
}
/*******************Ip checksum offloading APIs**********************/
/*
* syn_ipc_offload_init()
* Initialize IPC Checksum offloading.
*/
static inline void syn_ipc_offload_init(struct nss_gmac_hal_dev *nghd)
{
struct nss_dp_dev *dp_priv;
dp_priv = netdev_priv(nghd->netdev);
if (test_bit(__NSS_DP_RXCSUM, &dp_priv->flags)) {
/*
* Enable the offload engine in the receive path
*/
syn_enable_rx_chksum_offload(nghd);
/*
* DMA drops the packets if error in encapsulated ethernet
* payload.
*/
syn_rx_tcpip_chksum_drop_enable(nghd);
netdev_dbg(nghd->netdev, "%s: enable Rx checksum\n", __func__);
} else {
syn_disable_rx_chksum_offload(nghd);
netdev_dbg(nghd->netdev, "%s: disable Rx checksum\n", __func__);
}
}
/*
* syn_disable_mac_interrupt()
* Disable all the interrupts.
*/
static inline void syn_disable_mac_interrupt(struct nss_gmac_hal_dev *nghd)
{
hal_write_reg(nghd->mac_base, SYN_INTERRUPT_MASK, 0xffffffff);
}
/*
* syn_disable_mmc_tx_interrupt()
* Disable the MMC Tx interrupt.
*
* The MMC tx interrupts are masked out as per the mask specified.
*/
static inline void syn_disable_mmc_tx_interrupt(struct nss_gmac_hal_dev *nghd,
uint32_t mask)
{
hal_set_reg_bits(nghd, SYN_MMC_TX_INTERRUPT_MASK, mask);
}
/*
* syn_disable_mmc_rx_interrupt()
* Disable the MMC Rx interrupt.
*
* The MMC rx interrupts are masked out as per the mask specified.
*/
static inline void syn_disable_mmc_rx_interrupt(struct nss_gmac_hal_dev *nghd,
uint32_t mask)
{
hal_set_reg_bits(nghd, SYN_MMC_RX_INTERRUPT_MASK, mask);
}
/*
* syn_disable_mmc_ipc_rx_interrupt()
* Disable the MMC ipc rx checksum offload interrupt.
*
* The MMC ipc rx checksum offload interrupts are masked out as
* per the mask specified.
*/
static inline void syn_disable_mmc_ipc_rx_interrupt(struct nss_gmac_hal_dev *nghd,
uint32_t mask)
{
hal_set_reg_bits(nghd, SYN_MMC_IPC_RX_INTR_MASK, mask);
}
/*
* syn_disable_dma_interrupt()
* Disables all DMA interrupts.
*/
void syn_disable_dma_interrupt(struct nss_gmac_hal_dev *nghd)
{
hal_write_reg(nghd->mac_base, SYN_DMA_INT_ENABLE, SYN_DMA_INT_DISABLE);
}
/*
* syn_enable_dma_interrupt()
* Enables all DMA interrupts.
*/
void syn_enable_dma_interrupt(struct nss_gmac_hal_dev *nghd)
{
hal_write_reg(nghd->mac_base, SYN_DMA_INT_ENABLE, SYN_DMA_INT_EN);
}
/*
* syn_disable_interrupt_all()
* Disable all the interrupts.
*/
static inline void syn_disable_interrupt_all(struct nss_gmac_hal_dev *nghd)
{
syn_disable_mac_interrupt(nghd);
syn_disable_dma_interrupt(nghd);
syn_disable_mmc_tx_interrupt(nghd, 0xFFFFFFFF);
syn_disable_mmc_rx_interrupt(nghd, 0xFFFFFFFF);
syn_disable_mmc_ipc_rx_interrupt(nghd, 0xFFFFFFFF);
}
/*
* syn_dma_bus_mode_init()
* Function to program DMA bus mode register.
*/
static inline void syn_dma_bus_mode_init(struct nss_gmac_hal_dev *nghd)
{
hal_write_reg(nghd->mac_base, SYN_DMA_BUS_MODE, SYN_DMA_BUS_MODE_VAL);
}
/*
* syn_clear_dma_status()
* Clear all the pending dma interrupts.
*/
void syn_clear_dma_status(struct nss_gmac_hal_dev *nghd)
{
uint32_t data;
data = hal_read_reg(nghd->mac_base, SYN_DMA_STATUS);
hal_write_reg(nghd->mac_base, SYN_DMA_STATUS, data);
}
/*
* syn_enable_dma_rx()
* Enable Rx GMAC operation
*/
void syn_enable_dma_rx(struct nss_gmac_hal_dev *nghd)
{
uint32_t data;
data = hal_read_reg(nghd->mac_base, SYN_DMA_OPERATION_MODE);
data |= SYN_DMA_RX_START;
hal_write_reg(nghd->mac_base, SYN_DMA_OPERATION_MODE, data);
}
/*
* syn_disable_dma_rx()
* Disable Rx GMAC operation
*/
void syn_disable_dma_rx(struct nss_gmac_hal_dev *nghd)
{
uint32_t data;
data = hal_read_reg(nghd->mac_base, SYN_DMA_OPERATION_MODE);
data &= ~SYN_DMA_RX_START;
hal_write_reg(nghd->mac_base, SYN_DMA_OPERATION_MODE, data);
}
/*
* syn_enable_dma_tx()
* Enable Rx GMAC operation
*/
void syn_enable_dma_tx(struct nss_gmac_hal_dev *nghd)
{
uint32_t data;
data = hal_read_reg(nghd->mac_base, SYN_DMA_OPERATION_MODE);
data |= SYN_DMA_TX_START;
hal_write_reg(nghd->mac_base, SYN_DMA_OPERATION_MODE, data);
}
/*
* syn_disable_dma_tx()
* Disable Rx GMAC operation
*/
void syn_disable_dma_tx(struct nss_gmac_hal_dev *nghd)
{
uint32_t data;
data = hal_read_reg(nghd->mac_base, SYN_DMA_OPERATION_MODE);
data &= ~SYN_DMA_TX_START;
hal_write_reg(nghd->mac_base, SYN_DMA_OPERATION_MODE, data);
}
/*
* syn_resume_dma_tx
* Resumes the DMA Transmission.
*/
void syn_resume_dma_tx(struct nss_gmac_hal_dev *nghd)
{
hal_write_reg(nghd->mac_base, SYN_DMA_TX_POLL_DEMAND, 0);
}
/*
* syn_get_rx_missed
* Get Rx missed errors
*/
uint32_t syn_get_rx_missed(struct nss_gmac_hal_dev *nghd)
{
uint32_t missed_frame_buff_overflow;
missed_frame_buff_overflow = hal_read_reg(nghd->mac_base, SYN_DMA_MISSED_FRAME_AND_BUFF_OVERFLOW_COUNTER);
return missed_frame_buff_overflow & 0xFFFF;
}
/*
* syn_get_fifo_overflows
* Get FIFO overflows
*/
uint32_t syn_get_fifo_overflows(struct nss_gmac_hal_dev *nghd)
{
uint32_t missed_frame_buff_overflow;
missed_frame_buff_overflow = hal_read_reg(nghd->mac_base, SYN_DMA_MISSED_FRAME_AND_BUFF_OVERFLOW_COUNTER);
return (missed_frame_buff_overflow >> 17) & 0x7ff;
}
/*
* syn_init_tx_desc_base()
* Programs the Dma Tx Base address with the starting address of the descriptor ring or chain.
*/
void syn_init_tx_desc_base(struct nss_gmac_hal_dev *nghd, uint32_t tx_desc_dma)
{
hal_write_reg(nghd->mac_base, SYN_DMA_TX_DESCRIPTOR_LIST_ADDRESS, tx_desc_dma);
}
/*
* syn_init_rx_desc_base()
* Programs the Dma Rx Base address with the starting address of the descriptor ring or chain.
*/
void syn_init_rx_desc_base(struct nss_gmac_hal_dev *nghd, uint32_t rx_desc_dma)
{
hal_write_reg(nghd->mac_base, SYN_DMA_RX_DESCRIPTOR_LIST_ADDRESS, rx_desc_dma);
}
/*
* syn_dma_axi_bus_mode_init()
* Function to program DMA AXI bus mode register.
*/
static inline void syn_dma_axi_bus_mode_init(struct nss_gmac_hal_dev *nghd)
{
hal_write_reg(nghd->mac_base, SYN_DMA_AXI_BUS_MODE,
SYN_DMA_AXI_BUS_MODE_VAL);
}
/*
* syn_dma_operation_mode_init()
* Function to program DMA Operation Mode register.
*/
static inline void syn_dma_operation_mode_init(struct nss_gmac_hal_dev *nghd)
{
hal_write_reg(nghd->mac_base, SYN_DMA_OPERATION_MODE, SYN_DMA_OMR);
}
/*
* syn_broadcast_enable()
* Enables Broadcast frames.
*
* When enabled Address filtering module passes all incoming broadcast frames.
*/
static inline void syn_broadcast_enable(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, SYN_MAC_FRAME_FILTER, SYN_MAC_BROADCAST);
}
/*
* syn_multicast_enable()
* Enables Multicast frames.
*
* When enabled all multicast frames are passed.
*/
static inline void syn_multicast_enable(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, SYN_MAC_FRAME_FILTER, SYN_MAC_MULTICAST_FILTER);
}
/*
* syn_promisc_enable()
* Enables promiscous mode.
*
* When enabled Address filter modules pass all incoming frames
* regardless of their Destination and source addresses.
*/
static inline void syn_promisc_enable(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, SYN_MAC_FRAME_FILTER, SYN_MAC_FILTER_OFF);
hal_set_reg_bits(nghd, SYN_MAC_FRAME_FILTER,
SYN_MAC_PROMISCUOUS_MODE_ON);
}
/*
* syn_get_stats()
*/
static int syn_get_stats(struct nss_gmac_hal_dev *nghd)
{
struct nss_dp_dev *dp_priv;
struct syn_hal_dev *shd;
struct nss_dp_gmac_stats *stats;
BUG_ON(nghd == NULL);
shd = (struct syn_hal_dev *)nghd;
stats = &(shd->stats);
dp_priv = netdev_priv(nghd->netdev);
if (!dp_priv->data_plane_ops)
return -1;
dp_priv->data_plane_ops->get_stats(dp_priv->dpc, stats);
return 0;
}
/*
* syn_rx_flow_control()
*/
static void syn_rx_flow_control(struct nss_gmac_hal_dev *nghd,
bool enabled)
{
BUG_ON(nghd == NULL);
if (enabled)
syn_set_rx_flow_ctrl(nghd);
else
syn_clear_rx_flow_ctrl(nghd);
}
/*
* syn_tx_flow_control()
*/
static void syn_tx_flow_control(struct nss_gmac_hal_dev *nghd,
bool enabled)
{
BUG_ON(nghd == NULL);
if (enabled)
syn_set_tx_flow_ctrl(nghd);
else
syn_clear_tx_flow_ctrl(nghd);
}
/*
* syn_get_max_frame_size()
*/
static int32_t syn_get_max_frame_size(struct nss_gmac_hal_dev *nghd)
{
int ret;
uint32_t mtu;
BUG_ON(nghd == NULL);
ret = fal_port_max_frame_size_get(0, nghd->mac_id, &mtu);
if (!ret)
return mtu;
return ret;
}
/*
* syn_set_max_frame_size()
*/
static int32_t syn_set_max_frame_size(struct nss_gmac_hal_dev *nghd,
uint32_t val)
{
BUG_ON(nghd == NULL);
return fal_port_max_frame_size_set(0, nghd->mac_id, val);
}
/*
* syn_set_mac_speed()
*/
static int32_t syn_set_mac_speed(struct nss_gmac_hal_dev *nghd,
uint32_t mac_speed)
{
struct net_device *netdev;
BUG_ON(nghd == NULL);
netdev = nghd->netdev;
netdev_warn(netdev, "API deprecated\n");
return 0;
}
/*
* syn_get_mac_speed()
*/
static uint32_t syn_get_mac_speed(struct nss_gmac_hal_dev *nghd)
{
struct net_device *netdev;
BUG_ON(nghd == NULL);
netdev = nghd->netdev;
netdev_warn(netdev, "API deprecated\n");
return 0;
}
/*
* syn_set_duplex_mode()
*/
static void syn_set_duplex_mode(struct nss_gmac_hal_dev *nghd,
uint8_t duplex_mode)
{
struct net_device *netdev;
BUG_ON(nghd == NULL);
netdev = nghd->netdev;
netdev_warn(netdev, "API deprecated\n");
}
/*
* syn_get_duplex_mode()
*/
static uint8_t syn_get_duplex_mode(struct nss_gmac_hal_dev *nghd)
{
struct net_device *netdev;
BUG_ON(nghd == NULL);
netdev = nghd->netdev;
netdev_warn(netdev, "API deprecated\n");
return 0;
}
/*
* syn_get_netdev_stats()
*/
static int syn_get_netdev_stats(struct nss_gmac_hal_dev *nghd,
struct rtnl_link_stats64 *stats)
{
struct syn_hal_dev *shd;
struct nss_dp_hal_gmac_stats *ndo_stats;
BUG_ON(nghd == NULL);
shd = (struct syn_hal_dev *)nghd;
ndo_stats = &(shd->stats.stats);
/*
* Read stats from the registered dataplane.
*/
if (syn_get_stats(nghd))
return -1;
stats->rx_packets = ndo_stats->rx_packets;
stats->rx_bytes = ndo_stats->rx_bytes;
stats->rx_errors = ndo_stats->rx_errors;
stats->rx_dropped = ndo_stats->rx_errors;
stats->rx_length_errors = ndo_stats->rx_length_errors;
stats->rx_over_errors = ndo_stats->mmc_rx_overflow_errors;
stats->rx_crc_errors = ndo_stats->mmc_rx_crc_errors;
stats->rx_frame_errors = ndo_stats->rx_dribble_bit_errors;
stats->rx_fifo_errors = ndo_stats->fifo_overflows;
stats->rx_missed_errors = ndo_stats->rx_missed;
stats->collisions = ndo_stats->tx_collisions + ndo_stats->rx_late_collision_errors;
stats->tx_packets = ndo_stats->tx_packets;
stats->tx_bytes = ndo_stats->tx_bytes;
stats->tx_errors = ndo_stats->tx_errors;
stats->tx_dropped = ndo_stats->tx_dropped;
stats->tx_carrier_errors = ndo_stats->tx_loss_of_carrier_errors + ndo_stats->tx_no_carrier_errors;
stats->tx_fifo_errors = ndo_stats->tx_underflow_errors;
stats->tx_window_errors = ndo_stats->tx_late_collision_errors;
return 0;
}
/*
* syn_get_eth_stats()
*/
static int32_t syn_get_eth_stats(struct nss_gmac_hal_dev *nghd,
uint64_t *data)
{
struct syn_hal_dev *shd;
struct nss_dp_gmac_stats *stats;
uint8_t *p = NULL;
int i;
BUG_ON(nghd == NULL);
shd = (struct syn_hal_dev *)nghd;
stats = &(shd->stats);
/*
* Read stats from the registered dataplane.
*/
if (syn_get_stats(nghd))
return -1;
for (i = 0; i < SYN_STATS_LEN; i++) {
p = ((uint8_t *)(stats) +
syn_gstrings_stats[i].stat_offset);
data[i] = *(uint32_t *)p;
}
return 0;
}
/*
* syn_get_strset_count()
*/
static int32_t syn_get_strset_count(struct nss_gmac_hal_dev *nghd,
int32_t sset)
{
struct net_device *netdev;
BUG_ON(nghd == NULL);
netdev = nghd->netdev;
switch (sset) {
case ETH_SS_STATS:
return SYN_STATS_LEN;
}
netdev_dbg(netdev, "%s: Invalid string set\n", __func__);
return -EPERM;
}
/*
* syn_get_strings()
*/
static int32_t syn_get_strings(struct nss_gmac_hal_dev *nghd,
int32_t stringset, uint8_t *data)
{
struct net_device *netdev;
int i;
BUG_ON(nghd == NULL);
netdev = nghd->netdev;
switch (stringset) {
case ETH_SS_STATS:
for (i = 0; i < SYN_STATS_LEN; i++) {
memcpy(data, syn_gstrings_stats[i].stat_string,
ETH_GSTRING_LEN);
data += ETH_GSTRING_LEN;
}
break;
default:
netdev_dbg(netdev, "%s: Invalid string set\n", __func__);
return -EPERM;
}
return 0;
}
/*
* syn_send_pause_frame()
*/
static void syn_send_pause_frame(struct nss_gmac_hal_dev *nghd)
{
BUG_ON(nghd == NULL);
syn_send_tx_pause_frame(nghd);
}
/*
* syn_set_mac_address()
*/
static void syn_set_mac_address(struct nss_gmac_hal_dev *nghd,
uint8_t *macaddr)
{
uint32_t data;
BUG_ON(nghd == NULL);
if (!macaddr) {
netdev_warn(nghd->netdev, "macaddr is not valid.\n");
return;
}
data = (macaddr[5] << 8) | macaddr[4] | SYN_MAC_ADDR_HIGH_AE;
hal_write_reg(nghd->mac_base, SYN_MAC_ADDR0_HIGH, data);
data = (macaddr[3] << 24) | (macaddr[2] << 16) | (macaddr[1] << 8)
| macaddr[0];
hal_write_reg(nghd->mac_base, SYN_MAC_ADDR0_LOW, data);
}
/*
* syn_get_mac_address()
*/
static void syn_get_mac_address(struct nss_gmac_hal_dev *nghd,
uint8_t *macaddr)
{
uint32_t data;
BUG_ON(nghd == NULL);
if (!macaddr) {
netdev_warn(nghd->netdev, "macaddr is not valid.\n");
return;
}
data = hal_read_reg(nghd->mac_base, SYN_MAC_ADDR0_HIGH);
macaddr[5] = (data >> 8) & 0xff;
macaddr[4] = (data) & 0xff;
data = hal_read_reg(nghd->mac_base, SYN_MAC_ADDR0_LOW);
macaddr[3] = (data >> 24) & 0xff;
macaddr[2] = (data >> 16) & 0xff;
macaddr[1] = (data >> 8) & 0xff;
macaddr[0] = (data) & 0xff;
}
/*
* syn_dma_init()
* Initialize settings for GMAC DMA and AXI bus.
*/
static void syn_dma_init(struct nss_gmac_hal_dev *nghd)
{
struct net_device *ndev = nghd->netdev;
struct nss_dp_dev *dp_priv = netdev_priv(ndev);
/*
* Enable SoC specific GMAC clocks.
*/
nss_dp_hal_clk_enable(dp_priv);
/*
* Configure DMA registers.
*/
syn_dma_bus_mode_init(nghd);
syn_dma_axi_bus_mode_init(nghd);
syn_dma_operation_mode_init(nghd);
}
/*
* syn_init()
*/
static void *syn_init(struct gmac_hal_platform_data *gmacpdata)
{
struct syn_hal_dev *shd = NULL;
struct net_device *ndev = NULL;
struct nss_dp_dev *dp_priv = NULL;
struct resource *res;
ndev = gmacpdata->netdev;
dp_priv = netdev_priv(ndev);
res = platform_get_resource(dp_priv->pdev, IORESOURCE_MEM, 0);
if (!res) {
netdev_dbg(ndev, "Resource get failed.\n");
return NULL;
}
shd = (struct syn_hal_dev *)devm_kzalloc(&dp_priv->pdev->dev,
sizeof(struct syn_hal_dev),
GFP_KERNEL);
if (!shd) {
netdev_dbg(ndev, "kzalloc failed. Returning...\n");
return NULL;
}
shd->nghd.mac_reg_len = resource_size(res);
shd->nghd.memres = devm_request_mem_region(&dp_priv->pdev->dev,
res->start,
resource_size(res),
ndev->name);
if (!shd->nghd.memres) {
netdev_dbg(ndev, "Request mem region failed. Returning...\n");
devm_kfree(&dp_priv->pdev->dev, shd);
return NULL;
}
/*
* Save netdev context in syn HAL context
*/
shd->nghd.netdev = gmacpdata->netdev;
shd->nghd.mac_id = gmacpdata->macid;
shd->nghd.duplex_mode = DUPLEX_FULL;
set_bit(__NSS_DP_RXCSUM, &dp_priv->flags);
/*
* Populate the mac base addresses
*/
shd->nghd.mac_base =
devm_ioremap_nocache(&dp_priv->pdev->dev, res->start,
resource_size(res));
if (!shd->nghd.mac_base) {
netdev_dbg(ndev, "ioremap fail.\n");
devm_kfree(&dp_priv->pdev->dev, shd);
return NULL;
}
spin_lock_init(&shd->nghd.slock);
netdev_dbg(ndev, "ioremap OK.Size 0x%x Ndev base 0x%lx macbase 0x%px\n",
gmacpdata->reg_len,
ndev->base_addr,
shd->nghd.mac_base);
syn_disable_interrupt_all(&shd->nghd);
syn_dma_init(&shd->nghd);
syn_ipc_offload_init(&shd->nghd);
syn_promisc_enable(&shd->nghd);
syn_broadcast_enable(&shd->nghd);
syn_multicast_enable(&shd->nghd);
syn_rx_enable(&shd->nghd);
syn_tx_enable(&shd->nghd);
/*
* Reset MIB Stats
*/
if (fal_mib_port_flush_counters(0, shd->nghd.mac_id)) {
netdev_dbg(ndev, "MIB stats Reset fail.\n");
}
return (struct nss_gmac_hal_dev *)shd;
}
/*
* syn_exit()
*/
static void syn_exit(struct nss_gmac_hal_dev *nghd)
{
struct nss_dp_dev *dp_priv = NULL;
dp_priv = netdev_priv(nghd->netdev);
devm_iounmap(&dp_priv->pdev->dev,
(void *)nghd->mac_base);
devm_release_mem_region(&dp_priv->pdev->dev,
(nghd->memres)->start,
nghd->mac_reg_len);
nghd->memres = NULL;
nghd->mac_base = NULL;
}
struct nss_gmac_hal_ops syn_hal_ops = {
.init = &syn_init,
.start = NULL,
.stop = NULL,
.exit = &syn_exit,
.setmacaddr = &syn_set_mac_address,
.getmacaddr = &syn_get_mac_address,
.rxflowcontrol = &syn_rx_flow_control,
.txflowcontrol = &syn_tx_flow_control,
.setspeed = &syn_set_mac_speed,
.getspeed = &syn_get_mac_speed,
.setduplex = &syn_set_duplex_mode,
.getduplex = &syn_get_duplex_mode,
.setmaxframe = &syn_set_max_frame_size,
.getmaxframe = &syn_get_max_frame_size,
.getndostats = &syn_get_netdev_stats,
.getssetcount = &syn_get_strset_count,
.getstrings = &syn_get_strings,
.getethtoolstats = &syn_get_eth_stats,
.sendpause = &syn_send_pause_frame,
};

View File

@@ -1,531 +0,0 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __SYN_REG_H__
#define __SYN_REG_H__
/*
* MAC register offset
*/
#define SYN_MAC_CONFIGURATION 0x0000
#define SYN_MAC_FRAME_FILTER 0x0004
#define SYN_MAC_FLOW_CONTROL 0x0018
#define SYN_VLAN_TAG 0x001C
#define SYN_VERSION 0x0020
#define SYN_DEBUG 0x0024
#define SYN_REMOTE_WAKE_UP_FRAME_FILTER 0x0028
#define SYN_PMT_CONTROL_STATUS 0x002C
#define SYN_LPI_CONTROL_STATUS 0x0030
#define SYN_LPI_TIMERS_CONTROL 0x0034
#define SYN_INTERRUPT_STATUS 0x0038
#define SYN_INTERRUPT_MASK 0x003C
/*
* MAC address register offset
*/
#define SYN_MAC_ADDR0_HIGH 0x0040
#define SYN_MAC_ADDR0_LOW 0x0044
#define SYN_MAC_ADDR1_HIGH 0x0048
#define SYN_MAC_ADDR1_LOW 0x004C
#define SYN_MAC_ADDR2_HIGH 0x0050
#define SYN_MAC_ADDR2_LOW 0x0054
#define SYN_MAC_ADDR3_HIGH 0x0058
#define SYN_MAC_ADDR3_LOW 0x005C
#define SYN_MAC_ADDR4_HIGH 0x0060
#define SYN_MAC_ADDR4_LOW 0x0064
/*
* Watchdog timeout register
*/
#define SYN_WDOG_TIMEOUT 0x00DC
/*
* Mac Management Counters (MMC) register offset
*/
#define SYN_MMC_CONTROL 0x0100
#define SYN_MMC_RX_INTERRUPT 0x0104
#define SYN_MMC_TX_INTERRUPT 0x0108
#define SYN_MMC_RX_INTERRUPT_MASK 0x010C
#define SYN_MMC_TX_INTERRUPT_MASK 0x0110
#define SYN_MMC_IPC_RX_INTR_MASK 0x0200
/*
* DMA Register offset
*/
#define SYN_DMA_BUS_MODE 0x1000
#define SYN_DMA_TX_POLL_DEMAND 0x1004
#define SYN_DMA_RX_POLL_DEMAND 0x1008
#define SYN_DMA_RX_DESCRIPTOR_LIST_ADDRESS 0x100C
#define SYN_DMA_TX_DESCRIPTOR_LIST_ADDRESS 0x1010
#define SYN_DMA_STATUS 0x1014
#define SYN_DMA_OPERATION_MODE 0x1018
#define SYN_DMA_INT_ENABLE 0x101C
#define SYN_DMA_MISSED_FRAME_AND_BUFF_OVERFLOW_COUNTER 0x1020
#define SYN_DMA_RX_INTERRUPT_WATCHDOG_TIMER 0x1024
#define SYN_DMA_AXI_BUS_MODE 0x1028
#define SYN_DMA_AHB_OR_AXI_STATUS 0x102C
#define SYN_DMA_CURRENT_HOST_TX_DESCRIPTOR 0x1048
#define SYN_DMA_CURRENT_HOST_RX_DESCRIPTOR 0x104C
#define SYN_DMA_CURRENT_HOST_TX_BUFFER_ADDRESS 0x1050
#define SYN_DMA_CURRENT_HOST_RX_BUFFER_ADDRESS 0x1054
/*
* Optional HW feature register
*/
#define SYN_HW_FEATURE 0x1058
/*
* Register Bit Definitions
*/
/*
* SYN_MAC_CONFIGURATION = 0x0000, MAC config Register Layout
*/
enum syn_mac_config_reg {
SYN_MAC_TWOKPE = 0x08000000, /* Support for 2K packets */
SYN_MAC_TWOKPE_ENABLE = 0x08000000,
SYN_MAC_TWOKPE_DISABLE = 0x00000000,
SYN_MAC_CST = 0x02000000, /* (CST) CRC Stripping for Type Frames */
SYN_MAC_CST_ENABLE = 0x02000000,
SYN_MAC_CST_DISABLE = 0x02000000,
SYN_MAC_TC = 0x01000000, /* (TC) Transmit configuration */
SYN_MAC_WATCHDOG = 0x00800000,
SYN_MAC_WATCHDOG_ENABLE = 0x00000000, /* Enable watchdog timer */
SYN_MAC_WATCHDOG_DISABLE = 0x00800000, /* (WD)Disable watchdog timer on Rx */
SYN_MAC_JABBER = 0x00400000,
SYN_MAC_JABBER_ENABLE = 0x00000000, /* Enable jabber timer */
SYN_MAC_JABBER_DISABLE = 0x00400000, /* (JD)Disable jabber timer on Tx */
SYN_MAC_FRAME_BURST = 0x00200000,
SYN_MAC_FRAME_BURST_ENABLE = 0x00200000, /* (BE)Enable frame bursting
during Tx */
SYN_MAC_FRAME_BURST_DISABLE = 0x00000000, /* Disable frame bursting */
SYN_MAC_JUMBO_FRAME = 0x00100000,
SYN_MAC_JUMBO_FRAME_ENABLE = 0x00100000, /* (JE)Enable jumbo frame for Rx */
SYN_MAC_JUMBO_FRAME_DISABLE = 0x00000000, /* Disable jumbo frame */
SYN_MAC_INTER_FRAME_GAP7 = 0x000E0000, /* (IFG) Config7 - 40bit times */
SYN_MAC_INTER_FRAME_GAP6 = 0x000C0000, /* (IFG) Config6 - 48bit times */
SYN_MAC_INTER_FRAME_GAP5 = 0x000A0000, /* (IFG) Config5 - 56bit times */
SYN_MAC_INTER_FRAME_GAP4 = 0x00080000, /* (IFG) Config4 - 64bit times */
SYN_MAC_INTER_FRAME_GAP3 = 0x00060000, /* (IFG) Config3 - 72bit times */
SYN_MAC_INTER_FRAME_GAP2 = 0x00040000, /* (IFG) Config2 - 80bit times */
SYN_MAC_INTER_FRAME_GAP1 = 0x00020000, /* (IFG) Config1 - 88bit times */
SYN_MAC_INTER_FRAME_GAP0 = 0x00000000, /* (IFG) Config0 - 96bit times */
SYN_MAC_DISABLE_CRS = 0x00010000, /* (DCRS) Disable Carrier Sense During Transmission */
SYN_MAC_MII_GMII = 0x00008000,
SYN_MAC_SELECT_MII = 0x00008000, /* (PS)Port Select-MII mode */
SYN_MAC_SELECT_GMII = 0x00000000, /* GMII mode */
SYN_MAC_FE_SPEED100 = 0x00004000, /* (FES)Fast Ethernet speed 100Mbps */
SYN_MAC_FE_SPEED = 0x00004000, /* (FES)Fast Ethernet speed 100Mbps */
SYN_MAC_FE_SPEED10 = 0x00000000, /* (FES)Fast Ethernet speed 10Mbps */
SYN_MAC_RX_OWN = 0x00002000,
SYN_MAC_DISABLE_RX_OWN = 0x00002000, /* (DO)Disable receive own packets */
SYN_MAC_ENABLE_RX_OWN = 0x00000000, /* Enable receive own packets */
SYN_MAC_LOOPBACK = 0x00001000,
SYN_MAC_LOOPBACK_ON = 0x00001000, /* (LM)Loopback mode for GMII/MII */
SYN_MAC_LOOPBACK_OFF = 0x00000000, /* Normal mode */
SYN_MAC_DUPLEX = 0x00000800,
SYN_MAC_FULL_DUPLEX = 0x00000800, /* (DM)Full duplex mode */
SYN_MAC_HALF_DUPLEX = 0x00000000, /* Half duplex mode */
SYN_MAC_RX_IPC_OFFLOAD = 0x00000400, /* IPC checksum offload */
SYN_MAC_RX_IPC_OFFLOAD_ENABLE = 0x00000400,
SYN_MAC_RX_IPC_OFFLOAD_DISABLE = 0x00000000,
SYN_MAC_RETRY = 0x00000200,
SYN_MAC_RETRY_DISABLE = 0x00000200, /* (DR)Disable Retry */
SYN_MAC_RETRY_ENABLE = 0x00000000, /* Enable retransmission as per BL */
SYN_MAC_LINK_UP = 0x00000100, /* (LUD)Link UP */
SYN_MAC_LINK_DOWN = 0x00000100, /* Link Down */
SYN_MAC_PAD_CRC_STRIP = 0x00000080,
SYN_MAC_PAD_CRC_STRIP_ENABLE = 0x00000080, /* (ACS) Automatic Pad/Crc strip enable */
SYN_MAC_PAD_CRC_STRIP_DISABLE = 0x00000000, /* Automatic Pad/Crc stripping disable */
SYN_MAC_BACKOFF_LIMIT = 0x00000060,
SYN_MAC_BACKOFF_LIMIT3 = 0x00000060, /* (BL)Back-off limit in HD mode */
SYN_MAC_BACKOFF_LIMIT2 = 0x00000040,
SYN_MAC_BACKOFF_LIMIT1 = 0x00000020,
SYN_MAC_BACKOFF_LIMIT0 = 0x00000000,
SYN_MAC_DEFERRAL_CHECK = 0x00000010,
SYN_MAC_DEFERRAL_CHECK_ENABLE = 0x00000010, /* (DC)Deferral check enable in HD mode */
SYN_MAC_DEFERRAL_CHECK_DISABLE = 0x00000000, /* Deferral check disable */
SYN_MAC_TX = 0x00000008,
SYN_MAC_TX_ENABLE = 0x00000008, /* (TE)Transmitter enable */
SYN_MAC_TX_DISABLE = 0x00000000, /* Transmitter disable */
SYN_MAC_RX = 0x00000004,
SYN_MAC_RX_ENABLE = 0x00000004, /* (RE)Receiver enable */
SYN_MAC_RX_DISABLE = 0x00000000, /* Receiver disable */
SYN_MAC_PRELEN_RESERVED = 0x00000003, /* Preamble Length for Transmit Frames */
SYN_MAC_PRELEN_3B = 0x00000002,
SYN_MAC_PRELEN_5B = 0x00000001,
SYN_MAC_PRELEN_7B = 0x00000000,
};
/*
* SYN_MAC_FRAME_FILTER = 0x0004, Mac frame filtering controls Register
*/
enum syn_mac_frame_filter_reg {
SYN_MAC_FILTER = 0x80000000,
SYN_MAC_FILTER_OFF = 0x80000000, /* (RA)Receive all incoming packets */
SYN_MAC_FILTER_ON = 0x00000000, /* Receive filtered pkts only */
SYN_MAC_HASH_PERFECT_FILTER = 0x00000400, /* Hash or Perfect Filter enable */
SYN_MAC_SRC_ADDR_FILTER = 0x00000200,
SYN_MAC_SRC_ADDR_FILTER_ENABLE = 0x00000200, /* (SAF)Source Address Filter enable */
SYN_MAC_SRC_ADDR_FILTER_DISABLE = 0x00000000,
SYN_MAC_SRC_INVA_ADDR_FILTER = 0x00000100,
SYN_MAC_SRC_INV_ADDR_FILTER_EN = 0x00000100, /* (SAIF)Inv Src Addr Filter enable */
SYN_MAC_SRC_INV_ADDR_FILTER_DIS = 0x00000000,
SYN_MAC_PASS_CONTROL = 0x000000C0,
SYN_MAC_PASS_CONTROL3 = 0x000000C0, /* (PCF)Forwards ctrl frames that pass AF */
SYN_MAC_PASS_CONTROL2 = 0x00000080, /* Forwards all control frames
even if they fail the AF */
SYN_MAC_PASS_CONTROL1 = 0x00000040, /* Forwards all control frames except
PAUSE control frames to application
even if they fail the AF */
SYN_MAC_PASS_CONTROL0 = 0x00000000, /* Don't pass control frames */
SYN_MAC_BROADCAST = 0x00000020,
SYN_MAC_BROADCAST_DISABLE = 0x00000020, /* (DBF)Disable Rx of broadcast frames */
SYN_MAC_BROADCAST_ENABLE = 0x00000000, /* Enable broadcast frames */
SYN_MAC_MULTICAST_FILTER = 0x00000010,
SYN_MAC_MULTICAST_FILTER_OFF = 0x00000010, /* (PM) Pass all multicast packets */
SYN_MAC_MULTICAST_FILTER_ON = 0x00000000, /* Pass filtered multicast packets */
SYN_MAC_DEST_ADDR_FILTER = 0x00000008,
SYN_MAC_DEST_ADDR_FILTER_INV = 0x00000008, /* (DAIF)Inverse filtering for DA */
SYN_MAC_DEST_ADDR_FILTER_NOR = 0x00000000, /* Normal filtering for DA */
SYN_MAC_MCAST_HASH_FILTER = 0x00000004,
SYN_MAC_MCAST_HASH_FILTER_ON = 0x00000004, /* (HMC)perfom multicast hash filtering */
SYN_MAC_MCAST_HASH_FILTER_OFF = 0x00000000, /* perfect filtering only */
SYN_MAC_UCAST_HASH_FILTER = 0x00000002,
SYN_MAC_UCAST_HASH_FILTER_ON = 0x00000002, /* (HUC)Unicast Hash filtering only */
SYN_MAC_UCAST_HASH_FILTER_OFF = 0x00000000, /* perfect filtering only */
SYN_MAC_PROMISCUOUS_MODE = 0x00000001,
SYN_MAC_PROMISCUOUS_MODE_ON = 0x00000001, /* Receive all frames */
SYN_MAC_PROMISCUOUS_MODE_OFF = 0x00000000, /* Receive filtered packets only */
};
/*
* SYN_MAC_FLOW_CONTROL = 0x0018, Flow control Register Layout
*/
enum syn_mac_flow_control_reg {
SYN_MAC_FC_PAUSE_TIME_MASK = 0xFFFF0000, /* (PT) PAUSE TIME field
in the control frame */
SYN_MAC_FC_PAUSE_TIME_SHIFT = 16,
SYN_MAC_FC_PAUSE_LOW_THRESH = 0x00000030,
SYN_MAC_FC_PAUSE_LOW_THRESH3 = 0x00000030, /* (PLT)thresh for pause
tmr 256 slot time */
SYN_MAC_FC_PAUSE_LOW_THRESH2 = 0x00000020, /* 144 slot time */
SYN_MAC_FC_PAUSE_LOW_THRESH1 = 0x00000010, /* 28 slot time */
SYN_MAC_FC_PAUSE_LOW_THRESH0 = 0x00000000, /* 4 slot time */
SYN_MAC_FC_UNICAST_PAUSE_FRAME = 0x00000008,
SYN_MAC_FC_UNICAST_PAUSE_FRAME_ON = 0x00000008, /* (UP)Detect pause frame
with unicast addr. */
SYN_MAC_FC_UNICAST_PAUSE_FRAME_OFF = 0x00000000,/* Detect only pause frame
with multicast addr. */
SYN_MAC_FC_RX_FLOW_CONTROL = 0x00000004,
SYN_MAC_FC_RX_FLOW_CONTROL_ENABLE = 0x00000004, /* (RFE)Enable Rx flow control */
SYN_MAC_FC_RX_FLOW_CONTROL_DISABLE = 0x00000000,/* Disable Rx flow control */
SYN_MAC_FC_TX_FLOW_CONTROL = 0x00000002,
SYN_MAC_FC_TX_FLOW_CONTROL_ENABLE = 0x00000002, /* (TFE)Enable Tx flow control */
SYN_MAC_FC_TX_FLOW_CONTROL_DISABLE = 0x00000000,/* Disable flow control */
SYN_MAC_FC_FLOW_CONTROL_BACK_PRESSURE = 0x00000001,
SYN_MAC_FC_SEND_PAUSE_FRAME = 0x00000001, /* (FCB/PBA)send pause frm/Apply
back pressure */
};
/*
* SYN_MAC_ADDR_HIGH Register
*/
enum syn_mac_addr_high {
SYN_MAC_ADDR_HIGH_AE = 0x80000000,
};
/*
* SYN_DMA_BUS_MODE = 0x0000, CSR0 - Bus Mode
*/
enum syn_dma_bus_mode_reg {
SYN_DMA_FIXED_BURST_ENABLE = 0x00010000, /* (FB)Fixed Burst SINGLE, INCR4,
INCR8 or INCR16 */
SYN_DMA_FIXED_BURST_DISABLE = 0x00000000, /* SINGLE, INCR */
SYN_DMA_TX_PRIORITY_RATIO11 = 0x00000000, /* (PR)TX:RX DMA priority ratio 1:1 */
SYN_DMA_TX_PRIORITY_RATIO21 = 0x00004000, /* (PR)TX:RX DMA priority ratio 2:1 */
SYN_DMA_TX_PRIORITY_RATIO31 = 0x00008000, /* (PR)TX:RX DMA priority ratio 3:1 */
SYN_DMA_TX_PRIORITY_RATIO41 = 0x0000C000, /* (PR)TX:RX DMA priority ratio 4:1 */
SYN_DMA_ADDRESS_ALIGNED_BEATS = 0x02000000, /* Address Aligned beats */
SYN_DMA_BURST_LENGTHX8 = 0x01000000, /* When set mutiplies the PBL by 8 */
SYN_DMA_BURST_LENGTH256 = 0x01002000, /* (dma_burst_lengthx8 |
dma_burst_length32) = 256 */
SYN_DMA_BURST_LENGTH128 = 0x01001000, /* (dma_burst_lengthx8 |
dma_burst_length16) = 128 */
SYN_DMA_BURST_LENGTH64 = 0x01000800, /* (dma_burst_lengthx8 |
dma_burst_length8) = 64 */
/* (PBL) programmable burst length */
SYN_DMA_BURST_LENGTH32 = 0x00002000, /* Dma burst length = 32 */
SYN_DMA_BURST_LENGTH16 = 0x00001000, /* Dma burst length = 16 */
SYN_DMA_BURST_LENGTH8 = 0x00000800, /* Dma burst length = 8 */
SYN_DMA_BURST_LENGTH4 = 0x00000400, /* Dma burst length = 4 */
SYN_DMA_BURST_LENGTH2 = 0x00000200, /* Dma burst length = 2 */
SYN_DMA_BURST_LENGTH1 = 0x00000100, /* Dma burst length = 1 */
SYN_DMA_BURST_LENGTH0 = 0x00000000, /* Dma burst length = 0 */
SYN_DMA_DESCRIPTOR8_WORDS = 0x00000080, /* Enh Descriptor works 1=>
8 word descriptor */
SYN_DMA_DESCRIPTOR4_WORDS = 0x00000000, /* Enh Descriptor works 0=>
4 word descriptor */
SYN_DMA_DESCRIPTOR_SKIP16 = 0x00000040, /* (DSL)Descriptor skip length (no.of dwords) */
SYN_DMA_DESCRIPTOR_SKIP8 = 0x00000020, /* between two unchained descriptors */
SYN_DMA_DESCRIPTOR_SKIP4 = 0x00000010,
SYN_DMA_DESCRIPTOR_SKIP2 = 0x00000008,
SYN_DMA_DESCRIPTOR_SKIP1 = 0x00000004,
SYN_DMA_DESCRIPTOR_SKIP0 = 0x00000000,
SYN_DMA_ARBIT_RR = 0x00000000, /* (DA) DMA RR arbitration */
SYN_DMA_ARBIT_PR = 0x00000002, /* Rx has priority over Tx */
SYN_DMA_RESET_ON = 0x00000001, /* (SWR)Software Reset DMA engine */
SYN_DMA_RESET_OFF = 0x00000000,
};
/*
* SYN_DMA_STATUS = 0x0014, CSR5 - Dma status Register
*/
enum syn_dma_status_reg {
SYN_DMA_GMAC_PMT_INTR = 0x10000000, /* (GPI)Gmac subsystem interrupt */
SYN_DMA_GMAC_MMC_INTR = 0x08000000, /* (GMI)Gmac MMC subsystem interrupt */
SYN_DMA_GMAC_LINE_INTF_INTR = 0x04000000, /* Line interface interrupt */
SYN_DMA_ERROR_BIT2 = 0x02000000, /* (EB)Error bits 0-data buffer, 1-desc access */
SYN_DMA_ERROR_BIT1 = 0x01000000, /* (EB)Error bits 0-write trnsf, 1-read transfer */
SYN_DMA_ERROR_BIT0 = 0x00800000, /* (EB)Error bits 0-Rx DMA, 1-Tx DMA */
SYN_DMA_TX_STATE = 0x00700000, /* (TS)Transmit process state */
SYN_DMA_TX_STOPPED = 0x00000000, /* Stopped - Reset or Stop Tx Command issued */
SYN_DMA_TX_FETCHING = 0x00100000, /* Running - fetching the Tx descriptor */
SYN_DMA_TX_WAITING = 0x00200000, /* Running - waiting for status */
SYN_DMA_TX_READING = 0x00300000, /* Running - reading the data from host memory */
SYN_DMA_TX_SUSPENDED = 0x00600000, /* Suspended - Tx Descriptor unavailabe */
SYN_DMA_TX_CLOSING = 0x00700000, /* Running - closing Rx descriptor */
SYN_DMA_RX_STATE = 0x000E0000, /* (RS)Receive process state */
SYN_DMA_RX_STOPPED = 0x00000000, /* Stopped - Reset or Stop Rx Command issued */
SYN_DMA_RX_FETCHING = 0x00020000, /* Running - fetching the Rx descriptor */
SYN_DMA_RX_WAITING = 0x00060000, /* Running - waiting for packet */
SYN_DMA_RX_SUSPENDED = 0x00080000, /* Suspended - Rx Descriptor unavailable */
SYN_DMA_RX_CLOSING = 0x000A0000, /* Running - closing descriptor */
SYN_DMA_RX_QUEUING = 0x000E0000, /* Running - queuing the receive frame into host memory */
SYN_DMA_INT_NORMAL = 0x00010000, /* (NIS)Normal interrupt summary */
SYN_DMA_INT_ABNORMAL = 0x00008000, /* (AIS)Abnormal interrupt summary */
SYN_DMA_INT_EARLY_RX = 0x00004000, /* Early receive interrupt (Normal) */
SYN_DMA_INT_BUS_ERROR = 0x00002000, /* Fatal bus error (Abnormal) */
SYN_DMA_INT_EARLY_TX = 0x00000400, /* Early transmit interrupt (Abnormal) */
SYN_DMA_INT_RX_WDOG_TO = 0x00000200, /* Receive Watchdog Timeout (Abnormal) */
SYN_DMA_INT_RX_STOPPED = 0x00000100, /* Receive process stopped (Abnormal) */
SYN_DMA_INT_RX_NO_BUFFER = 0x00000080, /* RX buffer unavailable (Abnormal) */
SYN_DMA_INT_RX_COMPLETED = 0x00000040, /* Completion of frame RX (Normal) */
SYN_DMA_INT_TX_UNDERFLOW = 0x00000020, /* Transmit underflow (Abnormal) */
SYN_DMA_INT_RCV_OVERFLOW = 0x00000010, /* RX Buffer overflow interrupt */
SYN_DMA_INT_TX_JABBER_TO = 0x00000008, /* TX Jabber Timeout (Abnormal) */
SYN_DMA_INT_TX_NO_BUFFER = 0x00000004, /* TX buffer unavailable (Normal) */
SYN_DMA_INT_TX_STOPPED = 0x00000002, /* TX process stopped (Abnormal) */
SYN_DMA_INT_TX_COMPLETED = 0x00000001, /* Transmit completed (Normal) */
};
/*
* SYN_DMA_OPERATION_MODE = 0x0018, CSR6 - Dma Operation Mode Register
*/
enum syn_dma_operation_mode_reg {
SYN_DMA_DISABLE_DROP_TCP_CS = 0x04000000, /* (DT) Dis. drop. of tcp/ip
CS error frames */
SYN_DMA_RX_STORE_AND_FORWARD = 0x02000000, /* Rx (SF)Store and forward */
SYN_DMA_RX_FRAME_FLUSH = 0x01000000, /* Disable Receive Frame Flush*/
SYN_DMA_TX_STORE_AND_FORWARD = 0x00200000, /* Tx (SF)Store and forward */
SYN_DMA_FLUSH_TX_FIFO = 0x00100000, /* (FTF)Tx FIFO controller
is reset to default */
SYN_DMA_TX_THRESH_CTRL = 0x0001C000, /* (TTC)Controls thre Thresh of
MTL tx Fifo */
SYN_DMA_TX_THRESH_CTRL16 = 0x0001C000, /* (TTC)Controls thre Thresh of
MTL tx Fifo 16 */
SYN_DMA_TX_THRESH_CTRL24 = 0x00018000, /* (TTC)Controls thre Thresh of
MTL tx Fifo 24 */
SYN_DMA_TX_THRESH_CTRL32 = 0x00014000, /* (TTC)Controls thre Thresh of
MTL tx Fifo 32 */
SYN_DMA_TX_THRESH_CTRL40 = 0x00010000, /* (TTC)Controls thre Thresh of
MTL tx Fifo 40 */
SYN_DMA_TX_THRESH_CTRL256 = 0x0000c000, /* (TTC)Controls thre Thresh of
MTL tx Fifo 256 */
SYN_DMA_TX_THRESH_CTRL192 = 0x00008000, /* (TTC)Controls thre Thresh of
MTL tx Fifo 192 */
SYN_DMA_TX_THRESH_CTRL128 = 0x00004000, /* (TTC)Controls thre Thresh of
MTL tx Fifo 128 */
SYN_DMA_TX_THRESH_CTRL64 = 0x00000000, /* (TTC)Controls thre Thresh of
MTL tx Fifo 64 */
SYN_DMA_TX_START = 0x00002000, /* (ST)Start/Stop transmission*/
SYN_DMA_RX_FLOW_CTRL_DEACT = 0x00401800, /* (RFD)Rx flow control
deact. Threshold */
SYN_DMA_RX_FLOW_CTRL_DEACT1K = 0x00000000, /* (RFD)Rx flow control
deact. Threshold (1kbytes) */
SYN_DMA_RX_FLOW_CTRL_DEACT2K = 0x00000800, /* (RFD)Rx flow control
deact. Threshold (2kbytes) */
SYN_DMA_RX_FLOW_CTRL_DEACT3K = 0x00001000, /* (RFD)Rx flow control
deact. Threshold (3kbytes) */
SYN_DMA_RX_FLOW_CTRL_DEACT4K = 0x00001800, /* (RFD)Rx flow control
deact. Threshold (4kbytes) */
SYN_DMA_RX_FLOW_CTRL_DEACT5K = 0x00400000, /* (RFD)Rx flow control
deact. Threshold (4kbytes) */
SYN_DMA_RX_FLOW_CTRL_DEACT6K = 0x00400800, /* (RFD)Rx flow control
deact. Threshold (4kbytes) */
SYN_DMA_RX_FLOW_CTRL_DEACT7K = 0x00401000, /* (RFD)Rx flow control
deact. Threshold (4kbytes) */
SYN_DMA_RX_FLOW_CTRL_ACT = 0x00800600, /* (RFA)Rx flow control
Act. Threshold */
SYN_DMA_RX_FLOW_CTRL_ACT1K = 0x00000000, /* (RFA)Rx flow control
Act. Threshold (1kbytes) */
SYN_DMA_RX_FLOW_CTRL_ACT2K = 0x00000200, /* (RFA)Rx flow control
Act. Threshold (2kbytes) */
SYN_DMA_RX_FLOW_CTRL_ACT3K = 0x00000400, /* (RFA)Rx flow control
Act. Threshold (3kbytes) */
SYN_DMA_RX_FLOW_CTRL_ACT4K = 0x00000600, /* (RFA)Rx flow control
Act. Threshold (4kbytes) */
SYN_DMA_RX_FLOW_CTRL_ACT5K = 0x00800000, /* (RFA)Rx flow control
Act. Threshold (5kbytes) */
SYN_DMA_RX_FLOW_CTRL_ACT6K = 0x00800200, /* (RFA)Rx flow control
Act. Threshold (6kbytes) */
SYN_DMA_RX_FLOW_CTRL_ACT7K = 0x00800400, /* (RFA)Rx flow control
Act. Threshold (7kbytes) */
SYN_DMA_RX_THRESH_CTRL = 0x00000018, /* (RTC)Controls thre
Thresh of MTL rx Fifo */
SYN_DMA_RX_THRESH_CTRL64 = 0x00000000, /* (RTC)Controls thre
Thresh of MTL tx Fifo 64 */
SYN_DMA_RX_THRESH_CTRL32 = 0x00000008, /* (RTC)Controls thre
Thresh of MTL tx Fifo 32 */
SYN_DMA_RX_THRESH_CTRL96 = 0x00000010, /* (RTC)Controls thre
Thresh of MTL tx Fifo 96 */
SYN_DMA_RX_THRESH_CTRL128 = 0x00000018, /* (RTC)Controls thre
Thresh of MTL tx Fifo 128 */
SYN_DMA_EN_HW_FLOW_CTRL = 0x00000100, /* (EFC)Enable HW flow control*/
SYN_DMA_DIS_HW_FLOW_CTRL = 0x00000000, /* Disable HW flow control */
SYN_DMA_FWD_ERROR_FRAMES = 0x00000080, /* (FEF)Forward error frames */
SYN_DMA_FWD_UNDER_SZ_FRAMES = 0x00000040, /* (FUF)Forward undersize
frames */
SYN_DMA_TX_SECOND_FRAME = 0x00000004, /* (OSF)Operate on 2nd frame */
SYN_DMA_RX_START = 0x00000002, /* (SR)Start/Stop reception */
};
/*
* SYN_DMA_INT_ENABLE = 0x101C, CSR7 - Interrupt enable Register Layout
*/
enum syn_dma_interrupt_reg {
SYN_DMA_IE_NORMAL = SYN_DMA_INT_NORMAL, /* Normal interrupt enable */
SYN_DMA_IE_ABNORMAL = SYN_DMA_INT_ABNORMAL, /* Abnormal interrupt enable */
SYN_DMA_IE_EARLY_RX = SYN_DMA_INT_EARLY_RX, /* Early RX interrupt enable */
SYN_DMA_IE_BUS_ERROR = SYN_DMA_INT_BUS_ERROR, /* Fatal bus error enable */
SYN_DMA_IE_EARLY_TX = SYN_DMA_INT_EARLY_TX, /* Early TX interrupt enable */
SYN_DMA_IE_RX_WDOG_TO = SYN_DMA_INT_RX_WDOG_TO, /* RX Watchdog Timeout enable */
SYN_DMA_IE_RX_STOPPED = SYN_DMA_INT_RX_STOPPED, /* RX process stopped enable */
SYN_DMA_IE_RX_NO_BUFFER = SYN_DMA_INT_RX_NO_BUFFER,
/* Receive buffer unavailable enable */
SYN_DMA_IE_RX_COMPLETED = SYN_DMA_INT_RX_COMPLETED,
/* Completion of frame reception enable */
SYN_DMA_IE_TX_UNDERFLOW = SYN_DMA_INT_TX_UNDERFLOW,
/* TX underflow enable */
SYN_DMA_IE_RX_OVERFLOW = SYN_DMA_INT_RCV_OVERFLOW,
/* RX Buffer overflow interrupt */
SYN_DMA_IE_TX_JABBER_TO = SYN_DMA_INT_TX_JABBER_TO,
/* TX Jabber Timeout enable */
SYN_DMA_IE_TX_NO_BUFFER = SYN_DMA_INT_TX_NO_BUFFER,
/* TX buffer unavailable enable */
SYN_DMA_IE_TX_STOPPED = SYN_DMA_INT_TX_STOPPED,
/* TX process stopped enable */
SYN_DMA_IE_TX_COMPLETED = SYN_DMA_INT_TX_COMPLETED,
/* TX completed enable */
};
/*
* SYN_DMA_AXI_BUS_MODE = 0x1028
*/
enum syn_dma_axi_bus_mode_reg {
SYN_DMA_EN_LPI = 0x80000000,
SYN_DMA_LPI_XIT_FRM = 0x40000000,
SYN_DMA_WR_OSR_NUM_REQS16 = 0x00F00000,
SYN_DMA_WR_OSR_NUM_REQS8 = 0x00700000,
SYN_DMA_WR_OSR_NUM_REQS4 = 0x00300000,
SYN_DMA_WR_OSR_NUM_REQS2 = 0x00100000,
SYN_DMA_WR_OSR_NUM_REQS1 = 0x00000000,
SYN_DMA_RD_OSR_NUM_REQS16 = 0x000F0000,
SYN_DMA_RD_OSR_NUM_REQS8 = 0x00070000,
SYN_DMA_RD_OSR_NUM_REQS4 = 0x00030000,
SYN_DMA_RD_OSR_NUM_REQS2 = 0x00010000,
SYN_DMA_RD_OSR_NUM_REQS1 = 0x00000000,
SYN_DMA_ONEKBBE = 0x00002000,
SYN_DMA_AXI_AAL = 0x00001000,
SYN_DMA_AXI_BLEN256 = 0x00000080,
SYN_DMA_AXI_BLEN128 = 0x00000040,
SYN_DMA_AXI_BLEN64 = 0x00000020,
SYN_DMA_AXI_BLEN32 = 0x00000010,
SYN_DMA_AXI_BLEN16 = 0x00000008,
SYN_DMA_AXI_BLEN8 = 0x00000004,
SYN_DMA_AXI_BLEN4 = 0x00000002,
SYN_DMA_UNDEFINED = 0x00000001,
};
/*
* Values to initialize DMA registers
*/
enum syn_dma_init_values {
/*
* Interrupt groups
*/
SYN_DMA_INT_ERROR_MASK = SYN_DMA_INT_BUS_ERROR, /* Error */
SYN_DMA_INT_RX_ABN_MASK = SYN_DMA_INT_RX_NO_BUFFER, /* RX abnormal intr */
SYN_DMA_INT_RX_NORM_MASK = SYN_DMA_INT_RX_COMPLETED, /* RXnormal intr */
SYN_DMA_INT_RX_STOPPED_MASK = SYN_DMA_INT_RX_STOPPED, /* RXstopped */
SYN_DMA_INT_TX_ABN_MASK = SYN_DMA_INT_TX_UNDERFLOW, /* TX abnormal intr */
SYN_DMA_INT_TX_NORM_MASK = SYN_DMA_INT_TX_COMPLETED, /* TX normal intr */
SYN_DMA_INT_TX_STOPPED_MASK = SYN_DMA_INT_TX_STOPPED, /* TX stopped */
SYN_DMA_BUS_MODE_INIT = SYN_DMA_FIXED_BURST_ENABLE | SYN_DMA_BURST_LENGTH8
| SYN_DMA_DESCRIPTOR_SKIP2 | SYN_DMA_RESET_OFF,
SYN_DMA_BUS_MODE_VAL = SYN_DMA_BURST_LENGTH32
| SYN_DMA_BURST_LENGTHX8 | SYN_DMA_DESCRIPTOR_SKIP0
| SYN_DMA_DESCRIPTOR8_WORDS | SYN_DMA_ARBIT_PR | SYN_DMA_ADDRESS_ALIGNED_BEATS,
SYN_DMA_OMR = SYN_DMA_TX_STORE_AND_FORWARD | SYN_DMA_RX_STORE_AND_FORWARD
| SYN_DMA_RX_THRESH_CTRL128 | SYN_DMA_TX_SECOND_FRAME,
SYN_DMA_INT_EN = SYN_DMA_IE_NORMAL | SYN_DMA_IE_ABNORMAL | SYN_DMA_INT_ERROR_MASK
| SYN_DMA_INT_RX_ABN_MASK | SYN_DMA_INT_RX_NORM_MASK
| SYN_DMA_INT_RX_STOPPED_MASK | SYN_DMA_INT_TX_ABN_MASK
| SYN_DMA_INT_TX_NORM_MASK | SYN_DMA_INT_TX_STOPPED_MASK,
SYN_DMA_INT_DISABLE = 0,
SYN_DMA_AXI_BUS_MODE_VAL = SYN_DMA_AXI_BLEN16 | SYN_DMA_RD_OSR_NUM_REQS8
| SYN_DMA_WR_OSR_NUM_REQS8,
};
/*
* desc_mode
* GMAC descriptors mode
*/
enum desc_mode {
RINGMODE = 0x00000001,
CHAINMODE = 0x00000002,
};
extern void syn_disable_dma_interrupt(struct nss_gmac_hal_dev *nghd);
extern void syn_enable_dma_interrupt(struct nss_gmac_hal_dev *nghd);
extern void syn_enable_dma_rx(struct nss_gmac_hal_dev *nghd);
extern void syn_disable_dma_rx(struct nss_gmac_hal_dev *nghd);
extern void syn_enable_dma_tx(struct nss_gmac_hal_dev *nghd);
extern void syn_disable_dma_tx(struct nss_gmac_hal_dev *nghd);
extern void syn_clear_dma_status(struct nss_gmac_hal_dev *nghd);
extern void syn_resume_dma_tx(struct nss_gmac_hal_dev *nghd);
extern uint32_t syn_get_rx_missed(struct nss_gmac_hal_dev *nghd);
extern uint32_t syn_get_fifo_overflows(struct nss_gmac_hal_dev *nghd);
extern void syn_init_tx_desc_base(struct nss_gmac_hal_dev *nghd, uint32_t tx_desc_dma);
extern void syn_init_rx_desc_base(struct nss_gmac_hal_dev *nghd, uint32_t rx_desc_dma);
#endif /*__SYN_REG_H__*/

View File

@@ -1,189 +0,0 @@
/*
**************************************************************************
* Copyright (c) 2016,2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF0
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**************************************************************************
*/
#ifndef __SYN_DEV_H__
#define __SYN_DEV_H__
#include "syn_reg.h"
#include <fal/fal_mib.h>
#include <fal/fal_port_ctrl.h>
/*
* Subclass for base nss_gmac_haldev
*/
struct syn_hal_dev {
struct nss_gmac_hal_dev nghd; /* Base class */
fal_xgmib_info_t stats; /* Stats structure */
};
/*
* syn_set_rx_flow_ctrl()
*/
static inline void syn_set_rx_flow_ctrl(
struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, SYN_MAC_RX_FLOW_CTL,
SYN_MAC_RX_FLOW_ENABLE);
}
/*
* syn_clear_rx_flow_ctrl()
*/
static inline void syn_clear_rx_flow_ctrl(
struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, SYN_MAC_RX_FLOW_CTL,
SYN_MAC_RX_FLOW_ENABLE);
}
/*
* syn_set_tx_flow_ctrl()
*/
static inline void syn_set_tx_flow_ctrl(
struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, SYN_MAC_Q0_TX_FLOW_CTL,
SYN_MAC_TX_FLOW_ENABLE);
}
/*
* syn_send_tx_pause_frame()
*/
static inline void syn_send_tx_pause_frame(
struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, SYN_MAC_Q0_TX_FLOW_CTL,
SYN_MAC_TX_FLOW_ENABLE);
hal_set_reg_bits(nghd, SYN_MAC_Q0_TX_FLOW_CTL,
SYN_MAC_TX_PAUSE_SEND);
}
/*
* syn_clear_tx_flow_ctrl()
*/
static inline void syn_clear_tx_flow_ctrl(
struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, SYN_MAC_Q0_TX_FLOW_CTL,
SYN_MAC_TX_FLOW_ENABLE);
}
/*
* syn_clear_mac_ctrl()
*/
static inline void syn_clear_mac_ctrl(
struct nss_gmac_hal_dev *nghd)
{
hal_write_reg(nghd->mac_base, SYN_MAC_TX_CONFIG, 0);
hal_write_reg(nghd->mac_base, SYN_MAC_RX_CONFIG, 0);
}
/*
* syn_rx_enable()
*/
static inline void syn_rx_enable(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, SYN_MAC_RX_CONFIG, SYN_MAC_RX_ENABLE);
hal_set_reg_bits(nghd, SYN_MAC_PACKET_FILTER, SYN_MAC_RX_ENABLE);
}
/*
* syn_rx_disable()
*/
static inline void syn_rx_disable(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, SYN_MAC_RX_CONFIG, SYN_MAC_RX_ENABLE);
}
/*
* syn_tx_enable()
*/
static inline void syn_tx_enable(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, SYN_MAC_TX_CONFIG, SYN_MAC_TX_ENABLE);
}
/*
* syn_tx_disable()
*/
static inline void syn_tx_disable(struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, SYN_MAC_TX_CONFIG,
SYN_MAC_TX_ENABLE);
}
/*
* syn_set_mmc_stats()
*/
static inline void syn_set_mmc_stats(struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, SYN_MAC_MMC_CTL,
SYN_MAC_MMC_RSTONRD);
}
/*
* syn_rx_jumbo_frame_enable()
*/
static inline void syn_rx_jumbo_frame_enable(
struct nss_gmac_hal_dev *nghd)
{
hal_set_reg_bits(nghd, SYN_MAC_RX_CONFIG,
SYN_MAC_JUMBO_FRAME_ENABLE);
}
/*
* syn_rx_jumbo_frame_disable()
*/
static inline void syn_rx_jumbo_frame_disable(
struct nss_gmac_hal_dev *nghd)
{
hal_clear_reg_bits(nghd, SYN_MAC_RX_CONFIG,
SYN_MAC_JUMBO_FRAME_ENABLE);
}
/*
* syn_set_full_duplex()
*/
static inline void syn_set_full_duplex(
struct nss_gmac_hal_dev *nghd)
{
/* TBD */
return;
}
/*
* syn_set_half_duplex()
*/
static inline void syn_set_half_duplex(
struct nss_gmac_hal_dev *nghd)
{
/* TBD */
return;
}
static int syn_get_stats(struct nss_gmac_hal_dev *nghd)
{
struct syn_hal_dev *shd = (struct syn_hal_dev *)nghd;
fal_xgmib_info_t *stats = &(shd->stats);
if (fal_get_xgmib_info(0, nghd->mac_id, stats))
return -1;
return 0;
}
#endif /*__SYN_DEV_H__*/

Some files were not shown because too many files have changed in this diff Show More