Page MenuHomeFreeBSD

linuxkpi: add ieee80211_node.h to headers to include before LIST_HEAD
ClosedPublic

Authored by bz on Mar 18 2021, 10:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 1:53 AM
Unknown Object (File)
Wed, Nov 20, 2:39 PM
Unknown Object (File)
Sun, Nov 17, 3:59 PM
Unknown Object (File)
Sun, Nov 17, 10:38 AM
Unknown Object (File)
Sun, Nov 17, 12:57 AM
Unknown Object (File)
Sun, Nov 10, 4:41 PM
Unknown Object (File)
Sun, Nov 10, 1:32 AM
Unknown Object (File)
Sat, Nov 9, 4:45 PM

Details

Summary

ieee80211_node.h uses LIST_HEAD() which LinuxKPI redefines and this
can lead to problems (see comment there). Make sure the net80211
header file is handled correctly by adding it to the list of files
to include before re-defining the macro.
Also add header files needed as dependencies.

Sponsored-by: The FreeBSD Foundation
MFC-after: 2 weeks

Reviewed-by:	...
Differential Revision: ...

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 37936
Build 34825: arc lint + arc unit

Event Timeline

bz requested review of this revision.Mar 18 2021, 10:36 PM

I know that we already include some net stuff here but can we stop ?
It make no sense to have linux/list.h includes those.

In D29336#656953, @manu wrote:

I know that we already include some net stuff here but can we stop ?
It make no sense to have linux/list.h includes those.

Why would net stuff be different than vm/ or sys/?

If you want this to stop we need to find a different solution to the problem, e.g. by calling it LKPI_LIST_HEAD() and renaming the places in the linux code or rename the FreeBSD version.

hselasky added a subscriber: hselasky.

Just make sure everything builds before commit.

This revision is now accepted and ready to land.Mar 19 2021, 12:11 PM

I agree with @manu that it's a bit weird to see list.h include net/ headers (and I expect bde is spinning in his grave) but at this stage, I can't see a better way forward. @bz's suggestion to rename the macro would make it more work to use the LinuxKPI. That would be a step backwards.