diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-07-30 21:44:12 +0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-07-31 18:18:59 +0400 |
commit | c405c6298eacd423098afacf6020ddbda1b0378b (patch) | |
tree | e85dc0a9e88c041a7629c6e77e6e619bbe141704 /net/mac80211/iface.c | |
parent | 2d56577bc68e56097a1cd6599b678e8cab758e64 (diff) | |
download | linux-c405c6298eacd423098afacf6020ddbda1b0378b.tar.xz |
mac80211: manage carrier state in mesh
Instead of assuming the carrier is on all
the time in mesh manage it with joining
and leaving the mesh.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r-- | net/mac80211/iface.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index fc8ba83e2c33..c65a03ba809f 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -539,12 +539,16 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up) changed |= ieee80211_reset_erp_info(sdata); 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_AP) + switch (sdata->vif.type) { + case NL80211_IFTYPE_STATION: + case NL80211_IFTYPE_ADHOC: + case NL80211_IFTYPE_AP: + case NL80211_IFTYPE_MESH_POINT: netif_carrier_off(dev); - else + break; + default: netif_carrier_on(dev); + } /* * set default queue parameters so drivers don't |