diff options
author | Gustavo F. Padovan <padovan@profusion.mobi> | 2012-03-07 23:25:00 -0500 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2012-03-08 00:02:26 -0500 |
commit | 04124681f104c1980024ff249a34a77a249fd2bc (patch) | |
tree | 5caad821f1cdd55930b054cbdeab1c45421559b4 /net/bluetooth/hci_core.c | |
parent | f64b993f44c3a5fe709b276ac5652d006afe9d33 (diff) |
Bluetooth: fix conding style issues all over the tree
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r-- | net/bluetooth/hci_core.c | 49 |
1 files changed, 22 insertions, 27 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 661d65fc487b..59ec99eb739b 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -431,7 +431,7 @@ struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev, bdaddr_t *b | |||
431 | } | 431 | } |
432 | 432 | ||
433 | struct inquiry_entry *hci_inquiry_cache_lookup_unknown(struct hci_dev *hdev, | 433 | struct inquiry_entry *hci_inquiry_cache_lookup_unknown(struct hci_dev *hdev, |
434 | bdaddr_t *bdaddr) | 434 | bdaddr_t *bdaddr) |
435 | { | 435 | { |
436 | struct discovery_state *cache = &hdev->discovery; | 436 | struct discovery_state *cache = &hdev->discovery; |
437 | struct inquiry_entry *e; | 437 | struct inquiry_entry *e; |
@@ -447,8 +447,8 @@ struct inquiry_entry *hci_inquiry_cache_lookup_unknown(struct hci_dev *hdev, | |||
447 | } | 447 | } |
448 | 448 | ||
449 | struct inquiry_entry *hci_inquiry_cache_lookup_resolve(struct hci_dev *hdev, | 449 | struct inquiry_entry *hci_inquiry_cache_lookup_resolve(struct hci_dev *hdev, |
450 | bdaddr_t *bdaddr, | 450 | bdaddr_t *bdaddr, |
451 | int state) | 451 | int state) |
452 | { | 452 | { |
453 | struct discovery_state *cache = &hdev->discovery; | 453 | struct discovery_state *cache = &hdev->discovery; |
454 | struct inquiry_entry *e; | 454 | struct inquiry_entry *e; |
@@ -466,7 +466,7 @@ struct inquiry_entry *hci_inquiry_cache_lookup_resolve(struct hci_dev *hdev, | |||
466 | } | 466 | } |
467 | 467 | ||
468 | void hci_inquiry_cache_update_resolve(struct hci_dev *hdev, | 468 | void hci_inquiry_cache_update_resolve(struct hci_dev *hdev, |
469 | struct inquiry_entry *ie) | 469 | struct inquiry_entry *ie) |
470 | { | 470 | { |
471 | struct discovery_state *cache = &hdev->discovery; | 471 | struct discovery_state *cache = &hdev->discovery; |
472 | struct list_head *pos = &cache->resolve; | 472 | struct list_head *pos = &cache->resolve; |
@@ -485,7 +485,7 @@ void hci_inquiry_cache_update_resolve(struct hci_dev *hdev, | |||
485 | } | 485 | } |
486 | 486 | ||
487 | bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data, | 487 | bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data, |
488 | bool name_known, bool *ssp) | 488 | bool name_known, bool *ssp) |
489 | { | 489 | { |
490 | struct discovery_state *cache = &hdev->discovery; | 490 | struct discovery_state *cache = &hdev->discovery; |
491 | struct inquiry_entry *ie; | 491 | struct inquiry_entry *ie; |
@@ -1264,7 +1264,7 @@ struct smp_ltk *hci_find_ltk(struct hci_dev *hdev, __le16 ediv, u8 rand[8]) | |||
1264 | EXPORT_SYMBOL(hci_find_ltk); | 1264 | EXPORT_SYMBOL(hci_find_ltk); |
1265 | 1265 | ||
1266 | struct smp_ltk *hci_find_ltk_by_addr(struct hci_dev *hdev, bdaddr_t *bdaddr, | 1266 | struct smp_ltk *hci_find_ltk_by_addr(struct hci_dev *hdev, bdaddr_t *bdaddr, |
1267 | u8 addr_type) | 1267 | u8 addr_type) |
1268 | { | 1268 | { |
1269 | struct smp_ltk *k; | 1269 | struct smp_ltk *k; |
1270 | 1270 | ||
@@ -1278,7 +1278,7 @@ struct smp_ltk *hci_find_ltk_by_addr(struct hci_dev *hdev, bdaddr_t *bdaddr, | |||
1278 | EXPORT_SYMBOL(hci_find_ltk_by_addr); | 1278 | EXPORT_SYMBOL(hci_find_ltk_by_addr); |
1279 | 1279 | ||
1280 | int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key, | 1280 | int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key, |
1281 | bdaddr_t *bdaddr, u8 *val, u8 type, u8 pin_len) | 1281 | bdaddr_t *bdaddr, u8 *val, u8 type, u8 pin_len) |
1282 | { | 1282 | { |
1283 | struct link_key *key, *old_key; | 1283 | struct link_key *key, *old_key; |
1284 | u8 old_key_type, persistent; | 1284 | u8 old_key_type, persistent; |
@@ -1333,8 +1333,8 @@ int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key, | |||
1333 | } | 1333 | } |
1334 | 1334 | ||
1335 | int hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type, u8 type, | 1335 | int hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type, u8 type, |
1336 | int new_key, u8 authenticated, u8 tk[16], | 1336 | int new_key, u8 authenticated, u8 tk[16], u8 enc_size, u16 |
1337 | u8 enc_size, u16 ediv, u8 rand[8]) | 1337 | ediv, u8 rand[8]) |
1338 | { | 1338 | { |
1339 | struct smp_ltk *key, *old_key; | 1339 | struct smp_ltk *key, *old_key; |
1340 | 1340 | ||
@@ -1413,7 +1413,7 @@ static void hci_cmd_timer(unsigned long arg) | |||
1413 | } | 1413 | } |
1414 | 1414 | ||
1415 | struct oob_data *hci_find_remote_oob_data(struct hci_dev *hdev, | 1415 | struct oob_data *hci_find_remote_oob_data(struct hci_dev *hdev, |
1416 | bdaddr_t *bdaddr) | 1416 | bdaddr_t *bdaddr) |
1417 | { | 1417 | { |
1418 | struct oob_data *data; | 1418 | struct oob_data *data; |
1419 | 1419 | ||
@@ -1453,7 +1453,7 @@ int hci_remote_oob_data_clear(struct hci_dev *hdev) | |||
1453 | } | 1453 | } |
1454 | 1454 | ||
1455 | int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 *hash, | 1455 | int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 *hash, |
1456 | u8 *randomizer) | 1456 | u8 *randomizer) |
1457 | { | 1457 | { |
1458 | struct oob_data *data; | 1458 | struct oob_data *data; |
1459 | 1459 | ||
@@ -1476,8 +1476,7 @@ int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 *hash, | |||
1476 | return 0; | 1476 | return 0; |
1477 | } | 1477 | } |
1478 | 1478 | ||
1479 | struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, | 1479 | struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr) |
1480 | bdaddr_t *bdaddr) | ||
1481 | { | 1480 | { |
1482 | struct bdaddr_list *b; | 1481 | struct bdaddr_list *b; |
1483 | 1482 | ||
@@ -1545,7 +1544,7 @@ int hci_blacklist_del(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type) | |||
1545 | static void hci_clear_adv_cache(struct work_struct *work) | 1544 | static void hci_clear_adv_cache(struct work_struct *work) |
1546 | { | 1545 | { |
1547 | struct hci_dev *hdev = container_of(work, struct hci_dev, | 1546 | struct hci_dev *hdev = container_of(work, struct hci_dev, |
1548 | adv_work.work); | 1547 | adv_work.work); |
1549 | 1548 | ||
1550 | hci_dev_lock(hdev); | 1549 | hci_dev_lock(hdev); |
1551 | 1550 | ||
@@ -1588,11 +1587,7 @@ static inline int is_connectable_adv(u8 evt_type) | |||
1588 | } | 1587 | } |
1589 | 1588 | ||
1590 | int hci_add_adv_entry(struct hci_dev *hdev, | 1589 | int hci_add_adv_entry(struct hci_dev *hdev, |
1591 | struct hci_ev_le_advertising_info *ev) | 1590 | struct hci_ev_le_advertising_info *ev) { struct adv_entry *entry; if (!is_connectable_adv(ev->evt_type)) |
1592 | { | ||
1593 | struct adv_entry *entry; | ||
1594 | |||
1595 | if (!is_connectable_adv(ev->evt_type)) | ||
1596 | return -EINVAL; | 1591 | return -EINVAL; |
1597 | 1592 | ||
1598 | /* Only new entries should be added to adv_entries. So, if | 1593 | /* Only new entries should be added to adv_entries. So, if |
@@ -1639,7 +1634,7 @@ static void le_scan_enable_req(struct hci_dev *hdev, unsigned long opt) | |||
1639 | } | 1634 | } |
1640 | 1635 | ||
1641 | static int hci_do_le_scan(struct hci_dev *hdev, u8 type, u16 interval, | 1636 | static int hci_do_le_scan(struct hci_dev *hdev, u8 type, u16 interval, |
1642 | u16 window, int timeout) | 1637 | u16 window, int timeout) |
1643 | { | 1638 | { |
1644 | long timeo = msecs_to_jiffies(3000); | 1639 | long timeo = msecs_to_jiffies(3000); |
1645 | struct le_scan_params param; | 1640 | struct le_scan_params param; |
@@ -1657,7 +1652,7 @@ static int hci_do_le_scan(struct hci_dev *hdev, u8 type, u16 interval, | |||
1657 | hci_req_lock(hdev); | 1652 | hci_req_lock(hdev); |
1658 | 1653 | ||
1659 | err = __hci_request(hdev, le_scan_param_req, (unsigned long) ¶m, | 1654 | err = __hci_request(hdev, le_scan_param_req, (unsigned long) ¶m, |
1660 | timeo); | 1655 | timeo); |
1661 | if (!err) | 1656 | if (!err) |
1662 | err = __hci_request(hdev, le_scan_enable_req, 0, timeo); | 1657 | err = __hci_request(hdev, le_scan_enable_req, 0, timeo); |
1663 | 1658 | ||
@@ -1667,7 +1662,7 @@ static int hci_do_le_scan(struct hci_dev *hdev, u8 type, u16 interval, | |||
1667 | return err; | 1662 | return err; |
1668 | 1663 | ||
1669 | schedule_delayed_work(&hdev->le_scan_disable, | 1664 | schedule_delayed_work(&hdev->le_scan_disable, |
1670 | msecs_to_jiffies(timeout)); | 1665 | msecs_to_jiffies(timeout)); |
1671 | 1666 | ||
1672 | return 0; | 1667 | return 0; |
1673 | } | 1668 | } |
@@ -1675,7 +1670,7 @@ static int hci_do_le_scan(struct hci_dev *hdev, u8 type, u16 interval, | |||
1675 | static void le_scan_disable_work(struct work_struct *work) | 1670 | static void le_scan_disable_work(struct work_struct *work) |
1676 | { | 1671 | { |
1677 | struct hci_dev *hdev = container_of(work, struct hci_dev, | 1672 | struct hci_dev *hdev = container_of(work, struct hci_dev, |
1678 | le_scan_disable.work); | 1673 | le_scan_disable.work); |
1679 | struct hci_cp_le_set_scan_enable cp; | 1674 | struct hci_cp_le_set_scan_enable cp; |
1680 | 1675 | ||
1681 | BT_DBG("%s", hdev->name); | 1676 | BT_DBG("%s", hdev->name); |
@@ -1692,12 +1687,12 @@ static void le_scan_work(struct work_struct *work) | |||
1692 | 1687 | ||
1693 | BT_DBG("%s", hdev->name); | 1688 | BT_DBG("%s", hdev->name); |
1694 | 1689 | ||
1695 | hci_do_le_scan(hdev, param->type, param->interval, | 1690 | hci_do_le_scan(hdev, param->type, param->interval, param->window, |
1696 | param->window, param->timeout); | 1691 | param->timeout); |
1697 | } | 1692 | } |
1698 | 1693 | ||
1699 | int hci_le_scan(struct hci_dev *hdev, u8 type, u16 interval, u16 window, | 1694 | int hci_le_scan(struct hci_dev *hdev, u8 type, u16 interval, u16 window, |
1700 | int timeout) | 1695 | int timeout) |
1701 | { | 1696 | { |
1702 | struct le_scan_params *param = &hdev->le_scan_params; | 1697 | struct le_scan_params *param = &hdev->le_scan_params; |
1703 | 1698 | ||
@@ -2558,7 +2553,7 @@ static inline void hci_sched_acl_pkt(struct hci_dev *hdev) | |||
2558 | skb = skb_dequeue(&chan->data_q); | 2553 | skb = skb_dequeue(&chan->data_q); |
2559 | 2554 | ||
2560 | hci_conn_enter_active_mode(chan->conn, | 2555 | hci_conn_enter_active_mode(chan->conn, |
2561 | bt_cb(skb)->force_active); | 2556 | bt_cb(skb)->force_active); |
2562 | 2557 | ||
2563 | hci_send_frame(skb); | 2558 | hci_send_frame(skb); |
2564 | hdev->acl_last_tx = jiffies; | 2559 | hdev->acl_last_tx = jiffies; |