Skip to contentSkip to conversation

mac80211: Remove TSF atomic requirement from the documentation

PATCH In review Alina Friedrichsen 3 participants 6 messages Feb 5, 2009 – Feb 7, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: Remove TSF atomic requirement from the documentation

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.

---
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw
Quoted 5 lines · Alina Friedrichsen

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.

Signature · 1 line
Kalle Valo
#2 lore raw
Quoted 8 lines · Kalle Valo
Quoted 5 lines · Alina Friedrichsen

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.

Quoted 4 lines

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

#3 lore raw
Quoted 9 lines · Johannes Berg
Quoted 8 lines · Kalle Valo
Quoted 5 lines · Alina Friedrichsen

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.

Quoted 6 lines
Quoted 4 lines

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.

Signature · 1 line
Kalle Valo
#4 lore raw
Quoted 3 lines · Kalle Valo

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

#5 lore raw
Quoted 7 lines · Johannes Berg
Quoted 3 lines · Kalle Valo

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

Quoted 1 line

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.

Signature · 1 line
Kalle Valo