aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ieee802154/6lowpan.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index cd5007f3a569..f4070e54d1a1 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -55,7 +55,6 @@
55#include <linux/module.h> 55#include <linux/module.h>
56#include <linux/moduleparam.h> 56#include <linux/moduleparam.h>
57#include <linux/netdevice.h> 57#include <linux/netdevice.h>
58#include <linux/etherdevice.h>
59#include <net/af_ieee802154.h> 58#include <net/af_ieee802154.h>
60#include <net/ieee802154.h> 59#include <net/ieee802154.h>
61#include <net/ieee802154_netdev.h> 60#include <net/ieee802154_netdev.h>
@@ -936,6 +935,19 @@ drop:
936 return -EINVAL; 935 return -EINVAL;
937} 936}
938 937
938static int lowpan_set_address(struct net_device *dev, void *p)
939{
940 struct sockaddr *sa = p;
941
942 if (netif_running(dev))
943 return -EBUSY;
944
945 /* TODO: validate addr */
946 memcpy(dev->dev_addr, sa->sa_data, dev->addr_len);
947
948 return 0;
949}
950
939static int lowpan_get_mac_header_length(struct sk_buff *skb) 951static int lowpan_get_mac_header_length(struct sk_buff *skb)
940{ 952{
941 /* 953 /*
@@ -1078,7 +1090,7 @@ static struct header_ops lowpan_header_ops = {
1078 1090
1079static const struct net_device_ops lowpan_netdev_ops = { 1091static const struct net_device_ops lowpan_netdev_ops = {
1080 .ndo_start_xmit = lowpan_xmit, 1092 .ndo_start_xmit = lowpan_xmit,
1081 .ndo_set_mac_address = eth_mac_addr, 1093 .ndo_set_mac_address = lowpan_set_address,
1082}; 1094};
1083 1095
1084static struct ieee802154_mlme_ops lowpan_mlme = { 1096static struct ieee802154_mlme_ops lowpan_mlme = {