summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2013-04-18 09:20:03 -0500
committerMike Fiore <mfiore@multitech.com>2013-04-18 09:20:03 -0500
commitee187f293bd6fcab1d2309d71d7ceacd7e8924a6 (patch)
tree45c7675a8e824fde1969961335cd1133f5256cdd
parent108cea7b2f58b386f9ae836d5cf5b513817cf969 (diff)
wl12xx-scripts: update enable and calibrate scripts
-rw-r--r--multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mt100eocg-pcie-dk/calibrate-wifi.sh15
-rw-r--r--multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mt100eocg-pcie-dk/enable-wifi.sh23
-rw-r--r--multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/calibrate-wifi.sh11
-rw-r--r--multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/enable-wifi.sh21
4 files changed, 45 insertions, 25 deletions
diff --git a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mt100eocg-pcie-dk/calibrate-wifi.sh b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mt100eocg-pcie-dk/calibrate-wifi.sh
index b16467e..2ea1c1d 100644
--- a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mt100eocg-pcie-dk/calibrate-wifi.sh
+++ b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mt100eocg-pcie-dk/calibrate-wifi.sh
@@ -6,6 +6,11 @@ if [[ $# -ne 1 ]]; then
fi
WIFIMAC=$1
+OEM_DIR="/var/oem"
+NVS_DIR="mts"
+NVS_OEM_FILE="$OEM_DIR/$NVS_DIR/wl1271-nvs.bin"
+NVS_FILE="/lib/firmware/ti-connectivity/wl1271-nvs.bin"
+NVS_DEFAULT_FILE="$NVS_FILE.factory"
set -x
@@ -13,7 +18,7 @@ killall hostapd
killall wpa_supplicant
modprobe -r wl12xx_sdio
-modprobe -r at91_mci
+modprobe -r atmel_mci
mts-io-sysfs store wlan-enabled 0
sleep 1
@@ -21,17 +26,15 @@ mts-io-sysfs store wlan-enabled 1
sleep 1
mount -o remount,rw /var/oem
-rm -f /var/oem/mts/wl1271-nvs.bin
-ln -f -s /var/oem/mts/wl1271-nvs.bin /lib/firmware/ti-connectivity/wl1271-nvs.bin
+rm -f $NVS_OEM_FILE
-modprobe at91_mci
+modprobe atmel_mci
sleep 1
rmmod wl12xx_sdio
calibrator plt autocalibrate wlan0 \
/lib/modules/2.6.39.4/updates/drivers/net/wireless/wl12xx/wl12xx_sdio.ko \
/usr/share/ti/wifi-utils/ini_files/127x/TQS_S_2.6.ini \
- /lib/firmware/ti-connectivity/wl1271-nvs.bin \
- $WIFIMAC
+ $NVS_FILE $WIFIMAC
mount -o remount,ro /var/oem
diff --git a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mt100eocg-pcie-dk/enable-wifi.sh b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mt100eocg-pcie-dk/enable-wifi.sh
index ee128a3..9c5aaf2 100644
--- a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mt100eocg-pcie-dk/enable-wifi.sh
+++ b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mt100eocg-pcie-dk/enable-wifi.sh
@@ -1,23 +1,30 @@
#!/bin/bash
-NVS_FILE="/var/oem/mts/wl1271-nvs.bin"
-NVS_DEFAULT_FILE="/lib/firmware/ti-connectivity/wl1271-nvs.bin.factory"
+OEM_DIR="/var/oem"
+NVS_DIR="mts"
+NVS_OEM_FILE="$OEM_DIR/$NVS_DIR/wl1271-nvs.bin"
+NVS_FILE="/lib/firmware/ti-connectivity/wl1271-nvs.bin"
+NVS_DEFAULT_FILE="$NVS_FILE.factory"
echo "wl12xx: enabling wifi"
set -x
-# make sure nvs file exists
-if [[ ! -f $NVS_FILE ]]; then
- mount -o remount,rw /var/oem
- cp $NVS_DEFAULT_FILE $NVS_FILE
- mount -o remount,ro /var/oem
+# make sure nvs file exists in /var/oem/mts/
+if [[ ! -f $NVS_OEM_FILE ]]; then
+ mount -o remount,rw $OEM_DIR
+ mkdir -p $OEM_DIR/$NVS_DIR
+ cp $NVS_DEFAULT_FILE $NVS_OEM_FILE
+ mount -o remount,ro $OEM_DIR
fi
+# make sure nvs file exists in /lib/firmware/ti-connectivity/
+ln -fs $NVS_OEM_FILE $NVS_FILE
+
# probe wifi chip
mts-io-sysfs store wlan-enabled 0
usleep 50000
mts-io-sysfs store wlan-enabled 1
sleep 1
-modprobe at91_mci
+modprobe atmel_mci
sleep 3
diff --git a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/calibrate-wifi.sh b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/calibrate-wifi.sh
index 21659cd..2ea1c1d 100644
--- a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/calibrate-wifi.sh
+++ b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/calibrate-wifi.sh
@@ -6,6 +6,11 @@ if [[ $# -ne 1 ]]; then
fi
WIFIMAC=$1
+OEM_DIR="/var/oem"
+NVS_DIR="mts"
+NVS_OEM_FILE="$OEM_DIR/$NVS_DIR/wl1271-nvs.bin"
+NVS_FILE="/lib/firmware/ti-connectivity/wl1271-nvs.bin"
+NVS_DEFAULT_FILE="$NVS_FILE.factory"
set -x
@@ -21,8 +26,7 @@ mts-io-sysfs store wlan-enabled 1
sleep 1
mount -o remount,rw /var/oem
-rm -f /var/oem/mts/wl1271-nvs.bin
-ln -f -s /var/oem/mts/wl1271-nvs.bin /lib/firmware/ti-connectivity/wl1271-nvs.bin
+rm -f $NVS_OEM_FILE
modprobe atmel_mci
sleep 1
@@ -31,7 +35,6 @@ rmmod wl12xx_sdio
calibrator plt autocalibrate wlan0 \
/lib/modules/2.6.39.4/updates/drivers/net/wireless/wl12xx/wl12xx_sdio.ko \
/usr/share/ti/wifi-utils/ini_files/127x/TQS_S_2.6.ini \
- /lib/firmware/ti-connectivity/wl1271-nvs.bin \
- $WIFIMAC
+ $NVS_FILE $WIFIMAC
mount -o remount,ro /var/oem
diff --git a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/enable-wifi.sh b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/enable-wifi.sh
index 6fb1e85..9c5aaf2 100644
--- a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/enable-wifi.sh
+++ b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/enable-wifi.sh
@@ -1,19 +1,26 @@
#!/bin/bash
-NVS_FILE="/var/oem/mts/wl1271-nvs.bin"
-NVS_DEFAULT_FILE="/lib/firmware/ti-connectivity/wl1271-nvs.bin.factory"
+OEM_DIR="/var/oem"
+NVS_DIR="mts"
+NVS_OEM_FILE="$OEM_DIR/$NVS_DIR/wl1271-nvs.bin"
+NVS_FILE="/lib/firmware/ti-connectivity/wl1271-nvs.bin"
+NVS_DEFAULT_FILE="$NVS_FILE.factory"
echo "wl12xx: enabling wifi"
set -x
-# make sure nvs file exists
-if [[ ! -f $NVS_FILE ]]; then
- mount -o remount,rw /var/oem
- cp $NVS_DEFAULT_FILE $NVS_FILE
- mount -o remount,ro /var/oem
+# make sure nvs file exists in /var/oem/mts/
+if [[ ! -f $NVS_OEM_FILE ]]; then
+ mount -o remount,rw $OEM_DIR
+ mkdir -p $OEM_DIR/$NVS_DIR
+ cp $NVS_DEFAULT_FILE $NVS_OEM_FILE
+ mount -o remount,ro $OEM_DIR
fi
+# make sure nvs file exists in /lib/firmware/ti-connectivity/
+ln -fs $NVS_OEM_FILE $NVS_FILE
+
# probe wifi chip
mts-io-sysfs store wlan-enabled 0
usleep 50000