aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/subscr.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/subscr.c')
-rw-r--r--net/tipc/subscr.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c
index 198371723b41..8c49566da8f3 100644
--- a/net/tipc/subscr.c
+++ b/net/tipc/subscr.c
@@ -40,14 +40,14 @@
40#include "subscr.h" 40#include "subscr.h"
41 41
42/** 42/**
43 * struct subscriber - TIPC network topology subscriber 43 * struct tipc_subscriber - TIPC network topology subscriber
44 * @port_ref: object reference to server port connecting to subscriber 44 * @port_ref: object reference to server port connecting to subscriber
45 * @lock: pointer to spinlock controlling access to subscriber's server port 45 * @lock: pointer to spinlock controlling access to subscriber's server port
46 * @subscriber_list: adjacent subscribers in top. server's list of subscribers 46 * @subscriber_list: adjacent subscribers in top. server's list of subscribers
47 * @subscription_list: list of subscription objects for this subscriber 47 * @subscription_list: list of subscription objects for this subscriber
48 */ 48 */
49 49
50struct subscriber { 50struct tipc_subscriber {
51 u32 port_ref; 51 u32 port_ref;
52 spinlock_t *lock; 52 spinlock_t *lock;
53 struct list_head subscriber_list; 53 struct list_head subscriber_list;
@@ -92,7 +92,7 @@ static u32 htohl(u32 in, int swap)
92 * try to take the lock if the message is rejected and returned! 92 * try to take the lock if the message is rejected and returned!
93 */ 93 */
94 94
95static void subscr_send_event(struct subscription *sub, 95static void subscr_send_event(struct tipc_subscription *sub,
96 u32 found_lower, 96 u32 found_lower,
97 u32 found_upper, 97 u32 found_upper,
98 u32 event, 98 u32 event,
@@ -118,7 +118,7 @@ static void subscr_send_event(struct subscription *sub,
118 * Returns 1 if there is overlap, otherwise 0. 118 * Returns 1 if there is overlap, otherwise 0.
119 */ 119 */
120 120
121int tipc_subscr_overlap(struct subscription *sub, 121int tipc_subscr_overlap(struct tipc_subscription *sub,
122 u32 found_lower, 122 u32 found_lower,
123 u32 found_upper) 123 u32 found_upper)
124 124
@@ -138,7 +138,7 @@ int tipc_subscr_overlap(struct subscription *sub,
138 * Protected by nameseq.lock in name_table.c 138 * Protected by nameseq.lock in name_table.c
139 */ 139 */
140 140
141void tipc_subscr_report_overlap(struct subscription *sub, 141void tipc_subscr_report_overlap(struct tipc_subscription *sub,
142 u32 found_lower, 142 u32 found_lower,
143 u32 found_upper, 143 u32 found_upper,
144 u32 event, 144 u32 event,
@@ -158,7 +158,7 @@ void tipc_subscr_report_overlap(struct subscription *sub,
158 * subscr_timeout - subscription timeout has occurred 158 * subscr_timeout - subscription timeout has occurred
159 */ 159 */
160 160
161static void subscr_timeout(struct subscription *sub) 161static void subscr_timeout(struct tipc_subscription *sub)
162{ 162{
163 struct tipc_port *server_port; 163 struct tipc_port *server_port;
164 164
@@ -205,7 +205,7 @@ static void subscr_timeout(struct subscription *sub)
205 * Called with subscriber port locked. 205 * Called with subscriber port locked.
206 */ 206 */
207 207
208static void subscr_del(struct subscription *sub) 208static void subscr_del(struct tipc_subscription *sub)
209{ 209{
210 tipc_nametbl_unsubscribe(sub); 210 tipc_nametbl_unsubscribe(sub);
211 list_del(&sub->subscription_list); 211 list_del(&sub->subscription_list);
@@ -224,11 +224,11 @@ static void subscr_del(struct subscription *sub)
224 * simply wait for it to be released, then claim it.) 224 * simply wait for it to be released, then claim it.)
225 */ 225 */
226 226
227static void subscr_terminate(struct subscriber *subscriber) 227static void subscr_terminate(struct tipc_subscriber *subscriber)
228{ 228{
229 u32 port_ref; 229 u32 port_ref;
230 struct subscription *sub; 230 struct tipc_subscription *sub;
231 struct subscription *sub_temp; 231 struct tipc_subscription *sub_temp;
232 232
233 /* Invalidate subscriber reference */ 233 /* Invalidate subscriber reference */
234 234
@@ -278,10 +278,10 @@ static void subscr_terminate(struct subscriber *subscriber)
278 */ 278 */
279 279
280static void subscr_cancel(struct tipc_subscr *s, 280static void subscr_cancel(struct tipc_subscr *s,
281 struct subscriber *subscriber) 281 struct tipc_subscriber *subscriber)
282{ 282{
283 struct subscription *sub; 283 struct tipc_subscription *sub;
284 struct subscription *sub_temp; 284 struct tipc_subscription *sub_temp;
285 int found = 0; 285 int found = 0;
286 286
287 /* Find first matching subscription, exit if not found */ 287 /* Find first matching subscription, exit if not found */
@@ -314,10 +314,10 @@ static void subscr_cancel(struct tipc_subscr *s,
314 * Called with subscriber port locked. 314 * Called with subscriber port locked.
315 */ 315 */
316 316
317static struct subscription *subscr_subscribe(struct tipc_subscr *s, 317static struct tipc_subscription *subscr_subscribe(struct tipc_subscr *s,
318 struct subscriber *subscriber) 318 struct tipc_subscriber *subscriber)
319{ 319{
320 struct subscription *sub; 320 struct tipc_subscription *sub;
321 int swap; 321 int swap;
322 322
323 /* Determine subscriber's endianness */ 323 /* Determine subscriber's endianness */
@@ -393,7 +393,7 @@ static void subscr_conn_shutdown_event(void *usr_handle,
393 unsigned int size, 393 unsigned int size,
394 int reason) 394 int reason)
395{ 395{
396 struct subscriber *subscriber = usr_handle; 396 struct tipc_subscriber *subscriber = usr_handle;
397 spinlock_t *subscriber_lock; 397 spinlock_t *subscriber_lock;
398 398
399 if (tipc_port_lock(port_ref) == NULL) 399 if (tipc_port_lock(port_ref) == NULL)
@@ -416,9 +416,9 @@ static void subscr_conn_msg_event(void *usr_handle,
416 const unchar *data, 416 const unchar *data,
417 u32 size) 417 u32 size)
418{ 418{
419 struct subscriber *subscriber = usr_handle; 419 struct tipc_subscriber *subscriber = usr_handle;
420 spinlock_t *subscriber_lock; 420 spinlock_t *subscriber_lock;
421 struct subscription *sub; 421 struct tipc_subscription *sub;
422 422
423 /* 423 /*
424 * Lock subscriber's server port (& make a local copy of lock pointer, 424 * Lock subscriber's server port (& make a local copy of lock pointer,
@@ -471,12 +471,12 @@ static void subscr_named_msg_event(void *usr_handle,
471 struct tipc_portid const *orig, 471 struct tipc_portid const *orig,
472 struct tipc_name_seq const *dest) 472 struct tipc_name_seq const *dest)
473{ 473{
474 struct subscriber *subscriber; 474 struct tipc_subscriber *subscriber;
475 u32 server_port_ref; 475 u32 server_port_ref;
476 476
477 /* Create subscriber object */ 477 /* Create subscriber object */
478 478
479 subscriber = kzalloc(sizeof(struct subscriber), GFP_ATOMIC); 479 subscriber = kzalloc(sizeof(struct tipc_subscriber), GFP_ATOMIC);
480 if (subscriber == NULL) { 480 if (subscriber == NULL) {
481 warn("Subscriber rejected, no memory\n"); 481 warn("Subscriber rejected, no memory\n");
482 return; 482 return;
@@ -568,8 +568,8 @@ failed:
568 568
569void tipc_subscr_stop(void) 569void tipc_subscr_stop(void)
570{ 570{
571 struct subscriber *subscriber; 571 struct tipc_subscriber *subscriber;
572 struct subscriber *subscriber_temp; 572 struct tipc_subscriber *subscriber_temp;
573 spinlock_t *subscriber_lock; 573 spinlock_t *subscriber_lock;
574 574
575 if (topsrv.setup_port) { 575 if (topsrv.setup_port) {