Bluetooth: GATT: Remove authorization permission
The application can return BT_ATT_ERR_AUTHORIZATION on the callback already so there is no reason to have it as a permission as once set it always fails. Change-Id: Ia634e3f313993dd36c06bff48f36d4ddf1264376 Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
ffd0d3e36a
commit
1157a8f26f
2 changed files with 2 additions and 23 deletions
|
@ -66,18 +66,6 @@ extern "C" {
|
|||
* If set, requires encryption using authenticated link-key for write access.
|
||||
*/
|
||||
#define BT_GATT_PERM_WRITE_AUTHEN 0x20
|
||||
/** @def BT_GATT_PERM_READ_AUTHOR
|
||||
* @brief Attribute read permission with authorization.
|
||||
*
|
||||
* If set, requires authorization for read access.
|
||||
*/
|
||||
#define BT_GATT_PERM_READ_AUTHOR 0x40
|
||||
/** @def BT_GATT_PERM_WRITE_AUTHOR
|
||||
* @brief Attribute write permission with authorization.
|
||||
*
|
||||
* If set, requires authorization for write access.
|
||||
*/
|
||||
#define BT_GATT_PERM_WRITE_AUTHOR 0x80
|
||||
|
||||
/* GATT attribute flush flags */
|
||||
/** @def BT_GATT_FLUSH_DISCARD
|
||||
|
|
|
@ -47,18 +47,14 @@
|
|||
|
||||
#define BT_GATT_PERM_READ_MASK (BT_GATT_PERM_READ | \
|
||||
BT_GATT_PERM_READ_ENCRYPT | \
|
||||
BT_GATT_PERM_READ_AUTHEN | \
|
||||
BT_GATT_PERM_READ_AUTHOR)
|
||||
BT_GATT_PERM_READ_AUTHEN)
|
||||
#define BT_GATT_PERM_WRITE_MASK (BT_GATT_PERM_WRITE | \
|
||||
BT_GATT_PERM_WRITE_ENCRYPT | \
|
||||
BT_GATT_PERM_WRITE_AUTHEN | \
|
||||
BT_GATT_PERM_WRITE_AUTHOR)
|
||||
BT_GATT_PERM_WRITE_AUTHEN)
|
||||
#define BT_GATT_PERM_ENCRYPT_MASK (BT_GATT_PERM_READ_ENCRYPT | \
|
||||
BT_GATT_PERM_WRITE_ENCRYPT)
|
||||
#define BT_GATT_PERM_AUTHEN_MASK (BT_GATT_PERM_READ_AUTHEN | \
|
||||
BT_GATT_PERM_WRITE_AUTHEN)
|
||||
#define BT_GATT_PERM_AUTHOR_MASK (BT_GATT_PERM_READ_AUTHOR | \
|
||||
BT_GATT_PERM_WRITE_AUTHOR)
|
||||
#define BT_ATT_OP_CMD_FLAG 0x40
|
||||
|
||||
/* ATT request context */
|
||||
|
@ -559,11 +555,6 @@ static uint8_t check_perm(struct bt_conn *conn, const struct bt_gatt_attr *attr,
|
|||
#endif /* CONFIG_BLUETOOTH_SMP */
|
||||
}
|
||||
|
||||
if (mask & BT_GATT_PERM_AUTHOR_MASK) {
|
||||
/* TODO Authorization handled by application */
|
||||
return BT_ATT_ERR_AUTHORIZATION;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue