aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-10-07 01:43:16 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-07 01:43:16 -0400
commit7ecc59c1b7fd5749667fc31f8683099cbef38977 (patch)
tree560d8ce48fac50758d1af6d722bc0bb0c7de2a34 /net
parentbcdce7195e0eab55b37dbd53be53057f38006380 (diff)
parent1cec9727fbfd7baff2034796154be1a0297bcedd (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net')
-rw-r--r--net/core/net-sysfs.c4
-rw-r--r--net/core/pktgen.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index effb78410eb2..4242e94ff1a5 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -406,13 +406,13 @@ static ssize_t wireless_show(struct device *d, char *buf,
406 const struct iw_statistics *iw; 406 const struct iw_statistics *iw;
407 ssize_t ret = -EINVAL; 407 ssize_t ret = -EINVAL;
408 408
409 read_lock(&dev_base_lock); 409 rtnl_lock();
410 if (dev_isalive(dev)) { 410 if (dev_isalive(dev)) {
411 iw = get_wireless_stats(dev); 411 iw = get_wireless_stats(dev);
412 if (iw) 412 if (iw)
413 ret = (*format)(iw, buf); 413 ret = (*format)(iw, buf);
414 } 414 }
415 read_unlock(&dev_base_lock); 415 rtnl_unlock();
416 416
417 return ret; 417 return ret;
418} 418}
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index e856ab0d0745..1da0e038df78 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -964,7 +964,7 @@ static ssize_t pktgen_if_write(struct file *file,
964 if (value == 0x7FFFFFFF) 964 if (value == 0x7FFFFFFF)
965 pkt_dev->delay = ULLONG_MAX; 965 pkt_dev->delay = ULLONG_MAX;
966 else 966 else
967 pkt_dev->delay = (u64)value * NSEC_PER_USEC; 967 pkt_dev->delay = (u64)value;
968 968
969 sprintf(pg_result, "OK: delay=%llu", 969 sprintf(pg_result, "OK: delay=%llu",
970 (unsigned long long) pkt_dev->delay); 970 (unsigned long long) pkt_dev->delay);
@@ -2212,7 +2212,7 @@ static void set_cur_queue_map(struct pktgen_dev *pkt_dev)
2212 if (pkt_dev->flags & F_QUEUE_MAP_CPU) 2212 if (pkt_dev->flags & F_QUEUE_MAP_CPU)
2213 pkt_dev->cur_queue_map = smp_processor_id(); 2213 pkt_dev->cur_queue_map = smp_processor_id();
2214 2214
2215 else if (pkt_dev->queue_map_min < pkt_dev->queue_map_max) { 2215 else if (pkt_dev->queue_map_min <= pkt_dev->queue_map_max) {
2216 __u16 t; 2216 __u16 t;
2217 if (pkt_dev->flags & F_QUEUE_MAP_RND) { 2217 if (pkt_dev->flags & F_QUEUE_MAP_RND) {
2218 t = random32() % 2218 t = random32() %