aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00debug.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-23 14:47:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-23 14:47:02 -0400
commit5f05647dd81c11a6a165ccc8f0c1370b16f3bcb0 (patch)
tree7851ef1c93aa1aba7ef327ca4b75fd35e6d10f29 /drivers/net/wireless/rt2x00/rt2x00debug.c
parent02f36038c568111ad4fc433f6fa760ff5e38fab4 (diff)
parentec37a48d1d16c30b655ac5280209edf52a6775d4 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1699 commits) bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL. vlan: Calling vlan_hwaccel_do_receive() is always valid. tproxy: use the interface primary IP address as a default value for --on-ip tproxy: added IPv6 support to the socket match cxgb3: function namespace cleanup tproxy: added IPv6 support to the TPROXY target tproxy: added IPv6 socket lookup function to nf_tproxy_core be2net: Changes to use only priority codes allowed by f/w tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled tproxy: added tproxy sockopt interface in the IPV6 layer tproxy: added udp6_lib_lookup function tproxy: added const specifiers to udp lookup functions tproxy: split off ipv6 defragmentation to a separate module l2tp: small cleanup nf_nat: restrict ICMP translation for embedded header can: mcp251x: fix generation of error frames can: mcp251x: fix endless loop in interrupt handler if CANINTF_MERRF is set can-raw: add msg_flags to distinguish local traffic 9p: client code cleanup rds: make local functions/variables static ... Fix up conflicts in net/core/dev.c, drivers/net/pcmcia/smc91c92_cs.c and drivers/net/wireless/ath/ath9k/debug.c as per David
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00debug.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00debug.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.c b/drivers/net/wireless/rt2x00/rt2x00debug.c
index cea81e4c5c82..fcdb6b0dc40f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00debug.c
+++ b/drivers/net/wireless/rt2x00/rt2x00debug.c
@@ -334,12 +334,12 @@ static ssize_t rt2x00debug_read_queue_stats(struct file *file,
334 if (*offset) 334 if (*offset)
335 return 0; 335 return 0;
336 336
337 data = kzalloc(lines * MAX_LINE_LENGTH, GFP_KERNEL); 337 data = kcalloc(lines, MAX_LINE_LENGTH, GFP_KERNEL);
338 if (!data) 338 if (!data)
339 return -ENOMEM; 339 return -ENOMEM;
340 340
341 temp = data + 341 temp = data +
342 sprintf(data, "qid\tcount\tlimit\tlength\tindex\tdone\tcrypto\n"); 342 sprintf(data, "qid\tcount\tlimit\tlength\tindex\tdma done\tdone\n");
343 343
344 queue_for_each(intf->rt2x00dev, queue) { 344 queue_for_each(intf->rt2x00dev, queue) {
345 spin_lock_irqsave(&queue->lock, irqflags); 345 spin_lock_irqsave(&queue->lock, irqflags);
@@ -347,8 +347,8 @@ static ssize_t rt2x00debug_read_queue_stats(struct file *file,
347 temp += sprintf(temp, "%d\t%d\t%d\t%d\t%d\t%d\t%d\n", queue->qid, 347 temp += sprintf(temp, "%d\t%d\t%d\t%d\t%d\t%d\t%d\n", queue->qid,
348 queue->count, queue->limit, queue->length, 348 queue->count, queue->limit, queue->length,
349 queue->index[Q_INDEX], 349 queue->index[Q_INDEX],
350 queue->index[Q_INDEX_DONE], 350 queue->index[Q_INDEX_DMA_DONE],
351 queue->index[Q_INDEX_CRYPTO]); 351 queue->index[Q_INDEX_DONE]);
352 352
353 spin_unlock_irqrestore(&queue->lock, irqflags); 353 spin_unlock_irqrestore(&queue->lock, irqflags);
354 } 354 }
@@ -382,7 +382,7 @@ static ssize_t rt2x00debug_read_crypto_stats(struct file *file,
382 loff_t *offset) 382 loff_t *offset)
383{ 383{
384 struct rt2x00debug_intf *intf = file->private_data; 384 struct rt2x00debug_intf *intf = file->private_data;
385 char *name[] = { "WEP64", "WEP128", "TKIP", "AES" }; 385 static const char * const name[] = { "WEP64", "WEP128", "TKIP", "AES" };
386 char *data; 386 char *data;
387 char *temp; 387 char *temp;
388 size_t size; 388 size_t size;
@@ -484,6 +484,9 @@ static ssize_t rt2x00debug_write_##__name(struct file *file, \
484 if (index >= debug->__name.word_count) \ 484 if (index >= debug->__name.word_count) \
485 return -EINVAL; \ 485 return -EINVAL; \
486 \ 486 \
487 if (length > sizeof(line)) \
488 return -EINVAL; \
489 \
487 if (copy_from_user(line, buf, length)) \ 490 if (copy_from_user(line, buf, length)) \
488 return -EFAULT; \ 491 return -EFAULT; \
489 \ 492 \