summaryrefslogtreecommitdiffstats
path: root/net/mac802154/cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac802154/cfg.c')
-rw-r--r--net/mac802154/cfg.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/mac802154/cfg.c b/net/mac802154/cfg.c
index 0a08f66512b3..d2c4e8f89720 100644
--- a/net/mac802154/cfg.c
+++ b/net/mac802154/cfg.c
@@ -13,6 +13,7 @@
* Based on: net/mac80211/cfg.c
*/
+#include <net/rtnetlink.h>
#include <net/cfg802154.h>
#include "ieee802154_i.h"
@@ -23,8 +24,13 @@ ieee802154_add_iface_deprecated(struct wpan_phy *wpan_phy,
const char *name, int type)
{
struct ieee802154_local *local = wpan_phy_priv(wpan_phy);
+ struct net_device *dev;
- return ieee802154_if_add(local, name, NULL, type);
+ rtnl_lock();
+ dev = ieee802154_if_add(local, name, NULL, type);
+ rtnl_unlock();
+
+ return dev;
}
static void ieee802154_del_iface_deprecated(struct wpan_phy *wpan_phy,