linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to find the phy's associated with a wireless dev
@ 2011-10-25 18:10 David Goodenough
  2011-10-25 18:47 ` Ben Greear
  0 siblings, 1 reply; 4+ messages in thread
From: David Goodenough @ 2011-10-25 18:10 UTC (permalink / raw)
  To: linux-wireless

I notice that if I remove the kernel module for a wireless 
interface and reload it, that a new phy is defined.  This is 
confusing my script that sets up interfaces, in particular I 
need to set the distance for a long distance link and that has
to be done on the phy not the dev.

I am doing this from a script so I guess it has to be a query
using iw, but I can not see which one to use.

David

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to find the phy's associated with a wireless dev
  2011-10-25 18:10 How to find the phy's associated with a wireless dev David Goodenough
@ 2011-10-25 18:47 ` Ben Greear
  2011-10-26 10:32   ` Mariana Gambande
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Greear @ 2011-10-25 18:47 UTC (permalink / raw)
  To: David Goodenough; +Cc: linux-wireless

On 10/25/2011 11:10 AM, David Goodenough wrote:
> I notice that if I remove the kernel module for a wireless
> interface and reload it, that a new phy is defined.  This is
> confusing my script that sets up interfaces, in particular I
> need to set the distance for a long distance link and that has
> to be done on the phy not the dev.
>
> I am doing this from a script so I guess it has to be a query
> using iw, but I can not see which one to use.

On a recent kernel:
cat /sys/class/net/wlan0/phy80211/name

Thanks,
Ben


>
> David
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to find the phy's associated with a wireless dev
  2011-10-25 18:47 ` Ben Greear
@ 2011-10-26 10:32   ` Mariana Gambande
  2011-10-26 12:18     ` Divinsky, Yonatan
  0 siblings, 1 reply; 4+ messages in thread
From: Mariana Gambande @ 2011-10-26 10:32 UTC (permalink / raw)
  To: Ben Greear; +Cc: David Goodenough, linux-wireless

Hello Davis,
Maybe is easier for you to create an udev rule to rename your wireless
devices always the same way. An example:

file /etc/udev/rules.d/wireless-devices.rules:

KERNEL=="phy*", SYSFS{address}=="00:xx:xx:xx:xx:xx", NAME="phy0"
KERNEL=="phy*", SYSFS{address}=="00:xx:xx:xx:xx:xx", NAME="phy1"

You can see more information here
http://www.science.uva.nl/research/air/wiki/LogicalInterfaceNames?show_comments=1

This works fine for me :)


2011/10/25 Ben Greear <greearb@candelatech.com>
>
> On 10/25/2011 11:10 AM, David Goodenough wrote:
>>
>> I notice that if I remove the kernel module for a wireless
>> interface and reload it, that a new phy is defined.  This is
>> confusing my script that sets up interfaces, in particular I
>> need to set the distance for a long distance link and that has
>> to be done on the phy not the dev.
>>
>> I am doing this from a script so I guess it has to be a query
>> using iw, but I can not see which one to use.
>
> On a recent kernel:
> cat /sys/class/net/wlan0/phy80211/name
>
> Thanks,
> Ben
>
>
>>
>> David
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
> --
> Ben Greear <greearb@candelatech.com>
> Candela Technologies Inc  http://www.candelatech.com
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to find the phy's associated with a wireless dev
  2011-10-26 10:32   ` Mariana Gambande
@ 2011-10-26 12:18     ` Divinsky, Yonatan
  0 siblings, 0 replies; 4+ messages in thread
From: Divinsky, Yonatan @ 2011-10-26 12:18 UTC (permalink / raw)
  To: David Goodenough; +Cc: linux-wireless

On Wed, Oct 26, 2011 at 12:32 PM, Mariana Gambande <mlgambande@gmail.com> wrote:
>
> Hello Davis,
> Maybe is easier for you to create an udev rule to rename your wireless
> devices always the same way. An example:
>
> file /etc/udev/rules.d/wireless-devices.rules:
>
> KERNEL=="phy*", SYSFS{address}=="00:xx:xx:xx:xx:xx", NAME="phy0"
> KERNEL=="phy*", SYSFS{address}=="00:xx:xx:xx:xx:xx", NAME="phy1"
>
> You can see more information here
> http://www.science.uva.nl/research/air/wiki/LogicalInterfaceNames?show_comments=1
>
> This works fine for me :)
>
>
> 2011/10/25 Ben Greear <greearb@candelatech.com>
> >
> > On 10/25/2011 11:10 AM, David Goodenough wrote:
> >>
> >> I notice that if I remove the kernel module for a wireless
> >> interface and reload it, that a new phy is defined.  This is
> >> confusing my script that sets up interfaces, in particular I
> >> need to set the distance for a long distance link and that has
> >> to be done on the phy not the dev.
> >>
> >> I am doing this from a script so I guess it has to be a query
> >> using iw, but I can not see which one to use.
> >
> > On a recent kernel:
> > cat /sys/class/net/wlan0/phy80211/name
> >

If your kernel does not support it you could just do:
iw phy | grep -o -m1 -e 'phy[0-9]'

Thanks,
Yoni

>
> > Thanks,
> > Ben
> >
> >
> >>
> >> David
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
> >
> > --
> > Ben Greear <greearb@candelatech.com>
> > Candela Technologies Inc  http://www.candelatech.com
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-10-26 12:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-25 18:10 How to find the phy's associated with a wireless dev David Goodenough
2011-10-25 18:47 ` Ben Greear
2011-10-26 10:32   ` Mariana Gambande
2011-10-26 12:18     ` Divinsky, Yonatan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).