diff options
author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2022-02-26 10:21:42 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2022-04-06 08:52:14 +0200 |
commit | 4a5fb1bbcdf1cccae1f6b9c0277b3796b2a468ef (patch) | |
tree | 73f7dc8e436a7cc61f8a7d270067f9cb46cc1daf /drivers/net/wireless/silabs/wfx/queue.h | |
parent | Linux 5.18-rc1 (diff) | |
download | linux-4a5fb1bbcdf1cccae1f6b9c0277b3796b2a468ef.tar.xz linux-4a5fb1bbcdf1cccae1f6b9c0277b3796b2a468ef.zip |
wfx: get out from the staging area
The wfx driver is now mature enough to leave the staging area.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Diffstat (limited to 'drivers/net/wireless/silabs/wfx/queue.h')
-rw-r--r-- | drivers/net/wireless/silabs/wfx/queue.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/drivers/net/wireless/silabs/wfx/queue.h b/drivers/net/wireless/silabs/wfx/queue.h new file mode 100644 index 000000000000..4731debca93d --- /dev/null +++ b/drivers/net/wireless/silabs/wfx/queue.h @@ -0,0 +1,44 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Queue between the tx operation and the bh workqueue. + * + * Copyright (c) 2017-2020, Silicon Laboratories, Inc. + * Copyright (c) 2010, ST-Ericsson + */ +#ifndef WFX_QUEUE_H +#define WFX_QUEUE_H + +#include <linux/skbuff.h> +#include <linux/atomic.h> + +struct wfx_dev; +struct wfx_vif; + +struct wfx_queue { + struct sk_buff_head normal; + struct sk_buff_head cab; /* Content After (DTIM) Beacon */ + atomic_t pending_frames; + int priority; +}; + +void wfx_tx_lock(struct wfx_dev *wdev); +void wfx_tx_unlock(struct wfx_dev *wdev); +void wfx_tx_flush(struct wfx_dev *wdev); +void wfx_tx_lock_flush(struct wfx_dev *wdev); + +void wfx_tx_queues_init(struct wfx_vif *wvif); +void wfx_tx_queues_check_empty(struct wfx_vif *wvif); +bool wfx_tx_queues_has_cab(struct wfx_vif *wvif); +void wfx_tx_queues_put(struct wfx_vif *wvif, struct sk_buff *skb); +struct wfx_hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev); + +bool wfx_tx_queue_empty(struct wfx_vif *wvif, struct wfx_queue *queue); +void wfx_tx_queue_drop(struct wfx_vif *wvif, struct wfx_queue *queue, + struct sk_buff_head *dropped); + +struct sk_buff *wfx_pending_get(struct wfx_dev *wdev, u32 packet_id); +void wfx_pending_drop(struct wfx_dev *wdev, struct sk_buff_head *dropped); +unsigned int wfx_pending_get_pkt_us_delay(struct wfx_dev *wdev, struct sk_buff *skb); +void wfx_pending_dump_old_frames(struct wfx_dev *wdev, unsigned int limit_ms); + +#endif |