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
F109026881: D36249.diff
Thu, Jan 30, 7:47 PM
Unknown Object (File)
Fri, Jan 24, 5:41 PM
Unknown Object (File)
Wed, Jan 22, 12:08 PM
Unknown Object (File)
Sat, Jan 18, 9:51 PM
Unknown Object (File)
Sat, Jan 18, 9:36 PM
Unknown Object (File)
Wed, Jan 8, 8:16 AM
Unknown Object (File)
Dec 1 2024, 2:00 PM
Unknown Object (File)
Nov 22 2024, 12:35 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.