aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac802154
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-05-22 11:43:52 -0400
committerMarcel Holtmann <marcel@holtmann.org>2015-05-23 11:57:08 -0400
commit4a3a8c0c3a613e481bea931f0d65dc4a7efaa9b9 (patch)
tree218e83ae396cc808b80b6681c4cdcaff30bfc1ca /net/mac802154
parent4a669f7d72535017dd03cbcdf5af6e85edfdf90c (diff)
mac802154: remove pib lock
This patch removes the pib lock which is now replaced by rtnl lock. The new interface already use the rtnl lock only. Nevertheless this patch will fix issues while using new and old interface at the same time. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/mac802154')
-rw-r--r--net/mac802154/iface.c7
-rw-r--r--net/mac802154/mib.c4
2 files changed, 2 insertions, 9 deletions
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
index 2a5878889289..22f478be7489 100644
--- a/net/mac802154/iface.c
+++ b/net/mac802154/iface.c
@@ -242,7 +242,6 @@ static int mac802154_wpan_open(struct net_device *dev)
242 struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev); 242 struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev);
243 struct ieee802154_local *local = sdata->local; 243 struct ieee802154_local *local = sdata->local;
244 struct wpan_dev *wpan_dev = &sdata->wpan_dev; 244 struct wpan_dev *wpan_dev = &sdata->wpan_dev;
245 struct wpan_phy *phy = sdata->local->phy;
246 245
247 rc = ieee802154_check_concurrent_iface(sdata, sdata->vif.type); 246 rc = ieee802154_check_concurrent_iface(sdata, sdata->vif.type);
248 if (rc < 0) 247 if (rc < 0)
@@ -252,8 +251,6 @@ static int mac802154_wpan_open(struct net_device *dev)
252 if (rc < 0) 251 if (rc < 0)
253 return rc; 252 return rc;
254 253
255 mutex_lock(&phy->pib_lock);
256
257 if (local->hw.flags & IEEE802154_HW_PROMISCUOUS) { 254 if (local->hw.flags & IEEE802154_HW_PROMISCUOUS) {
258 rc = drv_set_promiscuous_mode(local, 255 rc = drv_set_promiscuous_mode(local,
259 wpan_dev->promiscuous_mode); 256 wpan_dev->promiscuous_mode);
@@ -295,11 +292,7 @@ static int mac802154_wpan_open(struct net_device *dev)
295 goto out; 292 goto out;
296 } 293 }
297 294
298 mutex_unlock(&phy->pib_lock);
299 return 0;
300
301out: 295out:
302 mutex_unlock(&phy->pib_lock);
303 return rc; 296 return rc;
304} 297}
305 298
diff --git a/net/mac802154/mib.c b/net/mac802154/mib.c
index 5cf019a57fd7..033dfc7755c6 100644
--- a/net/mac802154/mib.c
+++ b/net/mac802154/mib.c
@@ -91,16 +91,16 @@ void mac802154_dev_set_page_channel(struct net_device *dev, u8 page, u8 chan)
91 struct ieee802154_local *local = sdata->local; 91 struct ieee802154_local *local = sdata->local;
92 int res; 92 int res;
93 93
94 ASSERT_RTNL();
95
94 BUG_ON(dev->type != ARPHRD_IEEE802154); 96 BUG_ON(dev->type != ARPHRD_IEEE802154);
95 97
96 res = drv_set_channel(local, page, chan); 98 res = drv_set_channel(local, page, chan);
97 if (res) { 99 if (res) {
98 pr_debug("set_channel failed\n"); 100 pr_debug("set_channel failed\n");
99 } else { 101 } else {
100 mutex_lock(&local->phy->pib_lock);
101 local->phy->current_channel = chan; 102 local->phy->current_channel = chan;
102 local->phy->current_page = page; 103 local->phy->current_page = page;
103 mutex_unlock(&local->phy->pib_lock);
104 } 104 }
105} 105}
106 106