aboutsummaryrefslogtreecommitdiffstats
path: root/net/llc
diff options
context:
space:
mode:
Diffstat (limited to 'net/llc')
-rw-r--r--net/llc/llc_core.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/net/llc/llc_core.c b/net/llc/llc_core.c
index d12413cff5bd..d4b13a031fd5 100644
--- a/net/llc/llc_core.c
+++ b/net/llc/llc_core.c
@@ -160,8 +160,14 @@ static struct packet_type llc_tr_packet_type = {
160 160
161static int __init llc_init(void) 161static int __init llc_init(void)
162{ 162{
163 if (dev_base->next) 163 struct net_device *dev;
164 memcpy(llc_station_mac_sa, dev_base->next->dev_addr, ETH_ALEN); 164
165 dev = first_net_device();
166 if (dev != NULL)
167 dev = next_net_device(dev);
168
169 if (dev != NULL)
170 memcpy(llc_station_mac_sa, dev->dev_addr, ETH_ALEN);
165 else 171 else
166 memset(llc_station_mac_sa, 0, ETH_ALEN); 172 memset(llc_station_mac_sa, 0, ETH_ALEN);
167 dev_add_pack(&llc_packet_type); 173 dev_add_pack(&llc_packet_type);