Page MenuHomeFreeBSD

net80211: replace internal LE_READ_*/LE_WRITE_* macro with system le*dec / le*enc
ClosedPublic

Authored by avos on Apr 20 2016, 3:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 8, 6:26 PM
Unknown Object (File)
Tue, Dec 3, 4:34 PM
Unknown Object (File)
Sun, Dec 1, 1:52 PM
Unknown Object (File)
Nov 19 2024, 1:50 PM
Unknown Object (File)
Nov 1 2024, 7:11 AM
Unknown Object (File)
Sep 25 2024, 1:00 PM
Unknown Object (File)
Sep 25 2024, 12:22 AM
Unknown Object (File)
Sep 17 2024, 5:27 PM
Subscribers

Details

Summary

Replace net80211 specific macros with system-wide bytestream encoding/decoding functions:

  • LE_READ_2 -> le16dec
  • LE_READ_4 -> le32dec
  • LE_WRITE_2 -> le16enc
  • LE_WRITE_4 -> le32enc

+ drop ieee80211_input.h include, where it was included for these operations only.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avos retitled this revision from to net80211: replace internal LE_READ_*/LE_WRITE_* macro with system le*dec / le*enc.
avos updated this object.
avos edited the test plan for this revision. (Show Details)
avos added a reviewer: adrian.
avos set the repository for this revision to rS FreeBSD src repository - subversion.

I'll check with dragonflybsd about the endian conversion routines to make sure they have the same ones in the same place.

I'd like to see a first pass be "remove all other definitions of LE_*" but I fear that'll introduce more ieee80211_input.h including.

I'll check with dragonflybsd about the endian conversion routines to make sure they have the same ones in the same place.

http://gitweb.dragonflybsd.org/dragonfly.git/blob/HEAD:/sys/sys/endian.h
le{16,32}{dec,enc} were added in 2004

I'd like to see a first pass be "remove all other definitions of LE_*" but I fear that'll introduce more ieee80211_input.h including.

Yes + LE_WRITE_* need to be moved to some appropriate header in this case.

P.S. there is another one definition of LE_READ_{2,4} in <dev/ath/ath_hal/ah_internal.h> (untouched because it is used by <contrib/dev/ath/ath_hal/ar9300>).

adrian edited edge metadata.

ok, let's do it then. We can always modify it later if someone comes along and complains about portability.

This revision is now accepted and ready to land.Apr 20 2016, 4:32 PM
This revision was automatically updated to reflect the committed changes.