Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3336ffd8 authored by Chris Manton's avatar Chris Manton
Browse files

enum-ify link stack/acl/btm_acl::policy settings

And also move to only use location
And restrict from header into compilation unit

Toward readable code

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working

Change-Id: Ief031db624bf1363ee3ec4043efafcfdc4be1b59
parent f85b7aec
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -102,6 +102,15 @@ typedef struct {
       ? true                                                       \
       : false)

/* Policy settings status */
typedef enum : uint16_t {
  HCI_DISABLE_ALL_LM_MODES = 0,
  HCI_ENABLE_CENTRAL_PERIPHERAL_SWITCH = (1u << 0),
  HCI_ENABLE_HOLD_MODE = (1u << 1),
  HCI_ENABLE_SNIFF_MODE = (1u << 2),
  HCI_ENABLE_PARK_MODE = (1u << 3),
} tLINK_POLICY;

extern tBTM_CB btm_cb;

static void btm_acl_chk_peer_pkt_type_support(tACL_CONN* p,
+0 −7
Original line number Diff line number Diff line
@@ -759,13 +759,6 @@ inline std::string RoleText(hci_role_t role) {
/* Definitions for Write Secure Connections Host Support */
#define HCI_SC_MODE_ENABLED 0x01

/* Policy settings status */
#define HCI_DISABLE_ALL_LM_MODES 0x0000
#define HCI_ENABLE_CENTRAL_PERIPHERAL_SWITCH 0x0001
#define HCI_ENABLE_HOLD_MODE 0x0002
#define HCI_ENABLE_SNIFF_MODE 0x0004
#define HCI_ENABLE_PARK_MODE 0x0008

/* Filters that are sent in set filter command */
#define HCI_FILTER_CONNECTION_SETUP 0x02