aboutsummaryrefslogtreecommitdiffstats
path: root/net/llc
diff options
context:
space:
mode:
Diffstat (limited to 'net/llc')
-rw-r--r--net/llc/llc_station.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/net/llc/llc_station.c b/net/llc/llc_station.c
index 3bdb888f8501..48c21184bf2c 100644
--- a/net/llc/llc_station.c
+++ b/net/llc/llc_station.c
@@ -25,19 +25,6 @@
25#include <net/llc_s_st.h> 25#include <net/llc_s_st.h>
26#include <net/llc_pdu.h> 26#include <net/llc_pdu.h>
27 27
28/**
29 * struct llc_station - LLC station component
30 *
31 * SAP and connection resource manager, one per adapter.
32 *
33 * @mac_sa: MAC source address
34 * @sap_list: list of related SAPs
35 * @mac_pdu_q: PDUs ready to send to MAC
36 */
37struct llc_station {
38 struct sk_buff_head mac_pdu_q;
39};
40
41typedef int (*llc_station_ev_t)(struct sk_buff *skb); 28typedef int (*llc_station_ev_t)(struct sk_buff *skb);
42 29
43typedef int (*llc_station_action_t)(struct sk_buff *skb); 30typedef int (*llc_station_action_t)(struct sk_buff *skb);
@@ -48,8 +35,6 @@ struct llc_station_state_trans {
48 llc_station_action_t *ev_actions; 35 llc_station_action_t *ev_actions;
49}; 36};
50 37
51static struct llc_station llc_main_station;
52
53static int llc_stat_ev_rx_null_dsap_xid_c(struct sk_buff *skb) 38static int llc_stat_ev_rx_null_dsap_xid_c(struct sk_buff *skb)
54{ 39{
55 struct llc_pdu_un *pdu = llc_pdu_un_hdr(skb); 40 struct llc_pdu_un *pdu = llc_pdu_un_hdr(skb);
@@ -70,20 +55,6 @@ static int llc_stat_ev_rx_null_dsap_test_c(struct sk_buff *skb)
70 !pdu->dsap ? 0 : 1; /* NULL DSAP */ 55 !pdu->dsap ? 0 : 1; /* NULL DSAP */
71} 56}
72 57
73/**
74 * llc_station_send_pdu - queues PDU to send
75 * @skb: Address of the PDU
76 *
77 * Queues a PDU to send to the MAC layer.
78 */
79static void llc_station_send_pdu(struct sk_buff *skb)
80{
81 skb_queue_tail(&llc_main_station.mac_pdu_q, skb);
82 while ((skb = skb_dequeue(&llc_main_station.mac_pdu_q)) != NULL)
83 if (dev_queue_xmit(skb))
84 break;
85}
86
87static int llc_station_ac_send_xid_r(struct sk_buff *skb) 58static int llc_station_ac_send_xid_r(struct sk_buff *skb)
88{ 59{
89 u8 mac_da[ETH_ALEN], dsap; 60 u8 mac_da[ETH_ALEN], dsap;
@@ -101,7 +72,7 @@ static int llc_station_ac_send_xid_r(struct sk_buff *skb)
101 rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, mac_da); 72 rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, mac_da);
102 if (unlikely(rc)) 73 if (unlikely(rc))
103 goto free; 74 goto free;
104 llc_station_send_pdu(nskb); 75 dev_queue_xmit(nskb);
105out: 76out:
106 return rc; 77 return rc;
107free: 78free:
@@ -130,7 +101,7 @@ static int llc_station_ac_send_test_r(struct sk_buff *skb)
130 rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, mac_da); 101 rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, mac_da);
131 if (unlikely(rc)) 102 if (unlikely(rc))
132 goto free; 103 goto free;
133 llc_station_send_pdu(nskb); 104 dev_queue_xmit(nskb);
134out: 105out:
135 return rc; 106 return rc;
136free: 107free:
@@ -228,7 +199,6 @@ static void llc_station_rcv(struct sk_buff *skb)
228 199
229void __init llc_station_init(void) 200void __init llc_station_init(void)
230{ 201{
231 skb_queue_head_init(&llc_main_station.mac_pdu_q);
232 llc_set_station_handler(llc_station_rcv); 202 llc_set_station_handler(llc_station_rcv);
233} 203}
234 204