linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* why can the distance only be set on a phy not a dev
@ 2012-01-17 12:29 David Goodenough
  2012-01-17 13:05 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: David Goodenough @ 2012-01-17 12:29 UTC (permalink / raw)
  To: linux-wireless

Using the iw command, most things can either be directed to a dev or
a phy, but a distance can only be set on a phy.

This leads to problems as I do not know which phy is connected to a 
dev (or at least I do not know how to find out which phy is connected
to a dev), and so in my Debian /etc/network/interfaces file I have:-

iface wlan0 inet manual
	pre-up iw dev wlan0 interface add mesh0 type mp

iface mesh0 inet static
    address 10.101.11.254
    netmask 255.255.255.0
    pre-up iw dev mesh0 set channel 153
    post-up iw phy phy0 set distance 3500
    up iw dev mesh0 mesh join MeshId

so in the mesh0 stanza I have a reference to phy0 which is hard
coded and if it changes subject to error.

So either I need to be able to set distance to dev mesh0, or have
some means or working out which phy corresponds to dev mesh0.

Any ideas?

David

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

* Re: why can the distance only be set on a phy not a dev
  2012-01-17 12:29 why can the distance only be set on a phy not a dev David Goodenough
@ 2012-01-17 13:05 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2012-01-17 13:05 UTC (permalink / raw)
  To: David Goodenough; +Cc: linux-wireless

On Tue, 2012-01-17 at 12:29 +0000, David Goodenough wrote:
> Using the iw command, most things can either be directed to a dev or
> a phy, but a distance can only be set on a phy.
> 
> This leads to problems as I do not know which phy is connected to a 
> dev (or at least I do not know how to find out which phy is connected
> to a dev), and so in my Debian /etc/network/interfaces file I have:-
> 
> iface wlan0 inet manual
> 	pre-up iw dev wlan0 interface add mesh0 type mp
> 
> iface mesh0 inet static
>     address 10.101.11.254
>     netmask 255.255.255.0
>     pre-up iw dev mesh0 set channel 153
>     post-up iw phy phy0 set distance 3500
>     up iw dev mesh0 mesh join MeshId
> 
> so in the mesh0 stanza I have a reference to phy0 which is hard
> coded and if it changes subject to error.
> 
> So either I need to be able to set distance to dev mesh0, or have
> some means or working out which phy corresponds to dev mesh0.

I can easily allow you to invoke iw with the netdev rather than the phy,
but the parameter would still be per phy.

johannes


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

end of thread, other threads:[~2012-01-17 13:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-17 12:29 why can the distance only be set on a phy not a dev David Goodenough
2012-01-17 13:05 ` Johannes Berg

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).