diff --git a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros.bb b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros.bb index b08466143..1098f0277 100644 --- a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros.bb +++ b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros.bb @@ -20,7 +20,8 @@ SRC_URI_external = "${DIGI_GITHUB_GIT}/atheros.git;protocol=git;nobranch=1" SRC_URI_internal = "${DIGI_GIT}linux-modules/atheros.git;protocol=git;nobranch=1" SRC_URI = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRC_URI_internal}', '${SRC_URI_external}', d)}" SRC_URI += " \ - file://atheros \ + file://atheros-pre-up \ + file://atheros-post-down \ file://Makefile \ ${@base_conditional('IS_KERNEL_2X', '1' , '', 'file://0001-atheros-convert-NLA_PUT-macros.patch', d)} \ ${@base_conditional('IS_KERNEL_2X', '1' , '', 'file://0002-atheros-update-renamed-struct-members.patch', d)} \ @@ -42,8 +43,9 @@ do_configure_prepend_ccimx6() { } do_install_append() { - install -d ${D}${sysconfdir}/network/if-pre-up.d - install -m 0755 ${WORKDIR}/atheros ${D}${sysconfdir}/network/if-pre-up.d/ + install -d ${D}${sysconfdir}/network/if-pre-up.d ${D}${sysconfdir}/network/if-post-down.d + install -m 0755 ${WORKDIR}/atheros-pre-up ${D}${sysconfdir}/network/if-pre-up.d/atheros + install -m 0755 ${WORKDIR}/atheros-post-down ${D}${sysconfdir}/network/if-post-down.d/atheros install -d ${D}${sysconfdir}/modprobe.d cat >> ${D}${sysconfdir}/modprobe.d/atheros.conf <<-_EOF_ install ath6kl_sdio true diff --git a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/atheros-post-down b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/atheros-post-down new file mode 100644 index 000000000..97a776550 --- /dev/null +++ b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/atheros-post-down @@ -0,0 +1,24 @@ +#!/bin/sh +#=============================================================================== +# +# atheros-post-down +# +# Copyright (C) 2014 by Digi International Inc. +# All rights reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 as published by +# the Free Software Foundation. +# +# +# !Description: Unload Atheros' wireless driver +# +#=============================================================================== + +set -e + +[ "${IFACE}" != "wlan0" ] && exit 0 + +if grep -qs ath6kl_sdio /proc/modules; then + rmmod ath6kl_sdio > /dev/null +fi diff --git a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/atheros b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/atheros-pre-up similarity index 100% rename from meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/atheros rename to meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/atheros-pre-up diff --git a/meta-digi-dey/recipes-core/busybox/busybox/suspend b/meta-digi-dey/recipes-core/busybox/busybox/suspend index 756187fd0..3a581e301 100755 --- a/meta-digi-dey/recipes-core/busybox/busybox/suspend +++ b/meta-digi-dey/recipes-core/busybox/busybox/suspend @@ -36,10 +36,8 @@ suspend_interfaces() { # has problems on suspend-resume, so we workaround it by bringing the # interface down before suspend and bring it up again after resume. # (#35777, #40082) - if grep -qs 'wlan0' /proc/net/dev; then - if grep -qs '^wlan0' /var/run/ifstate; then - ifdown wlan0 && up_wlan_on_resume="1" - fi + if grep -qs '^wlan0' /var/run/ifstate; then + ifdown wlan0 && up_wlan_on_resume="1" fi } @@ -48,10 +46,8 @@ resume_interfaces() { # has problems on suspend-resume, so we workaround it by bringing the # interface down before suspend and bring it up again after resume. # (#35777, #40082) - if grep -qs 'wlan0' /proc/net/dev; then - if ! grep -qs '^wlan0' /var/run/ifstate; then - [ -n "${up_wlan_on_resume}" ] && ifup wlan0 - fi + if ! grep -qs '^wlan0' /var/run/ifstate; then + [ -n "${up_wlan_on_resume}" ] && ifup wlan0 fi }