mac80211: set carrier_on for ibss vifs only while joined

mac80211 should set carrier_on for ibss vifs
only while they are joined (similar to sta vifs)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Eliad Peller
2011-11-08 15:36:59 +02:00
committed by John W. Linville
parent 94e2ad9ee4
commit 86a2ea4134
2 changed files with 5 additions and 1 deletions

View File

@ -293,7 +293,8 @@ 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)
if (sdata->vif.type == NL80211_IFTYPE_STATION ||
sdata->vif.type == NL80211_IFTYPE_ADHOC)
netif_carrier_off(dev);
else
netif_carrier_on(dev);