summaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-04-03 10:24:00 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-04-11 16:23:48 -0400
commit3edaf3e61fda3aa9ff8d38445bf92f2bec23bf63 (patch)
tree55cb71f4299d413dd8bd23caeb54304854588b1d /net/mac80211/iface.c
parentfe40cb6274988852aa5a84440d8f81c00cea4028 (diff)
downloadop-kernel-dev-3edaf3e61fda3aa9ff8d38445bf92f2bec23bf63.zip
op-kernel-dev-3edaf3e61fda3aa9ff8d38445bf92f2bec23bf63.tar.gz
mac80211: manage AP netdev carrier state
The AP netdev is really only active when beaconing, so manage the carrier state accordingly. Also do that for VLAN interfaces enslaved to a given AP interface. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index efb433d3..56a38a3 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -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) {
@@ -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);
OpenPOWER on IntegriCloud