aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/iwn
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2020-09-24 10:57:39 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2020-09-24 10:57:39 +0000
commitfe5ebb23cc3c3e4c94cb1443a5688d10c42a9f21 (patch)
tree8608a3be134102228d9952d30c4d10d4a146331a /sys/dev/iwn
parent122e47836ebadefa4da114642073e7e9e6ae72d3 (diff)
downloadsrc-fe5ebb23cc3c3e4c94cb1443a5688d10c42a9f21.tar.gz
src-fe5ebb23cc3c3e4c94cb1443a5688d10c42a9f21.zip
Provide MS() and SM() macros for 80211 and wireless drivers.
We have (two versions) of MS() and SM() macros which we use throughout the wireless code. Change all but three places (ath_hal, rtwn, and rsu) to the newly provided _IEEE80211_MASKSHIFT() and _IEEE80211_SHIFTMASK() macros. Also change one internal case using both _S and _M instead of just _S away from _M (one of the reasons rtwn and rsu were not changed). This was done semi-mechanically. No functional changes intended. Requested by: gnn (D26091) Reviewed by: adrian (pre line wrap) MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate") Differential Revision: https://reviews.freebsd.org/D26539
Notes
Notes: svn path=/head/; revision=366112
Diffstat (limited to 'sys/dev/iwn')
-rw-r--r--sys/dev/iwn/if_iwn.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c
index 74a313e6ecfc..2121a15bad6e 100644
--- a/sys/dev/iwn/if_iwn.c
+++ b/sys/dev/iwn/if_iwn.c
@@ -7442,7 +7442,6 @@ static int
iwn_ampdu_rx_start(struct ieee80211_node *ni, struct ieee80211_rx_ampdu *rap,
int baparamset, int batimeout, int baseqctl)
{
-#define MS(_v, _f) (((_v) & _f) >> _f##_S)
struct iwn_softc *sc = ni->ni_ic->ic_softc;
struct iwn_ops *ops = &sc->ops;
struct iwn_node *wn = (void *)ni;
@@ -7453,8 +7452,8 @@ iwn_ampdu_rx_start(struct ieee80211_node *ni, struct ieee80211_rx_ampdu *rap,
DPRINTF(sc, IWN_DEBUG_TRACE, "->Doing %s\n", __func__);
- tid = MS(le16toh(baparamset), IEEE80211_BAPS_TID);
- ssn = MS(le16toh(baseqctl), IEEE80211_BASEQ_START);
+ tid = _IEEE80211_MASKSHIFT(le16toh(baparamset), IEEE80211_BAPS_TID);
+ ssn = _IEEE80211_MASKSHIFT(le16toh(baseqctl), IEEE80211_BASEQ_START);
if (wn->id == IWN_ID_UNDEFINED)
return (ENOENT);
@@ -7471,7 +7470,6 @@ iwn_ampdu_rx_start(struct ieee80211_node *ni, struct ieee80211_rx_ampdu *rap,
if (error != 0)
return error;
return sc->sc_ampdu_rx_start(ni, rap, baparamset, batimeout, baseqctl);
-#undef MS
}
/*