From: Dave <kilroyd@googlemail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: John Linville <linville@tuxdriver.com>,
linux-wireless <linux-wireless@vger.kernel.org>,
Samuel Ortiz <samuel@sortiz.org>
Subject: Re: [PATCH] cfg80211: pass netdev to change_virtual_intf
Date: Thu, 04 Jun 2009 18:19:51 +0100 [thread overview]
Message-ID: <4A280237.2040807@gmail.com> (raw)
In-Reply-To: <1244574283.18481.29.camel@johannes.local>
Johannes Berg wrote:
> If there was a reason I'm passing the ifidx I cannot
> remember it any more and don't see one now, so let's
> just pass the pointer itself.
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> ---
> drivers/net/wireless/iwmc3200wifi/cfg80211.c | 9 ++-------
> include/net/cfg80211.h | 3 ++-
> net/mac80211/cfg.c | 9 ++-------
> net/wireless/nl80211.c | 12 +++++-------
> net/wireless/wext-compat.c | 2 +-
> 5 files changed, 12 insertions(+), 23 deletions(-)
rndis_wlan.c will need an update for this as well
Dave.
---
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index c254fdf..230962e 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -420,7 +420,8 @@ struct rndis_wext_private {
/*
* cfg80211 ops
*/
-static int rndis_change_virtual_intf(struct wiphy *wiphy, int ifindex,
+static int rndis_change_virtual_intf(struct wiphy *wiphy,
+ struct net_device *dev,
enum nl80211_iftype type, u32 *flags,
struct vif_params *params);
@@ -1222,20 +1223,14 @@ static void set_multicast_list(struct usbnet *usbdev)
/*
* cfg80211 ops
*/
-static int rndis_change_virtual_intf(struct wiphy *wiphy, int ifindex,
+static int rndis_change_virtual_intf(struct wiphy *wiphy,
+ struct net_device *dev,
enum nl80211_iftype type, u32 *flags,
struct vif_params *params)
{
- struct net_device *dev;
- struct usbnet *usbdev;
+ struct usbnet *usbdev = netdev_priv(dev);
int mode;
- /* we're under RTNL */
- dev = __dev_get_by_index(&init_net, ifindex);
- if (!dev)
- return -ENODEV;
- usbdev = netdev_priv(dev);
-
switch (type) {
case NL80211_IFTYPE_ADHOC:
mode = ndis_80211_infra_adhoc;
next prev parent reply other threads:[~2009-06-12 17:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-09 19:04 [PATCH] cfg80211: pass netdev to change_virtual_intf Johannes Berg
2009-06-04 17:19 ` Dave [this message]
2009-06-12 20:50 ` Johannes Berg
2009-06-09 19:11 ` Samuel Ortiz
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=4A280237.2040807@gmail.com \
--to=kilroyd@googlemail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=samuel@sortiz.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.