diff options
author | David S. Miller <davem@davemloft.net> | 2010-03-04 01:42:54 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-04 01:42:54 -0500 |
commit | e5c1a0aa00ce94ab0cd669bb290c3ae4657242a3 (patch) | |
tree | 5ed22d681be9cc6a3677d61b0a19fcea5702d98c /net | |
parent | 1cd4efddc4512ccbd9fe317f688f361605ca0c88 (diff) | |
parent | 31f66be44a657a14e0ab3536e4877c66c9ce031e (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/mlme.c | 19 | ||||
-rw-r--r-- | net/mac80211/rate.h | 5 | ||||
-rw-r--r-- | net/rfkill/input.c | 8 |
3 files changed, 27 insertions, 5 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 41812a15eea0..0ab284c32135 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -177,7 +177,8 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, | |||
177 | sta = sta_info_get(sdata, bssid); | 177 | sta = sta_info_get(sdata, bssid); |
178 | if (sta) | 178 | if (sta) |
179 | rate_control_rate_update(local, sband, sta, | 179 | rate_control_rate_update(local, sband, sta, |
180 | IEEE80211_RC_HT_CHANGED); | 180 | IEEE80211_RC_HT_CHANGED, |
181 | local->oper_channel_type); | ||
181 | rcu_read_unlock(); | 182 | rcu_read_unlock(); |
182 | } | 183 | } |
183 | 184 | ||
@@ -1893,8 +1894,20 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | |||
1893 | 1894 | ||
1894 | mutex_lock(&ifmgd->mtx); | 1895 | mutex_lock(&ifmgd->mtx); |
1895 | if (ifmgd->associated) { | 1896 | if (ifmgd->associated) { |
1896 | mutex_unlock(&ifmgd->mtx); | 1897 | if (!req->prev_bssid || |
1897 | return -EALREADY; | 1898 | memcmp(req->prev_bssid, ifmgd->associated->bssid, |
1899 | ETH_ALEN)) { | ||
1900 | /* | ||
1901 | * We are already associated and the request was not a | ||
1902 | * reassociation request from the current BSS, so | ||
1903 | * reject it. | ||
1904 | */ | ||
1905 | mutex_unlock(&ifmgd->mtx); | ||
1906 | return -EALREADY; | ||
1907 | } | ||
1908 | |||
1909 | /* Trying to reassociate - clear previous association state */ | ||
1910 | ieee80211_set_disassoc(sdata); | ||
1898 | } | 1911 | } |
1899 | mutex_unlock(&ifmgd->mtx); | 1912 | mutex_unlock(&ifmgd->mtx); |
1900 | 1913 | ||
diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h index b6108bca96d4..065a96190e32 100644 --- a/net/mac80211/rate.h +++ b/net/mac80211/rate.h | |||
@@ -66,7 +66,8 @@ static inline void rate_control_rate_init(struct sta_info *sta) | |||
66 | 66 | ||
67 | static inline void rate_control_rate_update(struct ieee80211_local *local, | 67 | static inline void rate_control_rate_update(struct ieee80211_local *local, |
68 | struct ieee80211_supported_band *sband, | 68 | struct ieee80211_supported_band *sband, |
69 | struct sta_info *sta, u32 changed) | 69 | struct sta_info *sta, u32 changed, |
70 | enum nl80211_channel_type oper_chan_type) | ||
70 | { | 71 | { |
71 | struct rate_control_ref *ref = local->rate_ctrl; | 72 | struct rate_control_ref *ref = local->rate_ctrl; |
72 | struct ieee80211_sta *ista = &sta->sta; | 73 | struct ieee80211_sta *ista = &sta->sta; |
@@ -74,7 +75,7 @@ static inline void rate_control_rate_update(struct ieee80211_local *local, | |||
74 | 75 | ||
75 | if (ref && ref->ops->rate_update) | 76 | if (ref && ref->ops->rate_update) |
76 | ref->ops->rate_update(ref->priv, sband, ista, | 77 | ref->ops->rate_update(ref->priv, sband, ista, |
77 | priv_sta, changed); | 78 | priv_sta, changed, oper_chan_type); |
78 | } | 79 | } |
79 | 80 | ||
80 | static inline void *rate_control_alloc_sta(struct rate_control_ref *ref, | 81 | static inline void *rate_control_alloc_sta(struct rate_control_ref *ref, |
diff --git a/net/rfkill/input.c b/net/rfkill/input.c index a7295ad5f9cb..3713d7ecab96 100644 --- a/net/rfkill/input.c +++ b/net/rfkill/input.c | |||
@@ -212,6 +212,9 @@ static void rfkill_event(struct input_handle *handle, unsigned int type, | |||
212 | case KEY_WIMAX: | 212 | case KEY_WIMAX: |
213 | rfkill_schedule_toggle(RFKILL_TYPE_WIMAX); | 213 | rfkill_schedule_toggle(RFKILL_TYPE_WIMAX); |
214 | break; | 214 | break; |
215 | case KEY_RFKILL: | ||
216 | rfkill_schedule_toggle(RFKILL_TYPE_ALL); | ||
217 | break; | ||
215 | } | 218 | } |
216 | } else if (type == EV_SW && code == SW_RFKILL_ALL) | 219 | } else if (type == EV_SW && code == SW_RFKILL_ALL) |
217 | rfkill_schedule_evsw_rfkillall(data); | 220 | rfkill_schedule_evsw_rfkillall(data); |
@@ -295,6 +298,11 @@ static const struct input_device_id rfkill_ids[] = { | |||
295 | .keybit = { [BIT_WORD(KEY_WIMAX)] = BIT_MASK(KEY_WIMAX) }, | 298 | .keybit = { [BIT_WORD(KEY_WIMAX)] = BIT_MASK(KEY_WIMAX) }, |
296 | }, | 299 | }, |
297 | { | 300 | { |
301 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT, | ||
302 | .evbit = { BIT_MASK(EV_KEY) }, | ||
303 | .keybit = { [BIT_WORD(KEY_RFKILL)] = BIT_MASK(KEY_RFKILL) }, | ||
304 | }, | ||
305 | { | ||
298 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_SWBIT, | 306 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_SWBIT, |
299 | .evbit = { BIT(EV_SW) }, | 307 | .evbit = { BIT(EV_SW) }, |
300 | .swbit = { [BIT_WORD(SW_RFKILL_ALL)] = BIT_MASK(SW_RFKILL_ALL) }, | 308 | .swbit = { [BIT_WORD(SW_RFKILL_ALL)] = BIT_MASK(SW_RFKILL_ALL) }, |