Bluetooth: Add Kconfig option to disable bondable mode
This adds Kconfig option to allow disable bondable mode in compile time. Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This commit is contained in:
parent
64e608be8b
commit
7ff9eeea0e
2 changed files with 16 additions and 2 deletions
|
@ -311,6 +311,14 @@ config BT_USE_DEBUG_KEYS
|
|||
If this option is enabled anyone is able to decipher encrypted air
|
||||
traffic.
|
||||
|
||||
config BT_BONDABLE
|
||||
bool "Bondable Mode"
|
||||
default y
|
||||
help
|
||||
This option enables support for Bondable Mode. In this mode,
|
||||
Bonding flag in AuthReq of SMP Pairing Request/Response will be set
|
||||
indicating the support for this mode.
|
||||
|
||||
endif # BT_SMP
|
||||
|
||||
config BT_L2CAP_DYNAMIC_CHANNEL
|
||||
|
|
|
@ -72,13 +72,19 @@
|
|||
|
||||
#define BT_SMP_AUTH_MASK 0x07
|
||||
|
||||
#if defined(CONFIG_BT_BONDABLE)
|
||||
#define BT_SMP_AUTH_BONDING_FLAGS BT_SMP_AUTH_BONDING
|
||||
#else
|
||||
#define BT_SMP_AUTH_BONDING_FLAGS 0
|
||||
#endif /* CONFIG_BT_BONDABLE */
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#define BT_SMP_AUTH_MASK_SC 0x2f
|
||||
#define BT_SMP_AUTH_DEFAULT (BT_SMP_AUTH_BONDING | BT_SMP_AUTH_SC |\
|
||||
#define BT_SMP_AUTH_DEFAULT (BT_SMP_AUTH_BONDING_FLAGS | BT_SMP_AUTH_SC |\
|
||||
BT_SMP_AUTH_CT2)
|
||||
#else
|
||||
#define BT_SMP_AUTH_MASK_SC 0x0f
|
||||
#define BT_SMP_AUTH_DEFAULT (BT_SMP_AUTH_BONDING | BT_SMP_AUTH_SC)
|
||||
#define BT_SMP_AUTH_DEFAULT (BT_SMP_AUTH_BONDING_FLAGS | BT_SMP_AUTH_SC)
|
||||
#endif
|
||||
|
||||
enum pairing_method {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue