Adding lock for dp_txrx_ppdu_stats_handler given
that insertion and deletion happen in different cores.
Change-Id: Ic0102d615f02cbfed70acc1114a314426466638e
sequence number populated from tlv are incorrect for some frames.
Firmware populate correct sequence number for management and control
frame either in payload or tlv itself.
added field to get valid sequence number.
Change-Id: I21b1c34c0d66cb46c3a0baaaa231c952de065534
Refactor WLAN_FEATURE_PKT_CAPTURE_LITHIUM to WLAN_FEATURE_PKT_CAPTURE_V2
to remove hardware name from compilation flag.
Change-Id: I5a30b33d8bd6065d12e7c89c666c2f0cab66344e
CRs-Fixed: 2869827
Fix issue on enabling packet log.
Fix issue on logging CBF pkt in AP/STA mode.
Fix issue on setting data length 4 bytes aligned in pktlog header
, htt stats indication message header and Rx management TLV header.
Add CBF support for pktlog WMI enable command for firmware to enable
CBF receive.
Change-Id: Ib0067f32d7414be96503c4c67846c1312a59586e
This change will set up monitor mode status and destination ring
filters for enbale CBF logging and will enable destination ring to
capture CBF frame. This change will get the CBF frame from the
destination ring and send it to the pktlog module for post processing
through WDI event. CBF is a compressed beamforming report.
Change-Id: I4cc419440ba8d60446dd1f01747340a89f023171
mcs is copied over to already in used ppdu_desc
this prevents ppdu_desc to increase lower mcs counts during stats
process
Change-Id: Iec68438a86359ec791302ecf2eeaec4fbd941632
Add support to process RX offload packets in packet capture mode.
To distinguish rx offload packets from normal rx packets,
DP_PEER_METADATA_OFFLOAD bit is set in peer metadata, based on value
of this bit rx packet is delivered to stack or packet capture
component.
Change-Id: Ice656a0bc14efd0382c4949d695daa8e926ce41e
CRs-Fixed: 2856792
Add reo ring descrptor swap in case of big endian platform.
Convert msi_data into little endian format before writing into
MSI_DATA register. Also change into little endian format while accessing
the shared LMAC registers.
Change-Id: I07f4ae4e6df4608201b63d325c2cbc37436d1592
HTC packets were mapped but not unmapped or freed. As part of
hdd_wlan_stop_modules(), all nbufs will be freed in misclist
and TxQueue.
Adding debug change to count number of htc packets failed to
send and count number of nbufs in misclist are skipped when
freeing them.
Change-Id: I868621a67cf89d9b84e202843990f576973ec334
CRs-Fixed: 2807407
Update message length for debugfs support for HTT stats.
Max length will be 2048 to avoid mem leak issue.
Change-Id: I4688f4ae52d5dfc5317a1f8fe1ada334af2eb8c5
CRs-Fixed: 2792365
HTC runtime count is incremented after posting the HTT
ver req message to CE4. There could be possibility of
processing the ver response message from FW even before
htc_runtime_cnt is incremented. This can casue RTPM put
to not happen causing imbalance in get/put count.
Fix is to increment htc_runtime_cnt before enqueuing
the HTT message to CE.
Change-Id: Ib9b69910cd14193c41ecfee804b390f8a6cdef49
CRs-Fixed: 2794451
For HTT h2t message which has a response from FW, runtime
get is done in HTC layer and the corresponding runtime_put
is done as part of the HTT response processing. In a scenario
where the HTT response is not received from FW or not processed
by host, runtime_put is not done as part of cleanup and panic
is triggered due to get/put imbalance.
Fix is to do RTPM put as part of htc cleanup when the HTT
response from FW is not received or processed.
Change-Id: I17ccb7c3e2293c95f5f233d36c6ef38a75733cce
CRs-Fixed: 2779113
CMEM FSE details like offset into CMEM where flow search table(FST)
is allocated and the size of the FST will be sent by the firmware
in response to FSE setup message. Adding the logic to parse the
response message and update the CMEM parameters in the SW FST.
Change-Id: Id1dd4b59be02c175da3fc6fcb5ed56e6f491133a
CRs-Fixed: 2771187
Skbs allocated for CE1 ring are of size 2048 bytes. On
receiving PPDU stats HTT message, skb is pulled for 8
bytes corresponding to the HTC header length. As part of
dp_ppdu_stats_ind_handler, skb len is set to HTT_MAX_MSG_SIZE.
In the case where skb allocation is exactly of 2048 bytes,
including HTC header length, the aforementioned set_len
causes the skb to be expanded due to lack of tailroom.
This causes the skb data pointer to be changed which results
in invalid memory access.
Fix is to remove the qdf_nbuf_set_pktlen as skb len is
appropriately set by HTC layer.
Change-Id: Ied68c30456dc0e263ccfd03102962233a0e43d9f
CRs-Fixed: 2777516
The logging macros implicitly takes care of embedding function name
in the log, hence there is no need to include __func__ again.
Getting rid of redundant __func__ reduces driver memory footprint.
Change-Id: I26bfac840ac6732ac83fb008db8e1702996eb21e
CRs-Fixed: 2774457
In the scenario where htt packets fail to be transmitted to
FW, they are added in both endpoint tx queue and misc list.
On receiving FW down indication before these packets are sent
to FW, endpoint tx queue is flushed and nbufs are freed. Post
this, the aforementioned nbufs would be unmapped/freed again in
htt_htc_misc_pkt_pool_free causing panic.
Fix is to free the nbuf via misc pool free only when the magic
pattern is set.
Change-Id: Ie523a7ca0054eb4104a107b3bddd50cb9b585275
CRs-Fixed: 2762829
Debugfs support for HTT stats under compile
time flag "HTT_STATS_DEBUGFS_SUPPORT".
Change-Id: I44c4f11265fdb3b9d53a9ac545e2945854bb9a57
CRs-Fixed: 2760947
Add support to update the count of number of Punctured Preamble
PPDU's transmitted by the AP.
Change-Id: Id85a490e9e80566e639f48190a96d3107c6e5c61
CRs-fixed: 2755288
Add debug support for VDEV refcount to take
refcount by module id and decrement corresponding
refcount with same module id
Change-Id: I15c075816994ba70155fefbc0bce208b20fb9a59
Add new API dp_vdev_get_ref_by_id() which will return vdev
pointer by holding a reference. Caller of this API has
to ensure that this reference is released by calling
dp_vdev_unref_delete() API
New lock soc->vdev_map_lock is introduced to protect
vdev id to object array
Change-Id: I883e328932e35ef31254125492dbae20cebe0e00
frame control for second and subsequent user are zero which overide the
master frame control. Added fix to update master frame control from user
position zero.
Change-Id: Ic0331dd5d486fbffa44d29c74b4f1f15414d0a65
As index based search is protected with refcnt now
reverting the changes which are added as a WAR to protect
peer memory
Change-Id: Iac837d45d0d4b2509bbf7d60401d9497c0d998b0
Add support to get the peer reference with module id
To help debug the peer reference related issues
Change-Id: Ie20c7e710b9784b52f2e0f3d7488509282528a00
Use unified version of dp_peer_find_by_id API
which will take peer reference
Also use unified peer ref release API dp_peer_unref_delete
Change-Id: Ibb516a933020a42a5584dbbbba59f8d9b72dcaa4
Peer wlanstats context was accessed directly from
PPDU cookie, with this approach the cookie pointer
may become stale if peer goes for deletion
Hence access the wlanstats context using CDP API
with stats context protection
CRs-Fixed: 2740261
Change-Id: I54c785325f8852ad422f05527b98ebca6e4d6cf0
In dp_srng_init, max_buffer_length and prefetch_timer are used
while uninitialized.
In dp_bucket_index, overrunning array cdp_sw_enq_delay leads to
out-of-bounds access.
In dp_rx_defrag_fraglist_insert, cur is first NULL checked but
cur is again set to qdf_nbuf_next and is accessed without
NULL check. Thus do a NULL check again before dereferencing
cur to avoid potential NULL pointer dereference.
In htt_t2h_stats_handler, soc could be NULL while cmn_init_done
is dereferenced. Thus fix it by NULL check soc first and then
dereference cmn_init_done.
Change-Id: Ie6a33347d34862f30ba04a10096d3892af7571d3
CRs-Fixed: 2751573
Add support to retrieve per PPDU phy tx duration without response time.
Add support to retrieve per User phy tx duration for MU-MIMO and OFDMA.
These metrics are useful for ATF stats feature. Stats processing done
only if atf stats flag is set.
CRs-Fixed: 2709102
Change-Id: I90db41aa45843808e07343a80750c154abbde9cd
wdi event has to be called before dp_txrx_ppdu_stats_handler.
this will handle all pktlog htt messages including cases for mgmt frame
Change-Id: Iefba15b61278fe77cbb6d6df9190e66b46ed573c
copying mu data info is done inside schedule command status tlv
and handling based on completion status is added.
Change-Id: I2792d754a4fa3e2992d68f569c9ce40be8ff02e2
HTT interface to enable FISA has been modified to accomadate only
FISA enable and aggregation limit fields, rest of the fields will
be initialized by the firmware; this change is in accordance with
it.
Change-Id: Ia5950541b8d852029650c02e81c097bf049e54c5
CRs-Fixed: 2731543
Currently, per-user information in Tx PPDU completion is allocated for
37 users though FW may send information for fewer number of users. In
new scheme, FW provides number of users in USERS_INFO TLV and host can
allocate the per-user struct based on this number. This can save memory
while processing each completion message.
CRs-Fixed: 2730923
Change-Id: If04fd664a1ef6e77e8eb44c5d2bd1fa89fcaba72
As per MAC team's suggestion, While disbaling full monitor mode,
Set 'en' bit to true in full monitor mode register.
CRs-Fixed: 2722950
Change-Id: Idc891efde5f1fa625d59b7a193deeb38dca33e23
Move the ppdu_user_desc assignments in all tx capture
before peer checks. FW sends the peer_id which is not
valid in host, so this check is needed to not
miss the sequence number in this scenario.
Change-Id: I24305ae8f8f1964157ca61b8687fe72e76cde5ca
CRs-Fixed: 2626247
if peer delayed ba is true then value of preamble will be eventually
overwritten by previous frame (HE) and would give wrong values when
shown in pcap for radiotap fields. phy_mode is set to preamble value to
hold it and later on set it to mpdu_info preamble.
Change-Id: I054d27064b9ad151130fcbc1684594308352cef4
Do a logical split of dp_soc_attach and
dp_pdev_attach into Allocation and initialization
and dp_soc_detach and dp_pdev_detach into
de-initialization and free routines
Change-Id: I23bdca0ca86db42a4d0b2554cd60d99bb207a647
For HTT messages (no matter they are test commands or not) which do not
have FW responses, tag them for runtime PM feature so that corresponding
usage count will be decrement right after sending them through HTC to
avoid usage count mismatch. Tag the missing ones in this change.
Change-Id: I3f78d21a5a490db6dff0dd2786d87c3ced66180c
CRs-fixed: 2672301
Validate number of wds entries deleted during peer unmap
handling with the number which firmware has sent in
peer unmap message, which indicates the number of
wds ast entries deleted by firmware after peer delete.
Change-Id: I09e1c41bab19cd023e7a83baf1e90d51aab4229e
CRs-fixed: 2667445
If tx capture, sniffer are not enabled, mgmt nbuf is freed.
It is causing use-after-free in bpr enabled case
Added change to free only when bpr is disabled
Change-Id: Ia56254ca371cd9fbc21f5d58fac7ea96792d0bee
CRs-Fixed: 2663098
Is some cases, FW wants to adjust BA session parameters
FW sends a HTT event and HOST helps to send out DELBA
and modify BA win size in the next round of ADDBA req/resp
exchange to reduce following RX AMPDU aggr-size
Change-Id: I97777ff59a18346f2cd4e2e562c8ae6acdcd69d7
CRs-Fixed: 2644641
For ACK completion, update ba_size, ba_bitmap, ba_seqno
only if these are not updated earlier.
This fix updates ba_size, ba_bitmap, ba_seqno for QOS TID frames
in ACK completion handler, if these are not updated earlier.
CRs-Fixed: 2650482
Change-Id: I1d5f4bdb29a3d5194cd4a1544b39d6aa42903b1b