summaryrefslogtreecommitdiff
path: root/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/calibrate-wifi.sh
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2013-04-16 17:08:19 -0500
committerMike Fiore <mfiore@multitech.com>2013-04-16 17:08:19 -0500
commit8a9bc528cd4a34a3dfe660c49804b84ab41434c7 (patch)
tree70ba641c27ad160d9023e4348a8d8f5abd1ca89e /multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/calibrate-wifi.sh
parentbd0572e76d7bc9ee9323af567fbdfc0f0cd9e5d7 (diff)
wl12xx-scripts: init, add scripts & recipe, add to corecdp-base-image
Diffstat (limited to 'multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/calibrate-wifi.sh')
-rw-r--r--multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/calibrate-wifi.sh37
1 files changed, 37 insertions, 0 deletions
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
new file mode 100644
index 0000000..21659cd
--- /dev/null
+++ b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/calibrate-wifi.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+if [[ $# -ne 1 ]]; then
+ echo "usage: $0 <wifi-mac-address>"
+ exit 1
+fi
+
+WIFIMAC=$1
+
+set -x
+
+killall hostapd
+killall wpa_supplicant
+
+modprobe -r wl12xx_sdio
+modprobe -r atmel_mci
+
+mts-io-sysfs store wlan-enabled 0
+sleep 1
+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
+
+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
+
+mount -o remount,ro /var/oem