From d8a24e0ce312f1d45dc2f389ed1cf0aa70bc8052 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Tue, 13 Jan 2015 12:14:39 +0100 Subject: [PATCH] atheros: don't remove wireless module on ifdown for ccardimx28 A post-down script was unloading the Atheros wireless driver when the network interfaces were brought down. On rare occasions the 'rmmod' command was not able to complete and may leave the system in an unexpected state. This patch removes the post-down script for the ccardimx28 platform and leaves it only for the ccimx6 platform, where the unloading is wanted to reset the driver after suspend. Signed-off-by: Hector Palacios https://jira.digi.com/browse/DEL-1314 --- .../kernel-module-atheros.bb | 16 +++++++++++----- .../{ => ccimx6}/atheros-post-down | 0 2 files changed, 11 insertions(+), 5 deletions(-) rename meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/{ => ccimx6}/atheros-post-down (100%) 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 1098f0277..13fc0d07b 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 @@ -21,14 +21,16 @@ 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-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)} \ " -# MX6 wireless calibration file -SRC_URI_append_ccimx6 = " file://Digi_6203-6233-US.bin" +# MX6 wireless calibration file and post-down script +SRC_URI_append_ccimx6 = " \ + file://Digi_6203-6233-US.bin \ + file://atheros-post-down \ +" S = "${WORKDIR}/git" @@ -43,9 +45,8 @@ do_configure_prepend_ccimx6() { } do_install_append() { - install -d ${D}${sysconfdir}/network/if-pre-up.d ${D}${sysconfdir}/network/if-post-down.d + install -d ${D}${sysconfdir}/network/if-pre-up.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 @@ -53,6 +54,11 @@ do_install_append() { _EOF_ } +do_install_append_ccimx6() { + install -d ${D}${sysconfdir}/network/if-post-down.d + install -m 0755 ${WORKDIR}/atheros-post-down ${D}${sysconfdir}/network/if-post-down.d/atheros +} + FILES_${PN} += " \ ${base_libdir}/firmware/ \ ${sysconfdir}/modprobe.d/ \ 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/ccimx6/atheros-post-down similarity index 100% rename from meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/atheros-post-down rename to meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/ccimx6/atheros-post-down