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:
Luiz Augusto von Dentz 2016-05-11 13:55:33 +03:00 committed by Johan Hedberg
commit 1157a8f26f
2 changed files with 2 additions and 23 deletions

View file

@ -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

View file

@ -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;
}