Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300698
b: refs/heads/master
c: 3edaf3e
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Apr 11, 2012
1 parent 8486fb7 commit 5cdaa4b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 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: fe40cb6274988852aa5a84440d8f81c00cea4028
refs/heads/master: 3edaf3e61fda3aa9ff8d38445bf92f2bec23bf63
10 changes: 9 additions & 1 deletion trunk/net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,10 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,

ieee80211_bss_info_change_notify(sdata, changed);

netif_carrier_on(dev);
list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list)
netif_carrier_on(vlan->dev);

return 0;
}

Expand All @@ -669,7 +673,7 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev,

static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
{
struct ieee80211_sub_if_data *sdata;
struct ieee80211_sub_if_data *sdata, *vlan;
struct beacon_data *old;

sdata = IEEE80211_DEV_TO_SUB_IF(dev);
Expand All @@ -678,6 +682,10 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
if (!old)
return -ENOENT;

list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list)
netif_carrier_off(vlan->dev);
netif_carrier_off(dev);

RCU_INIT_POINTER(sdata->u.ap.beacon, NULL);

kfree_rcu(old, rcu_head);
Expand Down
9 changes: 7 additions & 2 deletions trunk/net/mac80211/iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up)

switch (sdata->vif.type) {
case NL80211_IFTYPE_AP_VLAN:
/* no need to tell driver */
/* no need to tell driver, but set carrier */
if (rtnl_dereference(sdata->bss->beacon))
netif_carrier_on(dev);
else
netif_carrier_off(dev);
break;
case NL80211_IFTYPE_MONITOR:
if (sdata->u.mntr_flags & MONITOR_FLAG_COOK_FRAMES) {
Expand Down Expand Up @@ -294,7 +298,8 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up)
ieee80211_bss_info_change_notify(sdata, changed);

if (sdata->vif.type == NL80211_IFTYPE_STATION ||
sdata->vif.type == NL80211_IFTYPE_ADHOC)
sdata->vif.type == NL80211_IFTYPE_ADHOC ||
sdata->vif.type == NL80211_IFTYPE_AP)
netif_carrier_off(dev);
else
netif_carrier_on(dev);
Expand Down

0 comments on commit 5cdaa4b

Please sign in to comment.