René van Dorst
1db30f22de
Merge pull request #330 from vDorst/SRAM-easy-changes
...
Sram easy changes
2026-08-29 18:33:29 +00:00
René van Dorst
146771f5ca
Merge pull request #362 from bloqaudio/fix/v210-bank0
...
leds: move the SWTG018AS-V2.1.0 custom LED init to BANK2
2026-08-27 16:32:09 +02:00
René van Dorst
bf0bea1edd
Remove register keyword from all the function arguments.
...
Adds no value.
2026-08-26 21:52:31 +02:00
René van Dorst
907ad08830
uip: uip_arp_update() put more arguments in xdata
...
Saves 7-bytes.
2026-08-26 20:51:32 +02:00
René van Dorst
7cf0115182
httpd: scan_header() put argument on xdata
...
Saves 2 bytes
2026-08-26 20:51:32 +02:00
René van Dorst
adfbead438
syslog: syslog_callback() put local variables on xdata.
...
Save atleast 2 bytes.
2026-08-26 20:51:32 +02:00
René van Dorst
301774040b
uip: place some pointer in xdata.
...
Saves 2 bytes.
2026-08-26 20:51:32 +02:00
René van Dorst
683037f410
httpd: rename gen_random_bytes to gen_random_hex_chars
...
This reflexs the function better.
Moving `byte` arguments to __xdata which saves 1 SRAM byte.
2026-08-26 20:51:27 +02:00
René van Dorst
57b820c4e8
httpd: mark pointer variable as __xdata.
...
Otherwise it is put on SRAM location.
Saves 6 SRAM bytes
2026-08-26 20:49:58 +02:00
René van Dorst
ee05cd4000
Fix: send_counters(), port-argument have to be physical port number.
...
Not the physical port index!
2026-08-25 07:55:17 +02:00
René van Dorst
74013bb14f
CMD: Treat port zero as CPU-port
2026-08-25 07:55:17 +02:00
René van Dorst
beb14deba5
httpd: send_counter(): Validate phys_port_idx and better error handling
2026-08-25 07:55:17 +02:00
René van Dorst
1212def799
CMD: fixes many comments
2026-08-25 07:55:17 +02:00
René van Dorst
95b3bde822
Rename print_port() to print_phys_port()
2026-08-25 07:55:17 +02:00
René van Dorst
f511453f79
CMD: refactor code
2026-08-25 07:55:17 +02:00
René van Dorst
8653216047
CMD: Fix some comments
2026-08-25 07:55:17 +02:00
René van Dorst
e62e0fc8bd
CMD: Isolate allow the CPU-port as a member.
2026-08-25 07:55:17 +02:00
René van Dorst
2ff418f80f
Replace '\0' to NUL to make it more clear that it is a NUL-terminated string.
2026-08-25 07:55:06 +02:00
René van Dorst
5d42e8843e
Rename cmd_is_space_or_null to cmd_is_space_or_nul
2026-08-25 07:54:15 +02:00
René van Dorst
3c183f73f8
Added print_port() helper to print physical port number.
2026-08-25 07:54:15 +02:00
René van Dorst
3776f12f5c
Fix and refactor parse_bw()
2026-08-25 07:54:15 +02:00
René van Dorst
5ddec9710a
CMD: Fix parse_lag_hash()
2026-08-25 07:54:15 +02:00
René van Dorst
f627559005
fix CMD: pvid: remove atoi_results_u8 from check
2026-08-25 07:54:15 +02:00
René van Dorst
dca92d7f45
cmd_parse_port_separator() cmd_parse_port() remove CPU-port support
...
Removing the CPU-port support, As stated in #334 , it is not needed to
manual add the CPU-port to any command. Because the CPU-port should be
added automatilly when CPU-port is needed.
Refactor cmd_parse_port() because port number is only 1 byte.
This simplifies the parsing code.
Refactor cmd_parse_port_separator() to ensure the return size is correct.
2026-08-25 07:54:15 +02:00
René van Dorst
149dc8537f
Rename cmd_parse_port_space() to cmd_parse_port_separator()
...
cmd_parse_port_separator() parse the full port number and checks that the
number end with a NUL of space.
Now this function can also be used to parse the last argument number
because this ends with a NUL.
Also refactor code.
2026-08-25 07:54:15 +02:00
René van Dorst
42f7b4fba1
Fix parse_isolate(), ensure spaces between arguments
2026-08-25 07:54:15 +02:00
René van Dorst
17642699d4
Improve parse_ingress()
2026-08-25 07:54:15 +02:00
René van Dorst
724fd1e061
Added print_ip() to print IPv4 addresses.
2026-08-25 07:54:15 +02:00
René van Dorst
3eb2dfe0c9
Change parse_ip()
2026-08-25 07:54:15 +02:00
René van Dorst
73df006d39
Replace all manual port parsing with cmd_parse_port_space() or cmd_parse_port().
...
Saves no SRAM but around 1k code size
2026-08-25 07:54:15 +02:00
René van Dorst
175f3bb185
Add cmd_parse_port() and cmd_parse_port_space() helper.
...
A lot of places we manual parse and translate the port.
These helper functions will do that for us.
2026-08-25 07:54:15 +02:00
René van Dorst
57061161b6
Refactor code to make use of new atoi_byte()
2026-08-25 07:54:15 +02:00
René van Dorst
80f97a50e0
Refactor atoi_byte() same as atoi_short()
2026-08-25 07:54:15 +02:00
René van Dorst
c265a20d83
Refactor the code for the new atoi_short()
...
Free-up 1 SRAM-byte
2026-08-25 07:54:15 +02:00
René van Dorst
4937618684
Change atoi_short() so it returns number of bytes consumed.
2026-08-25 07:54:15 +02:00
René van Dorst
fe2bcc7f2d
Merge pull request #356 from bloqaudio/fix/config-post-race
...
httpd: buffer a configuration upload before touching the flash
2026-08-24 23:35:19 +00:00
René van Dorst
cbbc6160f4
Merge pull request #357 from bloqaudio/fix/ingress-port-bound
...
cmd_parser: reject port 0 in the ingress command
2026-08-18 09:05:06 +02:00
René van Dorst
80095ba617
Merge pull request #354 from DrDoof/fix/isolate-cpu-port
...
port: reject the CPU port in isolate instead of refusing it silently
2026-08-17 18:31:25 +00:00
René van Dorst
6bfcbd2f9a
Merge pull request #349 from DrDoof/fix/lag-cmd-bounds
...
lag: number the groups from one and bound what the command is given
2026-08-16 06:48:28 +00:00
René van Dorst
719c6db228
Merge pull request #344 from DrDoof/feat/walk-l2
...
html: move the L2 table walk into a shared walkL2() helper
2026-08-15 21:38:43 +00:00
René van Dorst
5103d1c168
Merge pull request #338 from DrDoof/fix/lag-hash-default
...
port: make the trunk hash default reachable again, and per group
2026-08-15 21:01:09 +00:00
René van Dorst
ce85576882
Merge pull request #346 from DrDoof/fix/crtstart-home
...
Rename crtstart.asm to crtbank.asm
put the bank switching helpers in HOME-code location
2026-08-15 20:33:54 +00:00
René van Dorst
8bc530d3d0
Merge pull request #347 from DrDoof/feat/lag-members-get
...
port: read a trunk's members through one function
2026-08-15 19:23:50 +00:00
René van Dorst
94d9f2c8e8
Merge pull request #341 from DrDoof/fix/counters-port-index
...
httpd: check the port index /counters.json is given
2026-08-15 07:52:54 +00:00
René van Dorst
787d593996
Merge pull request #337 from DrDoof/fix/igmp-dup-loop
...
igmp: drop the duplicate port configuration loop
2026-08-14 22:12:33 +00:00
René van Dorst
db2a541e5f
Merge pull request #331 from DrDoof/fix/reg-macros-braces
...
regs: wrap REG_SET and REG_WRITE, and fix what that uncovers
2026-08-14 21:29:03 +00:00
René van Dorst
0c339e9123
Merge pull request #328 from DrDoof/fix/httpd-get-path-walk
...
httpd: stop the GET request line walk at the end of the buffer
2026-08-12 09:28:22 +02:00
René van Dorst
75151e0b00
Merge pull request #319 from bloqaudio/pr/cmd-editor-overflow
...
cmd_editor: fix cmd_buffer overflow and CLI hang on long input
2026-08-12 09:26:17 +02:00
René van Dorst
52692d05b1
Merge pull request #313 from DrDoof/fix/vlan-id-range
...
Reject VLAN IDs and numeric arguments the hardware cannot take
2026-08-08 20:51:43 +00:00
René van Dorst
d364bd69e4
Merge pull request #306 from DrDoof/mgmt-vlan-gui
...
system: show and set the management VLAN in System Settings
2026-08-08 20:44:07 +00:00
René van Dorst
70ab7ff769
Merge pull request #307 from DrDoof/l2-sort-filter
...
l2: fix the CPU/SFP port label, add sorting and filtering
2026-08-08 20:29:50 +00:00
René van Dorst
c435838376
Merge pull request #308 from plaes/horaco-zx-sg4t2
...
docs: Add Horaco XZ-SG4T2 skeleton documentation and images
2026-08-08 12:08:27 +00:00
René van Dorst
3f7db7e430
Merge pull request #297 from DrDoof/hostname
...
system: configurable hostname + show model on the System page
2026-08-07 18:10:34 +00:00
René van Dorst
f98fe32d0c
Merge pull request #309 from plaes/http-security-fixes
...
httpd: Fix buffer offerflow in scan_header
2026-08-07 10:08:11 +00:00
René van Dorst
de3eca26c3
Merge pull request #301 from zytstudio/MACHINE_FG_4GT_2SX_V2_0
...
Add FG-4GT-2SX_V2.0
2026-08-05 08:53:02 +00:00
René van Dorst
c86d4b31f2
Merge pull request #304 from plaes/makefile
...
makefile: Make CC and ASM overridable via command line
2026-08-04 19:50:31 +00:00
René van Dorst
05d8c36afe
Merge pull request #278 from eraiza0816/update-docs-SWTG024AS
...
update document: SKS3200M-4GPY2XF flash size
2026-07-04 12:47:04 +00:00
René van Dorst
b6c9eaf00f
Merge pull request #275 from riker77/mokerlink-2G040210GSM
...
Add Mokerlink 2G040210GSM (2M-PCB43-V1.1)
2026-07-04 12:45:47 +00:00
René van Dorst
b53c56e7f6
Merge pull request #273 from Lynn-Becky/feat/PCB-SWTG024AS-V2.0
...
fix(machine): SWTG024AS V2.0 fix 5th RJ45 port
2026-06-27 19:50:05 +00:00
René van Dorst
5566d71522
Merge pull request #272 from Lynn-Becky/feat/PCB-SWTG024AS-V2.0
...
fix(SWTG024AS-V2.0): correct SFP port GPIO assignments
2026-06-27 13:33:29 +00:00
René van Dorst
7fe0678c92
Merge pull request #271 from th0m4sek/main
...
Add reset button gpio to SWTG018AS-A V2.0
2026-06-25 18:33:18 +00:00
René van Dorst
d90c02f951
Merge pull request #268 from th0m4sek/main
...
Table with supported devices
2026-06-23 17:40:51 +00:00
René van Dorst
1635236a05
Merge pull request #266 from hlyi/pr-tool
...
Tools for detecting GPIO mapping and extracting LED configure
2026-06-23 06:28:38 +00:00
René van Dorst
bd595b7f94
Merge pull request #263 from Lynn-Becky/feat/PCB-SWTG024AS-V2.0
...
Add PCB-SWTG024AS V2.0 (Unmanaged)
2026-06-22 19:27:38 +00:00
René van Dorst
98ddb0bb29
Merge pull request #253 from Erdnusschokolade/fix/vlan-mgmt-filter
...
Fix conf_overwrite filter removing vlan mgmt entries
2026-06-21 18:52:59 +00:00
René van Dorst
f122402bdd
Merge pull request #259 from logicog/rtl8221b_100m_support
...
Add support for 100M on RTL8221B ports
2026-06-15 17:54:03 +00:00
René van Dorst
94e34a5991
Merge pull request #251 from feelfree69/make
...
make: seperate output directories by MACHINE
2026-06-05 19:16:04 +00:00
René van Dorst
b58b1dfb35
Merge pull request #252 from feelfree69/main
...
Don't disable flash DIO operation before flashing
2026-06-05 19:13:30 +00:00
René van Dorst
ad64e450e1
Merge pull request #246 from logicog/sfp_speed
...
Add support for configuring SFP modules speeds via CLI
2026-05-31 18:33:05 +00:00
René van Dorst
964ef2da7a
Fix SFP led for 2.5gbit for MACHINE_SWGT024_V2_0
...
While testing #246 , I noticd that SFP did not light-up while forcing
2.5gbit link. This is because RJ45 and SFP share the same LED-settings.
But RJ45 has two leds-settings.
Solution is to add settings for SFP for both managed and unmanaged
variant.
2026-05-30 21:02:42 +02:00
René van Dorst
4b42be8cae
Merge pull request #234 from logicog/fix_duplex
...
Fix duplex setting on the CLI
2026-05-22 19:38:33 +00:00
René van Dorst
d253c9feee
Merge pull request #231 from xristos-sk/fix-rtl837x_stp-bug,-cmpMac-always-0-when-checking-for-new-root
...
fix: rtl837x_stp bug, cmpMac always 0 when checking for new root
2026-05-19 19:57:45 +00:00
René van Dorst
4b40efafbb
Fix and refactor is_url_word_x().
...
With content_type = "application/x-www-form-urlencoded", "+" means space.
This case was not handled.
Also refactor the code to make a loop to process the hex digits.
2026-05-17 21:23:35 +02:00
René van Dorst
02992771ad
change is_word_x() return type from char to bool.
...
Saves 10 bytes.
2026-05-17 21:15:39 +02:00
René van Dorst
f81c497728
refactor is_word_x()
...
Saved 22 bytes.
2026-05-17 21:13:07 +02:00
René van Dorst
b46cc2087f
change is_word() return type from char to bool.
...
Saves 52 bytes.
2026-05-17 21:12:57 +02:00
René van Dorst
3904daced7
refactor is_word()
...
Saved 23 bytes.
2026-05-17 19:14:27 +02:00
René van Dorst
623247da4f
httpd: Added extra content_type check for login.
...
Ensure login content_type is "application/x-www-form-urlencoded".
2026-05-17 17:17:15 +02:00
René van Dorst
aa5368cf34
Merge pull request #228 from zectaiga/add-fns1200p
...
Add support for FOXNEO FNS-1200P (RTL8372, 4x2.5G PoE+ + 2x SFP+)
2026-05-17 11:58:18 +00:00
René van Dorst
2b39d723c7
Merge pull request #225 from orbisai0security/fix-v010-firmware-upload-auth-integrity
...
fix: authenticate config upload before flash erase and abort failed firmware CRC
2026-05-17 11:52:22 +00:00
René van Dorst
bf9fa35338
Merge pull request #224 from logicog/fix_passwd
...
Add URL decoding for password comparison.
2026-05-15 20:04:15 +00:00
René van Dorst
a2b2dbcfbf
Merge pull request #221 from feelfree69/kp9000
...
Adding Keeplink KP-9000-6XH-X2
2026-05-15 02:08:42 +00:00
René van Dorst
09d90d6d97
Merge pull request #175 from logicog/ZX310S-4T2XH
...
10GBit Ethernet Switch support (Horaco ZX310S-4T2XH)
2026-05-02 17:22:52 +00:00
René van Dorst
042f4324a4
Merge pull request #166 from logicog/frame_header
...
Cleanup Frame header structures and fix management VLAN
2026-04-24 06:53:07 +00:00
René van Dorst
d2e79d4d80
Fix: In commit 8cbafaa cmd_tokenize() has changed. Missed that it also used
...
outside cmd_parser.c.
Fix the other location and headerfile.
2026-04-21 21:17:22 +02:00
René van Dorst
016061d8db
cmd: Fix 8324edc atoi_short() commit.
...
vlan initialization was removed while trying out an other version.
But was not restored back.
2026-04-21 21:16:03 +02:00
René van Dorst
18225f5d22
uip: more fix.
2026-04-19 22:18:39 +02:00
René van Dorst
224471d676
uip: move second argument to __xdata free up 4 sram bytes.
2026-04-19 22:18:39 +02:00
René van Dorst
50d06c61bc
change prototype uip_udp_new(), saves 1 sram.
2026-04-19 22:18:39 +02:00
René van Dorst
d5709bcaf3
fix atoi
2026-04-19 22:18:39 +02:00
René van Dorst
52d943d5e4
rtlplayground: de-__gptrput()-call in read_reg_timer()
2026-04-19 22:18:39 +02:00
René van Dorst
e79e90dd35
cmd_parser: de-__gptrput()-call in vlan_ingress_mode_parse()
2026-04-19 22:18:36 +02:00
René van Dorst
da768171a5
change cmd_tokenize().
...
Remove the return argument because `err_status` is also reflecting the result.
Fix the error message when too many arguments are found.
refactor `execute_config()`, error out when err_status is not OK.
2026-04-19 22:00:31 +02:00
René van Dorst
94bf4425ba
uip: de-__gptrput()-call access to struct uip_udp_conn
2026-04-18 22:38:42 +02:00
René van Dorst
3e599f0e06
dhcp: de-__gptrput()-call in ip_opt()
2026-04-18 22:27:55 +02:00
René van Dorst
6c6d11ab33
dhcp: de-__gptrget()-call in dhcp_print_ip()
2026-04-18 22:20:46 +02:00
René van Dorst
791f68582d
httpd: de-__gptrget()-call in string_to_html()
2026-04-18 22:20:46 +02:00
René van Dorst
facc4afe40
uip: de-__gptrget()-call in timer_{set,reset,restart,exprired}()
2026-04-18 22:20:46 +02:00
René van Dorst
8134ca7ec7
uip: de-__gptrget()-call in uip_ipaddr_copy()
2026-04-18 22:20:46 +02:00
René van Dorst
642030c7b2
uip: de-__gptrget()-call in uip_add32()
2026-04-18 22:20:46 +02:00