diff options
author | avos <avos@FreeBSD.org> | 2016-04-20 18:29:30 +0000 |
---|---|---|
committer | avos <avos@FreeBSD.org> | 2016-04-20 18:29:30 +0000 |
commit | a5ff8b0e316b83f9374254420658df1268d03b44 (patch) | |
tree | ce3eab7ed45b044ec959a1de503b72ca6e18f182 /sys/dev/rtwn | |
parent | dc8641835532430d191452e0ceeb8e5f5fca65bd (diff) | |
download | FreeBSD-src-a5ff8b0e316b83f9374254420658df1268d03b44.zip FreeBSD-src-a5ff8b0e316b83f9374254420658df1268d03b44.tar.gz |
net80211: replace internal LE_READ_*/LE_WRITE_* macro with system
le*dec / le*enc functions.
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.
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D6030
Diffstat (limited to 'sys/dev/rtwn')
-rw-r--r-- | sys/dev/rtwn/if_rtwn.c | 4 | ||||
-rw-r--r-- | sys/dev/rtwn/if_rtwnreg.h | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/sys/dev/rtwn/if_rtwn.c b/sys/dev/rtwn/if_rtwn.c index 8e8f1a3..0f7422f 100644 --- a/sys/dev/rtwn/if_rtwn.c +++ b/sys/dev/rtwn/if_rtwn.c @@ -1265,8 +1265,8 @@ rtwn_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) rtwn_write_4(sc, R92C_CR, reg); /* Set BSSID. */ - rtwn_write_4(sc, R92C_BSSID + 0, LE_READ_4(&ni->ni_bssid[0])); - rtwn_write_4(sc, R92C_BSSID + 4, LE_READ_2(&ni->ni_bssid[4])); + rtwn_write_4(sc, R92C_BSSID + 0, le32dec(&ni->ni_bssid[0])); + rtwn_write_4(sc, R92C_BSSID + 4, le16dec(&ni->ni_bssid[4])); if (ic->ic_curmode == IEEE80211_MODE_11B) rtwn_write_1(sc, R92C_INIRTS_RATE_SEL, 0); diff --git a/sys/dev/rtwn/if_rtwnreg.h b/sys/dev/rtwn/if_rtwnreg.h index 09a31fa..bfd11c8 100644 --- a/sys/dev/rtwn/if_rtwnreg.h +++ b/sys/dev/rtwn/if_rtwnreg.h @@ -895,10 +895,6 @@ #define R92C_RAID_11B 6 -/* Macros to access unaligned little-endian memory. */ -#define LE_READ_2(x) ((x)[0] | (x)[1] << 8) -#define LE_READ_4(x) ((x)[0] | (x)[1] << 8 | (x)[2] << 16 | (x)[3] << 24) - /* * Macros to access subfields in registers. */ |