Thread (11 messages) flat view 11 messages, 3 authors, 2014-08-12

Re: [PATCH] allow setting wiphy.perm_addr after driver probe

From: Marcel Holtmann <marcel@holtmann.org>
Date: 2014-08-12 07:58:44
Also in: lkml, netdev

Hi Daniel,
quoted
the way I read the nl80211 code is that the NL80211_CMD_NEW_INTERFACE
requires a wiphy device to be specified. And that is actually just a
number. So I have no idea what the MAC has to here.
OpenWrt finds a wiphy by its MAC.
maybe that is the first problem right there. I see that over sysfs you get phy80211/macaddress. However if you do a dump via NL80211_CMD_GET_WIPHY then you do not have the MAC address there.
quoted
Why does the wiphy need to know the MAC if it is always specified from
userspace when actually creating the new netdev interface. Works for
P2P devices, so why wouldn't it work for access point and station
mode?
A MAC can be specified for the netdev, but it is assigned to a wiphy
identified by its MAC.
That you find the wiphy device by its MAC address seems to be your problem. As I said, on nl80211 you are using the wiphy unique number and not a MAC address.

If you want to use some sort of device discovery via sysfs, then use phy80211/index and other attributes to uniquely identify the device. Basing this on the MAC address seems dangerous. Especially since it might be not valid or an identical default for all cards.

Regards

Marcel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help