linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: johan.hedberg@gmail.com
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 4/8] Bluetooth: Add address type to Out Of Band mgmt messages
Date: Thu,  9 Feb 2012 17:23:46 +0200	[thread overview]
Message-ID: <1328801030-24274-5-git-send-email-johan.hedberg@gmail.com> (raw)
In-Reply-To: <1328801030-24274-1-git-send-email-johan.hedberg@gmail.com>

From: Johan Hedberg <johan.hedberg@intel.com>

This patch updates the implementation for these mgmt to be up to date
with the latest API specification. Right now the address type isn't
actually used for anything but that might change in the future.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
---
 include/net/bluetooth/mgmt.h |    4 ++--
 net/bluetooth/mgmt.c         |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index 378d498..f284499 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -270,14 +270,14 @@ struct mgmt_rp_read_local_oob_data {
 
 #define MGMT_OP_ADD_REMOTE_OOB_DATA	0x0021
 struct mgmt_cp_add_remote_oob_data {
-	bdaddr_t bdaddr;
+	struct mgmt_addr_info addr;
 	__u8 hash[16];
 	__u8 randomizer[16];
 } __packed;
 
 #define MGMT_OP_REMOVE_REMOTE_OOB_DATA	0x0022
 struct mgmt_cp_remove_remote_oob_data {
-	bdaddr_t bdaddr;
+	struct mgmt_addr_info addr;
 } __packed;
 
 #define MGMT_OP_START_DISCOVERY		0x0023
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 16fc828..763a447 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1875,7 +1875,7 @@ static int add_remote_oob_data(struct sock *sk, u16 index, void *data,
 
 	hci_dev_lock(hdev);
 
-	err = hci_add_remote_oob_data(hdev, &cp->bdaddr, cp->hash,
+	err = hci_add_remote_oob_data(hdev, &cp->addr.bdaddr, cp->hash,
 								cp->randomizer);
 	if (err < 0)
 		err = cmd_status(sk, index, MGMT_OP_ADD_REMOTE_OOB_DATA,
@@ -1910,7 +1910,7 @@ static int remove_remote_oob_data(struct sock *sk, u16 index,
 
 	hci_dev_lock(hdev);
 
-	err = hci_remove_remote_oob_data(hdev, &cp->bdaddr);
+	err = hci_remove_remote_oob_data(hdev, &cp->addr.bdaddr);
 	if (err < 0)
 		err = cmd_status(sk, index, MGMT_OP_REMOVE_REMOTE_OOB_DATA,
 						MGMT_STATUS_INVALID_PARAMS);
-- 
1.7.9


  parent reply	other threads:[~2012-02-09 15:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-09 15:23 [PATCH 0/8] Bluetooth: Update mgmt to latest API specifiction johan.hedberg
2012-02-09 15:23 ` [PATCH 1/8] Bluetooth: Update and rename mgmt_remove_keys to mgmt_unpair_device johan.hedberg
2012-02-09 15:23 ` [PATCH 2/8] Bluetooth: Update mgmt_disconnect to match latest API johan.hedberg
2012-02-09 15:23 ` [PATCH 3/8] Bluetooth: Add address type to user_confirm and user_passkey messages johan.hedberg
2012-02-09 15:23 ` johan.hedberg [this message]
2012-02-09 15:23 ` [PATCH 5/8] Bluetooth: Add address type to mgmt blacklist messages johan.hedberg
2012-02-09 15:23 ` [PATCH 6/8] Bluetooth: Add address type to mgmt_ev_auth_failed johan.hedberg
2012-02-09 15:23 ` [PATCH 7/8] Bluetooth: Fix mgmt_unpair_device command status johan.hedberg
2012-02-09 15:23 ` [PATCH 8/8] Bluetooth: Add Device Unpaired mgmt event johan.hedberg
2012-02-09 15:50 ` [PATCH 0/8] Bluetooth: Update mgmt to latest API specifiction Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1328801030-24274-5-git-send-email-johan.hedberg@gmail.com \
    --to=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).