summaryrefslogtreecommitdiff
path: root/multitech
diff options
context:
space:
mode:
authorJesse Gilles <jgilles@multitech.com>2014-03-03 12:17:33 -0600
committerJesse Gilles <jgilles@multitech.com>2014-03-03 12:17:33 -0600
commit08f6c711e6e0c535738243d88373f759ae068ce2 (patch)
tree1f8344a60ad4f4e43dff8d794f09ebe576f681c0 /multitech
parent1aecb1ed1e0efa0b9952040655a019b4e2e70864 (diff)
parent6e3d4cdcca42bd552e74bc7495ded9ef5d5be9c4 (diff)
Merge branch 'ti-wl1271-r5.sp7.01'
Diffstat (limited to 'multitech')
-rw-r--r--multitech/conf/distro/corecdp.conf4
-rw-r--r--multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0001-compat-wireless-add-pm_runtime_enabled.patch36
-rwxr-xr-xmultitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0001-git-version-use-compat-base-tree.patch29
-rwxr-xr-xmultitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0001-wl12xx-Decrease-number-of-RX-transactions.patch34
-rw-r--r--multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0001-wl12xx-additional-two-members-for-wl12xx_platform_da.patch30
-rwxr-xr-xmultitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0002-wl12xx-Decrease-number-of-TX-transactions.patch139
-rw-r--r--multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/wl12xx-set-power-r5.sp7.01.patch53
-rw-r--r--multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx_r5.sp7.01.bb63
-rw-r--r--multitech/recipes/ti/ti-wifi-utils.inc29
-rw-r--r--multitech/recipes/ti/ti-wifi-utils_r5.sp7.01.bb7
-rw-r--r--multitech/recipes/wl12xx-firmware/wl12xx-firmware_r5.sp7.01.bb37
11 files changed, 461 insertions, 0 deletions
diff --git a/multitech/conf/distro/corecdp.conf b/multitech/conf/distro/corecdp.conf
index c8eec44..c1e1da6 100644
--- a/multitech/conf/distro/corecdp.conf
+++ b/multitech/conf/distro/corecdp.conf
@@ -56,3 +56,7 @@ PREFERRED_PROVIDER_libpcap = "libpcap-nobluetooth"
PREFERRED_VERSION_iw = "0.9.20"
PREFERRED_VERSION_wpa-supplicant = "1.0"
PREFERRED_VERSION_hostap-daemon = "1.0"
+
+PREFERRED_VERSION_wl12xx-firmware = "r5.sp7.01"
+PREFERRED_VERSION_ti-compat-wireless-wl12xx = "r5.sp7.01"
+PREFERRED_VERSION_ti-wifi-utils = "r5.sp7.01"
diff --git a/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0001-compat-wireless-add-pm_runtime_enabled.patch b/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0001-compat-wireless-add-pm_runtime_enabled.patch
new file mode 100644
index 0000000..ba73dd8
--- /dev/null
+++ b/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0001-compat-wireless-add-pm_runtime_enabled.patch
@@ -0,0 +1,36 @@
+From 0f11fd034274c795d9c506faa83a9fa947ba358a Mon Sep 17 00:00:00 2001
+From: Moosa <moosab@ti.com>
+Date: Thu, 3 May 2012 17:37:17 +0300
+Subject: [PATCH] compat-wireless: add pm_runtime_enabled
+
+* Add pm_runtime definition to header file
+
+Upstream-Status: Pending
+
+Signed-off-by: Moosa Baransi <moosab@ti.com>
+---
+ include/linux/compat-2.6.38.h | 9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+diff --git a/include/linux/compat-2.6.38.h b/include/linux/compat-2.6.38.h
+index 63f9dd6..94ee602 100644
+--- a/include/linux/compat-2.6.38.h
++++ b/include/linux/compat-2.6.38.h
+@@ -9,6 +9,15 @@
+ #include <linux/skbuff.h>
+ #include <linux/etherdevice.h>
+
++#ifdef CONFIG_PM_RUNTIME
++static inline bool pm_runtime_enabled(struct device *dev)
++{
++ return !dev->power.disable_depth;
++}
++#else
++ static inline bool pm_runtime_enabled(struct device *dev) { return false; }
++#endif
++
+ /* rename member in struct mmc_host in include/linux/mmc/host.h */
+ #define max_segs max_hw_segs
+
+--
+1.7.1
diff --git a/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0001-git-version-use-compat-base-tree.patch b/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0001-git-version-use-compat-base-tree.patch
new file mode 100755
index 0000000..61fe912
--- /dev/null
+++ b/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0001-git-version-use-compat-base-tree.patch
@@ -0,0 +1,29 @@
+For compat-wireless based builds use compat_base_tree_version in version.h
+When building with compat-wireless mechanism, the version info captured in version.h reflects target kernel and not the wl12xx version.
+Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
+
+diff a/drivers/net/wireless/wl12xx/Makefile b/drivers/net/wireless/wl12xx/Makefile
+
+--- a/drivers/net/wireless/wl12xx/Makefile 2012-08-12 18:18:10.000000000 +0300
++++ b/drivers/net/wireless/wl12xx/Makefile 2012-08-13 13:55:11.000000000 +0300
+@@ -3,12 +3,16 @@
+
+ define filechk_version.h
+ (echo 'static const char *wl12xx_timestamp = __TIMESTAMP__;'; \
+- echo 'static const char *wl12xx_git_head = \
+- "$(shell git describe --dirty)";')
++ echo '#ifdef COMPAT_BASE_TREE_VERSION'; \
++ echo 'static const char *wl12xx_git_head = COMPAT_BASE_TREE_VERSION;'; \
++ echo '#else'; \
++ echo 'static const char *wl12xx_git_head = \
++ "$(shell git describe --dirty)";'; \
++ echo '#endif')
+ endef
+
+-$(obj)/version.h: .git/HEAD .git/index .git/refs/tags
+- @$(call filechk,version.h)
++#$(obj)/version.h: .git/HEAD .git/index .git/refs/tags
++# @$(call filechk,version.h)
+
+ $(obj)/main.c: $(src)/version.h
+
diff --git a/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0001-wl12xx-Decrease-number-of-RX-transactions.patch b/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0001-wl12xx-Decrease-number-of-RX-transactions.patch
new file mode 100755
index 0000000..90aec78
--- /dev/null
+++ b/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0001-wl12xx-Decrease-number-of-RX-transactions.patch
@@ -0,0 +1,34 @@
+From 5cd7de59a61168b784ea7f51c09e64f847e81c92 Mon Sep 17 00:00:00 2001
+From: Ido Yariv <ido@wizery.com>
+Date: Tue, 13 Dec 2011 23:16:01 +0200
+Subject: [PATCH 1/2] wl12xx: Decrease number of RX transactions
+
+On weak platforms, it is crucial to keep the number of SDIO transactions
+to a bare minimum. It is probably more important to keep CPU utilization
+low, than to handle FW events asap.
+
+In order to decrease the number of RX transactions, set the FW to only
+wake up the host when it has at least 4 pending packets. In addition,
+increase the relevant timeout, so the FW could actually reach this
+threshold.
+---
+ drivers/net/wireless/wl12xx/main.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
+index bdb7166..f90b96a 100644
+--- a/drivers/net/wireless/wl12xx/main.c
++++ b/drivers/net/wireless/wl12xx/main.c
+@@ -130,8 +130,8 @@ static struct conf_drv_settings default_conf = {
+ .rts_threshold = IEEE80211_MAX_RTS_THRESHOLD,
+ .rx_cca_threshold = 0,
+ .irq_blk_threshold = 0xFFFF,
+- .irq_pkt_threshold = 0,
+- .irq_timeout = 600,
++ .irq_pkt_threshold = 4,
++ .irq_timeout = 1200,
+ .queue_type = CONF_RX_QUEUE_TYPE_LOW_PRIORITY,
+ },
+ .tx = {
+--
+1.7.7.6
diff --git a/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0001-wl12xx-additional-two-members-for-wl12xx_platform_da.patch b/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0001-wl12xx-additional-two-members-for-wl12xx_platform_da.patch
new file mode 100644
index 0000000..69863cb
--- /dev/null
+++ b/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0001-wl12xx-additional-two-members-for-wl12xx_platform_da.patch
@@ -0,0 +1,30 @@
+From 351a513dabfb55c3aab448613c2b10b7b5788d93 Mon Sep 17 00:00:00 2001
+From: Vita Preskovsky <vitap@ti.com>
+Date: Sun, 1 Jul 2012 11:49:30 +0300
+Subject: [PATCH] wl12xx: additional two members for wl12xx_platform_data
+
+ * Adding bt_enable_gpio and wlan_enable_gpio to wl12xx_platform_data.
+ This is needed in order to align this structure
+ with the one which is part of the linux kernel
+
+
+Signed-off-by: Vita Preskovsky <vitap@ti.com>
+---
+ include/linux/wl12xx.h | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/include/linux/wl12xx.h b/include/linux/wl12xx.h
+index 0d63731..535058e 100644
+--- a/include/linux/wl12xx.h
++++ b/include/linux/wl12xx.h
+@@ -54,6 +54,8 @@ struct wl12xx_platform_data {
+ int board_ref_clock;
+ int board_tcxo_clock;
+ unsigned long platform_quirks;
++ int bt_enable_gpio;
++ int wlan_enable_gpio;
+ bool pwr_in_suspend;
+
+ struct wl1271_if_operations *ops;
+--
+1.7.0.4
diff --git a/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0002-wl12xx-Decrease-number-of-TX-transactions.patch b/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0002-wl12xx-Decrease-number-of-TX-transactions.patch
new file mode 100755
index 0000000..3e2185a
--- /dev/null
+++ b/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/0002-wl12xx-Decrease-number-of-TX-transactions.patch
@@ -0,0 +1,139 @@
+From a7807fffc76117a9d0a40fdcc85b56644e81f34c Mon Sep 17 00:00:00 2001
+From: Eyal Reizer <eyalr@ti.com>
+Date: Tue, 27 Nov 2012 16:05:20 +0200
+Subject: [PATCH] wl12xx: Decrease number of TX transactions
+
+On weak platforms, it is crucial to keep the number of SDIO transactions
+to a bare minimum. It is probably more important to keep CPU utilization
+low, than to handle FW events asap.
+
+In order to decrease the number of TX transactions, don't schedule tx
+work right away for every outgoing packet. Instead, try to wait for a
+short period before scheduling tx work if there aren't enough pending
+packets.
+
+In addition, increase the TX pacing timeout, so the FW will have enough
+free memory blocks for larger transfers.
+
+Adapted from original patch made by Ido Yariv <ido@wizery.com>
+Signed-off-by: Eyal Reizer <eyalr@ti.com>
+---
+ drivers/net/wireless/wl12xx/main.c | 39 ++++++++++++++++++++++++++++++----
+ drivers/net/wireless/wl12xx/wl12xx.h | 3 +++
+ 2 files changed, 38 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
+index c9888f4..a59ac43 100644
+--- a/drivers/net/wireless/wl12xx/main.c
++++ b/drivers/net/wireless/wl12xx/main.c
+@@ -218,8 +218,8 @@ static struct conf_drv_settings default_conf = {
+ },
+ },
+ .frag_threshold = IEEE80211_MAX_FRAG_THRESHOLD,
+- .tx_compl_timeout = 700,
+- .tx_compl_threshold = 4,
++ .tx_compl_timeout = 1500,
++ .tx_compl_threshold = 6,
+ .basic_rate = CONF_HW_BIT_RATE_1MBPS,
+ .basic_rate_5 = CONF_HW_BIT_RATE_6MBPS,
+ .tmpl_short_retry_limit = 10,
+@@ -1199,6 +1199,8 @@ static int wl12xx_irq_locked(struct wl1271 *wl)
+ spin_lock_irqsave(&wl->wl_lock, flags);
+ if (!test_bit(WL1271_FLAG_FW_TX_BUSY, &wl->flags) &&
+ wl1271_tx_total_queue_count(wl) > 0) {
++ hrtimer_try_to_cancel(&wl->tx_timer);
++ clear_bit(WL1271_FLAG_TX_TIMER_SET, &wl->flags);
+ spin_unlock_irqrestore(&wl->wl_lock, flags);
+ /*
+ * In order to avoid starvation of the TX path,
+@@ -2056,6 +2058,9 @@ out:
+ return ret;
+ }
+
++#define TX_PACKETS_THRESHOLD 6
++#define TX_WORK_DELAY_NS (1500 * 1000)
++
+ static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+ {
+ struct wl1271 *wl = hw->priv;
+@@ -2113,14 +2118,37 @@ static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+ * before that, the tx_work will not be initialized!
+ */
+
+- if (!test_bit(WL1271_FLAG_FW_TX_BUSY, &wl->flags) &&
+- !test_bit(WL1271_FLAG_TX_PENDING, &wl->flags))
++ if (test_bit(WL1271_FLAG_FW_TX_BUSY, &wl->flags) ||
++ test_bit(WL1271_FLAG_TX_PENDING, &wl->flags))
++ goto out;
++
++ if (wl1271_tx_total_queue_count(wl) < TX_PACKETS_THRESHOLD) {
++ if (!test_and_set_bit(WL1271_FLAG_TX_TIMER_SET, &wl->flags))
++ hrtimer_start(&wl->tx_timer,
++ ktime_set(0, TX_WORK_DELAY_NS),
++ HRTIMER_MODE_REL);
++ } else {
++ hrtimer_try_to_cancel(&wl->tx_timer);
++ clear_bit(WL1271_FLAG_TX_TIMER_SET, &wl->flags);
+ ieee80211_queue_work(wl->hw, &wl->tx_work);
++ }
+
+ out:
+ spin_unlock_irqrestore(&wl->wl_lock, flags);
+ }
+
++enum hrtimer_restart wl12xx_tx_timer(struct hrtimer *timer)
++{
++ struct wl1271 *wl = container_of(timer, struct wl1271, tx_timer);
++ unsigned long flags;
++
++ spin_lock_irqsave(&wl->wl_lock, flags);
++ clear_bit(WL1271_FLAG_TX_TIMER_SET, &wl->flags);
++ ieee80211_queue_work(wl->hw, &wl->tx_work);
++ spin_unlock_irqrestore(&wl->wl_lock, flags);
++ return HRTIMER_NORESTART;
++}
++
+ int wl1271_tx_dummy_packet(struct wl1271 *wl)
+ {
+ unsigned long flags;
+@@ -2740,6 +2768,7 @@ static void wl1271_op_stop_locked(struct wl1271 *wl)
+ * held while doing so without deadlocking.
+ */
+ wlcore_disable_interrupts_nosync(wl);
++ hrtimer_cancel(&wl->tx_timer);
+ mutex_unlock(&wl->mutex);
+
+ mutex_lock(&wl_list_mutex);
+@@ -6798,6 +6827,8 @@ static struct ieee80211_hw *wl1271_alloc_hw(void)
+ wl->active_sta_count = 0;
+ wl->fwlog_size = 0;
+ init_waitqueue_head(&wl->fwlog_waitq);
++ hrtimer_init(&wl->tx_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
++ wl->tx_timer.function = wl12xx_tx_timer;
+
+ /* The system link is always allocated */
+ __set_bit(WL12XX_SYSTEM_HLID, wl->links_map);
+diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h
+index 9c00dbf..e34f095 100644
+--- a/drivers/net/wireless/wl12xx/wl12xx.h
++++ b/drivers/net/wireless/wl12xx/wl12xx.h
+@@ -275,6 +275,7 @@ enum wl12xx_flags {
+ WL1271_FLAG_VIF_CHANGE_IN_PROGRESS,
+ WL1271_FLAG_INTENDED_FW_RECOVERY,
+ WL1271_FLAG_IO_FAILED,
++ WL1271_FLAG_TX_TIMER_SET,
+ };
+
+ enum wl12xx_vif_flags {
+@@ -594,6 +595,8 @@ struct wl1271 {
+
+ /* Patterns configured with set_rx_filters */
+ struct cfg80211_wowlan *wowlan_patterns;
++
++ struct hrtimer tx_timer;
+ };
+
+ struct wl1271_station {
+--
+1.7.9.5
+
diff --git a/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/wl12xx-set-power-r5.sp7.01.patch b/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/wl12xx-set-power-r5.sp7.01.patch
new file mode 100644
index 0000000..fba5b90
--- /dev/null
+++ b/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx-r5.sp7.01/wl12xx-set-power-r5.sp7.01.patch
@@ -0,0 +1,53 @@
+Index: wl12xx-ol_R5.SP7.01/drivers/net/wireless/wl12xx/sdio.c
+===================================================================
+--- wl12xx-ol_R5.SP7.01.orig/drivers/net/wireless/wl12xx/sdio.c 2013-12-14 23:41:55.000000000 -0600
++++ wl12xx-ol_R5.SP7.01/drivers/net/wireless/wl12xx/sdio.c 2014-02-04 13:26:44.612614307 -0600
+@@ -48,6 +48,7 @@
+ struct wl12xx_sdio_glue {
+ struct device *dev;
+ struct platform_device *core;
++ void (*set_power)(bool enable); // PVK
+ };
+
+ static const struct sdio_device_id wl1271_devices[] __devinitconst = {
+@@ -135,6 +136,10 @@
+ struct sdio_func *func = dev_to_sdio_func(glue->dev);
+ struct mmc_card *card = func->card;
+
++ // MTS: enable chip on power on
++ if (glue->set_power)
++ glue->set_power(1);
++
+ ret = pm_runtime_get_sync(&card->dev);
+ if (ret) {
+ /*
+@@ -163,6 +168,10 @@
+ struct sdio_func *func = dev_to_sdio_func(glue->dev);
+ struct mmc_card *card = func->card;
+
++ // MTS: disable chip on power off
++ if (glue->set_power)
++ glue->set_power(0);
++
+ sdio_claim_host(func);
+ sdio_disable_func(func);
+ sdio_release_host(func);
+@@ -277,6 +286,11 @@
+ dev_err(glue->dev, "can't add platform device\n");
+ goto out_dev_put;
+ }
++
++ // MTS: add set_power to control enable pin
++ if (wlan_data->set_power)
++ glue->set_power = wlan_data->set_power;
++
+ return 0;
+
+ out_dev_put:
+@@ -383,4 +397,4 @@
+ MODULE_FIRMWARE(WL128X_FW_NAME_SINGLE);
+ MODULE_FIRMWARE(WL128X_FW_NAME_MULTI);
+ MODULE_FIRMWARE(WL127X_PLT_FW_NAME);
+-MODULE_FIRMWARE(WL128X_PLT_FW_NAME);
+\ No newline at end of file
++MODULE_FIRMWARE(WL128X_PLT_FW_NAME);
diff --git a/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx_r5.sp7.01.bb b/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx_r5.sp7.01.bb
new file mode 100644
index 0000000..c8a9bd5
--- /dev/null
+++ b/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx_r5.sp7.01.bb
@@ -0,0 +1,63 @@
+# This is a TI specific version of the compat-wireless recipe using a
+# compat-wireless package created from the TI Systems Tested mac80211 releases.
+
+DESCRIPTION = "ti compat-wireless drivers"
+HOMEPAGE = "https://github.com/TI-OpenLink"
+SECTION = "kernel/modules"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=d7810fab7487fb0aad327b76f1be7cd7"
+
+RDEPENDS_${PN} = "wireless-tools"
+
+inherit module
+
+LOCAL_PR = ".1"
+MACHINE_KERNEL_PR_append = "${LOCAL_PR}"
+
+TAG="ol_R5.SP7.01"
+
+S = "${WORKDIR}/compat-wireless-${TAG}"
+
+SRC_URI = "http://www.multitech.net/corecdp/sources/TI-OpenLink.compat-wireless_${TAG}.tar.gz;name=compat-wireless \
+ http://www.multitech.net/corecdp/sources/TI-OpenLink.compat_${TAG}.tar.gz;name=compat \
+ http://www.multitech.net/corecdp/sources/TI-OpenLink.wl12xx_${TAG}.tar.gz;name=wl12xx \
+ file://0001-git-version-use-compat-base-tree.patch;patchdir=../wl12xx-${TAG} \
+ file://0001-compat-wireless-add-pm_runtime_enabled.patch;patchdir=../compat-${TAG} \
+ file://0001-wl12xx-additional-two-members-for-wl12xx_platform_da.patch;patchdir=../wl12xx-${TAG} \
+ "
+
+SRC_URI[compat-wireless.md5sum] = "935fa394ac9ad9d1673808f424b62b03"
+SRC_URI[compat-wireless.sha256sum] = "3481171a67b58b6637675a94701fd23c8716b431b76a9403061afe47fc256604"
+SRC_URI[compat.md5sum] = "9ef6945e22c296008dbdea8a544ec3f3"
+SRC_URI[compat.sha256sum] = "c33b1d73b4e6381d67255174ff37dc1ff2a81594f43903b22c56943437ae4443"
+SRC_URI[wl12xx.md5sum] = "3301da0ab7eeedf5d942d78652b84650"
+SRC_URI[wl12xx.sha256sum] = "98137f9ced94de839abef86eb1cbee068f362bd28c5190449ca15165dcad0ca5"
+
+#SRC_URI_append = "file://0001-wl12xx-Decrease-number-of-RX-transactions.patch;patchdir=../wl12xx-${TAG} \
+# file://0002-wl12xx-Decrease-number-of-TX-transactions.patch;patchdir=../wl12xx-${TAG} \
+#"
+
+# mts patches
+SRC_URI_append = "file://wl12xx-set-power-r5.sp7.01.patch;patchdir=../wl12xx-${TAG}"
+
+EXTRA_OEMAKE = "KLIB_BUILD=${STAGING_KERNEL_DIR} KLIB=${D}"
+
+do_configure() {
+ cd ${S}
+ GIT_TREE="${WORKDIR}/wl12xx-${TAG}" GIT_COMPAT_TREE="${WORKDIR}/compat-${TAG}" ./scripts/admin-refresh.sh
+
+ # create versions manually since we aren't working in git repos so admin-refresh.sh doesn't set them
+ echo -e "${TAG}" > compat_version
+ echo -e "${TAG}" > compat_base_tree_version
+ echo "" > compat_base_tree
+
+ ./scripts/driver-select wl12xx
+}
+
+do_configure_append() {
+ sed -i "s#@./scripts/update-initramfs## " Makefile
+}
+
+do_install() {
+ oe_runmake DEPMOD=echo DESTDIR="${D}" INSTALL_MOD_PATH="${D}" LDFLAGS="" install-modules
+}
diff --git a/multitech/recipes/ti/ti-wifi-utils.inc b/multitech/recipes/ti/ti-wifi-utils.inc
new file mode 100644
index 0000000..cdb3746
--- /dev/null
+++ b/multitech/recipes/ti/ti-wifi-utils.inc
@@ -0,0 +1,29 @@
+DESCRIPTION = "The calibrator and other useful utilities for TI wireless solution based on wl12xx driver"
+LICENSE = "BSD"
+
+DEPENDS = "libnl"
+RDEPENDS_${PN} = "ti-compat-wireless-wl12xx wl12xx-firmware"
+
+PR ="r1"
+
+SRC_URI = "git://github.com/TI-OpenLink/ti-utils.git;protocol=git"
+
+S = "${WORKDIR}/git"
+
+export CROSS_COMPILE = "${TARGET_PREFIX}"
+CFLAGS += " -DCONFIG_LIBNL20"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -d ${D}${datadir}/ti/wifi-utils/ini_files/127x
+ install -d ${D}${datadir}/ti/wifi-utils/ini_files/128x
+
+ install -m 0755 calibrator ${D}${bindir}/
+ install -m 0755 ${S}/hw/ini_files/127x/* ${D}${datadir}/ti/wifi-utils/ini_files/127x
+ install -m 0755 ${S}/hw/ini_files/128x/* ${D}${datadir}/ti/wifi-utils/ini_files/128x
+}
+
+FILES_${PN} += " \
+ ${datadir}/ti/wifi-utils/ini_files/127x \
+ ${datadir}/ti/wifi-utils/ini_files/128x \
+"
diff --git a/multitech/recipes/ti/ti-wifi-utils_r5.sp7.01.bb b/multitech/recipes/ti/ti-wifi-utils_r5.sp7.01.bb
new file mode 100644
index 0000000..a1768a6
--- /dev/null
+++ b/multitech/recipes/ti/ti-wifi-utils_r5.sp7.01.bb
@@ -0,0 +1,7 @@
+require ti-wifi-utils.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4725015cb0be7be389cf06deeae3683d"
+
+PR_append ="c+gitr${SRCPV}"
+
+SRCREV = "ol_R5.SP7.01"
diff --git a/multitech/recipes/wl12xx-firmware/wl12xx-firmware_r5.sp7.01.bb b/multitech/recipes/wl12xx-firmware/wl12xx-firmware_r5.sp7.01.bb
new file mode 100644
index 0000000..42c718a
--- /dev/null
+++ b/multitech/recipes/wl12xx-firmware/wl12xx-firmware_r5.sp7.01.bb
@@ -0,0 +1,37 @@
+DESCRIPTION = "TI wl1271 firmware"
+HOMEPAGE = "http://processors.wiki.ti.com/index.php/ARM_Processor_Open_Source_Wireless_Connectivity"
+PR="r1"
+
+# bluetooth firmware from TI wiki:
+# http://processors.wiki.ti.com/index.php/OMAP_Wireless_Connectivity_BTS_files_overview
+# http://processors.wiki.ti.com/images/a/a2/BTS_files_v1.zip
+
+# wifi firmware from TI-OpenLink on github.com
+# git://github.com/TI-OpenLink/ti-utils.git
+
+SRCREV = "ol_R5.SP7.01"
+
+SRC_URI = "git://github.com/TI-OpenLink/ti-utils.git \
+ file://bluetooth/3M/WL127xL_BT_Service_Pack_2.4.bts \
+ "
+
+S = "${WORKDIR}/git"
+
+# nothing to compile
+do_configure() {
+}
+do_compile() {
+}
+
+do_install() {
+ install -d ${D}/lib/firmware
+ install -d ${D}/lib/firmware/ti-connectivity
+ # wifi firmware
+ install ${S}/hw/firmware/wl127*-fw-*.bin ${D}/lib/firmware/ti-connectivity
+ # factory nvs file
+ install ${S}/hw/firmware/wl1271-nvs.bin ${D}/lib/firmware/ti-connectivity/wl1271-nvs.bin.factory
+ # bluetooth firmware
+ install ${WORKDIR}/bluetooth/3M/WL127xL_BT_Service_Pack_2.4.bts ${D}/lib/firmware/TIInit_7.6.15.bts
+}
+
+FILES_${PN} = "/lib/firmware"