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)
Thu, Oct 31, 8:53 AM
Unknown Object (File)
Mon, Oct 21, 4:52 PM
Unknown Object (File)
Oct 3 2024, 2:02 PM
Unknown Object (File)
Oct 3 2024, 12:06 PM
Unknown Object (File)
Sep 30 2024, 3:24 PM
Unknown Object (File)
Sep 30 2024, 1:23 PM
Unknown Object (File)
Sep 30 2024, 1:44 AM
Unknown Object (File)
Sep 29 2024, 7:09 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.