Allow net80211 drivers to register a small vtable of netdump-related
methods.
Details
- Reviewers
markj adrian - Commits
- rS362138: net80211: Add framework for debugnet(4) support
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! |
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. |
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. |
sys/net80211/ieee80211.c | ||
---|---|---|
710 ↗ | (On Diff #48416) | Can do, thanks |
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. |
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 :)
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'.
@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.