Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp345128lqh; Thu, 28 Mar 2024 04:05:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUOjmtJhOXZ1ONLLw2AxGprcxnv6u3BlyTBQZAweu3rwuXXW3PvTOM7M5JoL05laoepHBpYhM4rxO0luJreMxE1i9CQgGBq47Mq7rqYFw== X-Google-Smtp-Source: AGHT+IF4AQ5fxy1aO9ewyRsyKCtGSMLGn0y5r0ySP48Jowgx3zYhelEbOfNIchHSZdyQoTvp4hIE X-Received: by 2002:a05:6a20:a12a:b0:1a5:6d8b:b660 with SMTP id q42-20020a056a20a12a00b001a56d8bb660mr1362506pzk.0.1711623921969; Thu, 28 Mar 2024 04:05:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711623921; cv=pass; d=google.com; s=arc-20160816; b=x/XVJYisEHSAH7bSkj054SQWuCJDjzmFxWTcJtLhYnD3ej7YyshG6MxSPZe+c5TwO7 zz/yvpoztbig9T3EODtQqwOfs7fki1RhKqjNFIrxC4Rt14vcQhbpkWF+pMaDGkEJ6VR8 ejjJx29DKNMwNGBOYmy8m0yvAROJYm4jUQmajomlUn6vRytBi8uVB9kutH2+IV5EUamX wHtcHxONIfD0kd81WjAcVhRrSTwhFlzi7USKA82mthML4fLZ7PpQH7EvVw3JLLXqCDYf gEuJdyPAlg/pu8q3SNf8qUkRwCUHXemCw8B42qqnoAt4hFsPCgpNkNK8VX3MdfywONwB 9Q7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Q6fHesnqwMEsdaxCaS+kaP9Ak3N4XPsS9fYt2A57YZ4=; fh=0GNeY39Cl4xRhSi2TAvxQ7Q3gtM1UYmjYULYBkUvepo=; b=eTBLp5AE7OFguLPXSOKRlXKAiboYrk41w+DYToIduZi7ysPOZUeZE2GY935kF3ZmBF 4jgtjyvIcDpqyaqtyynr6B9iqiwAp+LxoCT7gHS0+/nRhBU6RER5dAL+mILk45eXDQpT R9D77r/pNfSqFC0qEf1x7f+wBPKAS602u+MVgW5LlXgcMBCDTAk10M5yHjNltYIsJaDY xhmsMIHzVLDGackxWTaoDrMxKzmClx7rehxaIxqlVl/Xy+l4BfTTzDedbiRtvfFTJ/ZW unmbhZqdd+Ko/5TVCK1vEqlV7eytGV0Ctv09yI2HvM0prgk7npjRP4edYCbCBfM8OlDl Agyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TCm4VdTQ; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-bluetooth+bounces-2891-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2891-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x6-20020a056a00270600b006e716f28888si1238002pfv.309.2024.03.28.04.05.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 04:05:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-2891-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TCm4VdTQ; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-bluetooth+bounces-2891-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2891-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A3FC6295B80 for ; Thu, 28 Mar 2024 11:05:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 06AB973528; Thu, 28 Mar 2024 11:05:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="TCm4VdTQ" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 06F79535A4 for ; Thu, 28 Mar 2024 11:05:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711623915; cv=none; b=S05vbR10sBwNqixZ4d0oB5Y33YD4NM7UqvPonMipD6vDw6ZGXyx7pgkDBe9HwYMVk/vF0CwbnWcgq+4+EDo2+Ck/A10jonIc8QfM6cXquuC6AQgV44klwNtzpaJmgNbbV7jAj9VdrAZZDQT6lodm6/0dr60HOYeLBKZ4nxznWUo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711623915; c=relaxed/simple; bh=28ChPfvhRyR6eEbB0jiEZgDBd1Aut8NmTUjXBew47Qg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=D7YXf3Ran27iaGWyfOY/IxOt3/ExbU68LEAbHFu+aDsFnkeegmnPCKHxvxOcsL3eFK9JgqWxw2lmA91rEl918Y6riC6DGYSJIRdJCHiCPnpWtZgJ/f8iMOaSIC8pLJkEKmNhvpxPMgV3ZBw6OuaJI7aZJTBcXX5nPV+9gmVhwn4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=TCm4VdTQ; arc=none smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711623913; x=1743159913; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=28ChPfvhRyR6eEbB0jiEZgDBd1Aut8NmTUjXBew47Qg=; b=TCm4VdTQ6U8ocTJUblUfHq6KVPE9x618snB9C6Tx9kCdq5YesWGP3VXZ jm0WVgSX9Y0ewGSpzPKzc8JTSF1fhacVD2/sZsaQdc8n6VhnCAZvZ02LX YRy1yuAhqzRj1xTSnLnUdbhxWfuee+w595hPVFSAC7s6lHkQiMrwhyoZt h5ea5PjHlOtPZrjJ3SS6DU4zDOkvZtUGK8dFytmrcv6fCX1pn95pnZzdJ tXYT+UKonKbqsh2Rg9/+s5xT5yFyYzYGljJB1xSUlmSDZ5eFLl6urC7R3 SrSoNSjH2FfnStnqfUq9Mh+zvfRE0x6493YPT7BYUAWhF0+lnSRd2ofIl Q==; X-CSE-ConnectionGUID: yiVyAD9ASRegMWG3W2jEbg== X-CSE-MsgGUID: 3ikaPseDRCqurW+M0iHE6Q== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="10551748" X-IronPort-AV: E=Sophos;i="6.07,161,1708416000"; d="scan'208";a="10551748" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2024 04:05:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,161,1708416000"; d="scan'208";a="17021573" Received: from intel-lenovo-legion-y540-15irh-pg0.iind.intel.com ([10.224.186.95]) by orviesa007.jf.intel.com with ESMTP; 28 Mar 2024 04:05:10 -0700 From: Kiran K To: linux-bluetooth@vger.kernel.org Cc: ravishankar.srivatsa@intel.com, chethan.tumkur.narayan@intel.com, Kiran K Subject: [PATCH v1 1/3] Bluetooth: btintel: Export few static functions Date: Thu, 28 Mar 2024 16:49:02 +0530 Message-Id: <20240328111904.992068-1-kiran.k@intel.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Some of the functions used in btintel.c is made global so that they can be reused in other transport drivers apart from USB. Signed-off-by: Kiran K --- drivers/bluetooth/btintel.c | 26 +++++++++++++--------- drivers/bluetooth/btintel.h | 43 +++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 10 deletions(-) diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c index a19ebe47bd95..c687934983d1 100644 --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c @@ -245,7 +245,7 @@ static int btintel_set_diag_combined(struct hci_dev *hdev, bool enable) return ret; } -static void btintel_hw_error(struct hci_dev *hdev, u8 code) +void btintel_hw_error(struct hci_dev *hdev, u8 code) { struct sk_buff *skb; u8 type = 0x00; @@ -277,6 +277,7 @@ static void btintel_hw_error(struct hci_dev *hdev, u8 code) kfree_skb(skb); } +EXPORT_SYMBOL_GPL(btintel_hw_error); int btintel_version_info(struct hci_dev *hdev, struct intel_version *ver) { @@ -455,8 +456,8 @@ int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver) } EXPORT_SYMBOL_GPL(btintel_read_version); -static int btintel_version_info_tlv(struct hci_dev *hdev, - struct intel_version_tlv *version) +int btintel_version_info_tlv(struct hci_dev *hdev, + struct intel_version_tlv *version) { const char *variant; @@ -543,10 +544,11 @@ static int btintel_version_info_tlv(struct hci_dev *hdev, return 0; } +EXPORT_SYMBOL_GPL(btintel_version_info_tlv); -static int btintel_parse_version_tlv(struct hci_dev *hdev, - struct intel_version_tlv *version, - struct sk_buff *skb) +int btintel_parse_version_tlv(struct hci_dev *hdev, + struct intel_version_tlv *version, + struct sk_buff *skb) { /* Consume Command Complete Status field */ skb_pull(skb, 1); @@ -648,6 +650,7 @@ static int btintel_parse_version_tlv(struct hci_dev *hdev, return 0; } +EXPORT_SYMBOL_GPL(btintel_parse_version_tlv); static int btintel_read_version_tlv(struct hci_dev *hdev, struct intel_version_tlv *version) @@ -2596,8 +2599,8 @@ static void btintel_set_dsm_reset_method(struct hci_dev *hdev, data->acpi_reset_method = btintel_acpi_reset_method; } -static int btintel_bootloader_setup_tlv(struct hci_dev *hdev, - struct intel_version_tlv *ver) +int btintel_bootloader_setup_tlv(struct hci_dev *hdev, + struct intel_version_tlv *ver) { u32 boot_param; char ddcname[64]; @@ -2681,8 +2684,9 @@ static int btintel_bootloader_setup_tlv(struct hci_dev *hdev, return 0; } +EXPORT_SYMBOL_GPL(btintel_bootloader_setup_tlv); -static void btintel_set_msft_opcode(struct hci_dev *hdev, u8 hw_variant) +void btintel_set_msft_opcode(struct hci_dev *hdev, u8 hw_variant) { switch (hw_variant) { /* Legacy bootloader devices that supports MSFT Extension */ @@ -2705,6 +2709,7 @@ static void btintel_set_msft_opcode(struct hci_dev *hdev, u8 hw_variant) break; } } +EXPORT_SYMBOL_GPL(btintel_set_msft_opcode); static void btintel_print_fseq_info(struct hci_dev *hdev) { @@ -3066,7 +3071,7 @@ static int btintel_setup_combined(struct hci_dev *hdev) return err; } -static int btintel_shutdown_combined(struct hci_dev *hdev) +int btintel_shutdown_combined(struct hci_dev *hdev) { struct sk_buff *skb; int ret; @@ -3100,6 +3105,7 @@ static int btintel_shutdown_combined(struct hci_dev *hdev) return 0; } +EXPORT_SYMBOL_GPL(btintel_shutdown_combined); int btintel_configure_setup(struct hci_dev *hdev, const char *driver_name) { diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h index 64ab5a2860ab..1462a57420a0 100644 --- a/drivers/bluetooth/btintel.h +++ b/drivers/bluetooth/btintel.h @@ -234,6 +234,16 @@ void btintel_bootup(struct hci_dev *hdev, const void *ptr, unsigned int len); void btintel_secure_send_result(struct hci_dev *hdev, const void *ptr, unsigned int len); int btintel_set_quality_report(struct hci_dev *hdev, bool enable); +int btintel_version_info_tlv(struct hci_dev *hdev, + struct intel_version_tlv *version); +int btintel_parse_version_tlv(struct hci_dev *hdev, + struct intel_version_tlv *version, + struct sk_buff *skb); +void btintel_set_msft_opcode(struct hci_dev *hdev, u8 hw_variant); +int btintel_bootloader_setup_tlv(struct hci_dev *hdev, + struct intel_version_tlv *ver); +int btintel_shutdown_combined(struct hci_dev *hdev); +void btintel_hw_error(struct hci_dev *hdev, u8 code); #else static inline int btintel_check_bdaddr(struct hci_dev *hdev) @@ -330,4 +340,37 @@ static inline int btintel_set_quality_report(struct hci_dev *hdev, bool enable) { return -ENODEV; } + +static inline int btintel_version_info_tlv(struct hci_dev *hdev, + struct intel_version_tlv *version) +{ + return -EOPNOTSUPP; +} + +static inline int btintel_parse_version_tlv(struct hci_dev *hdev, + struct intel_version_tlv *version, + struct sk_buff *skb) +{ + return -EOPNOTSUPP; +} + +static inline void btintel_set_msft_opcode(struct hci_dev *hdev, u8 hw_variant) + +{ +} + +static inline int btintel_bootloader_setup_tlv(struct hci_dev *hdev, + struct intel_version_tlv *ver) +{ + return -ENODEV; +} + +static inline int btintel_shutdown_combined(struct hci_dev *hdev) +{ + return -ENODEV; +} + +static void btintel_hw_error(struct hci_dev *hdev, u8 code) +{ +} #endif -- 2.34.1