diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/net-sysfs.c | 4 | ||||
-rw-r--r-- | net/core/pktgen.c | 4 | ||||
-rw-r--r-- | net/ipv4/devinet.c | 16 |
3 files changed, 14 insertions, 10 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 821d30918cfc..427ded841224 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -366,13 +366,13 @@ static ssize_t wireless_show(struct device *d, char *buf, | |||
366 | const struct iw_statistics *iw; | 366 | const struct iw_statistics *iw; |
367 | ssize_t ret = -EINVAL; | 367 | ssize_t ret = -EINVAL; |
368 | 368 | ||
369 | read_lock(&dev_base_lock); | 369 | rtnl_lock(); |
370 | if (dev_isalive(dev)) { | 370 | if (dev_isalive(dev)) { |
371 | iw = get_wireless_stats(dev); | 371 | iw = get_wireless_stats(dev); |
372 | if (iw) | 372 | if (iw) |
373 | ret = (*format)(iw, buf); | 373 | ret = (*format)(iw, buf); |
374 | } | 374 | } |
375 | read_unlock(&dev_base_lock); | 375 | rtnl_unlock(); |
376 | 376 | ||
377 | return ret; | 377 | return ret; |
378 | } | 378 | } |
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index b69455217ed6..86acdba0a97d 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() % |
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index e92f1fd28aa5..5df2f6a0b0f0 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -1077,12 +1077,16 @@ static int inetdev_event(struct notifier_block *this, unsigned long event, | |||
1077 | ip_mc_up(in_dev); | 1077 | ip_mc_up(in_dev); |
1078 | /* fall through */ | 1078 | /* fall through */ |
1079 | case NETDEV_CHANGEADDR: | 1079 | case NETDEV_CHANGEADDR: |
1080 | if (IN_DEV_ARP_NOTIFY(in_dev)) | 1080 | /* Send gratuitous ARP to notify of link change */ |
1081 | arp_send(ARPOP_REQUEST, ETH_P_ARP, | 1081 | if (IN_DEV_ARP_NOTIFY(in_dev)) { |
1082 | in_dev->ifa_list->ifa_address, | 1082 | struct in_ifaddr *ifa = in_dev->ifa_list; |
1083 | dev, | 1083 | |
1084 | in_dev->ifa_list->ifa_address, | 1084 | if (ifa) |
1085 | NULL, dev->dev_addr, NULL); | 1085 | arp_send(ARPOP_REQUEST, ETH_P_ARP, |
1086 | ifa->ifa_address, dev, | ||
1087 | ifa->ifa_address, NULL, | ||
1088 | dev->dev_addr, NULL); | ||
1089 | } | ||
1086 | break; | 1090 | break; |
1087 | case NETDEV_DOWN: | 1091 | case NETDEV_DOWN: |
1088 | ip_mc_down(in_dev); | 1092 | ip_mc_down(in_dev); |