qcacmn: Add support for firmware to software tlv

Added support for parsing firmware to software tlv. which is mainly used
for populating frequency of the current packet.

Change-Id: I67c552e6d6b5caf9c12c34e553bad70b89b30c40
CRs-Fixed: 3270364
Cette révision appartient à :
nobelj
2022-08-25 12:50:42 -07:00
révisé par Madan Koyyalamudi
Parent d148f093d2
révision f1dd81866f
4 fichiers modifiés avec 127 ajouts et 9 suppressions

Voir le fichier

@@ -1038,6 +1038,37 @@ dp_populate_tsft_from_phy_timestamp(struct dp_pdev *pdev,
return QDF_STATUS_SUCCESS;
}
/**
* dp_tx_mon_update_channel_freq() - API to update channel frequency and number
* @pdev: pdev Handle
* @soc: soc Handle
* @freq: Frequency
*
* Return: void
*/
static inline void
dp_tx_mon_update_channel_freq(struct dp_pdev *pdev, struct dp_soc *soc,
uint16_t freq)
{
if (soc && soc->cdp_soc.ol_ops->freq_to_channel) {
uint8_t c_num;
c_num = soc->cdp_soc.ol_ops->freq_to_channel(soc->ctrl_psoc,
pdev->pdev_id,
freq);
pdev->operating_channel.num = c_num;
}
if (soc && soc->cdp_soc.ol_ops->freq_to_band) {
uint8_t band;
band = soc->cdp_soc.ol_ops->freq_to_band(soc->ctrl_psoc,
pdev->pdev_id,
freq);
pdev->operating_channel.band = band;
}
}
/**
* dp_tx_mon_update_radiotap() - API to update radiotap information
* @pdev: pdev Handle
@@ -1054,13 +1085,23 @@ dp_tx_mon_update_radiotap(struct dp_pdev *pdev,
num_users = TXMON_PPDU_HAL(ppdu_info, num_users);
if (qdf_unlikely(TXMON_PPDU_COM(ppdu_info, chan_num) == 0))
TXMON_PPDU_COM(ppdu_info, chan_num) =
pdev->operating_channel.num;
if (qdf_unlikely(TXMON_PPDU_COM(ppdu_info, chan_freq) == 0))
if (qdf_unlikely(TXMON_PPDU_COM(ppdu_info, chan_freq) == 0 &&
TXMON_PPDU_COM(ppdu_info, chan_num) == 0)) {
TXMON_PPDU_COM(ppdu_info, chan_freq) =
pdev->operating_channel.freq;
TXMON_PPDU_COM(ppdu_info, chan_num) =
pdev->operating_channel.num;
} else if (TXMON_PPDU_COM(ppdu_info, chan_freq) != 0 &&
TXMON_PPDU_COM(ppdu_info, chan_num) == 0) {
uint16_t freq = TXMON_PPDU_COM(ppdu_info, chan_freq);
if (qdf_unlikely(pdev->operating_channel.freq != freq)) {
dp_tx_mon_update_channel_freq(pdev, pdev->soc, freq);
pdev->operating_channel.freq = freq;
}
TXMON_PPDU_COM(ppdu_info,
chan_num) = pdev->operating_channel.num;
}
if (QDF_STATUS_SUCCESS !=
dp_populate_tsft_from_phy_timestamp(pdev, ppdu_info))

Voir le fichier

@@ -1389,6 +1389,19 @@ dp_tx_mon_update_ppdu_info_status(struct dp_pdev *pdev,
/* No action for Queue Extension TLV */
break;
}
case HAL_MON_TX_FW2SW:
{
/* update the frequency */
tx_status_info = &tx_mon_be->data_status_info;
TXMON_PPDU_COM(tx_data_ppdu_info,
chan_freq) = TXMON_STATUS_INFO(tx_status_info,
freq);
TXMON_PPDU_COM(tx_prot_ppdu_info,
chan_freq) = TXMON_STATUS_INFO(tx_status_info,
freq);
break;
}
default:
{
/* return or break in default case */