diff options
Diffstat (limited to 'net/bluetooth/hci_sock.c')
-rw-r--r-- | net/bluetooth/hci_sock.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 07f073935811..6a93614f2c49 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c | |||
@@ -70,14 +70,13 @@ static struct bt_sock_list hci_sk_list = { | |||
70 | void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb) | 70 | void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb) |
71 | { | 71 | { |
72 | struct sock *sk; | 72 | struct sock *sk; |
73 | struct hlist_node *node; | ||
74 | struct sk_buff *skb_copy = NULL; | 73 | struct sk_buff *skb_copy = NULL; |
75 | 74 | ||
76 | BT_DBG("hdev %p len %d", hdev, skb->len); | 75 | BT_DBG("hdev %p len %d", hdev, skb->len); |
77 | 76 | ||
78 | read_lock(&hci_sk_list.lock); | 77 | read_lock(&hci_sk_list.lock); |
79 | 78 | ||
80 | sk_for_each(sk, node, &hci_sk_list.head) { | 79 | sk_for_each(sk, &hci_sk_list.head) { |
81 | struct hci_filter *flt; | 80 | struct hci_filter *flt; |
82 | struct sk_buff *nskb; | 81 | struct sk_buff *nskb; |
83 | 82 | ||
@@ -142,13 +141,12 @@ void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb) | |||
142 | void hci_send_to_control(struct sk_buff *skb, struct sock *skip_sk) | 141 | void hci_send_to_control(struct sk_buff *skb, struct sock *skip_sk) |
143 | { | 142 | { |
144 | struct sock *sk; | 143 | struct sock *sk; |
145 | struct hlist_node *node; | ||
146 | 144 | ||
147 | BT_DBG("len %d", skb->len); | 145 | BT_DBG("len %d", skb->len); |
148 | 146 | ||
149 | read_lock(&hci_sk_list.lock); | 147 | read_lock(&hci_sk_list.lock); |
150 | 148 | ||
151 | sk_for_each(sk, node, &hci_sk_list.head) { | 149 | sk_for_each(sk, &hci_sk_list.head) { |
152 | struct sk_buff *nskb; | 150 | struct sk_buff *nskb; |
153 | 151 | ||
154 | /* Skip the original socket */ | 152 | /* Skip the original socket */ |
@@ -176,7 +174,6 @@ void hci_send_to_control(struct sk_buff *skb, struct sock *skip_sk) | |||
176 | void hci_send_to_monitor(struct hci_dev *hdev, struct sk_buff *skb) | 174 | void hci_send_to_monitor(struct hci_dev *hdev, struct sk_buff *skb) |
177 | { | 175 | { |
178 | struct sock *sk; | 176 | struct sock *sk; |
179 | struct hlist_node *node; | ||
180 | struct sk_buff *skb_copy = NULL; | 177 | struct sk_buff *skb_copy = NULL; |
181 | __le16 opcode; | 178 | __le16 opcode; |
182 | 179 | ||
@@ -210,7 +207,7 @@ void hci_send_to_monitor(struct hci_dev *hdev, struct sk_buff *skb) | |||
210 | 207 | ||
211 | read_lock(&hci_sk_list.lock); | 208 | read_lock(&hci_sk_list.lock); |
212 | 209 | ||
213 | sk_for_each(sk, node, &hci_sk_list.head) { | 210 | sk_for_each(sk, &hci_sk_list.head) { |
214 | struct sk_buff *nskb; | 211 | struct sk_buff *nskb; |
215 | 212 | ||
216 | if (sk->sk_state != BT_BOUND) | 213 | if (sk->sk_state != BT_BOUND) |
@@ -251,13 +248,12 @@ void hci_send_to_monitor(struct hci_dev *hdev, struct sk_buff *skb) | |||
251 | static void send_monitor_event(struct sk_buff *skb) | 248 | static void send_monitor_event(struct sk_buff *skb) |
252 | { | 249 | { |
253 | struct sock *sk; | 250 | struct sock *sk; |
254 | struct hlist_node *node; | ||
255 | 251 | ||
256 | BT_DBG("len %d", skb->len); | 252 | BT_DBG("len %d", skb->len); |
257 | 253 | ||
258 | read_lock(&hci_sk_list.lock); | 254 | read_lock(&hci_sk_list.lock); |
259 | 255 | ||
260 | sk_for_each(sk, node, &hci_sk_list.head) { | 256 | sk_for_each(sk, &hci_sk_list.head) { |
261 | struct sk_buff *nskb; | 257 | struct sk_buff *nskb; |
262 | 258 | ||
263 | if (sk->sk_state != BT_BOUND) | 259 | if (sk->sk_state != BT_BOUND) |
@@ -393,11 +389,10 @@ void hci_sock_dev_event(struct hci_dev *hdev, int event) | |||
393 | 389 | ||
394 | if (event == HCI_DEV_UNREG) { | 390 | if (event == HCI_DEV_UNREG) { |
395 | struct sock *sk; | 391 | struct sock *sk; |
396 | struct hlist_node *node; | ||
397 | 392 | ||
398 | /* Detach sockets from device */ | 393 | /* Detach sockets from device */ |
399 | read_lock(&hci_sk_list.lock); | 394 | read_lock(&hci_sk_list.lock); |
400 | sk_for_each(sk, node, &hci_sk_list.head) { | 395 | sk_for_each(sk, &hci_sk_list.head) { |
401 | bh_lock_sock_nested(sk); | 396 | bh_lock_sock_nested(sk); |
402 | if (hci_pi(sk)->hdev == hdev) { | 397 | if (hci_pi(sk)->hdev == hdev) { |
403 | hci_pi(sk)->hdev = NULL; | 398 | hci_pi(sk)->hdev = NULL; |