diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/netdevice.h | 4 | ||||
| -rw-r--r-- | include/linux/rtnetlink.h | 1 | ||||
| -rw-r--r-- | include/linux/tc_act/tc_mirred.h | 28 | ||||
| -rw-r--r-- | include/net/bluetooth/bluetooth.h | 1 | ||||
| -rw-r--r-- | include/net/bluetooth/hci.h | 19 | ||||
| -rw-r--r-- | include/net/bluetooth/hci_core.h | 16 | ||||
| -rw-r--r-- | include/net/gen_stats.h | 3 | ||||
| -rw-r--r-- | include/net/pkt_sched.h | 5 | ||||
| -rw-r--r-- | include/net/sock.h | 7 | ||||
| -rw-r--r-- | include/net/tc_act/tc_mirred.h | 15 |
10 files changed, 90 insertions, 9 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 010a623c3bdf..9472745b6510 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -697,8 +697,12 @@ extern int netdev_nit; static inline int netif_rx_ni(struct sk_buff *skb) { int err = netif_rx(skb); + + preempt_disable(); if (softirq_pending(smp_processor_id())) do_softirq(); + preempt_enable(); + return err; } diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index ac4528ead16e..9bb86160c2f2 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h @@ -698,6 +698,7 @@ enum TCA_XSTATS, TCA_RATE, TCA_FCNT, + TCA_STATS2, __TCA_MAX }; diff --git a/include/linux/tc_act/tc_mirred.h b/include/linux/tc_act/tc_mirred.h new file mode 100644 index 000000000000..71d63409d568 --- /dev/null +++ b/include/linux/tc_act/tc_mirred.h @@ -0,0 +1,28 @@ +#ifndef __LINUX_TC_MIR_H +#define __LINUX_TC_MIR_H + +#include <linux/pkt_cls.h> + +#define TCA_ACT_MIRRED 8 +#define TCA_EGRESS_REDIR 1 /* packet redirect to EGRESS*/ +#define TCA_EGRESS_MIRROR 2 /* mirror packet to EGRESS */ +#define TCA_INGRESS_REDIR 3 /* packet redirect to INGRESS*/ +#define TCA_INGRESS_MIRROR 4 /* mirror packet to INGRESS */ + +struct tc_mirred +{ + tc_gen; + int eaction; /* one of IN/EGRESS_MIRROR/REDIR */ + __u32 ifindex; /* ifindex of egress port */ +}; + +enum +{ + TCA_MIRRED_UNSPEC, + TCA_MIRRED_TM, + TCA_MIRRED_PARMS, + __TCA_MIRRED_MAX +}; +#define TCA_MIRRED_MAX (__TCA_MIRRED_MAX - 1) + +#endif diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 9c5436227ac7..02bdef01cc36 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h @@ -133,6 +133,7 @@ uint bt_sock_poll(struct file * file, struct socket *sock, poll_table *wait); int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo); void bt_accept_enqueue(struct sock *parent, struct sock *sk); +void bt_accept_unlink(struct sock *sk); struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock); /* Skb helpers */ diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 06e19d370efd..f6d234a7a43e 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h @@ -68,7 +68,9 @@ enum { HCI_ENCRYPT, HCI_INQUIRY, - HCI_RAW + HCI_RAW, + + HCI_SECMGR }; /* HCI ioctl defines */ @@ -91,7 +93,8 @@ enum { #define HCISETLINKMODE _IOW('H', 226, int) #define HCISETACLMTU _IOW('H', 227, int) #define HCISETSCOMTU _IOW('H', 228, int) -#define HCISETRAWVND _IOW('H', 229, int) + +#define HCISETSECMGR _IOW('H', 230, int) #define HCIINQUIRY _IOR('H', 240, int) @@ -324,20 +327,28 @@ struct hci_cp_inquiry { #define OCF_INQUIRY_CANCEL 0x0002 #define OCF_LINK_KEY_REPLY 0x000B -#define OCF_LINK_KEY_NEG_REPLY 0x000C struct hci_cp_link_key_reply { bdaddr_t bdaddr; __u8 link_key[16]; } __attribute__ ((packed)); +#define OCF_LINK_KEY_NEG_REPLY 0x000C +struct hci_cp_link_key_neg_reply { + bdaddr_t bdaddr; +} __attribute__ ((packed)); + #define OCF_PIN_CODE_REPLY 0x000D -#define OCF_PIN_CODE_NEG_REPLY 0x000E struct hci_cp_pin_code_reply { bdaddr_t bdaddr; __u8 pin_len; __u8 pin_code[16]; } __attribute__ ((packed)); +#define OCF_PIN_CODE_NEG_REPLY 0x000E +struct hci_cp_pin_code_neg_reply { + bdaddr_t bdaddr; +} __attribute__ ((packed)); + #define OCF_CHANGE_CONN_PTYPE 0x000F struct hci_cp_change_conn_ptype { __u16 handle; diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 63f73088b3ce..2c9995af03a8 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -53,7 +53,8 @@ struct inquiry_cache { struct hci_conn_hash { struct list_head list; spinlock_t lock; - unsigned int num; + unsigned int acl_num; + unsigned int sco_num; }; struct hci_dev { @@ -209,21 +210,28 @@ static inline void hci_conn_hash_init(struct hci_dev *hdev) struct hci_conn_hash *h = &hdev->conn_hash; INIT_LIST_HEAD(&h->list); spin_lock_init(&h->lock); - h->num = 0; + h->acl_num = 0; + h->sco_num = 0; } static inline void hci_conn_hash_add(struct hci_dev *hdev, struct hci_conn *c) { struct hci_conn_hash *h = &hdev->conn_hash; list_add(&c->list, &h->list); - h->num++; + if (c->type == ACL_LINK) + h->acl_num++; + else + h->sco_num++; } static inline void hci_conn_hash_del(struct hci_dev *hdev, struct hci_conn *c) { struct hci_conn_hash *h = &hdev->conn_hash; list_del(&c->list); - h->num--; + if (c->type == ACL_LINK) + h->acl_num++; + else + h->sco_num--; } static inline struct hci_conn *hci_conn_hash_lookup_handle(struct hci_dev *hdev, diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h index e3ec2ebdd62e..9a9bea508d1b 100644 --- a/include/net/gen_stats.h +++ b/include/net/gen_stats.h @@ -41,5 +41,8 @@ extern int gen_new_estimator(struct gnet_stats_basic *bstats, spinlock_t *stats_lock, struct rtattr *opt); extern void gen_kill_estimator(struct gnet_stats_basic *bstats, struct gnet_stats_rate_est *rate_est); +extern int gen_replace_estimator(struct gnet_stats_basic *bstats, + struct gnet_stats_rate_est *rate_est, + spinlock_t *stats_lock, struct rtattr *opt); #endif diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index dab127cc2b1d..8391882cc787 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -9,6 +9,7 @@ #include <net/pkt_cls.h> #include <linux/module.h> #include <linux/rtnetlink.h> +#include <net/gen_stats.h> struct rtattr; struct Qdisc; @@ -86,7 +87,9 @@ struct Qdisc struct net_device *dev; struct list_head list; - struct tc_stats stats; + struct gnet_stats_basic bstats; + struct gnet_stats_queue qstats; + struct gnet_stats_rate_est rate_est; spinlock_t *stats_lock; struct rcu_head q_rcu; int (*reshape_fail)(struct sk_buff *skb, struct Qdisc *q); diff --git a/include/net/sock.h b/include/net/sock.h index 0666e2edd3c7..563096ab673a 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1336,6 +1336,13 @@ static inline void sock_valbool_flag(struct sock *sk, int bit, int valbool) extern __u32 sysctl_wmem_max; extern __u32 sysctl_rmem_max; +#ifdef CONFIG_NET int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg); +#else +static inline int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) +{ + return -ENODEV; +} +#endif #endif /* _SOCK_H */ diff --git a/include/net/tc_act/tc_mirred.h b/include/net/tc_act/tc_mirred.h new file mode 100644 index 000000000000..f7f9b76c2511 --- /dev/null +++ b/include/net/tc_act/tc_mirred.h @@ -0,0 +1,15 @@ +#ifndef __NET_TC_MIR_H +#define __NET_TC_MIR_H + +#include <net/pkt_sched.h> + +struct tcf_mirred +{ + tca_gen(mirred); + int eaction; + int ifindex; + int ok_push; + struct net_device *dev; +}; + +#endif |
