Bluetooth: Controller: internally handle unknown rsp for LE Ping

Peer controllers not supporting LE Ping feature will
respond with unknown response PDU, handle it internally in
the controller rather than exposing it to HCI layer.

Discovered that controller was passing the unknown rsp PDU
to HCI layer when LE Ping was send to Nexus 5.

Unknown response for slave feature request was forwarded to
HCI layer, during that implementation unknown rsp for LE
ping too was getting forwarded to HCI layer.

Change-id: I4396c482e5546d78239cf41d88728de996e48d7d
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
This commit is contained in:
Vinayak Chettimada 2016-12-25 17:28:07 +01:00 committed by Johan Hedberg
commit ced33653fa

View file

@ -1725,8 +1725,22 @@ isr_rx_conn_pkt_ctrl(struct radio_pdu_node_rx *radio_pdu_node_rx,
*/
*rx_enqueue = 1;
} else {
/* enqueue the error and let HCI handle it */
*rx_enqueue = 1;
struct pdu_data_llctrl *llctrl;
llctrl = (struct pdu_data_llctrl *)
&pdu_data_rx->payload.llctrl;
switch (llctrl->ctrldata.unknown_rsp.type) {
case PDU_DATA_LLCTRL_TYPE_PING_REQ:
/* unknown rsp to LE Ping Req completes the
* procedure; nothing to do here.
*/
break;
default:
/* enqueue the error and let HCI handle it */
*rx_enqueue = 1;
break;
}
/* Procedure complete */
_radio.conn_curr->procedure_expire = 0;
}