summaryrefslogtreecommitdiff
path: root/net/ieee802154/nl802154.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-04-26 20:15:56 +0300
committerDavid S. Miller <davem@davemloft.net>2016-04-26 20:15:56 +0300
commitc0b04793076167c8d8aade4c31fe06a4cc45b626 (patch)
treef00ecf6720c7b4c5c742c0080e80a809cf5abffb /net/ieee802154/nl802154.c
parent9c9f261d6e3b1084816e9e2df794a55df16e7387 (diff)
parent55441070ca1cbd47ce1ad2959bbf4b47aed9b83b (diff)
downloadlinux-c0b04793076167c8d8aade4c31fe06a4cc45b626.tar.xz
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Johan Hedberg says: ==================== pull request: bluetooth-next 2016-04-26 Here's another set of Bluetooth & 802.15.4 patches for the 4.7 kernel: - Cleanups & refactoring of ieee802154 & 6lowpan code - Security related additions to ieee802154 and mrf24j40 driver - Memory corruption fix to Bluetooth 6lowpan code - Race condition fix in vhci driver - Enhancements to the atusb 802.15.4 driver Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ieee802154/nl802154.c')
-rw-r--r--net/ieee802154/nl802154.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
index 8035c93dd527..ca207dbf673b 100644
--- a/net/ieee802154/nl802154.c
+++ b/net/ieee802154/nl802154.c
@@ -1078,6 +1078,11 @@ static int nl802154_set_pan_id(struct sk_buff *skb, struct genl_info *info)
if (netif_running(dev))
return -EBUSY;
+ if (wpan_dev->lowpan_dev) {
+ if (netif_running(wpan_dev->lowpan_dev))
+ return -EBUSY;
+ }
+
/* don't change address fields on monitor */
if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR ||
!info->attrs[NL802154_ATTR_PAN_ID])
@@ -1109,6 +1114,11 @@ static int nl802154_set_short_addr(struct sk_buff *skb, struct genl_info *info)
if (netif_running(dev))
return -EBUSY;
+ if (wpan_dev->lowpan_dev) {
+ if (netif_running(wpan_dev->lowpan_dev))
+ return -EBUSY;
+ }
+
/* don't change address fields on monitor */
if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR ||
!info->attrs[NL802154_ATTR_SHORT_ADDR])