diff options
-rw-r--r-- | net/mac80211/cfg.c | 3 | ||||
-rw-r--r-- | net/mac80211/debugfs_sta.c | 1 | ||||
-rw-r--r-- | net/mac80211/sta_info.h | 2 | ||||
-rw-r--r-- | net/mac80211/wep.c | 20 |
4 files changed, 1 insertions, 25 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index d7513a503be1..f8d065480ba9 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -603,7 +603,7 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo) | |||
603 | } | 603 | } |
604 | 604 | ||
605 | static const char ieee80211_gstrings_sta_stats[][ETH_GSTRING_LEN] = { | 605 | static const char ieee80211_gstrings_sta_stats[][ETH_GSTRING_LEN] = { |
606 | "rx_packets", "rx_bytes", "wep_weak_iv_count", | 606 | "rx_packets", "rx_bytes", |
607 | "rx_duplicates", "rx_fragments", "rx_dropped", | 607 | "rx_duplicates", "rx_fragments", "rx_dropped", |
608 | "tx_packets", "tx_bytes", "tx_fragments", | 608 | "tx_packets", "tx_bytes", "tx_fragments", |
609 | "tx_filtered", "tx_retry_failed", "tx_retries", | 609 | "tx_filtered", "tx_retry_failed", "tx_retries", |
@@ -651,7 +651,6 @@ static void ieee80211_get_et_stats(struct wiphy *wiphy, | |||
651 | do { \ | 651 | do { \ |
652 | data[i++] += sta->rx_packets; \ | 652 | data[i++] += sta->rx_packets; \ |
653 | data[i++] += sta->rx_bytes; \ | 653 | data[i++] += sta->rx_bytes; \ |
654 | data[i++] += sta->wep_weak_iv_count; \ | ||
655 | data[i++] += sta->num_duplicates; \ | 654 | data[i++] += sta->num_duplicates; \ |
656 | data[i++] += sta->rx_fragments; \ | 655 | data[i++] += sta->rx_fragments; \ |
657 | data[i++] += sta->rx_dropped; \ | 656 | data[i++] += sta->rx_dropped; \ |
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index 2ecb4deddb5d..ee82e1f0a9e7 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c | |||
@@ -587,7 +587,6 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta) | |||
587 | DEBUGFS_ADD_COUNTER(tx_filtered, tx_filtered_count); | 587 | DEBUGFS_ADD_COUNTER(tx_filtered, tx_filtered_count); |
588 | DEBUGFS_ADD_COUNTER(tx_retry_failed, tx_retry_failed); | 588 | DEBUGFS_ADD_COUNTER(tx_retry_failed, tx_retry_failed); |
589 | DEBUGFS_ADD_COUNTER(tx_retry_count, tx_retry_count); | 589 | DEBUGFS_ADD_COUNTER(tx_retry_count, tx_retry_count); |
590 | DEBUGFS_ADD_COUNTER(wep_weak_iv_count, wep_weak_iv_count); | ||
591 | 590 | ||
592 | if (sizeof(sta->driver_buffered_tids) == sizeof(u32)) | 591 | if (sizeof(sta->driver_buffered_tids) == sizeof(u32)) |
593 | debugfs_create_x32("driver_buffered_tids", 0400, | 592 | debugfs_create_x32("driver_buffered_tids", 0400, |
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index 159cac903ce8..fa7ce6f8593b 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h | |||
@@ -281,7 +281,6 @@ struct ieee80211_tx_latency_stat { | |||
281 | * @driver_buffered_tids: bitmap of TIDs the driver has data buffered on | 281 | * @driver_buffered_tids: bitmap of TIDs the driver has data buffered on |
282 | * @rx_packets: Number of MSDUs received from this STA | 282 | * @rx_packets: Number of MSDUs received from this STA |
283 | * @rx_bytes: Number of bytes received from this STA | 283 | * @rx_bytes: Number of bytes received from this STA |
284 | * @wep_weak_iv_count: number of weak WEP IVs received from this station | ||
285 | * @last_rx: time (in jiffies) when last frame was received from this STA | 284 | * @last_rx: time (in jiffies) when last frame was received from this STA |
286 | * @last_connected: time (in seconds) when a station got connected | 285 | * @last_connected: time (in seconds) when a station got connected |
287 | * @num_duplicates: number of duplicate frames received from this STA | 286 | * @num_duplicates: number of duplicate frames received from this STA |
@@ -369,7 +368,6 @@ struct sta_info { | |||
369 | /* Updated from RX path only, no locking requirements */ | 368 | /* Updated from RX path only, no locking requirements */ |
370 | unsigned long rx_packets; | 369 | unsigned long rx_packets; |
371 | u64 rx_bytes; | 370 | u64 rx_bytes; |
372 | unsigned long wep_weak_iv_count; | ||
373 | unsigned long last_rx; | 371 | unsigned long last_rx; |
374 | long last_connected; | 372 | long last_connected; |
375 | unsigned long num_duplicates; | 373 | unsigned long num_duplicates; |
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c index 6ee2b5863572..9181fb6d6437 100644 --- a/net/mac80211/wep.c +++ b/net/mac80211/wep.c | |||
@@ -271,22 +271,6 @@ static int ieee80211_wep_decrypt(struct ieee80211_local *local, | |||
271 | return ret; | 271 | return ret; |
272 | } | 272 | } |
273 | 273 | ||
274 | |||
275 | static bool ieee80211_wep_is_weak_iv(struct sk_buff *skb, | ||
276 | struct ieee80211_key *key) | ||
277 | { | ||
278 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; | ||
279 | unsigned int hdrlen; | ||
280 | u8 *ivpos; | ||
281 | u32 iv; | ||
282 | |||
283 | hdrlen = ieee80211_hdrlen(hdr->frame_control); | ||
284 | ivpos = skb->data + hdrlen; | ||
285 | iv = (ivpos[0] << 16) | (ivpos[1] << 8) | ivpos[2]; | ||
286 | |||
287 | return ieee80211_wep_weak_iv(iv, key->conf.keylen); | ||
288 | } | ||
289 | |||
290 | ieee80211_rx_result | 274 | ieee80211_rx_result |
291 | ieee80211_crypto_wep_decrypt(struct ieee80211_rx_data *rx) | 275 | ieee80211_crypto_wep_decrypt(struct ieee80211_rx_data *rx) |
292 | { | 276 | { |
@@ -301,16 +285,12 @@ ieee80211_crypto_wep_decrypt(struct ieee80211_rx_data *rx) | |||
301 | if (!(status->flag & RX_FLAG_DECRYPTED)) { | 285 | if (!(status->flag & RX_FLAG_DECRYPTED)) { |
302 | if (skb_linearize(rx->skb)) | 286 | if (skb_linearize(rx->skb)) |
303 | return RX_DROP_UNUSABLE; | 287 | return RX_DROP_UNUSABLE; |
304 | if (rx->sta && ieee80211_wep_is_weak_iv(rx->skb, rx->key)) | ||
305 | rx->sta->wep_weak_iv_count++; | ||
306 | if (ieee80211_wep_decrypt(rx->local, rx->skb, rx->key)) | 288 | if (ieee80211_wep_decrypt(rx->local, rx->skb, rx->key)) |
307 | return RX_DROP_UNUSABLE; | 289 | return RX_DROP_UNUSABLE; |
308 | } else if (!(status->flag & RX_FLAG_IV_STRIPPED)) { | 290 | } else if (!(status->flag & RX_FLAG_IV_STRIPPED)) { |
309 | if (!pskb_may_pull(rx->skb, ieee80211_hdrlen(fc) + | 291 | if (!pskb_may_pull(rx->skb, ieee80211_hdrlen(fc) + |
310 | IEEE80211_WEP_IV_LEN)) | 292 | IEEE80211_WEP_IV_LEN)) |
311 | return RX_DROP_UNUSABLE; | 293 | return RX_DROP_UNUSABLE; |
312 | if (rx->sta && ieee80211_wep_is_weak_iv(rx->skb, rx->key)) | ||
313 | rx->sta->wep_weak_iv_count++; | ||
314 | ieee80211_wep_remove_iv(rx->local, rx->skb, rx->key); | 294 | ieee80211_wep_remove_iv(rx->local, rx->skb, rx->key); |
315 | /* remove ICV */ | 295 | /* remove ICV */ |
316 | if (pskb_trim(rx->skb, rx->skb->len - IEEE80211_WEP_ICV_LEN)) | 296 | if (pskb_trim(rx->skb, rx->skb->len - IEEE80211_WEP_ICV_LEN)) |