qcacld-3.0: Update OFDM and CCK flags for packet capture mode

Add support to update OFDM and CCK flags for packet capture
mode.

Change-Id: I1acb6b512360b6236a119070aba97409e316646c
CRs-Fixed: 2676302
This commit is contained in:
Vulupala Shashank Reddy
2020-04-28 18:05:31 +05:30
committed by nshrivas
parent 82cad63846
commit d965a28c1c
3 changed files with 20 additions and 32 deletions

View File

@@ -219,7 +219,6 @@ pkt_capture_update_tx_status(
struct pkt_capture_tx_hdr_elem_t *pktcapture_hdr)
{
struct mon_channel *ch_info = &pdev->mon_ch_info;
uint16_t channel_flags = 0;
tx_status->tsft = (u_int64_t)(pktcapture_hdr->timestamp);
tx_status->chan_freq = ch_info->ch_freq;
@@ -228,15 +227,10 @@ pkt_capture_update_tx_status(
pkt_capture_tx_get_phy_info(pktcapture_hdr, tx_status);
if (pktcapture_hdr->preamble == 0)
channel_flags |= IEEE80211_CHAN_OFDM;
tx_status->ofdm_flag = 1;
else if (pktcapture_hdr->preamble == 1)
channel_flags |= IEEE80211_CHAN_CCK;
tx_status->cck_flag = 1;
channel_flags |=
(wlan_reg_chan_to_band(ch_info->ch_num) == BAND_2G ?
IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ);
tx_status->chan_flags = channel_flags;
tx_status->ant_signal_db = pktcapture_hdr->rssi_comb;
tx_status->rssi_comb = pktcapture_hdr->rssi_comb;
tx_status->tx_status = pktcapture_hdr->status;

View File

@@ -264,7 +264,6 @@ pkt_capture_process_mgmt_tx_data(struct wlan_objmgr_pdev *pdev,
{
struct mon_rx_status txrx_status = {0};
struct wlan_objmgr_psoc *psoc;
uint16_t channel_flags = 0;
tpSirMacFrameCtl pfc = (tpSirMacFrameCtl)(qdf_nbuf_data(nbuf));
struct ieee80211_frame *wh;
@@ -307,13 +306,12 @@ pkt_capture_process_mgmt_tx_data(struct wlan_objmgr_pdev *pdev,
txrx_status.nr_ant = 1;
txrx_status.rtap_flags |=
((txrx_status.rate == 6 /* Mbps */) ? BIT(1) : 0);
channel_flags |=
((txrx_status.rate == 6 /* Mbps */) ?
IEEE80211_CHAN_OFDM : IEEE80211_CHAN_CCK);
channel_flags |=
(wlan_reg_chan_to_band(txrx_status.chan_num) == BAND_2G ?
IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ);
txrx_status.chan_flags = channel_flags;
if (txrx_status.rate == 6)
txrx_status.ofdm_flag = 1;
else
txrx_status.cck_flag = 1;
txrx_status.rate = ((txrx_status.rate == 6 /* Mbps */) ? 0x0c : 0x02);
txrx_status.tx_status = status;
txrx_status.tx_retry_cnt = params->tx_retry_cnt;
@@ -428,7 +426,6 @@ pkt_capture_mgmt_rx_data_cb(struct wlan_objmgr_psoc *psoc,
enum mgmt_frame_type frm_type)
{
struct mon_rx_status txrx_status = {0};
uint16_t channel_flags = 0;
struct ieee80211_frame *wh;
tpSirMacFrameCtl pfc;
qdf_nbuf_t nbuf;
@@ -457,7 +454,7 @@ pkt_capture_mgmt_rx_data_cb(struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_pdev *pdev;
pdev = wlan_vdev_get_pdev(peer->peer_objmgr.vdev);
if (pkt_capture_is_rmf_enabled(pdev, psoc, wh->i_addr2)) {
if (pkt_capture_is_rmf_enabled(pdev, psoc, wh->i_addr1)) {
QDF_STATUS status;
status = pkt_capture_process_rmf_frame(pdev, psoc,
@@ -479,13 +476,12 @@ pkt_capture_mgmt_rx_data_cb(struct wlan_objmgr_psoc *psoc,
txrx_status.nr_ant = 1;
txrx_status.rtap_flags |=
((txrx_status.rate == 6 /* Mbps */) ? BIT(1) : 0);
channel_flags |=
((txrx_status.rate == 6 /* Mbps */) ?
IEEE80211_CHAN_OFDM : IEEE80211_CHAN_CCK);
channel_flags |=
(wlan_reg_chan_to_band(txrx_status.chan_num) == BAND_2G ?
IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ);
txrx_status.chan_flags = channel_flags;
if (txrx_status.rate == 6)
txrx_status.ofdm_flag = 1;
else
txrx_status.cck_flag = 1;
txrx_status.rate = ((txrx_status.rate == 6 /* Mbps */) ? 0x0c : 0x02);
txrx_status.add_rtap_ext = true;