Search Linux Wireless

Re: [PATCH] wireless: Print wiphy name in sysfs.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/11/2010 11:10 AM, Johannes Berg wrote:
On Mon, 2010-10-11 at 11:04 -0700, Ben Greear wrote:


I use this to determine the phy device for a particular network device:

[root@dx-2u-ath5k lanforge]# cat /sys/class/net/wlan0/phy80211/name
wiphy0

What's wrong with

basename $(readlink /sys/class/net/wlan0/phy80211)

It looks like that could work, but it seems a lot easier to probe
network devices via normal manner, and then check if I can just
open and read /sys/class/net/[dev-name]/phy80211/name

I can do that easily from within a C/C++ program, where as
doing system calls and grabbing standard output is more of
a pain (and more overhead).

But, if you don't want to add my patch, it's not a big deal.

Thanks,
Ben

--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux