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)
Tue, Mar 4, 9:20 PM
Unknown Object (File)
Feb 28 2025, 2:06 PM
Unknown Object (File)
Feb 19 2025, 3:49 PM
Unknown Object (File)
Feb 13 2025, 5:25 AM
Unknown Object (File)
Feb 12 2025, 1:35 AM
Unknown Object (File)
Feb 7 2025, 11:08 AM
Unknown Object (File)
Feb 7 2025, 7:58 AM
Unknown Object (File)
Feb 7 2025, 5:55 AM

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.