mirror of
https://github.com/qosmio/nss-packages.git
synced 2025-12-16 16:21:53 +00:00
Initial attempt at getting NSS offload working with 4g/5g based IPQ807x/50xx platforms. I don't have a unit to test this on but everything seems to compile after applying a few patches. Ensure you are using the "NSS-12.5-K6.x-wwan" branch in your `feeds.conf` ``` src-git nss_packages https://github.com/qosmio/nss-packages.git;NSS-12.5-K6.x-wwan ``` Then install all packages ``` ./scripts/feeds install -p nss_packages -a ``` Ensure you select the modules: ``` kmod-pcie_mhi kmod-qmi_wwan_q ``` Work was derived from `https://github.com/coolsnowwolf/lede` and `https://git.codelinaro.org/clo/qsdk/platform/vendor/qcom/opensource/qsdk/datarmnet` Signed-off-by: Sean Khan <datapronix@protonmail.com>
62 lines
1.4 KiB
Bash
62 lines
1.4 KiB
Bash
#!/bin/sh
|
|
# Copyright (c) 2019 Qualcomm Technologies, Inc.
|
|
# All Rights Reserved.
|
|
# Confidential and Proprietary - Qualcomm Technologies, Inc.
|
|
|
|
|
|
[ -z "$1" ] && echo "Error: should be run by rmnet" && exit 1
|
|
[ -z "$2" ] && echo "Error: should be run by rmnet" && exit 1
|
|
|
|
. /lib/functions.sh
|
|
. /lib/functions/network.sh
|
|
. /lib/netifd/netifd-proto.sh
|
|
|
|
setup_interface() {
|
|
INTERFACE=$1
|
|
CONFIG=/tmp/rmnet_$2_ipv6config
|
|
logger "rmnet setup_interface $1 $2 here"
|
|
#Fetch information from lower.
|
|
[ -f ${CONFIG} ] || {
|
|
proto_notify_error "$INTERFACE" "RMNET data call NOT ready"
|
|
proto_block_restart "$INTERFACE"
|
|
return
|
|
}
|
|
. ${CONFIG}
|
|
ADDRESSES=$PUBLIC_IP
|
|
interface=$IFNAME
|
|
#Send the information to the netifd
|
|
proto_init_update "$interface" 1 1
|
|
|
|
#ip and subnet
|
|
proto_add_ipv6_address "${PUBLIC_IP}" "128"
|
|
proto_add_ipv6_prefix "${PUBLIC_IP}/${PrefixLength}"
|
|
|
|
#router format should be separated by space
|
|
proto_add_ipv6_route "$GATEWAY" 128
|
|
proto_add_ipv6_route "::0" 0 "$GATEWAY" "" "" "${PUBLIC_IP}/${PrefixLength}"
|
|
|
|
#dns information tell the netifd.
|
|
for dns in $DNSSERVERS; do
|
|
proto_add_dns_server "$dns"
|
|
done
|
|
|
|
#Domain information tell the netifd
|
|
for domain in $domain; do
|
|
proto_add_dns_search "$domain"
|
|
done
|
|
|
|
#proto_add_data
|
|
[ -n "$ZONE" ] && json_add_string zone "$ZONE"
|
|
proto_close_data
|
|
|
|
proto_send_update "$INTERFACE"
|
|
}
|
|
|
|
case "$1" in
|
|
renew|bound)
|
|
setup_interface $2 $3
|
|
;;
|
|
esac
|
|
|
|
exit 0
|