|
@@ -497,6 +497,7 @@ struct l2cap_chan {
|
|
|
|
|
|
void *data;
|
|
|
struct l2cap_ops *ops;
|
|
|
+ struct mutex lock;
|
|
|
};
|
|
|
|
|
|
struct l2cap_ops {
|
|
@@ -609,6 +610,16 @@ static inline void l2cap_chan_put(struct l2cap_chan *c)
|
|
|
kfree(c);
|
|
|
}
|
|
|
|
|
|
+static inline void l2cap_chan_lock(struct l2cap_chan *chan)
|
|
|
+{
|
|
|
+ mutex_lock(&chan->lock);
|
|
|
+}
|
|
|
+
|
|
|
+static inline void l2cap_chan_unlock(struct l2cap_chan *chan)
|
|
|
+{
|
|
|
+ mutex_unlock(&chan->lock);
|
|
|
+}
|
|
|
+
|
|
|
static inline void l2cap_set_timer(struct l2cap_chan *chan,
|
|
|
struct delayed_work *work, long timeout)
|
|
|
{
|