summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2016-01-27 15:26:12 +0100
committerRajeev Kumar Sirasanagandla <rsirasan@codeaurora.org>2017-01-14 20:15:43 +0530
commitb9a785c74b8cd67761ff898f2de7d93384ecbd98 (patch)
tree8924041809428b4f3f2e96af837aed58247db0d9 /include/net
parent0236a0326d76722f27e2782e5c1840c9e81564f6 (diff)
mac80211: expose txq queue depth and size to drivers
This will allow drivers to make more educated decisions whether to defer transmission or not. Relying on wake_tx_queue() call count implicitly was not possible because it could be called without queued frame count actually changing on software tx aggregation start/stop code paths. It was also not possible to know how long byte-wise queue was without dequeueing. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git Git-commit: f2ac7e301ae6397669ff3f79e691942a9b5d2f39 CRs-Fixed: 1111521 Change-Id: I7b94a9ba2d68ce526a4421cc253829298d1a7620 Signed-off-by: Rajeev Kumar Sirasanagandla <rsirasan@codeaurora.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/mac80211.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 760bc4d5a2cf..14de2a1176ab 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -5467,4 +5467,19 @@ void ieee80211_unreserve_tid(struct ieee80211_sta *sta, u8 tid);
*/
struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
struct ieee80211_txq *txq);
+
+/**
+ * ieee80211_txq_get_depth - get pending frame/byte count of given txq
+ *
+ * The values are not guaranteed to be coherent with regard to each other, i.e.
+ * txq state can change half-way of this function and the caller may end up
+ * with "new" frame_cnt and "old" byte_cnt or vice-versa.
+ *
+ * @txq: pointer obtained from station or virtual interface
+ * @frame_cnt: pointer to store frame count
+ * @byte_cnt: pointer to store byte count
+ */
+void ieee80211_txq_get_depth(struct ieee80211_txq *txq,
+ unsigned long *frame_cnt,
+ unsigned long *byte_cnt);
#endif /* MAC80211_H */