Wifi fix in custom kernels
====================
(Work in Progress)
It appears that the method varies from one device to another.
Any further guides would be appreciated.
For Mediatek
============
Method 1 from various sources
----------------
1. Find the modules (.ko files)
Look in
vendor/lib/modules
Or
vendor_boot/lib/modules
Or
vendor_dlkm/lib/modules
2. Copy these files onto the pc
3. Add them to the drivers/misc/mediatek/connectivity folder
Samsung usually ships the module source in the Platform.tar.gz, extract and move it to drivers/misc/mediatek/connectivity
4. In the defconfig make modules force load
CONFIG_MODULES=y
CONFIG_MODULE_FORCE_LOAD=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
5. Edit
drivers/misc/mediatek/connectivity/makefile
And
drivers/misc/mediatek/connectivity/Kconfig
Then
Makefile TOP variable change:
https://github.com/rsuntk/android_kernel_samsung_a10s-r/blob/android-4.19-stable/drivers/misc/mediatek/connectivity/wlan/core/gen4m/Makefile#L226
Force inline for fmradio and gps:
https://github.com/rsuntk/android_kernel_samsung_a10s-r/blob/android-4.19-stable/drivers/misc/mediatek/connectivity/wlan/core/gen4m/Makefile#L423
https://github.com/rsuntk/android_kernel_samsung_a10s-r/blob/android-4.19-stable/drivers/misc/mediatek/connectivity/wlan/core/gen4m/include/config.h#L730
Method 2 From @TakuruKagami1
----------------
exclude fm and gps from drivers/misc/mediatek/connectivity/makefile
#obj-y += fm/
#obj-y += gps/
(This method works for arm devices. )
Method 3 rissu
----------------
Maybe you need to download entire kernel source just to take the connectivity source:
https://github.com/rsuntkOrgs/android_kernel_samsung_a05/tree/android-4.19-stable/drivers/misc/mediatek/connectivity
Remove this flag if something went wrong:
https://github.com/rsuntkOrgs/android_kernel_samsung_a05/blob/android-4.19-stable/drivers/misc/mediatek/connectivity/wlan/core/gen4m/Makefile#L1032
And make sure to enable this on your defconfig
CONFIG_MTK_COMBO_BT
CONFIG_MTK_COMBO_WIFI
CONFIG_MTK_COMBO_GPS
CONFIG_MTK_FMRADIO
For Snapdragon
==============
Method 1 from @RissuDesu
----------------
Note: not a permanent fix
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SIG is not set
# CONFIG_MODULE_SIG_FORCE is not set
# CONFIG_MODULE_SIG_ALL is not set
# CONFIG_MODULE_SIG_SHA512 is not set
# CONFIG_MODULE_SIG_HASH is not set
Open kernel/modules.c, and apply this patch:
@@ -3097,7 +3097,7 @@
} else if (!same_magic(modmagic, vermagic, info->index.vers)) {
pr_err("%s: version magic '%s' should be '%s'\n",
info->name, modmagic, vermagic);
- return -ENOEXEC;
+ //return -ENOEXEC;
}
if (!get_modinfo(info, "intree")) {
References;
--------------------
https://github.com/nashc-dev/android_kernel_realme_nashc/commit/89294643e9a9c39401ad0e4df33e502abf5f1070
https://github.com/TelegramAt25/niigo_kernel_xiaomi_blossom/commit/199271982c4f53e7dd8bc7d89d7053b25747c5af
https://github.com/mylove90/M325FV/commits/main/