aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 5f6e32ca085..bcfe8c77c83 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1063,20 +1063,9 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
1063 return RX_DROP_MONITOR; 1063 return RX_DROP_MONITOR;
1064 } 1064 }
1065 1065
1066 if (skb_linearize(rx->skb))
1067 return RX_DROP_UNUSABLE;
1068 /* the hdr variable is invalid now! */
1069
1070 switch (rx->key->conf.cipher) { 1066 switch (rx->key->conf.cipher) {
1071 case WLAN_CIPHER_SUITE_WEP40: 1067 case WLAN_CIPHER_SUITE_WEP40:
1072 case WLAN_CIPHER_SUITE_WEP104: 1068 case WLAN_CIPHER_SUITE_WEP104:
1073 /* Check for weak IVs if possible */
1074 if (rx->sta && ieee80211_is_data(fc) &&
1075 (!(status->flag & RX_FLAG_IV_STRIPPED) ||
1076 !(status->flag & RX_FLAG_DECRYPTED)) &&
1077 ieee80211_wep_is_weak_iv(rx->skb, rx->key))
1078 rx->sta->wep_weak_iv_count++;
1079
1080 result = ieee80211_crypto_wep_decrypt(rx); 1069 result = ieee80211_crypto_wep_decrypt(rx);
1081 break; 1070 break;
1082 case WLAN_CIPHER_SUITE_TKIP: 1071 case WLAN_CIPHER_SUITE_TKIP:
@@ -1096,6 +1085,8 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
1096 return RX_DROP_UNUSABLE; 1085 return RX_DROP_UNUSABLE;
1097 } 1086 }
1098 1087
1088 /* the hdr variable is invalid after the decrypt handlers */
1089
1099 /* either the frame has been decrypted or will be dropped */ 1090 /* either the frame has been decrypted or will be dropped */
1100 status->flag |= RX_FLAG_DECRYPTED; 1091 status->flag |= RX_FLAG_DECRYPTED;
1101 1092
@@ -2278,9 +2269,11 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
2278 2269
2279 sband = rx->local->hw.wiphy->bands[status->band]; 2270 sband = rx->local->hw.wiphy->bands[status->band];
2280 2271
2281 rate_control_rate_update(local, sband, rx->sta, 2272 rate_control_rate_update(
2282 IEEE80211_RC_SMPS_CHANGED, 2273 local, sband, rx->sta,
2283 local->_oper_channel_type); 2274 IEEE80211_RC_SMPS_CHANGED,
2275 ieee80211_get_tx_channel_type(
2276 local, local->_oper_channel_type));
2284 goto handled; 2277 goto handled;
2285 } 2278 }
2286 default: 2279 default: