Lines Matching refs:bt_dev

125 	if (!atomic_test_bit(bt_dev.flags, BT_DEV_ENABLE)) {  in set_setting()
144 if (atomic_test_bit(bt_dev.flags, BT_DEV_PRESET_ID)) { in set_setting()
149 len = read_cb(cb_arg, &bt_dev.id_addr, sizeof(bt_dev.id_addr)); in set_setting()
150 if (len < sizeof(bt_dev.id_addr[0])) { in set_setting()
156 LOG_HEXDUMP_DBG(&bt_dev.id_addr, len, "data read"); in set_setting()
158 (void)memset(bt_dev.id_addr, 0, in set_setting()
159 sizeof(bt_dev.id_addr)); in set_setting()
160 bt_dev.id_count = 0U; in set_setting()
164 bt_dev.id_count = len / sizeof(bt_dev.id_addr[0]); in set_setting()
165 for (i = 0; i < bt_dev.id_count; i++) { in set_setting()
166 LOG_DBG("ID[%d] %s", i, bt_addr_le_str(&bt_dev.id_addr[i])); in set_setting()
175 len = read_cb(cb_arg, &bt_dev.name, sizeof(bt_dev.name) - 1); in set_setting()
180 bt_dev.name[len] = '\0'; in set_setting()
182 LOG_DBG("Name set to %s", bt_dev.name); in set_setting()
190 if (len_rd != sizeof(bt_dev.appearance)) { in set_setting()
195 len = read_cb(cb_arg, &bt_dev.appearance, sizeof(bt_dev.appearance)); in set_setting()
206 len = read_cb(cb_arg, bt_dev.irk, sizeof(bt_dev.irk)); in set_setting()
207 if (len < sizeof(bt_dev.irk[0])) { in set_setting()
213 (void)memset(bt_dev.irk, 0, sizeof(bt_dev.irk)); in set_setting()
218 count = len / sizeof(bt_dev.irk[0]); in set_setting()
220 LOG_DBG("IRK[%d] %s", i, bt_hex(bt_dev.irk[i], 16)); in set_setting()
237 if (!atomic_test_bit(bt_dev.flags, BT_DEV_ENABLE)) { in commit_settings()
248 if (bt_dev.name[0] == '\0') { in commit_settings()
252 if (!bt_dev.id_count) { in commit_settings()
260 if (!bt_dev.id_count) { in commit_settings()
268 if (!atomic_test_bit(bt_dev.flags, BT_DEV_READY)) { in commit_settings()
275 if (atomic_test_and_clear_bit(bt_dev.flags, BT_DEV_STORE_ID)) { in commit_settings()
428 int err = bt_settings_store("id", 0, NULL, &bt_dev.id_addr, ID_DATA_LEN(bt_dev.id_addr)); in do_store_id()
452 int err = bt_settings_store("irk", 0, NULL, bt_dev.irk, ID_DATA_LEN(bt_dev.irk)); in do_store_irk()