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>
This commit is contained in:
@@ -255,7 +255,7 @@ static struct wireless_dev *
|
||||
wil_cfg80211_add_iface(struct wiphy *wiphy, const char *name,
|
||||
unsigned char name_assign_type,
|
||||
enum nl80211_iftype type,
|
||||
u32 *flags, struct vif_params *params)
|
||||
struct vif_params *params)
|
||||
{
|
||||
struct wil6210_priv *wil = wiphy_to_wil(wiphy);
|
||||
struct net_device *ndev = wil_to_ndev(wil);
|
||||
@@ -306,7 +306,7 @@ static int wil_cfg80211_del_iface(struct wiphy *wiphy,
|
||||
|
||||
static int wil_cfg80211_change_iface(struct wiphy *wiphy,
|
||||
struct net_device *ndev,
|
||||
enum nl80211_iftype type, u32 *flags,
|
||||
enum nl80211_iftype type,
|
||||
struct vif_params *params)
|
||||
{
|
||||
struct wil6210_priv *wil = wiphy_to_wil(wiphy);
|
||||
@@ -333,11 +333,8 @@ static int wil_cfg80211_change_iface(struct wiphy *wiphy,
|
||||
case NL80211_IFTYPE_P2P_GO:
|
||||
break;
|
||||
case NL80211_IFTYPE_MONITOR:
|
||||
if (flags)
|
||||
wil->monitor_flags = *flags;
|
||||
else
|
||||
wil->monitor_flags = 0;
|
||||
|
||||
if (params->flags)
|
||||
wil->monitor_flags = params->flags;
|
||||
break;
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
|
Reference in New Issue
Block a user