Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194157
b: refs/heads/master
c: 7757dfe
h: refs/heads/master
i:
  194155: 11c9209
v: v3
  • Loading branch information
Sujith authored and John W. Linville committed Mar 31, 2010
1 parent 8ab3d5b commit 3b56066
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6335ed0ff8670e6378da41191ab8bda33d1b7ac8
refs/heads/master: 7757dfed5809b03aa61c7d7f5ff8092f85df8583
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/htc.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,9 @@ struct ath9k_htc_priv {
struct sk_buff *beacon;
spinlock_t beacon_lock;

bool tx_queues_stop;
spinlock_t tx_lock;

struct ieee80211_vif *vif;
unsigned int rxfilter;
struct tasklet_struct wmi_tasklet;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath9k/htc_drv_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ static int ath9k_init_priv(struct ath9k_htc_priv *priv, u16 devid)

spin_lock_init(&priv->wmi->wmi_lock);
spin_lock_init(&priv->beacon_lock);
spin_lock_init(&priv->tx_lock);
mutex_init(&priv->mutex);
mutex_init(&priv->aggr_work.mutex);
tasklet_init(&priv->wmi_tasklet, ath9k_wmi_tasklet,
Expand Down
23 changes: 20 additions & 3 deletions trunk/drivers/net/wireless/ath/ath9k/htc_drv_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ static int ath9k_htc_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
{
struct ieee80211_hdr *hdr;
struct ath9k_htc_priv *priv = hw->priv;
int padpos, padsize;
int padpos, padsize, ret;

hdr = (struct ieee80211_hdr *) skb->data;

Expand All @@ -1008,8 +1008,19 @@ static int ath9k_htc_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
memmove(skb->data, skb->data + padsize, padpos);
}

if (ath9k_htc_tx_start(priv, skb) != 0) {
ath_print(ath9k_hw_common(priv->ah), ATH_DBG_XMIT, "Tx failed");
ret = ath9k_htc_tx_start(priv, skb);
if (ret != 0) {
if (ret == -ENOMEM) {
ath_print(ath9k_hw_common(priv->ah), ATH_DBG_XMIT,
"Stopping TX queues\n");
ieee80211_stop_queues(hw);
spin_lock_bh(&priv->tx_lock);
priv->tx_queues_stop = true;
spin_unlock_bh(&priv->tx_lock);
} else {
ath_print(ath9k_hw_common(priv->ah), ATH_DBG_XMIT,
"Tx failed");
}
goto fail_tx;
}

Expand Down Expand Up @@ -1074,6 +1085,12 @@ static int ath9k_htc_start(struct ieee80211_hw *hw)
priv->op_flags &= ~OP_INVALID;
htc_start(priv->htc);

spin_lock_bh(&priv->tx_lock);
priv->tx_queues_stop = false;
spin_unlock_bh(&priv->tx_lock);

ieee80211_wake_queues(hw);

mutex_unlock:
mutex_unlock(&priv->mutex);
return ret;
Expand Down
12 changes: 12 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,18 @@ void ath9k_tx_tasklet(unsigned long data)
/* Send status to mac80211 */
ieee80211_tx_status(priv->hw, skb);
}

/* Wake TX queues if needed */
spin_lock_bh(&priv->tx_lock);
if (priv->tx_queues_stop) {
priv->tx_queues_stop = false;
spin_unlock_bh(&priv->tx_lock);
ath_print(ath9k_hw_common(priv->ah), ATH_DBG_XMIT,
"Waking up TX queues\n");
ieee80211_wake_queues(priv->hw);
return;
}
spin_unlock_bh(&priv->tx_lock);
}

void ath9k_htc_txep(void *drv_priv, struct sk_buff *skb,
Expand Down

0 comments on commit 3b56066

Please sign in to comment.