summaryrefslogtreecommitdiff
path: root/net/bluetooth/msft.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2021-04-06 21:55:56 +0200
committerMarcel Holtmann <marcel@holtmann.org>2021-04-08 12:26:34 +0200
commita61d67188f29ff678e94fb3ffba6c6d292e852c7 (patch)
tree393fadea53dafe200d9bac188e9ca18972084e53 /net/bluetooth/msft.c
parentba29d0360a092997074e07524cf6f798a95a71d8 (diff)
Bluetooth: Allow Microsoft extension to indicate curve validation
Some controllers don't support the Simple Pairing Options feature that can indicate the support for P-192 and P-256 public key validation. However they might support the Microsoft vendor extension that can indicate the validiation capability as well. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'net/bluetooth/msft.c')
-rw-r--r--net/bluetooth/msft.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index 47b104f318e9..e28f15439ce4 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -142,6 +142,9 @@ static bool read_supported_features(struct hci_dev *hdev,
msft->evt_prefix_len = rp->evt_prefix_len;
msft->features = __le64_to_cpu(rp->features);
+ if (msft->features & MSFT_FEATURE_MASK_CURVE_VALIDITY)
+ hdev->msft_curve_validity = true;
+
kfree_skb(skb);
return true;
@@ -605,3 +608,8 @@ int msft_set_filter_enable(struct hci_dev *hdev, bool enable)
return err;
}
+
+bool msft_curve_validity(struct hci_dev *hdev)
+{
+ return hdev->msft_curve_validity;
+}