Page MenuHomeFreeBSD

D2621.id.diff
No OneTemporary

D2621.id.diff

Index: head/sys/net80211/ieee80211_output.c
===================================================================
--- head/sys/net80211/ieee80211_output.c
+++ head/sys/net80211/ieee80211_output.c
@@ -132,7 +132,7 @@
{
struct ieee80211com *ic = vap->iv_ic;
struct ifnet *ifp = vap->iv_ifp;
- int error;
+ int error, len, mcast;
if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) &&
(m->m_flags & M_PWR_SAV) == 0) {
@@ -142,7 +142,8 @@
* the frame back when the time is right.
* XXX lose WDS vap linkage?
*/
- (void) ieee80211_pwrsave(ni, m);
+ if (ieee80211_pwrsave(ni, m) != 0)
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
ieee80211_free_node(ni);
/*
@@ -171,6 +172,8 @@
* interface it (might have been) received on.
*/
m->m_pkthdr.rcvif = (void *)ni;
+ mcast = (m->m_flags & (M_MCAST | M_BCAST)) ? 1: 0;
+ len = m->m_pkthdr.len;
BPF_MTAP(ifp, m); /* 802.3 tx */
@@ -236,7 +239,7 @@
/* NB: stat+msg handled in ieee80211_encap */
IEEE80211_TX_UNLOCK(ic);
ieee80211_free_node(ni);
- /* XXX better status? */
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
return (ENOBUFS);
}
}
@@ -250,8 +253,11 @@
if (error != 0) {
/* NB: IFQ_HANDOFF reclaims mbuf */
ieee80211_free_node(ni);
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
} else {
if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
+ if_inc_counter(ifp, IFCOUNTER_OMCASTS, mcast);
+ if_inc_counter(ifp, IFCOUNTER_OBYTES, len);
}
ic->ic_lastdata = ticks;
@@ -315,6 +321,7 @@
eh->ether_dhost, "mcast", "%s", "on DWDS");
vap->iv_stats.is_dwds_mcast++;
m_freem(m);
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
/* XXX better status? */
return (ENOBUFS);
}
@@ -397,7 +404,8 @@
* for transmit.
*/
ic->ic_lastdata = ticks;
- (void) ieee80211_pwrsave(ni, m);
+ if (ieee80211_pwrsave(ni, m) != 0)
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
ieee80211_free_node(ni);
ieee80211_new_state(vap, IEEE80211_S_RUN, 0);
return (0);
@@ -429,9 +437,9 @@
IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT,
"%s: ignore queue, parent %s not up+running\n",
__func__, parent->if_xname);
- /* XXX stat */
m_freem(m);
- return (EINVAL);
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
+ return (ENETDOWN);
}
/*
@@ -453,7 +461,8 @@
IEEE80211_UNLOCK(ic);
ifp->if_drv_flags |= IFF_DRV_OACTIVE;
m_freem(m);
- return (EINVAL);
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
+ return (ENETDOWN);
}
IEEE80211_UNLOCK(ic);
}
Index: head/sys/net80211/ieee80211_wds.c
===================================================================
--- head/sys/net80211/ieee80211_wds.c
+++ head/sys/net80211/ieee80211_wds.c
@@ -301,8 +301,12 @@
/* NB: IFQ_HANDOFF reclaims mbuf */
if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
ieee80211_free_node(ni);
- } else
+ } else {
if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
+ if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1);
+ if_inc_counter(ifp, IFCOUNTER_OBYTES,
+ m->m_pkthdr.len);
+ }
}
}

File Metadata

Mime Type
text/plain
Expires
Fri, Jul 10, 11:11 AM (2 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34926418
Default Alt Text
D2621.id.diff (2 KB)

Event Timeline