summaryrefslogtreecommitdiff
path: root/recipes-connectivity/hostapd
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2016-11-30 11:25:34 -0600
committerJohn Klug <john.klug@multitech.com>2016-11-30 11:25:34 -0600
commit0c3b276781bf8534f3d57216306457eddb983b6a (patch)
treeee5bbd589794de1a3cbfe90ac34d5c24b2029ef9 /recipes-connectivity/hostapd
parenta9b868c5ffdaf8a8020571a7be61c5c977cba4b4 (diff)
downloadmeta-mlinux-0c3b276781bf8534f3d57216306457eddb983b6a.tar.gz
meta-mlinux-0c3b276781bf8534f3d57216306457eddb983b6a.tar.bz2
meta-mlinux-0c3b276781bf8534f3d57216306457eddb983b6a.zip
Keep hostapd from starting on Conduit 0.0
Diffstat (limited to 'recipes-connectivity/hostapd')
-rw-r--r--recipes-connectivity/hostapd/hostap-daemon-2.4/init.patch35
-rw-r--r--recipes-connectivity/hostapd/hostap-daemon_2.4.bb1
2 files changed, 36 insertions, 0 deletions
diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.4/init.patch b/recipes-connectivity/hostapd/hostap-daemon-2.4/init.patch
new file mode 100644
index 0000000..af5b44b
--- /dev/null
+++ b/recipes-connectivity/hostapd/hostap-daemon-2.4/init.patch
@@ -0,0 +1,35 @@
+diff -uprN old/init new/init
+--- old/init 2016-11-30 10:37:35.512524572 -0600
++++ new/init 2016-11-30 10:35:11.176524877 -0600
+@@ -3,6 +3,21 @@ DAEMON=/usr/sbin/hostapd
+ NAME=hostapd
+ DESC="HOSTAP Daemon"
+ ARGS="/etc/hostapd.conf -B"
++PLTFM="/sys/devices/platform/mts-io"
++PRDIDFILE="${PLTFM}/product-id"
++if ! [[ -f "${PRDIDFILE}" ]] ; then
++ echo "No ${PRDIDFILE}."
++ exit 1
++fi
++PRDID=$(cat "${PLTFM}/product-id")
++CONDUIT="^MTCDT"
++((WIFIBT=1))
++if [[ $PRDID =~ $CONDUIT ]] ; then
++ if ! [[ -f ${PLTFM}/wifi-bt-reset ]] ; then
++ ((WIFIBT=0))
++ fi
++fi
++
+
+ test -f $DAEMON || exit 0
+
+@@ -10,6 +25,9 @@ set -e
+
+ case "$1" in
+ start)
++ if ((WIFIBT == 0)) ; then
++ exit 0
++ fi
+ echo -n "Starting $DESC: "
+ start-stop-daemon -S -x $DAEMON -- $ARGS
+ echo "$NAME."
diff --git a/recipes-connectivity/hostapd/hostap-daemon_2.4.bb b/recipes-connectivity/hostapd/hostap-daemon_2.4.bb
index e64704a..863f895 100644
--- a/recipes-connectivity/hostapd/hostap-daemon_2.4.bb
+++ b/recipes-connectivity/hostapd/hostap-daemon_2.4.bb
@@ -17,6 +17,7 @@ SRC_URI += " \
http://hostap.epitest.fi/releases/hostapd-${PV}.tar.gz \
file://defconfig \
file://init \
+ file://init.patch;patchdir=${WORKDIR} \
"
S = "${WORKDIR}/hostapd-${PV}/hostapd"