mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cheng Jiang <quic_chejiang@quicinc.com>
To: Marcel Holtmann <marcel@holtmann.org>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: <linux-bluetooth@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1] Bluetooth: hci_qca: Drop unused event during BT on
Date: Wed, 21 Aug 2024 12:16:04 +0800	[thread overview]
Message-ID: <15472cea-904c-4d79-9195-3063ce7f1e2e@quicinc.com> (raw)
In-Reply-To: <20240726095828.2707111-1-quic_chejiang@quicinc.com>

Dear receivers,

Is there any comment for the changes? Thanks! 

On 7/26/2024 5:58 PM, Cheng Jiang wrote:
> For the WCN6750/WCN6855/WCN7850, the vendor command for a baudrate
> change is not sent as synchronous HCI command, controller sends the
> corresponding vendor event with the new baudrate. It needs to be
> dropped, otherwise it may be misinterpreted as response to a later
> command.
> 
> Signed-off-by: Cheng Jiang <quic_chejiang@quicinc.com>
> ---
>  drivers/bluetooth/hci_qca.c | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index ca6466676902..f497d601e035 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -1206,7 +1206,15 @@ static int qca_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
>  		 * vendor command).
>  		 */
>  
> -		if (hdr->evt == HCI_EV_VENDOR)
> +		/* For the WCN6750/WCN6855/WCN7850, like the WCN3990, the
> +		 * vendor command for a baudrate change command isn't sent as
> +		 * synchronous HCI command, the controller sends the corresponding
> +		 * command complete event with the new baudrate. The event is
> +		 * received and properly decoded after changing the baudrate of
> +		 * the host port. It needs to be dropped.
> +		 */
> +
> +		if (hdr->evt == HCI_EV_VENDOR || hdr->evt == HCI_EV_CMD_COMPLETE)
>  			complete(&qca->drop_ev_comp);
>  
>  		kfree_skb(skb);
> @@ -1497,6 +1505,9 @@ static int qca_set_speed(struct hci_uart *hu, enum qca_speed_type speed_type)
>  
>  		switch (soc_type) {
>  		case QCA_WCN3990:
> +		case QCA_WCN6750:
> +		case QCA_WCN6855:
> +		case QCA_WCN7850:
>  			reinit_completion(&qca->drop_ev_comp);
>  			set_bit(QCA_DROP_VENDOR_EVENT, &qca->flags);
>  			break;
> @@ -1531,6 +1542,9 @@ static int qca_set_speed(struct hci_uart *hu, enum qca_speed_type speed_type)
>  
>  		switch (soc_type) {
>  		case QCA_WCN3990:
> +		case QCA_WCN6750:
> +		case QCA_WCN6855:
> +		case QCA_WCN7850:
>  			/* Wait for the controller to send the vendor event
>  			 * for the baudrate change command.
>  			 */


  reply	other threads:[~2024-08-21  4:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-26  9:58 Cheng Jiang
2024-08-21  4:16 ` Cheng Jiang [this message]
2024-08-21  4:49   ` Paul Menzel
2024-08-21  6:58     ` Cheng Jiang
2024-08-21  7:07       ` Paul Menzel

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=15472cea-904c-4d79-9195-3063ce7f1e2e@quicinc.com \
    --to=quic_chejiang@quicinc.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    /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

all inboxes | Powered by JetHome®