diff options
Diffstat (limited to 'net/llc/llc_station.c')
-rw-r--r-- | net/llc/llc_station.c | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/net/llc/llc_station.c b/net/llc/llc_station.c index 39a8d8924b9c..b2f2bac2c2a2 100644 --- a/net/llc/llc_station.c +++ b/net/llc/llc_station.c | |||
@@ -268,7 +268,7 @@ static int llc_station_ac_send_null_dsap_xid_c(struct sk_buff *skb) | |||
268 | out: | 268 | out: |
269 | return rc; | 269 | return rc; |
270 | free: | 270 | free: |
271 | kfree_skb(skb); | 271 | kfree_skb(nskb); |
272 | goto out; | 272 | goto out; |
273 | } | 273 | } |
274 | 274 | ||
@@ -293,7 +293,7 @@ static int llc_station_ac_send_xid_r(struct sk_buff *skb) | |||
293 | out: | 293 | out: |
294 | return rc; | 294 | return rc; |
295 | free: | 295 | free: |
296 | kfree_skb(skb); | 296 | kfree_skb(nskb); |
297 | goto out; | 297 | goto out; |
298 | } | 298 | } |
299 | 299 | ||
@@ -322,7 +322,7 @@ static int llc_station_ac_send_test_r(struct sk_buff *skb) | |||
322 | out: | 322 | out: |
323 | return rc; | 323 | return rc; |
324 | free: | 324 | free: |
325 | kfree_skb(skb); | 325 | kfree_skb(nskb); |
326 | goto out; | 326 | goto out; |
327 | } | 327 | } |
328 | 328 | ||
@@ -687,12 +687,8 @@ static void llc_station_rcv(struct sk_buff *skb) | |||
687 | llc_station_state_process(skb); | 687 | llc_station_state_process(skb); |
688 | } | 688 | } |
689 | 689 | ||
690 | int __init llc_station_init(void) | 690 | void __init llc_station_init(void) |
691 | { | 691 | { |
692 | int rc = -ENOBUFS; | ||
693 | struct sk_buff *skb; | ||
694 | struct llc_station_state_ev *ev; | ||
695 | |||
696 | skb_queue_head_init(&llc_main_station.mac_pdu_q); | 692 | skb_queue_head_init(&llc_main_station.mac_pdu_q); |
697 | skb_queue_head_init(&llc_main_station.ev_q.list); | 693 | skb_queue_head_init(&llc_main_station.ev_q.list); |
698 | spin_lock_init(&llc_main_station.ev_q.lock); | 694 | spin_lock_init(&llc_main_station.ev_q.lock); |
@@ -700,23 +696,12 @@ int __init llc_station_init(void) | |||
700 | (unsigned long)&llc_main_station); | 696 | (unsigned long)&llc_main_station); |
701 | llc_main_station.ack_timer.expires = jiffies + | 697 | llc_main_station.ack_timer.expires = jiffies + |
702 | sysctl_llc_station_ack_timeout; | 698 | sysctl_llc_station_ack_timeout; |
703 | skb = alloc_skb(0, GFP_ATOMIC); | ||
704 | if (!skb) | ||
705 | goto out; | ||
706 | rc = 0; | ||
707 | llc_set_station_handler(llc_station_rcv); | ||
708 | ev = llc_station_ev(skb); | ||
709 | memset(ev, 0, sizeof(*ev)); | ||
710 | llc_main_station.maximum_retry = 1; | 699 | llc_main_station.maximum_retry = 1; |
711 | llc_main_station.state = LLC_STATION_STATE_DOWN; | 700 | llc_main_station.state = LLC_STATION_STATE_UP; |
712 | ev->type = LLC_STATION_EV_TYPE_SIMPLE; | 701 | llc_set_station_handler(llc_station_rcv); |
713 | ev->prim_type = LLC_STATION_EV_ENABLE_WITHOUT_DUP_ADDR_CHECK; | ||
714 | rc = llc_station_next_state(skb); | ||
715 | out: | ||
716 | return rc; | ||
717 | } | 702 | } |
718 | 703 | ||
719 | void __exit llc_station_exit(void) | 704 | void llc_station_exit(void) |
720 | { | 705 | { |
721 | llc_set_station_handler(NULL); | 706 | llc_set_station_handler(NULL); |
722 | } | 707 | } |