Message ID | 20200602050752.7470-2-kiran.k@intel.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Marcel Holtmann |
Headers | show |
Series | [1/2] Bluetooth: Add support to Intel read supported feature | expand |
Hi Kiran, Thank you for the patch! Yet something to improve: [auto build test ERROR on bluetooth-next/master] [also build test ERROR on next-20200529] [cannot apply to v5.7] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Kiran-K/Bluetooth-Add-support-to-Intel-read-supported-feature/20200602-131028 base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master config: arm-defconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <lkp@intel.com> All errors (new ones prefixed by >>, old ones prefixed by <<): In file included from drivers/bluetooth/hci_ldisc.c:34: >> drivers/bluetooth/btintel.h:206:1: error: expected identifier or '(' before '{' token 206 | { | ^ drivers/bluetooth/btintel.h:203:12: warning: 'btintel_load_debug_config_based_on_supported_features' declared 'static' but never defined [-Wunused-function] 203 | static int btintel_load_debug_config_based_on_supported_features( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/bluetooth/btintel.h:198:12: warning: 'btintel_read_supported_features' defined but not used [-Wunused-function] 198 | static int btintel_read_supported_features(struct hci_dev *hdev, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +206 drivers/bluetooth/btintel.h 194 195 static inline void btintel_reset_to_bootloader(struct hci_dev *hdev) 196 { 197 } 198 static int btintel_read_supported_features(struct hci_dev *hdev, 199 struct intel_supported_features *supported_features) 200 { 201 return -EOPNOTSUPP; 202 } 203 static int btintel_load_debug_config_based_on_supported_features( 204 struct hci_dev *hdev, 205 const struct intel_supported_features *supported_features); > 206 { 207 return -EOPNOTSUPP; 208 } 209 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c index 09e697b92426..5ef83e9ad19c 100644 --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c @@ -788,6 +788,34 @@ int btintel_read_supported_features(struct hci_dev *hdev, } EXPORT_SYMBOL_GPL(btintel_read_supported_features); +int btintel_load_debug_config_based_on_supported_features(struct hci_dev *hdev, + const struct intel_supported_features *supported_features) +{ + struct sk_buff *skb; + u8 mask_ddc[11] = { 0x0a, 0x92, 0x02, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 }; + + if (!supported_features) + return -EINVAL; + + if (!(supported_features->page1[0] & 0x3f)) { + bt_dev_info(hdev, "Telemety exception format not supported"); + return 0; + } + + skb = __hci_cmd_sync(hdev, 0xfc8b, 11, mask_ddc, HCI_INIT_TIMEOUT); + if (IS_ERR(skb)) { + bt_dev_err(hdev, "Setting Intel telemetry ddc write event mask failed (%ld)", + PTR_ERR(skb)); + return PTR_ERR(skb); + } + + kfree_skb(skb); + return 0; +} +EXPORT_SYMBOL_GPL(btintel_load_debug_config_based_on_supported_features); + + MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); MODULE_DESCRIPTION("Bluetooth support for Intel devices ver " VERSION); MODULE_VERSION(VERSION); diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h index f3892c0233f4..043d76c0e7cd 100644 --- a/drivers/bluetooth/btintel.h +++ b/drivers/bluetooth/btintel.h @@ -95,7 +95,8 @@ int btintel_download_firmware(struct hci_dev *dev, const struct firmware *fw, void btintel_reset_to_bootloader(struct hci_dev *hdev); int btintel_read_supported_features(struct hci_dev *hdev, struct intel_supported_features *supported_features); - +int btintel_load_debug_config_based_on_supported_features(struct hci_dev *hdev, + const struct intel_supported_features *supported_features); #else static inline int btintel_check_bdaddr(struct hci_dev *hdev) @@ -199,5 +200,11 @@ static int btintel_read_supported_features(struct hci_dev *hdev, { return -EOPNOTSUPP; } +static int btintel_load_debug_config_based_on_supported_features( + struct hci_dev *hdev, + const struct intel_supported_features *supported_features); +{ + return -EOPNOTSUPP; +} #endif diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index a5a971e7025b..510e3c1c23dc 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -2547,6 +2547,9 @@ static int btusb_setup_intel_new(struct hci_dev *hdev) */ btintel_read_supported_features(hdev, &supported_features); + btintel_load_debug_config_based_on_supported_features(hdev, + &supported_features); + /* Read the Intel version information after loading the FW */ err = btintel_read_version(hdev, &ver);