LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-20-2021, 06:19 AM   #1
jshenry1963
LQ Newbie
 
Registered: May 2021
Posts: 6

Rep: Reputation: Disabled
Config required to compile in nl80211.c, mlme.c


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.

Thanks in advance,
John
 
Old 05-23-2021, 06:30 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Hello, jshenry1963 & welcome to LQ.

If you have configured 802.11 as a module, build the kernel and it will appear in /lib/modules when you run 'make modules_install'

Code:
bash-5.1$ cd /lib/modules
bash-5.1$ find -name '*80211*'
./5.10.15/kernel/drivers/net/wireless/broadcom/brcm80211
./5.10.15/kernel/net/mac80211
./5.10.15/kernel/net/mac80211/mac80211.ko
./5.10.15/kernel/net/wireless/lib80211_crypt_ccmp.ko
./5.10.15/kernel/net/wireless/cfg80211.ko
./5.10.15/kernel/net/wireless/lib80211_crypt_tkip.ko
./5.10.15/kernel/net/wireless/lib80211_crypt_wep.ko
./5.10.15/kernel/net/wireless/lib80211.ko
 
1 members found this post helpful.
Old 05-23-2021, 12:12 PM   #3
jshenry1963
LQ Newbie
 
Registered: May 2021
Posts: 6

Original Poster
Rep: Reputation: Disabled
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

obj-$(CONFIG_WEXT_CORE) += wext-core.o
obj-$(CONFIG_WEXT_PROC) += wext-proc.o
obj-$(CONFIG_WEXT_SPY) += wext-spy.o
obj-$(CONFIG_WEXT_PRIV) += wext-priv.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"


Thanks for your help
 
Old 05-24-2021, 08:43 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
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.
 
Old 05-24-2021, 08:57 AM   #5
jshenry1963
LQ Newbie
 
Registered: May 2021
Posts: 6

Original Poster
Rep: Reputation: Disabled
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,
 
Old 05-24-2021, 01:26 PM   #6
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
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.
 
Old 05-24-2021, 02:49 PM   #7
jshenry1963
LQ Newbie
 
Registered: May 2021
Posts: 6

Original Poster
Rep: Reputation: Disabled
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
 
Old 05-28-2021, 08:23 PM   #8
jshenry1963
LQ Newbie
 
Registered: May 2021
Posts: 6

Original Poster
Rep: Reputation: Disabled
The Resolution?
Changed the configs for cfg80211 and mac80211 from m / module to y / include.
And everything built fine, So did the qca driver.
 
Old 05-28-2021, 08:56 PM   #9
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Excellent work.!!
Please mark this solved then.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] New message at boot -- nl80211: kernel reports: Authentication algorithm number required ceed Slackware 4 12-30-2020 09:57 AM
NL80211 command and attributes ufo_ Linux - Wireless Networking 0 10-12-2012 11:51 AM
CWMIN CWMAC parametes with NL80211 command ufo_ Linux - Wireless Networking 0 10-11-2012 11:33 AM
[SOLVED] Building hostapd for nl80211 driver with libnl-1.1 Darshan P Linux - Software 0 10-31-2011 02:26 AM
Hostapd problem with b43 (nl80211) Janhouse Linux - Networking 0 06-01-2009 04:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration