summaryrefslogtreecommitdiff
path: root/android/bluetooth.c
diff options
context:
space:
mode:
authorLukasz Rymanowski <lukasz.rymanowski@tieto.com>2014-09-22 12:54:06 +0200
committerSzymon Janc <szymon.janc@tieto.com>2014-10-03 10:08:53 +0200
commit4ca0a7861b474e4d0f7f5ba7e1bbfc496dab7132 (patch)
treecf79868c30c46b4dca98ff52a7c73e3cdbd32ad9 /android/bluetooth.c
parent492814f0ee946a4e399a05414006b1a485eecd71 (diff)
downloadbluez-4ca0a7861b474e4d0f7f5ba7e1bbfc496dab7132.tar.gz
android/bluetooth: Extend bt_update_sign_counter function with value
With this patch, gatt can set any value to each local/remote signed counter. It is need by next patch.
Diffstat (limited to 'android/bluetooth.c')
-rw-r--r--android/bluetooth.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/android/bluetooth.c b/android/bluetooth.c
index 3016ea489..827e2055f 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
@@ -4145,7 +4145,8 @@ static void store_sign_counter(struct device *dev, enum bt_csrk_type type)
g_key_file_free(key_file);
}
-void bt_update_sign_counter(const bdaddr_t *addr, enum bt_csrk_type type)
+void bt_update_sign_counter(const bdaddr_t *addr, enum bt_csrk_type type,
+ uint32_t val)
{
struct device *dev;
@@ -4154,9 +4155,9 @@ void bt_update_sign_counter(const bdaddr_t *addr, enum bt_csrk_type type)
return;
if (type == LOCAL_CSRK)
- dev->local_sign_cnt++;
+ dev->local_sign_cnt = val;
else
- dev->remote_sign_cnt++;
+ dev->remote_sign_cnt = val;
store_sign_counter(dev, type);
}