diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2016-01-27 17:26:12 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-02-24 11:04:30 +0300 |
commit | f2ac7e301ae6397669ff3f79e691942a9b5d2f39 (patch) | |
tree | c4bc882bf5deb92283c0de07cca357bde008b402 /include/net | |
parent | dfdfc2beb0dd7e3a067d2eeacb4623cb48e77658 (diff) | |
download | linux-f2ac7e301ae6397669ff3f79e691942a9b5d2f39.tar.xz |
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>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/mac80211.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index dbcd69a6bfda..fd35fc4d7127 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -5596,4 +5596,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 */ |