Page MenuHomeFreeBSD

net80211: Enable netdump support
ClosedPublic

Authored by cem on Sep 24 2018, 11:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 9:34 AM
Unknown Object (File)
Tue, Nov 5, 12:26 AM
Unknown Object (File)
Mon, Nov 4, 10:13 AM
Unknown Object (File)
Oct 11 2024, 4:57 PM
Unknown Object (File)
Oct 9 2024, 12:03 AM
Unknown Object (File)
Oct 3 2024, 4:14 PM
Unknown Object (File)
Sep 28 2024, 1:03 AM
Unknown Object (File)
Sep 24 2024, 3:53 AM
Subscribers

Details

Summary

Allow net80211 drivers to register a small vtable of netdump-related
methods.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/net80211/ieee80211.c
710 ↗(On Diff #48416)

Hi!

This stuff should go into the freebsd specific header file, as other OSes are using this wifi stack now!

cem marked an inline comment as done.Sep 25 2018, 12:18 AM
cem added inline comments.
sys/net80211/ieee80211.c
710 ↗(On Diff #48416)

Hi Adrian,

How would I hook vap_attach from the freebsd header? Thanks!

(The stuff below can move, no problem.)

sys/net80211/ieee80211.c
710 ↗(On Diff #48416)

Create a separate function, say ieee80211_netdump_attach(), and then the non-freebsd OSes can stub it out.

cem marked an inline comment as done and an inline comment as not done.Sep 25 2018, 12:22 AM
cem added inline comments.
sys/net80211/ieee80211.c
710 ↗(On Diff #48416)

I guess I could hang something off of ieee80211_sysctl_vattach but that seems kind of ugly.

cem marked an inline comment as done.Sep 25 2018, 12:22 AM
cem added inline comments.
sys/net80211/ieee80211.c
710 ↗(On Diff #48416)

Can do, thanks

Move netdump attach logic to freebsd-specific net80211 files

markj added inline comments.
sys/net80211/ieee80211_var.h
374 ↗(On Diff #48417)

I strongly prefer to avoid the ifdef here: the bloat is not significant, and it ensures that KLDs have the same view of the struct layout. I think it's not uncommon for people to compile wifi drivers out-of-tree.

This revision is now accepted and ready to land.Sep 25 2018, 1:35 AM
cem marked an inline comment as done.Sep 25 2018, 1:39 AM
cem added inline comments.
sys/net80211/ieee80211_var.h
374 ↗(On Diff #48417)

Yeah, I agree. Will fix.

Yeah please don't ifdef the structure definitions. I need to go do a pass at some point to make that not be a problem; it's 2018 :)

cem marked an inline comment as done.

Remove gratuitous ABI difference ifdef NETDUMP

This revision now requires review to proceed.Sep 25 2018, 1:46 AM

Yeah please don't ifdef the structure definitions. I need to go do a pass at some point to make that not be a problem; it's 2018 :)

Are you ok with #if FreeBSD or do you think we should leave the field in on other OS as well? I don't have any preference. Thanks!

In D17308#369025, @cem wrote:

Yeah please don't ifdef the structure definitions. I need to go do a pass at some point to make that not be a problem; it's 2018 :)

Are you ok with #if FreeBSD or do you think we should leave the field in on other OS as well? I don't have any preference. Thanks!

Since you can get away with a forward declaration of the struct, I can't imagine that the field would cause problems on other OS'.

Since you can get away with a forward declaration of the struct, I can't imagine that the field would cause problems on other OS'.

Sure, just struct bloat there.

De-conditionalize 80211dump vtable pointer on FreeBSD per markj.

This revision is now accepted and ready to land.Nov 7 2018, 9:41 PM

@adrian , is there any chance I could convince you to take this and run with it? I don't currently have FreeBSD running bare metal on a laptop to test this and commit it, but I would love to see it land eventually.

looks fine to me, other OSes won't use it but it won't matter. Land it!

This revision was automatically updated to reflect the committed changes.