Bluetooth: controller: split: Differentiate extended ll_adv_params_set

Differentiate call to ll_adv_params_set, whether used by
legacy LE Set Advertising Parameters or LE Set Extended
Advertising Parameters.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2020-04-08 16:23:13 +05:30 committed by Carles Cufí
commit f84ebf4869
2 changed files with 10 additions and 11 deletions

View file

@ -1640,25 +1640,23 @@ static void le_set_ext_adv_param(struct net_buf *buf, struct net_buf **evt)
struct bt_hci_cp_le_set_ext_adv_param *cmd = (void *)buf->data;
struct bt_hci_rp_le_set_ext_adv_param *rp;
uint32_t min_interval;
uint8_t adv_type = 0;
uint16_t evt_prop;
uint8_t tx_pwr;
uint8_t status;
uint8_t phy_p;
uint8_t phy_s;
evt_prop = sys_le16_to_cpu(cmd->props);
min_interval = sys_get_le24(cmd->prim_min_interval);
tx_pwr = cmd->tx_power;
if (!(evt_prop & BIT(4))) {
adv_type = 0x05; /* Extending advertising */
}
phy_p = BIT(cmd->prim_adv_phy - 1);
phy_s = BIT(cmd->sec_adv_phy - 1);
status = ll_adv_params_set(cmd->handle, evt_prop, min_interval,
adv_type, cmd->own_addr_type,
PDU_ADV_TYPE_EXT_IND, cmd->own_addr_type,
cmd->peer_addr.type, cmd->peer_addr.a.val,
cmd->prim_channel_map, cmd->filter_policy,
&tx_pwr, cmd->prim_adv_phy,
cmd->sec_adv_max_skip, cmd->sec_adv_phy,
&tx_pwr, phy_p, cmd->sec_adv_max_skip, phy_s,
cmd->sid, cmd->scan_req_notify_enable);
rp = hci_cmd_complete(evt, sizeof(*rp));