BigW Consortium Gitlab

Commit 72e9bc0a by David Clark

Updated the mtwifi init script to not bring down TI WiFi and not

bring up/down the mt6597q driver as legato now does this. Added two new scripts for copying files to the MangOH Red and for configuring the MT7697 networking.
parent 8dc7346f
#!/bin/sh
# Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
#
echo "Update network configuration for MT7697 WiFi..."
if [ -f "/etc/network/interfaces" ]
then
export NET_INTERFACES_BACKUP_FILE=/etc/network/interfaces$(date +"%Y%m%dT%H%M").bak
echo "Backing up current network interfaces -> $NET_INTERFACES_BACKUP_FILE..."
mv /etc/network/interfaces $NET_INTERFACES_BACKUP_FILE
fi
echo "Updating network interfaces..."
cp /tmp/interfaces /etc/network/interfaces
if [ -f "/etc/init.d/mtwifi" ]
then
export WIFI_INIT_BACKUP_FILE=/etc/init.d/mtwifi$(date +"%Y%m%dT%H%M").bak
echo "Backing up current MT7697 WiFi init script -> $WIFI_INIT_BACKUP_FILE..."
mv /etc/init.d/mtwifi $WIFI_INIT_BACKUP_FILE
fi
echo "Updating MT7697 WiFi init script..."
cp /tmp/mtwifi /etc/init.d/mtwifi
chmod +x /etc/init.d/mtwifi
......@@ -7,11 +7,6 @@
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/flash/wifi
mt_wifi_start() {
ifconfig | grep wlan0 >/dev/null
if [ $? -eq 0 ]; then
ifconfig wlan0 down
fi
lsmod | grep 2_mt7697wifi_core >/dev/null
if [ $? -eq 1 ]; then
insmod /legato/systems/current/modules/2-mt7697wifi_core.ko itf_idx_start=$1 || exit 127
......@@ -44,19 +39,7 @@ mt_wifi_stop() {
if [ $? -eq 0 ]; then
rmmod 2_mt7697wifi_core || exit 127
echo "Removed MT7697 80211 core"; exit 127
fi
lsmod | grep mac80211 >/dev/null
if [ $? -eq 0 ]; then
rmmod mac80211 || exit 127
echo "Removed mac80211"; exit 127
fi
lsmod | grep cfg80211 >/dev/null
if [ $? -eq 0 ]; then
rmmod cfg80211 || exit 127
echo "Removed cfg80211"; exit 127
fi
fi
}
case "$1" in
......
#!/bin/sh
# Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
#
echo "Copying setup MT7697 WiFi script to target..."
scp $MANGOH_ROOT/linux_kernel_modules/mt7697wifi/scripts/mt7697_setup_wifi.sh root@192.168.2.2:/tmp/.
echo "Copying network interfaces to target..."
scp $MANGOH_ROOT/linux_kernel_modules/mt7697wifi/scripts/interfaces root@192.168.2.2:/tmp/.
echo "Copying MT7697 ifup/ifdown script to target..."
scp $MANGOH_ROOT/linux_kernel_modules/mt7697wifi/scripts/mtwifi root@192.168.2.2:/tmp/.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment