Linux IEEE 802.15.4 and 6LoWPAN development
 help / color / mirror / Atom feed
* [PATCH bluetooth-next 1/4] mac802154: iface: fix hrtimer cancel on ifdown
@ 2015-06-13 20:15 Alexander Aring
  2015-06-13 20:15 ` [PATCH bluetooth-next 2/4] mac802154: iface: flush workqueue before stop Alexander Aring
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Alexander Aring @ 2015-06-13 20:15 UTC (permalink / raw)
  To: linux-wpan; +Cc: kernel, Alexander Aring

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>
---
 net/mac802154/iface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
index e3d77b0..d804337 100644
--- a/net/mac802154/iface.c
+++ b/net/mac802154/iface.c
@@ -302,15 +302,15 @@ static int mac802154_slave_close(struct net_device *dev)
 
 	ASSERT_RTNL();
 
-	hrtimer_cancel(&local->ifs_timer);
-
 	netif_stop_queue(dev);
 	local->open_count--;
 
 	clear_bit(SDATA_STATE_RUNNING, &sdata->state);
 
-	if (!local->open_count)
+	if (!local->open_count) {
+		hrtimer_cancel(&local->ifs_timer);
 		drv_stop(local);
+	}
 
 	return 0;
 }
-- 
2.4.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-06-20  9:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-13 20:15 [PATCH bluetooth-next 1/4] mac802154: iface: fix hrtimer cancel on ifdown Alexander Aring
2015-06-13 20:15 ` [PATCH bluetooth-next 2/4] mac802154: iface: flush workqueue before stop Alexander Aring
2015-06-14 23:24   ` Marcel Holtmann
2015-06-13 20:15 ` [PATCH bluetooth-next 3/4] at86rf230: use level high as fallback default Alexander Aring
2015-06-14 23:24   ` Marcel Holtmann
2015-06-13 20:15 ` [PATCH bluetooth-next 4/4] at86rf230: add support for sleep state Alexander Aring
2015-06-14 23:24   ` Marcel Holtmann
2015-06-14 23:24 ` [PATCH bluetooth-next 1/4] mac802154: iface: fix hrtimer cancel on ifdown Marcel Holtmann
2015-06-20  5:19 ` Lennert Buytenhek
2015-06-20  9:10   ` Alexander Aring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox