Bluetooth: Controller: Fix missing ull_chan_reset call
Fix missing call to ull_chan_reset(), this fixes uninitialized channel map being used after LL reset. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
3dd014ef55
commit
550b16a04e
3 changed files with 19 additions and 9 deletions
|
@ -63,6 +63,7 @@
|
||||||
#include "isoal.h"
|
#include "isoal.h"
|
||||||
#include "ll_feat_internal.h"
|
#include "ll_feat_internal.h"
|
||||||
#include "ull_internal.h"
|
#include "ull_internal.h"
|
||||||
|
#include "ull_chan_internal.h"
|
||||||
#include "ull_iso_internal.h"
|
#include "ull_iso_internal.h"
|
||||||
#include "ull_adv_internal.h"
|
#include "ull_adv_internal.h"
|
||||||
#include "ull_scan_internal.h"
|
#include "ull_scan_internal.h"
|
||||||
|
@ -2285,6 +2286,18 @@ static inline int init_reset(void)
|
||||||
mem_link_rx.quota_pdu = RX_CNT;
|
mem_link_rx.quota_pdu = RX_CNT;
|
||||||
rx_replenish_all();
|
rx_replenish_all();
|
||||||
|
|
||||||
|
#if (defined(CONFIG_BT_BROADCASTER) && defined(CONFIG_BT_CTLR_ADV_EXT)) || \
|
||||||
|
defined(CONFIG_BT_CTLR_ADV_PERIODIC) || \
|
||||||
|
defined(CONFIG_BT_CTLR_SYNC_PERIODIC) || \
|
||||||
|
defined(CONFIG_BT_CONN)
|
||||||
|
/* Initialize channel map */
|
||||||
|
ull_chan_reset();
|
||||||
|
#endif /* (CONFIG_BT_BROADCASTER && CONFIG_BT_CTLR_ADV_EXT) ||
|
||||||
|
* CONFIG_BT_CTLR_ADV_PERIODIC ||
|
||||||
|
* CONFIG_BT_CTLR_SYNC_PERIODIC ||
|
||||||
|
* CONFIG_BT_CONN
|
||||||
|
*/
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,13 +34,12 @@
|
||||||
#include "ull_adv_internal.h"
|
#include "ull_adv_internal.h"
|
||||||
#include "ull_central_internal.h"
|
#include "ull_central_internal.h"
|
||||||
|
|
||||||
/* Initial channel map indicating Used and Unused data channels.
|
/* The HCI LE Set Host Channel Classification command allows the Host to
|
||||||
* The HCI LE Set Host Channel Classification command allows the Host to
|
|
||||||
* specify a channel classification for the data, secondary advertising,
|
* specify a channel classification for the data, secondary advertising,
|
||||||
* periodic, and isochronous physical channels based on its local information.
|
* periodic, and isochronous physical channels based on its local information.
|
||||||
*/
|
*/
|
||||||
static uint8_t map[5] = {0xFF, 0xFF, 0xFF, 0xFF, 0x1F};
|
static uint8_t map[5];
|
||||||
static uint8_t count = 37U;
|
static uint8_t count;
|
||||||
|
|
||||||
static void chan_map_set(uint8_t const *const chan_map);
|
static void chan_map_set(uint8_t const *const chan_map);
|
||||||
|
|
||||||
|
@ -70,17 +69,15 @@ uint8_t ll_chm_update(uint8_t const *const chm)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ull_chan_reset(void)
|
void ull_chan_reset(void)
|
||||||
{
|
{
|
||||||
/* initialise connection channel map */
|
/* Initial channel map indicating Used and Unused data channels. */
|
||||||
map[0] = 0xFF;
|
map[0] = 0xFF;
|
||||||
map[1] = 0xFF;
|
map[1] = 0xFF;
|
||||||
map[2] = 0xFF;
|
map[2] = 0xFF;
|
||||||
map[3] = 0xFF;
|
map[3] = 0xFF;
|
||||||
map[4] = 0x1F;
|
map[4] = 0x1F;
|
||||||
count = 37U;
|
count = 37U;
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t ull_chan_map_get(uint8_t *const chan_map)
|
uint8_t ull_chan_map_get(uint8_t *const chan_map)
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int ull_chan_reset(void);
|
void ull_chan_reset(void);
|
||||||
uint8_t ull_chan_map_get(uint8_t *const chan_map);
|
uint8_t ull_chan_map_get(uint8_t *const chan_map);
|
||||||
void ull_chan_map_set(uint8_t const *const chan_map);
|
void ull_chan_map_set(uint8_t const *const chan_map);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue