diff options
| author | Franz Schnyder <franz.schnyder@toradex.com> | 2026-05-19 14:49:07 +0200 |
|---|---|---|
| committer | Franz Schnyder <franz.schnyder@toradex.com> | 2026-05-21 21:32:29 +0200 |
| commit | 07a305c3496399b291fbc0cadcfc4f89bdff42ea (patch) | |
| tree | 2ad7bc41fa4e8643da7aa573dce9f10a30aa05b7 /recipes-kernel | |
| parent | 3949624f36cbc5b7fd4033ce5ef001d83fc1a3e9 (diff) | |
| download | meta-freescale-07a305c3496399b291fbc0cadcfc4f89bdff42ea.tar.gz | |
kernel-module-nxp-wlan: fix device wakeup capability of mwifiex driver
The device is always advertised as being wakeup capable, even if no
interrupt line has been allocated for it.
Add a patch to Initialize the device only as wakeup capable if an
interrupt has been registered.
Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
Diffstat (limited to 'recipes-kernel')
| -rw-r--r-- | recipes-kernel/kernel-modules/kernel-module-nxp-wlan/0001-mlinux-moal_main-fix-device-wakeup-capability.patch | 52 | ||||
| -rw-r--r-- | recipes-kernel/kernel-modules/kernel-module-nxp-wlan_git.bb | 1 |
2 files changed, 53 insertions, 0 deletions
diff --git a/recipes-kernel/kernel-modules/kernel-module-nxp-wlan/0001-mlinux-moal_main-fix-device-wakeup-capability.patch b/recipes-kernel/kernel-modules/kernel-module-nxp-wlan/0001-mlinux-moal_main-fix-device-wakeup-capability.patch new file mode 100644 index 000000000..41ac4007a --- /dev/null +++ b/recipes-kernel/kernel-modules/kernel-module-nxp-wlan/0001-mlinux-moal_main-fix-device-wakeup-capability.patch | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | From 6342842b69302ad5530b07d8390102b0648f4b9a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Franz Schnyder <franz.schnyder@toradex.com> | ||
| 3 | Date: Thu, 21 May 2026 11:29:47 +0200 | ||
| 4 | Subject: [PATCH] mlinux: moal_main: fix device wakeup capability | ||
| 5 | |||
| 6 | Currently, the device is always advertised as being capable of | ||
| 7 | waking up, even if no interrupt line has been allocated for it. | ||
| 8 | |||
| 9 | Initialize the device only as wakeup capable if an interrupt has been | ||
| 10 | registered. | ||
| 11 | |||
| 12 | Upstream-Status: Pending | ||
| 13 | Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com> | ||
| 14 | --- | ||
| 15 | mlinux/moal_main.c | 7 ++++++- | ||
| 16 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
| 17 | |||
| 18 | diff --git a/mlinux/moal_main.c b/mlinux/moal_main.c | ||
| 19 | index 0214fc3..2d765b8 100644 | ||
| 20 | --- a/mlinux/moal_main.c | ||
| 21 | +++ b/mlinux/moal_main.c | ||
| 22 | @@ -14331,6 +14331,11 @@ void woal_regist_oob_wakeup_irq(moal_handle *handle) | ||
| 23 | goto err_exit; | ||
| 24 | } | ||
| 25 | |||
| 26 | + if (device_init_wakeup(dev, true)) { | ||
| 27 | + dev_err(dev, "Failed to init wakeup for mwifiex\n"); | ||
| 28 | + goto err_exit; | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | disable_irq(handle->irq_oob_wakeup); | ||
| 32 | |||
| 33 | LEAVE(); | ||
| 34 | @@ -14353,6 +14358,7 @@ void woal_unregist_oob_wakeup_irq(moal_handle *handle) | ||
| 35 | |||
| 36 | ENTER(); | ||
| 37 | if (handle->irq_oob_wakeup >= 0) { | ||
| 38 | + device_init_wakeup(dev, false); | ||
| 39 | devm_free_irq(dev, handle->irq_oob_wakeup, handle); | ||
| 40 | } | ||
| 41 | LEAVE(); | ||
| 42 | @@ -14829,7 +14835,6 @@ moal_handle *woal_add_card(void *card, struct device *dev, moal_if_ops *if_ops, | ||
| 43 | PRINTM(MFATAL, "Firmware Init Failed\n"); | ||
| 44 | goto err_init_fw; | ||
| 45 | } | ||
| 46 | - device_init_wakeup(dev, true); | ||
| 47 | #ifdef SD8887 | ||
| 48 | if (IS_SD8887(handle->card_type)) { | ||
| 49 | if (handle->fw_release_number.minorRevNum == 75) { | ||
| 50 | -- | ||
| 51 | 2.43.0 | ||
| 52 | |||
diff --git a/recipes-kernel/kernel-modules/kernel-module-nxp-wlan_git.bb b/recipes-kernel/kernel-modules/kernel-module-nxp-wlan_git.bb index 073a62ff9..d22b643c7 100644 --- a/recipes-kernel/kernel-modules/kernel-module-nxp-wlan_git.bb +++ b/recipes-kernel/kernel-modules/kernel-module-nxp-wlan_git.bb | |||
| @@ -12,6 +12,7 @@ module_conf_moal = "options moal mod_para=nxp/wifi_mod_para.conf" | |||
| 12 | 12 | ||
| 13 | SRC_URI = " \ | 13 | SRC_URI = " \ |
| 14 | ${MRVL_SRC};branch=${SRCBRANCH} \ | 14 | ${MRVL_SRC};branch=${SRCBRANCH} \ |
| 15 | file://0001-mlinux-moal_main-fix-device-wakeup-capability.patch \ | ||
| 15 | " | 16 | " |
| 16 | MRVL_SRC ?= "git://github.com/nxp-imx/mwifiex.git;protocol=https" | 17 | MRVL_SRC ?= "git://github.com/nxp-imx/mwifiex.git;protocol=https" |
| 17 | SRCBRANCH = "lf-6.18.2_1.0.0" | 18 | SRCBRANCH = "lf-6.18.2_1.0.0" |
