Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] - Add Wi-Fi 6 BSS Coloring to udhcpc.user #653

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions openwrt/files/etc/udhcpc.user
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ case "$1" in
"renew"|"bound")
# dump params to tmp so its easier to troubleshoot
set > /tmp/dhcp.params

board = `cat /etc/board.json | jq '.model.id' -r | cut -d',' -f2`

if [ $1 == "bound" ] && [ $board == "e8450-ubi" ] ; then
bss_color = `echo $ip | cut -d'.' -f4 | expr \( $i % 62 \) + 1`
uci_bss_color = `uci -q show wireless.radio1.he_bss_color`

if [ $bss_color != $uci_bss_color ] || [ $? == 1 ]; then
uci set 'wireless.radio1.he_bss_color'=$bss_color
uci commit
wifi reload
fi
fi

radio0=`uci show 'wireless.radio0.channel'|cut -f 2 -d "'"`
radio1=`uci show 'wireless.radio1.channel'|cut -f 2 -d "'"`
if [ ! -z "$opt224" ] || [ ! -z "$opt225" ]; then
Expand Down