diff options
author | Hante Meuleman <meuleman@broadcom.com> | 2012-11-14 21:46:22 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-11-16 14:29:04 -0500 |
commit | 5a7a59d254b27ab90ba49dbae51cadc4775b3150 (patch) | |
tree | 60a8555c1780536c3c5744f246de2042264fdf83 /drivers/net/wireless/brcm80211/brcmfmac/fwil.c | |
parent | 756a67005295495862b8584667dbdcda247d0f78 (diff) |
brcmfmac: limit hex dump on fwil.
When debug is turned on for fwil then the whole data buffer is
dumped. In some cases this gives excessive amount of debug. With
this patch the dumps are limited to 64 bytes.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/fwil.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/fwil.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwil.c b/drivers/net/wireless/brcm80211/brcmfmac/fwil.c index 62e0960c1d3e..7e678e9362ed 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/fwil.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/fwil.c | |||
@@ -29,6 +29,9 @@ | |||
29 | #include "fwil.h" | 29 | #include "fwil.h" |
30 | 30 | ||
31 | 31 | ||
32 | #define MAX_HEX_DUMP_LEN 64 | ||
33 | |||
34 | |||
32 | static s32 | 35 | static s32 |
33 | brcmf_fil_cmd_data(struct brcmf_if *ifp, u32 cmd, void *data, u32 len, bool set) | 36 | brcmf_fil_cmd_data(struct brcmf_if *ifp, u32 cmd, void *data, u32 len, bool set) |
34 | { | 37 | { |
@@ -64,7 +67,8 @@ brcmf_fil_cmd_data_set(struct brcmf_if *ifp, u32 cmd, void *data, u32 len) | |||
64 | mutex_lock(&ifp->drvr->proto_block); | 67 | mutex_lock(&ifp->drvr->proto_block); |
65 | 68 | ||
66 | brcmf_dbg(FIL, "cmd=%d, len=%d\n", cmd, len); | 69 | brcmf_dbg(FIL, "cmd=%d, len=%d\n", cmd, len); |
67 | brcmf_dbg_hex_dump(BRCMF_FIL_ON(), data, len, "data"); | 70 | brcmf_dbg_hex_dump(BRCMF_FIL_ON(), data, |
71 | min_t(uint, len, MAX_HEX_DUMP_LEN), "data"); | ||
68 | 72 | ||
69 | err = brcmf_fil_cmd_data(ifp, cmd, data, len, true); | 73 | err = brcmf_fil_cmd_data(ifp, cmd, data, len, true); |
70 | mutex_unlock(&ifp->drvr->proto_block); | 74 | mutex_unlock(&ifp->drvr->proto_block); |
@@ -81,7 +85,8 @@ brcmf_fil_cmd_data_get(struct brcmf_if *ifp, u32 cmd, void *data, u32 len) | |||
81 | err = brcmf_fil_cmd_data(ifp, cmd, data, len, false); | 85 | err = brcmf_fil_cmd_data(ifp, cmd, data, len, false); |
82 | 86 | ||
83 | brcmf_dbg(FIL, "cmd=%d, len=%d\n", cmd, len); | 87 | brcmf_dbg(FIL, "cmd=%d, len=%d\n", cmd, len); |
84 | brcmf_dbg_hex_dump(BRCMF_FIL_ON(), data, len, "data"); | 88 | brcmf_dbg_hex_dump(BRCMF_FIL_ON(), data, |
89 | min_t(uint, len, MAX_HEX_DUMP_LEN), "data"); | ||
85 | 90 | ||
86 | mutex_unlock(&ifp->drvr->proto_block); | 91 | mutex_unlock(&ifp->drvr->proto_block); |
87 | 92 | ||
@@ -147,7 +152,8 @@ brcmf_fil_iovar_data_set(struct brcmf_if *ifp, char *name, void *data, | |||
147 | mutex_lock(&drvr->proto_block); | 152 | mutex_lock(&drvr->proto_block); |
148 | 153 | ||
149 | brcmf_dbg(FIL, "name=%s, len=%d\n", name, len); | 154 | brcmf_dbg(FIL, "name=%s, len=%d\n", name, len); |
150 | brcmf_dbg_hex_dump(BRCMF_FIL_ON(), data, len, "data"); | 155 | brcmf_dbg_hex_dump(BRCMF_FIL_ON(), data, |
156 | min_t(uint, len, MAX_HEX_DUMP_LEN), "data"); | ||
151 | 157 | ||
152 | buflen = brcmf_create_iovar(name, data, len, drvr->proto_buf, | 158 | buflen = brcmf_create_iovar(name, data, len, drvr->proto_buf, |
153 | sizeof(drvr->proto_buf)); | 159 | sizeof(drvr->proto_buf)); |
@@ -186,7 +192,8 @@ brcmf_fil_iovar_data_get(struct brcmf_if *ifp, char *name, void *data, | |||
186 | } | 192 | } |
187 | 193 | ||
188 | brcmf_dbg(FIL, "name=%s, len=%d\n", name, len); | 194 | brcmf_dbg(FIL, "name=%s, len=%d\n", name, len); |
189 | brcmf_dbg_hex_dump(BRCMF_FIL_ON(), data, len, "data"); | 195 | brcmf_dbg_hex_dump(BRCMF_FIL_ON(), data, |
196 | min_t(uint, len, MAX_HEX_DUMP_LEN), "data"); | ||
190 | 197 | ||
191 | mutex_unlock(&drvr->proto_block); | 198 | mutex_unlock(&drvr->proto_block); |
192 | return err; | 199 | return err; |
@@ -268,7 +275,8 @@ brcmf_fil_bsscfg_data_set(struct brcmf_if *ifp, char *name, | |||
268 | mutex_lock(&drvr->proto_block); | 275 | mutex_lock(&drvr->proto_block); |
269 | 276 | ||
270 | brcmf_dbg(FIL, "bssidx=%d, name=%s, len=%d\n", ifp->bssidx, name, len); | 277 | brcmf_dbg(FIL, "bssidx=%d, name=%s, len=%d\n", ifp->bssidx, name, len); |
271 | brcmf_dbg_hex_dump(BRCMF_FIL_ON(), data, len, "data"); | 278 | brcmf_dbg_hex_dump(BRCMF_FIL_ON(), data, |
279 | min_t(uint, len, MAX_HEX_DUMP_LEN), "data"); | ||
272 | 280 | ||
273 | buflen = brcmf_create_bsscfg(ifp->bssidx, name, data, len, | 281 | buflen = brcmf_create_bsscfg(ifp->bssidx, name, data, len, |
274 | drvr->proto_buf, sizeof(drvr->proto_buf)); | 282 | drvr->proto_buf, sizeof(drvr->proto_buf)); |
@@ -306,7 +314,8 @@ brcmf_fil_bsscfg_data_get(struct brcmf_if *ifp, char *name, | |||
306 | brcmf_dbg(ERROR, "Creating bsscfg failed\n"); | 314 | brcmf_dbg(ERROR, "Creating bsscfg failed\n"); |
307 | } | 315 | } |
308 | brcmf_dbg(FIL, "bssidx=%d, name=%s, len=%d\n", ifp->bssidx, name, len); | 316 | brcmf_dbg(FIL, "bssidx=%d, name=%s, len=%d\n", ifp->bssidx, name, len); |
309 | brcmf_dbg_hex_dump(BRCMF_FIL_ON(), data, len, "data"); | 317 | brcmf_dbg_hex_dump(BRCMF_FIL_ON(), data, |
318 | min_t(uint, len, MAX_HEX_DUMP_LEN), "data"); | ||
310 | 319 | ||
311 | mutex_unlock(&drvr->proto_block); | 320 | mutex_unlock(&drvr->proto_block); |
312 | return err; | 321 | return err; |