~ubuntu-branches/ubuntu/hardy/linux-backports-modules-2.6.24/hardy-security

« back to all changes in this revision

Viewing changes to updates/wireless/iwlwifi/mac80211-debug.patch

  • Committer: Bazaar Package Importer
  • Author(s): , Ben Collins
  • Date: 2008-04-02 06:59:04 UTC
  • Revision ID: james.westby@ubuntu.com-20080402065904-e5knh2gn2hms3xbb
Tags: 2.6.24-14.11
[Ben Collins]

* iwlwifi: Update to iwlwifi-1.2.25 and mac80211-10.0.4
  - LP: #200950
* ubuntu: Slight cleanups to module hiearchy and Makefiles
* mac80211: Enable LED triggers
* iwlwifi: Add LED trigger support (rx and tx only)
  - LP: #176090

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
commit 73e337a0a5ff353d504a42fdbc6062d8b4d545a2
 
2
Author: Tim Gardner <tim.gardner@canonical.com>
 
3
Date:   Fri Feb 29 07:12:43 2008 -0700
 
4
 
 
5
    UBUNTU: ifdef iwlwifi debug messages
 
6
    OriginalAuthor: kevin.a.wang@intel.com
 
7
    Bug: #190475
 
8
    
 
9
    A number of debug messages puke out warnings as a result of received traffic at
 
10
    line rates. This is obviously a log filler. Since the messages are informational
 
11
    in nature, simply ifdef them and wrap them in a net_ratelimit() clause.
 
12
    
 
13
    Signed-off-by: Kevin A Wang <kevin.a.wang@intel.com>
 
14
    Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
 
15
 
 
16
--- net/mac80211/ieee80211.c
 
17
+++ net/mac80211/ieee80211.c
 
18
@@ -3861,13 +3861,16 @@ ieee80211_rx_h_check(struct ieee80211_txrx_data *rx)
 
19
                        if (!rx->key) {
 
20
                                if (!rx->u.rx.ra_match)
 
21
                                        return TXRX_DROP;
 
22
-                               printk(KERN_DEBUG "%s: RX WEP frame with "
 
23
-                                      "unknown keyidx %d (A1=" MAC_FMT " A2="
 
24
-                                      MAC_FMT " A3=" MAC_FMT ")\n",
 
25
-                                      rx->dev->name, keyidx,
 
26
-                                      MAC_ARG(hdr->addr1),
 
27
-                                      MAC_ARG(hdr->addr2),
 
28
-                                      MAC_ARG(hdr->addr3));
 
29
+#ifdef CONFIG_MAC80211_DEBUG
 
30
+                               if (net_ratelimit())
 
31
+                                       printk(KERN_DEBUG "%s: RX WEP frame with "
 
32
+                                              "unknown keyidx %d (A1=" MAC_FMT " A2="
 
33
+                                              MAC_FMT " A3=" MAC_FMT ")\n",
 
34
+                                              rx->dev->name, keyidx,
 
35
+                                              MAC_ARG(hdr->addr1),
 
36
+                                              MAC_ARG(hdr->addr2),
 
37
+                                              MAC_ARG(hdr->addr3));
 
38
+#endif /* CONFIG_MAC80211_DEBUG */
 
39
                                if (!rx->local->apdev)
 
40
                                        return TXRX_DROP;
 
41
                                ieee80211_rx_mgmt(
 
42
--- net/mac80211/wep.c
 
43
+++ net/mac80211/wep.c
 
44
@@ -265,7 +265,10 @@ int ieee80211_wep_decrypt(struct ieee80211_local *local, struct sk_buff *skb,
 
45
        if (ieee80211_wep_decrypt_data(local->wep_rx_tfm, rc4key, klen,
 
46
                                       skb->data + hdrlen + WEP_IV_LEN,
 
47
                                       len)) {
 
48
-               printk(KERN_DEBUG "WEP decrypt failed (ICV)\n");
 
49
+#ifdef CONFIG_MAC80211_DEBUG
 
50
+               if (net_ratelimit())
 
51
+                       printk(KERN_DEBUG "WEP decrypt failed (ICV)\n");
 
52
+#endif /* CONFIG_MAC80211_DEBUG */
 
53
                ret = -1;
 
54
        }
 
55
 
 
56
--- net/mac80211/wpa.c
 
57
+++ net/mac80211/wpa.c
 
58
@@ -177,8 +177,11 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_txrx_data *rx)
 
59
                if (!rx->u.rx.ra_match)
 
60
                        return TXRX_DROP;
 
61
 
 
62
-               printk(KERN_DEBUG "%s: invalid Michael MIC in data frame from "
 
63
-                      MAC_FMT "\n", rx->dev->name, MAC_ARG(sa));
 
64
+#ifdef CONFIG_MAC80211_DEBUG
 
65
+               if (net_ratelimit())
 
66
+                       printk(KERN_DEBUG "%s: invalid Michael MIC in data frame from "
 
67
+                       MAC_FMT "\n", rx->dev->name, MAC_ARG(sa));
 
68
+#endif /* CONFIG_MAC80211_DEBUG */
 
69
 
 
70
                do {
 
71
                        struct ieee80211_hdr *hdr;
 
72
@@ -368,9 +371,12 @@ ieee80211_rx_h_tkip_decrypt(struct ieee80211_txrx_data *rx)
 
73
                                          skb->len - hdrlen, rx->sta->addr,
 
74
                                          hwaccel, rx->u.rx.queue);
 
75
        if (res != TKIP_DECRYPT_OK || wpa_test) {
 
76
-               printk(KERN_DEBUG "%s: TKIP decrypt failed for RX frame from "
 
77
-                      MAC_FMT " (res=%d)\n",
 
78
-                      rx->dev->name, MAC_ARG(rx->sta->addr), res);
 
79
+#ifdef CONFIG_MAC80211_DEBUG
 
80
+               if (net_ratelimit())
 
81
+                       printk(KERN_DEBUG "%s: TKIP decrypt failed for RX frame from "
 
82
+                       MAC_FMT " (res=%d)\n",
 
83
+                       rx->dev->name, MAC_ARG(rx->sta->addr), res);
 
84
+#endif /* CONFIG_MAC80211_DEBUG */
 
85
                return TXRX_DROP;
 
86
        }
 
87
 
 
88
@@ -641,9 +647,12 @@ ieee80211_rx_h_ccmp_decrypt(struct ieee80211_txrx_data *rx)
 
89
                            skb->data + hdrlen + CCMP_HDR_LEN, data_len,
 
90
                            skb->data + skb->len - CCMP_MIC_LEN,
 
91
                            skb->data + hdrlen + CCMP_HDR_LEN)) {
 
92
-                       printk(KERN_DEBUG "%s: CCMP decrypt failed for RX "
 
93
-                              "frame from " MAC_FMT "\n", rx->dev->name,
 
94
-                              MAC_ARG(rx->sta->addr));
 
95
+#ifdef CONFIG_MAC80211_DEBUG
 
96
+                       if (net_ratelimit())
 
97
+                               printk(KERN_DEBUG "%s: CCMP decrypt failed for RX "
 
98
+                               "frame from " MAC_FMT "\n", rx->dev->name,
 
99
+                               MAC_ARG(rx->sta->addr));
 
100
+#endif /* CONFIG_MAC80211_DEBUG */
 
101
                        return TXRX_DROP;
 
102
                }
 
103
        }