Commit 030013d8 authored by Gustavo F. Padovan's avatar Gustavo F. Padovan

Bluetooth: Rename info_work to info_timer

It makes more sense this way, since info_timer is a timer using delayed
work API.
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent 6c9d42a1
...@@ -522,7 +522,7 @@ struct l2cap_conn { ...@@ -522,7 +522,7 @@ struct l2cap_conn {
__u8 info_state; __u8 info_state;
__u8 info_ident; __u8 info_ident;
struct delayed_work info_work; struct delayed_work info_timer;
spinlock_t lock; spinlock_t lock;
......
...@@ -699,7 +699,7 @@ static void l2cap_do_start(struct l2cap_chan *chan) ...@@ -699,7 +699,7 @@ static void l2cap_do_start(struct l2cap_chan *chan)
conn->info_state |= L2CAP_INFO_FEAT_MASK_REQ_SENT; conn->info_state |= L2CAP_INFO_FEAT_MASK_REQ_SENT;
conn->info_ident = l2cap_get_ident(conn); conn->info_ident = l2cap_get_ident(conn);
schedule_delayed_work(&conn->info_work, schedule_delayed_work(&conn->info_timer,
msecs_to_jiffies(L2CAP_INFO_TIMEOUT)); msecs_to_jiffies(L2CAP_INFO_TIMEOUT));
l2cap_send_cmd(conn, conn->info_ident, l2cap_send_cmd(conn, conn->info_ident,
...@@ -996,7 +996,7 @@ static void l2cap_conn_unreliable(struct l2cap_conn *conn, int err) ...@@ -996,7 +996,7 @@ static void l2cap_conn_unreliable(struct l2cap_conn *conn, int err)
static void l2cap_info_timeout(struct work_struct *work) static void l2cap_info_timeout(struct work_struct *work)
{ {
struct l2cap_conn *conn = container_of(work, struct l2cap_conn, struct l2cap_conn *conn = container_of(work, struct l2cap_conn,
info_work.work); info_timer.work);
conn->info_state |= L2CAP_INFO_FEAT_MASK_REQ_DONE; conn->info_state |= L2CAP_INFO_FEAT_MASK_REQ_DONE;
conn->info_ident = 0; conn->info_ident = 0;
...@@ -1029,7 +1029,7 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err) ...@@ -1029,7 +1029,7 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err)
hci_chan_del(conn->hchan); hci_chan_del(conn->hchan);
if (conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_SENT) if (conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_SENT)
cancel_delayed_work_sync(&conn->info_work); cancel_delayed_work_sync(&conn->info_timer);
if (test_and_clear_bit(HCI_CONN_LE_SMP_PEND, &hcon->pend)) { if (test_and_clear_bit(HCI_CONN_LE_SMP_PEND, &hcon->pend)) {
cancel_delayed_work_sync(&conn->security_timer); cancel_delayed_work_sync(&conn->security_timer);
...@@ -1089,7 +1089,7 @@ static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon, u8 status) ...@@ -1089,7 +1089,7 @@ static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon, u8 status)
if (hcon->type == LE_LINK) if (hcon->type == LE_LINK)
INIT_DELAYED_WORK(&conn->security_timer, security_timeout); INIT_DELAYED_WORK(&conn->security_timer, security_timeout);
else else
INIT_DELAYED_WORK(&conn->info_work, l2cap_info_timeout); INIT_DELAYED_WORK(&conn->info_timer, l2cap_info_timeout);
conn->disc_reason = HCI_ERROR_REMOTE_USER_TERM; conn->disc_reason = HCI_ERROR_REMOTE_USER_TERM;
...@@ -2583,7 +2583,7 @@ static inline int l2cap_command_rej(struct l2cap_conn *conn, struct l2cap_cmd_hd ...@@ -2583,7 +2583,7 @@ static inline int l2cap_command_rej(struct l2cap_conn *conn, struct l2cap_cmd_hd
if ((conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_SENT) && if ((conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_SENT) &&
cmd->ident == conn->info_ident) { cmd->ident == conn->info_ident) {
cancel_delayed_work_sync(&conn->info_work); cancel_delayed_work_sync(&conn->info_timer);
conn->info_state |= L2CAP_INFO_FEAT_MASK_REQ_DONE; conn->info_state |= L2CAP_INFO_FEAT_MASK_REQ_DONE;
conn->info_ident = 0; conn->info_ident = 0;
...@@ -2704,7 +2704,7 @@ static inline int l2cap_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hd ...@@ -2704,7 +2704,7 @@ static inline int l2cap_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hd
conn->info_state |= L2CAP_INFO_FEAT_MASK_REQ_SENT; conn->info_state |= L2CAP_INFO_FEAT_MASK_REQ_SENT;
conn->info_ident = l2cap_get_ident(conn); conn->info_ident = l2cap_get_ident(conn);
schedule_delayed_work(&conn->info_work, schedule_delayed_work(&conn->info_timer,
msecs_to_jiffies(L2CAP_INFO_TIMEOUT)); msecs_to_jiffies(L2CAP_INFO_TIMEOUT));
l2cap_send_cmd(conn, conn->info_ident, l2cap_send_cmd(conn, conn->info_ident,
...@@ -3129,7 +3129,7 @@ static inline int l2cap_information_rsp(struct l2cap_conn *conn, struct l2cap_cm ...@@ -3129,7 +3129,7 @@ static inline int l2cap_information_rsp(struct l2cap_conn *conn, struct l2cap_cm
conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_DONE) conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_DONE)
return 0; return 0;
cancel_delayed_work_sync(&conn->info_work); cancel_delayed_work_sync(&conn->info_timer);
if (result != L2CAP_IR_SUCCESS) { if (result != L2CAP_IR_SUCCESS) {
conn->info_state |= L2CAP_INFO_FEAT_MASK_REQ_DONE; conn->info_state |= L2CAP_INFO_FEAT_MASK_REQ_DONE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment