Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src-draft/trunk]: src/sys/dev/pci Unify send queues same as iwm(4).
details: https://anonhg.NetBSD.org/src-all/rev/a4b9b69a98e1
branches: trunk
changeset: 376436:a4b9b69a98e1
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Sun Jun 18 15:06:55 2023 +1000
description:
Unify send queues same as iwm(4).
diffstat:
sys/dev/pci/if_iwn.c | 14 +++++++++++---
sys/dev/pci/if_iwnvar.h | 1 +
2 files changed, 12 insertions(+), 3 deletions(-)
diffs (63 lines):
diff -r 7ce53837fbd8 -r a4b9b69a98e1 sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c Sun Jun 18 15:05:48 2023 +1000
+++ b/sys/dev/pci/if_iwn.c Sun Jun 18 15:06:55 2023 +1000
@@ -698,6 +698,10 @@ iwn_config_complete(device_t self)
ic->ic_phytype = IEEE80211_T_OFDM; /* not only, but not used */
ic->ic_opmode = IEEE80211_M_STA; /* default to BSS mode */
+ /* init radio send queue */
+ IFQ_SET_MAXLEN(&sc->sc_sendq, IFQ_MAXLEN);
+ IFQ_LOCK_INIT(&sc->sc_sendq);
+
/*
* Set device capabilities.
* XXX OpenBSD has IEEE80211_C_WEP, IEEE80211_C_RSN, and
@@ -3398,7 +3402,7 @@ static int
iwn_transmit(struct ieee80211com *ic, struct mbuf *m)
{
struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
- //struct iwn_softc *sc = vap->iv_ic->ic_softc;
+ struct iwn_softc *sc = vap->iv_ic->ic_softc;
int s;
size_t pktlen = m->m_pkthdr.len;
@@ -3408,7 +3412,8 @@ iwn_transmit(struct ieee80211com *ic, st
s = splnet();
- IF_ENQUEUE(&vap->iv_ifp->if_snd, m);
+ IF_ENQUEUE(&sc->sc_sendq, m);
+ //IF_ENQUEUE(&vap->iv_ifp->if_snd, m);
if_statadd(vap->iv_ifp, if_obytes, pktlen);
if (mcast)
if_statinc(vap->iv_ifp, if_omcasts);
@@ -3800,7 +3805,8 @@ iwn_start(struct ifnet *ifp)
}
/* Encapsulate and send data frames. */
- IFQ_DEQUEUE(&ifp->if_snd, m);
+ IF_POLL(&sc->sc_sendq, m);
+ //IFQ_DEQUEUE(&ifp->if_snd, m);
if (m == NULL)
break;
if (m->m_len < sizeof (*eh) &&
@@ -3849,6 +3855,8 @@ iwn_start(struct ifnet *ifp)
continue;
}
+ IF_DEQUEUE(&sc->sc_sendq, m);
+
sc->sc_tx_timer = 5;
ifp->if_timer = 1;
}
diff -r 7ce53837fbd8 -r a4b9b69a98e1 sys/dev/pci/if_iwnvar.h
--- a/sys/dev/pci/if_iwnvar.h Sun Jun 18 15:05:48 2023 +1000
+++ b/sys/dev/pci/if_iwnvar.h Sun Jun 18 15:06:55 2023 +1000
@@ -201,6 +201,7 @@ struct iwn_softc {
struct ethercom sc_ec;
struct ieee80211com sc_ic;
+ struct ifqueue sc_sendq;
struct ieee80211_amrr amrr;
uint8_t fixed_ridx;
Home |
Main Index |
Thread Index |
Old Index