From: Michael Buesch <mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
To: Jiri Benc <jbenc-AlSwsSmVLrQ@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org,
bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org
Subject: Re: [RFC, RFT] Re: [PATCH] d80211: make sleeping in hw->config possible #2
Date: Tue, 18 Jul 2006 19:36:55 +0200 [thread overview]
Message-ID: <200607181936.55979.mb@bu3sch.de> (raw)
In-Reply-To: <20060718185711.21aaf55b-IhiK2ZEFs2oCVLCxKZUutA@public.gmane.org>
On Tuesday 18 July 2006 18:57, Jiri Benc wrote:
> On Tue, 11 Jul 2006 00:54:33 +0200, Michael Buesch wrote:
> > This patch makes sleeping in the hw->config callback possible
> > by removing the only atomic caller. The atomic caller was
> > a timer and is replaced by a workqueue.
>
> This is a modified version of the patch that doesn't use
> cancel_rearming_delayed_work.
>
> Signed-off-by: Jiri Benc <jbenc-AlSwsSmVLrQ@public.gmane.org>
>
> ---
> net/d80211/ieee80211.c | 23 +++++++++++++++--------
> net/d80211/ieee80211_i.h | 3 ++-
> net/d80211/ieee80211_iface.c | 10 ++++++++--
> net/d80211/ieee80211_sta.c | 37 +++++++++++++++++--------------------
> 4 files changed, 42 insertions(+), 31 deletions(-)
>
> --- dscape.orig/net/d80211/ieee80211.c
> +++ dscape/net/d80211/ieee80211.c
> @@ -4552,14 +4552,6 @@ void ieee80211_unregister_hw(struct net_
> tasklet_disable(&local->tasklet);
> /* TODO: skb_queue should be empty here, no need to do anything? */
>
> - if (local->rate_limit)
> - del_timer_sync(&local->rate_limit_timer);
> - if (local->stat_time)
> - del_timer_sync(&local->stat_timer);
> - if (local->scan_timer.data)
> - del_timer_sync(&local->scan_timer);
> - ieee80211_rx_bss_list_deinit(dev);
> -
> rtnl_lock();
> local->reg_state = IEEE80211_DEV_UNREGISTERED;
> if (local->apdev)
> @@ -4572,6 +4564,21 @@ void ieee80211_unregister_hw(struct net_
> }
> rtnl_unlock();
>
> + if (local->rate_limit)
> + del_timer_sync(&local->rate_limit_timer);
> + if (local->stat_time)
> + del_timer_sync(&local->stat_timer);
> + if (local->scan_work.data) {
> + local->sta_scanning = 0;
> + cancel_delayed_work(&local->scan_work);
> + flush_scheduled_work();
> + /* The scan_work is guaranteed not to be called at this
> + * point. It is not scheduled and not running now. It can be
If it is guaranteed to be not to be called, the
cancel_delayed_work(&local->scan_work);
is unnecessary.
If it is possible to be scheduled and delayed here,
it's a bug.
So, if the first is true, we should remove it and if the second
is true, well :)
The flush_scheduled_work() call is necessary, though.
--
Greetings Michael.
next prev parent reply other threads:[~2006-07-18 17:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 22:54 [PATCH] d80211: make sleeping in hw->config possible #2 Michael Buesch
2006-07-11 4:25 ` Andrew Morton
2006-07-11 9:11 ` Michael Buesch
2006-07-11 9:31 ` Andrew Morton
2006-07-11 10:12 ` Michael Buesch
2006-07-12 16:53 ` Jiri Benc
2006-07-12 20:34 ` Michael Buesch
2006-07-18 16:57 ` [RFC, RFT] " Jiri Benc
[not found] ` <20060718185711.21aaf55b-IhiK2ZEFs2oCVLCxKZUutA@public.gmane.org>
2006-07-18 17:36 ` Michael Buesch [this message]
2006-07-18 17:58 ` Michael Buesch
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=200607181936.55979.mb@bu3sch.de \
--to=mb-fseuscv1ubazqb+pc5nmwq@public.gmane.org \
--cc=bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org \
--cc=jbenc-AlSwsSmVLrQ@public.gmane.org \
--cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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;
as well as URLs for NNTP newsgroup(s).