kernel-module-qualcomm: fix two udev rules managing qcom wireless driver

Udev comes with a bunch of generic rules for the hardware. One of them:

/lib/udev/rules.d/80-drivers.rules

is able to load the qualcomm wireless module.

At the same time our new rule is needed, so it prepares the firmware
before the module is loaded.

Both rules running collide with following error message:

udevd[181]: '/etc/udev/scripts/qualcomm.sh' [184] terminated by signal 1 (Hangup)

So to fix this, we rename the specific rule so it's parsed later, and
then we use the hard assignation '=' instead of '+=' to override the
values that come from the previous parsed rule.

Also clean-up a bit the 'qualcomm.sh' script and the modprobe file,
given that now we know the standard drivers rule won't run for this
interface.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2017-07-05 10:25:14 +02:00
parent baddd28fc8
commit 9329e5681b
4 changed files with 4 additions and 10 deletions

View File

@ -17,7 +17,7 @@ SRC_URI = " \
"
SRC_URI_append = " \
file://80-sdio-qcom.rules \
file://81-sdio-qcom.rules \
file://modprobe-qualcomm.conf \
file://qualcomm.sh \
"
@ -45,7 +45,7 @@ do_install_append() {
install -m 0644 ${WORKDIR}/git/firmware_bin/WCNSS_cfg.dat ${D}${base_libdir}/firmware/wlan/cfg.dat
install -m 0644 ${WORKDIR}/git/firmware_bin/WCNSS_qcom_cfg.ini ${D}${base_libdir}/firmware/wlan/qcom_cfg.ini
install -d ${D}${sysconfdir}/udev/rules.d ${D}${sysconfdir}/udev/scripts
install -m 0644 ${WORKDIR}/80-sdio-qcom.rules ${D}${sysconfdir}/udev/rules.d/
install -m 0644 ${WORKDIR}/81-sdio-qcom.rules ${D}${sysconfdir}/udev/rules.d/
install -m 0755 ${WORKDIR}/qualcomm.sh ${D}${sysconfdir}/udev/scripts/
}

View File

@ -1,2 +1,2 @@
# Load Qualcomm wireless module
SUBSYSTEM=="sdio", ACTION=="add", ENV{MODALIAS}=="sdio:c00v0271d050A" RUN+="/etc/udev/scripts/qualcomm.sh"
SUBSYSTEM=="sdio", ACTION=="add", ENV{MODALIAS}=="sdio:c00v0271d050A", RUN="/etc/udev/scripts/qualcomm.sh"

View File

@ -1,4 +1,3 @@
install wlan true
# Load the wlan module with values for SDIO3.0.
options wlan asyncintdelay=0x2 writecccr1=0xf2 writecccr1value=0xf \
writecccr2=0xf1 writecccr2value=0xa8 writecccr3=0xf0 \

View File

@ -93,13 +93,8 @@ esac
fi
)
# Check the version of modprobe installed to compound the arguments.
if readlink -f $(which modprobe) | grep -qs kmod; then
MODPROBE_ARGS="-i"
fi
# Load the wireless module with the params defined in modprobe.d/qualcomm.conf
modprobe ${MODPROBE_ARGS} wlan
modprobe wlan
# Verify the interface is present
[ -d "/sys/class/net/wlan0" ] || logger -t qca6564 "[ERROR] Loading qca6564 module"