diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/bfin_mac.h | 1 | ||||
| -rw-r--r-- | include/linux/etherdevice.h | 4 | ||||
| -rw-r--r-- | include/linux/fec.h | 3 | ||||
| -rw-r--r-- | include/linux/if_bridge.h | 2 | ||||
| -rw-r--r-- | include/linux/netdevice.h | 24 | ||||
| -rw-r--r-- | include/linux/netfilter/x_tables.h | 10 | ||||
| -rw-r--r-- | include/net/ah.h | 2 | ||||
| -rw-r--r-- | include/net/arp.h | 1 | ||||
| -rw-r--r-- | include/net/phonet/phonet.h | 4 | ||||
| -rw-r--r-- | include/net/sch_generic.h | 20 | ||||
| -rw-r--r-- | include/net/sock.h | 4 |
11 files changed, 46 insertions, 29 deletions
diff --git a/include/linux/bfin_mac.h b/include/linux/bfin_mac.h index 904dec7d03a1..a69554ef8476 100644 --- a/include/linux/bfin_mac.h +++ b/include/linux/bfin_mac.h | |||
| @@ -24,6 +24,7 @@ struct bfin_mii_bus_platform_data { | |||
| 24 | const unsigned short *mac_peripherals; | 24 | const unsigned short *mac_peripherals; |
| 25 | int phy_mode; | 25 | int phy_mode; |
| 26 | unsigned int phy_mask; | 26 | unsigned int phy_mask; |
| 27 | unsigned short vlan1_mask, vlan2_mask; | ||
| 27 | }; | 28 | }; |
| 28 | 29 | ||
| 29 | #endif | 30 | #endif |
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index f16a01081e15..bec8b82889bf 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
| @@ -48,8 +48,10 @@ extern int eth_validate_addr(struct net_device *dev); | |||
| 48 | 48 | ||
| 49 | 49 | ||
| 50 | 50 | ||
| 51 | extern struct net_device *alloc_etherdev_mq(int sizeof_priv, unsigned int queue_count); | 51 | extern struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs, |
| 52 | unsigned int rxqs); | ||
| 52 | #define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1) | 53 | #define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1) |
| 54 | #define alloc_etherdev_mq(sizeof_priv, count) alloc_etherdev_mqs(sizeof_priv, count, count) | ||
| 53 | 55 | ||
| 54 | /** | 56 | /** |
| 55 | * is_zero_ether_addr - Determine if give Ethernet address is all zeros. | 57 | * is_zero_ether_addr - Determine if give Ethernet address is all zeros. |
diff --git a/include/linux/fec.h b/include/linux/fec.h index 5d3523d8dd0c..bcff455d1d53 100644 --- a/include/linux/fec.h +++ b/include/linux/fec.h | |||
| @@ -3,6 +3,8 @@ | |||
| 3 | * Copyright (c) 2009 Orex Computed Radiography | 3 | * Copyright (c) 2009 Orex Computed Radiography |
| 4 | * Baruch Siach <baruch@tkos.co.il> | 4 | * Baruch Siach <baruch@tkos.co.il> |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2010 Freescale Semiconductor, Inc. | ||
| 7 | * | ||
| 6 | * Header file for the FEC platform data | 8 | * Header file for the FEC platform data |
| 7 | * | 9 | * |
| 8 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
| @@ -16,6 +18,7 @@ | |||
| 16 | 18 | ||
| 17 | struct fec_platform_data { | 19 | struct fec_platform_data { |
| 18 | phy_interface_t phy; | 20 | phy_interface_t phy; |
| 21 | unsigned char mac[ETH_ALEN]; | ||
| 19 | }; | 22 | }; |
| 20 | 23 | ||
| 21 | #endif | 24 | #endif |
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index f7e73c338c40..dd3f20139640 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h | |||
| @@ -103,7 +103,7 @@ struct __fdb_entry { | |||
| 103 | 103 | ||
| 104 | extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *)); | 104 | extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *)); |
| 105 | 105 | ||
| 106 | typedef int (*br_should_route_hook_t)(struct sk_buff *skb); | 106 | typedef int br_should_route_hook_t(struct sk_buff *skb); |
| 107 | extern br_should_route_hook_t __rcu *br_should_route_hook; | 107 | extern br_should_route_hook_t __rcu *br_should_route_hook; |
| 108 | 108 | ||
| 109 | #endif | 109 | #endif |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 0f6b1c965815..be4957cf6511 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -2191,11 +2191,15 @@ static inline void netif_addr_unlock_bh(struct net_device *dev) | |||
| 2191 | extern void ether_setup(struct net_device *dev); | 2191 | extern void ether_setup(struct net_device *dev); |
| 2192 | 2192 | ||
| 2193 | /* Support for loadable net-drivers */ | 2193 | /* Support for loadable net-drivers */ |
| 2194 | extern struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, | 2194 | extern struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, |
| 2195 | void (*setup)(struct net_device *), | 2195 | void (*setup)(struct net_device *), |
| 2196 | unsigned int queue_count); | 2196 | unsigned int txqs, unsigned int rxqs); |
| 2197 | #define alloc_netdev(sizeof_priv, name, setup) \ | 2197 | #define alloc_netdev(sizeof_priv, name, setup) \ |
| 2198 | alloc_netdev_mq(sizeof_priv, name, setup, 1) | 2198 | alloc_netdev_mqs(sizeof_priv, name, setup, 1, 1) |
| 2199 | |||
| 2200 | #define alloc_netdev_mq(sizeof_priv, name, setup, count) \ | ||
| 2201 | alloc_netdev_mqs(sizeof_priv, name, setup, count, count) | ||
| 2202 | |||
| 2199 | extern int register_netdev(struct net_device *dev); | 2203 | extern int register_netdev(struct net_device *dev); |
| 2200 | extern void unregister_netdev(struct net_device *dev); | 2204 | extern void unregister_netdev(struct net_device *dev); |
| 2201 | 2205 | ||
| @@ -2303,7 +2307,7 @@ unsigned long netdev_fix_features(unsigned long features, const char *name); | |||
| 2303 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, | 2307 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, |
| 2304 | struct net_device *dev); | 2308 | struct net_device *dev); |
| 2305 | 2309 | ||
| 2306 | int netif_get_vlan_features(struct sk_buff *skb, struct net_device *dev); | 2310 | int netif_skb_features(struct sk_buff *skb); |
| 2307 | 2311 | ||
| 2308 | static inline int net_gso_ok(int features, int gso_type) | 2312 | static inline int net_gso_ok(int features, int gso_type) |
| 2309 | { | 2313 | { |
| @@ -2317,16 +2321,10 @@ static inline int skb_gso_ok(struct sk_buff *skb, int features) | |||
| 2317 | (!skb_has_frag_list(skb) || (features & NETIF_F_FRAGLIST)); | 2321 | (!skb_has_frag_list(skb) || (features & NETIF_F_FRAGLIST)); |
| 2318 | } | 2322 | } |
| 2319 | 2323 | ||
| 2320 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) | 2324 | static inline int netif_needs_gso(struct sk_buff *skb, int features) |
| 2321 | { | 2325 | { |
| 2322 | if (skb_is_gso(skb)) { | 2326 | return skb_is_gso(skb) && (!skb_gso_ok(skb, features) || |
| 2323 | int features = netif_get_vlan_features(skb, dev); | 2327 | unlikely(skb->ip_summed != CHECKSUM_PARTIAL)); |
| 2324 | |||
| 2325 | return (!skb_gso_ok(skb, features) || | ||
| 2326 | unlikely(skb->ip_summed != CHECKSUM_PARTIAL)); | ||
| 2327 | } | ||
| 2328 | |||
| 2329 | return 0; | ||
| 2330 | } | 2328 | } |
| 2331 | 2329 | ||
| 2332 | static inline void netif_set_gso_max_size(struct net_device *dev, | 2330 | static inline void netif_set_gso_max_size(struct net_device *dev, |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 742bec051440..6712e713b299 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
| @@ -472,7 +472,7 @@ extern void xt_free_table_info(struct xt_table_info *info); | |||
| 472 | * necessary for reading the counters. | 472 | * necessary for reading the counters. |
| 473 | */ | 473 | */ |
| 474 | struct xt_info_lock { | 474 | struct xt_info_lock { |
| 475 | spinlock_t lock; | 475 | seqlock_t lock; |
| 476 | unsigned char readers; | 476 | unsigned char readers; |
| 477 | }; | 477 | }; |
| 478 | DECLARE_PER_CPU(struct xt_info_lock, xt_info_locks); | 478 | DECLARE_PER_CPU(struct xt_info_lock, xt_info_locks); |
| @@ -497,7 +497,7 @@ static inline void xt_info_rdlock_bh(void) | |||
| 497 | local_bh_disable(); | 497 | local_bh_disable(); |
| 498 | lock = &__get_cpu_var(xt_info_locks); | 498 | lock = &__get_cpu_var(xt_info_locks); |
| 499 | if (likely(!lock->readers++)) | 499 | if (likely(!lock->readers++)) |
| 500 | spin_lock(&lock->lock); | 500 | write_seqlock(&lock->lock); |
| 501 | } | 501 | } |
| 502 | 502 | ||
| 503 | static inline void xt_info_rdunlock_bh(void) | 503 | static inline void xt_info_rdunlock_bh(void) |
| @@ -505,7 +505,7 @@ static inline void xt_info_rdunlock_bh(void) | |||
| 505 | struct xt_info_lock *lock = &__get_cpu_var(xt_info_locks); | 505 | struct xt_info_lock *lock = &__get_cpu_var(xt_info_locks); |
| 506 | 506 | ||
| 507 | if (likely(!--lock->readers)) | 507 | if (likely(!--lock->readers)) |
| 508 | spin_unlock(&lock->lock); | 508 | write_sequnlock(&lock->lock); |
| 509 | local_bh_enable(); | 509 | local_bh_enable(); |
| 510 | } | 510 | } |
| 511 | 511 | ||
| @@ -516,12 +516,12 @@ static inline void xt_info_rdunlock_bh(void) | |||
| 516 | */ | 516 | */ |
| 517 | static inline void xt_info_wrlock(unsigned int cpu) | 517 | static inline void xt_info_wrlock(unsigned int cpu) |
| 518 | { | 518 | { |
| 519 | spin_lock(&per_cpu(xt_info_locks, cpu).lock); | 519 | write_seqlock(&per_cpu(xt_info_locks, cpu).lock); |
| 520 | } | 520 | } |
| 521 | 521 | ||
| 522 | static inline void xt_info_wrunlock(unsigned int cpu) | 522 | static inline void xt_info_wrunlock(unsigned int cpu) |
| 523 | { | 523 | { |
| 524 | spin_unlock(&per_cpu(xt_info_locks, cpu).lock); | 524 | write_sequnlock(&per_cpu(xt_info_locks, cpu).lock); |
| 525 | } | 525 | } |
| 526 | 526 | ||
| 527 | /* | 527 | /* |
diff --git a/include/net/ah.h b/include/net/ah.h index f0129f79a31a..be7798dea6f4 100644 --- a/include/net/ah.h +++ b/include/net/ah.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | #include <linux/skbuff.h> | 4 | #include <linux/skbuff.h> |
| 5 | 5 | ||
| 6 | /* This is the maximum truncated ICV length that we know of. */ | 6 | /* This is the maximum truncated ICV length that we know of. */ |
| 7 | #define MAX_AH_AUTH_LEN 12 | 7 | #define MAX_AH_AUTH_LEN 16 |
| 8 | 8 | ||
| 9 | struct crypto_ahash; | 9 | struct crypto_ahash; |
| 10 | 10 | ||
diff --git a/include/net/arp.h b/include/net/arp.h index f4cf6ce66586..91f0568a04ef 100644 --- a/include/net/arp.h +++ b/include/net/arp.h | |||
| @@ -25,5 +25,6 @@ extern struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, | |||
| 25 | const unsigned char *src_hw, | 25 | const unsigned char *src_hw, |
| 26 | const unsigned char *target_hw); | 26 | const unsigned char *target_hw); |
| 27 | extern void arp_xmit(struct sk_buff *skb); | 27 | extern void arp_xmit(struct sk_buff *skb); |
| 28 | int arp_invalidate(struct net_device *dev, __be32 ip); | ||
| 28 | 29 | ||
| 29 | #endif /* _ARP_H */ | 30 | #endif /* _ARP_H */ |
diff --git a/include/net/phonet/phonet.h b/include/net/phonet/phonet.h index d5df797f9540..5395e09187df 100644 --- a/include/net/phonet/phonet.h +++ b/include/net/phonet/phonet.h | |||
| @@ -107,8 +107,8 @@ struct phonet_protocol { | |||
| 107 | int sock_type; | 107 | int sock_type; |
| 108 | }; | 108 | }; |
| 109 | 109 | ||
| 110 | int phonet_proto_register(int protocol, struct phonet_protocol *pp); | 110 | int phonet_proto_register(unsigned int protocol, struct phonet_protocol *pp); |
| 111 | void phonet_proto_unregister(int protocol, struct phonet_protocol *pp); | 111 | void phonet_proto_unregister(unsigned int protocol, struct phonet_protocol *pp); |
| 112 | 112 | ||
| 113 | int phonet_sysctl_init(void); | 113 | int phonet_sysctl_init(void); |
| 114 | void phonet_sysctl_exit(void); | 114 | void phonet_sysctl_exit(void); |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 0af57ebae762..e9eee99d8b1f 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
| @@ -207,7 +207,7 @@ static inline int qdisc_qlen(struct Qdisc *q) | |||
| 207 | return q->q.qlen; | 207 | return q->q.qlen; |
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | static inline struct qdisc_skb_cb *qdisc_skb_cb(struct sk_buff *skb) | 210 | static inline struct qdisc_skb_cb *qdisc_skb_cb(const struct sk_buff *skb) |
| 211 | { | 211 | { |
| 212 | return (struct qdisc_skb_cb *)skb->cb; | 212 | return (struct qdisc_skb_cb *)skb->cb; |
| 213 | } | 213 | } |
| @@ -394,7 +394,7 @@ static inline bool qdisc_tx_is_noop(const struct net_device *dev) | |||
| 394 | return true; | 394 | return true; |
| 395 | } | 395 | } |
| 396 | 396 | ||
| 397 | static inline unsigned int qdisc_pkt_len(struct sk_buff *skb) | 397 | static inline unsigned int qdisc_pkt_len(const struct sk_buff *skb) |
| 398 | { | 398 | { |
| 399 | return qdisc_skb_cb(skb)->pkt_len; | 399 | return qdisc_skb_cb(skb)->pkt_len; |
| 400 | } | 400 | } |
| @@ -426,10 +426,18 @@ static inline int qdisc_enqueue_root(struct sk_buff *skb, struct Qdisc *sch) | |||
| 426 | return qdisc_enqueue(skb, sch) & NET_XMIT_MASK; | 426 | return qdisc_enqueue(skb, sch) & NET_XMIT_MASK; |
| 427 | } | 427 | } |
| 428 | 428 | ||
| 429 | static inline void __qdisc_update_bstats(struct Qdisc *sch, unsigned int len) | 429 | |
| 430 | static inline void bstats_update(struct gnet_stats_basic_packed *bstats, | ||
| 431 | const struct sk_buff *skb) | ||
| 432 | { | ||
| 433 | bstats->bytes += qdisc_pkt_len(skb); | ||
| 434 | bstats->packets += skb_is_gso(skb) ? skb_shinfo(skb)->gso_segs : 1; | ||
| 435 | } | ||
| 436 | |||
| 437 | static inline void qdisc_bstats_update(struct Qdisc *sch, | ||
| 438 | const struct sk_buff *skb) | ||
| 430 | { | 439 | { |
| 431 | sch->bstats.bytes += len; | 440 | bstats_update(&sch->bstats, skb); |
| 432 | sch->bstats.packets++; | ||
| 433 | } | 441 | } |
| 434 | 442 | ||
| 435 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, | 443 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, |
| @@ -437,7 +445,7 @@ static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, | |||
| 437 | { | 445 | { |
| 438 | __skb_queue_tail(list, skb); | 446 | __skb_queue_tail(list, skb); |
| 439 | sch->qstats.backlog += qdisc_pkt_len(skb); | 447 | sch->qstats.backlog += qdisc_pkt_len(skb); |
| 440 | __qdisc_update_bstats(sch, qdisc_pkt_len(skb)); | 448 | qdisc_bstats_update(sch, skb); |
| 441 | 449 | ||
| 442 | return NET_XMIT_SUCCESS; | 450 | return NET_XMIT_SUCCESS; |
| 443 | } | 451 | } |
diff --git a/include/net/sock.h b/include/net/sock.h index 21a02f7e4f45..d884d268c704 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -152,14 +152,18 @@ struct sock_common { | |||
| 152 | * fields between dontcopy_begin/dontcopy_end | 152 | * fields between dontcopy_begin/dontcopy_end |
| 153 | * are not copied in sock_copy() | 153 | * are not copied in sock_copy() |
| 154 | */ | 154 | */ |
| 155 | /* private: */ | ||
| 155 | int skc_dontcopy_begin[0]; | 156 | int skc_dontcopy_begin[0]; |
| 157 | /* public: */ | ||
| 156 | union { | 158 | union { |
| 157 | struct hlist_node skc_node; | 159 | struct hlist_node skc_node; |
| 158 | struct hlist_nulls_node skc_nulls_node; | 160 | struct hlist_nulls_node skc_nulls_node; |
| 159 | }; | 161 | }; |
| 160 | int skc_tx_queue_mapping; | 162 | int skc_tx_queue_mapping; |
| 161 | atomic_t skc_refcnt; | 163 | atomic_t skc_refcnt; |
| 164 | /* private: */ | ||
| 162 | int skc_dontcopy_end[0]; | 165 | int skc_dontcopy_end[0]; |
| 166 | /* public: */ | ||
| 163 | }; | 167 | }; |
| 164 | 168 | ||
| 165 | /** | 169 | /** |
