qcacmn: get sw_exception from reo dest ring descriptor

sw_exception bit will be marked in reo dest ring descriptor for
FW re-injected frame, get this bit and save it in skb->cb,
this bit value can be used for FISA further check.
there is no reo_dest_indication field in reo dest ring on beryllium,
so share same cb member for sw_exception and reo_dest_indication.

Change-Id: I2321121be7dda68ed19faca177d868c7e8ba1dbf
CRs-Fixed: 3056156
Цей коміт міститься в:
Jinwei Chen
2021-10-13 03:45:28 -07:00
зафіксовано Madan Koyyalamudi
джерело d0624dedd6
коміт b521830197
7 змінених файлів з 42 додано та 23 видалено

Переглянути файл

@@ -375,11 +375,11 @@ more_data:
if (qdf_likely(mpdu_desc_info.mpdu_flags &
HAL_MPDU_F_QOS_CONTROL_VALID))
qdf_nbuf_set_tid_val(rx_desc->nbuf, mpdu_desc_info.tid);
#ifdef CONFIG_LITHIUM
qdf_nbuf_set_rx_reo_dest_ind(
/* set sw exception */
qdf_nbuf_set_rx_reo_dest_ind_or_sw_excpt(
rx_desc->nbuf,
HAL_RX_REO_MSDU_REO_DST_IND_GET(ring_desc));
#endif
hal_rx_sw_exception_get_be(ring_desc));
QDF_NBUF_CB_RX_PKT_LEN(rx_desc->nbuf) = msdu_desc_info.msdu_len;

Переглянути файл

@@ -376,7 +376,9 @@ more_data:
qdf_nbuf_set_tid_val(rx_desc->nbuf,
HAL_RX_REO_QUEUE_NUMBER_GET(ring_desc));
qdf_nbuf_set_rx_reo_dest_ind(
/* set reo dest indication */
qdf_nbuf_set_rx_reo_dest_ind_or_sw_excpt(
rx_desc->nbuf,
HAL_RX_REO_MSDU_REO_DST_IND_GET(ring_desc));

Переглянути файл

@@ -454,4 +454,17 @@ static inline uintptr_t hal_rx_get_reo_desc_va(void *reo_desc)
return (uintptr_t)va_from_desc;
}
/**
* hal_rx_sw_exception_get_be() - Get sw_exception bit value from REO Desc
* @reo_desc: REO2SW ring descriptor pointer
*
* sw_exception bit might not exist in reo destination ring descriptor
* for some chipset, so just restrict this function for BE only.
*
* Return: sw_exception bit value
*/
static inline uint8_t hal_rx_sw_exception_get_be(void *reo_desc)
{
return HAL_RX_GET(reo_desc, REO_DESTINATION_RING, SW_EXCEPTION);
}
#endif /* _HAL_BE_RX_H_ */

Переглянути файл

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2017,2019-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2017,2019-2021 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -155,26 +155,28 @@ static inline uint8_t qdf_nbuf_is_rx_ipa_smmu_map(qdf_nbuf_t buf)
}
/**
* qdf_nbuf_set_rx_reo_dest_ind() - set reo destination indication
* qdf_nbuf_set_rx_reo_dest_ind_or_sw_excpt() - set reo destination indication
or sw exception flag
* @buf: Network buffer
* @value: reo destination indication value to set
* @value: value to set
*
* Return: none
*/
static inline void qdf_nbuf_set_rx_reo_dest_ind(qdf_nbuf_t buf,
uint8_t value)
static inline void qdf_nbuf_set_rx_reo_dest_ind_or_sw_excpt(qdf_nbuf_t buf,
uint8_t value)
{
QDF_NBUF_CB_RX_PACKET_REO_DEST_IND(buf) = value;
QDF_NBUF_CB_RX_PACKET_REO_DEST_IND_OR_SW_EXCPT(buf) = value;
}
/**
* qdf_nbuf_get_rx_reo_dest_ind() - get reo destination indication
* qdf_nbuf_get_rx_reo_dest_ind_or_sw_excpt() - get reo destination indication
or sw exception flag
* @buf: Network buffer
*
* Return reo destination indication value (0 ~ 31)
* Return reo destination indication value (0 ~ 31) or sw exception (0 ~ 1)
*/
static inline uint8_t qdf_nbuf_get_rx_reo_dest_ind(qdf_nbuf_t buf)
static inline uint8_t qdf_nbuf_get_rx_reo_dest_ind_or_sw_excpt(qdf_nbuf_t buf)
{
return QDF_NBUF_CB_RX_PACKET_REO_DEST_IND(buf);
return QDF_NBUF_CB_RX_PACKET_REO_DEST_IND_OR_SW_EXCPT(buf);
}
#endif /* _QDF_NBUF_M_H */

Переглянути файл

@@ -168,14 +168,15 @@ static inline uint8_t qdf_nbuf_is_rx_ipa_smmu_map(qdf_nbuf_t buf)
}
/**
* qdf_nbuf_set_rx_reo_dest_ind() - set reo destination indication
* qdf_nbuf_set_rx_reo_dest_ind_or_sw_excpt() - set reo destination indication
or sw exception flag
* @buf: Network buffer
* @value: reo destination indication value to set
* @value: value to set
*
* Return: none
*/
static inline void qdf_nbuf_set_rx_reo_dest_ind(qdf_nbuf_t buf,
uint8_t value)
static inline void qdf_nbuf_set_rx_reo_dest_ind_or_sw_excpt(qdf_nbuf_t buf,
uint8_t value)
{
}

Переглянути файл

@@ -128,7 +128,8 @@ typedef union {
* @rx.dev.priv_cb_m.l3_hdr_pad: L3 header padding offset
* @rx.dev.priv_cb_m.exc_frm: exception frame
* @rx.dev.priv_cb_m.ipa_smmu_map: do IPA smmu map
* @rx.dev.priv_cb_m.reo_dest_ind: reo destination indication
* @rx.dev.priv_cb_m.reo_dest_ind_or_sw_excpt: reo destination indication or
sw execption bit from ring desc
* @rx.dev.priv_cb_m.tcp_seq_num: TCP sequence number
* @rx.dev.priv_cb_m.tcp_ack_num: TCP ACK number
* @rx.dev.priv_cb_m.lro_ctx: LRO context
@@ -251,7 +252,7 @@ struct qdf_nbuf_cb {
/* exception frame flag */
exc_frm:1,
ipa_smmu_map:1,
reo_dest_ind:5,
reo_dest_ind_or_sw_excpt:5,
reserved:2,
reserved1:16;
uint32_t tcp_seq_num;

Переглянути файл

@@ -84,9 +84,9 @@
(((struct qdf_nbuf_cb *)((skb)->cb))->u.rx.dev.priv_cb_m. \
ipa_smmu_map)
#define QDF_NBUF_CB_RX_PACKET_REO_DEST_IND(skb) \
#define QDF_NBUF_CB_RX_PACKET_REO_DEST_IND_OR_SW_EXCPT(skb) \
(((struct qdf_nbuf_cb *)((skb)->cb))->u.rx.dev.priv_cb_m. \
reo_dest_ind)
reo_dest_ind_or_sw_excpt)
#define __qdf_nbuf_ipa_owned_get(skb) \
QDF_NBUF_CB_TX_IPA_OWNED(skb)