aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac802154/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/mac802154/main.c b/net/mac802154/main.c
index a371eb5fa053..7d0ff7fd2cd4 100644
--- a/net/mac802154/main.c
+++ b/net/mac802154/main.c
@@ -126,6 +126,7 @@ EXPORT_SYMBOL(ieee802154_free_hw);
126int ieee802154_register_hw(struct ieee802154_hw *hw) 126int ieee802154_register_hw(struct ieee802154_hw *hw)
127{ 127{
128 struct ieee802154_local *local = hw_to_local(hw); 128 struct ieee802154_local *local = hw_to_local(hw);
129 struct net_device *dev;
129 int rc = -ENOSYS; 130 int rc = -ENOSYS;
130 131
131 local->workqueue = 132 local->workqueue =
@@ -141,6 +142,17 @@ int ieee802154_register_hw(struct ieee802154_hw *hw)
141 if (rc < 0) 142 if (rc < 0)
142 goto out_wq; 143 goto out_wq;
143 144
145 rtnl_lock();
146
147 dev = ieee802154_if_add(local, "wpan%d", NULL, IEEE802154_DEV_WPAN);
148 if (IS_ERR(dev)) {
149 rtnl_unlock();
150 rc = PTR_ERR(dev);
151 goto out_wq;
152 }
153
154 rtnl_unlock();
155
144 return 0; 156 return 0;
145 157
146out_wq: 158out_wq: