Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=be02097cf6342eb0426833f54c95e0fb4c9bca45
Commit:     be02097cf6342eb0426833f54c95e0fb4c9bca45
Parent:     8c7fc03e27167425a1396320da43533462556b0c
Author:     David S. Miller <[EMAIL PROTECTED]>
AuthorDate: Tue May 29 13:16:31 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu May 31 01:23:32 2007 -0700

    [AF_PACKET]: Kill CONFIG_PACKET_SOCKET.
    
    Always set, but af_packet.c, not by the Kconfig subsystem, so
    just get rid of it.
    
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/packet/af_packet.c |   25 +++++--------------------
 1 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 99b55e6..f8b8301 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -83,8 +83,6 @@
 #include <net/inet_common.h>
 #endif
 
-#define CONFIG_SOCK_PACKET     1
-
 /*
    Assumptions:
    - if device has no dev->hard_header routine, it adds and removes ll header
@@ -246,7 +244,6 @@ static void packet_sock_destruct(struct sock *sk)
 
 static const struct proto_ops packet_ops;
 
-#ifdef CONFIG_SOCK_PACKET
 static const struct proto_ops packet_ops_spkt;
 
 static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev,  
struct packet_type *pt, struct net_device *orig_dev)
@@ -418,7 +415,6 @@ out_unlock:
                dev_put(dev);
        return err;
 }
-#endif
 
 static inline unsigned int run_filter(struct sk_buff *skb, struct sock *sk,
                                      unsigned int res)
@@ -917,8 +913,6 @@ out_unlock:
  *     Bind a packet socket to a device
  */
 
-#ifdef CONFIG_SOCK_PACKET
-
 static int packet_bind_spkt(struct socket *sock, struct sockaddr *uaddr, int 
addr_len)
 {
        struct sock *sk=sock->sk;
@@ -941,7 +935,6 @@ static int packet_bind_spkt(struct socket *sock, struct 
sockaddr *uaddr, int add
        }
        return err;
 }
-#endif
 
 static int packet_bind(struct socket *sock, struct sockaddr *uaddr, int 
addr_len)
 {
@@ -993,11 +986,8 @@ static int packet_create(struct socket *sock, int protocol)
 
        if (!capable(CAP_NET_RAW))
                return -EPERM;
-       if (sock->type != SOCK_DGRAM && sock->type != SOCK_RAW
-#ifdef CONFIG_SOCK_PACKET
-           && sock->type != SOCK_PACKET
-#endif
-           )
+       if (sock->type != SOCK_DGRAM && sock->type != SOCK_RAW &&
+           sock->type != SOCK_PACKET)
                return -ESOCKTNOSUPPORT;
 
        sock->state = SS_UNCONNECTED;
@@ -1008,10 +998,9 @@ static int packet_create(struct socket *sock, int 
protocol)
                goto out;
 
        sock->ops = &packet_ops;
-#ifdef CONFIG_SOCK_PACKET
        if (sock->type == SOCK_PACKET)
                sock->ops = &packet_ops_spkt;
-#endif
+
        sock_init_data(sock, sk);
 
        po = pkt_sk(sk);
@@ -1027,10 +1016,10 @@ static int packet_create(struct socket *sock, int 
protocol)
 
        spin_lock_init(&po->bind_lock);
        po->prot_hook.func = packet_rcv;
-#ifdef CONFIG_SOCK_PACKET
+
        if (sock->type == SOCK_PACKET)
                po->prot_hook.func = packet_rcv_spkt;
-#endif
+
        po->prot_hook.af_packet_priv = sk;
 
        if (proto) {
@@ -1150,7 +1139,6 @@ out:
        return err;
 }
 
-#ifdef CONFIG_SOCK_PACKET
 static int packet_getname_spkt(struct socket *sock, struct sockaddr *uaddr,
                               int *uaddr_len, int peer)
 {
@@ -1171,7 +1159,6 @@ static int packet_getname_spkt(struct socket *sock, 
struct sockaddr *uaddr,
 
        return 0;
 }
-#endif
 
 static int packet_getname(struct socket *sock, struct sockaddr *uaddr,
                          int *uaddr_len, int peer)
@@ -1833,7 +1820,6 @@ out:
 #endif
 
 
-#ifdef CONFIG_SOCK_PACKET
 static const struct proto_ops packet_ops_spkt = {
        .family =       PF_PACKET,
        .owner =        THIS_MODULE,
@@ -1854,7 +1840,6 @@ static const struct proto_ops packet_ops_spkt = {
        .mmap =         sock_no_mmap,
        .sendpage =     sock_no_sendpage,
 };
-#endif
 
 static const struct proto_ops packet_ops = {
        .family =       PF_PACKET,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to