From: Ben Greear <greearb@candelatech.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2 1/6] cfg80211: support creating wiphy with suggested name.
Date: Wed, 22 Oct 2014 09:07:42 -0700 [thread overview]
Message-ID: <5447D64E.9030301@candelatech.com> (raw)
In-Reply-To: <5446BD98.3010107@candelatech.com>
On 10/21/2014 01:10 PM, Ben Greear wrote:
> On 10/21/2014 12:31 PM, Johannes Berg wrote:
>
>>> /* give it a proper name */
>>> - dev_set_name(&rdev->wiphy.dev, PHY_NAME "%d", rdev->wiphy_idx);
>>> + if (requested_name && requested_name[0]) {
>>> + struct cfg80211_registered_device *rdev2;
>>> + int wiphy_idx, taken = -1, result, digits;
>>> +
>>> + /* Code below is from cfg80211_dev_rename */
>>
>> can you refactor this then please?
>
> I'll see what I can do on this, as well as take care of
> the rest of the comments.
I was thinking, this could be made simpler if we reduced restrictions on
the naming. Basically, let user (re)name the wiphy however they want, as
long as it name is not currently in use.
Might require a bit of extra locking and checking instead of just assuming the
atomic-inc and phy%d is unique, but maybe that is worth the tradeoff?
I'll get started on trying to refactor with existing constraints, but
let me know how you feel about relaxing the restrictions...
Thanks,
Ben
>
> Thanks,
> Ben
>
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
prev parent reply other threads:[~2014-10-22 16:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-20 22:49 [PATCH v2 1/6] cfg80211: support creating wiphy with suggested name greearb
2014-10-20 22:49 ` [PATCH v2 2/6] mac80211: allow creating wiphy devices " greearb
2014-10-21 19:34 ` Johannes Berg
2014-10-20 22:49 ` [PATCH v2 3/6] mac80211-hwsim: support creating radios with specific name greearb
2014-10-21 19:35 ` Johannes Berg
2014-10-20 22:49 ` [PATCH v2 4/6] cfg80211: support creating wiphy w/out creating wlanX greearb
2014-10-21 19:38 ` Johannes Berg
2014-10-20 22:49 ` [PATCH v2 5/6] mac80211-hwsim: " greearb
2014-10-21 19:39 ` Johannes Berg
2014-10-20 22:49 ` [PATCH v2 6/6] cfg80211: support configuring vdev mac addr on create greearb
2014-10-21 19:42 ` Johannes Berg
2014-10-21 19:31 ` [PATCH v2 1/6] cfg80211: support creating wiphy with suggested name Johannes Berg
2014-10-21 20:10 ` Ben Greear
2014-10-22 16:07 ` Ben Greear [this message]
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=5447D64E.9030301@candelatech.com \
--to=greearb@candelatech.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@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;
as well as URLs for NNTP newsgroup(s).