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)
Mon, Nov 11, 1:40 AM
Unknown Object (File)
Sat, Nov 9, 2:13 PM
Unknown Object (File)
Sat, Oct 26, 9:59 AM
Unknown Object (File)
Sep 28 2024, 10:14 PM
Unknown Object (File)
Sep 28 2024, 10:13 PM
Unknown Object (File)
Sep 28 2024, 10:13 PM
Unknown Object (File)
Sep 28 2024, 10:02 PM
Unknown Object (File)
Sep 22 2024, 10:29 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.