diff options
author | Eliad Peller <eliad@wizery.com> | 2011-11-08 08:36:59 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-11 12:32:49 -0500 |
commit | 86a2ea4134b48f6371103cfceb521bf2d2bf76cd (patch) | |
tree | 3a8477f9b078b8dd69bba51be49fa62b48195b5f /net | |
parent | 94e2ad9ee47025747d19620f288fb533d49c0475 (diff) |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/ibss.c | 3 | ||||
-rw-r--r-- | net/mac80211/iface.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index ede9a8b341ac..7d84af70132f 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -97,6 +97,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
97 | /* if merging, indicate to driver that we leave the old IBSS */ | 97 | /* if merging, indicate to driver that we leave the old IBSS */ |
98 | if (sdata->vif.bss_conf.ibss_joined) { | 98 | if (sdata->vif.bss_conf.ibss_joined) { |
99 | sdata->vif.bss_conf.ibss_joined = false; | 99 | sdata->vif.bss_conf.ibss_joined = false; |
100 | netif_carrier_off(sdata->dev); | ||
100 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IBSS); | 101 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IBSS); |
101 | } | 102 | } |
102 | 103 | ||
@@ -207,6 +208,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
207 | bss = cfg80211_inform_bss_frame(local->hw.wiphy, local->hw.conf.channel, | 208 | bss = cfg80211_inform_bss_frame(local->hw.wiphy, local->hw.conf.channel, |
208 | mgmt, skb->len, 0, GFP_KERNEL); | 209 | mgmt, skb->len, 0, GFP_KERNEL); |
209 | cfg80211_put_bss(bss); | 210 | cfg80211_put_bss(bss); |
211 | netif_carrier_on(sdata->dev); | ||
210 | cfg80211_ibss_joined(sdata->dev, ifibss->bssid, GFP_KERNEL); | 212 | cfg80211_ibss_joined(sdata->dev, ifibss->bssid, GFP_KERNEL); |
211 | } | 213 | } |
212 | 214 | ||
@@ -990,6 +992,7 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata) | |||
990 | } | 992 | } |
991 | 993 | ||
992 | sta_info_flush(sdata->local, sdata); | 994 | sta_info_flush(sdata->local, sdata); |
995 | netif_carrier_off(sdata->dev); | ||
993 | 996 | ||
994 | /* remove beacon */ | 997 | /* remove beacon */ |
995 | kfree(sdata->u.ibss.ie); | 998 | kfree(sdata->u.ibss.ie); |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index b7bc4b7b80af..7b0c25bf8bbf 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -293,7 +293,8 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up) | |||
293 | changed |= ieee80211_reset_erp_info(sdata); | 293 | changed |= ieee80211_reset_erp_info(sdata); |
294 | ieee80211_bss_info_change_notify(sdata, changed); | 294 | ieee80211_bss_info_change_notify(sdata, changed); |
295 | 295 | ||
296 | if (sdata->vif.type == NL80211_IFTYPE_STATION) | 296 | if (sdata->vif.type == NL80211_IFTYPE_STATION || |
297 | sdata->vif.type == NL80211_IFTYPE_ADHOC) | ||
297 | netif_carrier_off(dev); | 298 | netif_carrier_off(dev); |
298 | else | 299 | else |
299 | netif_carrier_on(dev); | 300 | netif_carrier_on(dev); |