Jump to content

Recommended Posts

Posted

I’m really happy to share that I finally managed to port the SV6256P (SSV6X5X) SDIO Wi-Fi driver from the legacy Linux 4.4 kernel to modern kernels.

This repository contains my working port for Linux kernel 6.12 and newer, with updated mac80211/cfg80211 integration so the driver can build and run on recent Armbian systems.

The chipset is commonly used in many low-cost TV boxes and embedded devices, but the original driver only supported legacy kernels (4.4).

Now it’s functional again on modern systems, at least on my tested hardware (Allwinner H616 / X96 Q via SDIO).

 

Repository link:
https://github.com/cdhigh/armbian_sv6256p

 

I’m quite excited to finally see this old Wi-Fi chip working on a 6.x kernel 🙂
 

[    4.774151] ssv6x5x: importing configuration from /lib/firmware/ssv6x5x-wifi.cfg
[    4.778281] tu_ssv6xxx_sdio_init, probe @(____ptrval____)
[    4.779483] TU_SSV6XXX_SDIO mmc3:0001:1: Probing SDIO bus
[    4.779513] ssv6xxx_set_sdio_clk: set sdio clk 25000000Hz
[    4.799668] TU_SSV6XXX_SDIO mmc3:0001:1: vendor = 0x3030 device = 0x3030
[    4.825421] TU_SSV6XXX_SDIO mmc3:0001:1: dataIOPort 0x10000 regIOPort 0x10020
[    4.849181] TU_SSV6XXX_SDIO mmc3:0001:1: dataIOPort 0x10000 regIOPort 0x10020
[    4.849530] TU_SSV6XXX_SDIO mmc3:0001:1: CHIP ID: SSV6006C0
[    4.850373] ssv6x5x ops chk: tx=1 start=1 stop=1 config=1 add_if=1 rm_if=1 conf_filter=1 wake_txq=1
[    4.850402] ssv6x5x chanctx chk: any=1 all=0 emulate=1 add=1 rm=1 chg=1 assign=0 unassign=0
[    4.850409] ssv6x5x chanctx ops set but not complete
[    4.850424] Attach SSV6006 family HAL function
[    4.858285] MAC address from e-fuse
[    4.858311] EFUSE configuration
[    4.858315] Read efuse chip identity[79000000]

ip link show:
6: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DORMANT group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff

 

Posted

Hello, congratulations for your achievement!

 

I wonder if you had the chance to give a shot to the ssv6051 sibling... the original drivers (one for ssv6051 and another for ssv6x5x) were really a mess that @ilmich and me did a lot of work at the time to cleanup and fix things in the past time. We concentrated against the ssv6051 driver at the time and in fact the ssv6051 driver already works in mainline kernel (it is in the rockchip 32bit patch directory), although it is still quite a mess. Here it is the repository if you want to take a look to the commits.

 

We also started an attempt to do a clean and proper reimplementation of the ssv6xxx driver, but actually never went over firmware loading (the repo is private since it was a heavy WIP, but can share if you have enough will to take a look to that)

Posted (edited)

@Kevin su Excellent work! Porting the SV6256P driver all the way to kernel 6.12 is a huge achievement. Most users usually just give up and plug in a USB Wi-Fi adapter to avoid the headache of legacy drivers.

Edited by Nick A
Posted

@jock 

The driver-related knowledge is vast and quite complicated, with many pitfalls, so porting really requires strong assistance from AI.
I don’t have an SSV6051, so I can’t actually complete the porting myself.
Btw, the "ssv6x5x-sw.bin" I’m using is the file you posted on the forum.

 

Posted

@Nick A Yes, I used the MT7601U for a few days, but I wasn’t really satisfied with it. So, with the help of AI, I decided to port the SV6256P anyway—and to my surprise, it actually worked.

Posted

While reviewing the system logs, I noticed several ftrace warnings appearing in dmesg.

After investigating the root cause, I have applied the necessary configuration updates to eliminate these logs.

The driver is now running cleanly without any ftrace-related noise.

Posted

Hey guys and @jock. Thanks for the references.

 

not very fast, but stable and working on a s905w. (guess to be a tx3 mini, but who knows...)

 

kernel 6.18.10 and ssv6051p. 

 

Linux aml-s9xx-box 6.18.10-current-meson64 #3 SMP PREEMPT Wed Feb 11 12:42:01 UTC 2026 aarch64 GNU/Linux

 

with speedtest-cli

Download: 3.43 Mbit/s

Upload: 1.55 Mbit/s

yeah, slow. but stable... i guess

 

dmesg

[   11.938463] SSV WLAN driver ssv6200: chip id: RSV6200A0-201311, tag: 2014012420010960
[   12.006600] SSV WLAN driver ssv6200: attempt to load firmware ssv6051-sw.bin
[   12.021645] SSV WLAN driver ssv6200: firmware upload complete (wrote 80 blocks, verified 80 blocks)
[   12.138546] SSV WLAN driver ssv6200: Firmware version 16380
[   12.141013] SSV WLAN driver ssv6200: Calibration successful

 

https://github.com/eloirotava/6051

 

the repo has also the rtl8188fu driver to the same soc/kernel. it is better than the ssv for sure...

 

The trick was tuning the ssv6051-wifi.cfg to disableHT/AMPDU that usually kill the SDIO bus on these SOCs.

 

 

Posted

I ran a speed test on my SSV6051. Here are the results:

 

Idle Latency:     9.78 ms   (jitter: 1.12ms, low: 9.33ms, high: 10.93ms)
    Download:    34.46 Mbps (data used: 23.6 MB)
                 52.01 ms   (jitter: 6.52ms, low: 19.97ms, high: 109.64ms)
      Upload:     8.25 Mbps (data used: 12.4 MB)
                 99.47 ms   (jitter: 26.37ms, low: 48.84ms, high: 491.13ms)
 Packet Loss:     0.0%

 

Posted

@Kauã Fonseca

There are SSH commands in my GitHub repository. Just SSH into your TV box and execute them one by one.

 

sudo apt-get update
sudo apt-get install -y build-essential linux-headers-$(uname -r) git

git clone https://github.com/cdhigh/armbian_sv6256p.git
cd armbian_sv6256p
chmod +x ./parser-conf.sh
make ARCH=arm64 KSRC=/lib/modules/$(uname -r)/build
ls -lh ssv6x5x.ko

sudo cp ./ssv6x5x-wifi.cfg /lib/firmware/
sudo cp ./ssv6x5x-sw.bin /lib/firmware/
sudo cp ./ssv6x5x.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/
sudo depmod -a
sudo modprobe ssv6x5x

ip link show
nmtui

 

Posted

that is huge! Congrats @Kevin su!!!

I'll give it a test with my rk3228a box...

Actually I have spent the last weekend building a noble release with the legacy 4.4 kernel... wish I had seen your post earlier hahaha

root@bisonho:~# lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Armbian 26.2.1 noble
Release:    24.04
Codename:    noble

root@bisonho:~# uname -a
Linux bisonho 4.4.194-legacy-rk322x #1 SMP Sat Nov 14 09:27:12 UTC 2020 armv7l armv7l armv7l GNU/Linux

root@bisonho:~# uptime
 11:29:11 up 2 days,  1:45,  1 user,  load average: 0.00, 0.01, 0.03
root@bisonho:~# 

Posted (edited)

Hey,

After around 3h of gemini-vibe-coding, a completely noob like me was able to compile this sv6256p for the 6.18 kernel!

I just download the last trunk community image release (Armbian 26.2.0-trunk.732 trixie) for the rk322x-box for my Frankeinstein mxq box that has the rk3228a cpu (armv7l instead arm64).

Before starting compilation, I have apt updated/upgraded my installation to Armbian 26.2.0-trunk.778 trixie.

I've got ~35mbps download connected to a 5GHz Network, but to be fair, the router was a bit far away from the device... (#update: 45mbps/4.5mbps down/up with device closer to the router)

 

root@rk322x-box:~# uname -a
Linux rk322x-box 6.18.23-current-rockchip #3 SMP Sat Apr 18 08:45:02 UTC 2026 armv7l GNU/Linux
root@rk322x-box:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Armbian 26.2.0-trunk.778 trixie
Release:        13
Codename:       trixie

root@rk322x-box:~# ip a show dev wlan0
5: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
   link/ether 30:8e:7a:XX:XX:XX brd ff:ff:ff:ff:ff:ff
   altname wlx308e7ac32730
   inet 192.168.182.119/24 brd 192.168.182.255 scope global dynamic noprefixroute wlan0
      valid_lft 86156sec preferred_lft 86156sec

root@rk322x-box:~# lsmod | grep ssv
ssv6x5x               512000  0
mac80211              864256  1 ssv6x5x
cfg80211              757760  2 mac80211,ssv6x5x

root@rk322x-box:~# speedtest
Retrieving speedtest.net configuration...
Testing from Vivo (REDACTED)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Redel Internet (Balneário Camboriu) [424.68 km]: 25.337 ms
Testing download speed................................................................................
Download: 35.23 Mbit/s
Testing upload speed......................................................................................................
Upload: 10.10 Mbit/s
root@rk322x-box:~#


Here is the patches I did in order to compile to 6.18 Kernel ( @Kevin su perhaps you can create a new branch with those?)

Follow the instructions https://github.com/cdhigh/armbian_sv6256p repo, but dont run the Make command yet.

Run these commands from inside your driver's source code directory to patch the code, compile it, and install it on modern Linux kernels (>= 6.15):

# 1. Fix Makefile Include Paths
sed -i '1i ccflags-y += -I$(src)/include -I$(src)' Makefile

# 2. Patch Kernel Timer API Changes (Kernel 6.15+)
find . -type f -name "*.[ch]" -exec sed -i 's/del_timer/timer_delete/g' {} +
sed -i '1i #include <linux/timer.h>' smac/dev.c
sed -i 's/from_timer(sc, t, house_keeping)/container_of(t, struct ssv_softc, house_keeping)/g' smac/dev.c

# 3. Patch mac80211 API Changes
sed -i 's/int ssv6200_config(struct ieee80211_hw \*hw, u32 req)/int ssv6200_config(struct ieee80211_hw *hw, int action, u32 req)/' smac/dev.c

# 4. Patch obsolete/removed Kernel Headers
sed -i '1s/^/#define FB_EVENT_BLANK 0x09\n/' smac/ssv_pm.c
find . -type f -name "*.[ch]" -exec sed -i 's|#include <net/lib80211.h>|//#include <net/lib80211.h>|g' {} +
sed -i '1s/^/#define IEEE80211_CRYPTO_TKIP_COUNTERMEASURES (1 << 1)\n/' smac/sec_tkip.c
sed -i '1s|^|#include <linux/interrupt.h>\n|' hwif/hwif.h

# 5. Compile the Driver (For 32-bit ARM)
make ARCH=arm KSRC=/lib/modules/$(uname -r)/build

# 6. Install Firmware and Driver
sudo cp ./ssv6x5x-wifi.cfg /lib/firmware/
sudo cp ./ssv6x5x-sw.bin /lib/firmware/
sudo cp ./ssv6x5x.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/
sudo depmod -a

# 7. Force Firmware Path and Reload
echo 'options ssv6x5x stacfgpath="/lib/firmware/ssv6x5x-wifi.cfg" cfgfirmwarepath="/lib/firmware/ssv6x5x-sw.bin"' | sudo tee /etc/modprobe.d/ssv6x5x.conf
sudo rmmod ssv6051 2>/dev/null
sudo rmmod ssv6x5x 2>/dev/null
sudo modprobe ssv6x5x

# 8. Make it permanent
cat <<EOF > /etc/modprobe.d/armbian_ssv6x5x.conf
blacklist ssv6051
ssv6x5x
EOF

# 9. Reboot

#10. Coonnect using nmtui or nmcli…

for some reason I had to manually add the main router:
sudo ip route add 192.168.182.0/24 dev wlan0 proto kernel scope link src 192.168.182.119


... And here is the explanation for each patch, according to Gemini:

Spoiler
Gemini Explanations for the patches:
If you are curious about why we have to patch the source code so heavily, here is an explanation of every error these commands prevent:
    • ccflags-y += -I$(src)...
        ◦ Prevents: fatal error: ssv_cfg.h: No such file or directory
        ◦ Why: The driver's original Makefile fails to properly link its own local include/ and hwif/ directories, causing the compiler to go blind looking for header files.
    • sed -i 's/del_timer/timer_delete/g'...
        ◦ Prevents: implicit declaration of function ‘del_timer_sync’
        ◦ Why: In Linux Kernel 6.15, the core timer APIs (del_timer and del_timer_sync) were officially deprecated and renamed to timer_delete. This blindly updates the legacy names to the modern names.
    • #include <linux/timer.h> & container_of(...)
        ◦ Prevents: implicit declaration of function ‘from_timer’ and ‘house_keeping’ undeclared
        ◦ Why: The driver uses a timer macro (from_timer) that isn't resolving correctly on newer/vendor-forked kernels. Swapping it for the universal container_of kernel macro guarantees the compiler knows how to map the timer data.
    • int action (in ssv6200_config)
        ◦ Prevents: initialization of [...] from incompatible pointer type
        ◦ Why: The Linux mac80211 wireless subsystem recently updated its configuration callback signature. It now passes three arguments instead of two. We add the missing int action argument so the function signatures match.
    • #define FB_EVENT_BLANK 0x09
        ◦ Prevents: ‘FB_EVENT_BLANK’ undeclared
        ◦ Why: This macro was part of the legacy fbdev (framebuffer) screen-blanking notification system, which modern kernels have deleted. We manually inject the macro so the compiler doesn't panic.
    • Commenting out <net/lib80211.h>
        ◦ Prevents: fatal error: net/lib80211.h: No such file or directory
        ◦ Why: The legacy 802.11 crypto library was completely purged from recent kernels. The driver includes the header out of habit, so commenting it out allows the build to bypass the missing file.
    • #define IEEE80211_CRYPTO_TKIP...
        ◦ Prevents: ‘IEEE80211_CRYPTO_TKIP_COUNTERMEASURES’ undeclared
        ◦ Why: Because we deleted the lib80211.h header, we lost this specific bitmask flag used by the legacy TKIP encryption module. We manually define it so the crypto module compiles.
    • #include <linux/interrupt.h>
        ◦ Prevents: unknown type name ‘irq_handler_t’
        ◦ Why: Older kernels automatically loaded hardware interrupt headers via chain-loading. Modern kernels require you to explicitly include the interrupt header if you want to use IRQ handlers.
    • options ssv6x5x stacfgpath=... (modprobe.d config)
        ◦ Prevents: SOS!SOS! Failed to initialize mac, ret=-1 & -EPERM (Operation not permitted)
        ◦ Why: When the chip is detected (e.g., as SSV6006C0), the driver tries to load a hardcoded firmware filename that doesn't exist, causing the chip to crash on boot. Passing these parameters forces the driver to use the exact ssv6x5x-sw.bin file provided in the repository.
    • rmmod ssv6051
        ◦ Prevents: Hardware lockups and garbage memory reads ([0xca000200]: 0x0c000000!=0x00000000)
        ◦ Why: The system will often mistakenly load the ssv6051 module alongside ssv6x5x. When two drivers fight over the same SDIO bus, the hardware locks up and goes deaf.

 


Anyway, in the next post I will upload the compiled/generated ssv6x5x.kossv6x5x-wifi.cfg and ssv6x5x-sw.bin files, only for the 6.18.23-current-rockchip kernel and the rk3228a. It might work for other armv7l CPUs using the trunk rk-322x box images, but it certainly not work for any other kernel.

Edited by Vinicius Guastala
Posted

here is the module driver files only for the 6.18.23-current-rockchip kernel. It works for the rk3228a cpu, but it might work for other CPUs that can run the rk32xx-box as well...

Download files from https://github.com/viny182/ssv6x5x_compiled_for_6.18.23-current-rockchip then:

# 1. Install Firmware and Driver
sudo cp ./ssv6x5x-wifi.cfg /lib/firmware/

sudo cp ./ssv6x5x-sw.bin /lib/firmware/

sudo cp ./ssv6x5x.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/

sudo depmod -a

# 2. Force Firmware Path and Reload
echo 'options ssv6x5x stacfgpath="/lib/firmware/ssv6x5x-wifi.cfg" cfgfirmwarepath="/lib/firmware/ssv6x5x-sw.bin"' | sudo tee /etc/modprobe.d/ssv6x5x.conf

sudo rmmod ssv6051 2>/dev/null

sudo rmmod ssv6x5x 2>/dev/null

sudo modprobe ssv6x5x

 

# 3. Make it permanent

cat <<EOF > /etc/modprobe.d/armbian_ssv6x5x.conf blacklist ssv6051 ssv6x5x EOF

 

# 4. Reboot

 

# 5. Coonnect using nmtui or nmcli…

Posted

45mbps Down / 4.5mbps UP with device more closer to the router :)

root@rk322x-box:~# speedtest
Retrieving speedtest.net configuration...
Testing from Vivo (REDACTED)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Redel Internet (Balneário Camboriu) [424.68 km]: 23.94 ms
Testing download speed................................................................................
Download: 45.84 Mbit/s
Testing upload speed......................................................................................................
Upload: 4.46 Mbit/s

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines