Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

wifi: 40 MHz HE/VHT htmodes unusable — validator only accepts HE40±/VHT40±, which OpenWrt 24.10 ignores (silent 20 MHz)

未關閉 適合新手
#344 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
78/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
lua, shell

研究方向

首先閱讀 src/services/hal/types/capability_args.lua 和 src/services/hal/drivers/radio.lua 中的 htmode 允許清單,然後將其與 issue 中描述的 mac80211.sh 比對行為進行比較。找出現有的驗證器測試,並為 HE40 和 VHT40 新增測試涵蓋範圍,以及帶正負號的 40 MHz 變數所選處理方式的測試涵蓋範圍。當驗證能夠接受與 OpenWrt 相容的值,能夠處理或明確拒絕 HE40±/VHT40±,且相關測試全部通過時,此項變更即告完成。

由索引模型根據 Issue 內容生成。

描述

bug

Summary

The radio htmode allow-list accepts HE40+, HE40-, VHT40+, VHT40- and rejects HE40/VHT40. OpenWrt 24.10's mac80211.sh understands HE40/VHT40 (and HT40+/HT40-/HT40), not HE40±/VHT40±. As a result:

  • htmode = HE40 is rejected (radio_args_invalid), and the radio keeps its previous settings.
  • htmode = HE40+ passes validation and is written to uci, but hostapd brings the radio up at 20 MHz, with no error anywhere.

So no HE/VHT radio can run at 40 MHz, and validation gives false confidence.

Where

  • src/services/hal/types/capability_args.lua:527 (RADIO_VALID_HTMODES) and the RadioHtmode alias at :545.
  • src/services/hal/drivers/radio.lua:16 (VALID_HTMODES).

Evidence

bigbox-v1-cm-2, devicecode-lua v0.11.3, OpenWrt 24.10.7. Radio1 (5 GHz) on channel 100, 2026-10-20:

  • htmode = HE40: logread shows LOG wifi warn radio_args_invalid err=htmode must be one of: HE20, HE40+, HE40-, HE80, HE160, HT20, HT40+, HT40-, VHT20, VHT40+, VHT40-, VHT80, VHT160 method=set_channels. uci is unchanged.
  • htmode = HE40+:
    • uci show wireless.radio1 has htmode='HE40+';
    • /var/run/hostapd-phy1.conf has he_oper_chwidth=0 and no 40 MHz ht_capab;
    • hostapd logs DFS-CAC-START freq=5500 chan=100 sec_chan=0, width=0;
    • iw dev reports width: 20 MHz.
  • On the box, /lib/netifd/wireless/mac80211.sh matches htmode with case patterns such as HT40*|VHT40|VHT80|VHT160|HE40|HE80|HE160|EHT40|EHT80|EHT160 (around lines 169, 246 and 749). HE40+ doesn't match any of them.
  • HE80 works (verified).
  • VHT40± is inferred from the same script, not tested on hardware.

Impact

40 MHz operation isn't available for HE/VHT configs, and the fallback to 20 MHz is silent. That matters wherever 80 MHz is too wide, e.g. dense sites or DFS channels.

Suggested fix

  • Accept HE40 and VHT40: OpenWrt chooses the secondary channel itself.
  • Either map HE40±/VHT40± to those values, or reject them with a clear error.
  • Keep HT40±.
  • Add validator tests.

Found while setting up the grand-pipeline Wi-Fi client test (jangala-dev/grand-pipeline#18).

主要語言
Lua
星號
1
分支
0
平均合併
5 天 15 小時
30 天內合併 PR
3

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 沒有貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

jangala-dev/devicecode-lua 的其他 Issue

查看 jangala-dev/devicecode-lua 的全部 Issue

相似的 Issue

更多 Lua Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。