diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-02-25 08:46:02 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-02-25 15:33:40 -0500 |
commit | 8628172f45c839376bf2b70bbd326d56e68dadc3 (patch) | |
tree | 8e91a2cd8272701bc682e3db8869e5582c5e22bc /net/mac80211 | |
parent | 08f6c85223b71ba7bf2a5ebbdf735881475a8e3c (diff) |
mac80211: better fix for conn_mon_timer running after disassociate
Is still possible to schedule conn_mon_timer after disassociate from
ieee80211_sta_tx_notify() and ieee80211_offchannel_ps_disable().
Move disassociate check to ieee80211_sta_reset_conn_monitor() to cover
all these cases, and add unlikely since in most the time we call
ieee80211_sta_reset_conn_monitor() when associated.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/mlme.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index abb011660803..cc984bd861cf 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -145,6 +145,9 @@ void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata) | |||
145 | { | 145 | { |
146 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | 146 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
147 | 147 | ||
148 | if (unlikely(!sdata->u.mgd.associated)) | ||
149 | return; | ||
150 | |||
148 | if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR) | 151 | if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR) |
149 | return; | 152 | return; |
150 | 153 | ||
@@ -1083,12 +1086,6 @@ void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata, | |||
1083 | if (is_multicast_ether_addr(hdr->addr1)) | 1086 | if (is_multicast_ether_addr(hdr->addr1)) |
1084 | return; | 1087 | return; |
1085 | 1088 | ||
1086 | /* | ||
1087 | * In case we receive frames after disassociation. | ||
1088 | */ | ||
1089 | if (!sdata->u.mgd.associated) | ||
1090 | return; | ||
1091 | |||
1092 | ieee80211_sta_reset_conn_monitor(sdata); | 1089 | ieee80211_sta_reset_conn_monitor(sdata); |
1093 | } | 1090 | } |
1094 | 1091 | ||