linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaganath Kanakkassery <jaganath.k.os@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: marcel@holtmann.org,
	Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
Subject: [PATCH BlueZ v1 1/7] monitor: Add BREDR PHYs in PHY configuration commands
Date: Thu, 19 Jul 2018 16:54:01 +0530	[thread overview]
Message-ID: <1531999447-3479-2-git-send-email-jaganathx.kanakkassery@intel.com> (raw)
In-Reply-To: <1531999447-3479-1-git-send-email-jaganathx.kanakkassery@intel.com>

---
 monitor/packet.c | 39 +++++++++++++++++++++++++--------------
 1 file changed, 25 insertions(+), 14 deletions(-)

diff --git a/monitor/packet.c b/monitor/packet.c
index 68678f5..b359588 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -11749,12 +11749,21 @@ static void mgmt_set_apperance_cmd(const void *data, uint16_t size)
 }
 
 static const struct bitfield_data mgmt_phy_table[] = {
-	{  0, "1MTX"	},
-	{  1, "1MRX"	},
-	{  2, "2MTX"	},
-	{  3, "2MRX"	},
-	{  4, "CODEDTX"	},
-	{  5, "CODEDRX"	},
+	{  0, "BR 1M 1SLOT"	},
+	{  1, "BR 1M 3SLOT"	},
+	{  2, "BR 1M 5SLOT"	},
+	{  3, "EDR 2M 1SLOT"	},
+	{  4, "EDR 2M 3SLOT"	},
+	{  5, "EDR 2M 5SLOT"	},
+	{  6, "EDR 3M 1SLOT"	},
+	{  7, "EDR 3M 3SLOT"	},
+	{  8, "EDR 3M 5SLOT"	},
+	{  9, "LE 1M TX"	},
+	{  10, "LE 1M RX"	},
+	{  11, "LE 2M TX"	},
+	{  12, "LE 2M RX"	},
+	{  13, "LE CODED TX"	},
+	{  14, "LE CODED RX"	},
 	{ }
 };
 
@@ -11772,18 +11781,20 @@ static void mgmt_print_phys(const char *label, uint16_t phys)
 
 static void mgmt_get_phy_rsp(const void *data, uint16_t size)
 {
-	uint16_t supported_phys = get_le16(data);
-	uint16_t selected_phys = get_le16(data + 2);
+	uint32_t supported_phys = get_le32(data);
+	uint32_t configurable_phys = get_le32(data + 4);
+	uint32_t selected_phys = get_le32(data + 8);
 
 	mgmt_print_phys("Supported PHYs", supported_phys);
+	mgmt_print_phys("Configurable PHYs", configurable_phys);
 	mgmt_print_phys("Selected PHYs", selected_phys);
 }
 
 static void mgmt_set_phy_cmd(const void *data, uint16_t size)
 {
-	uint16_t default_phys = get_le16(data);
+	uint32_t selected_phys = get_le32(data);
 
-	mgmt_print_phys("Default PHYs", default_phys);
+	mgmt_print_phys("Selected PHYs", selected_phys);
 }
 
 struct mgmt_data {
@@ -12001,9 +12012,9 @@ static const struct mgmt_data mgmt_command_table[] = {
 				mgmt_null_rsp, 0, true },
 	{ 0x0044, "Get PHY Configuration",
 				mgmt_null_cmd, 0, true,
-				mgmt_get_phy_rsp, 4, true },
+				mgmt_get_phy_rsp, 12, true },
 	{ 0x0045, "Set PHY Configuration",
-				mgmt_set_phy_cmd, 2, true,
+				mgmt_set_phy_cmd, 4, true,
 				mgmt_null_rsp, 0, true },
 	{ }
 };
@@ -12385,7 +12396,7 @@ static void mgmt_ext_controller_info_changed_evt(const void *data, uint16_t size
 
 static void mgmt_phy_changed_evt(const void *data, uint16_t size)
 {
-	uint16_t selected_phys = get_le16(data);
+	uint32_t selected_phys = get_le32(data);
 
 	mgmt_print_phys("Selected PHYs", selected_phys);
 }
@@ -12466,7 +12477,7 @@ static const struct mgmt_data mgmt_event_table[] = {
 	{ 0x0025, "Extended Controller Information Changed",
 			mgmt_ext_controller_info_changed_evt, 2, false },
 	{ 0x0026, "PHY Configuration Changed",
-			mgmt_phy_changed_evt, 2, true },
+			mgmt_phy_changed_evt, 4, true },
 	{ }
 };
 
-- 
2.7.4

  reply	other threads:[~2018-07-19 11:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19 11:24 [PATCH BlueZ v1 0/7] Add BREDR PHYs in PHY configuration commands Jaganath Kanakkassery
2018-07-19 11:24 ` Jaganath Kanakkassery [this message]
2018-07-19 11:24 ` [PATCH BlueZ v1 2/7] emulator: Add BREDR 2M & 3M, 3 & 5 Slot packet type support Jaganath Kanakkassery
2018-07-19 11:24 ` [PATCH BlueZ v1 3/7] mgmt-tester: Add extended advertising test cases Jaganath Kanakkassery
2018-07-19 11:24 ` [PATCH BlueZ v1 4/7] mgmt-tester: Add PHY Configuration " Jaganath Kanakkassery
2018-07-19 11:24 ` [PATCH BlueZ v1 5/7] mgmt-tester: Add tests for extended scanning and device found Jaganath Kanakkassery
2018-07-19 11:24 ` [PATCH BlueZ v1 6/7] mgmt-tester: Add support ext create connection and enh conn complete Jaganath Kanakkassery
2018-07-19 11:24 ` [PATCH BlueZ v1 7/7] mgmt-tester: Update Supported_settings to reflect PHY_CONFIGURATION Jaganath Kanakkassery
2018-07-24  6:42 ` [PATCH BlueZ v1 0/7] Add BREDR PHYs in PHY configuration commands Johan Hedberg

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=1531999447-3479-2-git-send-email-jaganathx.kanakkassery@intel.com \
    --to=jaganath.k.os@gmail.com \
    --cc=jaganathx.kanakkassery@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.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).