diff options
Diffstat (limited to 'sys/net80211/ieee80211_proto.c')
-rw-r--r-- | sys/net80211/ieee80211_proto.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c index 61aef7a..605c771 100644 --- a/sys/net80211/ieee80211_proto.c +++ b/sys/net80211/ieee80211_proto.c @@ -662,13 +662,12 @@ ieee80211_set_shortslottime(struct ieee80211com *ic, int onoff) int ieee80211_iserp_rateset(const struct ieee80211_rateset *rs) { -#define N(a) (sizeof(a) / sizeof(a[0])) static const int rates[] = { 2, 4, 11, 22, 12, 24, 48 }; int i, j; - if (rs->rs_nrates < N(rates)) + if (rs->rs_nrates < nitems(rates)) return 0; - for (i = 0; i < N(rates); i++) { + for (i = 0; i < nitems(rates); i++) { for (j = 0; j < rs->rs_nrates; j++) { int r = rs->rs_rates[j] & IEEE80211_RATE_VAL; if (rates[i] == r) @@ -681,7 +680,6 @@ ieee80211_iserp_rateset(const struct ieee80211_rateset *rs) ; } return 1; -#undef N } /* |