|
@@ -19,6 +19,7 @@
|
|
|
#include "main.h"
|
|
|
|
|
|
#include <linux/atomic.h>
|
|
|
+#include <linux/bitops.h>
|
|
|
#include <linux/bug.h>
|
|
|
#include <linux/byteorder/generic.h>
|
|
|
#include <linux/compiler.h>
|
|
@@ -1862,7 +1863,7 @@ void batadv_tt_global_del_orig(struct batadv_priv *bat_priv,
|
|
|
}
|
|
|
spin_unlock_bh(list_lock);
|
|
|
}
|
|
|
- orig_node->capa_initialized &= ~BATADV_ORIG_CAPA_HAS_TT;
|
|
|
+ clear_bit(BATADV_ORIG_CAPA_HAS_TT, &orig_node->capa_initialized);
|
|
|
}
|
|
|
|
|
|
static bool batadv_tt_global_to_purge(struct batadv_tt_global_entry *tt_global,
|
|
@@ -2821,7 +2822,7 @@ static void _batadv_tt_update_changes(struct batadv_priv *bat_priv,
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- orig_node->capa_initialized |= BATADV_ORIG_CAPA_HAS_TT;
|
|
|
+ set_bit(BATADV_ORIG_CAPA_HAS_TT, &orig_node->capa_initialized);
|
|
|
}
|
|
|
|
|
|
static void batadv_tt_fill_gtable(struct batadv_priv *bat_priv,
|
|
@@ -3321,7 +3322,8 @@ static void batadv_tt_update_orig(struct batadv_priv *bat_priv,
|
|
|
bool has_tt_init;
|
|
|
|
|
|
tt_vlan = (struct batadv_tvlv_tt_vlan_data *)tt_buff;
|
|
|
- has_tt_init = orig_node->capa_initialized & BATADV_ORIG_CAPA_HAS_TT;
|
|
|
+ has_tt_init = test_bit(BATADV_ORIG_CAPA_HAS_TT,
|
|
|
+ &orig_node->capa_initialized);
|
|
|
|
|
|
/* orig table not initialised AND first diff is in the OGM OR the ttvn
|
|
|
* increased by one -> we can apply the attached changes
|