Bluetooth: tester: Support l2cap connect rsp insuff secure authen
If the L2CAP connection response of command `listen` is `BTP_L2CAP_CONNECTION_RESPONSE_INSUFF_SEC_AUTHEN`, set the security level of L2CAP server to level 4. Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
This commit is contained in:
parent
ba55e9d7c0
commit
424364ded0
2 changed files with 4 additions and 0 deletions
|
@ -53,6 +53,7 @@ struct btp_l2cap_send_data_cmd {
|
|||
#define BTP_L2CAP_CONNECTION_RESPONSE_INSUFF_AUTHOR 0x02
|
||||
#define BTP_L2CAP_CONNECTION_RESPONSE_INSUFF_ENC_KEY 0x03
|
||||
#define BTP_L2CAP_CONNECTION_RESPONSE_INSUFF_ENCRYPTION 0x04
|
||||
#define BTP_L2CAP_CONNECTION_RESPONSE_INSUFF_SEC_AUTHEN 0x05
|
||||
|
||||
#define BTP_L2CAP_LISTEN 0x05
|
||||
struct btp_l2cap_listen_cmd {
|
||||
|
|
|
@ -770,6 +770,9 @@ static uint8_t listen(const void *cmd, uint16_t cmd_len,
|
|||
case BTP_L2CAP_CONNECTION_RESPONSE_INSUFF_ENCRYPTION:
|
||||
server->sec_level = BT_SECURITY_L2;
|
||||
break;
|
||||
case BTP_L2CAP_CONNECTION_RESPONSE_INSUFF_SEC_AUTHEN:
|
||||
server->sec_level = BT_SECURITY_L4;
|
||||
break;
|
||||
default:
|
||||
return BTP_STATUS_FAILED;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue