# viny182/armbian_sv6256p architecture

> Architecture diagram of the GitHub repository viny182/armbian_sv6256p, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/viny182/armbian_sv6256p
- Repository: https://github.com/viny182/armbian_sv6256p

## Overview

This is a Linux kernel Wi-Fi driver port for the SSV6256P/SSV6X5X chipset. Its principal workflow is kernel driver loading and initialization, followed by wireless operation through the chipset and host-interface layers; the README specifically documents SDIO hardware and modern mac80211/cfg80211 integration. The tree also contains SmartLink provisioning and a separate QQ device-SDK demo. Unsampled source limits confidence about internal call paths, so unverified connections are omitted or shown as dashed.

Main entry points: [`hci/ssv_hci.c`](https://github.com/viny182/armbian_sv6256p/blob/main/hci/ssv_hci.c) (Host Controller), [`ssvdevice/ssvdevice.c`](https://github.com/viny182/armbian_sv6256p/blob/main/ssvdevice/ssvdevice.c) (Device Commands), [`smac/hal/hal.c`](https://github.com/viny182/armbian_sv6256p/blob/main/smac/hal/hal.c) (Hardware Abstraction), [`ssv6x5x-generic-wlan.c`](https://github.com/viny182/armbian_sv6256p/blob/main/ssv6x5x-generic-wlan.c) (Driver Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_kernel["Kernel Integration"]
  node_driver["Driver Entry"]
  node_device["Device Commands<br/>[ssvdevice.c]"]
  node_commands["Command Interface<br/>[ssv_cmd.c]"]
  node_config["Driver Configuration<br/>[ssv_cfg.h]"]
  node_netlink["Netlink Core"]
end

subgraph group_wireless["Wireless Core"]
  node_smac["MAC Driver<br/>[dev.c]"]
  node_init["Chip Initialization<br/>[init.c]"]
  node_hal["Hardware Abstraction<br/>[hal.c]"]
  node_chipmac["Chip MAC<br/>[ssv6006C_mac.c]"]
  node_phy["Chip PHY<br/>[ssv6006_phy.c]"]
end

subgraph group_transport["Host Transport"]
  node_hci["Host Controller<br/>[ssv_hci.c]"]
  node_hci_ctrl["HCI Definitions<br/>[hctrl.h]"]
  node_hci_wrapper["HCI Wrapper<br/>[ssv_huw.c]"]
  node_sdio["SDIO Interface<br/>[sdio.c]"]
  node_usb["USB Interface<br/>[usb.c]"]
  node_bridge["SDIO Bridge<br/>[sdiobridge.c]"]
end

subgraph group_provision["Provisioning and SDK"]
  node_smartlink["SmartLink Control<br/>[ssv_smartlink.c]"]
  node_airkiss["AirKiss Support<br/>[airkiss.c]"]
  node_qqdemo["QQ Device Demo<br/>[main.c]"]
  node_qqsdk["QQ Device SDK API<br/>[TXDeviceSDK.h]"]
end

node_kernel(("Linux Kernel"))

node_kernel -->|"loads"| node_driver
node_driver -.->|"initializes"| node_device
node_device -->|"uses"| node_commands
node_device -->|"reads"| node_config
node_hci -->|"uses definitions"| node_hci_ctrl
node_smac -.->|"dispatches"| node_hal
node_hal -.->|"selects"| node_chipmac
node_hal -.->|"selects"| node_phy
node_hci_wrapper -.->|"adapts"| node_hci
node_hci -.->|"transfers over"| node_sdio
node_hci -.->|"transfers over"| node_usb
node_kernel -.->|"configures wireless"| node_smartlink
node_smartlink -.->|"exchanges commands"| node_netlink
node_qqdemo -->|"calls API"| node_qqsdk

click node_driver "https://github.com/viny182/armbian_sv6256p/blob/main/ssv6x5x-generic-wlan.c"
click node_device "https://github.com/viny182/armbian_sv6256p/blob/main/ssvdevice/ssvdevice.c"
click node_commands "https://github.com/viny182/armbian_sv6256p/blob/main/ssvdevice/ssv_cmd.c"
click node_config "https://github.com/viny182/armbian_sv6256p/blob/main/include/ssv_cfg.h"
click node_netlink "https://github.com/viny182/armbian_sv6256p/blob/main/umac/ssv6xxx_netlink_core.c"
click node_smac "https://github.com/viny182/armbian_sv6256p/blob/main/smac/dev.c"
click node_init "https://github.com/viny182/armbian_sv6256p/blob/main/smac/init.c"
click node_hal "https://github.com/viny182/armbian_sv6256p/blob/main/smac/hal/hal.c"
click node_chipmac "https://github.com/viny182/armbian_sv6256p/blob/main/smac/hal/ssv6006c/ssv6006C_mac.c"
click node_phy "https://github.com/viny182/armbian_sv6256p/blob/main/smac/hal/ssv6006c/ssv6006_phy.c"
click node_hci "https://github.com/viny182/armbian_sv6256p/blob/main/hci/ssv_hci.c"
click node_hci_ctrl "https://github.com/viny182/armbian_sv6256p/blob/main/hci/hctrl.h"
click node_hci_wrapper "https://github.com/viny182/armbian_sv6256p/blob/main/hci_wrapper/ssv_huw.c"
click node_sdio "https://github.com/viny182/armbian_sv6256p/blob/main/hwif/sdio/sdio.c"
click node_usb "https://github.com/viny182/armbian_sv6256p/blob/main/hwif/usb/usb.c"
click node_bridge "https://github.com/viny182/armbian_sv6256p/blob/main/bridge/sdiobridge.c"
click node_smartlink "https://github.com/viny182/armbian_sv6256p/blob/main/smartlink/ssv_smartlink.c"
click node_airkiss "https://github.com/viny182/armbian_sv6256p/blob/main/smartlink/airkiss.c"
click node_qqdemo "https://github.com/viny182/armbian_sv6256p/blob/main/smartlink/qqlink-lib-mipsel/case/ipcamera/main.c"
click node_qqsdk "https://github.com/viny182/armbian_sv6256p/blob/main/smartlink/qqlink-lib-mipsel/include/TXDeviceSDK.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_driver,node_device,node_commands,node_config,node_netlink toneBlue
class node_smac,node_init,node_hal,node_chipmac,node_phy toneAmber
class node_hci,node_hci_ctrl,node_hci_wrapper,node_sdio,node_usb,node_bridge toneMint
class node_smartlink,node_airkiss,node_qqdemo,node_qqsdk toneRose
class node_kernel toneIndigo
```

## Components

### Kernel Integration

- [Driver Entry](https://github.com/viny182/armbian_sv6256p/blob/main/ssv6x5x-generic-wlan.c): `ssv6x5x-generic-wlan.c`
- [Device Commands](https://github.com/viny182/armbian_sv6256p/blob/main/ssvdevice/ssvdevice.c): `ssvdevice/ssvdevice.c`
- [Command Interface](https://github.com/viny182/armbian_sv6256p/blob/main/ssvdevice/ssv_cmd.c): `ssvdevice/ssv_cmd.c`
- [Driver Configuration](https://github.com/viny182/armbian_sv6256p/blob/main/include/ssv_cfg.h): `include/ssv_cfg.h`
- [Netlink Core](https://github.com/viny182/armbian_sv6256p/blob/main/umac/ssv6xxx_netlink_core.c): `umac/ssv6xxx_netlink_core.c`

### Wireless Core

- [MAC Driver](https://github.com/viny182/armbian_sv6256p/blob/main/smac/dev.c): `smac/dev.c`
- [Chip Initialization](https://github.com/viny182/armbian_sv6256p/blob/main/smac/init.c): `smac/init.c`
- [Hardware Abstraction](https://github.com/viny182/armbian_sv6256p/blob/main/smac/hal/hal.c): `smac/hal/hal.c`
- [Chip MAC](https://github.com/viny182/armbian_sv6256p/blob/main/smac/hal/ssv6006c/ssv6006C_mac.c): `smac/hal/ssv6006c/ssv6006C_mac.c`
- [Chip PHY](https://github.com/viny182/armbian_sv6256p/blob/main/smac/hal/ssv6006c/ssv6006_phy.c): `smac/hal/ssv6006c/ssv6006_phy.c`

### Host Transport

- [Host Controller](https://github.com/viny182/armbian_sv6256p/blob/main/hci/ssv_hci.c): `hci/ssv_hci.c`
- [HCI Definitions](https://github.com/viny182/armbian_sv6256p/blob/main/hci/hctrl.h): `hci/hctrl.h`
- [HCI Wrapper](https://github.com/viny182/armbian_sv6256p/blob/main/hci_wrapper/ssv_huw.c): `hci_wrapper/ssv_huw.c`
- [SDIO Interface](https://github.com/viny182/armbian_sv6256p/blob/main/hwif/sdio/sdio.c): `hwif/sdio/sdio.c`
- [USB Interface](https://github.com/viny182/armbian_sv6256p/blob/main/hwif/usb/usb.c): `hwif/usb/usb.c`
- [SDIO Bridge](https://github.com/viny182/armbian_sv6256p/blob/main/bridge/sdiobridge.c): `bridge/sdiobridge.c`

### Provisioning and SDK

- [SmartLink Control](https://github.com/viny182/armbian_sv6256p/blob/main/smartlink/ssv_smartlink.c): `smartlink/ssv_smartlink.c`
- [AirKiss Support](https://github.com/viny182/armbian_sv6256p/blob/main/smartlink/airkiss.c): `smartlink/airkiss.c`
- [QQ Device Demo](https://github.com/viny182/armbian_sv6256p/blob/main/smartlink/qqlink-lib-mipsel/case/ipcamera/main.c): `smartlink/qqlink-lib-mipsel/case/ipcamera/main.c`
- [QQ Device SDK API](https://github.com/viny182/armbian_sv6256p/blob/main/smartlink/qqlink-lib-mipsel/include/TXDeviceSDK.h): `smartlink/qqlink-lib-mipsel/include/TXDeviceSDK.h`

### Other components

- **Linux Kernel**

## Connections

- Linux Kernel → Driver Entry: loads
- Driver Entry → Device Commands: initializes
- Device Commands → Command Interface: uses (evidence: `ssvdevice/ssvdevice.c`)
- Device Commands → Driver Configuration: reads (evidence: `ssvdevice/ssvdevice.c`)
- Host Controller → HCI Definitions: uses definitions (evidence: `hci/ssv_hci.c`)
- MAC Driver → Hardware Abstraction: dispatches
- Hardware Abstraction → Chip MAC: selects
- Hardware Abstraction → Chip PHY: selects
- HCI Wrapper → Host Controller: adapts
- Host Controller → SDIO Interface: transfers over
- Host Controller → USB Interface: transfers over
- Linux Kernel → SmartLink Control: configures wireless
- SmartLink Control → Netlink Core: exchanges commands
- QQ Device Demo → QQ Device SDK API: calls API (evidence: `smartlink/qqlink-lib-mipsel/case/ipcamera/main.c`)
