diff options
author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2019-09-19 14:25:42 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-04 10:46:10 +0200 |
commit | 4f8b7fabb15df3658564a98971fc67029be1815d (patch) | |
tree | 6817489a4dd84c269891c56763f99a5386ea40b1 /drivers/staging/wfx/bh.c | |
parent | e16e7f0716a6ba9a690fc5229a6e35e00e03b805 (diff) |
staging: wfx: allow to send commands to chip
Chip has multiple input buffers and can handle multiple 802.11 frames
in parallel. However, other HIF command must be sent sequentially.
wsm_send_cmd() handles these requests.
This commit also add send_hif_cmd in debugfs. This file allows to send
arbitrary commands to chip. It can be used for debug and testing.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20190919142527.31797-12-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/bh.c')
-rw-r--r-- | drivers/staging/wfx/bh.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index c40da3f1f25d..c94c9c401a69 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -190,7 +190,10 @@ static int bh_work_tx(struct wfx_dev *wdev, int max_msg) for (i = 0; i < max_msg; i++) { hif = NULL; if (wdev->hif.tx_buffers_used < wdev->hw_caps.num_inp_ch_bufs) { - /* FIXME: get queued data */ + if (try_wait_for_completion(&wdev->hif_cmd.ready)) { + WARN(!mutex_is_locked(&wdev->hif_cmd.lock), "data locking error"); + hif = wdev->hif_cmd.buf_send; + } } if (!hif) return i; |