From: Alexander Aring <alex.aring@gmail.com>
To: linux-wpan@vger.kernel.org
Cc: kernel@pengutronix.de, Alexander Aring <alex.aring@gmail.com>
Subject: [PATCH bluetooth-next 1/4] mac802154: iface: fix hrtimer cancel on ifdown
Date: Sat, 13 Jun 2015 22:15:51 +0200 [thread overview]
Message-ID: <1434226554-1450-1-git-send-email-alex.aring@gmail.com> (raw)
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
next reply other threads:[~2015-06-13 20:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-13 20:15 Alexander Aring [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434226554-1450-1-git-send-email-alex.aring@gmail.com \
--to=alex.aring@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-wpan@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox