pull request: bluetooth-2.6 2010-11-01
Hi John,
Here goes 3 simple patches intended to 2.6.37. First one is from myself and fix some trivial return values. Then we also have a fix from Stefan Seyfried on btusb to avoid emitting an err when we USB is autosupended. Last, a patch from Bala Shanmugam that fix the firmware loading process for the ath3k driver.
Please pull, or let me know if you disagree with the patches. Thanks a lot. ;)
The following changes since commit 916448e77f6bcaaa7f13c3de0c3851783ae2bfd0:
ath9k: Fix STA disconnect issue due to received MIC failed bcast frames (2010-11-30 13:45:02 -0500)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-2.6.git master
Bala Shanmugam (1):
Bluetooth: Add new PID for Atheros 3011
Gustavo F. Padovan (1):
Bluetooth: Fix not returning proper error in SCO
Stefan Seyfried (1):
Bluetooth: Fix log spamming in btusb due to autosuspend
drivers/bluetooth/ath3k.c | 4 ++++ drivers/bluetooth/btusb.c | 12 +++++++++--- net/bluetooth/sco.c | 6 +++--- 3 files changed, 16 insertions(+), 6 deletions(-)
Signature · 2 lines
Gustavo F. Padovan http://profusion.mobi
carl9170: RX and TX interrupt callback ?
I am trying to do time measurement using carl9170 firmware side. There was some interesting previous thread about clock to be used and location of the probe in the code. My goal is to get a precise time from the moment a packet has been transmitted (timestamp when the packet has been transmitted) and the arrival of the next received packet (time when a packet has been fully received). Looking though the code, there is a loop in src/main.c handling the TX/RX interrupt by reading the AR9170_MAC_REG_INT_CTRL register and checking the AR9170_MAC_INT_TXC/RXC bits. Pending on task to be performed in the loop, it could take tens of microseconds to go through one iteration which affects the measurement and resulting in having RXC timestamp smaller than TXC timestamp which is clearly an issue !
My current workaround is to add many check to AR9170_MAC_REG_INT_CTRL in the main loop to reduce the detection latency which at least gave me better results (TXC time < RXC time ) but somehow it does not seem AR9170_MAC_REG_INT_CTRL register is refreshed right away when a packet is received or transmitted. I would like to know if there is any way to attach a callback function to the RXC or TXC interrupt so that we get immediate notification instead of depending on a polling method. If not, is there any way to minimize delays between the time a packet is sent/received and the TXC/RXC bit flag raised in the register ?
Thanks,
Chris.
Re: carl9170: RX and TX interrupt callback ?
Quoted 11 lines · On Monday 10 January 2011 22:24:18 Chris Pechard wrote:
I am trying to do time measurement using carl9170 firmware side. There was some interesting previous thread about clock to be used and location of the probe in the code. My goal is to get a precise time from the moment a packet has been transmitted (timestamp when the packet has been transmitted) and the arrival of the next received packet (time when a packet has been fully received). Looking though the code, there is a loop in
src/main.chandling the TX/RX interrupt by reading theAR9170_MAC_REG_INT_CTRLregister and checking the AR9170_MAC_INT_TXC/RXC bits. Pending on task to be performed in the loop, it could take tens of microseconds to go through one iteration which affects the measurement and resulting in having RXC timestamp smaller than TXC timestamp which is clearly an issue!
are you sure, you put the right code in the right place :-D . I've posted code for the same idea a while ago [on this mailing-list] and I can't remember anything that weird.
Quoted 7 lines
My current workaround is to add many check to
AR9170_MAC_REG_INT_CTRLin the main loop to reduce the detection latency which at least gave me better results (TXC time < RXC time ) but somehow it does not seemAR9170_MAC_REG_INT_CTRLregister is refreshed right away when a packet is received or transmitted. I would like to know if there is any way to attach a callback function to the RXC or TXC interrupt so that we get immediate notification instead of depending on a polling method.
Oh it is, or it should be easy to get an interrupt event from the MAC processor. You just have to look through the SH2 platform docs [which are freely available from Reneas] and setup the interrupt controller accordingly.
If you're stuck and need advice on the f/irq topic, you should definitely ask Stephen Chen <[email protected]> for assistance. As he's one of the few persons who know how it works. I certainly can't...
Good Luck!
Quoted 2 lines
If not, is there any way to minimize delays between the time
a packet is sent/received and the TXC/RXC bit flag raised in the register?
Don't forget the 802.11 is working against you.
CSMA/CA with R/S/D/P/E/IFS, [random] backoff, dynamic ACK delays and so much more can really spoil the day, if you are not aware that it's there.
Furthermore, have you tried to contact the people behind similar projects?
Ignacy Gawedzki <[email protected]>
David H. Lynch Jr. <[email protected]>
Especially David, since it seems that he's done with it.
Best Regards,
Chr
PS.: you could also go a different route with OpenFWWF.
Re: carl9170: RX and TX interrupt callback ?
Thanks for the pointers, I will definitively contact the people you listed.
Chris.
----- Original Message ----
From: Christian Lamparter <[email protected]>
To: Chris Pechard <[email protected]>
Cc: [email protected]
Sent: Mon, January 10, 2011 2:39:39 PM
Subject: Re: carl9170: RX and TX interrupt callback ?
Quoted 9 lines · On Monday 10 January 2011 22:24:18 Chris Pechard wrote:
I am trying to do time measurement using carl9170 firmware side. There was some
interesting previous thread about clock to be used and location of the probe in
the code. My goal is to get a precise time from the moment a packet has been transmitted (timestamp when the packet has been transmitted) and the arrival of
the next received packet (time when a packet has been fully received). Looking
Quoted 7 lines
though the code, there is a loop in
src/main.chandling the TX/RX interrupt byreading the
AR9170_MAC_REG_INT_CTRLregister and checking the AR9170_MAC_INT_TXC/RXC bits. Pending on task to be performed in the loop, it could take tens of microseconds to go through one iteration which affects the measurement and resulting in having RXC timestamp smaller than TXC timestamp which is clearly an issue!
are you sure, you put the right code in the right place :-D .
I've posted code for the same idea a while ago [on this mailing-list] and I can't remember anything that weird.
[CP]: :-) I am measuring the delta between when a packet has left the wireless interface and the time the next packet is received on the interface. This timing is much less forgiving than measuring the time when a packet is sent to the TX queue and TXC or RXC has occurred ( the time difference could be more than double due to firmware latency, 802.11 medium access and packet transmit time). That's the reason I am interested in fast TXC notification which would eliminates some of the random delays.
Quoted 11 lines
My current workaround is to add many check to
AR9170_MAC_REG_INT_CTRLin the main loop to reduce the detection latency which at least gave me better results(TXC time < RXC time ) but somehow it does not seem
AR9170_MAC_REG_INT_CTRLregister is refreshed right away when a packet is received or transmitted. I would like to know if there is any way to attach a callback function to the RXCor TXC interrupt so that we get immediate notification instead of depending on
a polling method.
Oh it is, or it should be easy to get an interrupt event from the MAC processor. You just have to look through the SH2 platform docs [which are freely available from Reneas] and setup the interrupt controller accordingly.
If you're stuck and need advice on the f/irq topic, you should definitely ask Stephen Chen <[email protected]> for assistance. As he's one of the few persons who know how it works. I certainly can't...
Good Luck!
Quoted 2 lines
If not, is there any way to minimize delays between the time
a packet is sent/received and the TXC/RXC bit flag raised in the register?
Don't forget the 802.11 is working against you.
CSMA/CA with R/S/D/P/E/IFS, [random] backoff, dynamic ACK delays and so much more can really spoil the day, if you are not aware that it's there.
Furthermore, have you tried to contact the people behind similar projects?
Ignacy Gawedzki <[email protected]>
David H. Lynch Jr. <[email protected]>
Especially David, since it seems that he's done with it.
Best Regards,
Chr
PS.: you could also go a different route with OpenFWWF.
carl9170: RX interrupt handler
In reply to Chris PechardThe carl9170 firmware is notified of incoming packets from the the mac processor via AR9170_MAC_INT_RXC bit set in AR9170_MAC_REG_INT_CTRL control register. Currently the register is polled through an infinite loop. In order to get faster detection of incoming packets, I would like to program a hardware interrupt handler which would be called right away instead of depending on a polling cycle state. From Steven Chen at Atheros, the chip supports hw interrupts even though it is not in used by the open source firmware. Has anyone tried to enable this feature ? If you have any pointers on how to enable hw interrupt on the arl9170, feel free to flood my mailbox :-) !
Thanks,
Chris.