Opened 6 years ago

Closed 5 years ago

Last modified 4 years ago

#11821 closed defect (invalid)

Coding error in /lib/wifi/ affects TX power

Reported by: zxdavb Owned by: jow
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: mac_80211 Cc:


Starting with the following configuration in build 32601:

root@db-router:/etc/config# uci show wireless.radio0
wireless.radio0.ht_capab=SHORT-GI-40 DSSS_CCK-40

When I execute the following command, I get an error:

root@db-router:~# uci commit wireless; wifi
[ 5559.957224] br-lan: port 2(wlan0) entered disabled state
[ 5559.979398] device wlan0 left promiscuous mode
[ 5559.992892] br-lan: port 2(wlan0) entered disabled state
Configuration file: /var/run/hostapd-phy0.conf
[ 5560.316331] device wlan0 entered promiscuous mode
Using interface wlan0 with hwaddr 00:0e:8e:3f:58:4c and ssid 'Widgets'
[ 5560.656835] br-lan: port 2(wlan0) entered forwarding state
[ 5560.673372] br-lan: port 2(wlan0) entered forwarding state
[ 5562.672968] br-lan: port 2(wlan0) entered forwarding state
command failed: Invalid argument (-22)

I have traced this error to a line in /lib/wifi/ (called by the wifi command) that executes the following command:

root@db-router:~# iw dev wlan0 set txpower fixed 2700
command failed: Invalid argument (-22)

The relevant piece of code follows:

root@db-router:~# grep -E 00\"$ /lib/wifi/
  [ -z "$txpower" ] || iw dev "$ifname" set txpower fixed "${txpower%%.*}00"

root@db-router:~# sed -i 's/00\"$/db\"/' /lib/wifi/

This workaround seemed to solve the problem.


Attachments (0)

Change History (3)

comment:1 Changed 5 years ago by florian

  • Owner changed from developers to jow
  • Status changed from new to assigned

comment:2 Changed 5 years ago by nbd

  • Resolution set to invalid
  • Status changed from assigned to closed

your configured txpower value is probably too high.

"iw dev wlan0 set txpower fixed 27db" fails silently, the command expects a value in mBm, so 2700 is the right format.

comment:3 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.