Bluetooth: controller: Do not feature exchange more than once
Updated the controller implementation to not feature exchange if already done once either by local or remote peer device in an active connection session. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
c554ab7100
commit
c326ae729f
1 changed files with 36 additions and 0 deletions
|
@ -7167,6 +7167,42 @@ static inline void event_fex_prep(struct connection *conn)
|
|||
{
|
||||
struct radio_pdu_node_tx *node_tx;
|
||||
|
||||
if (conn->common.fex_valid) {
|
||||
struct radio_pdu_node_rx *node_rx;
|
||||
struct pdu_data *pdu_ctrl_rx;
|
||||
|
||||
/* procedure request acked */
|
||||
conn->llcp_ack = conn->llcp_req;
|
||||
|
||||
/* Prepare the rx packet structure */
|
||||
node_rx = packet_rx_reserve_get(2);
|
||||
LL_ASSERT(node_rx);
|
||||
|
||||
node_rx->hdr.handle = conn->handle;
|
||||
node_rx->hdr.type = NODE_RX_TYPE_DC_PDU;
|
||||
|
||||
/* prepare feature rsp structure */
|
||||
pdu_ctrl_rx = (void *)node_rx->pdu_data;
|
||||
pdu_ctrl_rx->ll_id = PDU_DATA_LLID_CTRL;
|
||||
pdu_ctrl_rx->len = offsetof(struct pdu_data_llctrl,
|
||||
feature_rsp) +
|
||||
sizeof(struct pdu_data_llctrl_feature_rsp);
|
||||
pdu_ctrl_rx->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_FEATURE_RSP;
|
||||
(void)memset(&pdu_ctrl_rx->llctrl.feature_rsp.features[0], 0x00,
|
||||
sizeof(pdu_ctrl_rx->llctrl.feature_rsp.features));
|
||||
pdu_ctrl_rx->llctrl.feature_req.features[0] =
|
||||
conn->llcp_features & 0xFF;
|
||||
pdu_ctrl_rx->llctrl.feature_req.features[1] =
|
||||
(conn->llcp_features >> 8) & 0xFF;
|
||||
pdu_ctrl_rx->llctrl.feature_req.features[2] =
|
||||
(conn->llcp_features >> 16) & 0xFF;
|
||||
|
||||
/* enqueue feature rsp structure into rx queue */
|
||||
packet_rx_enqueue();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
node_tx = mem_acquire(&_radio.pkt_tx_ctrl_free);
|
||||
if (node_tx) {
|
||||
struct pdu_data *pdu_ctrl_tx = (void *)node_tx->pdu_data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue