mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
Enter the network epoch in USB WiFi drivers when processing input
mbuf queues. Submitted by: Idwer Vollering <vidwer gmail.com>
This commit is contained in:
parent
75b893375f
commit
17c328b6ae
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357093
|
@ -1770,6 +1770,7 @@ otus_rxeof(struct usb_xfer *xfer, struct otus_data *data, struct mbufq *rxq)
|
|||
static void
|
||||
otus_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error)
|
||||
{
|
||||
struct epoch_tracker et;
|
||||
struct otus_softc *sc = usbd_xfer_softc(xfer);
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
struct ieee80211_frame *wh;
|
||||
|
@ -1820,6 +1821,7 @@ otus_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error)
|
|||
* callback and safe to unlock.
|
||||
*/
|
||||
OTUS_UNLOCK(sc);
|
||||
NET_EPOCH_ENTER(et);
|
||||
while ((m = mbufq_dequeue(&scrx)) != NULL) {
|
||||
wh = mtod(m, struct ieee80211_frame *);
|
||||
ni = ieee80211_find_rxnode(ic,
|
||||
|
@ -1832,6 +1834,7 @@ otus_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error)
|
|||
} else
|
||||
(void)ieee80211_input_mimo_all(ic, m);
|
||||
}
|
||||
NET_EPOCH_EXIT(et);
|
||||
#ifdef IEEE80211_SUPPORT_SUPERG
|
||||
ieee80211_ff_age_all(ic, 100);
|
||||
#endif
|
||||
|
|
|
@ -363,6 +363,7 @@ rtwn_rx_frame(struct rtwn_softc *sc, struct mbuf *m)
|
|||
void
|
||||
rtwn_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error)
|
||||
{
|
||||
struct epoch_tracker et;
|
||||
struct rtwn_usb_softc *uc = usbd_xfer_softc(xfer);
|
||||
struct rtwn_softc *sc = &uc->uc_sc;
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
|
@ -399,6 +400,7 @@ rtwn_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error)
|
|||
* ieee80211_input() because here is at the end of a USB
|
||||
* callback and safe to unlock.
|
||||
*/
|
||||
NET_EPOCH_ENTER(et);
|
||||
while (m != NULL) {
|
||||
next = m->m_nextpkt;
|
||||
m->m_nextpkt = NULL;
|
||||
|
@ -416,6 +418,7 @@ rtwn_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error)
|
|||
RTWN_LOCK(sc);
|
||||
m = next;
|
||||
}
|
||||
NET_EPOCH_EXIT(et);
|
||||
break;
|
||||
default:
|
||||
/* needs it to the inactive queue due to a error. */
|
||||
|
|
|
@ -2552,6 +2552,7 @@ rsu_rxeof(struct usb_xfer *xfer, struct rsu_data *data)
|
|||
static void
|
||||
rsu_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error)
|
||||
{
|
||||
struct epoch_tracker et;
|
||||
struct rsu_softc *sc = usbd_xfer_softc(xfer);
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
struct ieee80211_node *ni;
|
||||
|
@ -2586,6 +2587,7 @@ rsu_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error)
|
|||
* ieee80211_input() because here is at the end of a USB
|
||||
* callback and safe to unlock.
|
||||
*/
|
||||
NET_EPOCH_ENTER(et);
|
||||
while (m != NULL) {
|
||||
next = m->m_next;
|
||||
m->m_next = NULL;
|
||||
|
@ -2604,6 +2606,7 @@ rsu_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error)
|
|||
RSU_LOCK(sc);
|
||||
m = next;
|
||||
}
|
||||
NET_EPOCH_EXIT(et);
|
||||
break;
|
||||
default:
|
||||
/* needs it to the inactive queue due to a error. */
|
||||
|
|
Loading…
Reference in a new issue