Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277780
b: refs/heads/master
c: 665c93a
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Nov 9, 2011
1 parent ece4fc2 commit bcb756a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6096de7fd4eeda305e114e7d74e6f47404590425
refs/heads/master: 665c93a93e35cafcd8c84073824f1ef1b19f0a7d
21 changes: 20 additions & 1 deletion trunk/net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,14 +594,33 @@ static int ieee80211_add_beacon(struct wiphy *wiphy, struct net_device *dev,
{
struct ieee80211_sub_if_data *sdata;
struct beacon_data *old;
struct ieee80211_sub_if_data *vlan;
int ret;

sdata = IEEE80211_DEV_TO_SUB_IF(dev);

old = rtnl_dereference(sdata->u.ap.beacon);
if (old)
return -EALREADY;

return ieee80211_config_beacon(sdata, params);
ret = ieee80211_config_beacon(sdata, params);
if (ret)
return ret;

/*
* Apply control port protocol, this allows us to
* not encrypt dynamic WEP control frames.
*/
sdata->control_port_protocol = params->crypto.control_port_ethertype;
sdata->control_port_no_encrypt = params->crypto.control_port_no_encrypt;
list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) {
vlan->control_port_protocol =
params->crypto.control_port_ethertype;
vlan->control_port_no_encrypt =
params->crypto.control_port_no_encrypt;
}

return 0;
}

static int ieee80211_set_beacon(struct wiphy *wiphy, struct net_device *dev,
Expand Down
13 changes: 12 additions & 1 deletion trunk/net/mac80211/iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,22 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up)
if (!is_valid_ether_addr(sdata->u.wds.remote_addr))
return -ENOLINK;
break;
case NL80211_IFTYPE_AP_VLAN:
case NL80211_IFTYPE_AP_VLAN: {
struct ieee80211_sub_if_data *master;

if (!sdata->bss)
return -ENOLINK;

list_add(&sdata->u.vlan.list, &sdata->bss->vlans);

master = container_of(sdata->bss,
struct ieee80211_sub_if_data, u.ap);
sdata->control_port_protocol =
master->control_port_protocol;
sdata->control_port_no_encrypt =
master->control_port_no_encrypt;
break;
}
case NL80211_IFTYPE_AP:
sdata->bss = &sdata->u.ap;
break;
Expand Down

0 comments on commit bcb756a

Please sign in to comment.