diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/pktgen.c | 9 | ||||
-rw-r--r-- | net/ipv4/af_inet.c | 1 | ||||
-rw-r--r-- | net/ipv4/ipmr.c | 9 | ||||
-rw-r--r-- | net/ipv4/udp.c | 1 | ||||
-rw-r--r-- | net/ipv6/ip6mr.c | 4 | ||||
-rw-r--r-- | net/ipv6/proc.c | 6 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 22 | ||||
-rw-r--r-- | net/phonet/af_phonet.c | 52 | ||||
-rw-r--r-- | net/sched/sch_api.c | 2 | ||||
-rw-r--r-- | net/sched/sch_generic.c | 7 |
10 files changed, 46 insertions, 67 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index a47f5bad110d..8997e912aaaf 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -1973,13 +1973,7 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev) | |||
1973 | 1973 | ||
1974 | /* make sure that we don't pick a non-existing transmit queue */ | 1974 | /* make sure that we don't pick a non-existing transmit queue */ |
1975 | ntxq = pkt_dev->odev->real_num_tx_queues; | 1975 | ntxq = pkt_dev->odev->real_num_tx_queues; |
1976 | if (ntxq > num_online_cpus() && (pkt_dev->flags & F_QUEUE_MAP_CPU)) { | 1976 | |
1977 | printk(KERN_WARNING "pktgen: WARNING: QUEUE_MAP_CPU " | ||
1978 | "disabled because CPU count (%d) exceeds number " | ||
1979 | "of tx queues (%d) on %s\n", num_online_cpus(), ntxq, | ||
1980 | pkt_dev->odev->name); | ||
1981 | pkt_dev->flags &= ~F_QUEUE_MAP_CPU; | ||
1982 | } | ||
1983 | if (ntxq <= pkt_dev->queue_map_min) { | 1977 | if (ntxq <= pkt_dev->queue_map_min) { |
1984 | printk(KERN_WARNING "pktgen: WARNING: Requested " | 1978 | printk(KERN_WARNING "pktgen: WARNING: Requested " |
1985 | "queue_map_min (zero-based) (%d) exceeds valid range " | 1979 | "queue_map_min (zero-based) (%d) exceeds valid range " |
@@ -2202,6 +2196,7 @@ static void set_cur_queue_map(struct pktgen_dev *pkt_dev) | |||
2202 | } | 2196 | } |
2203 | pkt_dev->cur_queue_map = t; | 2197 | pkt_dev->cur_queue_map = t; |
2204 | } | 2198 | } |
2199 | pkt_dev->cur_queue_map = pkt_dev->cur_queue_map % pkt_dev->odev->real_num_tx_queues; | ||
2205 | } | 2200 | } |
2206 | 2201 | ||
2207 | /* Increment/randomize headers according to flags and current values | 2202 | /* Increment/randomize headers according to flags and current values |
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 1fbff5fa4241..1aa2dc9e380e 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -1117,6 +1117,7 @@ int inet_sk_rebuild_header(struct sock *sk) | |||
1117 | }, | 1117 | }, |
1118 | }, | 1118 | }, |
1119 | .proto = sk->sk_protocol, | 1119 | .proto = sk->sk_protocol, |
1120 | .flags = inet_sk_flowi_flags(sk), | ||
1120 | .uli_u = { | 1121 | .uli_u = { |
1121 | .ports = { | 1122 | .ports = { |
1122 | .sport = inet->sport, | 1123 | .sport = inet->sport, |
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index b42e082cc170..25924b1eb2ef 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -1945,13 +1945,14 @@ int __init ip_mr_init(void) | |||
1945 | goto proc_cache_fail; | 1945 | goto proc_cache_fail; |
1946 | #endif | 1946 | #endif |
1947 | return 0; | 1947 | return 0; |
1948 | reg_notif_fail: | ||
1949 | kmem_cache_destroy(mrt_cachep); | ||
1950 | #ifdef CONFIG_PROC_FS | 1948 | #ifdef CONFIG_PROC_FS |
1951 | proc_vif_fail: | ||
1952 | unregister_netdevice_notifier(&ip_mr_notifier); | ||
1953 | proc_cache_fail: | 1949 | proc_cache_fail: |
1954 | proc_net_remove(&init_net, "ip_mr_vif"); | 1950 | proc_net_remove(&init_net, "ip_mr_vif"); |
1951 | proc_vif_fail: | ||
1952 | unregister_netdevice_notifier(&ip_mr_notifier); | ||
1955 | #endif | 1953 | #endif |
1954 | reg_notif_fail: | ||
1955 | del_timer(&ipmr_expire_timer); | ||
1956 | kmem_cache_destroy(mrt_cachep); | ||
1956 | return err; | 1957 | return err; |
1957 | } | 1958 | } |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index cf02701ced48..98c1fd09be88 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -633,6 +633,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
633 | .saddr = saddr, | 633 | .saddr = saddr, |
634 | .tos = tos } }, | 634 | .tos = tos } }, |
635 | .proto = sk->sk_protocol, | 635 | .proto = sk->sk_protocol, |
636 | .flags = inet_sk_flowi_flags(sk), | ||
636 | .uli_u = { .ports = | 637 | .uli_u = { .ports = |
637 | { .sport = inet->sport, | 638 | { .sport = inet->sport, |
638 | .dport = dport } } }; | 639 | .dport = dport } } }; |
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 52a7eb0e2c2c..0524769632e7 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -224,7 +224,7 @@ static struct file_operations ip6mr_vif_fops = { | |||
224 | .open = ip6mr_vif_open, | 224 | .open = ip6mr_vif_open, |
225 | .read = seq_read, | 225 | .read = seq_read, |
226 | .llseek = seq_lseek, | 226 | .llseek = seq_lseek, |
227 | .release = seq_release, | 227 | .release = seq_release_private, |
228 | }; | 228 | }; |
229 | 229 | ||
230 | static void *ipmr_mfc_seq_start(struct seq_file *seq, loff_t *pos) | 230 | static void *ipmr_mfc_seq_start(struct seq_file *seq, loff_t *pos) |
@@ -338,7 +338,7 @@ static struct file_operations ip6mr_mfc_fops = { | |||
338 | .open = ipmr_mfc_open, | 338 | .open = ipmr_mfc_open, |
339 | .read = seq_read, | 339 | .read = seq_read, |
340 | .llseek = seq_lseek, | 340 | .llseek = seq_lseek, |
341 | .release = seq_release, | 341 | .release = seq_release_private, |
342 | }; | 342 | }; |
343 | #endif | 343 | #endif |
344 | 344 | ||
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index 07f0b76e7427..97c17fdd6f75 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c | |||
@@ -132,7 +132,7 @@ static struct snmp_mib snmp6_udplite6_list[] = { | |||
132 | 132 | ||
133 | static void snmp6_seq_show_icmpv6msg(struct seq_file *seq, void **mib) | 133 | static void snmp6_seq_show_icmpv6msg(struct seq_file *seq, void **mib) |
134 | { | 134 | { |
135 | static char name[32]; | 135 | char name[32]; |
136 | int i; | 136 | int i; |
137 | 137 | ||
138 | /* print by name -- deprecated items */ | 138 | /* print by name -- deprecated items */ |
@@ -144,7 +144,7 @@ static void snmp6_seq_show_icmpv6msg(struct seq_file *seq, void **mib) | |||
144 | p = icmp6type2name[icmptype]; | 144 | p = icmp6type2name[icmptype]; |
145 | if (!p) /* don't print un-named types here */ | 145 | if (!p) /* don't print un-named types here */ |
146 | continue; | 146 | continue; |
147 | (void) snprintf(name, sizeof(name)-1, "Icmp6%s%s", | 147 | snprintf(name, sizeof(name), "Icmp6%s%s", |
148 | i & 0x100 ? "Out" : "In", p); | 148 | i & 0x100 ? "Out" : "In", p); |
149 | seq_printf(seq, "%-32s\t%lu\n", name, | 149 | seq_printf(seq, "%-32s\t%lu\n", name, |
150 | snmp_fold_field(mib, i)); | 150 | snmp_fold_field(mib, i)); |
@@ -157,7 +157,7 @@ static void snmp6_seq_show_icmpv6msg(struct seq_file *seq, void **mib) | |||
157 | val = snmp_fold_field(mib, i); | 157 | val = snmp_fold_field(mib, i); |
158 | if (!val) | 158 | if (!val) |
159 | continue; | 159 | continue; |
160 | (void) snprintf(name, sizeof(name)-1, "Icmp6%sType%u", | 160 | snprintf(name, sizeof(name), "Icmp6%sType%u", |
161 | i & 0x100 ? "Out" : "In", i & 0xff); | 161 | i & 0x100 ? "Out" : "In", i & 0xff); |
162 | seq_printf(seq, "%-32s\t%lu\n", name, val); | 162 | seq_printf(seq, "%-32s\t%lu\n", name, val); |
163 | } | 163 | } |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 14d165f0df75..409bb7716236 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -2560,25 +2560,3 @@ void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local) | |||
2560 | ieee80211_restart_sta_timer(sdata); | 2560 | ieee80211_restart_sta_timer(sdata); |
2561 | rcu_read_unlock(); | 2561 | rcu_read_unlock(); |
2562 | } | 2562 | } |
2563 | |||
2564 | /* driver notification call */ | ||
2565 | void ieee80211_notify_mac(struct ieee80211_hw *hw, | ||
2566 | enum ieee80211_notification_types notif_type) | ||
2567 | { | ||
2568 | struct ieee80211_local *local = hw_to_local(hw); | ||
2569 | struct ieee80211_sub_if_data *sdata; | ||
2570 | |||
2571 | switch (notif_type) { | ||
2572 | case IEEE80211_NOTIFY_RE_ASSOC: | ||
2573 | rtnl_lock(); | ||
2574 | list_for_each_entry(sdata, &local->interfaces, list) { | ||
2575 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | ||
2576 | continue; | ||
2577 | |||
2578 | ieee80211_sta_req_auth(sdata, &sdata->u.sta); | ||
2579 | } | ||
2580 | rtnl_unlock(); | ||
2581 | break; | ||
2582 | } | ||
2583 | } | ||
2584 | EXPORT_SYMBOL(ieee80211_notify_mac); | ||
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c index 7ab30f668b5a..9d211f12582b 100644 --- a/net/phonet/af_phonet.c +++ b/net/phonet/af_phonet.c | |||
@@ -33,9 +33,30 @@ | |||
33 | #include <net/phonet/phonet.h> | 33 | #include <net/phonet/phonet.h> |
34 | #include <net/phonet/pn_dev.h> | 34 | #include <net/phonet/pn_dev.h> |
35 | 35 | ||
36 | static struct net_proto_family phonet_proto_family; | 36 | /* Transport protocol registration */ |
37 | static struct phonet_protocol *phonet_proto_get(int protocol); | 37 | static struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly; |
38 | static inline void phonet_proto_put(struct phonet_protocol *pp); | 38 | static DEFINE_SPINLOCK(proto_tab_lock); |
39 | |||
40 | static struct phonet_protocol *phonet_proto_get(int protocol) | ||
41 | { | ||
42 | struct phonet_protocol *pp; | ||
43 | |||
44 | if (protocol >= PHONET_NPROTO) | ||
45 | return NULL; | ||
46 | |||
47 | spin_lock(&proto_tab_lock); | ||
48 | pp = proto_tab[protocol]; | ||
49 | if (pp && !try_module_get(pp->prot->owner)) | ||
50 | pp = NULL; | ||
51 | spin_unlock(&proto_tab_lock); | ||
52 | |||
53 | return pp; | ||
54 | } | ||
55 | |||
56 | static inline void phonet_proto_put(struct phonet_protocol *pp) | ||
57 | { | ||
58 | module_put(pp->prot->owner); | ||
59 | } | ||
39 | 60 | ||
40 | /* protocol family functions */ | 61 | /* protocol family functions */ |
41 | 62 | ||
@@ -375,10 +396,6 @@ static struct packet_type phonet_packet_type = { | |||
375 | .func = phonet_rcv, | 396 | .func = phonet_rcv, |
376 | }; | 397 | }; |
377 | 398 | ||
378 | /* Transport protocol registration */ | ||
379 | static struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly; | ||
380 | static DEFINE_SPINLOCK(proto_tab_lock); | ||
381 | |||
382 | int __init_or_module phonet_proto_register(int protocol, | 399 | int __init_or_module phonet_proto_register(int protocol, |
383 | struct phonet_protocol *pp) | 400 | struct phonet_protocol *pp) |
384 | { | 401 | { |
@@ -412,27 +429,6 @@ void phonet_proto_unregister(int protocol, struct phonet_protocol *pp) | |||
412 | } | 429 | } |
413 | EXPORT_SYMBOL(phonet_proto_unregister); | 430 | EXPORT_SYMBOL(phonet_proto_unregister); |
414 | 431 | ||
415 | static struct phonet_protocol *phonet_proto_get(int protocol) | ||
416 | { | ||
417 | struct phonet_protocol *pp; | ||
418 | |||
419 | if (protocol >= PHONET_NPROTO) | ||
420 | return NULL; | ||
421 | |||
422 | spin_lock(&proto_tab_lock); | ||
423 | pp = proto_tab[protocol]; | ||
424 | if (pp && !try_module_get(pp->prot->owner)) | ||
425 | pp = NULL; | ||
426 | spin_unlock(&proto_tab_lock); | ||
427 | |||
428 | return pp; | ||
429 | } | ||
430 | |||
431 | static inline void phonet_proto_put(struct phonet_protocol *pp) | ||
432 | { | ||
433 | module_put(pp->prot->owner); | ||
434 | } | ||
435 | |||
436 | /* Module registration */ | 432 | /* Module registration */ |
437 | static int __init phonet_init(void) | 433 | static int __init phonet_init(void) |
438 | { | 434 | { |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index b16ad2972c6b..6ab4a2f92ca0 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -417,6 +417,8 @@ static int qdisc_dump_stab(struct sk_buff *skb, struct qdisc_size_table *stab) | |||
417 | struct nlattr *nest; | 417 | struct nlattr *nest; |
418 | 418 | ||
419 | nest = nla_nest_start(skb, TCA_STAB); | 419 | nest = nla_nest_start(skb, TCA_STAB); |
420 | if (nest == NULL) | ||
421 | goto nla_put_failure; | ||
420 | NLA_PUT(skb, TCA_STAB_BASE, sizeof(stab->szopts), &stab->szopts); | 422 | NLA_PUT(skb, TCA_STAB_BASE, sizeof(stab->szopts), &stab->szopts); |
421 | nla_nest_end(skb, nest); | 423 | nla_nest_end(skb, nest); |
422 | 424 | ||
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 93cd30ce6501..cdcd16fcfeda 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -270,6 +270,8 @@ static void dev_watchdog_down(struct net_device *dev) | |||
270 | void netif_carrier_on(struct net_device *dev) | 270 | void netif_carrier_on(struct net_device *dev) |
271 | { | 271 | { |
272 | if (test_and_clear_bit(__LINK_STATE_NOCARRIER, &dev->state)) { | 272 | if (test_and_clear_bit(__LINK_STATE_NOCARRIER, &dev->state)) { |
273 | if (dev->reg_state == NETREG_UNINITIALIZED) | ||
274 | return; | ||
273 | linkwatch_fire_event(dev); | 275 | linkwatch_fire_event(dev); |
274 | if (netif_running(dev)) | 276 | if (netif_running(dev)) |
275 | __netdev_watchdog_up(dev); | 277 | __netdev_watchdog_up(dev); |
@@ -285,8 +287,11 @@ EXPORT_SYMBOL(netif_carrier_on); | |||
285 | */ | 287 | */ |
286 | void netif_carrier_off(struct net_device *dev) | 288 | void netif_carrier_off(struct net_device *dev) |
287 | { | 289 | { |
288 | if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state)) | 290 | if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state)) { |
291 | if (dev->reg_state == NETREG_UNINITIALIZED) | ||
292 | return; | ||
289 | linkwatch_fire_event(dev); | 293 | linkwatch_fire_event(dev); |
294 | } | ||
290 | } | 295 | } |
291 | EXPORT_SYMBOL(netif_carrier_off); | 296 | EXPORT_SYMBOL(netif_carrier_off); |
292 | 297 | ||