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

Commit 5206a79d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (25 commits)
  [Bluetooth] Use work queue to trigger URB submission
  [Bluetooth] Add locking for bt_proto array manipulation
  [Bluetooth] Check if DLC is still attached to the TTY
  [Bluetooth] Fix reference count when connection lookup fails
  [Bluetooth] Disconnect HID interrupt channel first
  [Bluetooth] Support concurrent connect requests
  [Bluetooth] Make use of virtual devices tree
  [Bluetooth] Handle return values from driver core functions
  [Bluetooth] Fix compat ioctl for BNEP, CMTP and HIDP
  [IPV6] sit: Add missing MODULE_LICENSE
  [IPV6]: Remove bogus WARN_ON in Proxy-NA handling.
  [IPv6] rules: Use RT6_LOOKUP_F_HAS_SADDR and fix source based selectors
  [XFRM]: Fix xfrm_state_num going negative.
  [NET]: reduce sizeof(struct inet_peer), cleanup, change in peer_check_expire()
  NetLabel: the CIPSOv4 passthrough mapping does not pass categories correctly
  NetLabel: better error handling involving mls_export_cat()
  NetLabel: only deref the CIPSOv4 standard map fields when using standard mapping
  [BRIDGE]: flush forwarding table when device carrier off
  [NETFILTER]: ctnetlink: Remove debugging messages
  [NETFILTER]: Update MAINTAINERS entry
  ...
parents 29da7eb0 3f530692
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -2049,11 +2049,13 @@ P: Marc Boucher
P:	James Morris
P:	Harald Welte
P:	Jozsef Kadlecsik
M:	coreteam@netfilter.org
P:	Patrick McHardy
M:	kaber@trash.net
L:	netfilter-devel@lists.netfilter.org
L:	netfilter@lists.netfilter.org
L:	coreteam@netfilter.org
W:	http://www.netfilter.org/
W:	http://www.iptables.org/
L:	netfilter@lists.netfilter.org
L:	netfilter-devel@lists.netfilter.org
S:	Supported

NETLABEL
+7 −10
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/timer.h>

#include <linux/device.h>
#include <linux/firmware.h>
@@ -43,7 +42,7 @@
#define BT_DBG(D...)
#endif

#define VERSION "1.0"
#define VERSION "1.1"

static int ignore = 0;

@@ -72,7 +71,7 @@ struct bcm203x_data {

	unsigned long		state;

	struct timer_list	timer;
	struct work_struct	work;

	struct urb		*urb;
	unsigned char		*buffer;
@@ -105,7 +104,7 @@ static void bcm203x_complete(struct urb *urb)

		data->state = BCM203X_SELECT_MEMORY;

		mod_timer(&data->timer, jiffies + (HZ / 10));
		schedule_work(&data->work);
		break;

	case BCM203X_SELECT_MEMORY:
@@ -158,9 +157,9 @@ static void bcm203x_complete(struct urb *urb)
	}
}

static void bcm203x_timer(unsigned long user_data)
static void bcm203x_work(void *user_data)
{
	struct bcm203x_data *data = (struct bcm203x_data *) user_data;
	struct bcm203x_data *data = user_data;

	if (usb_submit_urb(data->urb, GFP_ATOMIC) < 0)
		BT_ERR("Can't submit URB");
@@ -247,13 +246,11 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id

	release_firmware(firmware);

	init_timer(&data->timer);
	data->timer.function = bcm203x_timer;
	data->timer.data = (unsigned long) data;
	INIT_WORK(&data->work, bcm203x_work, (void *) data);

	usb_set_intfdata(intf, data);

	mod_timer(&data->timer, jiffies + HZ);
	schedule_work(&data->work);

	return 0;
}
+17 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ struct hci_conn {
	__u8             mode;
	__u8		 type;
	__u8		 out;
	__u8		 attempt;
	__u8		 dev_class[3];
	__u8             features[8];
	__u16            interval;
@@ -289,6 +290,22 @@ static inline struct hci_conn *hci_conn_hash_lookup_ba(struct hci_dev *hdev,
	return NULL;
}

static inline struct hci_conn *hci_conn_hash_lookup_state(struct hci_dev *hdev,
					__u8 type, __u16 state)
{
	struct hci_conn_hash *h = &hdev->conn_hash;
	struct list_head *p;
	struct hci_conn  *c;

	list_for_each(p, &h->list) {
		c = list_entry(p, struct hci_conn, list);
		if (c->type == type && c->state == state)
			return c;
	}
	return NULL;
}

void hci_acl_connect(struct hci_conn *conn);
void hci_acl_disconn(struct hci_conn *conn, __u8 reason);
void hci_add_sco(struct hci_conn *conn, __u16 handle);

+2 −15
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ struct inet_peer
{
	struct inet_peer	*avl_left, *avl_right;
	struct inet_peer	*unused_next, **unused_prevp;
	unsigned long		dtime;		/* the time of last use of not
	__u32			dtime;		/* the time of last use of not
						 * referenced entries */
	atomic_t		refcnt;
	__be32			v4daddr;	/* peer's address */
@@ -35,21 +35,8 @@ void inet_initpeers(void) __init;
/* can be called with or without local BH being disabled */
struct inet_peer	*inet_getpeer(__be32 daddr, int create);

extern spinlock_t inet_peer_unused_lock;
extern struct inet_peer **inet_peer_unused_tailp;
/* can be called from BH context or outside */
static inline void	inet_putpeer(struct inet_peer *p)
{
	spin_lock_bh(&inet_peer_unused_lock);
	if (atomic_dec_and_test(&p->refcnt)) {
		p->unused_prevp = inet_peer_unused_tailp;
		p->unused_next = NULL;
		*inet_peer_unused_tailp = p;
		inet_peer_unused_tailp = &p->unused_next;
		p->dtime = jiffies;
	}
	spin_unlock_bh(&inet_peer_unused_lock);
}
extern void inet_putpeer(struct inet_peer *p);

extern spinlock_t inet_peer_idlock;
/* can be called with or without local BH being disabled */
+30 −8
Original line number Diff line number Diff line
@@ -48,41 +48,56 @@
#define BT_DBG(D...)
#endif

#define VERSION "2.10"
#define VERSION "2.11"

/* Bluetooth sockets */
#define BT_MAX_PROTO	8
static struct net_proto_family *bt_proto[BT_MAX_PROTO];
static DEFINE_RWLOCK(bt_proto_lock);

int bt_sock_register(int proto, struct net_proto_family *ops)
{
	int err = 0;

	if (proto < 0 || proto >= BT_MAX_PROTO)
		return -EINVAL;

	if (bt_proto[proto])
		return -EEXIST;
	write_lock(&bt_proto_lock);

	if (bt_proto[proto])
		err = -EEXIST;
	else
		bt_proto[proto] = ops;
	return 0;

	write_unlock(&bt_proto_lock);

	return err;
}
EXPORT_SYMBOL(bt_sock_register);

int bt_sock_unregister(int proto)
{
	int err = 0;

	if (proto < 0 || proto >= BT_MAX_PROTO)
		return -EINVAL;

	if (!bt_proto[proto])
		return -ENOENT;
	write_lock(&bt_proto_lock);

	if (!bt_proto[proto])
		err = -ENOENT;
	else
		bt_proto[proto] = NULL;
	return 0;

	write_unlock(&bt_proto_lock);

	return err;
}
EXPORT_SYMBOL(bt_sock_unregister);

static int bt_sock_create(struct socket *sock, int proto)
{
	int err = 0;
	int err;

	if (proto < 0 || proto >= BT_MAX_PROTO)
		return -EINVAL;
@@ -92,11 +107,18 @@ static int bt_sock_create(struct socket *sock, int proto)
		request_module("bt-proto-%d", proto);
	}
#endif

	err = -EPROTONOSUPPORT;

	read_lock(&bt_proto_lock);

	if (bt_proto[proto] && try_module_get(bt_proto[proto]->owner)) {
		err = bt_proto[proto]->create(sock, proto);
		module_put(bt_proto[proto]->owner);
	}

	read_unlock(&bt_proto_lock);

	return err; 
}

Loading