batman-adv: Convert batadv_dat_entry to kref
[deliverable/linux.git] / net / batman-adv / types.h
index 7f7a0f1eaf752194ea5a64ac4c830b691e1f1a04..9df8f39e478595d8837c63d2517a54c40c46e54c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2007-201 B.A.T.M.A.N. contributors:
  *
  * Marek Lindner, Simon Wunderlich
  *
@@ -25,6 +25,7 @@
 #include <linux/bitops.h>
 #include <linux/compiler.h>
 #include <linux/if_ether.h>
+#include <linux/kref.h>
 #include <linux/netdevice.h>
 #include <linux/sched.h> /* for linux/wait.h */
 #include <linux/spinlock.h>
@@ -341,7 +342,7 @@ struct batadv_gw_node {
        struct batadv_orig_node *orig_node;
        u32 bandwidth_down;
        u32 bandwidth_up;
-       atomic_t refcount;
+       struct kref refcount;
        struct rcu_head rcu;
 };
 
@@ -359,7 +360,7 @@ struct batadv_hardif_neigh_node {
        u8 addr[ETH_ALEN];
        struct batadv_hard_iface *if_incoming;
        unsigned long last_seen;
-       atomic_t refcount;
+       struct kref refcount;
        struct rcu_head rcu;
 };
 
@@ -745,7 +746,7 @@ struct batadv_softif_vlan {
        atomic_t ap_isolation;          /* boolean */
        struct batadv_vlan_tt tt;
        struct hlist_node list;
-       atomic_t refcount;
+       struct kref refcount;
        struct rcu_head rcu;
 };
 
@@ -772,6 +773,9 @@ struct batadv_softif_vlan {
  * @orig_interval: OGM broadcast interval in milliseconds
  * @hop_penalty: penalty which will be applied to an OGM's tq-field on every hop
  * @log_level: configured log level (see batadv_dbg_level)
+ * @isolation_mark: the skb->mark value used to match packets for AP isolation
+ * @isolation_mark_mask: bitmask identifying the bits in skb->mark to be used
+ *  for the isolation mark
  * @bcast_seqno: last sent broadcast packet sequence number
  * @bcast_queue_left: number of remaining buffered broadcast packet slots
  * @batman_queue_left: number of remaining OGM packet slots
@@ -926,7 +930,7 @@ struct batadv_bla_backbone_gw {
        atomic_t request_sent;
        u16 crc;
        spinlock_t crc_lock; /* protects crc */
-       atomic_t refcount;
+       struct kref refcount;
        struct rcu_head rcu;
 };
 
@@ -947,7 +951,7 @@ struct batadv_bla_claim {
        unsigned long lasttime;
        struct hlist_node hash_entry;
        struct rcu_head rcu;
-       atomic_t refcount;
+       struct kref refcount;
 };
 #endif
 
@@ -1063,7 +1067,7 @@ struct batadv_tt_roam_node {
 struct batadv_nc_node {
        struct list_head list;
        u8 addr[ETH_ALEN];
-       atomic_t refcount;
+       struct kref refcount;
        struct rcu_head rcu;
        struct batadv_orig_node *orig_node;
        unsigned long last_seen;
@@ -1083,7 +1087,7 @@ struct batadv_nc_node {
 struct batadv_nc_path {
        struct hlist_node hash_entry;
        struct rcu_head rcu;
-       atomic_t refcount;
+       struct kref refcount;
        struct list_head packet_list;
        spinlock_t packet_list_lock; /* Protects packet_list */
        u8 next_hop[ETH_ALEN];
@@ -1226,7 +1230,7 @@ struct batadv_dat_entry {
        unsigned short vid;
        unsigned long last_update;
        struct hlist_node hash_entry;
-       atomic_t refcount;
+       struct kref refcount;
        struct rcu_head rcu;
 };
 
This page took 0.02641 seconds and 5 git commands to generate.