@@ -175,9 +175,12 @@ bool link_is_bc_rcvlink(struct tipc_link *l)
175
175
176
176
int tipc_link_is_active (struct tipc_link * l )
177
177
{
178
- struct tipc_node * n = l -> owner ;
178
+ return l -> active ;
179
+ }
179
180
180
- return (node_active_link (n , 0 ) == l ) || (node_active_link (n , 1 ) == l );
181
+ void tipc_link_set_active (struct tipc_link * l , bool active )
182
+ {
183
+ l -> active = active ;
181
184
}
182
185
183
186
void tipc_link_add_bc_peer (struct tipc_link * snd_l ,
@@ -250,7 +253,7 @@ static u32 link_own_addr(struct tipc_link *l)
250
253
*
251
254
* Returns true if link was created, otherwise false
252
255
*/
253
- bool tipc_link_create (struct tipc_node * n , char * if_name , int bearer_id ,
256
+ bool tipc_link_create (struct net * net , char * if_name , int bearer_id ,
254
257
int tolerance , char net_plane , u32 mtu , int priority ,
255
258
int window , u32 session , u32 ownnode , u32 peer ,
256
259
u16 peer_caps ,
@@ -284,7 +287,7 @@ bool tipc_link_create(struct tipc_node *n, char *if_name, int bearer_id,
284
287
l -> addr = peer ;
285
288
l -> peer_caps = peer_caps ;
286
289
l -> media_addr = maddr ;
287
- l -> owner = n ;
290
+ l -> net = net ;
288
291
l -> peer_session = WILDCARD_SESSION ;
289
292
l -> bearer_id = bearer_id ;
290
293
l -> tolerance = tolerance ;
@@ -318,7 +321,7 @@ bool tipc_link_create(struct tipc_node *n, char *if_name, int bearer_id,
318
321
*
319
322
* Returns true if link was created, otherwise false
320
323
*/
321
- bool tipc_link_bc_create (struct tipc_node * n , u32 ownnode , u32 peer ,
324
+ bool tipc_link_bc_create (struct net * net , u32 ownnode , u32 peer ,
322
325
int mtu , int window , u16 peer_caps ,
323
326
struct sk_buff_head * inputq ,
324
327
struct sk_buff_head * namedq ,
@@ -327,7 +330,7 @@ bool tipc_link_bc_create(struct tipc_node *n, u32 ownnode, u32 peer,
327
330
{
328
331
struct tipc_link * l ;
329
332
330
- if (!tipc_link_create (n , "" , MAX_BEARERS , 0 , 'Z' , mtu , 0 , window ,
333
+ if (!tipc_link_create (net , "" , MAX_BEARERS , 0 , 'Z' , mtu , 0 , window ,
331
334
0 , ownnode , peer , peer_caps , NULL , bc_sndlink ,
332
335
NULL , inputq , namedq , link ))
333
336
return false;
@@ -889,10 +892,10 @@ void tipc_link_push_packets(struct tipc_link *link)
889
892
msg_set_ack (msg , ack );
890
893
msg_set_seqno (msg , seqno );
891
894
seqno = mod (seqno + 1 );
892
- msg_set_bcast_ack (msg , link -> owner -> bclink .last_in );
895
+ /* msg_set_bcast_ack(msg, link->owner->bclink.last_in); */
893
896
link -> rcv_unacked = 0 ;
894
897
__skb_queue_tail (& link -> transmq , skb );
895
- tipc_bearer_send (link -> owner -> net , link -> bearer_id ,
898
+ tipc_bearer_send (link -> net , link -> bearer_id ,
896
899
skb , link -> media_addr );
897
900
}
898
901
link -> snd_nxt = seqno ;
@@ -966,8 +969,8 @@ void tipc_link_retransmit(struct tipc_link *l_ptr, struct sk_buff *skb,
966
969
break ;
967
970
msg = buf_msg (skb );
968
971
msg_set_ack (msg , mod (l_ptr -> rcv_nxt - 1 ));
969
- msg_set_bcast_ack (msg , l_ptr -> owner -> bclink .last_in );
970
- tipc_bearer_send (l_ptr -> owner -> net , l_ptr -> bearer_id , skb ,
972
+ /* msg_set_bcast_ack(msg, l_ptr->owner->bclink.last_in); */
973
+ tipc_bearer_send (l_ptr -> net , l_ptr -> bearer_id , skb ,
971
974
l_ptr -> media_addr );
972
975
retransmits -- ;
973
976
l_ptr -> stats .retransmitted ++ ;
@@ -1102,9 +1105,9 @@ static int tipc_link_input(struct tipc_link *l, struct sk_buff *skb,
1102
1105
}
1103
1106
return 0 ;
1104
1107
} else if (usr == BCAST_PROTOCOL ) {
1105
- tipc_bcast_lock (l -> owner -> net );
1108
+ tipc_bcast_lock (l -> net );
1106
1109
tipc_link_bc_init_rcv (l -> bc_rcvlink , hdr );
1107
- tipc_bcast_unlock (l -> owner -> net );
1110
+ tipc_bcast_unlock (l -> net );
1108
1111
}
1109
1112
drop :
1110
1113
kfree_skb (skb );
@@ -1300,7 +1303,7 @@ void tipc_link_proto_xmit(struct tipc_link *l, u32 msg_typ, int probe_msg,
1300
1303
skb = __skb_dequeue (& xmitq );
1301
1304
if (!skb )
1302
1305
return ;
1303
- tipc_bearer_xmit_skb (l -> owner -> net , l -> bearer_id , skb , l -> media_addr );
1306
+ tipc_bearer_xmit_skb (l -> net , l -> bearer_id , skb , l -> media_addr );
1304
1307
l -> rcv_unacked = 0 ;
1305
1308
}
1306
1309
@@ -2004,7 +2007,7 @@ static int __tipc_nl_add_link(struct net *net, struct tipc_nl_msg *msg,
2004
2007
if (tipc_link_is_up (link ))
2005
2008
if (nla_put_flag (msg -> skb , TIPC_NLA_LINK_UP ))
2006
2009
goto attr_msg_full ;
2007
- if (tipc_link_is_active ( link ) )
2010
+ if (link -> active )
2008
2011
if (nla_put_flag (msg -> skb , TIPC_NLA_LINK_ACTIVE ))
2009
2012
goto attr_msg_full ;
2010
2013
0 commit comments