mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-10 12:07:55 +00:00
nimble/host: Fix ble_gap_ext_adv_params_tx and rename variables
ble_gap_ext_adv_params_tx should check if PHY options != 0 Also rename variables for consistency.
This commit is contained in:
committed by
Szymon Janc
parent
2fa42c38bc
commit
5effa1d3a1
@@ -1583,11 +1583,11 @@ struct ble_gap_ext_adv_params {
|
||||
/** Advertising Set ID */
|
||||
uint8_t sid;
|
||||
|
||||
/** Primary phy options */
|
||||
uint8_t pri_phy_opt;
|
||||
/** Primary PHY options */
|
||||
uint8_t primary_phy_opt;
|
||||
|
||||
/** Secondary phy options */
|
||||
uint8_t sec_phy_opt;
|
||||
/** Secondary PHY options */
|
||||
uint8_t secondary_phy_opt;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -3258,8 +3258,8 @@ ble_gap_ext_adv_params_tx_v2(uint8_t instance,
|
||||
return rc;
|
||||
}
|
||||
|
||||
cmd.pri_phy_opt = params->pri_phy_opt;
|
||||
cmd.sec_phy_opt = params->sec_phy_opt;
|
||||
cmd.pri_phy_opt = params->primary_phy_opt;
|
||||
cmd.sec_phy_opt = params->secondary_phy_opt;
|
||||
|
||||
rc = ble_hs_hci_cmd_tx(BLE_HCI_OP(BLE_HCI_OGF_LE,
|
||||
BLE_HCI_OCF_LE_SET_EXT_ADV_PARAM_V2),
|
||||
@@ -3288,7 +3288,7 @@ ble_gap_ext_adv_params_tx(uint8_t instance,
|
||||
|
||||
/* Return Error if phy is non-zero and controller doesn't support V2 */
|
||||
if (!((sup_cmd.commands[46] & 0x04) != 0) &&
|
||||
(params->primary_phy || params->secondary_phy)) {
|
||||
(params->primary_phy_opt || params->secondary_phy_opt)) {
|
||||
return BLE_HS_EINVAL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user