Lines Matching refs:memo
61 struct hci_memo *memo; in hci_route_lookup() local
88 memo = hci_memo_find(unit, dest); in hci_route_lookup()
89 if (memo) in hci_route_lookup()
117 struct hci_memo *memo, *m0; in hci_memo_find() local
123 while ((memo = m0) != NULL) { in hci_memo_find()
124 m0 = LIST_NEXT(memo, next); in hci_memo_find()
126 if (now.tv_sec > memo->time.tv_sec + hci_memo_expiry) { in hci_memo_find()
127 DPRINTF("memo %p too old (expiring)\n", memo); in hci_memo_find()
128 hci_memo_free(memo); in hci_memo_find()
132 if (bdaddr_same(bdaddr, &memo->bdaddr)) { in hci_memo_find()
133 DPRINTF("memo %p found\n", memo); in hci_memo_find()
134 return memo; in hci_memo_find()
149 struct hci_memo *memo; in hci_memo_new() local
151 memo = hci_memo_find(unit, bdaddr); in hci_memo_new()
152 if (memo == NULL) { in hci_memo_new()
153 memo = malloc(sizeof(struct hci_memo), in hci_memo_new()
156 if (memo == NULL) { in hci_memo_new()
165 bdaddr_copy(&memo->bdaddr, bdaddr); in hci_memo_new()
166 LIST_INSERT_HEAD(&unit->hci_memos, memo, next); in hci_memo_new()
173 microtime(&memo->time); in hci_memo_new()
174 return memo; in hci_memo_new()
178 hci_memo_free(struct hci_memo *memo) in hci_memo_free() argument
181 LIST_REMOVE(memo, next); in hci_memo_free()
182 free(memo, M_BLUETOOTH); in hci_memo_free()