]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/tipc/bcast.c
[TIPC] Updated link priority macros
[karo-tx-linux.git] / net / tipc / bcast.c
index 180d80b37a8db5b1fa731d6001034263028ea471..af9743a52d6c27fecc91f73021321d97e9bd76dc 100644 (file)
@@ -1,10 +1,9 @@
 /*
  * net/tipc/bcast.c: TIPC broadcast code
  *     
- * Copyright (c) 2003-2005, Ericsson Research Canada
+ * Copyright (c) 2004-2006, Ericsson AB
  * Copyright (c) 2004, Intel Corporation.
  * Copyright (c) 2005, Wind River Systems
- * Copyright (c) 2005-2006, Ericsson AB
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -83,7 +82,7 @@ struct bcbearer {
        struct bearer bearer;
        struct media media;
        struct bcbearer_pair bpairs[MAX_BEARERS];
-       struct bcbearer_pair bpairs_temp[TIPC_NUM_LINK_PRI];
+       struct bcbearer_pair bpairs_temp[TIPC_MAX_LINK_PRI + 1];
 };
 
 /**
@@ -115,12 +114,12 @@ static inline u32 buf_seqno(struct sk_buff *buf)
 
 static inline u32 bcbuf_acks(struct sk_buff *buf)
 {
-       return (u32)TIPC_SKB_CB(buf)->handle;
+       return (u32)(unsigned long)TIPC_SKB_CB(buf)->handle;
 }
 
 static inline void bcbuf_set_acks(struct sk_buff *buf, u32 acks)
 {
-       TIPC_SKB_CB(buf)->handle = (void *)acks;
+       TIPC_SKB_CB(buf)->handle = (void *)(unsigned long)acks;
 }
 
 static inline void bcbuf_decr_acks(struct sk_buff *buf)
@@ -631,7 +630,7 @@ void bcbearer_sort(void)
        bp_curr = bcbearer->bpairs;
        memset(bcbearer->bpairs, 0, sizeof(bcbearer->bpairs));
 
-       for (pri = (TIPC_NUM_LINK_PRI - 1); pri >= 0; pri--) {
+       for (pri = TIPC_MAX_LINK_PRI; pri >= 0; pri--) {
 
                if (!bp_temp[pri].primary)
                        continue;