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, Mar 29, 6:53 AM
Unknown Object (File)
Feb 16 2024, 5:52 AM
Unknown Object (File)
Jan 23 2024, 4:00 PM
Unknown Object (File)
Jan 18 2024, 5:02 AM
Unknown Object (File)
Dec 22 2023, 10:24 PM
Unknown Object (File)
Dec 20 2023, 8:03 AM
Unknown Object (File)
Dec 14 2023, 10:22 PM
Unknown Object (File)
Nov 6 2023, 9:17 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.