Bluetooth: Remove no longer needed force_sc_support debugfs option
Subsystems (2)
Marcel Holtmann
maintainerPATCH 3/4 Bluetooth: Remove no longer needed force_sc_support debugfs option
The force_sc_support debugfs option was introduced to easily work with pre-production Bluetooth 4.1 silicon. This option is no longer needed since controllers supporting BR/EDR Secure Connections feature are now available.
Signed-off-by Marcel Holtmann <[email protected]>
--- include/net/bluetooth/hci.h | 1 - include/net/bluetooth/hci_core.h | 3 +-- net/bluetooth/hci_debugfs.c | 49 ---------------------------------------- net/bluetooth/mgmt.c | 11 ++++----- 4 files changed, 5 insertions(+), 59 deletions(-)
include/net/bluetooth/hci.h +0 -1
@@ -172,7 +172,6 @@ enum {*/ enum {HCI_DUT_MODE , -HCI_FORCE_SC ,HCI_FORCE_BREDR_SMP ,HCI_FORCE_STATIC_ADDR , };
include/net/bluetooth/hci_core.h +1 -2
@@ -1017,8 +1017,7 @@ void hci_conn_del_sysfs(struct hci_conn *conn);#define hdev_is_powered (hdev) (test_bit(HCI_UP, &hdev->flags) && \ !test_bit(HCI_AUTO_OFF, &hdev->dev_flags)) -#define bredr_sc_enabled (dev) ((lmp_sc_capable(dev) || \ - test_bit(HCI_FORCE_SC, &(dev)->dbg_flags)) && \ +#define bredr_sc_enabled (dev) (lmp_sc_capable(dev) && \ test_bit(HCI_SC_ENABLED, &(dev)->dev_flags))/* ----- HCI protocols ----- */
net/bluetooth/hci_debugfs.c +0 -49
61 lines not on this page · raw message
net/bluetooth/mgmt.c +4 -7
@@ -570,8 +570,7 @@ static u32 get_supported_settings(struct hci_dev *hdev) settings |=MGMT_SETTING_HS ; } -if (lmp_sc_capable (hdev) || -test_bit (HCI_FORCE_SC , &hdev->dbg_flags)) +if (lmp_sc_capable (hdev)) settings |=MGMT_SETTING_SECURE_CONN ; }
@@ -4727,8 +4726,8 @@ static int set_secure_conn(struct sock *sk, struct hci_dev *hdev,BT_DBG ("request for %s" , hdev->name); -if (!test_bit (HCI_LE_ENABLED , &hdev->dev_flags) && - !lmp_sc_capable (hdev) && !test_bit (HCI_FORCE_SC , &hdev->dbg_flags)) +if (!lmp_sc_capable (hdev) && + !test_bit (HCI_LE_ENABLED , &hdev->dev_flags))return cmd_status (sk, hdev->id,MGMT_OP_SET_SECURE_CONN ,MGMT_STATUS_NOT_SUPPORTED );
@@ -4738,9 +4737,7 @@ static int set_secure_conn(struct sock *sk, struct hci_dev *hdev,hci_dev_lock (hdev); -if (!hdev_is_powered (hdev) || - (!lmp_sc_capable (hdev) && - !test_bit (HCI_FORCE_SC , &hdev->dbg_flags)) || +if (!hdev_is_powered (hdev) || !lmp_sc_capable (hdev) || !test_bit (HCI_BREDR_ENABLED , &hdev->dev_flags)) {bool changed;
Signature · 1 line
2.1.0