Lines Matching refs:sc

89 	struct rtwn_softc *sc = &pc->pc_sc;
93 struct ieee80211com *ic = &sc->sc_ic;
100 RTWN_DPRINTF(sc, RTWN_DEBUG_RECV_DESC,
114 RTWN_DPRINTF(sc, RTWN_DEBUG_RECV,
123 RTWN_DPRINTF(sc, RTWN_DEBUG_RECV,
133 device_printf(sc->sc_dev, "%s: could not allocate RX mbuf\n",
150 device_get_name(sc->sc_dev));
160 ni = rtwn_rx_common(sc, m, rx_desc);
162 RTWN_DPRINTF(sc, RTWN_DEBUG_RECV,
167 RTWN_UNLOCK(sc);
178 RTWN_LOCK(sc);
223 struct rtwn_softc *sc = &pc->pc_sc;
225 if (sc->sc_ratectl != RTWN_RATECTL_NET80211) {
227 device_printf(sc->sc_dev,
229 __func__, sc->sc_ratectl);
233 RTWN_NT_LOCK(sc);
234 rtwn_handle_tx_report(sc, pc->pc_rx_buf, len);
235 RTWN_NT_UNLOCK(sc);
241 if (sc->sc_tx_n_active > 0 && --sc->sc_tx_n_active <= 1)
242 rtwn_cmd_sleepable(sc, NULL, 0, rtwn_ff_flush_all);
253 rtwn_pci_tx_done(struct rtwn_softc *sc, int qid)
255 struct rtwn_pci_softc *pc = RTWN_PCI_SOFTC(sc);
260 RTWN_DPRINTF(sc, RTWN_DEBUG_INTR, "%s: qid %d, last %d, cur %d\n",
269 ((uint8_t *)ring->desc + sc->txdesc_len * ring->last);
295 sc->sc_tx_timer = 5;
297 sc->sc_tx_timer = 0;
301 if ((sc->qfullmsk & (1 << qid)) != 0 &&
303 sc->qfullmsk &= ~(1 << qid);
304 rtwn_start(sc);
313 if (sc->sc_ratectl != RTWN_RATECTL_NET80211 && ring->queued <= 1) {
319 rtwn_cmd_sleepable(sc, NULL, 0, rtwn_ff_flush_all);
325 rtwn_pci_rx_done(struct rtwn_softc *sc)
327 struct rtwn_pci_softc *pc = RTWN_PCI_SOFTC(sc);
344 switch (rtwn_classify_intr(sc, pc->pc_rx_buf, len)) {
364 if (!(sc->sc_flags & RTWN_RUNNING))
379 struct rtwn_softc *sc = arg;
380 struct rtwn_pci_softc *pc = RTWN_PCI_SOFTC(sc);
383 RTWN_LOCK(sc);
386 RTWN_DPRINTF(sc, RTWN_DEBUG_INTR, "%s: status %08X, tx_rings %08X\n",
396 rtwn_pci_rx_done(sc);
397 if (!(sc->sc_flags & RTWN_RUNNING))
404 rtwn_pci_tx_done(sc, i);
406 if (sc->sc_flags & RTWN_RUNNING)
409 RTWN_UNLOCK(sc);