From nobody Tue Jun 23 16:14:52 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE378C433EF for ; Wed, 2 Mar 2022 18:25:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244522AbiCBS0G (ORCPT ); Wed, 2 Mar 2022 13:26:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232866AbiCBS0C (ORCPT ); Wed, 2 Mar 2022 13:26:02 -0500 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E6A1BDE56 for ; Wed, 2 Mar 2022 10:25:18 -0800 (PST) Received: by mail-ej1-x62c.google.com with SMTP id pj17so1151069ejb.2 for ; Wed, 02 Mar 2022 10:25:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Zru33MOIq9u6j5okLf6Dq+iG+dSjlj1psboOqbx3Ln8=; b=Adyt4zxOk04oIJ+Y/gJBinkf33Hoz0xYu9/G8cP+FDRCLqM4hb2Bvn4XF4xX43pmfr xmXrTYN9UmaB0OXxxICbzV9gmpJoQtwiJCMaCiH6orPb5Lh2Vcu0tflFnwPk90CxQ87G f3LRTLVHvUjMYWBeYTM0HworoahgmUvv0NYt/yILtjWKJ+vEA46yn0ZztHGxfgMDT2mK uya2xo1KfEW32bBq9FPe9fsnEA6WwNTCLsy2vOhD73js0hH8EUpQDCckkFLcCuvC1cD/ 0QsnYrrk2z1QBZ7pFHwu1pC+Eta1oQ8dfZKU9o3TpOAiTPB/SfQkWwqY4sAtcWCpwyiN 8x4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Zru33MOIq9u6j5okLf6Dq+iG+dSjlj1psboOqbx3Ln8=; b=PPx1AhaFizQ1ltiupONEc6SF0Zl9h7YS7FbJvttqW2p1lP1DZ4yCq43HMojkaLFEG0 56Tfq5nZ5Yrsh7AiQAQoegXR6LDoTead5gKBfcdry+u6iJVZgmq4G+YLBKO9t3b4+8i+ FlNiZclatJ8MWXDw+KvpyajMNTlzIs0gfNXpkV0tRfTwnRBhjTsbdLh11TUxk+ikYIlI qtVjSKTgmomxpzLtwKqO/b/8lKPjFInIyd8Vpc7tKkod7cUlW5ayoz2AcsryLqmLDn42 kIfoF8syfrRpFpPp9srFX2Cqhv0SlazIi8EcA1f30kEv+6WkWaRVBNjUIdku2m4jd+Qb Ay5A== X-Gm-Message-State: AOAM533vThqBv6LfBtWmGxRXUtfI7yMKxIGQZOug4L1dBZCaIH8wJ4lo VTxjBrc+GRep2wFQTrEYg285OUO7y/Se5w== X-Google-Smtp-Source: ABdhPJwa5yyy5dN0BrPZBSZVSzlqjTHHsdlaU7eir7KpsB4BimR1iMy0VYyo36DjkWerqXUGrGEKTg== X-Received: by 2002:a17:906:1e0c:b0:6cf:d014:e454 with SMTP id g12-20020a1709061e0c00b006cfd014e454mr24821370ejj.583.1646245517075; Wed, 02 Mar 2022 10:25:17 -0800 (PST) Received: from localhost.localdomain (cpc78119-cwma10-2-0-cust590.7-3.cable.virginm.net. [81.96.50.79]) by smtp.gmail.com with ESMTPSA id eo8-20020a1709069b0800b006ce6eef6836sm6569297ejc.131.2022.03.02.10.25.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 10:25:16 -0800 (PST) From: Caleb Connolly To: caleb.connolly@linaro.org, Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , "David S . Miller" , Jakub Kicinski , linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH] bluetooth: hci_event: don't print an error on vendor events Date: Wed, 2 Mar 2022 18:23:52 +0000 Message-Id: <20220302182352.441352-1-caleb.connolly@linaro.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Since commit 3e54c5890c87 ("Bluetooth: hci_event: Use of a function table t= o handle HCI events"), some devices see errors being printed for vendor events, e.g. [ 75.806141] Bluetooth: hci0: setting up wcn399x [ 75.948311] Bluetooth: hci0: unexpected event 0xff length: 14 > 0 [ 75.955552] Bluetooth: hci0: QCA Product ID :0x0000000a [ 75.961369] Bluetooth: hci0: QCA SOC Version :0x40010214 [ 75.967417] Bluetooth: hci0: QCA ROM Version :0x00000201 [ 75.973363] Bluetooth: hci0: QCA Patch Version:0x00000001 [ 76.000289] Bluetooth: hci0: QCA controller version 0x02140201 [ 76.006727] Bluetooth: hci0: QCA Downloading qca/crbtfw21.tlv [ 76.986850] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.013574] Bluetooth: hci0: QCA Downloading qca/oneplus6/crnv21.bin [ 77.024302] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.032681] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.040674] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.049251] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.057997] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.066320] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.075065] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.083073] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.091250] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.099417] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.110166] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.118672] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.127449] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.137190] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.146192] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.154242] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.163183] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.171202] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.179364] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.187259] Bluetooth: hci0: unexpected event 0xff length: 3 > 0 [ 77.198451] Bluetooth: hci0: QCA setup on UART is completed Use the quick-return path in hci_event_func() to avoid printing this message for vendor events, this reverts to the previous behaviour which didn't print an error for vendor events. Fixes: 3e54c5890c87 ("Bluetooth: hci_event: Use of a function table to hand= le HCI events") Signed-off-by: Caleb Connolly --- net/bluetooth/hci_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index fc30f4c03d29..56cc41ea9f31 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -6809,7 +6809,7 @@ static void hci_event_func(struct hci_dev *hdev, u8 e= vent, struct sk_buff *skb, const struct hci_ev *ev =3D &hci_ev_table[event]; void *data; =20 - if (!ev->func) + if (!ev->func || event =3D=3D HCI_EV_VENDOR) return; =20 if (skb->len < ev->min_len) { --=20 2.35.1