summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2013-04-15 12:05:07 -0500
committerMike Fiore <mfiore@multitech.com>2013-04-15 12:05:07 -0500
commit1c83b8d28bddcad6e0f72b2d27541e0d0a2f2a87 (patch)
treeb20678e46d229e26b6ef5d1933f5022af7c4f8e1
parent253c2737397220a7b943cb50231b2a67e2f44f6d (diff)
ocg-scripts: added calibrate-wifi script
-rw-r--r--multitech/recipes/ocg-scripts/ocg-scripts-1.0.inc1
-rw-r--r--multitech/recipes/ocg-scripts/ocg-scripts-1.0/calibrate-wifi.sh33
-rw-r--r--multitech/recipes/ocg-scripts/ocg-scripts_1.0.bb5
3 files changed, 37 insertions, 2 deletions
diff --git a/multitech/recipes/ocg-scripts/ocg-scripts-1.0.inc b/multitech/recipes/ocg-scripts/ocg-scripts-1.0.inc
index 46d1cfa..fbecefa 100644
--- a/multitech/recipes/ocg-scripts/ocg-scripts-1.0.inc
+++ b/multitech/recipes/ocg-scripts/ocg-scripts-1.0.inc
@@ -8,4 +8,5 @@ do_install() {
install -m 755 ${WORKDIR}/ocg-wifi-client.sh ${D}${sbindir}
install -m 755 ${WORKDIR}/ocg-wifi-ap.sh ${D}${sbindir}
install -m 755 ${WORKDIR}/ocg-wifi-dhcpd.sh ${D}${sbindir}
+ install -m 755 ${WORKDIR}/calibrate-wifi.sh ${D}${sbindir}
}
diff --git a/multitech/recipes/ocg-scripts/ocg-scripts-1.0/calibrate-wifi.sh b/multitech/recipes/ocg-scripts/ocg-scripts-1.0/calibrate-wifi.sh
new file mode 100644
index 0000000..870da83
--- /dev/null
+++ b/multitech/recipes/ocg-scripts/ocg-scripts-1.0/calibrate-wifi.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+if [[ $# -ne 1 ]]; then
+ echo "usage: $0 <wifi-mac-address>"
+ exit 1
+fi
+
+WIFIMAC=$1
+
+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
+
+rm -f /lib/firmware/ti-connectivity/wl1271-nvs.bin
+
+modprobe atmel_mci
+sleep 1
+rmmod wl12xx_sdio
+
+set -x
+
+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
diff --git a/multitech/recipes/ocg-scripts/ocg-scripts_1.0.bb b/multitech/recipes/ocg-scripts/ocg-scripts_1.0.bb
index bbe9f10..d17d7ba 100644
--- a/multitech/recipes/ocg-scripts/ocg-scripts_1.0.bb
+++ b/multitech/recipes/ocg-scripts/ocg-scripts_1.0.bb
@@ -2,10 +2,11 @@ DESCRIPTION = "Scripts to easily get started with common OCG use cases"
require ocg-scripts-1.0.inc
-PR = "r1"
+PR = "r2"
SRC_URI = "file://ocg-wifi-client.sh \
file://ocg-wifi-ap.sh \
- file://ocg-wifi-dhcpd.sh"
+ file://ocg-wifi-dhcpd.sh \
+ file://calibrate-wifi.sh"
S = "${WORKDIR}/ocg-scripts-${PV}"