Need Antenna quirks for some platforms

Bug #1061924 reported by James M. Leddy
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
NetworkManager
New
Undecided
Unassigned
network-manager (Ubuntu)
New
Undecided
Unassigned
Precise
Won't Fix
Undecided
Unassigned
Quantal
Won't Fix
Undecided
Unassigned
udev (Ubuntu)
Triaged
High
Unassigned
Precise
Won't Fix
Undecided
Unassigned
Quantal
Won't Fix
High
Unassigned

Bug Description

It has recently come to our attention that some laptops, in particular the lenovo b470 machines, have only one antenna. Unfortunately, they have decided to attach the auxilary antenna in the factory and not the main antenna. Udev sounds like the right place to quirk for this.

Presently we're using an upstart job, the text of which is :

# LenovoBx70eAtherosAntenna.conf
#
# Lenovo B[45]70e systems with Atheros AR9285 wifi only have one
# antenna, but the ath9k driver defaults to using two antennas (Main
# for Tx, Aux for Rx). This job reconfigures the driver to use the
# main antenna for both Tx and Rx before networking starts.

description "Fix antenna configuration for Atheros wifi on b470e/b570e"

start on starting networking

task

script
        # only required for Lenovo B470e and B570e
        dmidecode --string system-version | grep --quiet --line-regex "Lenovo B[45]70e" || exit 0

        # only required for Atheros AR9285 devices
        lspci -n | grep --quiet --extended-regexp "^[0-9a-f:.]* 0280: 168c:002b" || exit 0

        # configure the device to use antenna 1 (Main) for both tx and rx
 iw phy0 set antenna 1 1
end script

tags: added: blocks-hwcert-enablement
Ayan George (ayan)
Changed in udev (Ubuntu Precise):
assignee: nobody → Ayan George (ayan)
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Triaged: Has detailed explanation of problem
High: Affects Built in network hardware

Changed in udev (Ubuntu Quantal):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

Can you please forward this bug to the kernel developers, so that it can get fixed properly in the driver?

udev is not the place to put driver bug workarounds in, but then again neither are most other packages, so we can stick it into the udev package for now. It just has no chance of getting accepted upstream.

But let's at least try all the overhead with it, i. e. calling dmidecode, lspci, and two times grep. Could you try to replace the upstart job with an /etc/udev/rules.d/80-platform-quirks.rules with this contents:

  ACTION=="add", ATTR{vendor}=="0x168c", ATTR{device}=="0x002b", ATTR{[dmi/id]product_name}=="Lenovo B[45]70e*", RUN+="/sbin/iw phy0 set antenna 1 1"

and let me know whether that works as well? Also, I don't like the hardcoded "phy0" here, that'll be wrong if you have more than one card installed. Can you please do "udevadm info --export-db > /tmp/udev.txt" and attach /tmp/udev.txt here? Thanks!

Revision history for this message
Martin Pitt (pitti) wrote :

I meant "try to avoid all the overhead with that upstart rule", sorry.

Steve Langasek (vorlon)
Changed in udev (Ubuntu Quantal):
milestone: none → quantal-updates
Revision history for this message
Bebop (bebop) wrote :

Hi, none of the solutions works for me (Lenovo B570e with ath9k driver). Looks like the wlan interface is up at the time of running the "set antenna" command (iw). Here is the /var/log/upstart/LenovoBx70eAtherosAntenna.log

command failed: Operation not supported (-95)

Ii know I have this problem because:

1. I opened my laptop and there's just one cable plugged in the wlan card ;-)

2. Setting the antenna to 1x1 after booting (with the interface down) works perfectly. I mean:

- Disable wireless using the fn+5 key
- sudo iw phy0 set antenna 1 1
- Enable wireless again using the fn+5 key

I'm looking for a permanent solution. Pls let me know if you want me to do some testing.

Thanks for your work,

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in udev (Ubuntu Precise):
status: New → Confirmed
Revision history for this message
Bebop (bebop) wrote :

As a quick&dirty solution, I've added the antenna settings in /etc/rc.local:

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#!/bin/sh -e
#
# rc.local
#

sudo ifconfig wlan0 down
iw phy0 set antenna 1 1
sudo ifconfig wlan0 up

exit 0
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Note "wlan0" belongs to my configuration, and it may differ in other installations.
That works for now, until a proper solution is delivered (I'm on Ubuntu 12.10)

Rgds,

Revision history for this message
Bebop (bebop) wrote :

...oops, the following will do

ifconfig wlan0 down
iw phy0 set antenna 1 1
ifconfig wlan0 up
exit 0

..no need for sudoing in rc.local

Revision history for this message
James M. Leddy (jm-leddy) wrote :

After reviewing, I do agree that udev is the absolute wrong place for this, if only because it has too many deps to bring in. Network Manager, however, already has the dependencies in libnl and already has some udev rules files in the package. I've written a branch which addresses this issue and will upload shortly.

Ayan George (ayan)
Changed in udev (Ubuntu Precise):
assignee: Ayan George (ayan) → nobody
Revision history for this message
alien (nalex2004) wrote :

Thank you!
With this:

 ifconfig wlan0 down
 iw phy0 set antenna 1 1
 ifconfig wlan0 up

in rc.local my ar9285 can work not only close to router, but much further )) Before it only Windows could find wi-fi network further than 5 meters from router, not Ubuntu 12.04, 12.10, 13.04..

(Lenovo G575)

Revision history for this message
Brian Murray (brian-murray) wrote :

I'm unsubscribing the Ubuntu Sponsors team as at this point in time I don't see something to sponsor.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

quantal has seen the end of its life and is no longer receiving any updates. Marking the quantal task for this ticket as "Won't Fix".

Changed in udev (Ubuntu Quantal):
status: Triaged → Won't Fix
Rolf Leggewie (r0lf)
Changed in network-manager (Ubuntu Quantal):
status: New → Won't Fix
Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in udev (Ubuntu Precise):
status: Confirmed → Won't Fix
Steve Langasek (vorlon)
Changed in network-manager (Ubuntu Precise):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.