ponmngr: airoha: procdify airoha pon init and add IOPG prefix to sn

This commit is contained in:
Sukru Senli 2022-08-12 15:05:25 +02:00
parent e62792d397
commit 30bb56e9bf
3 changed files with 12 additions and 8 deletions

View file

@ -3,12 +3,17 @@
. /lib/functions.sh
init_xpon() {
# For now use the base mac address as the omci serial number
/userfs/bin/omcicfgCmd set sn $(fw_printenv -n ethaddr | tr -d ':' | tr 'a-z' 'A-Z')
macaddr="$(fw_printenv -n ethaddr | tr -d ':' | tr 'a-z' 'A-Z')"
/userfs/bin/ponmgr_cfg &
sleep 1
/userfs/bin/omci &
# For now use IOPG + last 8 digits of the base mac address as the omci serial number
/userfs/bin/omcicfgCmd set sn IOPG${macaddr:4:8}
procd_open_instance ponmgr_cfg
procd_set_param command /userfs/bin/ponmgr_cfg
procd_close_instance
procd_open_instance omci
procd_set_param command /userfs/bin/omci
procd_close_instance
}
deinit_xpon() {

View file

@ -9,10 +9,11 @@ init_xpon() {
procd_open_instance pon_daemon
procd_set_param command omcid start -n
procd_close_instance
}
deinit_xpon() {
# stopping omcid does not bring down the pon link, which should happen
# if ANI is disabled or stopped (go to O1)
gponctl stop
}

View file

@ -15,8 +15,6 @@ start_service() {
}
stop_service() {
# stopping omcid does not bring down the pon link, which should happen
# if ANI is disabled or stopped (go to O1)
deinit_xpon
}