Skip to contentSkip to conversation

carl9170: Implement tx_frames_pending mac80211 callback function

PATCH New Christian Lamparter 1 participant 1 message Jul 7, 2011 CARL9170 Linux community wireless driver

lore
Share & tools
lore

Christian Lamparter

author maintainer
#0 lore raw

PATCH 1/1 carl9170: Implement tx_frames_pending mac80211 callback function

Implementing this callback function will cause mac80211 refrain from going to powersave state when there are still untransmitted TX frames in the queues.

---

drivers/net/wireless/ath/carl9170/main.c +8 -0
index 28029a4..7daf47f 100644
@@ -1588,6 +1588,13 @@ static void carl9170_op_sta_notify(struct ieee80211_hw *hw,
 	}
 }
 
+static bool carl9170_tx_frames_pending(struct ieee80211_hw *hw)
+{
+	struct ar9170 *ar = hw->priv;
+
+	return !!atomic_read(&ar->tx_total_queued);
+}
+
 static const struct ieee80211_ops carl9170_ops = {
 	.start			= carl9170_op_start,
 	.stop			= carl9170_op_stop,
@@ -1608,6 +1615,7 @@ static const struct ieee80211_ops carl9170_ops = {
 	.get_survey		= carl9170_op_get_survey,
 	.get_stats		= carl9170_op_get_stats,
 	.ampdu_action		= carl9170_op_ampdu_action,
+	.tx_frames_pending	= carl9170_tx_frames_pending,
 };
 
 void *carl9170_alloc(size_t priv_size)