From: Alex Davis <alex14641@yahoo.com>
To: larry.finger@lwfinger.net
Cc: linux-wireless@vger.kernel.org, bcm43xx-dev@lists.berlios.de
Subject: Patch to allow specification of interface name prefix
Date: Sat, 24 Feb 2007 20:06:30 -0800 (PST) [thread overview]
Message-ID: <510326.55988.qm@web50211.mail.yahoo.com> (raw)
This patch will allow you to specify the interface name prefix of wireless devices.
On my machine, the wireless devices under the bcm43xx driver are named 'ethx'; I
would really rather have them called 'wlanx', like bcm43xx-d80211 does.
I have this as an option to bcm43xx in modprobe.conf.
Usage: modprobe bcm43xx ifprefix=wlan
Your wireless devices will now be called 'wlan0', 'wlan1', etc.
This patch is against Larry's combined-2.6.20.1.patch
Signed-off by: Alex Davis <alex14641 at yahoo dot com>
--- drivers/net/wireless/bcm43xx/bcm43xx_main.c 2007-02-24 22:22:48.000000000 -0500
+++ ../linux-2.6.20.1-lwf/drivers/net/wireless/bcm43xx/bcm43xx_main.c 2007-02-24
22:44:46.000000000 -0500
@@ -103,6 +103,9 @@
# define modparam_fwpostfix ""
#endif /* CONFIG_BCM43XX_DEBUG*/
+static char modparam_ifprefix[IFNAMSIZ - 4];
+module_param_string(ifprefix, modparam_ifprefix, IFNAMSIZ - 4, 0444);
+MODULE_PARM_DESC(ifprefix, "Prefix for interface names (e.g; wlan).");
/* If you want to debug with just a single device, enable this,
* where the string is the pci device ID (as given by the kernel's
@@ -4123,6 +4126,10 @@
goto out;
}
/* initialize the net_device struct */
+ if ( strlen(modparam_ifprefix) > 0 ) {
+ strcpy(net_dev->name, modparam_ifprefix);
+ strcat(net_dev->name, "%d");
+ }
SET_MODULE_OWNER(net_dev);
SET_NETDEV_DEV(net_dev, &pdev->dev);
I code, therefore I am
____________________________________________________________________________________
Have a burning question?
Go to www.Answers.yahoo.com and get answers from real people who know.
next reply other threads:[~2007-02-25 4:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-25 4:06 Alex Davis [this message]
2007-02-25 4:30 ` Patch to allow specification of interface name prefix Pavel Roskin
2007-02-25 4:39 ` Larry Finger
2007-02-26 23:02 ` Stephen Hemminger
2007-02-27 1:33 ` John W. Linville
2007-02-27 10:16 ` Jiri Benc
2007-02-27 17:41 ` Stephen Hemminger
2007-02-27 18:21 ` Ben Greear
2007-02-27 18:52 ` Pavel Roskin
2007-02-27 19:15 ` Johannes Berg
2007-02-27 18:55 ` Luis R. Rodriguez
2007-02-28 1:25 ` John W. Linville
2007-02-28 8:51 ` Johannes Berg
2007-02-28 16:44 ` Jouni Malinen
2007-02-28 16:50 ` Johannes Berg
2007-02-28 16:54 ` Luis R. Rodriguez
2007-02-28 16:55 ` Jouni Malinen
2007-02-28 18:35 ` John W. Linville
2007-02-28 19:21 ` Jouni Malinen
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=510326.55988.qm@web50211.mail.yahoo.com \
--to=alex14641@yahoo.com \
--cc=bcm43xx-dev@lists.berlios.de \
--cc=larry.finger@lwfinger.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 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.