aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2015-03-13 05:11:02 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2015-03-13 06:09:27 -0400
commita358dc11d80ecaca443aa1fd2fd9d4f3425922e7 (patch)
treeb59d2b813fad4a63b3e33b94e4668b79a6a92885 /net/bluetooth/hci_event.c
parenta1536da255f16f42b8f069b2769134b32558b265 (diff)
Bluetooth: Introduce hci_dev_clear_flag helper macro
Instead of manually coding clear_bit on hdev->dev_flags all the time, use hci_dev_clear_flag helper macro. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index b01a93efada8..808b78cf8ad0 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -82,7 +82,7 @@ static void hci_cc_exit_periodic_inq(struct hci_dev *hdev, struct sk_buff *skb)
82 if (status) 82 if (status)
83 return; 83 return;
84 84
85 clear_bit(HCI_PERIODIC_INQ, &hdev->dev_flags); 85 hci_dev_clear_flag(hdev, HCI_PERIODIC_INQ);
86 86
87 hci_conn_check_pending(hdev); 87 hci_conn_check_pending(hdev);
88} 88}
@@ -503,7 +503,7 @@ static void hci_cc_write_ssp_mode(struct hci_dev *hdev, struct sk_buff *skb)
503 if (sent->mode) 503 if (sent->mode)
504 hci_dev_set_flag(hdev, HCI_SSP_ENABLED); 504 hci_dev_set_flag(hdev, HCI_SSP_ENABLED);
505 else 505 else
506 clear_bit(HCI_SSP_ENABLED, &hdev->dev_flags); 506 hci_dev_clear_flag(hdev, HCI_SSP_ENABLED);
507 } 507 }
508 508
509 hci_dev_unlock(hdev); 509 hci_dev_unlock(hdev);
@@ -533,7 +533,7 @@ static void hci_cc_write_sc_support(struct hci_dev *hdev, struct sk_buff *skb)
533 if (sent->support) 533 if (sent->support)
534 hci_dev_set_flag(hdev, HCI_SC_ENABLED); 534 hci_dev_set_flag(hdev, HCI_SC_ENABLED);
535 else 535 else
536 clear_bit(HCI_SC_ENABLED, &hdev->dev_flags); 536 hci_dev_clear_flag(hdev, HCI_SC_ENABLED);
537 } 537 }
538 538
539 hci_dev_unlock(hdev); 539 hci_dev_unlock(hdev);
@@ -1117,7 +1117,7 @@ static void hci_cc_le_set_adv_enable(struct hci_dev *hdev, struct sk_buff *skb)
1117 &conn->le_conn_timeout, 1117 &conn->le_conn_timeout,
1118 conn->conn_timeout); 1118 conn->conn_timeout);
1119 } else { 1119 } else {
1120 clear_bit(HCI_LE_ADV, &hdev->dev_flags); 1120 hci_dev_clear_flag(hdev, HCI_LE_ADV);
1121 } 1121 }
1122 1122
1123 hci_dev_unlock(hdev); 1123 hci_dev_unlock(hdev);
@@ -1217,7 +1217,7 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev,
1217 */ 1217 */
1218 cancel_delayed_work(&hdev->le_scan_disable); 1218 cancel_delayed_work(&hdev->le_scan_disable);
1219 1219
1220 clear_bit(HCI_LE_SCAN, &hdev->dev_flags); 1220 hci_dev_clear_flag(hdev, HCI_LE_SCAN);
1221 1221
1222 /* The HCI_LE_SCAN_INTERRUPTED flag indicates that we 1222 /* The HCI_LE_SCAN_INTERRUPTED flag indicates that we
1223 * interrupted scanning due to a connect request. Mark 1223 * interrupted scanning due to a connect request. Mark
@@ -1391,8 +1391,8 @@ static void hci_cc_write_le_host_supported(struct hci_dev *hdev,
1391 hci_dev_set_flag(hdev, HCI_LE_ENABLED); 1391 hci_dev_set_flag(hdev, HCI_LE_ENABLED);
1392 } else { 1392 } else {
1393 hdev->features[1][0] &= ~LMP_HOST_LE; 1393 hdev->features[1][0] &= ~LMP_HOST_LE;
1394 clear_bit(HCI_LE_ENABLED, &hdev->dev_flags); 1394 hci_dev_clear_flag(hdev, HCI_LE_ENABLED);
1395 clear_bit(HCI_ADVERTISING, &hdev->dev_flags); 1395 hci_dev_clear_flag(hdev, HCI_ADVERTISING);
1396 } 1396 }
1397 1397
1398 if (sent->simul) 1398 if (sent->simul)
@@ -4409,7 +4409,7 @@ static void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
4409 /* All controllers implicitly stop advertising in the event of a 4409 /* All controllers implicitly stop advertising in the event of a
4410 * connection, so ensure that the state bit is cleared. 4410 * connection, so ensure that the state bit is cleared.
4411 */ 4411 */
4412 clear_bit(HCI_LE_ADV, &hdev->dev_flags); 4412 hci_dev_clear_flag(hdev, HCI_LE_ADV);
4413 4413
4414 conn = hci_conn_hash_lookup_state(hdev, LE_LINK, BT_CONNECT); 4414 conn = hci_conn_hash_lookup_state(hdev, LE_LINK, BT_CONNECT);
4415 if (!conn) { 4415 if (!conn) {