-/* $OpenBSD: ieee80211_input.c,v 1.133 2015/03/14 03:38:51 jsg Exp $ */
+/* $OpenBSD: ieee80211_input.c,v 1.134 2015/05/26 15:34:00 mpi Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
!(ic->ic_flags & IEEE80211_F_NOBRIDGE) &&
eh->ether_type != htons(ETHERTYPE_PAE)) {
struct ieee80211_node *ni1;
- int error, len;
if (ETHER_IS_MULTICAST(eh->ether_dhost)) {
m1 = m_copym2(m, 0, M_COPYALL, M_DONTWAIT);
}
}
if (m1 != NULL) {
- len = m1->m_pkthdr.len;
- IFQ_ENQUEUE(&ifp->if_snd, m1, NULL, error);
- if (error)
- ifp->if_oerrors++;
- else {
- if (m != NULL)
- ifp->if_omcasts++;
- ifp->if_obytes += len;
- if_start(ifp);
- }
+ if (if_output(ifp, m1))
+ ifp->if_oerrors++;
}
}
#endif
-/* $OpenBSD: ieee80211_output.c,v 1.94 2015/03/14 03:38:51 jsg Exp $ */
+/* $OpenBSD: ieee80211_output.c,v 1.95 2015/05/26 15:34:00 mpi Exp $ */
/* $NetBSD: ieee80211_output.c,v 1.13 2004/05/31 11:02:55 dyoung Exp $ */
/*-
{
struct ieee80211_frame *wh;
struct m_tag *mtag;
- int s, len, error = 0;
- u_short mflags;
+ int error = 0;
/* Interface has to be up and running */
if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) !=
IEEE80211_FC0_TYPE_CTL)
return (EINVAL);
- /*
- * Queue message on interface without adding any
- * further headers, and start output if interface not
- * yet active.
- */
- mflags = m->m_flags;
- len = m->m_pkthdr.len;
- s = splnet();
- IFQ_ENQUEUE(&ifp->if_snd, m, NULL, error);
- if (error) {
- /* mbuf is already freed */
- splx(s);
- printf("%s: failed to queue raw tx frame\n",
- ifp->if_xname);
- return (error);
- }
- ifp->if_obytes += len;
- if (mflags & M_MCAST)
- ifp->if_omcasts++;
- if ((ifp->if_flags & IFF_OACTIVE) == 0)
- (*ifp->if_start)(ifp);
- splx(s);
-
- return (error);
+ return (if_output(ifp, m));
}
fallback: