From patchwork Wed Mar 2 18:23:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 548217 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 E663BC433FE for ; Wed, 2 Mar 2022 18:25:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240788AbiCBS0D (ORCPT ); Wed, 2 Mar 2022 13:26:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244425AbiCBS0D (ORCPT ); Wed, 2 Mar 2022 13:26:03 -0500 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DF0ABD8AA for ; Wed, 2 Mar 2022 10:25:18 -0800 (PST) Received: by mail-ej1-x633.google.com with SMTP id qx21so5480551ejb.13 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=VEnjyNMESL7P+r+oNkDRNEAjEiljUQyI5KRfW8zxCunw0oUBbd9xK3kpqoHNbJhOeW WWeNbTBhHy6hg18hx3R6OKhQglRl+2fQb+0AFFW53r/lKXqLCEHocwyj1HcPDgDZXOrI qf1fftzasMYqis+0/qEXQiKZfRcafDi6I3LHOUbVv7+gRmdOI9vi0SVE7nP52guEPlrg jNtiA43NkB83tGBHPM1grEfTInMMRhTCoB8mlD9Y05EliGDAjvzGx+RdPdwOmO6ufqzS tOj1fheVnuNd6ojqnAO4Q+GjbytunVCRc6L+niUiKxYnz10zYCgJzKmREBJCogDDuA+8 Uonw== X-Gm-Message-State: AOAM531Qh2ncB81JQaPRAWfwnWZhPa3DXjpPyn9/OerPRZtyEy8EbCn6 9aPKVqaaHezrD46flq+NT6KEFg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Since commit 3e54c5890c87 ("Bluetooth: hci_event: Use of a function table to 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 handle 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 event, struct sk_buff *skb, const struct hci_ev *ev = &hci_ev_table[event]; void *data; - if (!ev->func) + if (!ev->func || event == HCI_EV_VENDOR) return; if (skb->len < ev->min_len) {