From: Luis R. Rodriguez Date: Tue, 12 Jun 2012 17:52:50 +0000 (-0700) Subject: compat-wireless: address usage of request_module_nowait() on iwlwifi X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e12fdadbd866a7e005b6c590e4844dbbc4bb0239;p=openwrt%2Fstaging%2Fblogic.git compat-wireless: address usage of request_module_nowait() on iwlwifi request_module_nowait() was added on 2.6.30 but we can't backport it. Under some circumstances though request_module_nowait() likely was not meant to be used on purpose and instead we can assume request_module() will work. This patch addresses the few places where request_module_nowait() was used but that we can at least somewhat assume that this can work. We do not backport this into compat.git as a direct static inline given that there are surely some places where request_module() cannot be used. All users of request_module_nowait() should revise their code and snsure that is indeed what was meant. In this patch we address using the regular request_module() on iwlwifi given that it seems we can use it there. Someone can hopefully however test and verify this is OK. For newer kernels that have request_module_nowait() we leave the call. Signed-off-by: Luis R. Rodriguez --- diff --git a/patches/63-request_module_nowait.patch b/patches/63-request_module_nowait.patch new file mode 100644 index 000000000000..ae4bba7918a0 --- /dev/null +++ b/patches/63-request_module_nowait.patch @@ -0,0 +1,27 @@ +request_module_nowait() was added on 2.6.30 but we can't +backport it. Under some circumstances though request_module_nowait() +likely was not meant to be used on purpose and instead we can +assume request_module() will work. This patch addresses the few +places where request_module_nowait() was used but that we can +at least somewhat assume that this can work. We do not backport +this into compat.git as a direct static inline given that there +are surely some places where request_module() cannot be used. + +All users of request_module_nowait() should revise their code and +snsure that is indeed what was meant. + +--- a/drivers/net/wireless/iwlwifi/iwl-drv.c ++++ b/drivers/net/wireless/iwlwifi/iwl-drv.c +@@ -910,7 +910,12 @@ static void iwl_ucode_callback(const str + if (!drv->op_mode) + goto out_unbind; + } else { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)) + request_module_nowait("%s", op->name); ++#else ++ /* Goes untested */ ++ request_module("%s", op->name); ++#endif + } + + /*