]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/tipc/msg.h
tipc: fix broadcast link synchronization problem
[karo-tx-linux.git] / net / tipc / msg.h
index 7cf52fb39bee6aa38379e81af31fe3d5c6fea557..50a739860d379ebaf775e566e67979dda6842e4d 100644 (file)
@@ -714,11 +714,38 @@ static inline void msg_set_peer_stopping(struct tipc_msg *m, u32 s)
        msg_set_bits(m, 5, 13, 0x1, s);
 }
 
+static inline bool msg_bc_ack_invalid(struct tipc_msg *m)
+{
+       switch (msg_user(m)) {
+       case BCAST_PROTOCOL:
+       case NAME_DISTRIBUTOR:
+       case LINK_PROTOCOL:
+               return msg_bits(m, 5, 14, 0x1);
+       default:
+               return false;
+       }
+}
+
+static inline void msg_set_bc_ack_invalid(struct tipc_msg *m, bool invalid)
+{
+       msg_set_bits(m, 5, 14, 0x1, invalid);
+}
+
 static inline char *msg_media_addr(struct tipc_msg *m)
 {
        return (char *)&m->hdr[TIPC_MEDIA_INFO_OFFSET];
 }
 
+static inline u32 msg_bc_gap(struct tipc_msg *m)
+{
+       return msg_bits(m, 8, 0, 0x3ff);
+}
+
+static inline void msg_set_bc_gap(struct tipc_msg *m, u32 n)
+{
+       msg_set_bits(m, 8, 0, 0x3ff, n);
+}
+
 /*
  * Word 9
  */