mirror of
https://github.com/opnsense/src.git
synced 2026-06-03 13:58:30 -04:00
net80211: move net_epoch into net80211
Move the net_epoch into net80211 around the if_input calls and out of the driver (in this first case LinuxKPI). This reduces coverage but also allows us to alloc in calls like (*ampdu_rx_start) which do not actually pass data up the stack. The follow-up commits will revertb65f813c1a,21c4082de9,17c328b6ae,af2441fbc7, and6c3e93cb5afor ath. Sponsored by: The FreeBSD Foundation Tested by: few (rtwn, ath, iwlwifi, ...) Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D42427 (cherry picked from commit de607e3c230be88f6232b9c9fd6c37199648dc8c)
This commit is contained in:
parent
826c28fa98
commit
8e599ff98d
3 changed files with 7 additions and 3 deletions
|
|
@ -4155,7 +4155,6 @@ linuxkpi_ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb,
|
|||
struct ieee80211_sta *sta, struct napi_struct *napi __unused,
|
||||
struct list_head *list __unused)
|
||||
{
|
||||
struct epoch_tracker et;
|
||||
struct lkpi_hw *lhw;
|
||||
struct ieee80211com *ic;
|
||||
struct mbuf *m;
|
||||
|
|
@ -4372,7 +4371,6 @@ skip_device_ts:
|
|||
}
|
||||
#endif
|
||||
|
||||
NET_EPOCH_ENTER(et);
|
||||
if (ni != NULL) {
|
||||
ok = ieee80211_input_mimo(ni, m);
|
||||
ieee80211_free_node(ni);
|
||||
|
|
@ -4382,7 +4380,6 @@ skip_device_ts:
|
|||
ok = ieee80211_input_mimo_all(ic, m);
|
||||
/* mbuf got consumed. */
|
||||
}
|
||||
NET_EPOCH_EXIT(et);
|
||||
|
||||
#ifdef LINUXKPI_DEBUG_80211
|
||||
if (linuxkpi_debug_80211 & D80211_TRACE_RX)
|
||||
|
|
|
|||
|
|
@ -423,6 +423,8 @@ hostap_deliver_data(struct ieee80211vap *vap,
|
|||
(void) ieee80211_vap_xmitpkt(vap, mcopy);
|
||||
}
|
||||
if (m != NULL) {
|
||||
struct epoch_tracker et;
|
||||
|
||||
/*
|
||||
* Mark frame as coming from vap's interface.
|
||||
*/
|
||||
|
|
@ -439,7 +441,9 @@ hostap_deliver_data(struct ieee80211vap *vap,
|
|||
m->m_pkthdr.ether_vtag = ni->ni_vlan;
|
||||
m->m_flags |= M_VLANTAG;
|
||||
}
|
||||
NET_EPOCH_ENTER(et);
|
||||
ifp->if_input(ifp, m);
|
||||
NET_EPOCH_EXIT(et);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -274,6 +274,7 @@ void
|
|||
ieee80211_deliver_data(struct ieee80211vap *vap,
|
||||
struct ieee80211_node *ni, struct mbuf *m)
|
||||
{
|
||||
struct epoch_tracker et;
|
||||
struct ether_header *eh = mtod(m, struct ether_header *);
|
||||
struct ifnet *ifp = vap->iv_ifp;
|
||||
|
||||
|
|
@ -304,7 +305,9 @@ ieee80211_deliver_data(struct ieee80211vap *vap,
|
|||
m->m_pkthdr.ether_vtag = ni->ni_vlan;
|
||||
m->m_flags |= M_VLANTAG;
|
||||
}
|
||||
NET_EPOCH_ENTER(et);
|
||||
ifp->if_input(ifp, m);
|
||||
NET_EPOCH_EXIT(et);
|
||||
}
|
||||
|
||||
struct mbuf *
|
||||
|
|
|
|||
Loading…
Reference in a new issue