diff options
author | Javier Cardona <javier@cozybit.com> | 2007-05-25 12:06:56 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-06-11 14:28:38 -0400 |
commit | 51d84f501684db22f5fcc30821cbbde2a0a2f264 (patch) | |
tree | e8cc735e7a285fc753dbee4f6d2cfe7d08d69023 /drivers/net/wireless/libertas/tx.c | |
parent | 32a74b7c8f7b883b532e0e4333b7c3014d3d8fe8 (diff) |
[PATCH] libertas: fixed transmission flow control on the mesh interface
This patch implements proper transmission flow control on mshX.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/tx.c')
-rw-r--r-- | drivers/net/wireless/libertas/tx.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c index 964321fd5e69..e61729f0645a 100644 --- a/drivers/net/wireless/libertas/tx.c +++ b/drivers/net/wireless/libertas/tx.c | |||
@@ -159,6 +159,7 @@ done: | |||
159 | skb_orphan(skb); | 159 | skb_orphan(skb); |
160 | /* stop processing outgoing pkts */ | 160 | /* stop processing outgoing pkts */ |
161 | netif_stop_queue(priv->wlan_dev.netdev); | 161 | netif_stop_queue(priv->wlan_dev.netdev); |
162 | netif_stop_queue(priv->mesh_dev); | ||
162 | /* freeze any packets already in our queues */ | 163 | /* freeze any packets already in our queues */ |
163 | priv->adapter->TxLockFlag = 1; | 164 | priv->adapter->TxLockFlag = 1; |
164 | } else { | 165 | } else { |
@@ -195,10 +196,13 @@ static void wlan_tx_queue(wlan_private *priv, struct sk_buff *skb) | |||
195 | 196 | ||
196 | WARN_ON(priv->adapter->tx_queue_idx >= NR_TX_QUEUE); | 197 | WARN_ON(priv->adapter->tx_queue_idx >= NR_TX_QUEUE); |
197 | adapter->tx_queue_ps[adapter->tx_queue_idx++] = skb; | 198 | adapter->tx_queue_ps[adapter->tx_queue_idx++] = skb; |
198 | if (adapter->tx_queue_idx == NR_TX_QUEUE) | 199 | if (adapter->tx_queue_idx == NR_TX_QUEUE) { |
199 | netif_stop_queue(priv->wlan_dev.netdev); | 200 | netif_stop_queue(priv->wlan_dev.netdev); |
200 | else | 201 | netif_stop_queue(priv->mesh_dev); |
202 | } else { | ||
201 | netif_start_queue(priv->wlan_dev.netdev); | 203 | netif_start_queue(priv->wlan_dev.netdev); |
204 | netif_start_queue(priv->mesh_dev); | ||
205 | } | ||
202 | 206 | ||
203 | spin_unlock(&adapter->txqueue_lock); | 207 | spin_unlock(&adapter->txqueue_lock); |
204 | } | 208 | } |
@@ -279,6 +283,8 @@ void libertas_send_tx_feedback(wlan_private * priv) | |||
279 | libertas_upload_rx_packet(priv, adapter->currenttxskb); | 283 | libertas_upload_rx_packet(priv, adapter->currenttxskb); |
280 | adapter->currenttxskb = NULL; | 284 | adapter->currenttxskb = NULL; |
281 | priv->adapter->TxLockFlag = 0; | 285 | priv->adapter->TxLockFlag = 0; |
282 | if (priv->adapter->connect_status == libertas_connected) | 286 | if (priv->adapter->connect_status == libertas_connected) { |
283 | netif_wake_queue(priv->wlan_dev.netdev); | 287 | netif_wake_queue(priv->wlan_dev.netdev); |
288 | netif_wake_queue(priv->mesh_dev); | ||
289 | } | ||
284 | } | 290 | } |