Bluetooth: controller: Fix master rx-ing reject_ext_ind enc_req

Fix master receiving REJECT_EXT_IND for ENC_REQ PDU.

This fixes:
TP/SEC/MAS/BV-11-C [Master Receiving Reject_Ind_Ext]
conformance test in LL.TS.5.0.0.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2017-07-19 14:56:19 +02:00 committed by Johan Hedberg
commit 0883915a1e

View file

@ -1760,6 +1760,38 @@ isr_rx_conn_pkt_ctrl_rej(struct radio_pdu_node_rx *radio_pdu_node_rx,
isr_rx_conn_pkt_ctrl_rej_phy_upd(radio_pdu_node_rx,
rx_enqueue);
#endif /* CONFIG_BLUETOOTH_CONTROLLER_PHY */
#if defined(CONFIG_BLUETOOTH_CONTROLLER_LE_ENC)
} else {
struct pdu_data_llctrl_reject_ext_ind *rej_ext_ind;
struct pdu_data *pdu_rx;
pdu_rx = (void *)radio_pdu_node_rx->pdu_data;
rej_ext_ind = (void *)
&pdu_rx->payload.llctrl.ctrldata.reject_ext_ind;
switch (rej_ext_ind->reject_opcode) {
case PDU_DATA_LLCTRL_TYPE_ENC_REQ:
/* resume data packet rx and tx */
_radio.conn_curr->pause_rx = 0;
_radio.conn_curr->pause_tx = 0;
/* Procedure complete */
_radio.conn_curr->procedure_expire = 0;
/* enqueue as if it were a reject ind */
pdu_rx->payload.llctrl.opcode =
PDU_DATA_LLCTRL_TYPE_REJECT_IND;
pdu_rx->payload.llctrl.ctrldata.reject_ind.error_code =
rej_ext_ind->error_code;
*rx_enqueue = 1;
break;
default:
/* Ignore */
break;
}
#endif /* CONFIG_BLUETOOTH_CONTROLLER_LE_ENC */
}
}