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 v5 02/16] Bluetooth: Add defines for BREDR pkt_type and LE PHYs
Date: Thu, 19 Jul 2018 17:09:33 +0530	[thread overview]
Message-ID: <1532000387-3649-3-git-send-email-jaganathx.kanakkassery@intel.com> (raw)
In-Reply-To: <1532000387-3649-1-git-send-email-jaganathx.kanakkassery@intel.com>

This also add macros for checking LMP support for different
pkt_types

Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
---
 include/net/bluetooth/hci.h      | 14 ++++++++++++++
 include/net/bluetooth/hci_core.h |  4 ++++
 2 files changed, 18 insertions(+)

diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 664fe1e..89bf800 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -291,6 +291,14 @@ enum {
 #define HCI_DH3		0x0800
 #define HCI_DH5		0x8000
 
+/* HCI packet types inverted masks */
+#define HCI_2DH1	0x0002
+#define HCI_3DH1	0x0004
+#define HCI_2DH3	0x0100
+#define HCI_3DH3	0x0200
+#define HCI_2DH5	0x1000
+#define HCI_3DH5	0x2000
+
 #define HCI_HV1		0x0020
 #define HCI_HV2		0x0040
 #define HCI_HV3		0x0080
@@ -354,6 +362,8 @@ enum {
 #define LMP_PCONTROL	0x04
 #define LMP_TRANSPARENT	0x08
 
+#define LMP_EDR_2M		0x02
+#define LMP_EDR_3M		0x04
 #define LMP_RSSI_INQ	0x40
 #define LMP_ESCO	0x80
 
@@ -361,7 +371,9 @@ enum {
 #define LMP_EV5		0x02
 #define LMP_NO_BREDR	0x20
 #define LMP_LE		0x40
+#define LMP_EDR_3SLOT	0x80
 
+#define LMP_EDR_5SLOT	0x01
 #define LMP_SNIFF_SUBR	0x02
 #define LMP_PAUSE_ENC	0x04
 #define LMP_EDR_ESCO_2M	0x20
@@ -399,6 +411,8 @@ enum {
 #define HCI_LE_PING			0x10
 #define HCI_LE_DATA_LEN_EXT		0x20
 #define HCI_LE_EXT_SCAN_POLICY		0x80
+#define HCI_LE_PHY_2M			0x01
+#define HCI_LE_PHY_CODED		0x08
 #define HCI_LE_CHAN_SEL_ALG2		0x40
 
 /* Connection modes */
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 71f79df..a64d13f 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -1141,6 +1141,10 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
 #define lmp_inq_tx_pwr_capable(dev) ((dev)->features[0][7] & LMP_INQ_TX_PWR)
 #define lmp_ext_feat_capable(dev)  ((dev)->features[0][7] & LMP_EXTFEATURES)
 #define lmp_transp_capable(dev)    ((dev)->features[0][2] & LMP_TRANSPARENT)
+#define lmp_edr_2m_capable(dev)    ((dev)->features[0][3] & LMP_EDR_2M)
+#define lmp_edr_3m_capable(dev)    ((dev)->features[0][3] & LMP_EDR_3M)
+#define lmp_edr_3slot_capable(dev) ((dev)->features[0][4] & LMP_EDR_3SLOT)
+#define lmp_edr_5slot_capable(dev) ((dev)->features[0][5] & LMP_EDR_5SLOT)
 
 /* ----- Extended LMP capabilities ----- */
 #define lmp_csb_master_capable(dev) ((dev)->features[2][0] & LMP_CSB_MASTER)
-- 
2.7.4

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

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19 11:39 [PATCH v5 00/16] Bluetooth: Extended Adv, Scan, Connection and PHY support Jaganath Kanakkassery
2018-07-19 11:39 ` [PATCH v5 01/16] Bluetooth: Define PHY flags in hdev and set 1M as default Jaganath Kanakkassery
2018-07-19 11:39 ` Jaganath Kanakkassery [this message]
2018-07-19 11:39 ` [PATCH v5 03/16] Bluetooth: Implement Get PHY Configuration mgmt command Jaganath Kanakkassery
2018-07-19 11:39 ` [PATCH v5 04/16] Bluetooth: Implement Set PHY Confguration command Jaganath Kanakkassery
2018-07-19 11:39 ` [PATCH v5 05/16] Bluetooth: Implement PHY changed event Jaganath Kanakkassery
2018-07-19 11:39 ` [PATCH v5 06/16] Bluetooth: Set Scan PHYs based on selected PHYs by user Jaganath Kanakkassery
2018-07-19 11:39 ` [PATCH v5 07/16] Bluetooth: Handle extended ADV PDU types Jaganath Kanakkassery
2018-07-19 11:39 ` [PATCH v5 08/16] Bluetooth: Use selected PHYs in extended connect Jaganath Kanakkassery
2018-07-19 11:39 ` [PATCH v5 09/16] Bluetooth: Read no of adv sets during init Jaganath Kanakkassery
2018-07-19 11:39 ` [PATCH v5 10/16] Bluetooth: Impmlement extended adv enable Jaganath Kanakkassery
2018-07-19 11:39 ` [PATCH v5 11/16] Bluetooth: Use Set ext adv/scan rsp data if controller supports Jaganath Kanakkassery
2018-07-19 11:39 ` [PATCH v5 12/16] Bluetooth: Implement disable and removal of adv instance Jaganath Kanakkassery
2018-07-19 11:39 ` [PATCH v5 13/16] Bluetooth: Use ext adv for directed adv Jaganath Kanakkassery
2018-07-19 11:39 ` [PATCH v5 14/16] Bluetooth: Implement Set ADV set random address Jaganath Kanakkassery
2018-07-19 11:39 ` [PATCH v5 15/16] Bluetooth: Handle ADv set terminated event Jaganath Kanakkassery
2018-07-19 11:39 ` [PATCH v5 16/16] Bluetooth: Implement secondary advertising on different PHYs Jaganath Kanakkassery
2018-07-30 11:58 ` [PATCH v5 00/16] Bluetooth: Extended Adv, Scan, Connection and PHY support 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=1532000387-3649-3-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).