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.

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
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; 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.