diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-05 22:37:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-05 22:37:42 -0400 |
commit | e63e03273b89f7248baa56cf242474f661e776e1 (patch) | |
tree | 7e0a000ed3b252849b9002306ba479074c165330 /drivers/net/wireless/rt2x00/rt2x00debug.c | |
parent | 37193fb4639fa94f91cbbab1e8aca596300e1d94 (diff) | |
parent | ffb208479bd62ab26c29a242faeb1de1c6d5fcdc (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (78 commits)
AX.25: Fix sysctl registration if !CONFIG_AX25_DAMA_SLAVE
pktgen: mac count
pktgen: random flow
bridge: Eliminate unnecessary forward delay
bridge: fix compile warning in net/bridge/br_netfilter.c
ipv4: remove unused field in struct flowi (include/net/flow.h).
tg3: Fix 'scheduling while atomic' errors
net: Kill plain NET_XMIT_BYPASS.
net_sched: Add qdisc __NET_XMIT_BYPASS flag
net_sched: Add qdisc __NET_XMIT_STOLEN flag
iwl3945: fix merge mistake for packet injection
iwlwifi: grap nic access before accessing periphery registers
iwlwifi: decrement rx skb counter in scan abort handler
iwlwifi: fix unhandled interrupt when HW rfkill is on
iwlwifi: implement iwl5000_calc_rssi
iwlwifi: memory allocation optimization
iwlwifi: HW bug fixes
p54: Fix potential concurrent access to private data
rt2x00: Disable link tuning in rt2500usb
iwlwifi: Don't use buffer allocated on the stack for led names
...
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00debug.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00debug.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.c b/drivers/net/wireless/rt2x00/rt2x00debug.c index 300cf061035f..6bee1d611bbf 100644 --- a/drivers/net/wireless/rt2x00/rt2x00debug.c +++ b/drivers/net/wireless/rt2x00/rt2x00debug.c | |||
@@ -372,9 +372,6 @@ static ssize_t rt2x00debug_write_##__name(struct file *file, \ | |||
372 | if (*offset) \ | 372 | if (*offset) \ |
373 | return 0; \ | 373 | return 0; \ |
374 | \ | 374 | \ |
375 | if (!capable(CAP_NET_ADMIN)) \ | ||
376 | return -EPERM; \ | ||
377 | \ | ||
378 | if (intf->offset_##__name >= debug->__name.word_count) \ | 375 | if (intf->offset_##__name >= debug->__name.word_count) \ |
379 | return -EINVAL; \ | 376 | return -EINVAL; \ |
380 | \ | 377 | \ |
@@ -454,7 +451,7 @@ static struct dentry *rt2x00debug_create_file_driver(const char *name, | |||
454 | data += sprintf(data, "compiled: %s %s\n", __DATE__, __TIME__); | 451 | data += sprintf(data, "compiled: %s %s\n", __DATE__, __TIME__); |
455 | blob->size = strlen(blob->data); | 452 | blob->size = strlen(blob->data); |
456 | 453 | ||
457 | return debugfs_create_blob(name, S_IRUGO, intf->driver_folder, blob); | 454 | return debugfs_create_blob(name, S_IRUSR, intf->driver_folder, blob); |
458 | } | 455 | } |
459 | 456 | ||
460 | static struct dentry *rt2x00debug_create_file_chipset(const char *name, | 457 | static struct dentry *rt2x00debug_create_file_chipset(const char *name, |
@@ -482,7 +479,7 @@ static struct dentry *rt2x00debug_create_file_chipset(const char *name, | |||
482 | data += sprintf(data, "rf length: %d\n", debug->rf.word_count); | 479 | data += sprintf(data, "rf length: %d\n", debug->rf.word_count); |
483 | blob->size = strlen(blob->data); | 480 | blob->size = strlen(blob->data); |
484 | 481 | ||
485 | return debugfs_create_blob(name, S_IRUGO, intf->driver_folder, blob); | 482 | return debugfs_create_blob(name, S_IRUSR, intf->driver_folder, blob); |
486 | } | 483 | } |
487 | 484 | ||
488 | void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) | 485 | void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) |
@@ -517,7 +514,7 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) | |||
517 | if (IS_ERR(intf->chipset_entry)) | 514 | if (IS_ERR(intf->chipset_entry)) |
518 | goto exit; | 515 | goto exit; |
519 | 516 | ||
520 | intf->dev_flags = debugfs_create_file("dev_flags", S_IRUGO, | 517 | intf->dev_flags = debugfs_create_file("dev_flags", S_IRUSR, |
521 | intf->driver_folder, intf, | 518 | intf->driver_folder, intf, |
522 | &rt2x00debug_fop_dev_flags); | 519 | &rt2x00debug_fop_dev_flags); |
523 | if (IS_ERR(intf->dev_flags)) | 520 | if (IS_ERR(intf->dev_flags)) |
@@ -532,7 +529,7 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) | |||
532 | ({ \ | 529 | ({ \ |
533 | (__intf)->__name##_off_entry = \ | 530 | (__intf)->__name##_off_entry = \ |
534 | debugfs_create_u32(__stringify(__name) "_offset", \ | 531 | debugfs_create_u32(__stringify(__name) "_offset", \ |
535 | S_IRUGO | S_IWUSR, \ | 532 | S_IRUSR | S_IWUSR, \ |
536 | (__intf)->register_folder, \ | 533 | (__intf)->register_folder, \ |
537 | &(__intf)->offset_##__name); \ | 534 | &(__intf)->offset_##__name); \ |
538 | if (IS_ERR((__intf)->__name##_off_entry)) \ | 535 | if (IS_ERR((__intf)->__name##_off_entry)) \ |
@@ -540,7 +537,7 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) | |||
540 | \ | 537 | \ |
541 | (__intf)->__name##_val_entry = \ | 538 | (__intf)->__name##_val_entry = \ |
542 | debugfs_create_file(__stringify(__name) "_value", \ | 539 | debugfs_create_file(__stringify(__name) "_value", \ |
543 | S_IRUGO | S_IWUSR, \ | 540 | S_IRUSR | S_IWUSR, \ |
544 | (__intf)->register_folder, \ | 541 | (__intf)->register_folder, \ |
545 | (__intf), &rt2x00debug_fop_##__name);\ | 542 | (__intf), &rt2x00debug_fop_##__name);\ |
546 | if (IS_ERR((__intf)->__name##_val_entry)) \ | 543 | if (IS_ERR((__intf)->__name##_val_entry)) \ |
@@ -560,7 +557,7 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) | |||
560 | goto exit; | 557 | goto exit; |
561 | 558 | ||
562 | intf->queue_frame_dump_entry = | 559 | intf->queue_frame_dump_entry = |
563 | debugfs_create_file("dump", S_IRUGO, intf->queue_folder, | 560 | debugfs_create_file("dump", S_IRUSR, intf->queue_folder, |
564 | intf, &rt2x00debug_fop_queue_dump); | 561 | intf, &rt2x00debug_fop_queue_dump); |
565 | if (IS_ERR(intf->queue_frame_dump_entry)) | 562 | if (IS_ERR(intf->queue_frame_dump_entry)) |
566 | goto exit; | 563 | goto exit; |
@@ -569,7 +566,7 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) | |||
569 | init_waitqueue_head(&intf->frame_dump_waitqueue); | 566 | init_waitqueue_head(&intf->frame_dump_waitqueue); |
570 | 567 | ||
571 | intf->queue_stats_entry = | 568 | intf->queue_stats_entry = |
572 | debugfs_create_file("queue", S_IRUGO, intf->queue_folder, | 569 | debugfs_create_file("queue", S_IRUSR, intf->queue_folder, |
573 | intf, &rt2x00debug_fop_queue_stats); | 570 | intf, &rt2x00debug_fop_queue_stats); |
574 | 571 | ||
575 | return; | 572 | return; |