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)
Dec 29 2023, 9:23 AM
Unknown Object (File)
Dec 23 2023, 1:53 AM
Unknown Object (File)
Dec 12 2023, 9:17 AM
Unknown Object (File)
Nov 6 2023, 10:47 AM
Unknown Object (File)
Sep 14 2023, 9:33 PM
Unknown Object (File)
Mar 24 2023, 2:29 AM
Unknown Object (File)
Feb 17 2023, 4:18 PM
Unknown Object (File)
Dec 30 2022, 12:09 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.