Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3531267rwi; Fri, 21 Oct 2022 18:21:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5sbYSZYDByhA6UjaXC1qUniB2LNaj/1OCKvADfPl8N0M58YraNqT2h11wG7iH46aDREwxw X-Received: by 2002:a05:6402:500d:b0:459:3e56:e6f9 with SMTP id p13-20020a056402500d00b004593e56e6f9mr20677895eda.367.1666401688412; Fri, 21 Oct 2022 18:21:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666401688; cv=none; d=google.com; s=arc-20160816; b=OHf9Gmz6/L/T/abxTe4ojPiMh7S9PNP4/oAlzxZFjw3grTC5ll0EOc6K70XQWIuIp2 wFtB64Itx3vAkCUa+pK4YnuyfnVgTJESYaBiUNK/8z22b6Ao/8d5DhSHFLvAZANz2lQ4 OcZCtaLerrQ+Ip2odv4nTIT9ntizRpPoB02Z0Rz/9H9Omhax0OKC21LJZGiKy2Z9b++c L0k5HOGv+tiDZMuDfP5TT9DQPG8xAdVmtMOlMqvQyxzjMliJk4irtvFcEWe2r5TvK4/m G2IlRaHlK/SRmKCEykSDOS+U9o7cVP03HUd0/2Bp3fmdMsc/oAAme5thINlbTUdke4ce D8Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=bFfbuF3SxwkF1RNAbQloB54mnnHcnxK2PZhgJNjvY4c=; b=qNqV56aGdJfQZpwBgHRHnTsmT80Isjz/YLb8rlHzTyb26rTkPUfwV1GpGGI7lTk5ZJ EFIDg3LrYz3VvyiA1cAxBNeU7H8a8KkvhGyer8jWaRb3JO76k4T3uTrQTCx4jHOGI9dz hSzmRPDlcV7UznfN+wEK3lC+c4PLpdqgdwGd77SlYVa9YQmkT5kZmgqjPMS7cyawiL2d 95Cjwyd+n/2SVOwD5eZ0ET4gcQaMdiQKSGkYo3jggmsf7ht04DLlAlOPYUie9Dt6RHyW hx5Ud12Ee3UAqFVzc88jactWtTc0e191PLc+myPttUPcM8IhGZKg+4eiOVcK+fGG3I88 tDlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PcEGdh0v; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s19-20020aa7cb13000000b0045829a1c0b3si17627375edt.251.2022.10.21.18.20.51; Fri, 21 Oct 2022 18:21:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PcEGdh0v; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229894AbiJVAti (ORCPT + 99 others); Fri, 21 Oct 2022 20:49:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229585AbiJVAth (ORCPT ); Fri, 21 Oct 2022 20:49:37 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B027634714 for ; Fri, 21 Oct 2022 17:49:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666399775; x=1697935775; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=rsjlNFywgKStKHCnFnQEwrLNiyD2xVDkRBnwtqnIJKY=; b=PcEGdh0vGUGDEkASLyQe9nbFxFo56btP3Nmi9kqgaUlEek9DU/PqbJg0 FZzuVskfTeApNfxWjhSIqw0g1k8eSYyk0Aq49QNg0EMAcNl6WEFzBX3An jr+pDHr8LMfL5x+SIrC12qrUFGU6rzu89fQ1b5/gR2u7ZQqp5B25ZGMBZ BXm2/aFfvU0iQL7JLT0iJfMcvA7OoPQMtPamR43FI78vD3rbfRIEV337W 588wC1zMPD7I8EWk0xFeS3s2+0LBSlm544VQuZInrGwLEfFCP0QVOQVXE XRjjOVtnIgVttcAFAHzeWwsF8nOaNfigYoQWoTMqncc8ezIysFLPPihq9 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10507"; a="307128297" X-IronPort-AV: E=Sophos;i="5.95,203,1661842800"; d="scan'208";a="307128297" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2022 17:49:35 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10507"; a="773254756" X-IronPort-AV: E=Sophos;i="5.95,203,1661842800"; d="scan'208";a="773254756" Received: from bmitch7x-mobl.amr.corp.intel.com (HELO istotlan-mobl1.intel.com) ([10.209.0.254]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2022 17:49:35 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: luiz.von.dentz@intel.com, Inga Stotland Subject: [PATCH v2] Bluetooth: MGMT: Fix error report for ADD_EXT_ADV_PARAMS Date: Fri, 21 Oct 2022 17:48:56 -0700 Message-Id: <20221022004856.31984-1-inga.stotland@intel.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org When validating the parameter length for MGMT_OP_ADD_EXT_ADV_PARAMS command, use the correct op code in error status report: was MGMT_OP_ADD_ADVERTISING, changed to MGMT_OP_ADD_EXT_ADV_PARAMS. Fixes: 12410572833a2 ("Bluetooth: Break add adv into two mgmt commands") Signed-off-by: Inga Stotland --- net/bluetooth/mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index a92e7e485feb..0dd30a3beb77 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -8859,7 +8859,7 @@ static int add_ext_adv_params(struct sock *sk, struct hci_dev *hdev, * extra parameters we don't know about will be ignored in this request. */ if (data_len < MGMT_ADD_EXT_ADV_PARAMS_MIN_SIZE) - return mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_ADVERTISING, + return mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_EXT_ADV_PARAMS, MGMT_STATUS_INVALID_PARAMS); flags = __le32_to_cpu(cp->flags); -- 2.37.3