Lines 2411-2416
Link Here
|
2411 |
static int |
2411 |
static int |
2412 |
wpi_cmd2(struct wpi_softc *sc, struct wpi_buf *buf) |
2412 |
wpi_cmd2(struct wpi_softc *sc, struct wpi_buf *buf) |
2413 |
{ |
2413 |
{ |
|
|
2414 |
struct ifnet *ifp = sc->sc_ifp; |
2414 |
struct ieee80211_frame *wh; |
2415 |
struct ieee80211_frame *wh; |
2415 |
struct wpi_tx_cmd *cmd; |
2416 |
struct wpi_tx_cmd *cmd; |
2416 |
struct wpi_tx_data *data; |
2417 |
struct wpi_tx_data *data; |
Lines 2522-2530
Link Here
|
2522 |
|
2523 |
|
2523 |
if (ring->qid < WPI_CMD_QUEUE_NUM) { |
2524 |
if (ring->qid < WPI_CMD_QUEUE_NUM) { |
2524 |
/* Mark TX ring as full if we reach a certain threshold. */ |
2525 |
/* Mark TX ring as full if we reach a certain threshold. */ |
2525 |
if (++ring->queued > WPI_TX_RING_HIMARK) |
2526 |
if (++ring->queued > WPI_TX_RING_HIMARK) { |
2526 |
sc->qfullmsk |= 1 << ring->qid; |
2527 |
sc->qfullmsk |= 1 << ring->qid; |
2527 |
|
2528 |
|
|
|
2529 |
IF_LOCK(&ifp->if_snd); |
2530 |
ifp->if_drv_flags |= IFF_DRV_OACTIVE; |
2531 |
IF_UNLOCK(&ifp->if_snd); |
2532 |
} |
2533 |
|
2528 |
callout_reset(&sc->tx_timeout, 5*hz, wpi_tx_timeout, sc); |
2534 |
callout_reset(&sc->tx_timeout, 5*hz, wpi_tx_timeout, sc); |
2529 |
} |
2535 |
} |
2530 |
|
2536 |
|
Lines 2873-2896
Link Here
|
2873 |
struct ieee80211_node *ni; |
2879 |
struct ieee80211_node *ni; |
2874 |
struct mbuf *m; |
2880 |
struct mbuf *m; |
2875 |
|
2881 |
|
|
|
2882 |
WPI_LOCK(sc); |
2876 |
DPRINTF(sc, WPI_DEBUG_XMIT, "%s: called\n", __func__); |
2883 |
DPRINTF(sc, WPI_DEBUG_XMIT, "%s: called\n", __func__); |
2877 |
|
2884 |
|
2878 |
IF_LOCK(&ifp->if_snd); |
|
|
2879 |
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || |
2880 |
(ifp->if_drv_flags & IFF_DRV_OACTIVE)) { |
2881 |
IF_UNLOCK(&ifp->if_snd); |
2882 |
return; |
2883 |
} |
2884 |
IF_UNLOCK(&ifp->if_snd); |
2885 |
|
2886 |
WPI_LOCK(sc); |
2887 |
for (;;) { |
2885 |
for (;;) { |
2888 |
if (sc->qfullmsk != 0) { |
2886 |
IF_LOCK(&ifp->if_snd); |
2889 |
IF_LOCK(&ifp->if_snd); |
2887 |
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || |
2890 |
ifp->if_drv_flags |= IFF_DRV_OACTIVE; |
2888 |
(ifp->if_drv_flags & IFF_DRV_OACTIVE)) { |
2891 |
IF_UNLOCK(&ifp->if_snd); |
2889 |
IF_UNLOCK(&ifp->if_snd); |
2892 |
break; |
2890 |
break; |
2893 |
} |
2891 |
} |
|
|
2892 |
IF_UNLOCK(&ifp->if_snd); |
2893 |
|
2894 |
IFQ_DRV_DEQUEUE(&ifp->if_snd, m); |
2894 |
IFQ_DRV_DEQUEUE(&ifp->if_snd, m); |
2895 |
if (m == NULL) |
2895 |
if (m == NULL) |
2896 |
break; |
2896 |
break; |
Lines 2902-2910
Link Here
|
2902 |
if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); |
2902 |
if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); |
2903 |
} |
2903 |
} |
2904 |
} |
2904 |
} |
2905 |
WPI_UNLOCK(sc); |
|
|
2906 |
|
2905 |
|
2907 |
DPRINTF(sc, WPI_DEBUG_XMIT, "%s: done\n", __func__); |
2906 |
DPRINTF(sc, WPI_DEBUG_XMIT, "%s: done\n", __func__); |
|
|
2907 |
WPI_UNLOCK(sc); |
2908 |
} |
2908 |
} |
2909 |
|
2909 |
|
2910 |
static void |
2910 |
static void |