netif_stop_queue(dev); /* XXX re-enabled by ath_newstate */
dev->flags &= ~IFF_RUNNING; /* NB: avoid recursion */
ieee80211_stop_running(ic); /* stop all VAPs */
netif_stop_queue(dev); /* XXX re-enabled by ath_newstate */
dev->flags &= ~IFF_RUNNING; /* NB: avoid recursion */
ieee80211_stop_running(ic); /* stop all VAPs */
return ath_keyset(sc, k, mac, vap->iv_bss);
}
return ath_keyset(sc, k, mac, vap->iv_bss);
}
/*
* Block/unblock tx+rx processing while a key change is done.
* We assume the caller serializes key management operations
/*
* Block/unblock tx+rx processing while a key change is done.
* We assume the caller serializes key management operations
+ * so we only need to worry about synchronization with other
+ * uses that originate in the driver.
+ */
++#define IS_UP(_dev) \
++ (((_dev)->flags & (IFF_RUNNING|IFF_UP)) == (IFF_RUNNING|IFF_UP))
+ static void
+ ath_key_update_begin(struct ieee80211vap *vap)
+ {
+@@ -4032,14 +4105,9 @@
* When called from the rx tasklet we cannot use
* tasklet_disable because it will block waiting
* for us to complete execution.
* When called from the rx tasklet we cannot use
* tasklet_disable because it will block waiting
* for us to complete execution.
*/
- if (!in_softirq())
- tasklet_disable(&sc->sc_rxtq);
*/
- if (!in_softirq())
- tasklet_disable(&sc->sc_rxtq);
+- netif_stop_queue(dev);
++ if (IS_UP(vap->iv_dev))
++ netif_stop_queue(dev);
+ static void
+@@ -4051,9 +4119,9 @@
#endif
DPRINTF(sc, ATH_DEBUG_KEYCACHE, "End\n");
#endif
DPRINTF(sc, ATH_DEBUG_KEYCACHE, "End\n");
- if (!in_softirq()) /* NB: see above */
- tasklet_enable(&sc->sc_rxtq);
+
- if (!in_softirq()) /* NB: see above */
- tasklet_enable(&sc->sc_rxtq);
+
-+ if (dev->flags&IFF_RUNNING)
++ if (IS_UP(vap->iv_dev))
+ netif_wake_queue(dev);
}
/*
+ netif_wake_queue(dev);
}
/*
struct ieee80211com *ic = &sc->sc_ic;
struct ath_hal *ah = sc ? sc->sc_ah : NULL;
struct ath_desc *ds;
struct ieee80211com *ic = &sc->sc_ic;
struct ath_hal *ah = sc ? sc->sc_ah : NULL;
struct ath_desc *ds;
unsigned int len;
int type;
u_int phyerr;
unsigned int len;
int type;
u_int phyerr;
do {
bf = STAILQ_FIRST(&sc->sc_rxbuf);
if (bf == NULL) { /* XXX ??? can this happen */
do {
bf = STAILQ_FIRST(&sc->sc_rxbuf);
if (bf == NULL) { /* XXX ??? can this happen */
/* NB: never process the self-linked entry at the end */
break;
}
/* NB: never process the self-linked entry at the end */
break;
}
skb = bf->bf_skb;
if (skb == NULL) {
EPRINTF(sc, "Dropping; buffer contains NULL skbuff.\n");
skb = bf->bf_skb;
if (skb == NULL) {
EPRINTF(sc, "Dropping; buffer contains NULL skbuff.\n");
sc->sc_stats.ast_rx_phyerr++;
phyerr = rs->rs_phyerr & 0x1f;
sc->sc_stats.ast_rx_phy[phyerr]++;
sc->sc_stats.ast_rx_phyerr++;
phyerr = rs->rs_phyerr & 0x1f;
sc->sc_stats.ast_rx_phy[phyerr]++;
}
if (rs->rs_status & HAL_RXERR_DECRYPT) {
/*
}
if (rs->rs_status & HAL_RXERR_DECRYPT) {
/*
STAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list);
ATH_RXBUF_UNLOCK_IRQ(sc);
} while (ath_rxbuf_init(sc, bf) == 0);
STAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list);
ATH_RXBUF_UNLOCK_IRQ(sc);
} while (ath_rxbuf_init(sc, bf) == 0);
{
struct net_device *dev = (struct net_device *)data;
struct ath_softc *sc = dev->priv;
{
struct net_device *dev = (struct net_device *)data;
struct ath_softc *sc = dev->priv;
netif_wake_queue(dev);
if (sc->sc_softled)
netif_wake_queue(dev);
if (sc->sc_softled)
{
struct net_device *dev = (struct net_device *)data;
struct ath_softc *sc = dev->priv;
{
struct net_device *dev = (struct net_device *)data;
struct ath_softc *sc = dev->priv;
/*
* Process each active queue.
*/
/*
* Process each active queue.
*/
if (sc->sc_uapsdq && txqactive(sc->sc_ah, sc->sc_uapsdq->axq_qnum))
ath_tx_processq(sc, sc->sc_uapsdq);
if (sc->sc_uapsdq && txqactive(sc->sc_ah, sc->sc_uapsdq->axq_qnum))
ath_tx_processq(sc, sc->sc_uapsdq);
netif_wake_queue(dev);
if (sc->sc_softled)
netif_wake_queue(dev);
if (sc->sc_softled)
struct net_device *dev = (struct net_device *)data;
struct ath_softc *sc = dev->priv;
unsigned int i;
struct net_device *dev = (struct net_device *)data;
struct ath_softc *sc = dev->priv;
unsigned int i;
netif_wake_queue(dev);
if (sc->sc_softled)
netif_wake_queue(dev);
if (sc->sc_softled)
dev->mtu = mtu;
if ((dev->flags & IFF_RUNNING) && !sc->sc_invalid) {
/* NB: the rx buffers may need to be reallocated */
dev->mtu = mtu;
if ((dev->flags & IFF_RUNNING) && !sc->sc_invalid) {
/* NB: the rx buffers may need to be reallocated */