linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Remove TSF atomic requirement from the documentation
@ 2009-02-05 16:58 Alina Friedrichsen
  2009-02-06 19:21 ` Kalle Valo
  0 siblings, 1 reply; 6+ messages in thread
From: Alina Friedrichsen @ 2009-02-05 16:58 UTC (permalink / raw)
  To: linux-wireless, linville, johannes

The atomic requirement for the TSF callbacks
is outdated. get_tsf() is only called by
ieee80211_rx_bss_info() which is indirectly
called by the work queue ieee80211_sta_work().
In the same context are called several other
non-atomic functions, too.
And the atomic requirement causes problems
for drivers of USB wifi cards.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
---
diff -urN wireless-testing.orig/include/net/mac80211.h wireless-testing=
/include/net/mac80211.h
--- wireless-testing.orig/include/net/mac80211.h	2009-02-05 06:14:21.00=
0000000 +0100
+++ wireless-testing/include/net/mac80211.h	2009-02-05 17:33:09.0000000=
00 +0100
@@ -1354,11 +1354,11 @@
  *
  * @get_tsf: Get the current TSF timer value from firmware/hardware. C=
urrently,
  *	this is only used for IBSS mode BSSID merging and debugging. Is not=
 a
- *	required function. Must be atomic.
+ *	required function.
  *
  * @set_tsf: Set the TSF timer to the specified value in the firmware/=
hardware.
  *      Currently, this is only used for IBSS mode debugging. Is not a
- *	required function. Must be atomic.
+ *	required function.
  *
  * @reset_tsf: Reset the TSF timer and allow firmware/hardware to sync=
hronize
  *	with other STAs in the IBSS. This is only used in IBSS mode. This

--=20
Psssst! Schon vom neuen GMX MultiMessenger geh=F6rt? Der kann`s mit all=
en: http://www.gmx.net/de/go/multimessenger01
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] mac80211: Remove TSF atomic requirement from the documentation
  2009-02-05 16:58 [PATCH] mac80211: Remove TSF atomic requirement from the documentation Alina Friedrichsen
@ 2009-02-06 19:21 ` Kalle Valo
  2009-02-06 20:44   ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Kalle Valo @ 2009-02-06 19:21 UTC (permalink / raw)
  To: Alina Friedrichsen; +Cc: linux-wireless, linville, johannes

"Alina Friedrichsen" <x-alina@gmx.net> writes:

> The atomic requirement for the TSF callbacks is outdated. get_tsf() is
> only called by ieee80211_rx_bss_info() which is indirectly called by
> the work queue ieee80211_sta_work(). In the same context are called
> several other non-atomic functions, too. And the atomic requirement
> causes problems for drivers of USB wifi cards.

Atomicity requirement also creates problems for SPI based devices, not
only USB. So I strongly support for removing the requirement.

Unfortunately I don't have time to review this, though. Sorry.

-- 
Kalle Valo

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

* Re: [PATCH] mac80211: Remove TSF atomic requirement from the documentation
  2009-02-06 19:21 ` Kalle Valo
@ 2009-02-06 20:44   ` Johannes Berg
  2009-02-06 21:08     ` Kalle Valo
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2009-02-06 20:44 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Alina Friedrichsen, linux-wireless, linville

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

On Fri, 2009-02-06 at 21:21 +0200, Kalle Valo wrote:
> "Alina Friedrichsen" <x-alina@gmx.net> writes:
> 
> > The atomic requirement for the TSF callbacks is outdated. get_tsf() is
> > only called by ieee80211_rx_bss_info() which is indirectly called by
> > the work queue ieee80211_sta_work(). In the same context are called
> > several other non-atomic functions, too. And the atomic requirement
> > causes problems for drivers of USB wifi cards.
> 
> Atomicity requirement also creates problems for SPI based devices, not
> only USB. So I strongly support for removing the requirement.
> 
> Unfortunately I don't have time to review this, though. Sorry.

It's ok, I took a look, there's no such requirement (any more).

johannes

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

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

* Re: [PATCH] mac80211: Remove TSF atomic requirement from the documentation
  2009-02-06 20:44   ` Johannes Berg
@ 2009-02-06 21:08     ` Kalle Valo
  2009-02-06 21:11       ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Kalle Valo @ 2009-02-06 21:08 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Alina Friedrichsen, linux-wireless, linville

Johannes Berg <johannes@sipsolutions.net> writes:

> On Fri, 2009-02-06 at 21:21 +0200, Kalle Valo wrote:
>> "Alina Friedrichsen" <x-alina@gmx.net> writes:
>> 
>> > The atomic requirement for the TSF callbacks is outdated. get_tsf() is
>> > only called by ieee80211_rx_bss_info() which is indirectly called by
>> > the work queue ieee80211_sta_work(). In the same context are called
>> > several other non-atomic functions, too. And the atomic requirement
>> > causes problems for drivers of USB wifi cards.
>> 
>> Atomicity requirement also creates problems for SPI based devices, not
>> only USB. So I strongly support for removing the requirement.
>> 
>> Unfortunately I don't have time to review this, though. Sorry.
>
> It's ok, I took a look, there's no such requirement (any more).

Oh good. Thanks for checking this.

Alina, it would be nice to explicitly mention that the function can
sleep. Otherwise driver authors need to guess if sleeping is allowed
or not.

-- 
Kalle Valo

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

* Re: [PATCH] mac80211: Remove TSF atomic requirement from the documentation
  2009-02-06 21:08     ` Kalle Valo
@ 2009-02-06 21:11       ` Johannes Berg
  2009-02-07  7:34         ` Kalle Valo
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2009-02-06 21:11 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Alina Friedrichsen, linux-wireless, linville

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

On Fri, 2009-02-06 at 23:08 +0200, Kalle Valo wrote:

> Alina, it would be nice to explicitly mention that the function can
> sleep. Otherwise driver authors need to guess if sleeping is allowed
> or not.

That's a larger project to actually annotate all of them either way ;) I
think we only mention atomicity requirements right now.

johannes

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

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

* Re: [PATCH] mac80211: Remove TSF atomic requirement from the documentation
  2009-02-06 21:11       ` Johannes Berg
@ 2009-02-07  7:34         ` Kalle Valo
  0 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2009-02-07  7:34 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Alina Friedrichsen, linux-wireless, linville

Johannes Berg <johannes@sipsolutions.net> writes:

> On Fri, 2009-02-06 at 23:08 +0200, Kalle Valo wrote:
>
>> Alina, it would be nice to explicitly mention that the function can
>> sleep. Otherwise driver authors need to guess if sleeping is allowed
>> or not.
>
> That's a larger project to actually annotate all of them either way ;) 

Yes, but we can start with smaller pieces ;)

> I think we only mention atomicity requirements right now.

I found only one spot:

 * @set_key: See the section "Hardware crypto acceleration"
 *	This callback can sleep, and is only called between add_interface

But, like you said, we can add these later.

-- 
Kalle Valo

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

end of thread, other threads:[~2009-02-07  7:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-05 16:58 [PATCH] mac80211: Remove TSF atomic requirement from the documentation Alina Friedrichsen
2009-02-06 19:21 ` Kalle Valo
2009-02-06 20:44   ` Johannes Berg
2009-02-06 21:08     ` Kalle Valo
2009-02-06 21:11       ` Johannes Berg
2009-02-07  7:34         ` Kalle Valo

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).