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>
This commit is contained in:
committed by
John W. Linville
parent
e5a8a896f5
commit
e36d56b648
@@ -74,19 +74,14 @@ static int ieee80211_del_iface(struct wiphy *wiphy, int ifindex)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ieee80211_change_iface(struct wiphy *wiphy, int ifindex,
|
||||
static int ieee80211_change_iface(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
enum nl80211_iftype type, u32 *flags,
|
||||
struct vif_params *params)
|
||||
{
|
||||
struct net_device *dev;
|
||||
struct ieee80211_sub_if_data *sdata;
|
||||
int ret;
|
||||
|
||||
/* we're under RTNL */
|
||||
dev = __dev_get_by_index(&init_net, ifindex);
|
||||
if (!dev)
|
||||
return -ENODEV;
|
||||
|
||||
if (!nl80211_type_check(type))
|
||||
return -EINVAL;
|
||||
|
||||
|
Reference in New Issue
Block a user