diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-04-03 04:24:00 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-11 16:23:48 -0400 |
commit | 3edaf3e61fda3aa9ff8d38445bf92f2bec23bf63 (patch) | |
tree | 55cb71f4299d413dd8bd23caeb54304854588b1d /net/mac80211/iface.c | |
parent | fe40cb6274988852aa5a84440d8f81c00cea4028 (diff) |
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.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index efb433d3dc25..56a38a3088d4 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) | |||
254 | 254 | ||
255 | switch (sdata->vif.type) { | 255 | switch (sdata->vif.type) { |
256 | case NL80211_IFTYPE_AP_VLAN: | 256 | case NL80211_IFTYPE_AP_VLAN: |
257 | /* no need to tell driver */ | 257 | /* no need to tell driver, but set carrier */ |
258 | if (rtnl_dereference(sdata->bss->beacon)) | ||
259 | netif_carrier_on(dev); | ||
260 | else | ||
261 | netif_carrier_off(dev); | ||
258 | break; | 262 | break; |
259 | case NL80211_IFTYPE_MONITOR: | 263 | case NL80211_IFTYPE_MONITOR: |
260 | if (sdata->u.mntr_flags & MONITOR_FLAG_COOK_FRAMES) { | 264 | 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) | |||
294 | ieee80211_bss_info_change_notify(sdata, changed); | 298 | ieee80211_bss_info_change_notify(sdata, changed); |
295 | 299 | ||
296 | if (sdata->vif.type == NL80211_IFTYPE_STATION || | 300 | if (sdata->vif.type == NL80211_IFTYPE_STATION || |
297 | sdata->vif.type == NL80211_IFTYPE_ADHOC) | 301 | sdata->vif.type == NL80211_IFTYPE_ADHOC || |
302 | sdata->vif.type == NL80211_IFTYPE_AP) | ||
298 | netif_carrier_off(dev); | 303 | netif_carrier_off(dev); |
299 | else | 304 | else |
300 | netif_carrier_on(dev); | 305 | netif_carrier_on(dev); |