diff options
Diffstat (limited to 'sys/net80211/ieee80211_hostap.c')
-rw-r--r-- | sys/net80211/ieee80211_hostap.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index a625b4e..832a8b0 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include <sys/sysctl.h> #include <net/if.h> -#include <net/if_var.h> #include <net/if_media.h> #include <net/if_llc.h> #include <net/ethernet.h> @@ -368,7 +367,7 @@ hostap_deliver_data(struct ieee80211vap *vap, /* * Do accounting. */ - if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); + ifp->if_ipackets++; IEEE80211_NODE_STAT(ni, rx_data); IEEE80211_NODE_STAT_ADD(ni, rx_bytes, m->m_pkthdr.len); if (ETHER_IS_MULTICAST(eh->ether_dhost)) { @@ -384,7 +383,7 @@ hostap_deliver_data(struct ieee80211vap *vap, if (m->m_flags & M_MCAST) { mcopy = m_dup(m, M_NOWAIT); if (mcopy == NULL) - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + ifp->if_oerrors++; else mcopy->m_flags |= M_MCAST; } else { @@ -422,7 +421,7 @@ hostap_deliver_data(struct ieee80211vap *vap, if (err) { /* NB: IFQ_HANDOFF reclaims mcopy */ } else { - if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + ifp->if_opackets++; } } } @@ -478,6 +477,7 @@ doprint(struct ieee80211vap *vap, int subtype) static int hostap_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) { +#define HAS_SEQ(type) ((type & 0x4) == 0) struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; struct ifnet *ifp = vap->iv_ifp; @@ -570,7 +570,7 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) IEEE80211_RSSI_LPF(ni->ni_avgrssi, rssi); ni->ni_noise = nf; - if (IEEE80211_HAS_SEQ(type, subtype)) { + if (HAS_SEQ(type)) { uint8_t tid = ieee80211_gettid(wh); if (IEEE80211_QOS_HAS_SEQ(wh) && TID_TO_WME_AC(tid) >= WME_AC_VI) @@ -908,7 +908,7 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) break; } err: - if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); + ifp->if_ierrors++; out: if (m != NULL) { if (need_tap && ieee80211_radiotap_active_vap(vap)) @@ -1736,8 +1736,7 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, ieee80211_probe_curchan(vap, 1); ic->ic_flags_ext &= ~IEEE80211_FEXT_PROBECHAN; } - ieee80211_add_scan(vap, ic->ic_curchan, &scan, wh, - subtype, rssi, nf); + ieee80211_add_scan(vap, &scan, wh, subtype, rssi, nf); return; } /* |