Lines Matching refs:tvlv_new
235 struct batadv_tvlv_container *tvlv_old, *tvlv_new; in batadv_tvlv_container_register() local
240 tvlv_new = kzalloc(sizeof(*tvlv_new) + tvlv_value_len, GFP_ATOMIC); in batadv_tvlv_container_register()
241 if (!tvlv_new) in batadv_tvlv_container_register()
244 tvlv_new->tvlv_hdr.version = version; in batadv_tvlv_container_register()
245 tvlv_new->tvlv_hdr.type = type; in batadv_tvlv_container_register()
246 tvlv_new->tvlv_hdr.len = htons(tvlv_value_len); in batadv_tvlv_container_register()
248 memcpy(tvlv_new + 1, tvlv_value, ntohs(tvlv_new->tvlv_hdr.len)); in batadv_tvlv_container_register()
249 INIT_HLIST_NODE(&tvlv_new->list); in batadv_tvlv_container_register()
250 kref_init(&tvlv_new->refcount); in batadv_tvlv_container_register()
256 kref_get(&tvlv_new->refcount); in batadv_tvlv_container_register()
257 hlist_add_head(&tvlv_new->list, &bat_priv->tvlv.container_list); in batadv_tvlv_container_register()
261 batadv_tvlv_container_put(tvlv_new); in batadv_tvlv_container_register()