Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351946
b: refs/heads/master
c: 1c18f14
h: refs/heads/master
v: v3
  • Loading branch information
Arend van Spriel authored and Johannes Berg committed Jan 16, 2013
1 parent 87992f3 commit 7fac9d8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3b1c5a5307fb5277f395efdcf330c064d79df07d
refs/heads/master: 1c18f1452a772dfe884ed25677bddb3ecaf9c43a
4 changes: 4 additions & 0 deletions trunk/include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,13 @@ struct ieee80211_supported_band {
/**
* struct vif_params - describes virtual interface parameters
* @use_4addr: use 4-address frames
* @macaddr: address to use for this virtual interface. This will only
* be used for non-netdevice interfaces. If this parameter is set
* to zero address the driver may determine the address as needed.
*/
struct vif_params {
int use_4addr;
u8 macaddr[ETH_ALEN];
};

/**
Expand Down
7 changes: 7 additions & 0 deletions trunk/net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -2079,6 +2079,13 @@ static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info)
!(rdev->wiphy.interface_modes & (1 << type)))
return -EOPNOTSUPP;

if (type == NL80211_IFTYPE_P2P_DEVICE && info->attrs[NL80211_ATTR_MAC]) {
nla_memcpy(params.macaddr, info->attrs[NL80211_ATTR_MAC],
ETH_ALEN);
if (!is_valid_ether_addr(params.macaddr))
return -EADDRNOTAVAIL;
}

if (info->attrs[NL80211_ATTR_4ADDR]) {
params.use_4addr = !!nla_get_u8(info->attrs[NL80211_ATTR_4ADDR]);
err = nl80211_valid_4addr(rdev, NULL, params.use_4addr, type);
Expand Down

0 comments on commit 7fac9d8

Please sign in to comment.