sjanc commented on code in PR #1918:
URL: https://github.com/apache/mynewt-nimble/pull/1918#discussion_r1846457224
##########
nimble/controller/src/ble_ll_hci_vs.c:
##########
@@ -356,6 +356,33 @@ ble_ll_hci_vs_set_local_irk(uint16_t ocf, const uint8_t
*cmdbuf, uint8_t cmdlen,
}
#endif
+#if MYNEWT_VAL(BLE_LL_HCI_VS_SET_SCAN_CFG)
+static int
+ble_ll_hci_vs_set_scan_cfg(uint16_t ocf, const uint8_t *cmdbuf, uint8_t cmdlen,
+ uint8_t *rspbuf, uint8_t *rsplen)
+{
+ const struct ble_hci_vs_set_scan_cfg_cp *cmd = (const void *)cmdbuf;
+ int rc;
+
+ if (cmdlen != sizeof(*cmd)) {
+ return BLE_ERR_INV_HCI_CMD_PARMS;
+ }
+
+ if (cmd->flags > BLE_HCI_OCF_VS_SET_SCAN_CFG_NO_EXT) {
Review Comment:
this should be converted from le32 to host order before check (even if this
will be noop on most systems)
it should (at least for now) disallow command if both types are to be
disabled
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]