Page MenuHomeFreeBSD

net80211: migrate if_flags, if_drvflags out of most source files
ClosedPublic

Authored by adrian on May 18 2025, 4:34 AM.
Referenced Files
F123110063: D50405.id156010.diff
Fri, Jul 11, 6:35 AM
Unknown Object (File)
Wed, Jul 9, 1:27 PM
Unknown Object (File)
Mon, Jul 7, 1:41 PM
Unknown Object (File)
Mon, Jul 7, 3:40 AM
Unknown Object (File)
Sun, Jul 6, 8:00 PM
Unknown Object (File)
Sat, Jul 5, 1:17 PM
Unknown Object (File)
Sat, Jul 5, 12:26 PM
Unknown Object (File)
Fri, Jul 4, 10:20 PM

Details

Summary

Migrate both if_flags and if_drvflags out of most source files.
Ideally it'd only be referenced in ieee80211_freebsd.c, but for now
it also ignores references in ieee80211_ioctl.c.

  • migrate if_flags set to if_setflags
  • migrate if_flags get to if_getflags
  • migrate if_drvflags get to if_getdrvflags
  • add ieee80211_vap_check_is_monitor() and ieee8021_vap_check_is_simplex() to abstract out the IFF_MONITOR and IFF_SIMPLEX flag checks.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested changes to this revision.May 18 2025, 8:24 PM
bz added a subscriber: bz.
bz added inline comments.
sys/net80211/ieee80211_freebsd.c
1272

You can save yourself the local variable here and all the way down.

1274

No. Stop for a bool. Also would belong inside ().

style.9 says return ((if_getflags(ifp) & IFF_MONITOR) != 0);

Here and all the way down please.

1315

This almost wants a set and a clear function. I'd at least call the argument set and not state to make it clearer.

sys/net80211/ieee80211_freebsd.h
265–267

While here you could make it style clean and check != 0

sys/net80211/ieee80211_proto.c
1987

no space

This revision now requires changes to proceed.May 18 2025, 8:24 PM
sys/net80211/ieee80211_freebsd.c
1315

Yeah, I'm not happy with my naming scheme right now - these aren't really supposed to be public net80211 functions and their current names make them sound like drivers/tools can use them to query stuff. What they REALLY are is glue to the underlying OS interface.

Do you have any suggestions on what to name them to make that particular fact clearer? Or should I just be clearer in the documentation?

fixed, i hope!

This revision is now accepted and ready to land.May 24 2025, 11:23 PM