* [PATCH 0/3] rt2x00 update @ 2008-07-27 13:05 Ivo van Doorn 2008-07-27 13:06 ` [PATCH 1/3] rt2x00: Fix access permissions on debugfs files Ivo van Doorn 0 siblings, 1 reply; 5+ messages in thread From: Ivo van Doorn @ 2008-07-27 13:05 UTC (permalink / raw) To: John Linville; +Cc: linux-wireless, rt2400-devel Hi John, Here are 3 patches for rt2x00 intended for the 2.6.27 kernel. It finally fixes the ifdown & ifup breakage in rt61pci, as well as a BUG_ON() which was triggered during such an ifdown & ifup cycle. Ivo ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] rt2x00: Fix access permissions on debugfs files 2008-07-27 13:05 [PATCH 0/3] rt2x00 update Ivo van Doorn @ 2008-07-27 13:06 ` Ivo van Doorn 2008-07-27 13:06 ` [PATCH 2/3] rt2x00: Fix partial antenna configuration Ivo van Doorn 0 siblings, 1 reply; 5+ messages in thread From: Ivo van Doorn @ 2008-07-27 13:06 UTC (permalink / raw) To: John Linville; +Cc: linux-wireless, rt2400-devel Although most rt2x00 debugfs files don't contain information which could compromise network security, it is better to set the access permissions to root only. This will be required when HW crypto is implemented, because it could be possible to read the HW key from the registers. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> --- 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 300cf06..6bee1d6 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, \ if (*offset) \ return 0; \ \ - if (!capable(CAP_NET_ADMIN)) \ - return -EPERM; \ - \ if (intf->offset_##__name >= debug->__name.word_count) \ return -EINVAL; \ \ @@ -454,7 +451,7 @@ static struct dentry *rt2x00debug_create_file_driver(const char *name, data += sprintf(data, "compiled: %s %s\n", __DATE__, __TIME__); blob->size = strlen(blob->data); - return debugfs_create_blob(name, S_IRUGO, intf->driver_folder, blob); + return debugfs_create_blob(name, S_IRUSR, intf->driver_folder, blob); } static struct dentry *rt2x00debug_create_file_chipset(const char *name, @@ -482,7 +479,7 @@ static struct dentry *rt2x00debug_create_file_chipset(const char *name, data += sprintf(data, "rf length: %d\n", debug->rf.word_count); blob->size = strlen(blob->data); - return debugfs_create_blob(name, S_IRUGO, intf->driver_folder, blob); + return debugfs_create_blob(name, S_IRUSR, intf->driver_folder, blob); } void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) @@ -517,7 +514,7 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) if (IS_ERR(intf->chipset_entry)) goto exit; - intf->dev_flags = debugfs_create_file("dev_flags", S_IRUGO, + intf->dev_flags = debugfs_create_file("dev_flags", S_IRUSR, intf->driver_folder, intf, &rt2x00debug_fop_dev_flags); if (IS_ERR(intf->dev_flags)) @@ -532,7 +529,7 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) ({ \ (__intf)->__name##_off_entry = \ debugfs_create_u32(__stringify(__name) "_offset", \ - S_IRUGO | S_IWUSR, \ + S_IRUSR | S_IWUSR, \ (__intf)->register_folder, \ &(__intf)->offset_##__name); \ if (IS_ERR((__intf)->__name##_off_entry)) \ @@ -540,7 +537,7 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) \ (__intf)->__name##_val_entry = \ debugfs_create_file(__stringify(__name) "_value", \ - S_IRUGO | S_IWUSR, \ + S_IRUSR | S_IWUSR, \ (__intf)->register_folder, \ (__intf), &rt2x00debug_fop_##__name);\ if (IS_ERR((__intf)->__name##_val_entry)) \ @@ -560,7 +557,7 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) goto exit; intf->queue_frame_dump_entry = - debugfs_create_file("dump", S_IRUGO, intf->queue_folder, + debugfs_create_file("dump", S_IRUSR, intf->queue_folder, intf, &rt2x00debug_fop_queue_dump); if (IS_ERR(intf->queue_frame_dump_entry)) goto exit; @@ -569,7 +566,7 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) init_waitqueue_head(&intf->frame_dump_waitqueue); intf->queue_stats_entry = - debugfs_create_file("queue", S_IRUGO, intf->queue_folder, + debugfs_create_file("queue", S_IRUSR, intf->queue_folder, intf, &rt2x00debug_fop_queue_stats); return; -- 1.5.6.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] rt2x00: Fix partial antenna configuration 2008-07-27 13:06 ` [PATCH 1/3] rt2x00: Fix access permissions on debugfs files Ivo van Doorn @ 2008-07-27 13:06 ` Ivo van Doorn 2008-07-27 13:06 ` [PATCH 3/3] rt2x00: rt61pci needs another millisecond after firmware upload Ivo van Doorn 0 siblings, 1 reply; 5+ messages in thread From: Ivo van Doorn @ 2008-07-27 13:06 UTC (permalink / raw) To: John Linville; +Cc: linux-wireless, rt2400-devel The if-statement to determine the new TX/RX antenna configuration was incomplete. It lacks the general else-clause when the antenna wasn't changed. This is a correct event, since it can occur when only one of the antenna's has been changed or when the new configuration is being forced (like when the interface has just been added). Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> --- drivers/net/wireless/rt2x00/rt2x00config.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c index 3f89516..d134c3b 100644 --- a/drivers/net/wireless/rt2x00/rt2x00config.c +++ b/drivers/net/wireless/rt2x00/rt2x00config.c @@ -254,6 +254,8 @@ config: libconf.ant.rx = default_ant->rx; else if (active_ant->rx == ANTENNA_SW_DIVERSITY) libconf.ant.rx = ANTENNA_B; + else + libconf.ant.rx = active_ant->rx; if (conf->antenna_sel_tx) libconf.ant.tx = conf->antenna_sel_tx; @@ -261,6 +263,8 @@ config: libconf.ant.tx = default_ant->tx; else if (active_ant->tx == ANTENNA_SW_DIVERSITY) libconf.ant.tx = ANTENNA_B; + else + libconf.ant.tx = active_ant->tx; } if (flags & CONFIG_UPDATE_SLOT_TIME) { -- 1.5.6.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] rt2x00: rt61pci needs another millisecond after firmware upload 2008-07-27 13:06 ` [PATCH 2/3] rt2x00: Fix partial antenna configuration Ivo van Doorn @ 2008-07-27 13:06 ` Ivo van Doorn 0 siblings, 0 replies; 5+ messages in thread From: Ivo van Doorn @ 2008-07-27 13:06 UTC (permalink / raw) To: John Linville; +Cc: linux-wireless, rt2400-devel After the hardware has indicated the firmware upload has completed and the device is ready, we should wait another millisecond to make sure the device is really ready to continue. Without this timout, bringing the interface down and up again will fail due to incorrect register initialization. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> --- drivers/net/wireless/rt2x00/rt61pci.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index ce772cc..4ee7bae 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c @@ -1004,6 +1004,11 @@ static int rt61pci_load_firmware(struct rt2x00_dev *rt2x00dev, void *data, } /* + * Hardware needs another millisecond before it is ready. + */ + msleep(1); + + /* * Reset MAC and BBP registers. */ reg = 0; -- 1.5.6.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 0/3] rt2x00 update @ 2008-07-09 13:11 Ivo van Doorn 0 siblings, 0 replies; 5+ messages in thread From: Ivo van Doorn @ 2008-07-09 13:11 UTC (permalink / raw) To: John W. Linville; +Cc: linux-wireless, rt2400-devel, Johannes Berg Hi John, The following 3 patches are intended on top of the patch series "mac80211 interface (config) cleanups" which were send to the list by Johannes. The first one is a mac80211 bugfix for drivers that require the sequence counting to be done in software. The second is a minor update for CTS protection support in rt2x00lib. There aren't any users for it at this time, but it is small, harmless and not really worth the effor for keepin it seperate. ;) The last one cleans up beacon handling in rt2x00 which was possible because of Johannes' patch series. Ivo ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-07-27 12:47 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-07-27 13:05 [PATCH 0/3] rt2x00 update Ivo van Doorn 2008-07-27 13:06 ` [PATCH 1/3] rt2x00: Fix access permissions on debugfs files Ivo van Doorn 2008-07-27 13:06 ` [PATCH 2/3] rt2x00: Fix partial antenna configuration Ivo van Doorn 2008-07-27 13:06 ` [PATCH 3/3] rt2x00: rt61pci needs another millisecond after firmware upload Ivo van Doorn -- strict thread matches above, loose matches on Subject: below -- 2008-07-09 13:11 [PATCH 0/3] rt2x00 update Ivo van Doorn
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).