hci_event.c (5ae76a94150c86a6e0ee84eb74e7f7e1909b8d39) hci_event.c (5a134faeef82b46ff4ad244d11d8c6be41679834)
1/*
2 BlueZ - Bluetooth protocol stack for Linux
3 Copyright (c) 2000-2001, 2010, Code Aurora Forum. All rights reserved.
4
5 Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 2 as

--- 1250 unchanged lines hidden (view full) ---

1259
1260 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(rp->handle));
1261 if (conn)
1262 conn->rssi = rp->rssi;
1263
1264 hci_dev_unlock(hdev);
1265}
1266
1/*
2 BlueZ - Bluetooth protocol stack for Linux
3 Copyright (c) 2000-2001, 2010, Code Aurora Forum. All rights reserved.
4
5 Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 2 as

--- 1250 unchanged lines hidden (view full) ---

1259
1260 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(rp->handle));
1261 if (conn)
1262 conn->rssi = rp->rssi;
1263
1264 hci_dev_unlock(hdev);
1265}
1266
1267static void hci_cc_read_tx_power(struct hci_dev *hdev, struct sk_buff *skb)
1268{
1269 struct hci_cp_read_tx_power *sent;
1270 struct hci_rp_read_tx_power *rp = (void *) skb->data;
1271 struct hci_conn *conn;
1272
1273 BT_DBG("%s status 0x%2.2x", hdev->name, rp->status);
1274
1275 if (rp->status)
1276 return;
1277
1278 sent = hci_sent_cmd_data(hdev, HCI_OP_READ_TX_POWER);
1279 if (!sent)
1280 return;
1281
1282 hci_dev_lock(hdev);
1283
1284 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(rp->handle));
1285 if (conn && sent->type == 0x00)
1286 conn->tx_power = rp->tx_power;
1287
1288 hci_dev_unlock(hdev);
1289}
1290
1267static void hci_cs_inquiry(struct hci_dev *hdev, __u8 status)
1268{
1269 BT_DBG("%s status 0x%2.2x", hdev->name, status);
1270
1271 if (status) {
1272 hci_conn_check_pending(hdev);
1273 return;
1274 }

--- 1380 unchanged lines hidden (view full) ---

2655 case HCI_OP_WRITE_REMOTE_AMP_ASSOC:
2656 hci_cc_write_remote_amp_assoc(hdev, skb);
2657 break;
2658
2659 case HCI_OP_READ_RSSI:
2660 hci_cc_read_rssi(hdev, skb);
2661 break;
2662
1291static void hci_cs_inquiry(struct hci_dev *hdev, __u8 status)
1292{
1293 BT_DBG("%s status 0x%2.2x", hdev->name, status);
1294
1295 if (status) {
1296 hci_conn_check_pending(hdev);
1297 return;
1298 }

--- 1380 unchanged lines hidden (view full) ---

2679 case HCI_OP_WRITE_REMOTE_AMP_ASSOC:
2680 hci_cc_write_remote_amp_assoc(hdev, skb);
2681 break;
2682
2683 case HCI_OP_READ_RSSI:
2684 hci_cc_read_rssi(hdev, skb);
2685 break;
2686
2687 case HCI_OP_READ_TX_POWER:
2688 hci_cc_read_tx_power(hdev, skb);
2689 break;
2690
2663 default:
2664 BT_DBG("%s opcode 0x%4.4x", hdev->name, opcode);
2665 break;
2666 }
2667
2668 if (opcode != HCI_OP_NOP)
2669 del_timer(&hdev->cmd_timer);
2670

--- 1774 unchanged lines hidden ---
2691 default:
2692 BT_DBG("%s opcode 0x%4.4x", hdev->name, opcode);
2693 break;
2694 }
2695
2696 if (opcode != HCI_OP_NOP)
2697 del_timer(&hdev->cmd_timer);
2698

--- 1774 unchanged lines hidden ---