summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSeung-Woo Kim <sw0312.kim@samsung.com>2016-09-29 01:59:05 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:53:11 +0900
commit7cb5b609d373322f3c73689cd5459869196d7c11 (patch)
treeefb07d44eade9f3efaae788b46ab2ec8c1532cc4 /net
parent982ae0161355576215c548d6d657699c996e1afb (diff)
Bluetooth: fix vendor ext rssi link alert event
This patch fixes style for rssi link alert event from vendor specific group ext. Change-Id: I0e7003e417c5f5a590cce8264caccad515dd3c10 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_event.c15
-rw-r--r--net/bluetooth/mgmt.c12
2 files changed, 18 insertions, 9 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 28392d47e887..f8113e1a6727 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1450,6 +1450,17 @@ static void hci_cc_get_raw_rssi(struct hci_dev *hdev,
mgmt_raw_rssi_response(hdev, rp, rp->status);
}
+static void hci_vendor_ext_rssi_link_alert_evt(struct hci_dev *hdev,
+ struct sk_buff *skb)
+{
+ struct hci_ev_vendor_specific_rssi_alert *ev = (void *)skb->data;
+
+ BT_DBG("RSSI event LE_RSSI_LINK_ALERT %X", LE_RSSI_LINK_ALERT);
+
+ mgmt_rssi_alert_evt(hdev, ev->conn_handle, ev->alert_type,
+ ev->rssi_dbm);
+}
+
static void hci_vendor_specific_group_ext_evt(struct hci_dev *hdev,
struct sk_buff *skb)
{
@@ -1464,9 +1475,7 @@ static void hci_vendor_specific_group_ext_evt(struct hci_dev *hdev,
switch (event_le_ext_sub_code) {
case LE_RSSI_LINK_ALERT:
- BT_DBG("RSSI event LE_RSSI_LINK_ALERT %X",
- LE_RSSI_LINK_ALERT);
- mgmt_rssi_alert_evt(hdev, skb);
+ hci_vendor_ext_rssi_link_alert_evt(hdev, skb);
break;
default:
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index e6aa28b89acf..26611808699c 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -6602,16 +6602,16 @@ unlocked:
return err;
}
-void mgmt_rssi_alert_evt(struct hci_dev *hdev, struct sk_buff *skb)
+void mgmt_rssi_alert_evt(struct hci_dev *hdev, u16 conn_handle,
+ s8 alert_type, s8 rssi_dbm)
{
- struct hci_ev_vendor_specific_rssi_alert *ev = (void *)skb->data;
struct mgmt_ev_vendor_specific_rssi_alert mgmt_ev;
struct hci_conn *conn;
BT_DBG("RSSI alert [%2.2X %2.2X %2.2X]",
- ev->conn_handle, ev->alert_type, ev->rssi_dbm);
+ conn_handle, alert_type, rssi_dbm);
- conn = hci_conn_hash_lookup_handle(hdev, ev->conn_handle);
+ conn = hci_conn_hash_lookup_handle(hdev, conn_handle);
if (!conn) {
BT_ERR("RSSI alert Error: Device not found for handle");
@@ -6624,8 +6624,8 @@ void mgmt_rssi_alert_evt(struct hci_dev *hdev, struct sk_buff *skb)
else
mgmt_ev.link_type = 0x00;
- mgmt_ev.alert_type = ev->alert_type;
- mgmt_ev.rssi_dbm = ev->rssi_dbm;
+ mgmt_ev.alert_type = alert_type;
+ mgmt_ev.rssi_dbm = rssi_dbm;
mgmt_event(MGMT_EV_RSSI_ALERT, hdev, &mgmt_ev,
sizeof(struct mgmt_ev_vendor_specific_rssi_alert),