From: Kalle Valo <kvalo@codeaurora.org>
To: Lior David <liord@codeaurora.org>
Cc: Maya Erez <qca_merez@qca.qualcomm.com>,
Lior David <qca_liord@qca.qualcomm.com>,
linux-wireless@vger.kernel.org, wil6210@qca.qualcomm.com
Subject: Re: [PATCH 2/2] wil6210: add module parameter for alternate interface name
Date: Wed, 30 Mar 2016 15:13:47 +0300 [thread overview]
Message-ID: <87wpok9n9g.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <56F3BBB4.6030104@codeaurora.org> (Lior David's message of "Thu, 24 Mar 2016 12:04:36 +0200")
Lior David <liord@codeaurora.org> writes:
>>> + const char *ifname = alt_ifname ? "wigig%d" : "wlan%d";
>>>
>>> wdev = wil_cfg80211_init(dev);
>>> if (IS_ERR(wdev)) {
>>> @@ -160,7 +166,7 @@ void *wil_if_alloc(struct device *dev)
>>> ch = wdev->wiphy->bands[IEEE80211_BAND_60GHZ]->channels;
>>> cfg80211_chandef_create(&wdev->preset_chandef, ch, NL80211_CHAN_NO_HT);
>>>
>>> - ndev = alloc_netdev(0, "wlan%d", NET_NAME_UNKNOWN, wil_dev_setup);
>>> + ndev = alloc_netdev(0, ifname, NET_NAME_UNKNOWN, wil_dev_setup);
>>> if (!ndev) {
>>> dev_err(dev, "alloc_netdev_mqs failed\n");
>>> rc = -ENOMEM;
>>
>> To me this looks like an ugly hack and I hope there is a better way to
>> handle the problem this patch is fixing. I think interface names
>> shouldn't matter from functionality point of view, anything requiring
>> certain naming is broken.
>>
>> But if the interface name is so important why not use "wigig%d" always?
>> The user space can rename the interface name anyway.
>
> The problem we try to solve is with Android. Android uses hard-coded "wlan0"
> interface name for wifi. We have a platform where wigig(11ad) is used
> alongside wifi(11ac). Both are independent and managed by separate services,
> but started at boot at roughly the same time. Sometimes 11ad will get wlan0
> interface name and 11ac will get wlan1, and wifi will not work.
> We considered using "wigig%d" always as you suggested, but it may break an
> unknown number of existing tools/scripts that rely on wlan0 interface
> name.
I got the idea why this is done, I just don't think that the way the
issue is solved is a good one. Can't you just rename the interface
during boot? Like older Ubuntu versions had a udev rule at
/etc/udev/rules.d/70-persistent-net.rules to name the interfaces (no
idea if it's still available after systemd was taken into use).
> As I see it, it is an issue of classification. Network drivers use a default
> interface name prefix depending on the device type. Ethernet drivers get "eth%d",
> wireless drivers get "wlan%d" and so on. There are even existing drivers
> that give different prefixes based on other conditions, for example see
> drivers/s390/net/ctcm_main.c, ctcm_init_netdevice.
> For our 11ad device, in many platforms it is used as a wifi replacement, so
> the wlan%d name is appropriate, in other platforms it is used as
> a different wireless device for different purposes, so the default "wigig%d"
> prefix seems appropriate.
Every platform works differently, even systemd even has it's own weird
naming scheme:
https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
I really don't think that we should start working around interface
naming problems by selecting the name with module parameters. But having
"wigig%d" as the default sounds like a good idea to me.
--
Kalle Valo
next prev parent reply other threads:[~2016-03-30 12:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-21 20:01 [PATCH 0/2] wil6210 changes Maya Erez
2016-03-21 20:01 ` [PATCH 1/2] wil6210: allow empty WMI commands in debugfs wmi_send Maya Erez
2016-04-04 15:04 ` Kalle Valo
2016-03-21 20:01 ` [PATCH 2/2] wil6210: add module parameter for alternate interface name Maya Erez
2016-03-23 15:27 ` Kalle Valo
2016-03-24 10:04 ` Lior David
2016-03-30 12:13 ` Kalle Valo [this message]
[not found] ` <56FFA3D0.7080603@codeaurora.org>
2016-04-02 14:54 ` Kalle Valo
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=87wpok9n9g.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=liord@codeaurora.org \
--cc=qca_liord@qca.qualcomm.com \
--cc=qca_merez@qca.qualcomm.com \
--cc=wil6210@qca.qualcomm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.