diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-12 08:41:51 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-29 02:07:00 +0300 |
commit | a27b9f96f21a2f15c423cca745f65de3db61e364 (patch) | |
tree | 31703fb9de80eb03279eaeb730d279296979cc26 /drivers/net/wireless/libertas/cmdresp.c | |
parent | 23d36eec263d2c913ee651dc43472524397e4a0b (diff) | |
download | linux-a27b9f96f21a2f15c423cca745f65de3db61e364.tar.xz |
libertas: slight cleanup of netif queue stop/wake
In particular, we shouldn't be waking the queues in lbs_host_to_card_done()
any more.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmdresp.c')
-rw-r--r-- | drivers/net/wireless/libertas/cmdresp.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c index 53f73c4abdd0..a809f8f9997b 100644 --- a/drivers/net/wireless/libertas/cmdresp.c +++ b/drivers/net/wireless/libertas/cmdresp.c @@ -43,14 +43,15 @@ void lbs_mac_event_disconnected(struct lbs_private *priv) msleep_interruptible(1000); wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); - /* Free Tx and Rx packets */ - kfree_skb(priv->currenttxskb); - priv->currenttxskb = NULL; - /* report disconnect to upper layer */ netif_stop_queue(priv->dev); netif_carrier_off(priv->dev); + /* Free Tx and Rx packets */ + kfree_skb(priv->currenttxskb); + priv->currenttxskb = NULL; + priv->tx_pending_len = 0; + /* reset SNR/NF/RSSI values */ memset(priv->SNR, 0x00, sizeof(priv->SNR)); memset(priv->NF, 0x00, sizeof(priv->NF)); @@ -883,9 +884,10 @@ int lbs_process_event(struct lbs_private *priv) } lbs_pr_info("EVENT: MESH_AUTO_STARTED\n"); priv->mesh_connect_status = LBS_CONNECTED; - if (priv->mesh_open == 1) { - netif_wake_queue(priv->mesh_dev); + if (priv->mesh_open) { netif_carrier_on(priv->mesh_dev); + if (!priv->tx_pending_len) + netif_wake_queue(priv->mesh_dev); } priv->mode = IW_MODE_ADHOC; schedule_work(&priv->sync_channel); |