diff options
Diffstat (limited to 'net/tipc/bcast.c')
-rw-r--r-- | net/tipc/bcast.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index dd13bfa09333..b8670bf262e2 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c | |||
@@ -37,7 +37,6 @@ | |||
37 | 37 | ||
38 | #include "core.h" | 38 | #include "core.h" |
39 | #include "link.h" | 39 | #include "link.h" |
40 | #include "port.h" | ||
41 | #include "socket.h" | 40 | #include "socket.h" |
42 | #include "msg.h" | 41 | #include "msg.h" |
43 | #include "bcast.h" | 42 | #include "bcast.h" |
@@ -227,6 +226,17 @@ static void bclink_retransmit_pkt(u32 after, u32 to) | |||
227 | } | 226 | } |
228 | 227 | ||
229 | /** | 228 | /** |
229 | * tipc_bclink_wakeup_users - wake up pending users | ||
230 | * | ||
231 | * Called with no locks taken | ||
232 | */ | ||
233 | void tipc_bclink_wakeup_users(void) | ||
234 | { | ||
235 | while (skb_queue_len(&bclink->link.waiting_sks)) | ||
236 | tipc_sk_rcv(skb_dequeue(&bclink->link.waiting_sks)); | ||
237 | } | ||
238 | |||
239 | /** | ||
230 | * tipc_bclink_acknowledge - handle acknowledgement of broadcast packets | 240 | * tipc_bclink_acknowledge - handle acknowledgement of broadcast packets |
231 | * @n_ptr: node that sent acknowledgement info | 241 | * @n_ptr: node that sent acknowledgement info |
232 | * @acked: broadcast sequence # that has been acknowledged | 242 | * @acked: broadcast sequence # that has been acknowledged |
@@ -300,8 +310,9 @@ void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked) | |||
300 | tipc_link_push_queue(bcl); | 310 | tipc_link_push_queue(bcl); |
301 | bclink_set_last_sent(); | 311 | bclink_set_last_sent(); |
302 | } | 312 | } |
303 | if (unlikely(released && !list_empty(&bcl->waiting_ports))) | 313 | if (unlikely(released && !skb_queue_empty(&bcl->waiting_sks))) |
304 | tipc_link_wakeup_ports(bcl, 0); | 314 | n_ptr->action_flags |= TIPC_WAKEUP_BCAST_USERS; |
315 | |||
305 | exit: | 316 | exit: |
306 | tipc_bclink_unlock(); | 317 | tipc_bclink_unlock(); |
307 | } | 318 | } |
@@ -840,9 +851,10 @@ int tipc_bclink_init(void) | |||
840 | sprintf(bcbearer->media.name, "tipc-broadcast"); | 851 | sprintf(bcbearer->media.name, "tipc-broadcast"); |
841 | 852 | ||
842 | spin_lock_init(&bclink->lock); | 853 | spin_lock_init(&bclink->lock); |
843 | INIT_LIST_HEAD(&bcl->waiting_ports); | 854 | __skb_queue_head_init(&bcl->waiting_sks); |
844 | bcl->next_out_no = 1; | 855 | bcl->next_out_no = 1; |
845 | spin_lock_init(&bclink->node.lock); | 856 | spin_lock_init(&bclink->node.lock); |
857 | __skb_queue_head_init(&bclink->node.waiting_sks); | ||
846 | bcl->owner = &bclink->node; | 858 | bcl->owner = &bclink->node; |
847 | bcl->max_pkt = MAX_PKT_DEFAULT_MCAST; | 859 | bcl->max_pkt = MAX_PKT_DEFAULT_MCAST; |
848 | tipc_link_set_queue_limits(bcl, BCLINK_WIN_DEFAULT); | 860 | tipc_link_set_queue_limits(bcl, BCLINK_WIN_DEFAULT); |