Lines Matching refs:bla
221 struct batadv_hashtable *hash = bat_priv->bla.claim_hash;
261 struct batadv_hashtable *hash = bat_priv->bla.backbone_hash;
307 hash = backbone_gw->bat_priv->bla.claim_hash;
355 memcpy(&local_claim_dest, &bat_priv->bla.claim_dest,
524 hash_added = batadv_hash_add(bat_priv->bla.backbone_hash,
549 atomic_inc(&bat_priv->bla.num_requests);
582 * batadv_bla_answer_request() - answer a bla request by sending own claims
610 hash = bat_priv->bla.claim_hash;
653 atomic_inc(&backbone_gw->bat_priv->bla.num_requests);
719 hash_added = batadv_hash_add(bat_priv->bla.claim_hash,
811 claim_removed_node = batadv_hash_remove(bat_priv->bla.claim_hash,
876 atomic_dec(&backbone_gw->bat_priv->bla.num_requests);
1020 bla_dst_own = &bat_priv->bla.claim_dest;
1145 bla_dst_own = &bat_priv->bla.claim_dest;
1228 hash = bat_priv->bla.backbone_hash;
1252 atomic_dec(&bat_priv->bla.num_requests);
1282 hash = bat_priv->bla.claim_hash;
1340 bat_priv->bla.claim_dest.group = group;
1352 hash = bat_priv->bla.backbone_hash;
1393 batadv_bla_send_claim(bat_priv, bat_priv->bla.loopdetect_addr,
1398 * batadv_bla_status_update() - purge bla interfaces if necessary
1410 /* this function already purges everything when bla is disabled,
1418 * batadv_bla_periodic_work() - performs periodic bla work
1439 bat_priv = container_of(priv_bla, struct batadv_priv, bla);
1450 if (atomic_dec_and_test(&bat_priv->bla.loopdetect_next)) {
1455 eth_random_addr(bat_priv->bla.loopdetect_addr);
1456 bat_priv->bla.loopdetect_addr[0] = 0xba;
1457 bat_priv->bla.loopdetect_addr[1] = 0xbe;
1458 bat_priv->bla.loopdetect_lasttime = jiffies;
1459 atomic_set(&bat_priv->bla.loopdetect_next,
1466 hash = bat_priv->bla.backbone_hash;
1491 * to give bridge forward delays and bla group forming
1501 atomic_dec(&backbone_gw->bat_priv->bla.num_requests);
1509 queue_delayed_work(batadv_event_workqueue, &bat_priv->bla.work,
1522 * batadv_bla_init() - initialize all bla structures
1535 spin_lock_init(&bat_priv->bla.bcast_duplist_lock);
1537 batadv_dbg(BATADV_DBG_BLA, bat_priv, "bla hash registering\n");
1540 memcpy(&bat_priv->bla.claim_dest.magic, claim_dest, 3);
1541 bat_priv->bla.claim_dest.type = 0;
1545 bat_priv->bla.claim_dest.group = htons(crc);
1548 bat_priv->bla.claim_dest.group = 0; /* will be set later */
1554 bat_priv->bla.bcast_duplist[i].entrytime = entrytime;
1555 bat_priv->bla.bcast_duplist_curr = 0;
1557 atomic_set(&bat_priv->bla.loopdetect_next,
1560 if (bat_priv->bla.claim_hash)
1563 bat_priv->bla.claim_hash = batadv_hash_new(128);
1564 if (!bat_priv->bla.claim_hash)
1567 bat_priv->bla.backbone_hash = batadv_hash_new(32);
1568 if (!bat_priv->bla.backbone_hash) {
1569 batadv_hash_destroy(bat_priv->bla.claim_hash);
1573 batadv_hash_set_lock_class(bat_priv->bla.claim_hash,
1575 batadv_hash_set_lock_class(bat_priv->bla.backbone_hash,
1578 batadv_dbg(BATADV_DBG_BLA, bat_priv, "bla hashes initialized\n");
1580 INIT_DELAYED_WORK(&bat_priv->bla.work, batadv_bla_periodic_work);
1582 queue_delayed_work(batadv_event_workqueue, &bat_priv->bla.work,
1618 spin_lock_bh(&bat_priv->bla.bcast_duplist_lock);
1621 curr = (bat_priv->bla.bcast_duplist_curr + i);
1623 entry = &bat_priv->bla.bcast_duplist[curr];
1660 curr = (bat_priv->bla.bcast_duplist_curr + BATADV_DUPLIST_SIZE - 1);
1662 entry = &bat_priv->bla.bcast_duplist[curr];
1673 bat_priv->bla.bcast_duplist_curr = curr;
1676 spin_unlock_bh(&bat_priv->bla.bcast_duplist_lock);
1735 struct batadv_hashtable *hash = bat_priv->bla.backbone_hash;
1798 * batadv_bla_free() - free all bla structures
1807 cancel_delayed_work_sync(&bat_priv->bla.work);
1810 if (bat_priv->bla.claim_hash) {
1812 batadv_hash_destroy(bat_priv->bla.claim_hash);
1813 bat_priv->bla.claim_hash = NULL;
1815 if (bat_priv->bla.backbone_hash) {
1817 batadv_hash_destroy(bat_priv->bla.backbone_hash);
1818 bat_priv->bla.backbone_hash = NULL;
1851 bat_priv->bla.loopdetect_addr))
1857 if (batadv_has_timed_out(bat_priv->bla.loopdetect_lasttime,
1916 if (unlikely(atomic_read(&bat_priv->bla.num_requests)))
2051 if (unlikely(atomic_read(&bat_priv->bla.num_requests)))
2257 hash = bat_priv->bla.claim_hash;
2427 hash = bat_priv->bla.backbone_hash;
2465 * Return: true if bla is disabled or the mac is claimed by the device,