diff options
author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2020-04-01 13:03:53 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-13 08:55:36 +0200 |
commit | b6ef154973384439c663f8c5fde0eafa51e54309 (patch) | |
tree | 332be66ac7efde530bf71326df0c5908362d8cd7 /drivers/staging/wfx/queue.c | |
parent | bf325befc6038bf8b1a75dff53b7dd375efc4b31 (diff) |
staging: wfx: replace wfx_tx_queues_get_after_dtim() by wfx_tx_queues_has_cab()
It is not necessary to return a skb. Just getting the information if
there is traffic to be sent after DTIM is sufficient.
In add, the acronym "cab" (Content After (DTIM) Beacon) is used in
mac80211 to designate this kind of traffic.
So, make wfx_tx_queues_get_after_dtim() return a boolean and rename
accordingly.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200401110405.80282-21-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/queue.c')
-rw-r--r-- | drivers/staging/wfx/queue.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c index 046aba77618a..4ddb2c7370cd 100644 --- a/drivers/staging/wfx/queue.c +++ b/drivers/staging/wfx/queue.c @@ -264,6 +264,26 @@ unsigned int wfx_pending_get_pkt_us_delay(struct wfx_dev *wdev, return ktime_us_delta(now, tx_priv->xmit_timestamp); } +bool wfx_tx_queues_has_cab(struct wfx_vif *wvif) +{ + struct wfx_dev *wdev = wvif->wdev; + struct ieee80211_tx_info *tx_info; + struct hif_msg *hif; + struct sk_buff *skb; + int i; + + for (i = 0; i < IEEE80211_NUM_ACS; ++i) { + skb_queue_walk(&wdev->tx_queue[i].queue, skb) { + tx_info = IEEE80211_SKB_CB(skb); + hif = (struct hif_msg *)skb->data; + if ((tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) && + (hif->interface == wvif->id)) + return true; + } + } + return false; +} + bool wfx_tx_queues_empty(struct wfx_dev *wdev) { int i; @@ -344,26 +364,6 @@ static struct wfx_queue *wfx_tx_queue_mask_get(struct wfx_vif *wvif) return &wvif->wdev->tx_queue[winner]; } -struct hif_msg *wfx_tx_queues_get_after_dtim(struct wfx_vif *wvif) -{ - struct wfx_dev *wdev = wvif->wdev; - struct ieee80211_tx_info *tx_info; - struct hif_msg *hif; - struct sk_buff *skb; - int i; - - for (i = 0; i < IEEE80211_NUM_ACS; ++i) { - skb_queue_walk(&wdev->tx_queue[i].queue, skb) { - tx_info = IEEE80211_SKB_CB(skb); - hif = (struct hif_msg *)skb->data; - if ((tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) && - (hif->interface == wvif->id)) - return (struct hif_msg *)skb->data; - } - } - return NULL; -} - struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev) { struct sk_buff *skb; |