Lines Matching refs:sec_flags
150 if (p_dev_rec->sec_flags & BTM_SEC_AUTHENTICATED) { in btm_dev_authenticated()
166 if (p_dev_rec->sec_flags & BTM_SEC_ENCRYPTED) { in btm_dev_encrypted()
182 if (p_dev_rec->sec_flags & BTM_SEC_AUTHORIZED) { in btm_dev_authorized()
199 if (p_dev_rec->sec_flags & BTM_SEC_16_DIGIT_PIN_AUTHED) { in btm_dev_16_digit_authenticated()
337 *p_sec_flags = (uint8_t)p_dev_rec->sec_flags; in BTM_GetSecurityFlags()
361 *p_sec_flags = (uint8_t)p_dev_rec->sec_flags; in BTM_GetSecurityFlagsByTransport()
363 *p_sec_flags = (uint8_t)(p_dev_rec->sec_flags >> 8); in BTM_GetSecurityFlagsByTransport()
804 p_dev_rec->sec_flags |= BTM_SEC_LINK_KEY_AUTHED; in BTM_PINCodeReply()
807 p_dev_rec->sec_flags |= BTM_SEC_16_DIGIT_PIN_AUTHED; in BTM_PINCodeReply()
845 p_dev_rec->sec_flags &= ~BTM_SEC_LINK_KEY_AUTHED; in BTM_PINCodeReply()
905 BTM_TRACE_DEBUG("before update sec_flags=0x%x", p_dev_rec->sec_flags); in btm_sec_bond_by_transport()
910 (p_dev_rec->sec_flags & BTM_SEC_AUTHENTICATED)) || in btm_sec_bond_by_transport()
913 (p_dev_rec->sec_flags & BTM_SEC_LE_AUTHENTICATED))) { in btm_sec_bond_by_transport()
940 p_dev_rec->sec_flags &= ~BTM_SEC_LE_MASK; in btm_sec_bond_by_transport()
953 p_dev_rec->sec_flags &= in btm_sec_bond_by_transport()
957 BTM_TRACE_DEBUG("after update sec_flags=0x%x", p_dev_rec->sec_flags); in btm_sec_bond_by_transport()
983 p_dev_rec->sec_flags &= ~BTM_SEC_NAME_KNOWN; in btm_sec_bond_by_transport()
1188 if ((p_dev_rec != NULL) && (p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_KNOWN)) { in BTM_SecGetDeviceLinkKey()
1212 if ((p_dev_rec != NULL) && (p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_KNOWN)) { in BTM_SecGetDeviceLinkKeyType()
1267 (p_dev_rec->sec_flags & BTM_SEC_ENCRYPTED)) { in BTM_SetEncryption()
1300 p_dev_rec->hci_handle, p_dev_rec->sec_state, p_dev_rec->sec_flags, in BTM_SetEncryption()
1417 p_dev_rec->sec_flags |= BTM_SEC_LINK_KEY_AUTHED; in BTM_ConfirmReqReply()
1418 p_dev_rec->sec_flags |= BTM_SEC_16_DIGIT_PIN_AUTHED; in BTM_ConfirmReqReply()
1468 p_dev_rec->sec_flags &= in BTM_PasskeyReqReply()
1832 if (p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_KNOWN) { in btm_sec_is_upgrade_possible()
1868 p_dev_rec->sec_flags); in btm_sec_is_upgrade_possible()
1887 if (!(p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_KNOWN)) return; in btm_sec_check_upgrade()
1890 BTM_TRACE_DEBUG("need upgrade!! sec_flags:0x%x", p_dev_rec->sec_flags); in btm_sec_check_upgrade()
1908 p_dev_rec->sec_flags &= in btm_sec_check_upgrade()
1910 p_dev_rec->sec_flags &= ~BTM_SEC_AUTHENTICATED; in btm_sec_check_upgrade()
1911 BTM_TRACE_DEBUG("sec_flags:0x%x", p_dev_rec->sec_flags); in btm_sec_check_upgrade()
2016 p_dev_rec->sec_flags); in btm_sec_l2cap_access_req()
2113 p_dev_rec->sec_flags); in btm_sec_l2cap_access_req()
2122 p_dev_rec->sm4, p_dev_rec->sec_flags, security_required, in btm_sec_l2cap_access_req()
2177 (p_dev_rec->sec_flags & BTM_SEC_AUTHENTICATED), in btm_sec_l2cap_access_req()
2178 (p_dev_rec->sec_flags & BTM_SEC_ENCRYPTED)); in btm_sec_l2cap_access_req()
2181 if ((0 == (p_dev_rec->sec_flags & BTM_SEC_AUTHENTICATED)) || in btm_sec_l2cap_access_req()
2182 (0 == (p_dev_rec->sec_flags & BTM_SEC_ENCRYPTED))) { in btm_sec_l2cap_access_req()
2211 p_dev_rec->sec_flags &= ~BTM_SEC_AUTHORIZED; in btm_sec_l2cap_access_req()
2219 if ((p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_KNOWN) != 0) { in btm_sec_l2cap_access_req()
2222 p_dev_rec->sec_flags &= in btm_sec_l2cap_access_req()
2225 BTM_TRACE_DEBUG("%s: sec_flags:0x%x", __func__, p_dev_rec->sec_flags); in btm_sec_l2cap_access_req()
2235 __func__, psm, handle, p_dev_rec->sec_state, p_dev_rec->sec_flags, in btm_sec_l2cap_access_req()
2448 if ((p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_KNOWN) != 0) { in btm_sec_mx_access_request()
2452 p_dev_rec->sec_flags &= in btm_sec_mx_access_request()
2455 BTM_TRACE_DEBUG("%s: sec_flags:0x%x", __func__, p_dev_rec->sec_flags); in btm_sec_mx_access_request()
2472 p_dev_rec->sec_flags &= ~(BTM_SEC_AUTHORIZED); in btm_sec_mx_access_request()
2478 p_dev_rec->sec_flags, p_dev_rec->security_required, in btm_sec_mx_access_request()
2517 if (!p_dev_rec || !(p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_AUTHED)) { in btm_sec_conn_req()
2891 p_dev_rec->sec_flags |= BTM_SEC_NAME_KNOWN; in btm_sec_rmt_name_request_complete()
2893 p_dev_rec->sec_flags); in btm_sec_rmt_name_request_complete()
3055 (p_dev_rec->sec_flags & BTM_SEC_AUTHENTICATED)) { in btm_sec_rmt_name_request_complete()
3573 p_dev_rec->sec_flags |= BTM_SEC_AUTHENTICATED; in btm_simple_pair_complete()
3755 p_dev_rec->sec_flags &= ~BTM_SEC_LINK_KEY_KNOWN; in btm_sec_auth_retry()
3757 p_dev_rec->sm4, p_dev_rec->sec_flags); in btm_sec_auth_retry()
3851 ((p_dev_rec->sec_flags & (BTM_SEC_AUTHENTICATED | BTM_SEC_ENCRYPTED)) == in btm_sec_auth_complete()
3881 && (!(p_dev_rec->sec_flags & BTM_SEC_LE_LINK_KEY_KNOWN) || in btm_sec_auth_complete()
3883 (!(p_dev_rec->sec_flags & BTM_SEC_LE_LINK_KEY_AUTHED) && in btm_sec_auth_complete()
3884 (p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_AUTHED)))) { in btm_sec_auth_complete()
3912 p_dev_rec->sec_flags |= BTM_SEC_AUTHENTICATED; in btm_sec_auth_complete()
3919 p_dev_rec->sec_flags |= BTM_SEC_16_DIGIT_PIN_AUTHED; in btm_sec_auth_complete()
3950 (p_dev_rec) ? p_dev_rec->sec_flags : 0); in btm_sec_encrypt_change()
3965 p_dev_rec->sec_flags |= (BTM_SEC_AUTHENTICATED | BTM_SEC_ENCRYPTED); in btm_sec_encrypt_change()
3969 p_dev_rec->sec_flags |= BTM_SEC_16_DIGIT_PIN_AUTHED; in btm_sec_encrypt_change()
3972 p_dev_rec->sec_flags |= (BTM_SEC_LE_AUTHENTICATED | BTM_SEC_LE_ENCRYPTED); in btm_sec_encrypt_change()
3981 p_dev_rec->sec_flags &= ~BTM_SEC_ENCRYPTED; in btm_sec_encrypt_change()
3983 p_dev_rec->sec_flags &= ~BTM_SEC_LE_ENCRYPTED; in btm_sec_encrypt_change()
3987 p_dev_rec->sec_flags); in btm_sec_encrypt_change()
3997 p_dev_rec->sec_flags &= ~(BTM_SEC_LE_LINK_KEY_KNOWN); in btm_sec_encrypt_change()
4023 (!(p_dev_rec->sec_flags & BTM_SEC_LE_LINK_KEY_KNOWN) || in btm_sec_encrypt_change()
4025 (!(p_dev_rec->sec_flags & BTM_SEC_LE_LINK_KEY_AUTHED) && in btm_sec_encrypt_change()
4026 (p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_AUTHED))) && in btm_sec_encrypt_change()
4182 if (p_dev_rec->sec_flags & BTM_SEC_NAME_KNOWN) { in btm_sec_connected()
4270 p_dev_rec->sec_flags &= in btm_sec_connected()
4299 p_dev_rec->sec_flags &= ~(BTM_SEC_LE_LINK_KEY_KNOWN << bit_shift); in btm_sec_connected()
4338 if (is_pairing_device && (p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_KNOWN)) { in btm_sec_connected()
4393 p_dev_rec->sec_flags &= ~((BTM_SEC_AUTHORIZED | BTM_SEC_AUTHENTICATED | in btm_sec_connected()
4398 p_dev_rec->sec_flags |= in btm_sec_connected()
4402 p_dev_rec->sec_flags |= (BTM_SEC_AUTHENTICATED << bit_shift); in btm_sec_connected()
4407 p_dev_rec->sec_flags |= (BTM_SEC_16_DIGIT_PIN_AUTHED << bit_shift); in btm_sec_connected()
4416 if (!(p_dev_rec->sec_flags & BTM_SEC_NAME_KNOWN) || in btm_sec_connected()
4501 p_dev_rec->sec_flags); in btm_sec_disconnected()
4508 p_dev_rec->sec_flags &= ~BTM_SEC_LINK_KEY_KNOWN; in btm_sec_disconnected()
4538 p_dev_rec->sec_flags &= ~(BTM_SEC_LE_AUTHENTICATED | BTM_SEC_LE_ENCRYPTED); in btm_sec_disconnected()
4548 p_dev_rec->sec_flags &= in btm_sec_disconnected()
4554 p_dev_rec->sec_flags &= ~(BTM_SEC_LINK_KEY_KNOWN); in btm_sec_disconnected()
4569 p_dev_rec->sec_flags); in btm_sec_disconnected()
4615 p_dev_rec->sec_flags |= BTM_SEC_LINK_KEY_KNOWN; in btm_sec_link_key_notification()
4624 p_dev_rec->sec_flags |= BTM_SEC_16_DIGIT_PIN_AUTHED; in btm_sec_link_key_notification()
4661 if ((!(p_dev_rec->sec_flags & BTM_SEC_NAME_KNOWN) && in btm_sec_link_key_notification()
4677 p_dev_rec->rmt_io_caps, p_dev_rec->sec_flags, in btm_sec_link_key_notification()
4698 if (p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_AUTHED) in btm_sec_link_key_notification()
4740 if (p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_KNOWN) { in btm_sec_link_key_request()
4972 if (p_dev_rec->sec_flags & BTM_SEC_NAME_KNOWN) { in btm_sec_pin_code_request()
5044 p_dev_rec->security_required, p_dev_rec->sec_flags, p_dev_rec->sec_state); in btm_sec_execute_procedure()
5050 if (!(p_dev_rec->sec_flags & BTM_SEC_NAME_KNOWN) && in btm_sec_execute_procedure()
5061 if ((((!(p_dev_rec->sec_flags & BTM_SEC_AUTHENTICATED)) && in btm_sec_execute_procedure()
5066 (!(p_dev_rec->sec_flags & BTM_SEC_16_DIGIT_PIN_AUTHED) && in btm_sec_execute_procedure()
5090 if ((p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_KNOWN) && in btm_sec_execute_procedure()
5091 (!(p_dev_rec->sec_flags & BTM_SEC_16_DIGIT_PIN_AUTHED) && in btm_sec_execute_procedure()
5094 p_dev_rec->sec_flags &= in btm_sec_execute_procedure()
5105 if (!(p_dev_rec->sec_flags & BTM_SEC_ENCRYPTED) && in btm_sec_execute_procedure()
5128 if (!(p_dev_rec->sec_flags & BTM_SEC_AUTHORIZED) && in btm_sec_execute_procedure()
5223 if ((p_dev_rec->sec_flags & BTM_SEC_NAME_KNOWN) || in btm_sec_start_authorization()
5258 p_dev_rec->sec_flags |= BTM_SEC_AUTHORIZED; in btm_sec_start_authorization()
5819 p_dev_rec->sec_flags & BTM_SEC_LE_AUTHENTICATED)) { in btm_sec_check_pending_enc_req()
5883 (p_dev_rec->sec_flags & BTM_SEC_LE_LINK_KEY_KNOWN)) || in btm_sec_is_a_bonded_dev()
5884 (p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_KNOWN))) { in btm_sec_is_a_bonded_dev()