madwifi: fix queue stop/start during key updates
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11923 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
7ec71fbbfe
commit
7f7e354f4c
|
@ -107,7 +107,7 @@
|
||||||
netif_stop_queue(dev); /* XXX re-enabled by ath_newstate */
|
netif_stop_queue(dev); /* XXX re-enabled by ath_newstate */
|
||||||
dev->flags &= ~IFF_RUNNING; /* NB: avoid recursion */
|
dev->flags &= ~IFF_RUNNING; /* NB: avoid recursion */
|
||||||
ieee80211_stop_running(ic); /* stop all VAPs */
|
ieee80211_stop_running(ic); /* stop all VAPs */
|
||||||
@@ -4013,6 +4051,39 @@
|
@@ -4013,12 +4051,47 @@
|
||||||
return ath_keyset(sc, k, mac, vap->iv_bss);
|
return ath_keyset(sc, k, mac, vap->iv_bss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +147,15 @@
|
||||||
/*
|
/*
|
||||||
* Block/unblock tx+rx processing while a key change is done.
|
* Block/unblock tx+rx processing while a key change is done.
|
||||||
* We assume the caller serializes key management operations
|
* We assume the caller serializes key management operations
|
||||||
@@ -4032,13 +4103,7 @@
|
* 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
|
* When called from the rx tasklet we cannot use
|
||||||
* tasklet_disable because it will block waiting
|
* tasklet_disable because it will block waiting
|
||||||
* for us to complete execution.
|
* for us to complete execution.
|
||||||
|
@ -158,10 +166,13 @@
|
||||||
*/
|
*/
|
||||||
- if (!in_softirq())
|
- if (!in_softirq())
|
||||||
- tasklet_disable(&sc->sc_rxtq);
|
- tasklet_disable(&sc->sc_rxtq);
|
||||||
netif_stop_queue(dev);
|
- netif_stop_queue(dev);
|
||||||
|
+ if (IS_UP(vap->iv_dev))
|
||||||
|
+ netif_stop_queue(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4051,9 +4116,9 @@
|
static void
|
||||||
|
@@ -4051,9 +4119,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DPRINTF(sc, ATH_DEBUG_KEYCACHE, "End\n");
|
DPRINTF(sc, ATH_DEBUG_KEYCACHE, "End\n");
|
||||||
|
@ -169,12 +180,12 @@
|
||||||
- if (!in_softirq()) /* NB: see above */
|
- if (!in_softirq()) /* NB: see above */
|
||||||
- tasklet_enable(&sc->sc_rxtq);
|
- tasklet_enable(&sc->sc_rxtq);
|
||||||
+
|
+
|
||||||
+ if (dev->flags&IFF_RUNNING)
|
+ if (IS_UP(vap->iv_dev))
|
||||||
+ netif_wake_queue(dev);
|
+ netif_wake_queue(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -6360,15 +6425,25 @@
|
@@ -6360,15 +6428,25 @@
|
||||||
sc->sc_rxotherant = 0;
|
sc->sc_rxotherant = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +215,7 @@
|
||||||
struct ieee80211com *ic = &sc->sc_ic;
|
struct ieee80211com *ic = &sc->sc_ic;
|
||||||
struct ath_hal *ah = sc ? sc->sc_ah : NULL;
|
struct ath_hal *ah = sc ? sc->sc_ah : NULL;
|
||||||
struct ath_desc *ds;
|
struct ath_desc *ds;
|
||||||
@@ -6378,8 +6453,10 @@
|
@@ -6378,8 +6456,10 @@
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
int type;
|
int type;
|
||||||
u_int phyerr;
|
u_int phyerr;
|
||||||
|
@ -215,7 +226,7 @@
|
||||||
do {
|
do {
|
||||||
bf = STAILQ_FIRST(&sc->sc_rxbuf);
|
bf = STAILQ_FIRST(&sc->sc_rxbuf);
|
||||||
if (bf == NULL) { /* XXX ??? can this happen */
|
if (bf == NULL) { /* XXX ??? can this happen */
|
||||||
@@ -6403,6 +6480,15 @@
|
@@ -6403,6 +6483,15 @@
|
||||||
/* NB: never process the self-linked entry at the end */
|
/* NB: never process the self-linked entry at the end */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -231,7 +242,7 @@
|
||||||
skb = bf->bf_skb;
|
skb = bf->bf_skb;
|
||||||
if (skb == NULL) {
|
if (skb == NULL) {
|
||||||
EPRINTF(sc, "Dropping; buffer contains NULL skbuff.\n");
|
EPRINTF(sc, "Dropping; buffer contains NULL skbuff.\n");
|
||||||
@@ -6450,6 +6536,7 @@
|
@@ -6450,6 +6539,7 @@
|
||||||
sc->sc_stats.ast_rx_phyerr++;
|
sc->sc_stats.ast_rx_phyerr++;
|
||||||
phyerr = rs->rs_phyerr & 0x1f;
|
phyerr = rs->rs_phyerr & 0x1f;
|
||||||
sc->sc_stats.ast_rx_phy[phyerr]++;
|
sc->sc_stats.ast_rx_phy[phyerr]++;
|
||||||
|
@ -239,7 +250,7 @@
|
||||||
}
|
}
|
||||||
if (rs->rs_status & HAL_RXERR_DECRYPT) {
|
if (rs->rs_status & HAL_RXERR_DECRYPT) {
|
||||||
/*
|
/*
|
||||||
@@ -6645,9 +6732,43 @@
|
@@ -6645,9 +6735,43 @@
|
||||||
STAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list);
|
STAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list);
|
||||||
ATH_RXBUF_UNLOCK_IRQ(sc);
|
ATH_RXBUF_UNLOCK_IRQ(sc);
|
||||||
} while (ath_rxbuf_init(sc, bf) == 0);
|
} while (ath_rxbuf_init(sc, bf) == 0);
|
||||||
|
@ -283,7 +294,7 @@
|
||||||
#undef PA2DESC
|
#undef PA2DESC
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8298,12 +8419,24 @@
|
@@ -8298,12 +8422,24 @@
|
||||||
{
|
{
|
||||||
struct net_device *dev = (struct net_device *)data;
|
struct net_device *dev = (struct net_device *)data;
|
||||||
struct ath_softc *sc = dev->priv;
|
struct ath_softc *sc = dev->priv;
|
||||||
|
@ -308,7 +319,7 @@
|
||||||
netif_wake_queue(dev);
|
netif_wake_queue(dev);
|
||||||
|
|
||||||
if (sc->sc_softled)
|
if (sc->sc_softled)
|
||||||
@@ -8319,7 +8452,9 @@
|
@@ -8319,7 +8455,9 @@
|
||||||
{
|
{
|
||||||
struct net_device *dev = (struct net_device *)data;
|
struct net_device *dev = (struct net_device *)data;
|
||||||
struct ath_softc *sc = dev->priv;
|
struct ath_softc *sc = dev->priv;
|
||||||
|
@ -318,7 +329,7 @@
|
||||||
/*
|
/*
|
||||||
* Process each active queue.
|
* Process each active queue.
|
||||||
*/
|
*/
|
||||||
@@ -8340,6 +8475,16 @@
|
@@ -8340,6 +8478,16 @@
|
||||||
if (sc->sc_uapsdq && txqactive(sc->sc_ah, sc->sc_uapsdq->axq_qnum))
|
if (sc->sc_uapsdq && txqactive(sc->sc_ah, sc->sc_uapsdq->axq_qnum))
|
||||||
ath_tx_processq(sc, sc->sc_uapsdq);
|
ath_tx_processq(sc, sc->sc_uapsdq);
|
||||||
|
|
||||||
|
@ -335,7 +346,7 @@
|
||||||
netif_wake_queue(dev);
|
netif_wake_queue(dev);
|
||||||
|
|
||||||
if (sc->sc_softled)
|
if (sc->sc_softled)
|
||||||
@@ -8355,13 +8500,25 @@
|
@@ -8355,13 +8503,25 @@
|
||||||
struct net_device *dev = (struct net_device *)data;
|
struct net_device *dev = (struct net_device *)data;
|
||||||
struct ath_softc *sc = dev->priv;
|
struct ath_softc *sc = dev->priv;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
@ -361,7 +372,7 @@
|
||||||
netif_wake_queue(dev);
|
netif_wake_queue(dev);
|
||||||
|
|
||||||
if (sc->sc_softled)
|
if (sc->sc_softled)
|
||||||
@@ -10296,9 +10453,9 @@
|
@@ -10296,9 +10456,9 @@
|
||||||
dev->mtu = mtu;
|
dev->mtu = mtu;
|
||||||
if ((dev->flags & IFF_RUNNING) && !sc->sc_invalid) {
|
if ((dev->flags & IFF_RUNNING) && !sc->sc_invalid) {
|
||||||
/* NB: the rx buffers may need to be reallocated */
|
/* NB: the rx buffers may need to be reallocated */
|
||||||
|
|
Loading…
Reference in New Issue