Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cfg80211: move add/change interface monitor flags into params

Instead passing both flags, which can be NULL, and vif_params,
which are never NULL, move the flags into the vif_params and
use BIT(0), which is invalid from userspace, to indicate that
the flags were changed.

While updating all drivers, fix a small bug in wil6210 where
it was setting the flags to 0 instead of leaving them unchanged.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+73 -80
+1 -2
drivers/net/wireless/ath/ath6kl/cfg80211.c
··· 1505 1505 const char *name, 1506 1506 unsigned char name_assign_type, 1507 1507 enum nl80211_iftype type, 1508 - u32 *flags, 1509 1508 struct vif_params *params) 1510 1509 { 1511 1510 struct ath6kl *ar = wiphy_priv(wiphy); ··· 1551 1552 1552 1553 static int ath6kl_cfg80211_change_iface(struct wiphy *wiphy, 1553 1554 struct net_device *ndev, 1554 - enum nl80211_iftype type, u32 *flags, 1555 + enum nl80211_iftype type, 1555 1556 struct vif_params *params) 1556 1557 { 1557 1558 struct ath6kl_vif *vif = netdev_priv(ndev);
+4 -7
drivers/net/wireless/ath/wil6210/cfg80211.c
··· 255 255 wil_cfg80211_add_iface(struct wiphy *wiphy, const char *name, 256 256 unsigned char name_assign_type, 257 257 enum nl80211_iftype type, 258 - u32 *flags, struct vif_params *params) 258 + struct vif_params *params) 259 259 { 260 260 struct wil6210_priv *wil = wiphy_to_wil(wiphy); 261 261 struct net_device *ndev = wil_to_ndev(wil); ··· 306 306 307 307 static int wil_cfg80211_change_iface(struct wiphy *wiphy, 308 308 struct net_device *ndev, 309 - enum nl80211_iftype type, u32 *flags, 309 + enum nl80211_iftype type, 310 310 struct vif_params *params) 311 311 { 312 312 struct wil6210_priv *wil = wiphy_to_wil(wiphy); ··· 333 333 case NL80211_IFTYPE_P2P_GO: 334 334 break; 335 335 case NL80211_IFTYPE_MONITOR: 336 - if (flags) 337 - wil->monitor_flags = *flags; 338 - else 339 - wil->monitor_flags = 0; 340 - 336 + if (params->flags) 337 + wil->monitor_flags = params->flags; 341 338 break; 342 339 default: 343 340 return -EOPNOTSUPP;
+5 -7
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
··· 575 575 * 576 576 * @wiphy: wiphy device of new interface. 577 577 * @name: name of the new interface. 578 - * @flags: not used. 579 578 * @params: contains mac address for AP device. 580 579 */ 581 580 static 582 581 struct wireless_dev *brcmf_ap_add_vif(struct wiphy *wiphy, const char *name, 583 - u32 *flags, struct vif_params *params) 582 + struct vif_params *params) 584 583 { 585 584 struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); 586 585 struct brcmf_if *ifp = netdev_priv(cfg_to_ndev(cfg)); ··· 652 653 const char *name, 653 654 unsigned char name_assign_type, 654 655 enum nl80211_iftype type, 655 - u32 *flags, 656 656 struct vif_params *params) 657 657 { 658 658 struct wireless_dev *wdev; ··· 672 674 case NL80211_IFTYPE_MESH_POINT: 673 675 return ERR_PTR(-EOPNOTSUPP); 674 676 case NL80211_IFTYPE_AP: 675 - wdev = brcmf_ap_add_vif(wiphy, name, flags, params); 677 + wdev = brcmf_ap_add_vif(wiphy, name, params); 676 678 break; 677 679 case NL80211_IFTYPE_P2P_CLIENT: 678 680 case NL80211_IFTYPE_P2P_GO: 679 681 case NL80211_IFTYPE_P2P_DEVICE: 680 - wdev = brcmf_p2p_add_vif(wiphy, name, name_assign_type, type, flags, params); 682 + wdev = brcmf_p2p_add_vif(wiphy, name, name_assign_type, type, params); 681 683 break; 682 684 case NL80211_IFTYPE_UNSPECIFIED: 683 685 default: ··· 856 858 857 859 static s32 858 860 brcmf_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev, 859 - enum nl80211_iftype type, u32 *flags, 861 + enum nl80211_iftype type, 860 862 struct vif_params *params) 861 863 { 862 864 struct brcmf_cfg80211_info *cfg = wiphy_priv(wiphy); ··· 6547 6549 if (err) 6548 6550 goto default_conf_out; 6549 6551 err = brcmf_cfg80211_change_iface(wdev->wiphy, ndev, wdev->iftype, 6550 - NULL, NULL); 6552 + NULL); 6551 6553 if (err) 6552 6554 goto default_conf_out; 6553 6555
+1 -2
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
··· 2141 2141 * @name: name of the new interface. 2142 2142 * @name_assign_type: origin of the interface name 2143 2143 * @type: nl80211 interface type. 2144 - * @flags: not used. 2145 2144 * @params: contains mac address for P2P device. 2146 2145 */ 2147 2146 struct wireless_dev *brcmf_p2p_add_vif(struct wiphy *wiphy, const char *name, 2148 2147 unsigned char name_assign_type, 2149 - enum nl80211_iftype type, u32 *flags, 2148 + enum nl80211_iftype type, 2150 2149 struct vif_params *params) 2151 2150 { 2152 2151 struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
+1 -1
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h
··· 150 150 void brcmf_p2p_detach(struct brcmf_p2p_info *p2p); 151 151 struct wireless_dev *brcmf_p2p_add_vif(struct wiphy *wiphy, const char *name, 152 152 unsigned char name_assign_type, 153 - enum nl80211_iftype type, u32 *flags, 153 + enum nl80211_iftype type, 154 154 struct vif_params *params); 155 155 int brcmf_p2p_del_vif(struct wiphy *wiphy, struct wireless_dev *wdev); 156 156 int brcmf_p2p_ifchange(struct brcmf_cfg80211_info *cfg,
+1 -1
drivers/net/wireless/intersil/orinoco/cfg.c
··· 97 97 } 98 98 99 99 static int orinoco_change_vif(struct wiphy *wiphy, struct net_device *dev, 100 - enum nl80211_iftype type, u32 *flags, 100 + enum nl80211_iftype type, 101 101 struct vif_params *params) 102 102 { 103 103 struct orinoco_private *priv = wiphy_priv(wiphy);
+1 -1
drivers/net/wireless/marvell/libertas/cfg.c
··· 1657 1657 */ 1658 1658 1659 1659 static int lbs_change_intf(struct wiphy *wiphy, struct net_device *dev, 1660 - enum nl80211_iftype type, u32 *flags, 1660 + enum nl80211_iftype type, 1661 1661 struct vif_params *params) 1662 1662 { 1663 1663 struct lbs_private *priv = wiphy_priv(wiphy);
+12 -15
drivers/net/wireless/marvell/mwifiex/cfg80211.c
··· 916 916 static int 917 917 mwifiex_change_vif_to_p2p(struct net_device *dev, 918 918 enum nl80211_iftype curr_iftype, 919 - enum nl80211_iftype type, u32 *flags, 919 + enum nl80211_iftype type, 920 920 struct vif_params *params) 921 921 { 922 922 struct mwifiex_private *priv; ··· 988 988 static int 989 989 mwifiex_change_vif_to_sta_adhoc(struct net_device *dev, 990 990 enum nl80211_iftype curr_iftype, 991 - enum nl80211_iftype type, u32 *flags, 991 + enum nl80211_iftype type, 992 992 struct vif_params *params) 993 993 { 994 994 struct mwifiex_private *priv; ··· 1047 1047 static int 1048 1048 mwifiex_change_vif_to_ap(struct net_device *dev, 1049 1049 enum nl80211_iftype curr_iftype, 1050 - enum nl80211_iftype type, u32 *flags, 1050 + enum nl80211_iftype type, 1051 1051 struct vif_params *params) 1052 1052 { 1053 1053 struct mwifiex_private *priv; ··· 1103 1103 static int 1104 1104 mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, 1105 1105 struct net_device *dev, 1106 - enum nl80211_iftype type, u32 *flags, 1106 + enum nl80211_iftype type, 1107 1107 struct vif_params *params) 1108 1108 { 1109 1109 struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); ··· 1124 1124 case NL80211_IFTYPE_P2P_CLIENT: 1125 1125 case NL80211_IFTYPE_P2P_GO: 1126 1126 return mwifiex_change_vif_to_p2p(dev, curr_iftype, 1127 - type, flags, params); 1127 + type, params); 1128 1128 case NL80211_IFTYPE_AP: 1129 1129 return mwifiex_change_vif_to_ap(dev, curr_iftype, type, 1130 - flags, params); 1130 + params); 1131 1131 case NL80211_IFTYPE_UNSPECIFIED: 1132 1132 mwifiex_dbg(priv->adapter, INFO, 1133 1133 "%s: kept type as IBSS\n", dev->name); ··· 1154 1154 case NL80211_IFTYPE_P2P_CLIENT: 1155 1155 case NL80211_IFTYPE_P2P_GO: 1156 1156 return mwifiex_change_vif_to_p2p(dev, curr_iftype, 1157 - type, flags, params); 1157 + type, params); 1158 1158 case NL80211_IFTYPE_AP: 1159 1159 return mwifiex_change_vif_to_ap(dev, curr_iftype, type, 1160 - flags, params); 1160 + params); 1161 1161 case NL80211_IFTYPE_UNSPECIFIED: 1162 1162 mwifiex_dbg(priv->adapter, INFO, 1163 1163 "%s: kept type as STA\n", dev->name); ··· 1175 1175 case NL80211_IFTYPE_ADHOC: 1176 1176 case NL80211_IFTYPE_STATION: 1177 1177 return mwifiex_change_vif_to_sta_adhoc(dev, curr_iftype, 1178 - type, flags, 1179 - params); 1178 + type, params); 1180 1179 break; 1181 1180 case NL80211_IFTYPE_P2P_CLIENT: 1182 1181 case NL80211_IFTYPE_P2P_GO: 1183 1182 return mwifiex_change_vif_to_p2p(dev, curr_iftype, 1184 - type, flags, params); 1183 + type, params); 1185 1184 case NL80211_IFTYPE_UNSPECIFIED: 1186 1185 mwifiex_dbg(priv->adapter, INFO, 1187 1186 "%s: kept type as AP\n", dev->name); ··· 1213 1214 if (mwifiex_cfg80211_deinit_p2p(priv)) 1214 1215 return -EFAULT; 1215 1216 return mwifiex_change_vif_to_sta_adhoc(dev, curr_iftype, 1216 - type, flags, 1217 - params); 1217 + type, params); 1218 1218 break; 1219 1219 case NL80211_IFTYPE_AP: 1220 1220 if (mwifiex_cfg80211_deinit_p2p(priv)) 1221 1221 return -EFAULT; 1222 1222 return mwifiex_change_vif_to_ap(dev, curr_iftype, type, 1223 - flags, params); 1223 + params); 1224 1224 case NL80211_IFTYPE_UNSPECIFIED: 1225 1225 mwifiex_dbg(priv->adapter, INFO, 1226 1226 "%s: kept type as P2P\n", dev->name); ··· 2820 2822 const char *name, 2821 2823 unsigned char name_assign_type, 2822 2824 enum nl80211_iftype type, 2823 - u32 *flags, 2824 2825 struct vif_params *params) 2825 2826 { 2826 2827 struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy);
+3 -4
drivers/net/wireless/marvell/mwifiex/main.c
··· 593 593 rtnl_lock(); 594 594 /* Create station interface by default */ 595 595 wdev = mwifiex_add_virtual_intf(adapter->wiphy, "mlan%d", NET_NAME_ENUM, 596 - NL80211_IFTYPE_STATION, NULL, NULL); 596 + NL80211_IFTYPE_STATION, NULL); 597 597 if (IS_ERR(wdev)) { 598 598 mwifiex_dbg(adapter, ERROR, 599 599 "cannot create default STA interface\n"); ··· 603 603 604 604 if (driver_mode & MWIFIEX_DRIVER_MODE_UAP) { 605 605 wdev = mwifiex_add_virtual_intf(adapter->wiphy, "uap%d", NET_NAME_ENUM, 606 - NL80211_IFTYPE_AP, NULL, NULL); 606 + NL80211_IFTYPE_AP, NULL); 607 607 if (IS_ERR(wdev)) { 608 608 mwifiex_dbg(adapter, ERROR, 609 609 "cannot create AP interface\n"); ··· 614 614 615 615 if (driver_mode & MWIFIEX_DRIVER_MODE_P2P) { 616 616 wdev = mwifiex_add_virtual_intf(adapter->wiphy, "p2p%d", NET_NAME_ENUM, 617 - NL80211_IFTYPE_P2P_CLIENT, NULL, 618 - NULL); 617 + NL80211_IFTYPE_P2P_CLIENT, NULL); 619 618 if (IS_ERR(wdev)) { 620 619 mwifiex_dbg(adapter, ERROR, 621 620 "cannot create p2p client interface\n");
-1
drivers/net/wireless/marvell/mwifiex/main.h
··· 1529 1529 const char *name, 1530 1530 unsigned char name_assign_type, 1531 1531 enum nl80211_iftype type, 1532 - u32 *flags, 1533 1532 struct vif_params *params); 1534 1533 int mwifiex_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev); 1535 1534
+2 -2
drivers/net/wireless/rndis_wlan.c
··· 479 479 */ 480 480 static int rndis_change_virtual_intf(struct wiphy *wiphy, 481 481 struct net_device *dev, 482 - enum nl80211_iftype type, u32 *flags, 482 + enum nl80211_iftype type, 483 483 struct vif_params *params); 484 484 485 485 static int rndis_scan(struct wiphy *wiphy, ··· 1857 1857 */ 1858 1858 static int rndis_change_virtual_intf(struct wiphy *wiphy, 1859 1859 struct net_device *dev, 1860 - enum nl80211_iftype type, u32 *flags, 1860 + enum nl80211_iftype type, 1861 1861 struct vif_params *params) 1862 1862 { 1863 1863 struct rndis_wlan_private *priv = wiphy_priv(wiphy);
+1 -2
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
··· 1837 1837 } 1838 1838 1839 1839 static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, 1840 - enum nl80211_iftype type, u32 *flags, struct vif_params *params) 1840 + enum nl80211_iftype type, struct vif_params *params) 1841 1841 { 1842 1842 struct wilc_priv *priv; 1843 1843 struct wilc_vif *vif; ··· 2099 2099 const char *name, 2100 2100 unsigned char name_assign_type, 2101 2101 enum nl80211_iftype type, 2102 - u32 *flags, 2103 2102 struct vif_params *params) 2104 2103 { 2105 2104 struct wilc_vif *vif;
+1 -1
drivers/staging/wlan-ng/cfg80211.c
··· 100 100 /* The interface functions, called by the cfg80211 layer */ 101 101 static int prism2_change_virtual_intf(struct wiphy *wiphy, 102 102 struct net_device *dev, 103 - enum nl80211_iftype type, u32 *flags, 103 + enum nl80211_iftype type, 104 104 struct vif_params *params) 105 105 { 106 106 struct wlandevice *wlandev = dev->ml_priv;
+6 -2
include/net/cfg80211.h
··· 363 363 364 364 /** 365 365 * struct vif_params - describes virtual interface parameters 366 + * @flags: monitor interface flags, unchanged if 0, otherwise 367 + * %MONITOR_FLAG_CHANGED will be set 366 368 * @use_4addr: use 4-address frames 367 369 * @macaddr: address to use for this virtual interface. 368 370 * If this parameter is set to zero address the driver may ··· 378 376 * MU-MIMO packets going to the specified station; %NULL if not changed 379 377 */ 380 378 struct vif_params { 379 + u32 flags; 381 380 int use_4addr; 382 381 u8 macaddr[ETH_ALEN]; 383 382 const u8 *vht_mumimo_groups; ··· 1217 1214 * Monitor interface configuration flags. Note that these must be the bits 1218 1215 * according to the nl80211 flags. 1219 1216 * 1217 + * @MONITOR_FLAG_CHANGED: set if the flags were changed 1220 1218 * @MONITOR_FLAG_FCSFAIL: pass frames with bad FCS 1221 1219 * @MONITOR_FLAG_PLCPFAIL: pass frames with bad PLCP 1222 1220 * @MONITOR_FLAG_CONTROL: pass control frames ··· 1226 1222 * @MONITOR_FLAG_ACTIVE: active monitor, ACKs frames on its MAC address 1227 1223 */ 1228 1224 enum monitor_flags { 1225 + MONITOR_FLAG_CHANGED = 1<<__NL80211_MNTR_FLAG_INVALID, 1229 1226 MONITOR_FLAG_FCSFAIL = 1<<NL80211_MNTR_FLAG_FCSFAIL, 1230 1227 MONITOR_FLAG_PLCPFAIL = 1<<NL80211_MNTR_FLAG_PLCPFAIL, 1231 1228 MONITOR_FLAG_CONTROL = 1<<NL80211_MNTR_FLAG_CONTROL, ··· 2874 2869 const char *name, 2875 2870 unsigned char name_assign_type, 2876 2871 enum nl80211_iftype type, 2877 - u32 *flags, 2878 2872 struct vif_params *params); 2879 2873 int (*del_virtual_intf)(struct wiphy *wiphy, 2880 2874 struct wireless_dev *wdev); 2881 2875 int (*change_virtual_intf)(struct wiphy *wiphy, 2882 2876 struct net_device *dev, 2883 - enum nl80211_iftype type, u32 *flags, 2877 + enum nl80211_iftype type, 2884 2878 struct vif_params *params); 2885 2879 2886 2880 int (*add_key)(struct wiphy *wiphy, struct net_device *netdev,
+7 -8
net/mac80211/cfg.c
··· 69 69 const char *name, 70 70 unsigned char name_assign_type, 71 71 enum nl80211_iftype type, 72 - u32 *flags, 73 72 struct vif_params *params) 74 73 { 75 74 struct ieee80211_local *local = wiphy_priv(wiphy); ··· 89 90 return NULL; 90 91 } 91 92 92 - if (flags) 93 - sdata->u.mntr.flags = *flags; 93 + sdata->u.mntr.flags = params->flags; 94 94 } 95 95 96 96 return wdev; ··· 104 106 105 107 static int ieee80211_change_iface(struct wiphy *wiphy, 106 108 struct net_device *dev, 107 - enum nl80211_iftype type, u32 *flags, 109 + enum nl80211_iftype type, 108 110 struct vif_params *params) 109 111 { 110 112 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); ··· 131 133 if (err) 132 134 return err; 133 135 134 - if (!flags) 136 + if (!params->flags) 135 137 return 0; 136 138 137 139 if (ieee80211_sdata_running(sdata)) { ··· 147 149 * cooked_mntrs, monitor and all fif_* counters 148 150 * reconfigure hardware 149 151 */ 150 - if ((*flags & mask) != (sdata->u.mntr.flags & mask)) 152 + if ((params->flags & mask) != 153 + (sdata->u.mntr.flags & mask)) 151 154 return -EBUSY; 152 155 153 156 ieee80211_adjust_monitor_flags(sdata, -1); 154 - sdata->u.mntr.flags = *flags; 157 + sdata->u.mntr.flags = params->flags; 155 158 ieee80211_adjust_monitor_flags(sdata, 1); 156 159 157 160 ieee80211_configure_filter(local); ··· 162 163 * and ieee80211_do_open take care of "everything" 163 164 * mentioned in the comment above. 164 165 */ 165 - sdata->u.mntr.flags = *flags; 166 + sdata->u.mntr.flags = params->flags; 166 167 } 167 168 } 168 169
+1 -1
net/wireless/core.h
··· 430 430 void cfg80211_upload_connect_keys(struct wireless_dev *wdev); 431 431 int cfg80211_change_iface(struct cfg80211_registered_device *rdev, 432 432 struct net_device *dev, enum nl80211_iftype ntype, 433 - u32 *flags, struct vif_params *params); 433 + struct vif_params *params); 434 434 void cfg80211_process_rdev_events(struct cfg80211_registered_device *rdev); 435 435 void cfg80211_process_wdev_events(struct wireless_dev *wdev); 436 436
+19 -15
net/wireless/nl80211.c
··· 2726 2726 if (flags[flag]) 2727 2727 *mntrflags |= (1<<flag); 2728 2728 2729 + *mntrflags |= MONITOR_FLAG_CHANGED; 2730 + 2729 2731 return 0; 2730 2732 } 2731 2733 ··· 2764 2762 int err; 2765 2763 enum nl80211_iftype otype, ntype; 2766 2764 struct net_device *dev = info->user_ptr[1]; 2767 - u32 _flags, *flags = NULL; 2768 2765 bool change = false; 2769 2766 2770 2767 memset(&params, 0, sizeof(params)); ··· 2810 2809 if (ntype != NL80211_IFTYPE_MONITOR) 2811 2810 return -EINVAL; 2812 2811 err = parse_monitor_flags(info->attrs[NL80211_ATTR_MNTR_FLAGS], 2813 - &_flags); 2812 + &params.flags); 2814 2813 if (err) 2815 2814 return err; 2816 2815 2817 - flags = &_flags; 2818 2816 change = true; 2819 2817 } 2818 + 2819 + if (params.flags & MONITOR_FLAG_ACTIVE && 2820 + !(rdev->wiphy.features & NL80211_FEATURE_ACTIVE_MONITOR)) 2821 + return -EOPNOTSUPP; 2820 2822 2821 2823 if (info->attrs[NL80211_ATTR_MU_MIMO_GROUP_DATA]) { 2822 2824 const u8 *mumimo_groups; ··· 2851 2847 change = true; 2852 2848 } 2853 2849 2854 - if (flags && (*flags & MONITOR_FLAG_ACTIVE) && 2855 - !(rdev->wiphy.features & NL80211_FEATURE_ACTIVE_MONITOR)) 2856 - return -EOPNOTSUPP; 2857 - 2858 2850 if (change) 2859 - err = cfg80211_change_iface(rdev, dev, ntype, flags, &params); 2851 + err = cfg80211_change_iface(rdev, dev, ntype, &params); 2860 2852 else 2861 2853 err = 0; 2862 2854 ··· 2870 2870 struct sk_buff *msg; 2871 2871 int err; 2872 2872 enum nl80211_iftype type = NL80211_IFTYPE_UNSPECIFIED; 2873 - u32 flags; 2874 2873 2875 2874 /* to avoid failing a new interface creation due to pending removal */ 2876 2875 cfg80211_destroy_ifaces(rdev); ··· 2905 2906 return err; 2906 2907 } 2907 2908 2908 - err = parse_monitor_flags(type == NL80211_IFTYPE_MONITOR ? 2909 - info->attrs[NL80211_ATTR_MNTR_FLAGS] : NULL, 2910 - &flags); 2909 + if (info->attrs[NL80211_ATTR_MNTR_FLAGS]) { 2910 + if (type != NL80211_IFTYPE_MONITOR) 2911 + return -EINVAL; 2911 2912 2912 - if (!err && (flags & MONITOR_FLAG_ACTIVE) && 2913 + err = parse_monitor_flags(info->attrs[NL80211_ATTR_MNTR_FLAGS], 2914 + &params.flags); 2915 + if (err) 2916 + return err; 2917 + } 2918 + 2919 + if (params.flags & MONITOR_FLAG_ACTIVE && 2913 2920 !(rdev->wiphy.features & NL80211_FEATURE_ACTIVE_MONITOR)) 2914 2921 return -EOPNOTSUPP; 2915 2922 ··· 2925 2920 2926 2921 wdev = rdev_add_virtual_intf(rdev, 2927 2922 nla_data(info->attrs[NL80211_ATTR_IFNAME]), 2928 - NET_NAME_USER, type, err ? NULL : &flags, 2929 - &params); 2923 + NET_NAME_USER, type, &params); 2930 2924 if (WARN_ON(!wdev)) { 2931 2925 nlmsg_free(msg); 2932 2926 return -EPROTO;
+4 -5
net/wireless/rdev-ops.h
··· 36 36 static inline struct wireless_dev 37 37 *rdev_add_virtual_intf(struct cfg80211_registered_device *rdev, char *name, 38 38 unsigned char name_assign_type, 39 - enum nl80211_iftype type, u32 *flags, 39 + enum nl80211_iftype type, 40 40 struct vif_params *params) 41 41 { 42 42 struct wireless_dev *ret; 43 43 trace_rdev_add_virtual_intf(&rdev->wiphy, name, type); 44 44 ret = rdev->ops->add_virtual_intf(&rdev->wiphy, name, name_assign_type, 45 - type, flags, params); 45 + type, params); 46 46 trace_rdev_return_wdev(&rdev->wiphy, ret); 47 47 return ret; 48 48 } ··· 61 61 static inline int 62 62 rdev_change_virtual_intf(struct cfg80211_registered_device *rdev, 63 63 struct net_device *dev, enum nl80211_iftype type, 64 - u32 *flags, struct vif_params *params) 64 + struct vif_params *params) 65 65 { 66 66 int ret; 67 67 trace_rdev_change_virtual_intf(&rdev->wiphy, dev, type); 68 - ret = rdev->ops->change_virtual_intf(&rdev->wiphy, dev, type, flags, 69 - params); 68 + ret = rdev->ops->change_virtual_intf(&rdev->wiphy, dev, type, params); 70 69 trace_rdev_return_int(&rdev->wiphy, ret); 71 70 return ret; 72 71 }
+2 -2
net/wireless/util.c
··· 985 985 986 986 int cfg80211_change_iface(struct cfg80211_registered_device *rdev, 987 987 struct net_device *dev, enum nl80211_iftype ntype, 988 - u32 *flags, struct vif_params *params) 988 + struct vif_params *params) 989 989 { 990 990 int err; 991 991 enum nl80211_iftype otype = dev->ieee80211_ptr->iftype; ··· 1043 1043 cfg80211_process_rdev_events(rdev); 1044 1044 } 1045 1045 1046 - err = rdev_change_virtual_intf(rdev, dev, ntype, flags, params); 1046 + err = rdev_change_virtual_intf(rdev, dev, ntype, params); 1047 1047 1048 1048 WARN_ON(!err && dev->ieee80211_ptr->iftype != ntype); 1049 1049
+1 -1
net/wireless/wext-compat.c
··· 62 62 63 63 memset(&vifparams, 0, sizeof(vifparams)); 64 64 65 - return cfg80211_change_iface(rdev, dev, type, NULL, &vifparams); 65 + return cfg80211_change_iface(rdev, dev, type, &vifparams); 66 66 } 67 67 EXPORT_WEXT_HANDLER(cfg80211_wext_siwmode); 68 68