summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/htc.h
diff options
context:
space:
mode:
authorSujith Manoharan <Sujith.Manoharan@atheros.com>2011-04-13 11:25:29 +0530
committerJohn W. Linville <linville@tuxdriver.com>2011-04-13 15:23:42 -0400
commit8e86a54715c4102a8ed697939de9ebd9715dc59c (patch)
tree6ec011dfe718973e3aeba78176a51302744f71d5 /drivers/net/wireless/ath/ath9k/htc.h
parent3deff76095c4ac4252e27c537db3041f619c23a2 (diff)
downloadblackbird-op-linux-8e86a54715c4102a8ed697939de9ebd9715dc59c.tar.gz
blackbird-op-linux-8e86a54715c4102a8ed697939de9ebd9715dc59c.zip
ath9k_htc: Fix TX queue management
Handle queue start/stop properly by maintaining a counter to check if the pending frame count has exceeded the threshold. Otherwise, packets would be dropped needlessly. While at it, use a simple flag to track queue status and use helper functions too. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/htc.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/htc.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
index 3185fe7568cb..fc4c466e7563 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -262,11 +262,16 @@ struct ath9k_htc_rx {
spinlock_t rxbuflock;
};
-struct ath9k_htc_tx {
- bool tx_queues_stop;
- spinlock_t tx_lock;
+#define ATH9K_HTC_TX_RESERVE 10
+#define ATH9K_HTC_TX_THRESHOLD (MAX_TX_BUF_NUM - ATH9K_HTC_TX_RESERVE)
+
+#define ATH9K_HTC_OP_TX_QUEUES_STOP BIT(0)
+struct ath9k_htc_tx {
+ u8 flags;
+ int queued_cnt;
struct sk_buff_head tx_queue;
+ spinlock_t tx_lock;
};
struct ath9k_htc_tx_ctl {
@@ -532,6 +537,8 @@ int ath9k_htc_cabq_setup(struct ath9k_htc_priv *priv);
int get_hw_qnum(u16 queue, int *hwq_map);
int ath_htc_txq_update(struct ath9k_htc_priv *priv, int qnum,
struct ath9k_tx_queue_info *qinfo);
+void ath9k_htc_check_stop_queues(struct ath9k_htc_priv *priv);
+void ath9k_htc_check_wake_queues(struct ath9k_htc_priv *priv);
int ath9k_rx_init(struct ath9k_htc_priv *priv);
void ath9k_rx_cleanup(struct ath9k_htc_priv *priv);
OpenPOWER on IntegriCloud