diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-06-09 15:04:43 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 14:57:38 -0400 |
commit | e36d56b64808aec54b68b4e9976180c1da0933b2 (patch) | |
tree | 93f0e696d077b58d1064f3321d52b4611addf104 /drivers/net/wireless/rndis_wlan.c | |
parent | e5a8a896f5180f2950695d2d0b79db348d200ca4 (diff) |
cfg80211: pass netdev to change_virtual_intf
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rndis_wlan.c')
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 3bec3dbd3450..e8b0793b030a 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -420,7 +420,8 @@ struct rndis_wlan_private { | |||
420 | /* | 420 | /* |
421 | * cfg80211 ops | 421 | * cfg80211 ops |
422 | */ | 422 | */ |
423 | static int rndis_change_virtual_intf(struct wiphy *wiphy, int ifindex, | 423 | static int rndis_change_virtual_intf(struct wiphy *wiphy, |
424 | struct net_device *dev, | ||
424 | enum nl80211_iftype type, u32 *flags, | 425 | enum nl80211_iftype type, u32 *flags, |
425 | struct vif_params *params); | 426 | struct vif_params *params); |
426 | 427 | ||
@@ -1222,20 +1223,14 @@ static void set_multicast_list(struct usbnet *usbdev) | |||
1222 | /* | 1223 | /* |
1223 | * cfg80211 ops | 1224 | * cfg80211 ops |
1224 | */ | 1225 | */ |
1225 | static int rndis_change_virtual_intf(struct wiphy *wiphy, int ifindex, | 1226 | static int rndis_change_virtual_intf(struct wiphy *wiphy, |
1227 | struct net_device *dev, | ||
1226 | enum nl80211_iftype type, u32 *flags, | 1228 | enum nl80211_iftype type, u32 *flags, |
1227 | struct vif_params *params) | 1229 | struct vif_params *params) |
1228 | { | 1230 | { |
1229 | struct net_device *dev; | 1231 | struct usbnet *usbdev = netdev_priv(dev); |
1230 | struct usbnet *usbdev; | ||
1231 | int mode; | 1232 | int mode; |
1232 | 1233 | ||
1233 | /* we're under RTNL */ | ||
1234 | dev = __dev_get_by_index(&init_net, ifindex); | ||
1235 | if (!dev) | ||
1236 | return -ENODEV; | ||
1237 | usbdev = netdev_priv(dev); | ||
1238 | |||
1239 | switch (type) { | 1234 | switch (type) { |
1240 | case NL80211_IFTYPE_ADHOC: | 1235 | case NL80211_IFTYPE_ADHOC: |
1241 | mode = NDIS_80211_INFRA_ADHOC; | 1236 | mode = NDIS_80211_INFRA_ADHOC; |