qcacmn: Handle PPDU ID format message

This is a generic T2H message in which a target can specify bits and
offsets to extract a parameter from PPDU-id. Use link-id bit and offset
present in T2H message to extract hw link-id from PPDU-id on Tx completion.

Change-Id: I64b7559e88b037e30f52ba0b75ab62349e469d20
CRs-Fixed: 3195432
This commit is contained in:
Ripan Deuri
2022-04-22 16:18:28 +05:30
committed by Madan Koyyalamudi
父節點 83d3a9032e
當前提交 26dff6988a
共有 2 個文件被更改,包括 35 次插入0 次删除

查看文件

@@ -3166,6 +3166,33 @@ dp_htt_rx_addba_handler(struct dp_soc *soc, uint16_t peer_id,
peer_id, win_sz, tid, status);
}
/*
* dp_htt_ppdu_id_fmt_handler() - PPDU ID Format handler
* @htt_soc: HTT SOC handle
* @msg_word: Pointer to payload
*
* Return: None
*/
static void
dp_htt_ppdu_id_fmt_handler(struct dp_soc *soc, uint32_t *msg_word)
{
uint8_t msg_type, valid, bits, offset;
msg_type = HTT_T2H_MSG_TYPE_GET(*msg_word);
msg_word += HTT_PPDU_ID_FMT_IND_LINK_ID_OFFSET;
valid = HTT_PPDU_ID_FMT_IND_VALID_GET_BITS31_16(*msg_word);
bits = HTT_PPDU_ID_FMT_IND_BITS_GET_BITS31_16(*msg_word);
offset = HTT_PPDU_ID_FMT_IND_OFFSET_GET_BITS31_16(*msg_word);
dp_info("link_id: valid %u bits %u offset %u", valid, bits, offset);
if (valid) {
soc->link_id_offset = offset;
soc->link_id_bits = bits;
}
}
/*
* dp_htt_t2h_msg_handler() - Generic Target to host Msg/event handler
* @context: Opaque context (HTT SOC handle)
@@ -3354,6 +3381,11 @@ static void dp_htt_t2h_msg_handler(void *context, HTC_PACKET *pkt)
tid, win_sz);
break;
}
case HTT_T2H_PPDU_ID_FMT_IND:
{
dp_htt_ppdu_id_fmt_handler(soc->dp_soc, msg_word);
break;
}
case HTT_T2H_MSG_TYPE_EXT_STATS_CONF:
{
dp_txrx_fw_stats_handler(soc->dp_soc, htt_t2h_msg);