mirror of https://github.com/OpenIPC/firmware.git
[no ci] Package: update wifibroadcast-ng (#1798)
parent
86fe5451fc
commit
03f094c033
|
@ -2,6 +2,7 @@ wireless:
|
||||||
txpower: 1
|
txpower: 1
|
||||||
channel: 161
|
channel: 161
|
||||||
width: 20
|
width: 20
|
||||||
|
mlink: 1500
|
||||||
broadcast:
|
broadcast:
|
||||||
mcs_index: 2
|
mcs_index: 2
|
||||||
tun_index: 1
|
tun_index: 1
|
||||||
|
|
|
@ -18,8 +18,9 @@ wfb_yaml() {
|
||||||
}
|
}
|
||||||
|
|
||||||
load_config() {
|
load_config() {
|
||||||
|
wfb_yaml /rom"$wfb_cfg"
|
||||||
wfb_yaml "$wfb_cfg"
|
wfb_yaml "$wfb_cfg"
|
||||||
[ ! -e "$wfb_key" ] && wfb_key=/rom/etc/drone.key
|
[ ! -e "$wfb_key" ] && wfb_key=/rom"$wfb_key"
|
||||||
}
|
}
|
||||||
|
|
||||||
load_modules() {
|
load_modules() {
|
||||||
|
@ -48,8 +49,12 @@ load_modules() {
|
||||||
[ -e /sys/class/net/"$wfb_dev" ] && return
|
[ -e /sys/class/net/"$wfb_dev" ] && return
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
[ "$driver" != "88XXau" ] && opts="rtw_tx_pwr_by_rate=2 rtw_tx_pwr_lmt_enable=2"
|
if [ "$driver" != "88XXau" ]; then
|
||||||
modprobe "$driver" "$opts"
|
opt1="rtw_tx_pwr_by_rate=2"
|
||||||
|
opt2="rtw_tx_pwr_lmt_enable=2"
|
||||||
|
fi
|
||||||
|
|
||||||
|
modprobe "$driver" "$opt1" "$opt2"
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
if ! ifconfig "$wfb_dev" up; then
|
if ! ifconfig "$wfb_dev" up; then
|
||||||
|
@ -58,6 +63,16 @@ load_modules() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
load_mlink() {
|
||||||
|
ifconfig "$wfb_dev" mtu "$mlink"
|
||||||
|
|
||||||
|
nalu=$((mlink - 100))
|
||||||
|
if [ "$(cli -g .outgoing.naluSize)" != "$nalu" ]; then
|
||||||
|
cli -s .outgoing.naluSize "$nalu"
|
||||||
|
killall -1 majestic
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
load_interface() {
|
load_interface() {
|
||||||
iw "$wfb_dev" set monitor none
|
iw "$wfb_dev" set monitor none
|
||||||
|
|
||||||
|
@ -126,6 +141,7 @@ video_settings() {
|
||||||
start() {
|
start() {
|
||||||
load_config
|
load_config
|
||||||
load_modules
|
load_modules
|
||||||
|
load_mlink
|
||||||
load_interface
|
load_interface
|
||||||
|
|
||||||
if [ ! -e /etc/system.ok ]; then
|
if [ ! -e /etc/system.ok ]; then
|
||||||
|
@ -155,7 +171,7 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
|
|
||||||
reset)
|
reset)
|
||||||
cp -f /rom/"$wfb_cfg" "$wfb_cfg"
|
cp -f /rom"$wfb_cfg" "$wfb_cfg"
|
||||||
cp -f /rom/etc/majestic.yaml /etc/majestic.yaml
|
cp -f /rom/etc/majestic.yaml /etc/majestic.yaml
|
||||||
video_settings
|
video_settings
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue