Message ID | 20211015050929.3130100-1-luiz.dentz@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Luiz Von Dentz |
Headers | show |
Series | [BlueZ,1/7] monitor: Add packet definitions for MSFT extension | expand |
This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series: PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=563859 ---Test result--- Test Summary: CheckPatch FAIL 4.45 seconds GitLint FAIL 2.34 seconds Prep - Setup ELL PASS 56.30 seconds Build - Prep PASS 0.25 seconds Build - Configure PASS 10.00 seconds Build - Make PASS 238.32 seconds Make Check PASS 9.34 seconds Make Distcheck PASS 279.48 seconds Build w/ext ELL - Configure PASS 10.29 seconds Build w/ext ELL - Make PASS 226.33 seconds Details ############################## Test: CheckPatch - FAIL Desc: Run checkpatch.pl script with rule in .checkpatch.conf Output: [BlueZ,1/7] monitor: Add packet definitions for MSFT extension WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #101: FILE: monitor/msft.h:31: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #109: FILE: monitor/msft.h:39: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #120: FILE: monitor/msft.h:50: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #125: FILE: monitor/msft.h:55: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #132: FILE: monitor/msft.h:62: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #137: FILE: monitor/msft.h:67: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #146: FILE: monitor/msft.h:76: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #151: FILE: monitor/msft.h:81: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #160: FILE: monitor/msft.h:90: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #164: FILE: monitor/msft.h:94: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #170: FILE: monitor/msft.h:100: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #180: FILE: monitor/msft.h:110: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #186: FILE: monitor/msft.h:116: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #193: FILE: monitor/msft.h:123: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #198: FILE: monitor/msft.h:128: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #205: FILE: monitor/msft.h:135: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #210: FILE: monitor/msft.h:140: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #217: FILE: monitor/msft.h:147: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #224: FILE: monitor/msft.h:154: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #233: FILE: monitor/msft.h:163: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #243: FILE: monitor/msft.h:173: +} __attribute__((packed)); /github/workspace/src/12560019.patch total: 0 errors, 21 warnings, 154 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. /github/workspace/src/12560019.patch has style problems, please review. NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. [BlueZ,3/7] vhci: Read the controller index WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #173: FILE: emulator/vhci.c:95: +} __attribute__((packed)); WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) #179: FILE: emulator/vhci.c:101: +} __attribute__((packed)); /github/workspace/src/12560021.patch total: 0 errors, 2 warnings, 172 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. /github/workspace/src/12560021.patch has style problems, please review. NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. [BlueZ,5/7] hciemu: Use vhci_open to instanciate a vhci btdev WARNING:TYPO_SPELLING: 'instanciate' may be misspelled - perhaps 'instantiate'? #72: Subject: [PATCH BlueZ 5/7] hciemu: Use vhci_open to instanciate a vhci btdev ^^^^^^^^^^^ /github/workspace/src/12560027.patch total: 0 errors, 1 warnings, 355 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. /github/workspace/src/12560027.patch has style problems, please review. NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. ############################## Test: GitLint - FAIL Desc: Run gitlint with rule in .gitlint Output: [BlueZ,7/7] mgmt-tester: Make use of vhci_set_force_suspend/vhci_set_force_wakeup 1: T1 Title exceeds max length (81>80): "[BlueZ,7/7] mgmt-tester: Make use of vhci_set_force_suspend/vhci_set_force_wakeup" --- Regards, Linux Bluetooth
Hi Tedd, Manish, On Thu, Oct 14, 2021 at 10:36 PM <bluez.test.bot@gmail.com> wrote: > > This is automated email and please do not reply to this email! > > Dear submitter, > > Thank you for submitting the patches to the linux bluetooth mailing list. > This is a CI test results with your patch series: > PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=563859 Do you guys have any comments on this set? Id like to push it but I haven't been able to validate if the PDU definitions, etc, are set properly. > ---Test result--- > > Test Summary: > CheckPatch FAIL 4.45 seconds > GitLint FAIL 2.34 seconds > Prep - Setup ELL PASS 56.30 seconds > Build - Prep PASS 0.25 seconds > Build - Configure PASS 10.00 seconds > Build - Make PASS 238.32 seconds > Make Check PASS 9.34 seconds > Make Distcheck PASS 279.48 seconds > Build w/ext ELL - Configure PASS 10.29 seconds > Build w/ext ELL - Make PASS 226.33 seconds > > Details > ############################## > Test: CheckPatch - FAIL > Desc: Run checkpatch.pl script with rule in .checkpatch.conf > Output: > [BlueZ,1/7] monitor: Add packet definitions for MSFT extension > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #101: FILE: monitor/msft.h:31: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #109: FILE: monitor/msft.h:39: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #120: FILE: monitor/msft.h:50: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #125: FILE: monitor/msft.h:55: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #132: FILE: monitor/msft.h:62: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #137: FILE: monitor/msft.h:67: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #146: FILE: monitor/msft.h:76: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #151: FILE: monitor/msft.h:81: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #160: FILE: monitor/msft.h:90: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #164: FILE: monitor/msft.h:94: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #170: FILE: monitor/msft.h:100: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #180: FILE: monitor/msft.h:110: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #186: FILE: monitor/msft.h:116: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #193: FILE: monitor/msft.h:123: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #198: FILE: monitor/msft.h:128: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #205: FILE: monitor/msft.h:135: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #210: FILE: monitor/msft.h:140: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #217: FILE: monitor/msft.h:147: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #224: FILE: monitor/msft.h:154: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #233: FILE: monitor/msft.h:163: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #243: FILE: monitor/msft.h:173: > +} __attribute__((packed)); > > /github/workspace/src/12560019.patch total: 0 errors, 21 warnings, 154 lines checked > > NOTE: For some of the reported defects, checkpatch may be able to > mechanically convert to the typical style using --fix or --fix-inplace. > > /github/workspace/src/12560019.patch has style problems, please review. > > NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO > > NOTE: If any of the errors are false positives, please report > them to the maintainer, see CHECKPATCH in MAINTAINERS. > > [BlueZ,3/7] vhci: Read the controller index > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #173: FILE: emulator/vhci.c:95: > +} __attribute__((packed)); > > WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed)) > #179: FILE: emulator/vhci.c:101: > +} __attribute__((packed)); > > /github/workspace/src/12560021.patch total: 0 errors, 2 warnings, 172 lines checked > > NOTE: For some of the reported defects, checkpatch may be able to > mechanically convert to the typical style using --fix or --fix-inplace. > > /github/workspace/src/12560021.patch has style problems, please review. > > NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO > > NOTE: If any of the errors are false positives, please report > them to the maintainer, see CHECKPATCH in MAINTAINERS. > > [BlueZ,5/7] hciemu: Use vhci_open to instanciate a vhci btdev > WARNING:TYPO_SPELLING: 'instanciate' may be misspelled - perhaps 'instantiate'? > #72: > Subject: [PATCH BlueZ 5/7] hciemu: Use vhci_open to instanciate a vhci btdev > ^^^^^^^^^^^ > > /github/workspace/src/12560027.patch total: 0 errors, 1 warnings, 355 lines checked > > NOTE: For some of the reported defects, checkpatch may be able to > mechanically convert to the typical style using --fix or --fix-inplace. > > /github/workspace/src/12560027.patch has style problems, please review. > > NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO > > NOTE: If any of the errors are false positives, please report > them to the maintainer, see CHECKPATCH in MAINTAINERS. > > > ############################## > Test: GitLint - FAIL > Desc: Run gitlint with rule in .gitlint > Output: > [BlueZ,7/7] mgmt-tester: Make use of vhci_set_force_suspend/vhci_set_force_wakeup > 1: T1 Title exceeds max length (81>80): "[BlueZ,7/7] mgmt-tester: Make use of vhci_set_force_suspend/vhci_set_force_wakeup" > > > > > --- > Regards, > Linux Bluetooth >
Hi Manish, On Mon, Oct 18, 2021 at 7:53 AM Manish Mandlik <mmandlik@google.com> wrote: > > Hi Luiz, > > On Fri, Oct 15, 2021 at 1:09 AM Luiz Augusto von Dentz <luiz.dentz@gmail.com> wrote: >> >> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> >> >> This adds proper packet definitions for command and response of MSFT >> extension. >> --- >> monitor/msft.h | 148 +++++++++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 148 insertions(+) >> >> diff --git a/monitor/msft.h b/monitor/msft.h >> index a268f4bc7..90a64117a 100644 >> --- a/monitor/msft.h >> +++ b/monitor/msft.h >> @@ -24,6 +24,154 @@ >> >> #include <stdint.h> >> >> +#define MSFT_SUBCMD_READ_SUPPORTED_FEATURES 0x00 >> + >> +struct msft_cmd_read_supported_features { >> + uint8_t subcmd; >> +} __attribute__((packed)); >> + >> +struct msft_rsp_read_supported_features { >> + uint8_t status; >> + uint8_t subcmd; >> + uint8_t features[8]; >> + uint8_t evt_prefix_len; >> + uint8_t evt_prefix[]; >> +} __attribute__((packed)); >> + >> +#define MSFT_SUBCMD_MONITOR_RSSI 0x01 >> + >> +struct msft_cmd_monitor_rssi { >> + uint8_t subcmd; >> + uint16_t handle; >> + int8_t rssi_high; >> + int8_t rssi_low; >> + uint8_t rssi_low_interval; >> + uint8_t rssi_period; >> +} __attribute__((packed)); >> + >> +struct msft_rsp_monitor_rssi { >> + uint8_t status; >> + uint8_t subcmd; >> +} __attribute__((packed)); >> + >> +#define MSFT_SUBCMD_CANCEL_MONITOR_RSSI 0x02 >> + >> +struct msft_cmd_cancel_monitor_rssi { >> + uint8_t subcmd; >> + uint16_t handle; >> +} __attribute__((packed)); >> + >> +struct msft_rsp_cancel_monitor_rssi { >> + uint8_t status; >> + uint8_t subcmd; >> +} __attribute__((packed)); >> + >> +#define MSFT_SUBCMD_LE_MONITOR_ADV 0x03 >> + >> +struct msft_le_monitor_pattern { >> + uint8_t len; >> + uint8_t type; >> + uint8_t start; >> + uint8_t data[]; >> +} __attribute__((packed)); >> + > > > + #define MSFT_COND_LE_MONITOR_ADV_PATTERN 0x01 >> >> +struct msft_le_monitor_adv_pattern_type { >> + uint8_t num_patterns; >> + struct msft_le_monitor_pattern data[]; >> +} __attribute__((packed)); >> + > > > + #define MSFT_COND_LE_MONITOR_ADV_UUID 0x02 >> >> +struct msft_le_monitor_adv_uuid_type { >> + uint8_t type; >> + union { >> + uint16_t u16; >> + uint32_t u32; >> + uint8_t u128[8]; >> + } value; >> +} __attribute__((packed)); >> + > > > + #define MSFT_COND_LE_MONITOR_ADV_IRK 0x03 >> >> +struct msft_le_monitor_adv_irk_type { >> + uint8_t irk[8]; >> +} __attribute__((packed)); >> + >> +#define MSFT_SUBCMD_LE_MONITOR_ADV_ADDR 0x04 > > I think this is not a subcommand. Instead, it is a condition type. So we can rename this to something else, e.g. MSFT_COND_LE_MONITOR_ADV_ADDR. > Similarly, we'll have to define other three condition types as well for msft_le_monitor_adv_pattern_type, msft_le_monitor_adv_uuid_type and msft_le_monitor_adv_irk_type as mentioned above. Right I will fix it since the intent was to have it as conditions, thanks for reviewing. >> +struct msft_le_monitor_adv_addr { >> + uint8_t type; >> + uint8_t addr[6]; >> +} __attribute__((packed)); >> + >> +struct msft_cmd_le_monitor_adv { >> + uint8_t subcmd; >> + int8_t rssi_low; >> + int8_t rssi_high; > > Order should be: > + int8_t rssi_high; > + int8_t rssi_low; >> >> + uint8_t rssi_low_interval; >> + uint8_t rssi_period; >> + uint8_t type; >> + uint8_t data[]; >> +} __attribute__((packed)); >> + >> +struct msft_rsp_le_monitor_adv { >> + uint8_t status; >> + uint8_t subcmd; >> + uint8_t handle; >> +} __attribute__((packed)); >> + >> +#define MSFT_SUBCMD_LE_CANCEL_MONITOR_ADV 0x04 >> + >> +struct msft_cmd_le_cancel_monitor_adv { >> + uint8_t subcmd; >> + uint8_t handle; >> +} __attribute__((packed)); >> + >> +struct msft_rsp_le_cancel_monitor_adv { >> + uint8_t status; >> + uint8_t subcmd; >> +} __attribute__((packed)); >> + >> +#define MSFT_SUBCMD_LE_MONITOR_ADV_ENABLE 0x05 >> + >> +struct msft_cmd_le_monitor_adv_enable { >> + uint8_t subcmd; >> + uint8_t enable; >> +} __attribute__((packed)); >> + >> +struct msft_rsp_le_monitor_adv_enable { >> + uint8_t status; >> + uint8_t subcmd; >> +} __attribute__((packed)); >> + >> +#define MSFT_SUBCMD_READ_ABS_RSSI 0x06 >> + >> +struct msft_cmd_read_abs_rssi { >> + uint8_t subcmd; >> + uint16_t handle; >> +} __attribute__((packed)); >> + >> +struct msft_rsp_read_abs_rssi { >> + uint8_t status; >> + uint8_t subcmd; >> + uint16_t handle; >> + uint8_t rssi; Ack. > 'int8_t rssi' instead of 'uint8_t rssi' > >> +} __attribute__((packed)); >> + >> +#define MSFT_SUBEVT_RSSI 0x01 >> + >> +struct msft_evt_rssi { >> + uint8_t subevt; >> + uint8_t status; >> + uint16_t handle; >> + uint8_t rssi; > > same as above - 'int8_t rssi' instead of 'uint8_t rssi' Ack. > >> +} __attribute__((packed)); >> + >> +#define MSFT_SUBEVT_MONITOR_DEVICE 0x02 >> + >> +struct msft_evt_monitor_device { >> + uint8_t subevt; >> + uint8_t addr_type; >> + uint8_t addr[6]; >> + uint8_t handle; >> + uint8_t state; >> +} __attribute__((packed)); >> + >> struct vendor_ocf; >> struct vendor_evt; >> >> -- >> 2.31.1 >> > > Rest of the changes look good to me. > > Thanks, > Manish.
Hi, On Mon, Oct 18, 2021 at 9:24 AM Luiz Augusto von Dentz <luiz.dentz@gmail.com> wrote: > > Hi Manish, > > On Mon, Oct 18, 2021 at 7:53 AM Manish Mandlik <mmandlik@google.com> wrote: > > > > Hi Luiz, > > > > On Fri, Oct 15, 2021 at 1:09 AM Luiz Augusto von Dentz <luiz.dentz@gmail.com> wrote: > >> > >> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> > >> > >> This adds proper packet definitions for command and response of MSFT > >> extension. > >> --- > >> monitor/msft.h | 148 +++++++++++++++++++++++++++++++++++++++++++++++++ > >> 1 file changed, 148 insertions(+) > >> > >> diff --git a/monitor/msft.h b/monitor/msft.h > >> index a268f4bc7..90a64117a 100644 > >> --- a/monitor/msft.h > >> +++ b/monitor/msft.h > >> @@ -24,6 +24,154 @@ > >> > >> #include <stdint.h> > >> > >> +#define MSFT_SUBCMD_READ_SUPPORTED_FEATURES 0x00 > >> + > >> +struct msft_cmd_read_supported_features { > >> + uint8_t subcmd; > >> +} __attribute__((packed)); > >> + > >> +struct msft_rsp_read_supported_features { > >> + uint8_t status; > >> + uint8_t subcmd; > >> + uint8_t features[8]; > >> + uint8_t evt_prefix_len; > >> + uint8_t evt_prefix[]; > >> +} __attribute__((packed)); > >> + > >> +#define MSFT_SUBCMD_MONITOR_RSSI 0x01 > >> + > >> +struct msft_cmd_monitor_rssi { > >> + uint8_t subcmd; > >> + uint16_t handle; > >> + int8_t rssi_high; > >> + int8_t rssi_low; > >> + uint8_t rssi_low_interval; > >> + uint8_t rssi_period; > >> +} __attribute__((packed)); > >> + > >> +struct msft_rsp_monitor_rssi { > >> + uint8_t status; > >> + uint8_t subcmd; > >> +} __attribute__((packed)); > >> + > >> +#define MSFT_SUBCMD_CANCEL_MONITOR_RSSI 0x02 > >> + > >> +struct msft_cmd_cancel_monitor_rssi { > >> + uint8_t subcmd; > >> + uint16_t handle; > >> +} __attribute__((packed)); > >> + > >> +struct msft_rsp_cancel_monitor_rssi { > >> + uint8_t status; > >> + uint8_t subcmd; > >> +} __attribute__((packed)); > >> + > >> +#define MSFT_SUBCMD_LE_MONITOR_ADV 0x03 > >> + > >> +struct msft_le_monitor_pattern { > >> + uint8_t len; > >> + uint8_t type; > >> + uint8_t start; > >> + uint8_t data[]; > >> +} __attribute__((packed)); > >> + > > > > > > + #define MSFT_COND_LE_MONITOR_ADV_PATTERN 0x01 > >> > >> +struct msft_le_monitor_adv_pattern_type { > >> + uint8_t num_patterns; > >> + struct msft_le_monitor_pattern data[]; > >> +} __attribute__((packed)); > >> + > > > > > > + #define MSFT_COND_LE_MONITOR_ADV_UUID 0x02 > >> > >> +struct msft_le_monitor_adv_uuid_type { > >> + uint8_t type; > >> + union { > >> + uint16_t u16; > >> + uint32_t u32; > >> + uint8_t u128[8]; > >> + } value; > >> +} __attribute__((packed)); > >> + > > > > > > + #define MSFT_COND_LE_MONITOR_ADV_IRK 0x03 > >> > >> +struct msft_le_monitor_adv_irk_type { > >> + uint8_t irk[8]; > >> +} __attribute__((packed)); > >> + > >> +#define MSFT_SUBCMD_LE_MONITOR_ADV_ADDR 0x04 > > > > I think this is not a subcommand. Instead, it is a condition type. So we can rename this to something else, e.g. MSFT_COND_LE_MONITOR_ADV_ADDR. > > Similarly, we'll have to define other three condition types as well for msft_le_monitor_adv_pattern_type, msft_le_monitor_adv_uuid_type and msft_le_monitor_adv_irk_type as mentioned above. > > Right I will fix it since the intent was to have it as conditions, > thanks for reviewing. > > >> +struct msft_le_monitor_adv_addr { > >> + uint8_t type; > >> + uint8_t addr[6]; > >> +} __attribute__((packed)); > >> + > >> +struct msft_cmd_le_monitor_adv { > >> + uint8_t subcmd; > >> + int8_t rssi_low; > >> + int8_t rssi_high; > > > > Order should be: > > + int8_t rssi_high; > > + int8_t rssi_low; > >> > >> + uint8_t rssi_low_interval; > >> + uint8_t rssi_period; > >> + uint8_t type; > >> + uint8_t data[]; > >> +} __attribute__((packed)); > >> + > >> +struct msft_rsp_le_monitor_adv { > >> + uint8_t status; > >> + uint8_t subcmd; > >> + uint8_t handle; > >> +} __attribute__((packed)); > >> + > >> +#define MSFT_SUBCMD_LE_CANCEL_MONITOR_ADV 0x04 > >> + > >> +struct msft_cmd_le_cancel_monitor_adv { > >> + uint8_t subcmd; > >> + uint8_t handle; > >> +} __attribute__((packed)); > >> + > >> +struct msft_rsp_le_cancel_monitor_adv { > >> + uint8_t status; > >> + uint8_t subcmd; > >> +} __attribute__((packed)); > >> + > >> +#define MSFT_SUBCMD_LE_MONITOR_ADV_ENABLE 0x05 > >> + > >> +struct msft_cmd_le_monitor_adv_enable { > >> + uint8_t subcmd; > >> + uint8_t enable; > >> +} __attribute__((packed)); > >> + > >> +struct msft_rsp_le_monitor_adv_enable { > >> + uint8_t status; > >> + uint8_t subcmd; > >> +} __attribute__((packed)); > >> + > >> +#define MSFT_SUBCMD_READ_ABS_RSSI 0x06 > >> + > >> +struct msft_cmd_read_abs_rssi { > >> + uint8_t subcmd; > >> + uint16_t handle; > >> +} __attribute__((packed)); > >> + > >> +struct msft_rsp_read_abs_rssi { > >> + uint8_t status; > >> + uint8_t subcmd; > >> + uint16_t handle; > >> + uint8_t rssi; > > Ack. > > > 'int8_t rssi' instead of 'uint8_t rssi' > > > >> +} __attribute__((packed)); > >> + > >> +#define MSFT_SUBEVT_RSSI 0x01 > >> + > >> +struct msft_evt_rssi { > >> + uint8_t subevt; > >> + uint8_t status; > >> + uint16_t handle; > >> + uint8_t rssi; > > > > same as above - 'int8_t rssi' instead of 'uint8_t rssi' > > Ack. > > > > >> +} __attribute__((packed)); > >> + > >> +#define MSFT_SUBEVT_MONITOR_DEVICE 0x02 > >> + > >> +struct msft_evt_monitor_device { > >> + uint8_t subevt; > >> + uint8_t addr_type; > >> + uint8_t addr[6]; > >> + uint8_t handle; > >> + uint8_t state; > >> +} __attribute__((packed)); > >> + > >> struct vendor_ocf; > >> struct vendor_evt; > >> > >> -- > >> 2.31.1 > >> > > > > Rest of the changes look good to me. > > > > Thanks, > > Manish. > > > > -- > Luiz Augusto von Dentz Pushed after making the suggested changes.
diff --git a/monitor/msft.h b/monitor/msft.h index a268f4bc7..90a64117a 100644 --- a/monitor/msft.h +++ b/monitor/msft.h @@ -24,6 +24,154 @@ #include <stdint.h> +#define MSFT_SUBCMD_READ_SUPPORTED_FEATURES 0x00 + +struct msft_cmd_read_supported_features { + uint8_t subcmd; +} __attribute__((packed)); + +struct msft_rsp_read_supported_features { + uint8_t status; + uint8_t subcmd; + uint8_t features[8]; + uint8_t evt_prefix_len; + uint8_t evt_prefix[]; +} __attribute__((packed)); + +#define MSFT_SUBCMD_MONITOR_RSSI 0x01 + +struct msft_cmd_monitor_rssi { + uint8_t subcmd; + uint16_t handle; + int8_t rssi_high; + int8_t rssi_low; + uint8_t rssi_low_interval; + uint8_t rssi_period; +} __attribute__((packed)); + +struct msft_rsp_monitor_rssi { + uint8_t status; + uint8_t subcmd; +} __attribute__((packed)); + +#define MSFT_SUBCMD_CANCEL_MONITOR_RSSI 0x02 + +struct msft_cmd_cancel_monitor_rssi { + uint8_t subcmd; + uint16_t handle; +} __attribute__((packed)); + +struct msft_rsp_cancel_monitor_rssi { + uint8_t status; + uint8_t subcmd; +} __attribute__((packed)); + +#define MSFT_SUBCMD_LE_MONITOR_ADV 0x03 + +struct msft_le_monitor_pattern { + uint8_t len; + uint8_t type; + uint8_t start; + uint8_t data[]; +} __attribute__((packed)); + +struct msft_le_monitor_adv_pattern_type { + uint8_t num_patterns; + struct msft_le_monitor_pattern data[]; +} __attribute__((packed)); + +struct msft_le_monitor_adv_uuid_type { + uint8_t type; + union { + uint16_t u16; + uint32_t u32; + uint8_t u128[8]; + } value; +} __attribute__((packed)); + +struct msft_le_monitor_adv_irk_type { + uint8_t irk[8]; +} __attribute__((packed)); + +#define MSFT_SUBCMD_LE_MONITOR_ADV_ADDR 0x04 +struct msft_le_monitor_adv_addr { + uint8_t type; + uint8_t addr[6]; +} __attribute__((packed)); + +struct msft_cmd_le_monitor_adv { + uint8_t subcmd; + int8_t rssi_low; + int8_t rssi_high; + uint8_t rssi_low_interval; + uint8_t rssi_period; + uint8_t type; + uint8_t data[]; +} __attribute__((packed)); + +struct msft_rsp_le_monitor_adv { + uint8_t status; + uint8_t subcmd; + uint8_t handle; +} __attribute__((packed)); + +#define MSFT_SUBCMD_LE_CANCEL_MONITOR_ADV 0x04 + +struct msft_cmd_le_cancel_monitor_adv { + uint8_t subcmd; + uint8_t handle; +} __attribute__((packed)); + +struct msft_rsp_le_cancel_monitor_adv { + uint8_t status; + uint8_t subcmd; +} __attribute__((packed)); + +#define MSFT_SUBCMD_LE_MONITOR_ADV_ENABLE 0x05 + +struct msft_cmd_le_monitor_adv_enable { + uint8_t subcmd; + uint8_t enable; +} __attribute__((packed)); + +struct msft_rsp_le_monitor_adv_enable { + uint8_t status; + uint8_t subcmd; +} __attribute__((packed)); + +#define MSFT_SUBCMD_READ_ABS_RSSI 0x06 + +struct msft_cmd_read_abs_rssi { + uint8_t subcmd; + uint16_t handle; +} __attribute__((packed)); + +struct msft_rsp_read_abs_rssi { + uint8_t status; + uint8_t subcmd; + uint16_t handle; + uint8_t rssi; +} __attribute__((packed)); + +#define MSFT_SUBEVT_RSSI 0x01 + +struct msft_evt_rssi { + uint8_t subevt; + uint8_t status; + uint16_t handle; + uint8_t rssi; +} __attribute__((packed)); + +#define MSFT_SUBEVT_MONITOR_DEVICE 0x02 + +struct msft_evt_monitor_device { + uint8_t subevt; + uint8_t addr_type; + uint8_t addr[6]; + uint8_t handle; + uint8_t state; +} __attribute__((packed)); + struct vendor_ocf; struct vendor_evt;
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> This adds proper packet definitions for command and response of MSFT extension. --- monitor/msft.h | 148 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+)