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 20e4f2129..d7f6c0c36 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 @@ -26,6 +26,8 @@ SRC_URI += " \ # MX6 wireless calibration file and post-down script SRC_URI_append_ccimx6 = " \ + file://Digi_6203_2_ANT-US.bin \ + file://Digi_6203_2_ANT-World.bin \ file://Digi_6203-6233-US.bin \ file://atheros-post-down \ " @@ -38,10 +40,6 @@ do_configure_prepend() { cp ${WORKDIR}/Makefile ${S}/ } -do_configure_prepend_ccimx6() { - cp ${WORKDIR}/Digi_6203-6233-US.bin ${S}/Firmware_Package/target/AR6003/hw2.1.1/ -} - do_install_append() { install -d ${D}${sysconfdir}/network/if-pre-up.d install -m 0755 ${WORKDIR}/atheros-pre-up ${D}${sysconfdir}/network/if-pre-up.d/atheros @@ -55,6 +53,11 @@ do_install_append() { 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 + install -m 0644 \ + ${WORKDIR}/Digi_6203_2_ANT-US.bin \ + ${WORKDIR}/Digi_6203_2_ANT-World.bin \ + ${WORKDIR}/Digi_6203-6233-US.bin \ + ${D}/lib/firmware/ath6k/AR6003/hw2.1.1/ } FILES_${PN} += " \ diff --git a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/atheros-pre-up b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/atheros-pre-up index 3323f89fd..6685d7dab 100644 --- a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/atheros-pre-up +++ b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/atheros-pre-up @@ -88,16 +88,27 @@ rm -f ${TMP_MACFILE} # MACHINE="$(cat /proc/device-tree/digi,machine,name 2>/dev/null || \ cat /sys/kernel/machine/name)" +MOD_VARIANT="$(cat /proc/device-tree/digi,hwid,variant 2>/dev/null)" REGION_CODE="$(cat /proc/device-tree/digi,hwid,cert 2>/dev/null || \ cat /sys/kernel/${MACHINE}/mod_cert)" + +# 'ccimx6sbc' variants 0x05, 0x07 and 0x0a do not have bluetooth +# and use a different calibration file US_CODE="0x0" -BDATA_SOURCE="Digi_6203-6233-World.bin" -if [ -n "${REGION_CODE}" -a "${US_CODE}" = "${REGION_CODE}" ]; then - BDATA_SOURCE="Digi_6203-6233-US.bin" - logger -t atheros "Setting US wireless region." -else - logger -t atheros "Setting non-US (world) wireless region." -fi +case "${MACHINE}:${MOD_VARIANT}:${REGION_CODE}" in + ccimx6sbc:0x05:${US_CODE}|ccimx6sbc:0x07:${US_CODE}|ccimx6sbc:0x0a:${US_CODE}) + BDATA_SOURCE="Digi_6203_2_ANT-US.bin" + logger -t atheros "Setting US wireless region (no bluetooth)";; + ccimx6sbc:0x05:*|ccimx6sbc:0x07:*|ccimx6sbc:0x0a:*) + BDATA_SOURCE="Digi_6203_2_ANT-World.bin" + logger -t atheros "Setting non-US (world) wireless region (no bluetooth)";; + *:*:${US_CODE}) + BDATA_SOURCE="Digi_6203-6233-US.bin" + logger -t atheros "Setting US wireless region";; + *:*:*) + BDATA_SOURCE="Digi_6203-6233-World.bin" + logger -t atheros "Setting non-US (world) wireless region";; +esac # We don't want to rewrite NAND every time we boot so only # change the link if it is wrong. diff --git a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/ccimx6/Digi_6203_2_ANT-US.bin b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/ccimx6/Digi_6203_2_ANT-US.bin new file mode 100644 index 000000000..885ee80cf Binary files /dev/null and b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/ccimx6/Digi_6203_2_ANT-US.bin differ diff --git a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/ccimx6/Digi_6203_2_ANT-World.bin b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/ccimx6/Digi_6203_2_ANT-World.bin new file mode 100644 index 000000000..5b4a7eef6 Binary files /dev/null and b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/ccimx6/Digi_6203_2_ANT-World.bin differ