Blob Blame History Raw
From: Brian Gix <brian.gix@intel.com>
Date: Mon, 23 Aug 2021 14:57:29 -0700
Subject: Bluetooth: mgmt: Disallow legacy MGMT_OP_READ_LOCAL_OOB_EXT_DATA
Patch-mainline: v5.16-rc1
Git-commit: 81218cbee980b1d027c429dda56c8c5ac11ccb4d
References: jsc#PED-1407

Legacy (v2.0) controllers do not support Extended OOB Data used by SSP.

Signed-off-by: Brian Gix <brian.gix@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Acked-by: Lee, Chun-Yi <jlee@suse.com>
---
 net/bluetooth/mgmt.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -7315,6 +7315,11 @@ static int read_local_oob_ext_data(struc
 	if (!rp)
 		return -ENOMEM;
 
+	if (!status && !lmp_ssp_capable(hdev)) {
+		status = MGMT_STATUS_NOT_SUPPORTED;
+		eir_len = 0;
+	}
+
 	if (status)
 		goto complete;