From: Stanislaw Gruszka <sgruszka@redhat.com>
To: yhchuang@realtek.com
Cc: kvalo@codeaurora.org, linux-wireless@vger.kernel.org,
briannorris@chromium.org
Subject: Re: [PATCH v2 5/5] rtw88: add BT co-existence support
Date: Mon, 29 Jul 2019 10:12:11 +0200 [thread overview]
Message-ID: <20190729081211.GB2066@redhat.com> (raw)
In-Reply-To: <1564023211-3138-6-git-send-email-yhchuang@realtek.com>
On Thu, Jul 25, 2019 at 10:53:31AM +0800, yhchuang@realtek.com wrote:
> +static struct sk_buff *rtw_coex_info_request(struct rtw_dev *rtwdev,
> + struct rtw_coex_info_req *req)
> +{
> + struct rtw_coex *coex = &rtwdev->coex;
> + struct sk_buff *skb_resp = NULL;
> +
> + mutex_lock(&coex->mutex);
> +
> + rtw_fw_query_bt_mp_info(rtwdev, req);
> +
> + if (!wait_event_timeout(coex->wait, !skb_queue_empty(&coex->queue),
> + COEX_REQUEST_TIMEOUT)) {
> + rtw_err(rtwdev, "coex request time out\n");
> + goto out;
> + }
> +
> + skb_resp = skb_dequeue(&coex->queue);
> + if (!skb_resp) {
> + rtw_err(rtwdev, "failed to get coex info response\n");
> + goto out;
> + }
> +
> +out:
> + mutex_unlock(&coex->mutex);
> + return skb_resp;
> +}
> +
> +static bool rtw_coex_get_bt_scan_type(struct rtw_dev *rtwdev, u8 *scan_type)
> +{
> + struct rtw_coex_info_req req = {0};
> + struct sk_buff *skb;
> + u8 *payload;
> + bool ret = false;
> +
> + req.op_code = BT_MP_INFO_OP_SCAN_TYPE;
> + skb = rtw_coex_info_request(rtwdev, &req);
> + if (!skb)
> + goto out;
> +
> + payload = get_payload_from_coex_resp(skb);
> + *scan_type = GET_COEX_RESP_BT_SCAN_TYPE(payload);
> + ret = true;
> +
> +out:
> + return ret;
> +}
> +
> +static bool rtw_coex_set_lna_constrain_level(struct rtw_dev *rtwdev,
> + u8 lna_constrain_level)
> +{
> + struct rtw_coex_info_req req = {0};
> + struct sk_buff *skb;
> + bool ret = false;
> +
> + req.op_code = BT_MP_INFO_OP_LNA_CONSTRAINT;
> + req.para1 = lna_constrain_level;
> + skb = rtw_coex_info_request(rtwdev, &req);
> + if (!skb)
> + goto out;
Those coex response skb buffers are allocated in rtw_pci_rx_isr(),
but I do not see where they are freed (seems we do not process
them in c2h_work which does dev_kfree_skb()).
Stanislaw
next prev parent reply other threads:[~2019-07-29 8:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-25 2:53 [PATCH v2 0/5] rtw88: add support for BT co-existence mechanism yhchuang
2019-07-25 2:53 ` [PATCH v2 1/5] rtw88: switch specified efuse bank yhchuang
2019-07-25 2:53 ` [PATCH v2 2/5] rtw88: check efuse for BT FT S1 yhchuang
2019-07-25 2:53 ` [PATCH v2 3/5] rtw88: allow c2h operation in irq context yhchuang
2019-07-25 2:53 ` [PATCH v2 4/5] rtw88: enclose c2h cmd handle with mutex yhchuang
2019-07-25 2:53 ` [PATCH v2 5/5] rtw88: add BT co-existence support yhchuang
2019-07-29 8:12 ` Stanislaw Gruszka [this message]
2019-07-30 3:13 ` Tony Chuang
2019-07-30 6:34 ` Stanislaw Gruszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190729081211.GB2066@redhat.com \
--to=sgruszka@redhat.com \
--cc=briannorris@chromium.org \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=yhchuang@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).