mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 09:32:34 +00:00
49 lines
1.5 KiB
Bash
Executable File
49 lines
1.5 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
. /lib/functions.sh
|
|
|
|
board=$(board_name)
|
|
|
|
phy_dir="/sys/kernel/debug/ieee80211"
|
|
# Count the number of phyX
|
|
phy_count=$(ls -d $phy_dir/phy* 2>/dev/null | wc -l)
|
|
echo "$phy_count" > /tmp/phy_count
|
|
|
|
case "$board" in
|
|
"edgecore,eap112")
|
|
phy1_file=/sys/kernel/debug/ieee80211/phy1/mt76/sr_enable
|
|
phy2_file=/sys/kernel/debug/ieee80211/phy2/mt76/sr_enable
|
|
|
|
if [ -f "$phy1_file" ]; then
|
|
check_phy1=$(cat $phy1_file)
|
|
[ "$check_phy1" == 0 ] && echo 1 > $phy1_file
|
|
fi
|
|
|
|
if [ -f "$phy2_file" ]; then
|
|
check_phy2=$(cat $phy2_file)
|
|
[ "$check_phy2" == 0 ] && echo 1 > $phy2_file
|
|
fi
|
|
|
|
# note: phy0 is HaLow
|
|
ln -s /sys/kernel/debug/ieee80211/phy1/mt76/sr_scene_cond /tmp/sr_scene_cond_phy2g
|
|
ln -s /sys/kernel/debug/ieee80211/phy2/mt76/sr_scene_cond /tmp/sr_scene_cond_phy5g
|
|
;;
|
|
"edgecore,eap111")
|
|
phy0_file=/sys/kernel/debug/ieee80211/phy0/mt76/sr_enable
|
|
phy1_file=/sys/kernel/debug/ieee80211/phy1/mt76/sr_enable
|
|
|
|
if [ -f "$phy0_file" ]; then
|
|
check_phy0=$(cat $phy0_file)
|
|
[ "$check_phy0" == 0 ] && echo 1 > $phy0_file
|
|
fi
|
|
|
|
if [ -f "$phy1_file" ]; then
|
|
check_phy1=$(cat $phy1_file)
|
|
[ "$check_phy1" == 0 ] && echo 1 > $phy1_file
|
|
fi
|
|
|
|
ln -s /sys/kernel/debug/ieee80211/phy0/mt76/sr_scene_cond /tmp/sr_scene_cond_phy2g
|
|
ln -s /sys/kernel/debug/ieee80211/phy1/mt76/sr_scene_cond /tmp/sr_scene_cond_phy5g
|
|
;;
|
|
esac
|