Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3127712ybi; Mon, 29 Jul 2019 01:21:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqzzzfK/7t9YTFifzADjfZVDgrzVI22vchKTn0Iadl1re00b/6DHlyflsPrIBNX/BamywfWb X-Received: by 2002:a17:902:ab8f:: with SMTP id f15mr14889623plr.159.1564388498616; Mon, 29 Jul 2019 01:21:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564388498; cv=none; d=google.com; s=arc-20160816; b=v8JEo3vEzEx2BWO4h4h4yx4GtV/uewQAz4vPr0+PcSTbPRFOBH2hxcCeAg3k3Gb1qK 1KRc0vbS8oW2d3mrDmoLB+xUovl0ZKEiT8Y1ZWMJlDOpAiCXaA6Zi4necQEIpAXc6Kxq EHQ35ZN6S6MbueGbtlzsvsKngDX3+T2BnIb94A32EHjWgQZzQlLvypXWmFEG3gAZNGrz 3Fpr56W+j7Zwqj5whhp4G3rjGODB/f83DXcTo8MDI6a+7pfP8zt7MnQUxuHQ0bKBDJOZ antlv578qUKvb/11JhdYjSRkYtLBiJqK0o8UPASZS6fuMkp3j/SA8ut0ZKlqIBDwAZfI PQxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=vu75+SBt+UMya+fdpQuvUt5HTdhChNDMnAwkvboRxJg=; b=DyNw58A/fHHbXMsludt/jmBWWWTjbjT6/2SKBDcoGo2C6KxsgxApQtmhspGxcowsT1 Wg7lYZSnQYqIORH1nwVeDo23TcXCU2xjYrmgJAXaknZ4ntf+3Y72bOHdTaF2eUqZiasv L7Y/LyAXaiLdJCvDa/YzYwYIsA4wAghi9IbMATAHmwvQXjYxDkrw6NtkZfG6shzUU71q IElsgxQWMICtA8e4tL1LzSLgbFtAAqz3IVt6QYle1EeY2xoxsqsssYJtZ9TaWvKBAAhr wlo71XaOKdflso2tdyIdhd/O72JJxskUlKzHKv92kQedxqG69mkEbRv3GLaPhMc8RUrL GUTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b18si27826993pgl.52.2019.07.29.01.21.10; Mon, 29 Jul 2019 01:21:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726820AbfG2IMQ (ORCPT + 99 others); Mon, 29 Jul 2019 04:12:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59094 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725988AbfG2IMQ (ORCPT ); Mon, 29 Jul 2019 04:12:16 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BDFD830862BE; Mon, 29 Jul 2019 08:12:15 +0000 (UTC) Received: from localhost (unknown [10.43.2.114]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0624560A9D; Mon, 29 Jul 2019 08:12:13 +0000 (UTC) Date: Mon, 29 Jul 2019 10:12:11 +0200 From: Stanislaw Gruszka 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 Message-ID: <20190729081211.GB2066@redhat.com> References: <1564023211-3138-1-git-send-email-yhchuang@realtek.com> <1564023211-3138-6-git-send-email-yhchuang@realtek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1564023211-3138-6-git-send-email-yhchuang@realtek.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Mon, 29 Jul 2019 08:12:15 +0000 (UTC) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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