mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 21:24:31 +04:00
modemmanager: move initial eps settings after modem enable
This settings are needed before any other mmcli command is executed. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
committed by
Florian Eckert
parent
b6664ae938
commit
9f35173639
@@ -583,6 +583,48 @@ proto_modemmanager_setup() {
|
||||
return 1
|
||||
}
|
||||
|
||||
# set initial eps bearer settings
|
||||
[ -z "${init_epsbearer}" ] || {
|
||||
case "$init_epsbearer" in
|
||||
"none")
|
||||
connectargs=""
|
||||
modemmanager_init_epsbearer "none" \
|
||||
"$device" "${connectargs}" "$apn"
|
||||
;;
|
||||
"default")
|
||||
cliauth=""
|
||||
for auth in $allowedauth; do
|
||||
cliauth="${cliauth}${cliauth:+|}$auth"
|
||||
done
|
||||
connectargs=""
|
||||
append_param "apn=${apn}"
|
||||
append_param "${iptype:+ip-type=${iptype}}"
|
||||
append_param "${cliauth:+allowed-auth=${cliauth}}"
|
||||
append_param "${username:+user=${username}}"
|
||||
append_param "${password:+password=${password}}"
|
||||
modemmanager_init_epsbearer "default" \
|
||||
"$device" "${connectargs}" "$apn"
|
||||
;;
|
||||
"custom")
|
||||
cliauth=""
|
||||
for auth in $init_allowedauth; do
|
||||
cliauth="${cliauth}${cliauth:+|}$auth"
|
||||
done
|
||||
connectargs=""
|
||||
append_param "apn=${init_apn}"
|
||||
append_param "${init_iptype:+ip-type=${init_iptype}}"
|
||||
append_param "${cliauth:+allowed-auth=${cliauth}}"
|
||||
append_param "${init_username:+user=${init_username}}"
|
||||
append_param "${init_password:+password=${init_password}}"
|
||||
modemmanager_init_epsbearer "custom" \
|
||||
"$device" "${connectargs}" "$init_apn"
|
||||
;;
|
||||
esac
|
||||
# check error for init_epsbearer function call
|
||||
[ "$?" -ne "0" ] && return 1
|
||||
}
|
||||
|
||||
|
||||
[ -z "${plmn}" ] || {
|
||||
echo "starting network registraion with plmn '${plmn}'..."
|
||||
mmcli --modem="${device}" \
|
||||
@@ -629,47 +671,6 @@ proto_modemmanager_setup() {
|
||||
[ "$?" -ne "0" ] && return 1
|
||||
fi
|
||||
|
||||
# set initial eps bearer settings
|
||||
[ -z "${init_epsbearer}" ] || {
|
||||
case "$init_epsbearer" in
|
||||
"none")
|
||||
connectargs=""
|
||||
modemmanager_init_epsbearer "none" \
|
||||
"$device" "${connectargs}" "$apn"
|
||||
;;
|
||||
"default")
|
||||
cliauth=""
|
||||
for auth in $allowedauth; do
|
||||
cliauth="${cliauth}${cliauth:+|}$auth"
|
||||
done
|
||||
connectargs=""
|
||||
append_param "apn=${apn}"
|
||||
append_param "${iptype:+ip-type=${iptype}}"
|
||||
append_param "${cliauth:+allowed-auth=${cliauth}}"
|
||||
append_param "${username:+user=${username}}"
|
||||
append_param "${password:+password=${password}}"
|
||||
modemmanager_init_epsbearer "default" \
|
||||
"$device" "${connectargs}" "$apn"
|
||||
;;
|
||||
"custom")
|
||||
cliauth=""
|
||||
for auth in $init_allowedauth; do
|
||||
cliauth="${cliauth}${cliauth:+|}$auth"
|
||||
done
|
||||
connectargs=""
|
||||
append_param "apn=${init_apn}"
|
||||
append_param "${init_iptype:+ip-type=${init_iptype}}"
|
||||
append_param "${cliauth:+allowed-auth=${cliauth}}"
|
||||
append_param "${init_username:+user=${init_username}}"
|
||||
append_param "${init_password:+password=${init_password}}"
|
||||
modemmanager_init_epsbearer "custom" \
|
||||
"$device" "${connectargs}" "$init_apn"
|
||||
;;
|
||||
esac
|
||||
# check error for init_epsbearer function call
|
||||
[ "$?" -ne "0" ] && return 1
|
||||
}
|
||||
|
||||
# setup connect args; APN mandatory (even if it may be empty)
|
||||
echo "starting connection with apn '${apn}'..."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user