162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (C) 2020 Google Corporation 462306a36Sopenharmony_ci */ 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci#define MSFT_FEATURE_MASK_BREDR_RSSI_MONITOR BIT(0) 762306a36Sopenharmony_ci#define MSFT_FEATURE_MASK_LE_CONN_RSSI_MONITOR BIT(1) 862306a36Sopenharmony_ci#define MSFT_FEATURE_MASK_LE_ADV_RSSI_MONITOR BIT(2) 962306a36Sopenharmony_ci#define MSFT_FEATURE_MASK_LE_ADV_MONITOR BIT(3) 1062306a36Sopenharmony_ci#define MSFT_FEATURE_MASK_CURVE_VALIDITY BIT(4) 1162306a36Sopenharmony_ci#define MSFT_FEATURE_MASK_CONCURRENT_ADV_MONITOR BIT(5) 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci#if IS_ENABLED(CONFIG_BT_MSFTEXT) 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_cibool msft_monitor_supported(struct hci_dev *hdev); 1662306a36Sopenharmony_civoid msft_register(struct hci_dev *hdev); 1762306a36Sopenharmony_civoid msft_unregister(struct hci_dev *hdev); 1862306a36Sopenharmony_civoid msft_do_open(struct hci_dev *hdev); 1962306a36Sopenharmony_civoid msft_do_close(struct hci_dev *hdev); 2062306a36Sopenharmony_civoid msft_vendor_evt(struct hci_dev *hdev, void *data, struct sk_buff *skb); 2162306a36Sopenharmony_ci__u64 msft_get_features(struct hci_dev *hdev); 2262306a36Sopenharmony_ciint msft_add_monitor_pattern(struct hci_dev *hdev, struct adv_monitor *monitor); 2362306a36Sopenharmony_ciint msft_remove_monitor(struct hci_dev *hdev, struct adv_monitor *monitor); 2462306a36Sopenharmony_civoid msft_req_add_set_filter_enable(struct hci_request *req, bool enable); 2562306a36Sopenharmony_ciint msft_set_filter_enable(struct hci_dev *hdev, bool enable); 2662306a36Sopenharmony_ciint msft_suspend_sync(struct hci_dev *hdev); 2762306a36Sopenharmony_ciint msft_resume_sync(struct hci_dev *hdev); 2862306a36Sopenharmony_cibool msft_curve_validity(struct hci_dev *hdev); 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci#else 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_cistatic inline bool msft_monitor_supported(struct hci_dev *hdev) 3362306a36Sopenharmony_ci{ 3462306a36Sopenharmony_ci return false; 3562306a36Sopenharmony_ci} 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_cistatic inline void msft_register(struct hci_dev *hdev) {} 3862306a36Sopenharmony_cistatic inline void msft_unregister(struct hci_dev *hdev) {} 3962306a36Sopenharmony_cistatic inline void msft_do_open(struct hci_dev *hdev) {} 4062306a36Sopenharmony_cistatic inline void msft_do_close(struct hci_dev *hdev) {} 4162306a36Sopenharmony_cistatic inline void msft_vendor_evt(struct hci_dev *hdev, void *data, 4262306a36Sopenharmony_ci struct sk_buff *skb) {} 4362306a36Sopenharmony_cistatic inline __u64 msft_get_features(struct hci_dev *hdev) { return 0; } 4462306a36Sopenharmony_cistatic inline int msft_add_monitor_pattern(struct hci_dev *hdev, 4562306a36Sopenharmony_ci struct adv_monitor *monitor) 4662306a36Sopenharmony_ci{ 4762306a36Sopenharmony_ci return -EOPNOTSUPP; 4862306a36Sopenharmony_ci} 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_cistatic inline int msft_remove_monitor(struct hci_dev *hdev, 5162306a36Sopenharmony_ci struct adv_monitor *monitor) 5262306a36Sopenharmony_ci{ 5362306a36Sopenharmony_ci return -EOPNOTSUPP; 5462306a36Sopenharmony_ci} 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_cistatic inline void msft_req_add_set_filter_enable(struct hci_request *req, 5762306a36Sopenharmony_ci bool enable) {} 5862306a36Sopenharmony_cistatic inline int msft_set_filter_enable(struct hci_dev *hdev, bool enable) 5962306a36Sopenharmony_ci{ 6062306a36Sopenharmony_ci return -EOPNOTSUPP; 6162306a36Sopenharmony_ci} 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_cistatic inline int msft_suspend_sync(struct hci_dev *hdev) 6462306a36Sopenharmony_ci{ 6562306a36Sopenharmony_ci return -EOPNOTSUPP; 6662306a36Sopenharmony_ci} 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_cistatic inline int msft_resume_sync(struct hci_dev *hdev) 6962306a36Sopenharmony_ci{ 7062306a36Sopenharmony_ci return -EOPNOTSUPP; 7162306a36Sopenharmony_ci} 7262306a36Sopenharmony_ci 7362306a36Sopenharmony_cistatic inline bool msft_curve_validity(struct hci_dev *hdev) 7462306a36Sopenharmony_ci{ 7562306a36Sopenharmony_ci return false; 7662306a36Sopenharmony_ci} 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ci#endif 79