Bugzilla – Bug 1942
log says "TXPOWER -1 below lower limit 0"after set txpower off
Last modified: 2009-04-16 20:07:30
You need to log in before you can comment on or make changes to this bug.
Created an attachment (id=1883) [details] set debug=0x43fff log message Test Environment =============================================== Platform : Intel SDV M3M31 &M3M41 Wireless Card : Intel(R) WiFi Link 4965/5300/5100 OS : Redhat Fedora release 10 (Cambridge) AP : Cisco 1250 uCode : iwlwifi-4965-2.ucode 228.57.2.23 iwlwifi-5000-1.ucode 5.4.1.16 Source : commit 2bbc29297b04f93b2e04ea4d312fa20356591b88 (2.6.29-rc7-wl 5100 card) commit 705de0b9a217319cc14db2dd0f22a538fad744a6 (2.6.29-rc8-wl 4965/5300 card) Issue =============================================== log shows "Requested user TXPOWER -1 below lower limit 0" when set txpower off, driver lose connection even set txpower on after that. Possible root-cause =============================================== iwl_mac_config TX Power old=14, when set it off, TX Power new=-1; so log says iwlagn 0000:01:00.0: Requested user TXPOWER -1 below lower limit 0. Steps to Reproduce =============================================== 1. modprobe -r iwlagn 2. modprobe iwlagn 3. ifconfig wlan0 up 4. iwconfig wlan0 channel <CHANNEL> essid <ESSID> ----> associate with AP 5. ifconfig wlan0 <IP_ADDR> 6. ping <AP_ADDR_IP> ---->verify can receive ping packet 7. iwconfig wlan0 txpower off ----> log says that information 8. sleep 5 9. iwconfig wlan0 on ----> driver lose connection
Bug in mac80211, will attach patch, please test and let me know.
Created an attachment (id=1914) [details] patch fixing this issue
Mind you, we need to do more work to properly avoid this situation, since you can still do iwconfig wlan0 txpower -10dBm which is not supported. Through the help of mac80211 and cfg80211 we enforce the maximum transmit power that is registered in the channel structs (which we take from EEPROM), but we don't have a minimum. This minimum should probably be a per-hardware setting, and default to 0 in mac80211.
I test your patch which fixed the issue. And I also set txpower to -10dBm. Maybe the basic log message will help you to tracking. If you want to more debug message, please let me know. ieee80211 phy76: U iwl_add_station_flags Add STA to driver ID 15: ff:ff:ff:ff:ff:ff ieee80211 phy76: U iwl_sta_ucode_activate Added STA to Ucode: ff:ff:ff:ff:ff:ff ieee80211 phy76: U iwl_send_add_sta REPLY_ADD_STA PASSED ieee80211 phy76: U iwl_add_station_flags Add STA to driver ID 0: 00:19:5b:49:22:27 ieee80211 phy76: U iwl_sta_ucode_activate Added STA to Ucode: 00:19:5b:49:22:27 ieee80211 phy76: U iwl_send_add_sta REPLY_ADD_STA PASSED ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready ieee80211 phy76: U iwl_set_rxon_chain rx_chain=0x280E active=2 idle=2 ieee80211 phy76: U iwl5000_send_rxon_assoc Using current RXON_ASSOC. Not resending. wlan0: no IPv6 routers present ieee80211 phy76: U iwl5000_send_rxon_assoc Using current RXON_ASSOC. Not resending. iwlagn 0000:02:00.0: Requested user TXPOWER -10 below lower limit 0. ieee80211 phy76: U iwl_set_rxon_chain rx_chain=0x280E active=2 idle=2 ieee80211 phy76: U iwl_mac_config No re-sending same RXON configuration. ieee80211 phy76: U iwl5000_send_rxon_assoc Using current RXON_ASSOC. Not resending. ieee80211 phy76: U iwl5000_send_rxon_assoc Using current RXON_ASSOC. Not resending. ieee80211 phy76: U iwl5000_send_rxon_assoc Using current RXON_ASSOC. Not resending. ieee80211 phy76: U iwl_set_rxon_chain rx_chain=0x280E active=2 idle=2
Transmitting with less than 0dBm probably makes no sense at all anyway, I'll just limit to that in mac80211 (and hope there's no community objection).
Created an attachment (id=1926) [details] patch doing better validation Can you try this patch please? It turns out that wext doesn't allow txpower < 0dBm anyway, since -1 means "automatically adjust to the maximum you can support", which for us means we limit to the regulatory constraints, the driver might further restrict it.
I test it on 2.6.29-wl(commit 27364085a84fcdc955d8e5d3362ea68efa125f66), and set txpower in 1~14 (okay), <0 and >=15 (fail & invalid argument). log do not has that unexpected message. Maybe it fix this issue.
Thanks, I'll submit the patch upstream. How do we handle closing this bug?
Developer mark this bug as "Resolved Fixed", and QA will close it by marking it as "Verified"
Mark as fixed according to Johannes' comment
Note that sending at -10 dBm DOES make sense if you want to send at low power.
(In reply to comment #11) > Note that sending at -10 dBm DOES make sense if you want to send at low power. Right. However, wireless extensions do not support that, and iwlwifi hardware doesn't seem to either. So until somebody comes up with cfg80211/nl80211 API and hardware that supports it, we haven't lost anything.
True that iwlwifi hardware doesn't do it. However, Ben could make the HW do it with a 1 line firmware change, and a few lines of driver change. So if this is something that there's any demand for, it would be worth it. Locally, we've used low power for research and have implemented this functionality. But it did involve a lot of hacking around wireless extensions and mac80211 for precisely the reasons you point out.
(In reply to comment #13) > True that iwlwifi hardware doesn't do it. However, Ben could make the HW do it > with a 1 line firmware change, and a few lines of driver change. So if this is > something that there's any demand for, it would be worth it. Ah, cool, I didn't think it was that easy. > Locally, we've used low power for research and have implemented this > functionality. But it did involve a lot of hacking around wireless extensions > and mac80211 for precisely the reasons you point out. Yeah. Let's keep it at this (the patch is actually merged upstream now) and hack on it more when there's demand.
This issue was fixed on 2.6.30-rc2-wl. Marked it as verified.