aboutsummaryrefslogtreecommitdiffstats
path: root/net/llc
diff options
context:
space:
mode:
Diffstat (limited to 'net/llc')
-rw-r--r--net/llc/llc_core.c8
-rw-r--r--net/llc/llc_station.c6
2 files changed, 4 insertions, 10 deletions
diff --git a/net/llc/llc_core.c b/net/llc/llc_core.c
index 248b5903bb13..00de27cef46b 100644
--- a/net/llc/llc_core.c
+++ b/net/llc/llc_core.c
@@ -25,8 +25,6 @@
25LIST_HEAD(llc_sap_list); 25LIST_HEAD(llc_sap_list);
26DEFINE_RWLOCK(llc_sap_list_lock); 26DEFINE_RWLOCK(llc_sap_list_lock);
27 27
28unsigned char llc_station_mac_sa[ETH_ALEN];
29
30/** 28/**
31 * llc_sap_alloc - allocates and initializes sap. 29 * llc_sap_alloc - allocates and initializes sap.
32 * 30 *
@@ -37,8 +35,8 @@ static struct llc_sap *llc_sap_alloc(void)
37 struct llc_sap *sap = kzalloc(sizeof(*sap), GFP_ATOMIC); 35 struct llc_sap *sap = kzalloc(sizeof(*sap), GFP_ATOMIC);
38 36
39 if (sap) { 37 if (sap) {
38 /* sap->laddr.mac - leave as a null, it's filled by bind */
40 sap->state = LLC_SAP_STATE_ACTIVE; 39 sap->state = LLC_SAP_STATE_ACTIVE;
41 memcpy(sap->laddr.mac, llc_station_mac_sa, ETH_ALEN);
42 rwlock_init(&sap->sk_list.lock); 40 rwlock_init(&sap->sk_list.lock);
43 atomic_set(&sap->refcnt, 1); 41 atomic_set(&sap->refcnt, 1);
44 } 42 }
@@ -167,10 +165,6 @@ static int __init llc_init(void)
167 if (dev != NULL) 165 if (dev != NULL)
168 dev = next_net_device(dev); 166 dev = next_net_device(dev);
169 167
170 if (dev != NULL)
171 memcpy(llc_station_mac_sa, dev->dev_addr, ETH_ALEN);
172 else
173 memset(llc_station_mac_sa, 0, ETH_ALEN);
174 dev_add_pack(&llc_packet_type); 168 dev_add_pack(&llc_packet_type);
175 dev_add_pack(&llc_tr_packet_type); 169 dev_add_pack(&llc_tr_packet_type);
176 return 0; 170 return 0;
diff --git a/net/llc/llc_station.c b/net/llc/llc_station.c
index 6f2ea2090322..959e7f31833b 100644
--- a/net/llc/llc_station.c
+++ b/net/llc/llc_station.c
@@ -259,7 +259,7 @@ static int llc_station_ac_send_null_dsap_xid_c(struct sk_buff *skb)
259 goto out; 259 goto out;
260 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, 0, LLC_PDU_CMD); 260 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, 0, LLC_PDU_CMD);
261 llc_pdu_init_as_xid_cmd(nskb, LLC_XID_NULL_CLASS_2, 127); 261 llc_pdu_init_as_xid_cmd(nskb, LLC_XID_NULL_CLASS_2, 127);
262 rc = llc_mac_hdr_init(nskb, llc_station_mac_sa, llc_station_mac_sa); 262 rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, skb->dev->dev_addr);
263 if (unlikely(rc)) 263 if (unlikely(rc))
264 goto free; 264 goto free;
265 llc_station_send_pdu(nskb); 265 llc_station_send_pdu(nskb);
@@ -283,7 +283,7 @@ static int llc_station_ac_send_xid_r(struct sk_buff *skb)
283 llc_pdu_decode_ssap(skb, &dsap); 283 llc_pdu_decode_ssap(skb, &dsap);
284 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP); 284 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP);
285 llc_pdu_init_as_xid_rsp(nskb, LLC_XID_NULL_CLASS_2, 127); 285 llc_pdu_init_as_xid_rsp(nskb, LLC_XID_NULL_CLASS_2, 127);
286 rc = llc_mac_hdr_init(nskb, llc_station_mac_sa, mac_da); 286 rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, mac_da);
287 if (unlikely(rc)) 287 if (unlikely(rc))
288 goto free; 288 goto free;
289 llc_station_send_pdu(nskb); 289 llc_station_send_pdu(nskb);
@@ -307,7 +307,7 @@ static int llc_station_ac_send_test_r(struct sk_buff *skb)
307 llc_pdu_decode_ssap(skb, &dsap); 307 llc_pdu_decode_ssap(skb, &dsap);
308 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP); 308 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP);
309 llc_pdu_init_as_test_rsp(nskb, skb); 309 llc_pdu_init_as_test_rsp(nskb, skb);
310 rc = llc_mac_hdr_init(nskb, llc_station_mac_sa, mac_da); 310 rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, mac_da);
311 if (unlikely(rc)) 311 if (unlikely(rc))
312 goto free; 312 goto free;
313 llc_station_send_pdu(nskb); 313 llc_station_send_pdu(nskb);