summaryrefslogtreecommitdiffstats
path: root/net/mac802154
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-06-13 16:15:51 -0400
committerMarcel Holtmann <marcel@holtmann.org>2015-06-14 19:22:19 -0400
commitb4ee194441d7e4457c7bac6c2a5da8428974db5a (patch)
tree388fdab0b5d3f6b4087aa63241dec900c6e62381 /net/mac802154
parent1bc1754e82f03c2c29b6e39ee02af48fa3bdef23 (diff)
mac802154: iface: fix hrtimer cancel on ifdown
The interframe spacing timer is a per phy definition and is part of a ieee802154_local structure. If we have possible multiple interfaces ifdown one interface then the timer should not be cancled. First if the last interface is down and the receive handling is stopped we should be sure that the interframe spacing timer isn't run anymore. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/mac802154')
-rw-r--r--net/mac802154/iface.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
index e3d77b07c0e4..d8043378e7a0 100644
--- a/net/mac802154/iface.c
+++ b/net/mac802154/iface.c
@@ -302,15 +302,15 @@ static int mac802154_slave_close(struct net_device *dev)
302 302
303 ASSERT_RTNL(); 303 ASSERT_RTNL();
304 304
305 hrtimer_cancel(&local->ifs_timer);
306
307 netif_stop_queue(dev); 305 netif_stop_queue(dev);
308 local->open_count--; 306 local->open_count--;
309 307
310 clear_bit(SDATA_STATE_RUNNING, &sdata->state); 308 clear_bit(SDATA_STATE_RUNNING, &sdata->state);
311 309
312 if (!local->open_count) 310 if (!local->open_count) {
311 hrtimer_cancel(&local->ifs_timer);
313 drv_stop(local); 312 drv_stop(local);
313 }
314 314
315 return 0; 315 return 0;
316} 316}