diff options
author | John W. Linville <linville@tuxdriver.com> | 2013-04-23 14:09:39 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-04-23 14:09:39 -0400 |
commit | ec094144cdd54a36e65a69161e9705959c09cb23 (patch) | |
tree | 5a41c0f766143e462bfde8515ca6547d4ee7f78e /net | |
parent | c43933e61ea9b630521bf0d5cf06c155478308a7 (diff) | |
parent | f09a878511997c25a76bf111a32f6b8345a701a5 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts:
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/iface.c | 27 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 24 |
2 files changed, 39 insertions, 12 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 9daa64ee337e..60f1ce5e5e52 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -78,7 +78,7 @@ void ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata) | |||
78 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_TXPOWER); | 78 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_TXPOWER); |
79 | } | 79 | } |
80 | 80 | ||
81 | u32 ieee80211_idle_off(struct ieee80211_local *local) | 81 | static u32 __ieee80211_idle_off(struct ieee80211_local *local) |
82 | { | 82 | { |
83 | if (!(local->hw.conf.flags & IEEE80211_CONF_IDLE)) | 83 | if (!(local->hw.conf.flags & IEEE80211_CONF_IDLE)) |
84 | return 0; | 84 | return 0; |
@@ -87,7 +87,7 @@ u32 ieee80211_idle_off(struct ieee80211_local *local) | |||
87 | return IEEE80211_CONF_CHANGE_IDLE; | 87 | return IEEE80211_CONF_CHANGE_IDLE; |
88 | } | 88 | } |
89 | 89 | ||
90 | static u32 ieee80211_idle_on(struct ieee80211_local *local) | 90 | static u32 __ieee80211_idle_on(struct ieee80211_local *local) |
91 | { | 91 | { |
92 | if (local->hw.conf.flags & IEEE80211_CONF_IDLE) | 92 | if (local->hw.conf.flags & IEEE80211_CONF_IDLE) |
93 | return 0; | 93 | return 0; |
@@ -98,16 +98,18 @@ static u32 ieee80211_idle_on(struct ieee80211_local *local) | |||
98 | return IEEE80211_CONF_CHANGE_IDLE; | 98 | return IEEE80211_CONF_CHANGE_IDLE; |
99 | } | 99 | } |
100 | 100 | ||
101 | void ieee80211_recalc_idle(struct ieee80211_local *local) | 101 | static u32 __ieee80211_recalc_idle(struct ieee80211_local *local, |
102 | bool force_active) | ||
102 | { | 103 | { |
103 | bool working = false, scanning, active; | 104 | bool working = false, scanning, active; |
104 | unsigned int led_trig_start = 0, led_trig_stop = 0; | 105 | unsigned int led_trig_start = 0, led_trig_stop = 0; |
105 | struct ieee80211_roc_work *roc; | 106 | struct ieee80211_roc_work *roc; |
106 | u32 change; | ||
107 | 107 | ||
108 | lockdep_assert_held(&local->mtx); | 108 | lockdep_assert_held(&local->mtx); |
109 | 109 | ||
110 | active = !list_empty(&local->chanctx_list) || local->monitors; | 110 | active = force_active || |
111 | !list_empty(&local->chanctx_list) || | ||
112 | local->monitors; | ||
111 | 113 | ||
112 | if (!local->ops->remain_on_channel) { | 114 | if (!local->ops->remain_on_channel) { |
113 | list_for_each_entry(roc, &local->roc_list, list) { | 115 | list_for_each_entry(roc, &local->roc_list, list) { |
@@ -132,9 +134,18 @@ void ieee80211_recalc_idle(struct ieee80211_local *local) | |||
132 | ieee80211_mod_tpt_led_trig(local, led_trig_start, led_trig_stop); | 134 | ieee80211_mod_tpt_led_trig(local, led_trig_start, led_trig_stop); |
133 | 135 | ||
134 | if (working || scanning || active) | 136 | if (working || scanning || active) |
135 | change = ieee80211_idle_off(local); | 137 | return __ieee80211_idle_off(local); |
136 | else | 138 | return __ieee80211_idle_on(local); |
137 | change = ieee80211_idle_on(local); | 139 | } |
140 | |||
141 | u32 ieee80211_idle_off(struct ieee80211_local *local) | ||
142 | { | ||
143 | return __ieee80211_recalc_idle(local, true); | ||
144 | } | ||
145 | |||
146 | void ieee80211_recalc_idle(struct ieee80211_local *local) | ||
147 | { | ||
148 | u32 change = __ieee80211_recalc_idle(local, false); | ||
138 | if (change) | 149 | if (change) |
139 | ieee80211_hw_config(local, change); | 150 | ieee80211_hw_config(local, change); |
140 | } | 151 | } |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 13bb81402e1f..29620bfc7a69 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -4022,8 +4022,16 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata, | |||
4022 | /* prep auth_data so we don't go into idle on disassoc */ | 4022 | /* prep auth_data so we don't go into idle on disassoc */ |
4023 | ifmgd->auth_data = auth_data; | 4023 | ifmgd->auth_data = auth_data; |
4024 | 4024 | ||
4025 | if (ifmgd->associated) | 4025 | if (ifmgd->associated) { |
4026 | ieee80211_set_disassoc(sdata, 0, 0, false, NULL); | 4026 | u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN]; |
4027 | |||
4028 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, | ||
4029 | WLAN_REASON_UNSPECIFIED, | ||
4030 | false, frame_buf); | ||
4031 | |||
4032 | __cfg80211_send_deauth(sdata->dev, frame_buf, | ||
4033 | sizeof(frame_buf)); | ||
4034 | } | ||
4027 | 4035 | ||
4028 | sdata_info(sdata, "authenticate with %pM\n", req->bss->bssid); | 4036 | sdata_info(sdata, "authenticate with %pM\n", req->bss->bssid); |
4029 | 4037 | ||
@@ -4083,8 +4091,16 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | |||
4083 | 4091 | ||
4084 | mutex_lock(&ifmgd->mtx); | 4092 | mutex_lock(&ifmgd->mtx); |
4085 | 4093 | ||
4086 | if (ifmgd->associated) | 4094 | if (ifmgd->associated) { |
4087 | ieee80211_set_disassoc(sdata, 0, 0, false, NULL); | 4095 | u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN]; |
4096 | |||
4097 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, | ||
4098 | WLAN_REASON_UNSPECIFIED, | ||
4099 | false, frame_buf); | ||
4100 | |||
4101 | __cfg80211_send_deauth(sdata->dev, frame_buf, | ||
4102 | sizeof(frame_buf)); | ||
4103 | } | ||
4088 | 4104 | ||
4089 | if (ifmgd->auth_data && !ifmgd->auth_data->done) { | 4105 | if (ifmgd->auth_data && !ifmgd->auth_data->done) { |
4090 | err = -EBUSY; | 4106 | err = -EBUSY; |