Lines Matching refs:devkey
345 struct mac802154_llsec_device_key *devkey; in llsec_dev_free() local
348 devkey = container_of(pos, struct mac802154_llsec_device_key, in llsec_dev_free()
349 devkey); in llsec_dev_free()
352 kfree_sensitive(devkey); in llsec_dev_free()
416 struct ieee802154_llsec_device_key *devkey; in llsec_devkey_find() local
418 list_for_each_entry_rcu(devkey, &dev->dev.keys, list) { in llsec_devkey_find()
419 if (!llsec_key_id_equal(key, &devkey->key_id)) in llsec_devkey_find()
422 return container_of(devkey, struct mac802154_llsec_device_key, in llsec_devkey_find()
423 devkey); in llsec_devkey_find()
434 struct mac802154_llsec_device_key *devkey; in mac802154_llsec_devkey_add() local
444 devkey = kmalloc(sizeof(*devkey), GFP_KERNEL); in mac802154_llsec_devkey_add()
445 if (!devkey) in mac802154_llsec_devkey_add()
448 devkey->devkey = *key; in mac802154_llsec_devkey_add()
449 list_add_tail_rcu(&devkey->devkey.list, &dev->dev.keys); in mac802154_llsec_devkey_add()
458 struct mac802154_llsec_device_key *devkey; in mac802154_llsec_devkey_del() local
465 devkey = llsec_devkey_find(dev, &key->key_id); in mac802154_llsec_devkey_del()
466 if (!devkey) in mac802154_llsec_devkey_del()
469 list_del_rcu(&devkey->devkey.list); in mac802154_llsec_devkey_del()
470 kfree_rcu(devkey, rcu); in mac802154_llsec_devkey_del()
921 struct mac802154_llsec_device_key *devkey; in llsec_update_devkey_record() local
923 devkey = llsec_devkey_find(dev, in_key); in llsec_update_devkey_record()
925 if (!devkey) { in llsec_update_devkey_record()
928 next = kzalloc(sizeof(*devkey), GFP_ATOMIC); in llsec_update_devkey_record()
932 next->devkey.key_id = *in_key; in llsec_update_devkey_record()
936 devkey = llsec_devkey_find(dev, in_key); in llsec_update_devkey_record()
937 if (!devkey) in llsec_update_devkey_record()
938 list_add_rcu(&next->devkey.list, &dev->dev.keys); in llsec_update_devkey_record()
953 struct mac802154_llsec_device_key *devkey = NULL; in llsec_update_devkey_info() local
956 devkey = llsec_devkey_find(dev, in_key); in llsec_update_devkey_info()
957 if (!devkey) in llsec_update_devkey_info()
970 if ((!devkey && frame_counter < dev->dev.frame_counter) || in llsec_update_devkey_info()
971 (devkey && frame_counter < devkey->devkey.frame_counter)) { in llsec_update_devkey_info()
976 if (devkey) in llsec_update_devkey_info()
977 devkey->devkey.frame_counter = frame_counter + 1; in llsec_update_devkey_info()