Powersave broken on p54
Hi,
I'm using compat-wireless-2011-02-25 on my p54-spi device (n810). Powersave is pretty much completely broken with this release. With an older release from several weeks ago it used to work, though.
As soon as I enable PS, the link gets horrible latencies of about 20 seconds or more per ping packet, for example. It also saves hardly any power. (measured on the power supply).
Any ideas what could go wrong here?
Signature · 1 line
Greetings Michael.
Quoted 5 lines · On Tuesday 01 March 2011 19:12:22 Michael Büsch wrote:
Hi,
I'm using compat-wireless-2011-02-25 on my p54-spi device (n810). Powersave is pretty much completely broken with this release. With an older release from several weeks ago it used to work, though.
hmm, several weeks ago? Not alot was changed in the last few weeks, sure there was the rssi->dbm update (I hope you've already updated your eeprom image.) Then p54_flush and some tx_flag updates, but the driver's PS code was not touched.
Quoted 5 lines
As soon as I enable PS, the link gets horrible latencies of about 20 seconds or more per ping packet, for example. It also saves hardly any power. (measured on the power supply).
Any ideas what could go wrong here?
No idea, it looks like the ps-poll is broken, because "iwconfig wlanX power timeout 10" fixes the long delays almost immediately. [let's see if there's more]
Regards,
Chr
Quoted 2 lines · Christian Lamparter
sure there was the
rssi->dbmupdate (I hope you've already updated your eeprom image.)
What change to the eeprom is needed? My eeprom doesn't contain any rssi info (see recent NULL ptr fix).
Quoted 3 lines
No idea, it looks like the ps-poll is broken, because "iwconfig wlanX power timeout 10" fixes the long delays almost immediately. [let's see if there's more]
So maybe it's a generic mac80211 bug? Are there other devices with PS issues?
Signature · 1 line
Greetings, Michael.
Quoted 6 lines · On Wednesday 02 March 2011 18:17:37 Michael Buesch wrote:
Quoted 2 lines · Christian Lamparter
sure there was the
rssi->dbmupdate (I hope you've already updated your eeprom image.)What change to the eeprom is needed? My eeprom doesn't contain any rssi info (see recent NULL ptr fix).
I think you should (re-)add it, I don't know what the firmware is doing with it, but maybe Kalle knows more?
see "p54spi: update sample eeprom"6c1cef43fb9d4979f9f7e0dcc71f61921730149b
(Note: If the rssi values are missing, the driver uses the default for Indigo/Duette/Frisbee and XBow RF. But these parameter could confuse p54spi's Longbow RF?)
Quoted 6 lines
Quoted 3 lines
No idea, it looks like the ps-poll is broken, because "iwconfig wlanX power timeout 10" fixes the long delays almost immediately. [let's see if there's more]
So maybe it's a generic mac80211 bug? Are there other devices with PS issues?
Not sure, don't have any hardware to play with ATM. But maybe the attached "hack" helps a bit?
---
drivers/net/wireless/p54/fwio.c +2 -2
@@ -615,8 +615,8 @@ int p54_set_ps(struct p54_common *priv) psm->mode =cpu_to_le16 (mode); psm->aid =cpu_to_le16 (priv->aid);for (i =0 ; i <ARRAY_SIZE (psm->intervals); i++) { - psm->intervals[i].interval = -cpu_to_le16 (priv->hw->conf.listen_interval); + psm->intervals[i].interval =cpu_to_le16 (1 ); +// cpu_to_le16(priv->hw->conf.listen_interval); psm->intervals[i].periods =cpu_to_le16 (1 ); }
Quoted 7 lines · Michael Buesch
Quoted 2 lines · Christian Lamparter
sure there was the
rssi->dbmupdate (I hope you've already updated your eeprom image.)What change to the eeprom is needed? My eeprom doesn't contain any rssi info (see recent NULL ptr fix).
Quoted 6 lines
Quoted 3 lines
No idea, it looks like the ps-poll is broken, because "iwconfig wlanX power timeout 10" fixes the long delays almost immediately. [let's see if there's more]
So maybe it's a generic mac80211 bug? Are there other devices with PS issues?
We have been having some problems with PSM on the wl12xx driver too. It seems that it broke in the past couple of weeks as well. So this is most likely a problem in mac80211. I'll try to investigate this a bit more too.
Signature · 2 lines
Cheers, Luca.
Quoted 8 lines · Christian Lamparter
Quoted 2 lines
What change to the eeprom is needed? My eeprom doesn't contain any rssi info (see recent NULL ptr fix).
I think you should (re-)add it, I don't know what the firmware is doing with it, but maybe Kalle knows more?
see "p54spi: update sample eeprom"
6c1cef43fb9d4979f9f7e0dcc71f61921730149b
Thanks for the hint. I added that stuff to the
CAL to p54 eeprom converter tool.
Signature · 1 line
Greetings, Michael.
Quoted 12 lines · Luciano Coelho
Quoted 11 lines · Michael Buesch
Quoted 2 lines · Christian Lamparter
sure there was the
rssi->dbmupdate (I hope you've already updated your eeprom image.)What change to the eeprom is needed? My eeprom doesn't contain any rssi info (see recent NULL ptr fix).
Quoted 3 lines
No idea, it looks like the ps-poll is broken, because "iwconfig wlanX power timeout 10" fixes the long delays almost immediately. [let's see if there's more]
Quoted 7 lines
Quoted 2 lines
So maybe it's a generic mac80211 bug? Are there other devices with PS issues?
We have been having some problems with PSM on the wl12xx driver too. It seems that it broke in the past couple of weeks as well. So this is most likely a problem in mac80211. I'll try to investigate this a bit more too.
I've been investigating this problem a bit more and it seems that the symptom, at least, is that when we receive data with the more-data-buffered flag set, we immediately send a PS-poll which enables PS mode again. My guess is that it shouldn't send PS-poll but a null-frame with PS mode off.
I still need to refresh my PSM knowledge a bit more before I can continue studying this. ;)
Signature · 2 lines
Cheers, Luca.
Quoted 8 lines · Christian Lamparter
Not sure, don't have any hardware to play with ATM. But maybe the attached "hack" helps a bit?
---drivers/net/wireless/p54/fwio.c +0
-0
drivers/net/wireless/p54/fwio.c int p54_set_ps(struct p54_common *priv) · line 621
Quoted 9 lines
drivers/net/wireless/p54/fwio.c +2
-2@@ -615,8 +615,8 @@ int p54_set_ps(struct p54_common *priv) psm->mode =cpu_to_le16 (mode); psm->aid =cpu_to_le16 (priv->aid);for (i =0 ; i <ARRAY_SIZE (psm->intervals); i++) { - psm->intervals[i].interval = -cpu_to_le16 (priv->hw->conf.listen_interval); + psm->intervals[i].interval =cpu_to_le16 (1 ); +// cpu_to_le16(priv->hw->conf.listen_interval); psm->intervals[i].periods =cpu_to_le16 (1 ); }
This doesn't help.
Signature · 1 line
Greetings, Michael.
Quoted 10 lines · Christian Lamparter
Quoted 6 lines · On Wednesday 02 March 2011 18:17:37 Michael Buesch wrote:
Quoted 2 lines · Christian Lamparter
sure there was the
rssi->dbmupdate (I hope you've already updated your eeprom image.)What change to the eeprom is needed? My eeprom doesn't contain any rssi info (see recent NULL ptr fix).
I think you should (re-)add it, I don't know what the firmware is doing with it, but maybe Kalle knows more?
Most probably it's just to get good rssi values for received frames which is passed to the host. I doubt that the rssi calibration values are used anything useful inside the firmware. But as always, anything is possible :)
Signature · 1 line
Kalle Valo