All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Chuang <yhchuang@realtek.com>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: "kvalo@codeaurora.org" <kvalo@codeaurora.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"briannorris@chromium.org" <briannorris@chromium.org>
Subject: RE: [PATCH v2 5/5] rtw88: add BT co-existence support
Date: Tue, 30 Jul 2019 03:13:35 +0000	[thread overview]
Message-ID: <F7CD281DE3E379468C6D07993EA72F84D1881C82@RTITMBSVM04.realtek.com.tw> (raw)
In-Reply-To: <20190729081211.GB2066@redhat.com>

> Subject: Re: [PATCH v2 5/5] rtw88: add BT co-existence support
> 
> 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()).

You're right, that SKB leaked. Should free them after responded.
I will send v2 to fix it :)

Thanks.

> 
> Stanislaw

Yan-Hsuan

  reply	other threads:[~2019-07-30  3:13 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
2019-07-30  3:13     ` Tony Chuang [this message]
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=F7CD281DE3E379468C6D07993EA72F84D1881C82@RTITMBSVM04.realtek.com.tw \
    --to=yhchuang@realtek.com \
    --cc=briannorris@chromium.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sgruszka@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.