bluetooth: Fix cte_type value in periodic adv sync report
Periodic advertising sync report returned wrong cte_type value. This commit fixes the problem. Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
This commit is contained in:
parent
7cdbeb541a
commit
ce56f046e5
3 changed files with 6 additions and 3 deletions
|
@ -1171,7 +1171,7 @@ struct bt_le_per_adv_sync_recv_info {
|
||||||
/** The RSSI of the advertisement excluding any CTE. */
|
/** The RSSI of the advertisement excluding any CTE. */
|
||||||
int8_t rssi;
|
int8_t rssi;
|
||||||
|
|
||||||
/** The Constant Tone Extension (CTE) of the advertisement */
|
/** The Constant Tone Extension (CTE) of the advertisement (@ref bt_df_cte_type) */
|
||||||
uint8_t cte_type;
|
uint8_t cte_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5267,7 +5267,10 @@ static void le_per_adv_sync_report(struct pdu_data *pdu_data,
|
||||||
/* No TargetA */
|
/* No TargetA */
|
||||||
|
|
||||||
if (h->cte_info) {
|
if (h->cte_info) {
|
||||||
cte_type = *(int8_t *)ptr;
|
struct pdu_cte_info *cte_info;
|
||||||
|
|
||||||
|
cte_info = (void *)ptr;
|
||||||
|
cte_type = cte_info->type;
|
||||||
ptr++;
|
ptr++;
|
||||||
|
|
||||||
BT_DBG(" CTE type= %d", cte_type);
|
BT_DBG(" CTE type= %d", cte_type);
|
||||||
|
|
|
@ -657,7 +657,7 @@ void bt_hci_le_per_adv_report(struct net_buf *buf)
|
||||||
|
|
||||||
info.tx_power = evt->tx_power;
|
info.tx_power = evt->tx_power;
|
||||||
info.rssi = evt->rssi;
|
info.rssi = evt->rssi;
|
||||||
info.cte_type = evt->cte_type;
|
info.cte_type = BIT(evt->cte_type);
|
||||||
info.addr = &per_adv_sync->addr;
|
info.addr = &per_adv_sync->addr;
|
||||||
|
|
||||||
SYS_SLIST_FOR_EACH_CONTAINER(&pa_sync_cbs, listener, node) {
|
SYS_SLIST_FOR_EACH_CONTAINER(&pa_sync_cbs, listener, node) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue