diff options
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 1a7a710fe9bf..d543cf152100 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -2079,6 +2079,13 @@ static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info) | |||
2079 | !(rdev->wiphy.interface_modes & (1 << type))) | 2079 | !(rdev->wiphy.interface_modes & (1 << type))) |
2080 | return -EOPNOTSUPP; | 2080 | return -EOPNOTSUPP; |
2081 | 2081 | ||
2082 | if (type == NL80211_IFTYPE_P2P_DEVICE && info->attrs[NL80211_ATTR_MAC]) { | ||
2083 | nla_memcpy(params.macaddr, info->attrs[NL80211_ATTR_MAC], | ||
2084 | ETH_ALEN); | ||
2085 | if (!is_valid_ether_addr(params.macaddr)) | ||
2086 | return -EADDRNOTAVAIL; | ||
2087 | } | ||
2088 | |||
2082 | if (info->attrs[NL80211_ATTR_4ADDR]) { | 2089 | if (info->attrs[NL80211_ATTR_4ADDR]) { |
2083 | params.use_4addr = !!nla_get_u8(info->attrs[NL80211_ATTR_4ADDR]); | 2090 | params.use_4addr = !!nla_get_u8(info->attrs[NL80211_ATTR_4ADDR]); |
2084 | err = nl80211_valid_4addr(rdev, NULL, params.use_4addr, type); | 2091 | err = nl80211_valid_4addr(rdev, NULL, params.use_4addr, type); |