Rtlwifi kernel module

I’m trying to extend the kernel of an apalis imx6 to use a rtl8821ae PCI wifi module.
I have modified the defconfig and added it to my open embedded build.
When I want to load the module I get an error of the depending module “rtlwifi”

[23201.028106] rtlwifi: disagrees about version of symbol ieee80211_start_tx_ba_cb_irqsafe
[23201.051863] rtlwifi: Unknown symbol ieee80211_start_tx_ba_cb_irqsafe (err -22)
[23201.075141] rtlwifi: disagrees about version of symbol ieee80211_connection_loss
[23201.090658] rtlwifi: Unknown symbol ieee80211_connection_loss (err -22)
[23201.105477] rtlwifi: disagrees about version of symbol ieee80211_start_tx_ba_session
[23201.121387] rtlwifi: Unknown symbol ieee80211_start_tx_ba_session (err -22)

I have compiled the kernel with the bitbake recipes. If I build the module out of tree and install it in the rootfs it seems to load without a problem.
Do you have an idea why I’m getting this error message during module loading?

Thank you and best regards

Driver for this chipset is already part of our wifi backports package. All you need to do is enable it in the config file. It’s a part of the meta-toradex-bsp-common.

This should do it:

diff --git a/recipes-kernel/backports/files/config b/recipes-kernel/backports/files/config
index 0c99cd8..16e71c7 100644
--- a/recipes-kernel/backports/files/config
+++ b/recipes-kernel/backports/files/config
@@ -178,7 +178,20 @@ CPTCFG_RT2X00_LIB_CRYPTO=y
 # CPTCFG_RT2X00_DEBUG is not set
-# CPTCFG_RTL_CARDS is not set
+# CPTCFG_RTL8192CE is not set
+# CPTCFG_RTL8192SE is not set
+# CPTCFG_RTL8192DE is not set
+# CPTCFG_RTL8723AE is not set
+# CPTCFG_RTL8723BE is not set
+# CPTCFG_RTL8188EE is not set
+# CPTCFG_RTL8192EE is not set
+# CPTCFG_RTL8192CU is not set

We didn’t have a card based on this chipset for testing. If it works well please provide feedback and we’ll enable this driver in the future releases.

My kernel config looks the same as yours.
When I compile the kernel and the modules on its own the module loads without an error, but if I use my modified defconfig with openembedded I get the error as described.
Where’s the root of the problem for these symbol versions not matching?

This is not a kernel config but a config for the kernel backports. So you should enable the driver for +CPTCFG_RTL8821AE=m as written in the above answer.