All of lore.kernel.org
 help / color / mirror / Atom feed
* scanning question
@ 2009-11-19  1:42 Chuck Tuffli
  2009-11-19 10:56 ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Chuck Tuffli @ 2009-11-19  1:42 UTC (permalink / raw)
  To: linux-wireless

I'm implementing a mac80211 driver and have a question about the
expected behavior during software based scanning. Can the driver
assume that mac80211 won't start a scan until all previous TX
complete? If not, what is the expected behavior of the driver? Finish
current TX before starting the scan? Drop current TX? Something else?
TIA!

---chuck

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

* Re: scanning question
  2009-11-19  1:42 scanning question Chuck Tuffli
@ 2009-11-19 10:56 ` Johannes Berg
  2009-11-19 15:49   ` Chuck Tuffli
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2009-11-19 10:56 UTC (permalink / raw)
  To: Chuck Tuffli; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 761 bytes --]

On Wed, 2009-11-18 at 17:42 -0800, Chuck Tuffli wrote:
> I'm implementing a mac80211 driver and have a question about the
> expected behavior during software based scanning. Can the driver
> assume that mac80211 won't start a scan until all previous TX
> complete? If not, what is the expected behavior of the driver? Finish
> current TX before starting the scan? Drop current TX? Something else?
> TIA!

No, you can't assume that right now, unfortunately. We've been wanting
to implement a flush_tx() callback for a long time now but nobody did so
far. Some drivers might flush in the pre_scan() callback, but I think
that isn't actually correct because the nullfunc frame we might send
might pass other frames on the hw queues/fifos.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: scanning question
  2009-11-19 10:56 ` Johannes Berg
@ 2009-11-19 15:49   ` Chuck Tuffli
  2009-11-19 22:28     ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Chuck Tuffli @ 2009-11-19 15:49 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On Thu, Nov 19, 2009 at 2:56 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Wed, 2009-11-18 at 17:42 -0800, Chuck Tuffli wrote:
>> I'm implementing a mac80211 driver and have a question about the
>> expected behavior during software based scanning. Can the driver
>> assume that mac80211 won't start a scan until all previous TX
>> complete? If not, what is the expected behavior of the driver? Finish
>> current TX before starting the scan? Drop current TX? Something else?
>> TIA!
>
> No, you can't assume that right now, unfortunately. We've been wanting
> to implement a flush_tx() callback for a long time now but nobody did so
> far. Some drivers might flush in the pre_scan() callback, but I think
> that isn't actually correct because the nullfunc frame we might send
> might pass other frames on the hw queues/fifos.

OK. I agree that flushing isn't ideal, so the alternative is for
someone to wait until IO finishes.

Can the driver sleep until it is ready to scan (I'm guessing no)?

Alternatively, could we modify scan.c such that if a driver returned
EAGAIN in sw_scan_start, the scan would wait in a similar way to what
happens if something is on the work_list?

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

* Re: scanning question
  2009-11-19 15:49   ` Chuck Tuffli
@ 2009-11-19 22:28     ` Johannes Berg
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2009-11-19 22:28 UTC (permalink / raw)
  To: Chuck Tuffli; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 738 bytes --]

On Thu, 2009-11-19 at 07:49 -0800, Chuck Tuffli wrote:

> > No, you can't assume that right now, unfortunately. We've been wanting
> > to implement a flush_tx() callback for a long time now but nobody did so
> > far. Some drivers might flush in the pre_scan() callback, but I think
> > that isn't actually correct because the nullfunc frame we might send
> > might pass other frames on the hw queues/fifos.
> 
> OK. I agree that flushing isn't ideal, so the alternative is for
> someone to wait until IO finishes.

I think we should actually flush the queues.

> Can the driver sleep until it is ready to scan (I'm guessing no)?

Yes, pre_scan() can sleep, and a flush() callback would also be able to
sleep.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

end of thread, other threads:[~2009-11-19 22:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-19  1:42 scanning question Chuck Tuffli
2009-11-19 10:56 ` Johannes Berg
2009-11-19 15:49   ` Chuck Tuffli
2009-11-19 22:28     ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.