Revert "ath9k: Group Key fix for VAPs"
[safe/jmp/linux-2.6] / include / net / request_sock.h
index b5b023e..99e6e19 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <linux/types.h>
+#include <linux/bug.h>
 
 #include <net/sock.h>
 
@@ -26,17 +27,26 @@ struct sk_buff;
 struct dst_entry;
 struct proto;
 
+/* empty to "strongly type" an otherwise void parameter.
+ */
+struct request_values {
+};
+
 struct request_sock_ops {
        int             family;
        int             obj_size;
-       kmem_cache_t    *slab;
+       struct kmem_cache       *slab;
+       char            *slab_name;
        int             (*rtx_syn_ack)(struct sock *sk,
                                       struct request_sock *req,
-                                      struct dst_entry *dst);
-       void            (*send_ack)(struct sk_buff *skb,
+                                      struct request_values *rvp);
+       void            (*send_ack)(struct sock *sk, struct sk_buff *skb,
                                    struct request_sock *req);
-       void            (*send_reset)(struct sk_buff *skb);
+       void            (*send_reset)(struct sock *sk,
+                                     struct sk_buff *skb);
        void            (*destructor)(struct request_sock *req);
+       void            (*syn_ack_timeout)(struct sock *sk,
+                                          struct request_sock *req);
 };
 
 /* struct request_sock - mini sock to represent a connection request
@@ -45,7 +55,7 @@ struct request_sock {
        struct request_sock             *dl_next; /* Must be first member! */
        u16                             mss;
        u8                              retrans;
-       u8                              __pad;
+       u8                              cookie_ts; /* syncookie: encode tcpopts in timestamp */
        /* The following two fields can be easily recomputed I think -AK */
        u32                             window_clamp; /* window clamp at creation time */
        u32                             rcv_wnd;          /* rcv_wnd offered first time */
@@ -59,7 +69,7 @@ struct request_sock {
 
 static inline struct request_sock *reqsk_alloc(const struct request_sock_ops *ops)
 {
-       struct request_sock *req = kmem_cache_alloc(ops->slab, SLAB_ATOMIC);
+       struct request_sock *req = kmem_cache_alloc(ops->slab, GFP_ATOMIC);
 
        if (req != NULL)
                req->rsk_ops = ops;
@@ -123,23 +133,7 @@ struct request_sock_queue {
 extern int reqsk_queue_alloc(struct request_sock_queue *queue,
                             unsigned int nr_table_entries);
 
-static inline struct listen_sock *reqsk_queue_yank_listen_sk(struct request_sock_queue *queue)
-{
-       struct listen_sock *lopt;
-
-       write_lock_bh(&queue->syn_wait_lock);
-       lopt = queue->listen_opt;
-       queue->listen_opt = NULL;
-       write_unlock_bh(&queue->syn_wait_lock);
-
-       return lopt;
-}
-
-static inline void __reqsk_queue_destroy(struct request_sock_queue *queue)
-{
-       kfree(reqsk_queue_yank_listen_sk(queue));
-}
-
+extern void __reqsk_queue_destroy(struct request_sock_queue *queue);
 extern void reqsk_queue_destroy(struct request_sock_queue *queue);
 
 static inline struct request_sock *
@@ -186,7 +180,7 @@ static inline struct request_sock *reqsk_queue_remove(struct request_sock_queue
 {
        struct request_sock *req = queue->rskq_accept_head;
 
-       BUG_TRAP(req != NULL);
+       WARN_ON(req == NULL);
 
        queue->rskq_accept_head = req->dl_next;
        if (queue->rskq_accept_head == NULL)
@@ -201,7 +195,7 @@ static inline struct sock *reqsk_queue_get_child(struct request_sock_queue *queu
        struct request_sock *req = reqsk_queue_remove(queue);
        struct sock *child = req->sk;
 
-       BUG_TRAP(child != NULL);
+       WARN_ON(child == NULL);
 
        sk_acceptq_removed(parent);
        __reqsk_free(req);