From: Marcel Holtmann <marcel@holtmann.org>
To: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Cc: "John W. Linville" <linville@tuxdriver.com>,
"linux-wireless@vger.kernel.org Wireless"
<linux-wireless@vger.kernel.org>,
Johannes Berg <johannes@sipsolutions.net>,
"David S. Miller" <davem@davemloft.net>,
Network Development <netdev@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] allow setting wiphy.perm_addr after driver probe
Date: Mon, 11 Aug 2014 15:41:38 -0700 [thread overview]
Message-ID: <28066DB2-9EA9-4748-9C89-D3FBD3EC51F5@holtmann.org> (raw)
In-Reply-To: <1407791075.28221.74.camel@chimera>
Hi Daniel,
>> The initial wlan0 can be removed as every other netdev attached to the
>> wiphy. It can also be as easily re-created.
>>
>> Since the wiphy does not have a valid MAC address, my proposal here
>> would be to just not create the wlan0 in the first place. This means
>> that the wiphy can be still discovered via nl80211.
>
> I repeat, currently wlan0 is *not* created.
what kind of hardware are you actually using here?
>> It also means that the wlan0 netdev needs to be created by userspace
>> now. And a valid NL80211_ATTR_MAC be provided. Similar to what is
>> already done for P2P devices at the moment. That should just solve the
>> problem.
>
> The creation of wlan0 already comes from userspace, but the PHY has its
> own MAC.
>
>> We really do not want to announce a netdev when registering the wiphy
>> device and then having to mess with its MAC address via sysfs somehow.
>> This all needs to be properly reflected over RTNL.
>>
> Again, no netdev is announced. There just isn't a way to set the MAC of
> the wiphy device itself.
>
> How about this: What if the driver were to leave the MAC at all zeros
> initially, and sysfs could set that if and only if it's all zeros at the
> time?
Internally it might do that, but I do not see it exposing the NL80211_ATTR_MAC when you get the attributes for wiphy.
So I am still saying that when you do NL80211_CMD_NEW_INTERFACE allow providing NL80211_ATTR_MAC to set the MAC address to be used. It might be useful that the wiphy exposes an attribute saying that it does not have a default MAC address, but that should be it. I do not like these magic 00:00:00:00:00:00 games. As I mentioned earlier, in Bluetooth we just deal with allowing the driver to set a flag that it does not have a valid address. And then the core takes care of dealing with it.
Regards
Marcel
next prev parent reply other threads:[~2014-08-11 22:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-11 18:04 Daniel Gimpelevich
2014-08-11 20:25 ` Marcel Holtmann
2014-08-11 20:40 ` Daniel Gimpelevich
2014-08-11 20:56 ` Marcel Holtmann
2014-08-11 21:04 ` Daniel Gimpelevich
2014-08-11 22:41 ` Marcel Holtmann [this message]
2014-08-11 23:12 ` Daniel Gimpelevich
2014-08-11 23:56 ` Marcel Holtmann
2014-08-12 0:01 ` Daniel Gimpelevich
2014-08-12 7:59 ` Marcel Holtmann
2014-08-12 8:43 ` Jonas Gorski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28066DB2-9EA9-4748-9C89-D3FBD3EC51F5@holtmann.org \
--to=marcel@holtmann.org \
--cc=daniel@gimpelevich.san-francisco.ca.us \
--cc=davem@davemloft.net \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®