mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2026-01-27 02:22:14 +00:00
81a358f52ef121b97b822b0e5ff4704a445d789f
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>
OpenWiFi AP NOS
OpenWrt-based access point network operating system (AP NOS) for TIP OpenWiFi. Read more at openwifi.tip.build.
Building
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):
sudo apt install build-essential libncurses5-dev gawk git libssl-dev gettext zlib1g-dev swig unzip time rsync python3 python3-setuptools python3-yaml
Doing a native build on Linux
Use ./build.sh <target>, or follow the manual steps below:
- Clone and set up the tree. This will create an
openwrt/directory.
./setup.py --setup # for subsequent builds, use --rebase instead
- Select the profile and base package selection. This setup will install the
feeds and packages and generate the
.configfile.
cd openwrt
./scripts/gen_config.py linksys_ea8300
- Build the tree (replace
-j 8with the number of cores to use).
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 branchnext- Integration branchstaging-*- Feature/bug branchesrelease/v#.#.#- Release branches (major.minor.patch)
Repository structure
Build files:
Makefile- Calls Docker environment per targetdock-run.sh- Dockerized build environmentdocker/Dockerfile- Dockerfile for build imagebuild.sh- Build scriptsetup.py- Clone and set up the treeconfig.yml- Specifies OpenWrt version and patches to apply
Directories:
feeds/- OpenWiFi feedspatches/- OpenWiFi patches applied during buildsprofiles/- Per-target kernel configs, packages, and feeds- wifi-ax: Wi-Fi AX packages
- ucentral-ap: uCentral packages
- x64_vm: x86-64 VM image
uCentral packages
AP-NOS packages implementing the uCentral protocol include the following repositories (refer to the 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
Description
Languages
C
85.8%
Shell
4.9%
Makefile
3.8%
Roff
2.8%
UnrealScript
1.3%
Other
1.2%