Commit graph

58593 commits

Author SHA1 Message Date
Sophronia Koilpillai
6ea76926b0 firewall4: (APP-2968, PR #306) reduce ksoftirqd load by refering to looopback by numeric id
Approved-by: James Haggerty
Approved-by: Evan Benn
2024-11-26 10:03:34 +11:00
Karsten Sperling
c34f6ba4e0 build: make git sub-modules to fetch configurable
Currently the git protocol downloads all submodules of the target
repository. This can be unwieldy for repositories with a lot of submodules
where only a subset are required in the context of the OpenWrt build.

This change adds a PKG_SOURCE_SUBMODULES variable to configure this
behavior. It takes a space-separated list of submodule paths, or the word
"skip" to disable submodule downloads entirely. The default is to download
all submodules, i.e. preserving current behavior.

Signed-off-by: Karsten Sperling <ksperling@apple.com>
2024-11-26 10:03:34 +11:00
Milad Mohtashamirad
52275ac476 kernel: (APP-2003) libcamera fix dma heap makefile
There's a bug in drivers/dma-buf/heaps/Makefile or /driver/dma-buf/Makefile
that doesn't allow heaps source files to get compiled.
we raised an issue in openwrt:
https://github.com/openwrt/openwrt/issues/13887

Approved-by: Arien Judge
Approved-by: James Haggerty
2024-11-26 10:03:34 +11:00
Evan Benn
bbefd71984 kmod: APP-2917: (PR #231): Create kmod-media-controller
Our video camera patches added Kconfigs MEDIA_CONTROLLER and
MEDIA_SUPPORT to kmod-video-core. MEDIA_SUPPORT is required by several
of the drivers and they also enable MEDIA_CONTROLLER.

kmod-usb-audio aka snd_usb_audio.ko depends on mc.ko (MEDIA_CONTROLLER),
if MEDIA_CONTROLLER is set. Therefore I split out the MEDIA_CONTROLLER
module and conflated it with MEDIA_SUPPORT. Then made video-core
depend on that kmod and usb-audio conditionally depend on it.


Approved-by: James Haggerty
Approved-by: Arien Judge
2024-11-26 10:03:33 +11:00
Milad Mohtashamirad
a25c265ca8 kernel/bcm27xx: add kmods for libcamera support
libcamera requires a number of v4l2 modules without packages
in OpenWrt.

Additionally, add support for the raspberry pi camera variants

APP-2145, APP-2097, APP-2003, APP-2197

Approved-by: James Haggerty
Approved-by: Matthew Forgie
Approved-by: Evan Benn
2024-11-26 10:03:33 +11:00
Morse Micro
0bec771c8e mac80211: add Morse Micro mac80211 patches for the 1.12.4 release
Morse Micro software releases include a small set of patches for
mac80211.
2024-11-26 10:03:33 +11:00
Sophronia Koilpillai
5ed81bb390 mac80211: (APP-3002, PR#252) Remove patches altering mesh Tx and Rx path
Prior changes removed ITXQ support. Removal of this support impacted the
Fast Xmit Mesh feature in the TX path, which no longer functioned as
expected.

Similarly, there were  changes to the Mesh RX path for aggregated frames.

For now, remove the patches introducing fast xmit until such time as the
Morse Micro driver supports the mac80211 version from where these patches
came from originally.

Approved-by: James Haggerty
Approved-by: Arien Judge
Approved-by: Evan Benn
2024-11-26 10:03:33 +11:00
Sophronia Koilpillai
c9eefe23fa mac80211: (APP-2786, PR #222) Remove wake_tx_push_queue changes from openwrt
It was identified that there were link sharing issues with multiple stations
when using HaLow, likely because the Morse driver has not been tested against
the version of mac80211 from where these patches came.

To rectify, we remove the patches.

Approved-by: James Haggerty
Approved-by: Evan Benn
2024-11-26 10:03:33 +11:00
James Haggerty
e1843c3b6f linux/generic: (APP-3006, PR #247) force dev_coredump on
Sadly, KConfig mechanism for enabling CONFIG_DEV_COREDUMP is for
an (in-tree) driver to do CONFIG_WANT_DEV_COREDUMP.

But because the morse driver is built separately, it has no
way to demand this, and there's no way to manually specify
CONFIG_DEV_COREDUMP (or CONFIG_WANT_DEV_COREDUMP for that
matter). Therefore we hack the kconfig files.


Approved-by: Sophronia Koilpillai
Approved-by: Evan Benn
2024-11-26 10:03:33 +11:00
Evan Benn
15d8bf14af Kconfig: (APP-3120) Add KERNEL_DYNAMIC_DEBUG_CORE
We want to enable pr_dbg in our driver module, so add a config that only
enables DYNAMIC_DEBUG_CORE instead of all of DYNAMIC_DEBUG, which would
compile in all the kernel pr_dbg strings.

Approved-by: James Haggerty
Approved-by: Arien Judge
2024-11-26 10:03:33 +11:00
Evan Benn
54d058e9ef include/package.mk: SVT-5471: Add --init to git submodule update
The submodule update was not working for morse_driver. Add --init which
the code in download.mk also uses.
2024-11-26 10:03:33 +11:00
James Haggerty
8ea13a6df7 procd: (APP-3185, PR #268) allow button timeouts to timeout
This allows visual feedback when timeouts are reached.

In our case, there is a single button which on a normal
press/release will initiate DPP, but longer presses will
first reboot then factory reset. So users know they've
held it down long enough, it's nice to change a status LED.

This also fixes what seems to me a bug, in that you can
attach a timeout to a 'release' action but the timing was
reset (so you can't distinguish between a released timeout
vs a pressed timeout).

See:

https://github.com/openwrt/procd/pull/10


Approved-by: Sophronia Koilpillai
Approved-by: Arien Judge
2024-11-26 10:03:33 +11:00
Evan Benn
7524d75b8f mac80211: hotplug: (APP-2588) (PR #194) ignore morse driver instantiated ieee80211 devices
Look at the name of the driver linked through sysfs to prevent mac80211 detection
of Morse devices. A separate interface handler is used for Morse Micro devices.

Approved-by: James Haggerty
Approved-by: Arien Judge
Approved-by: Sophronia Koilpillai
2024-11-26 03:41:08 +11:00
Sophronia Koilpillai
36c0052dd0 hostapd: (APP-2687, PR #210) Make beacon interval an iface config
Beacon interval can be configured per interface in case of having multiple vifs
configured on a single radio. The generic hostapd allows this to be a per BSS
config. In that way, all BSS either AP/IBSS/Mesh could configure its beacon
interval.

This design was modified in openwrt and it was made to be a common wifi-device
config in a 13 year old commit

https://openwrt-devel.openwrt.narkive.com/K7I3osR6/patch-mac80211-allow-ap-configuration-of-beacon-interval-dtim-period-maximum-permissible-sta-listen-

Approved-by: James Haggerty
Approved-by: Evan Benn
2024-11-26 03:41:08 +11:00
Milad Mohtashamirad
def6e52625 firewall4: (APP-1504) flush conntrack after firewall reload.
If forwarding between two interfaces is disabled, previously established
connections will persist. This happens, as conntrack retains the
connection state in its table.

Aggressively flush the conntrack table on fw4 service reload. This
resolves the issue above with the side effect of re-establishing all
other connections, including those in unrelated interfaces.

Approved-by: Arien Judge
Approved-by: Matthew Forgie
2024-11-26 03:41:08 +11:00
Arien Judge
65bbbaf035 iw: (APP-1142) add formatting tweak for vendor ie output
Commit 8e58fe92223c755fc15df66ae8ce97c2df36215f has the side
effect of slightly changing the vendor_ie output format from
previous versions. The initial newline is effectively dropped
and an additional newline has been added to the end of the
printed event. e.g.

phy #0: vendor event 0cbf74:0vendor event: xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx
vendor event: xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx
vendor event: xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx
vendor event: xx xx xx xx

This commit reintroduces the newline and terminates earlier to
correct the formatting. e.g

phy #0: vendor event 0cbf74:0
vendor event: xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx
vendor event: xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx
vendor event: xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx
vendor event: xx xx xx xx

Approved-by: James Haggerty
Approved-by: Milad Mohtashamirad
2024-11-26 03:41:08 +11:00
James Haggerty
3b0959bb87 netifd: (APP-2648, PR #206) only reconfigure switch if changes
This avoids our ethernet link dropping on any network change. It's a quick and dirty patch so we have minimal code here.

Approved-by: Arien Judge
Approved-by: Evan Benn
2024-11-26 03:41:08 +11:00
Arien Judge
b5fa3591c7 toolchain: (APP-455) add symlink for external toolchain include dir
Some package Makefiles in feeds we don't control, nor want to, explicitly reference directories in
$(TOOLCHAIN_DIR), which for an external toolchain didn't originally exist.
This commit creates a symlink to the include directory to mitigate the ones which immediately affect us.
The right solution here would be to fix the upstream packages. But we need a workaround.
2024-11-26 03:41:08 +11:00
Arien Judge
27d5dcd11c kernel: led: add pwm multicolor kernel module package
This allows a group of monochrome PWM LEDs to be controlled as a singular
multicolor LED.

Signed-off-by: Arien Judge <arien.judge@morsemicro.com>
Approved-by: James Haggerty
Approved-by: Evan Benn
2024-11-26 03:41:08 +11:00
Arien Judge
54efcc4234 generic: backport pwm multicolor led driver from 5.19
Backport commits to 5.19 from Sven Schwermer's series [1] adding support for a
leds-pwm-multicolor driver.

[1] https://lore.kernel.org/all/20220407073225.71605-1-sven@svenschwermer.de/

Signed-off-by: Arien Judge <arien.judge@morsemicro.com>
Approved-by: James Haggerty
Approved-by: Evan Benn
2024-11-26 03:41:08 +11:00
Arien Judge
41fc9cd813 kernel: add pwm-gpio kernel module package
This allows standard GPIOs to be controlled as PWM devices.

Signed-off-by: Arien Judge <arien.judge@morsemicro.com>
Approved-by: James Haggerty
Approved-by: Evan Benn
2024-11-26 03:41:08 +11:00
Arien Judge
1456ab5519 generic: add pending patchset introducing pwm-gpio driver
Backports Vincent Whitchurch and Stefan Wahrens pwm-gpio series [1] to kernel 5.15.

[1] https://lore.kernel.org/all/20240204220851.4783-1-wahrenst@gmx.net/

Signed-off-by: Arien Judge <arien.judge@morsemicro.com>
Approved-by: James Haggerty
Approved-by: Evan Benn
2024-11-26 03:41:08 +11:00
Milad Mohtashamirad
e4d06de766 package: kernel: (APP-2003) add i2c-mux-pinctrl kmod package.
Add i2c pin multiplexer as a kmod package

Approved-by: James Haggerty
Approved-by: Evan Benn
2024-11-26 03:41:08 +11:00
Arien Judge
e6483c0b1d toolchain: (APP-1958) link ldd when using external toolchain
When using an external toolchain, ldd is not linked into the rootfs.
This causes subsequent upgrades to fail with 'Failed to exec upgraded'.
This patch adds the symlink when using an external toolchain and musl.


Approved-by: Takura Mapani
Approved-by: Milad Mohtashamirad
Approved-by: Evan Benn
2024-11-26 03:41:08 +11:00
Arien Judge
e860f186f5 ext-toolchain: (APP-2343) prevent ext-toolchain from mutating .config based on toolchain features
Parts of the openwrt build system depends on the ext-toolchain script for pre-build checks.
Instead of unwinding all of these checks we opt for a less aggressive removal of test_feature
from the ext-toolchain script, leaving it in so necessary checks still pass.
2024-11-26 03:41:08 +11:00
Hauke Mehrtens
28cf53e6bd OpenWrt v23.05.5: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-24 00:53:33 +02:00
Paul Spooren
10cc5fcd00
build: align SOURCE path for build system and SDK
Building a package in the build system or the SDK results in different
values for the `SOURCE` property, it's either `packages/<package name>`
or `feeds/base/<package name>`. The reason is that the SDK handles
`openwrt.git` as an external feed called while the build system contains
the *base* packages directly.

Since packages created with either method are (ideally) the same (bit
for bit), align the content of SOURCE. To do so this commit creates a
symlink from `feeds/base` to `$(TOPDIR)/package` and adopts the SOURCE
when building from inside the build system.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-09-23 14:34:46 +02:00
Fabian Bläse
87fbb5085d ipq40xx: re-add label MAC address for FritzBox 4040
The MAC address of the GMAC is contained inside the CWMP-Account
number on the label.

The label MAC address alias was defined previously, but it has been
removed with the switch to IPQESS / DSA.

Restore the label MAC address alias.

Fixes: 27b441cbaf ("ipq40xx: drop ESSEDMA + AR40xx DTS nodes")
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit b22d382ae4eaa1af42930115d91855f402314cac)
Signed-off-by: Tom Herbers <mail@tomherbers.de>
Link: https://github.com/openwrt/openwrt/pull/16459
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-23 10:25:05 +02:00
Sander Vanheule
a2a67804fc firmware-utils: bump to latest openwrt-23.05
This version bump contains one patch improving compatibility with recent
vendor firmware versions:
  - commit f3b636d0ee47 ("tplink-safeloader: bump EAP610-V3 compat_level")

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2024-09-22 16:47:19 +02:00
Markus Stockhausen
ace013101c realtek: 5.15: backport VLAN fix
With commit a22d359fa56fe0 VLAN handling was fixed for kernel 6.6.
This restored network connectivity of the devices. For easy testing
backport the fix for 5.15 too.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/16391
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 35e13244aab36958831195a1d2e152aa3ad0ab6c)
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
2024-09-22 16:26:25 +02:00
Ryan Salsbury
8e75eed617 ath79: fix I2C pins on GL-AR750
Change I2C pin flags to GPIO_ACTIVE_HIGH and change SDA to GPIO1.

On my late production GL-AR750 (purchased 2024):
SCL = GPIO16
SDA = GPIO1

Bug report:
I2C bus doesn't work in GL-AR750
https://github.com/openwrt/openwrt/issues/16319

Signed-off-by: Ryan Salsbury <ryanrs@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16406
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 2e626ae2d2488f2d3708d3aed57eea7a1402f00e)
Signed-off-by: Ryan Salsbury <ryanrs@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16446
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 16:07:46 +02:00
Hauke Mehrtens
4d4d260f5b ramips: tp-link er605-v2: Remove sysupgrade-tar image
The sysupgrade-tar image build is not defined for this target, do not
add a build instruction for it. The build system will use the definition
from the dna_valokuitu-plus-ex400 board and the build will fail.

This fixes the build of the ramips target.

Fixes: 665c2154ef ("ramips: add basic support for tp-link er605-v2")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 746e894877e5130a7d5227cd90f90dfe18cc274b)
2024-09-22 15:33:11 +02:00
Felix Fietkau
66055df3e0 ucode: another fix for host installation
The previous host installation fix accidentally moved the rpath settings
out of CMAKE_HOST_OPTIONS and into CMAKE_OPTIONS.

Fixes: ae42ecaad4e7 ("ucode: fix host installation")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 2ee1392e094f9b6fdb2a759e2e29fa203b61e066)
2024-09-20 22:21:03 +02:00
David Bauer
dd4b05ee8a ipq40xx: add PoE passthrough GPIO
Add the GPIO pin of the PoE passthrough switch on the Aruba AP-303H.
Power is activated when the pin is low. It enables a PSE chip, so power
is only supplied to downstream devices when they are 802.3af/at
compliant devices.

Ensure you use a sufficient power supply when chaining a consuming
device after the AP.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit b40cc46cc882ff97f2752e7837173ffc9f884eb9)
2024-09-20 19:52:46 +02:00
Andreas Böhler
4d7ad37891 ramips: mt7621: use lzma-loader for Sercomm NA502s
This fixes a well-known "LZMA ERROR 1" error on Sercomm NA502s, reported
on the OpneWrt forum [0].

[0] https://forum.openwrt.org/t/206640

Signed-off-by: Andreas Böhler <dev@aboehler.at>
(cherry picked from commit 6d89aa29878a93c744e8c752a68bc05d41252cfc)
Link: https://github.com/openwrt/openwrt/pull/16412
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-18 23:04:37 +02:00
Paul Donald
e3bb35811e lldpd: fix reload bug: advertisements shall default to on
Because these capability advertisements default to on in lldpd, they
became absent at reload, and not restart, due to how the reload logic
works ( keep daemon running, send unconfigured and then the new config
via socket ), and it was not evident unless you happened to be looking
for it (e.g. via pcap or tcpdump). It was also not evident from the
manpage ( have now sent patches upstream ).

At reload time, the unconfigure logic disabled them unless they were
explicitly enabled (compare with other settings where 'unconfigure' just
resets them). Now they default to on/enabled at init time, and are
explicitly 'unconfigure'd at startup if the user disables them via:

lldp_mgmt_addr_advertisements=0
lldp_capability_advertisements=0

In other words: explicit is necessary to disable the advertisements.

The same applies to 'configure system capabilities enabled'. Technically
'unconfigure'd is the default but now it is explicit at reload.

Tested on: 23.05.3

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 708101c1412c42c7fb1d838024513a34424c50ff)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-17 12:36:03 +02:00
Paul Donald
0b48b832a9 lldpd: extended interface(s) parsing to handle patterns
For interface type parameters, the man page documents patterns:
```
*,!eth*,!!eth1

uses all interfaces, except interfaces starting with "eth",
but including "eth1".
```

* Renamed `_ifname` to `_l2dev`.
* get the l2dev via network_get_physdev (and not l3dev)
* Glob pattern `*` is also valid - use noglob for this

The net result is that now interface 'names' including globs '*' and '!'
inversions are included in the generated lldpd configs.

Temporarily `set -o noglob` and then `set +o noglob` to disable & enable
globbing respectively, because when we pass `*` as an interface choice,
other file and pathnames get sucked in from where the init script runs,
and the `*` never makes it to lldpd.

Tested extensively on: 22.03.6, 23.05.3

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
[ squash with commit bumping release version ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 4a81d868db85a7954a73bc6dc4a957bbd6abc813)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-17 12:36:03 +02:00
Paul Donald
7ee813b3ef lldpd: make management address advertisement controllable
Defaults to off.

Available from >= 0.7.15

These are sent in TLV

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 50021d3222667a9a239451de0422f0508aef4419)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-17 12:36:03 +02:00
Paul Donald
af6a852ced lldpd: make capabilities advertisement controllable
Defaults to off.

Only available from >= 1.0.15

These capabilities are sent in TLV.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 4d8f56bd59f457fd815e2bb4f87df8c7dad2d4fd)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-17 12:36:03 +02:00
Paul Donald
cec02193d5 lldpd: note about capabilities
only available from >= 1.0.15

Comments are useful. Apparently this config parameter was committed when
openwrt used an older version of lldpd which did not yet support it.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit b4769175029ad23833b21960d1b605f629537ad7)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-17 12:36:03 +02:00
Paul Donald
ca0c2363c2 lldpd: fix restart
Redirection broke in 5364fe0f01ca ("lldpd: shellcheck fixes")

redirects to /dev/null shall be handled correctly (i.e. last).

This fixes these errors on `/etc/init.d/lldpd reload`:

2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null`
2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null`
2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null`
2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null`

Tested-on: 22.03.6
Fixes: 5364fe0f01ca ("lldpd: shellcheck fixes")
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
[ improve commit description, add fixes tag ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 8cf1dce428b11740d8335d167b9c1f297d1752d0)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-17 12:36:03 +02:00
Paul Donald
3d3dad61b2 lldpd: update URL
update Makefile URL

Signed-off-by: Paul Donald <newtwen@gmail.com>
(cherry picked from commit f753d3152f81bd037e9b7abb1b8c5bf9fe54596b)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-17 12:36:03 +02:00
Paul Donald
d7765c488c lldpd: shellcheck fixes
No functionality/behaviour changes; code is synonymous

Tested on: 22.03.6

Signed-off-by: Paul Donald <newtwen@gmail.com>
(cherry picked from commit 5364fe0f01ca11b47c55d78f756d3176748dd0c2)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-17 12:36:03 +02:00
Paul Donald
601bbdda6a lldpd: implement lldp_policy parameter
For certain lldp_class scenarios (2 & 3) a policy must be set also.
Class 4 is default, although it's good to handle the policy eventuality.

Here, set a default lldp_policy for all lldp_class scenarios. Any
lldp_policy can now be set.

Depends on PR #14584 (which introduced an `if` block)

Tested on 22.03.5, 22.03.6

Signed-off-by: Paul Donald <newtwen@gmail.com>
(cherry picked from commit 497fafb8aea48e764ce0e456f20ab346691e585f)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-17 12:36:03 +02:00
Paul Donald
56675166e8 lldpd: Implement location parameter
Previously only partially implemented. After commit
5007f488bb lldp_location was never removed

Now, add the value of lldp_location to the generated config.

The location param has a few syntaxes, so the config acquires the first
usage from the man page: 'address country EU'

Supplementary fix for PR #14193 (this param was included in the original
PR #13018 but the lldp_location fixes were absent from PR #14193).

Tested on 22.03.5, 22.03.6

Signed-off-by: Paul Donald <newtwen@gmail.com>
(cherry picked from commit 53252eeb3b6177b77e23235436b04818a88eafe0)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-17 12:36:03 +02:00
Paul Donald
7542e7927b lldpd: fix error "sh: XXXms: bad number"
from commit 3ce909914a12647bec52bcee0a162dd6d158a4f6

The lldpd man page says that "configure lldp tx-interval" can
specify an interval value in milliseconds by appending a "ms" suffix to
the figure. Thus mandating string handling, and not integer comparison.

Tested on 22.03.5

Signed-off-by: Paul Donald <newtwen@gmail.com>
(cherry picked from commit 79ee4cb0397eb9eae34369e33d66b5a1d837a652)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-17 12:36:03 +02:00
Paul Donald
b886948692 lldpd: refactor out ifaces derivation; reuse function
from commit 909f063066

Now pass two params to get_config_cid_ifaces() for:

cid_interface
interface

Each of which is a CSV of interfaces.

Tested on 22.03.5

Signed-off-by: Paul Donald <newtwen@gmail.com>
(cherry picked from commit 228d4e7f1b759c11897043dc73ef3c576bc13f7f)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-17 12:36:03 +02:00
Paul Donald
74581b02b2 lldpd: remove unneeded quotes
from commit a5f715da713304972467612d6934130ce3aa2837

Tested on 22.03.5

Signed-off-by: Paul Donald <newtwen@gmail.com>
(cherry picked from commit 4dcece46a7b4ede7d05d8fb9d31d62406bca74d0)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-17 12:36:03 +02:00
Paul Donald
8766fed5cd lldpd: remove unneeded quotes and variable quoting
from commit ac771313ebedd2c4bfda8adef47650d45d77c32d

portidsubtype takes 1 of 2 possible keywords which do not need quoting:

         configure lldp portidsubtype ifname | macaddress

The third keyword 'local' is used in the syntax when individual ports
are being defined:

         configure [ports ethX [,…]] lldp portidsubtype local value

When this syntax is used, quoting is useful (see test cases for lldpd).
In the init file, the 'local' syntax is unused.

Tested on 22.03.5

Signed-off-by: Paul Donald <newtwen@gmail.com>
(cherry picked from commit bd1b17d589bc622408cebdd9fa0f43386cc3ef5a)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-17 12:36:03 +02:00
Paul Donald
64b38f3bd5 lldpd: remove unneeded quotes and variable quoting
from commit c98ee4dbb3db0f064d990941cdd82e872da76946

agent-type takes 1 of 3 possible keywords which do not require quoting:

         configure lldp agent-type nearest-bridge | nearest-non-tpmr-bridge
         | nearest-customer-bridge

Tested on 22.03.5

Signed-off-by: Paul Donald <newtwen@gmail.com>
(cherry picked from commit 24a4da527f7e70d9916439a78298de2f4e4af653)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-17 12:36:03 +02:00