andrzej-kaczmarek commented on code in PR #1851:
URL: https://github.com/apache/mynewt-nimble/pull/1851#discussion_r1730377870


##########
nimble/host/include/host/ble_gap.h:
##########
@@ -1582,6 +1582,19 @@ struct ble_gap_ext_adv_params {
 
     /** Advertising Set ID */
     uint8_t sid;
+
+    /** Version of HCI command to be used
+     *  0 : No version set, choose V2 or fallback to v1
+     *  1 : V1
+     *  2 : V2
+     */
+    unsigned int version:2;

Review Comment:
   this is not needed - you can return an error if phy options are non-zero and 
v2 is not supported, otherwise send either v1 or v2.



##########
nimble/include/nimble/hci_common.h:
##########
@@ -597,6 +597,27 @@ struct ble_hci_le_set_ext_adv_params_rp {
     int8_t  tx_power;
 } __attribute__((packed));
 
+#define BLE_HCI_OCF_LE_SET_EXT_ADV_PARAM_V2             (0x007F)

Review Comment:
   definitions are sorted by ocf, keep it like this



##########
nimble/host/src/ble_gap.c:
##########
@@ -3124,17 +3124,113 @@ ble_gap_adv_active(void)
 
 #if MYNEWT_VAL(BLE_EXT_ADV)
 static int
-ble_gap_ext_adv_params_tx(uint8_t instance,

Review Comment:
   v1 and v2 structs have the same field order so we can have single helper to 
fill common fields



-- 
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: notifications-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to