Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56e9b263 authored by David S. Miller's avatar David S. Miller
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/acme/llc-2.6

parents 188bab3a 8420e1b5
Loading
Loading
Loading
Loading
+25 −1
Original line number Diff line number Diff line
@@ -203,6 +203,7 @@ enum
	NET_DECNET=15,
	NET_ECONET=16,
	NET_SCTP=17,
	NET_LLC=18,
};

/* /proc/sys/kernel/random */
@@ -522,6 +523,29 @@ enum {
	NET_IPX_FORWARDING=2
};

/* /proc/sys/net/llc */
enum {
	NET_LLC2=1,
	NET_LLC_STATION=2,
};

/* /proc/sys/net/llc/llc2 */
enum {
	NET_LLC2_TIMEOUT=1,
};

/* /proc/sys/net/llc/station */
enum {
	NET_LLC_STATION_ACK_TIMEOUT=1,
};

/* /proc/sys/net/llc/llc2/timeout */
enum {
	NET_LLC2_ACK_TIMEOUT=1,
	NET_LLC2_P_TIMEOUT=2,
	NET_LLC2_REJ_TIMEOUT=3,
	NET_LLC2_BUSY_TIMEOUT=4,
};

/* /proc/sys/net/appletalk */
enum {
+30 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@
#include <linux/list.h>
#include <linux/spinlock.h>

#include <asm/atomic.h>

struct net_device;
struct packet_type;
struct sk_buff;
@@ -44,6 +46,7 @@ struct llc_sap {
	unsigned char	 state;
	unsigned char	 p_bit;
	unsigned char	 f_bit;
	atomic_t         refcnt;
	int		 (*rcv_func)(struct sk_buff *skb,
				     struct net_device *dev,
				     struct packet_type *pt,
@@ -81,13 +84,27 @@ extern struct llc_sap *llc_sap_open(unsigned char lsap,
					       struct net_device *dev,
					       struct packet_type *pt,
					       struct net_device *orig_dev));
static inline void llc_sap_hold(struct llc_sap *sap)
{
	atomic_inc(&sap->refcnt);
}

extern void llc_sap_close(struct llc_sap *sap);

static inline void llc_sap_put(struct llc_sap *sap)
{
	if (atomic_dec_and_test(&sap->refcnt))
		llc_sap_close(sap);
}

extern struct llc_sap *llc_sap_find(unsigned char sap_value);

extern int llc_build_and_send_ui_pkt(struct llc_sap *sap, struct sk_buff *skb,
				     unsigned char *dmac, unsigned char dsap);

extern void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb);
extern void llc_conn_handler(struct llc_sap *sap, struct sk_buff *skb);

extern int llc_station_init(void);
extern void llc_station_exit(void);

@@ -98,4 +115,17 @@ extern void llc_proc_exit(void);
#define llc_proc_init()	(0)
#define llc_proc_exit()	do { } while(0)
#endif /* CONFIG_PROC_FS */
#ifdef CONFIG_SYSCTL
extern int llc_sysctl_init(void);
extern void llc_sysctl_exit(void);

extern int sysctl_llc2_ack_timeout;
extern int sysctl_llc2_busy_timeout;
extern int sysctl_llc2_p_timeout;
extern int sysctl_llc2_rej_timeout;
extern int sysctl_llc_station_ack_timeout;
#else
#define llc_sysctl_init() (0)
#define llc_sysctl_exit() do { } while(0)
#endif /* CONFIG_SYSCTL */
#endif /* LLC_H */
+8 −7
Original line number Diff line number Diff line
@@ -19,14 +19,14 @@
#define LLC_EVENT                1
#define LLC_PACKET               2

#define LLC_P_TIME               2
#define LLC_ACK_TIME             1
#define LLC_REJ_TIME             3
#define LLC_BUSY_TIME            3
#define LLC2_P_TIME               2
#define LLC2_ACK_TIME             1
#define LLC2_REJ_TIME             3
#define LLC2_BUSY_TIME            3

struct llc_timer {
	struct timer_list timer;
	u16		  expire;	/* timer expire time */
	unsigned long	  expire;	/* timer expire time */
};

struct llc_sock {
@@ -38,6 +38,7 @@ struct llc_sock {
	struct llc_addr	    laddr;		/* lsap/mac pair */
	struct llc_addr	    daddr;		/* dsap/mac pair */
	struct net_device   *dev;		/* device to send to remote */
	u32		    copied_seq;		/* head of yet unread data */
	u8		    retry_count;	/* number of retries */
	u8		    ack_must_be_send;
	u8		    first_pdu_Ns;
@@ -92,7 +93,8 @@ static __inline__ char llc_backlog_type(struct sk_buff *skb)
	return skb->cb[sizeof(skb->cb) - 1];
}

extern struct sock *llc_sk_alloc(int family, int priority, struct proto *prot);
extern struct sock *llc_sk_alloc(int family, unsigned int __nocast priority,
				 struct proto *prot);
extern void llc_sk_free(struct sock *sk);

extern void llc_sk_reset(struct sock *sk);
@@ -115,5 +117,4 @@ extern void llc_sap_remove_socket(struct llc_sap *sap, struct sock *sk);

extern u8 llc_data_accept_state(u8 state);
extern void llc_build_offset_table(void);
extern int llc_release_sockets(struct llc_sap *sap);
#endif /* LLC_CONN_H */
+6 −2
Original line number Diff line number Diff line
@@ -12,11 +12,15 @@
 * See the GNU General Public License for more details.
 */
struct llc_sap;
struct net_device;
struct sk_buff;
struct sock;

extern void llc_sap_rtn_pdu(struct llc_sap *sap, struct sk_buff *skb);
extern void llc_save_primitive(struct sk_buff* skb, unsigned char prim);
extern struct sk_buff *llc_alloc_frame(void);
extern void llc_save_primitive(struct sock *sk, struct sk_buff* skb,
			       unsigned char prim);
extern struct sk_buff *llc_alloc_frame(struct sock *sk,
				       struct net_device *dev);

extern void llc_build_and_send_test_pkt(struct llc_sap *sap,
				        struct sk_buff *skb,
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ struct datalink_proto *register_8022_client(unsigned char type,

void unregister_8022_client(struct datalink_proto *proto)
{
	llc_sap_close(proto->sap);
	llc_sap_put(proto->sap);
	kfree(proto);
}

Loading