Page MenuHomeFreeBSD

net80211: consistently use the IEEE80211_M_ memory related options
ClosedPublic

Authored by bz on Aug 17 2022, 6:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 8, 10:05 PM
Unknown Object (File)
Sun, Sep 28, 12:31 AM
Unknown Object (File)
Sat, Sep 27, 7:38 AM
Unknown Object (File)
Sep 11 2025, 11:56 AM
Unknown Object (File)
Sep 6 2025, 7:00 AM
Unknown Object (File)
Aug 23 2025, 8:22 PM
Unknown Object (File)
Jul 17 2025, 3:17 PM
Unknown Object (File)
Jul 7 2025, 1:59 PM

Details

Summary

Replace a malloc() by IEEE80211_MALLOC().
For malloc flags even in the local ieee80211_freebsd.c there was a mix
of both versions M_ and IEEE80211_M_.
Consistently use the IEEE80211_M_ malloc options everywhere.
If the field is changed for malloc, it'll also be changed for the
other accessor functions taking a "how" field to avoid any confusion.
This should also help porting code to other OSs.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Diff Detail

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

Event Timeline

bz requested review of this revision.Aug 17 2022, 6:41 PM
This revision is now accepted and ready to land.Aug 17 2022, 6:50 PM

No objection, but I wonder what the value really is? Another OS either needs to have FreeBSD compatible interfaces or have local diffs; is there really a case where e.g. m_copypacket() is going to be provided, but M_NOWAIT is not and cannot be #defined away?

Certainly if we have a mix of IEEE80211_M_NOWAIT and M_NOWAIT that doesn't make much sense, it makes sense to do this for consistency if nothing else.

No objection, but I wonder what the value really is? Another OS either needs to have FreeBSD compatible interfaces or have local diffs; is there really a case where e.g. m_copypacket() is going to be provided, but M_NOWAIT is not and cannot be #defined away?

Certainly if we have a mix of IEEE80211_M_NOWAIT and M_NOWAIT that doesn't make much sense, it makes sense to do this for consistency if nothing else.

Adrian can probably tell you more about the history of b9b533891f5f8acf01ac15dafceafb03a611a80d . It is just weird if you look for malloc or malloc flags and find two sets of anything, so as you say consistency is the thing I am after mostly.