Lines Matching refs:bla
222 struct batadv_hashtable *hash = bat_priv->bla.claim_hash;
262 struct batadv_hashtable *hash = bat_priv->bla.backbone_hash;
308 hash = backbone_gw->bat_priv->bla.claim_hash;
356 memcpy(&local_claim_dest, &bat_priv->bla.claim_dest,
529 hash_added = batadv_hash_add(bat_priv->bla.backbone_hash,
554 atomic_inc(&bat_priv->bla.num_requests);
587 * batadv_bla_answer_request() - answer a bla request by sending own claims
615 hash = bat_priv->bla.claim_hash;
658 atomic_inc(&backbone_gw->bat_priv->bla.num_requests);
724 hash_added = batadv_hash_add(bat_priv->bla.claim_hash,
816 claim_removed_node = batadv_hash_remove(bat_priv->bla.claim_hash,
881 atomic_dec(&backbone_gw->bat_priv->bla.num_requests);
1025 bla_dst_own = &bat_priv->bla.claim_dest;
1150 bla_dst_own = &bat_priv->bla.claim_dest;
1233 hash = bat_priv->bla.backbone_hash;
1257 atomic_dec(&bat_priv->bla.num_requests);
1287 hash = bat_priv->bla.claim_hash;
1345 bat_priv->bla.claim_dest.group = group;
1357 hash = bat_priv->bla.backbone_hash;
1398 batadv_bla_send_claim(bat_priv, bat_priv->bla.loopdetect_addr,
1403 * batadv_bla_status_update() - purge bla interfaces if necessary
1415 /* this function already purges everything when bla is disabled,
1423 * batadv_bla_periodic_work() - performs periodic bla work
1444 bat_priv = container_of(priv_bla, struct batadv_priv, bla);
1455 if (atomic_dec_and_test(&bat_priv->bla.loopdetect_next)) {
1460 eth_random_addr(bat_priv->bla.loopdetect_addr);
1461 bat_priv->bla.loopdetect_addr[0] = 0xba;
1462 bat_priv->bla.loopdetect_addr[1] = 0xbe;
1463 bat_priv->bla.loopdetect_lasttime = jiffies;
1464 atomic_set(&bat_priv->bla.loopdetect_next,
1471 hash = bat_priv->bla.backbone_hash;
1496 * to give bridge forward delays and bla group forming
1506 atomic_dec(&backbone_gw->bat_priv->bla.num_requests);
1515 queue_delayed_work(batadv_event_workqueue, &bat_priv->bla.work,
1528 * batadv_bla_init() - initialize all bla structures
1541 spin_lock_init(&bat_priv->bla.bcast_duplist_lock);
1543 batadv_dbg(BATADV_DBG_BLA, bat_priv, "bla hash registering\n");
1546 memcpy(&bat_priv->bla.claim_dest.magic, claim_dest, 3);
1547 bat_priv->bla.claim_dest.type = 0;
1551 bat_priv->bla.claim_dest.group = htons(crc);
1554 bat_priv->bla.claim_dest.group = 0; /* will be set later */
1560 bat_priv->bla.bcast_duplist[i].entrytime = entrytime;
1561 bat_priv->bla.bcast_duplist_curr = 0;
1563 atomic_set(&bat_priv->bla.loopdetect_next,
1566 if (bat_priv->bla.claim_hash)
1569 bat_priv->bla.claim_hash = batadv_hash_new(128);
1570 if (!bat_priv->bla.claim_hash)
1573 bat_priv->bla.backbone_hash = batadv_hash_new(32);
1574 if (!bat_priv->bla.backbone_hash) {
1575 batadv_hash_destroy(bat_priv->bla.claim_hash);
1579 batadv_hash_set_lock_class(bat_priv->bla.claim_hash,
1581 batadv_hash_set_lock_class(bat_priv->bla.backbone_hash,
1584 batadv_dbg(BATADV_DBG_BLA, bat_priv, "bla hashes initialized\n");
1586 INIT_DELAYED_WORK(&bat_priv->bla.work, batadv_bla_periodic_work);
1588 queue_delayed_work(batadv_event_workqueue, &bat_priv->bla.work,
1624 spin_lock_bh(&bat_priv->bla.bcast_duplist_lock);
1627 curr = (bat_priv->bla.bcast_duplist_curr + i);
1629 entry = &bat_priv->bla.bcast_duplist[curr];
1666 curr = (bat_priv->bla.bcast_duplist_curr + BATADV_DUPLIST_SIZE - 1);
1668 entry = &bat_priv->bla.bcast_duplist[curr];
1679 bat_priv->bla.bcast_duplist_curr = curr;
1682 spin_unlock_bh(&bat_priv->bla.bcast_duplist_lock);
1741 struct batadv_hashtable *hash = bat_priv->bla.backbone_hash;
1804 * batadv_bla_free() - free all bla structures
1813 cancel_delayed_work_sync(&bat_priv->bla.work);
1816 if (bat_priv->bla.claim_hash) {
1818 batadv_hash_destroy(bat_priv->bla.claim_hash);
1819 bat_priv->bla.claim_hash = NULL;
1821 if (bat_priv->bla.backbone_hash) {
1823 batadv_hash_destroy(bat_priv->bla.backbone_hash);
1824 bat_priv->bla.backbone_hash = NULL;
1858 bat_priv->bla.loopdetect_addr))
1864 if (batadv_has_timed_out(bat_priv->bla.loopdetect_lasttime,
1923 if (unlikely(atomic_read(&bat_priv->bla.num_requests)))
2060 if (unlikely(atomic_read(&bat_priv->bla.num_requests)))
2140 struct batadv_hashtable *hash = bat_priv->bla.claim_hash;
2158 ntohs(bat_priv->bla.claim_dest.group));
2331 hash = bat_priv->bla.claim_hash;
2374 struct batadv_hashtable *hash = bat_priv->bla.backbone_hash;
2392 ntohs(bat_priv->bla.claim_dest.group));
2569 hash = bat_priv->bla.backbone_hash;
2609 * Return: true if bla is disabled or the mac is claimed by the device,