[SOLVED] Config required to compile in nl80211.c, mlme.c
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello All,
First Post, so please go easy on me, lol.
I am starting with a linux kernel that was already customized to fit within an embedded product. The majority of the modifications came to using menuconfig to disable a LOT of things that weren't needed. Now, I need to add support for an external wireless wifi chipset.
Some of the net/wireless modules do get compiled, but I need some of the interfaces within nl80211.c, and mlme.c.
I do have CONFIG_CFG80211=m, CONFIG_CFG80211_INTERNAL_REGDB=y, and several others enabled that do get other net/wireless modules to compile, such as lib80211_crypt_wep, it builds, but just can't find the magic bullet config to get nl80211.c and mlme.c.
I am familiar with using make menuconfig, used it to enable/disable stuff in the past, ....
The kernel is not the latest, it is based on 5.4.
Thank you very much business_kid,
I do see that those have compiled.
The net/wireless/Makefile does have:
obj-$(CONFIG_CFG80211) += cfg80211.o
obj-$(CONFIG_LIB80211) += lib80211.o
obj-$(CONFIG_LIB80211_CRYPT_WEP) += lib80211_crypt_wep.o
obj-$(CONFIG_LIB80211_CRYPT_CCMP) += lib80211_crypt_ccmp.o
obj-$(CONFIG_LIB80211_CRYPT_TKIP) += lib80211_crypt_tkip.o
And all of those referenced CONFIG_xxxx's are enabled in the config, and build properly.
But
for nl80211 and mlme, they are in the Makefile as:
cfg80211-y += core.o sysfs.o radiotap.o util.o reg.o scan.o nl80211.o
cfg80211-y += mlme.o ibss.o sme.o chan.o ethtool.o mesh.o ap.o trace.o ocb.o
And those do not build, there is no resultant .o file for any of these.
I'm trying to find the corresponding CONFIG_xxx that will use the cfg80211-y in higher makefiles, or better, the "make menuconfig" config item to enable to get those files built.
I also have enabled in my higher level .config
CONFIG_WIRELESS=y
CONFIG_WIRELESS_EXT=y
CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
CONFIG_WEXT_SPY=y
CONFIG_WEXT_PRIV=y
CONFIG_CFG80211=m
# CONFIG_NL80211_TESTMODE is not set
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
# CONFIG_CFG80211_CERTIFICATION_ONUS is not set
CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y
CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y
CONFIG_CFG80211_DEFAULT_PS=y
# CONFIG_CFG80211_DEBUGFS is not set
CONFIG_CFG80211_CRDA_SUPPORT=y
# CONFIG_CFG80211_WEXT is not set
CONFIG_LIB80211=y
CONFIG_LIB80211_CRYPT_WEP=y
CONFIG_LIB80211_CRYPT_CCMP=y
CONFIG_LIB80211_CRYPT_TKIP=y
# CONFIG_LIB80211_DEBUG is not set
CONFIG_MAC80211=m
CONFIG_MAC80211_HAS_RC=y
CONFIG_MAC80211_RC_MINSTREL=y
CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"
If you configured them as 'Y.' they are in the kernel. If they are configured as 'm,' there should be an 80211.ko module. Are you suspecting the kernel isn't building them? Just refresh the source. IME no kernel lacks any configured file. The one exception is if it lacks any dependency, for example, it will depend on CONFIG_WIRELESS. If you have turned off wifi networking at the top, it won't build there.
I am using an older kernel based on 5.4 because some of the hardware drivers are not yet compatible with 5.8 and up.
The original kernel configurator removed a lot of configs to clear up space, cross compiling for an arm.
I do have CONFIG_WIRELESS=y set.
I do have a lot of the files building in the net/wireless folder, but that is because their specific config is enabled.
e.g.
obj-$(CONFIG_LIB80211_CRYPT_WEP) += lib80211_crypt_wep.o
So I do see it gets built.
My issue is the ones with the
cfg80211-y dependency.
such as:
cfg80211-y += core.o sysfs.o radiotap.o util.o reg.o scan.o nl80211.o
cfg80211-y += mlme.o ibss.o sme.o chan.o ethtool.o mesh.o ap.o trace.o ocb.o
I can't find where that cfg80211-y is used in an actual build makefile or config at a higher level.
I have this same driver working perfectly on an ubuntu 18.04 with kernel 5.4 working just fine, so I am comparing the config files, and looking for differences in defines.
Appreciate the help.
Best,
Simply running "diff fileA fileB" (possibly redirected to an output file) will give you the differences in those config files. Makes it easy to compare.
Thank you computersavvy.
Currently using meld to show the differences, it is a good graphical diff tool, highlights, tries to keep track of where it would be in the other file, etc.
In this instance, there are around 1500 differences to go through, most I can just disregard, one is x86, the other is cross compiled arm, but it is still timeconsuming/fun. The hard part is the config dependency, e.g. one config requires another config, and if the higher level one is not present, then the default .config is used.
Thanks
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.