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 improved tx functions required for new stack.
details: https://anonhg.NetBSD.org/src-all/rev/828e1dd7d215
branches: trunk
changeset: 1027302:828e1dd7d215
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Sun May 24 18:59:18 2020 +1000
description:
improved tx functions required for new stack.
diffstat:
sys/dev/pci/if_iwn.c | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
diffs (112 lines):
diff -r df41eb5bde42 -r 828e1dd7d215 sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c Sun May 24 18:58:23 2020 +1000
+++ b/sys/dev/pci/if_iwn.c Sun May 24 18:59:18 2020 +1000
@@ -2164,13 +2164,12 @@
static void
iwn_newassoc(struct ieee80211_node *ni, int isnew)
{
- //struct iwn_softc *sc = ni->ni_ic->ic_ifp->if_softc;
- //struct iwn_node *wn = (void *)ni;
-// uint8_t rate;
-// int ridx, i;
+// struct iwn_softc *sc = ni->ni_ic->ic_ifp->if_softc;
+ struct iwn_node *wn = (void *)ni;
+ uint8_t rate;
+ int ridx, i;
// ieee80211_amrr_node_init(&sc->amrr, &wn->amn);
-#if 0
/* Start at lowest available bit-rate, AMRR will raise. */
ni->ni_txrate = 0;
@@ -2182,7 +2181,6 @@
break;
wn->ridx[i] = ridx;
}
-#endif
}
static int
@@ -3273,7 +3271,7 @@
s = splnet();
- IF_ENQUEUE(&ic->ic_mgtq, 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);
@@ -3322,11 +3320,13 @@
KASSERT(sc != NULL);
KASSERT(m != NULL);
+#if 0
if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
return 0;
if (vap->iv_state != IEEE80211_S_RUN)
return ENXIO;
+#endif
if (m->m_len < sizeof (*eh) &&
(m = m_pullup(m, sizeof (*eh))) == NULL) {
@@ -3334,6 +3334,7 @@
return EIO;
}
eh = mtod(m, struct ether_header *);
+#if 0
/* classify mbuf so we can find which tx ring to use */
if (ieee80211_classify(ni, m) != 0) {
m_freem(m);
@@ -3341,6 +3342,7 @@
if_statinc(ifp, if_oerrors);
return ENOBUFS;
}
+#endif
/* No QoS encapsulation for EAPOL frames. */
ac = (eh->ether_type != htons(ETHERTYPE_PAE)) ?
@@ -3348,11 +3350,13 @@
bpf_mtap3(vap->iv_rawbpf, m, BPF_D_OUT);
+#if 0
if ((m = ieee80211_encap(vap, ni, m)) == NULL) {
ieee80211_free_node(ni);
if_statinc(ifp, if_oerrors);
return ENOMEM;
}
+#endif
if (iwn_tx(sc, m, ni, ac) != 0) {
@@ -3363,10 +3367,12 @@
sc->sc_tx_timer = 5;
ifp->if_timer = 1;
+#if 0
m_freem(m);
ieee80211_free_node(ni);
+#endif
return 0;
}
@@ -3375,7 +3381,7 @@
{
struct ieee80211com *ic = &sc->sc_ic;
struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
- struct iwn_node *wn = (void *)ni;
+ //struct iwn_node *wn = (void *)ni;
struct iwn_tx_ring *ring;
struct iwn_tx_desc *desc;
struct iwn_tx_data *data;
@@ -3383,6 +3389,7 @@
struct iwn_cmd_data *tx;
const struct iwn_rate *rinfo;
struct ieee80211_frame *wh;
+ struct iwn_node *wn = (void *)ni;
struct ieee80211_key *k = NULL;
struct mbuf *m1;
uint32_t flags;
Home |
Main Index |
Thread Index |
Old Index