module-atheros: add calibration for wireless no bluetooth variants
Some CC6 variants have wireless but not bluetooth. Those variants need a different calibration file. Signed-off-by: Javier Viguera <javier.viguera@digi.com> (cherry picked from commit a74363cf4a9b239edf9d628f84fe7e88002c0f5c)
This commit is contained in:
parent
ed251520b5
commit
b203540adf
|
|
@ -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} += " \
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue