linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Jouni Malinen <j@w1.fi>
Cc: linux-wireless@vger.kernel.org,
	Jouni Malinen <jouni.malinen@atheros.com>,
	Johannes Berg <johannes@sipsolutions.net>
Subject: Re: Hostapd doesn't like crda
Date: Sun, 28 Dec 2008 14:26:16 +0100	[thread overview]
Message-ID: <200812281426.16683.mb@bu3sch.de> (raw)
In-Reply-To: <20081227220814.GA15229@jm.kir.nu>

On Saturday 27 December 2008 23:08:14 Jouni Malinen wrote:
> On Sat, Dec 27, 2008 at 10:08:20PM +0100, Michael Buesch wrote:
> > Please take a look at the following log:
> > http://bu3sch.de/misc/crda.JPG
> > 
> > Note the ordering of the events.
> > Hostapd starts up and tells the kernel what country we're in.
> > Then the kernel calls CRDA, _but_ hostapd goes on with its business
> > before CRDA has finished its work.
> 
> Yes, because the netlink message was completed and hostapd assumes
> everything is ready at that point. Ignoring the complexity in the kernel
> (+ CRDA as a helper), this looks like reasonable expectation to make for
> NL80211_CMD_REQ_SET_REG operation. There is no other mechanism that
> would notify hostapd (or any other program setting country for that
> matter) when the operation was actually fully completed and polling for
> channel changes up to a timeout is not very appealing either.
> 
> Unfortunately, I don't see an easy fix for this. cfg80211 would somehow
> need to block sending of the NL80211_CMD_REQ_SET_REG response until CRDA
> has completed doing whatever it is going to do (is that even something
> that cfg80211 knows when the final step was completed?).. I haven't
> taken a look at all the details, but I've asked for this kind of wait in
> the past and at least it did not seem to be trivial to add since this
> has not been fixed yet ;-).

Ok, thanks for the explanation. For now I added a workaround to the initscript
that starts hostapd which sets the regulatory and waits a seconds before starting
hostapd.

	iw reg set DE
	sleep 1
	# start hostapd...

-- 
Greetings, Michael.

  reply	other threads:[~2008-12-28 13:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-27 21:08 Hostapd doesn't like crda Michael Buesch
2008-12-27 22:08 ` Jouni Malinen
2008-12-28 13:26   ` Michael Buesch [this message]
2008-12-29  3:45   ` Dan E
2008-12-29 10:28     ` Michael Buesch
2008-12-29 15:56       ` Luis R. Rodriguez
2008-12-29 16:04         ` Michael Buesch
2008-12-29 16:18           ` Luis R. Rodriguez
2008-12-29 18:27             ` Pavel Roskin
2008-12-29 18:43               ` Luis R. Rodriguez
2008-12-29 19:21               ` Jouni Malinen

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=200812281426.16683.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=j@w1.fi \
    --cc=johannes@sipsolutions.net \
    --cc=jouni.malinen@atheros.com \
    --cc=linux-wireless@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;
as well as URLs for NNTP newsgroup(s).