aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ieee80211/ieee80211_crypt.c11
-rw-r--r--net/ieee80211/ieee80211_rx.c9
2 files changed, 13 insertions, 7 deletions
diff --git a/net/ieee80211/ieee80211_crypt.c b/net/ieee80211/ieee80211_crypt.c
index ecc9bb196abc..cb71d794a7d1 100644
--- a/net/ieee80211/ieee80211_crypt.c
+++ b/net/ieee80211/ieee80211_crypt.c
@@ -18,7 +18,6 @@
18#include <linux/string.h> 18#include <linux/string.h>
19#include <net/ieee80211.h> 19#include <net/ieee80211.h>
20 20
21
22MODULE_AUTHOR("Jouni Malinen"); 21MODULE_AUTHOR("Jouni Malinen");
23MODULE_DESCRIPTION("HostAP crypto"); 22MODULE_DESCRIPTION("HostAP crypto");
24MODULE_LICENSE("GPL"); 23MODULE_LICENSE("GPL");
@@ -33,11 +32,11 @@ static DEFINE_SPINLOCK(ieee80211_crypto_lock);
33 32
34void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee, int force) 33void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee, int force)
35{ 34{
36 struct ieee80211_crypt_data *entry, *next; 35 struct ieee80211_crypt_data *entry, *next;
37 unsigned long flags; 36 unsigned long flags;
38 37
39 spin_lock_irqsave(&ieee->lock, flags); 38 spin_lock_irqsave(&ieee->lock, flags);
40 list_for_each_entry_safe(entry, next, &ieee->crypt_deinit_list, list) { 39 list_for_each_entry_safe(entry, next, &ieee->crypt_deinit_list, list) {
41 if (atomic_read(&entry->refcnt) != 0 && !force) 40 if (atomic_read(&entry->refcnt) != 0 && !force)
42 continue; 41 continue;
43 42
@@ -141,9 +140,9 @@ int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops)
141 spin_unlock_irqrestore(&ieee80211_crypto_lock, flags); 140 spin_unlock_irqrestore(&ieee80211_crypto_lock, flags);
142 return -EINVAL; 141 return -EINVAL;
143 142
144 found: 143 found:
145 printk(KERN_DEBUG "ieee80211_crypt: unregistered algorithm " 144 printk(KERN_DEBUG "ieee80211_crypt: unregistered algorithm "
146 "'%s'\n", ops->name); 145 "'%s'\n", ops->name);
147 list_del(&alg->list); 146 list_del(&alg->list);
148 spin_unlock_irqrestore(&ieee80211_crypto_lock, flags); 147 spin_unlock_irqrestore(&ieee80211_crypto_lock, flags);
149 kfree(alg); 148 kfree(alg);
@@ -163,7 +162,7 @@ struct ieee80211_crypto_ops *ieee80211_get_crypto_ops(const char *name)
163 spin_unlock_irqrestore(&ieee80211_crypto_lock, flags); 162 spin_unlock_irqrestore(&ieee80211_crypto_lock, flags);
164 return NULL; 163 return NULL;
165 164
166 found: 165 found:
167 spin_unlock_irqrestore(&ieee80211_crypto_lock, flags); 166 spin_unlock_irqrestore(&ieee80211_crypto_lock, flags);
168 return alg->ops; 167 return alg->ops;
169} 168}
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c
index 695d0478fd12..3ae91118c736 100644
--- a/net/ieee80211/ieee80211_rx.c
+++ b/net/ieee80211/ieee80211_rx.c
@@ -754,7 +754,14 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
754 memset(skb->cb, 0, sizeof(skb->cb)); 754 memset(skb->cb, 0, sizeof(skb->cb));
755 skb->dev = dev; 755 skb->dev = dev;
756 skb->ip_summed = CHECKSUM_NONE; /* 802.11 crc not sufficient */ 756 skb->ip_summed = CHECKSUM_NONE; /* 802.11 crc not sufficient */
757 netif_rx(skb); 757 if (netif_rx(skb) == NET_RX_DROP) {
758 /* netif_rx always succeeds, but it might drop
759 * the packet. If it drops the packet, we log that
760 * in our stats. */
761 IEEE80211_DEBUG_DROP
762 ("RX: netif_rx dropped the packet\n");
763 stats->rx_dropped++;
764 }
758 } 765 }
759 766
760 rx_exit: 767 rx_exit: