Commit Graph

192 Commits

Author SHA1 Message Date
phadiman
f09509b3f4 qcacmn: Populate mpdu_failed stats
Calculate mpdu_failed by subtracting
mpdu_tried with mpdu_success

Change-Id: Ic8a757729f3b352578d33c35d73158cffa64b78d
2019-07-12 08:29:37 -07:00
Ankit Kumar
0ead45c2d7 qcacmn: Call log handler in case of HTT command/event
htt_command_record, htt_event_record, htt_wbm_event_record
function is used to log command,event, wbm event to
in-memory data-structure.
We call these function from htt path.

Change-Id: Ib3e18b895485c84f0010f8c3ba95c2da85b00bde
CRs-Fixed: 2428742
2019-07-09 18:51:21 -07:00
Chaitanya Kiran Godavarthi
8c880d3fd2 qcacmn: Handle AP and STA Tx stats separately
AP and STA stats need to be handled separately.

Change-Id: I105856d6d4ee39a116966eb3ff47775b54f08ef4
2019-07-01 22:30:58 -07:00
Amir Patel
70f3c3001b qcacmn: Update Access category stats only for data TIDs
Currently AC stats are getting updated for data tid as
well as non-data tid. Add check to update stats only for
data tids

CRs-Fixed: 2455781
Change-Id: I69d7a11f0101a5c3c6c7e5b0df3e190437990188
2019-06-10 07:28:19 -07:00
Varsha Mishra
27c5bd3193 qcacmn: Handle tx_sniffer pakcets
Send tx_sniffer to firmware and handle ppdu completions accordingly.

Change-Id: Id19a8cba4fdcad88bca6ade8c30a587c2da26d19
2019-05-29 16:47:01 -07:00
Rakesh Pillai
51264a63e1 qcacmn: Disable excessive logging during dp init
Excessive logging during dp init causes watchdog
bite when multiple init-deinit cycle is followed.

Change the loglevel to debug, so that it does not
flood the console with logs.

CRs-Fixed: 2444944
Change-Id: I43daab413800424651e3f5edf558360886d7d7fe
2019-05-29 11:08:25 -07:00
Tallapragada Kalyan
f7b0f745c4 qcacmn: Make HTT PPDU TLV processing backward compatible
For HTT PPDU Stats TLVs, if target has provided less data than expected,
pad the data with zeros until it matches the expected length and
process the TLV, instead of     asserting.

This enables testing of different FW and Host versions during regression
analysis.

CRs-Fixed: 2451611
Change-Id: I79aaad8a6fde6d49510c3a212b21425ac784ad5c
2019-05-29 10:59:01 -07:00
Pranita Solanke
05862964ab qcacmn: Identify WIN/MCC specific features
Identify the WIN/MCC specific features. Move the features under feature
specific flags. Get rid of WIN/MCC specific code.

Change-Id: Iaf4e5befd7d574a20bea5c078201adbeac3b762c
2019-05-20 09:58:47 -07:00
Surya Prakash Raajen
b9780dd207 qcacmn: Update Tx rate only when tid is valid data tid
Update the tx rate only when tid is between 0-7 data tid
or 15 a valid one

Change-Id: I5cc23f6b4fc170d6306d3420c27b879704a0dbf4
CRs-Fixed: 2436934
2019-05-15 21:34:33 -07:00
nobelj
debe2b3b9c qcacmn: support enhance TX capture
support TX capture mode to deliver msdu along with meta data.

Change-Id: Ic84416cc4892e37bfb831dada136a4ff6b615a61
2019-05-10 12:39:30 -07:00
Amir Patel
2321668837 qcacmn: Update tx stats for non-qos frames
Currently there is no support to update tx stats for
non-qos frame. Update tx stats for non-qos data frames

Change-Id: Ib61dd6e3b0c676b5af806c4b1e5cca22ea6ffaa5
CRs-Fixed: 2421925
2019-04-26 06:44:37 -07:00
Amir Patel
ac7d9465f9 qcacmn: Update correct tx rate, rx rate and sojourn stats
Currently we are upadting sojourn stats for all tid.
but rate stats maintains stats for only data tids 0-7.
updating stats for tid value exceeding 7 is leading it to
assert.
Update correct tx rate, rx rate and sojourn stats.

Change-Id: Ib2f5791aa7b8e85aac6283c46f58ce7e821a559b
CRs-Fixed: 2428648 2429575 2429575
2019-04-24 09:30:02 -07:00
Shashikala Prabhu
f7786d3822 qcacmn: Change the data type of average/roundup tx rate
The datatype of average and round up tx rate was uint32_t which truncates
the upper byte of the average and round up tx rate value.

changing the datatype of average and round up tx rate from uint32_t to
uint64_t.

Change-Id: I3809ba7cfc73ec0b4609981e70d57112ac958f33
CRs-Fixed: 2409751
2019-04-16 09:09:38 -07:00
Chaitanya Kiran Godavarthi
e541e9ccda qcacmn: Add Tx AMPDU statistics
Count of MSDUs Tx with AMPDU aggregation and
MSDUs without AMPDU aggregation is maintained. This
count is obtained from per ppdu stats.

Change-Id: I7c38846534bbe5f2fd0a9b3602a9d453e1c1f449
2019-04-10 05:27:06 -07:00
Srinivas Girigowda
2751b6d2b3 qcacmn: Consolidate multiple MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
Consolidate multiple (redundant) MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
CDP_MAC_ADDR_LEN
OL_TXRX_MAC_ADDR_LEN
DP_MAC_ADDR_LEN
HTT_MAC_ADDR_LEN
IEEE80211_ADDR_LEN
DEFRAG_IEEE80211_ADDR_LEN
ETHER_ADDR_LEN
HAL_MAC_ADDR_LEN
WLAN_MACADDR_LEN

CRs-Fixed: 2406591
Change-Id: I4a87f8ff556920c7b341bdbba99ec43c97b873f4
2019-03-28 16:50:32 -07:00
Jeff Johnson
a8edf330f0 qcacmn: dp: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within dp replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: I61f3adab1208682d36235421f44a048e35df346d
CRs-Fixed: 2418258
2019-03-27 06:10:00 -07:00
Amir Patel
468bded892 qcacmn: Add RDK statistics changes for Hawkeye
Add RDK statistics changes to collect below stats
a. Tx rate statistics
b. Tx sojourn statistics
c. Rx rate statistics

CRs-Fixed: 2416141
Change-Id: I0c8127cd387b7665a76847f4125977bbb8c5a57a
2019-03-21 23:04:43 -07:00
Kiran Venkatappa
07921611b4 qcacmn: Use HTT message to disable rx_pkt_header tlv
On low memory platform rx_pkt_header tlv is not subscribed to get a
savings of 128bytes in skb. This is required to reduce the skb size from
4K to 2K on 32-bit platforms. Use HTT_H2T_MSG_TYPE_RX_RING_SELECTION_CFG
message to unsubscribe rx_pkt_header tlv for rxdma ring.

Change-Id: Ie684f1ca1de9c824a869b4e13fd0ee1d068004e7
CRs-Fixed: 2408424
2019-03-08 23:38:07 -08:00
Santosh Anbu
4de9ffb5b1 qcacmn: Update retry count for failed tx frames
Check for completion status of the ppdu based on
HTT_PPDU_STATS_USR_COMMON_TLV and
HTT_PPDU_STATS_USR_COMPLTN_ACK_BA_STATUS_TLV.
Update the stats only when completion status is ok else
update retry and failed frames count.

Change-Id: Iac7730715f853746d77873488b7886e7beed467d
CRs-Fixed: 2390383
2019-03-08 12:06:01 -08:00
chenguo
26c518a6f6 qcacmn: Fix wrong trace info in PEER_UNMAP_V2 message
It is easy to be misled when unmapping message is traced as map
message. Correct this wrong message.

CRs-Fixed: 2376470
Change-Id: I5577ae8e0f787925452c3ecf91ce0e2ff8a2ae9f
2019-03-03 22:25:15 -08:00
Venkata Sharath Chandra Manchala
69a0ed394a qcacmn: Add counters for wdi messages
Add counters to account for wdi messages from firmware.

Change-Id: I1c12d42ac4d385d2ed27f6eff84dd2fcfd540ab1
CRs-Fixed: 2365971
2019-03-01 23:39:17 -08:00
Amir Patel
78824b1d4e qcacmn: Add changes for RDK statistics
Change API signature for dp_getrateindex to populate rate index
and add additional stats required for RDK.
Add QDF abstraction for EWMA average rssi

CRs-Fixed: 2397918
Change-Id: Id878971799c5df2ae60057a86b2769724ee0dcc5
2019-02-27 03:13:56 -08:00
nobelj
23bb63a3a9 qcacmn: Do not flush tlv if we get same tlv for MUMIMO
For MUMIMO and OFDMA, we get same tlv multiple times.
So flush not required.

Change-Id: I532f4893320c28083d0f29d319fbc0db5b5d14b8
2019-02-21 15:01:39 -08:00
hangtian
fe681a5c2d qcacmn: Use qdf_mem_zero for zero initialization, dp part
Use qdf_mem_zero for zero initialization, dp part.

Change-Id: I8cd5d43b554bf355dfcff0463ba4acb6d22ba254
CRs-Fixed: 2378005
2019-02-21 01:46:39 -08:00
nobelj
7966633c14 qcacmn: OFDMA counter get increased when num_msdu 0
Sometimes we receive num_msdu as 0 with ru_tones and ru_start
which cause OFDMA counter to get increament

Change-Id: Ib099a2143799551266e94bc9b8d281237092a46e
2019-02-20 12:56:39 -08:00
Amir Patel
1ea85d4671 qcacmn: Add support for STA inactive time in Hawkeye
Currently there is not STA inactive time support for lithium.
Read inactive_time from htt_peer_stats_cmn_tlv by sending
HTT_DBG_EXT_STATS_PEER_INFO to firmware.
After sending command, wait on completion variable till
firmware to response, trigger completion upon firmware response.

CRs-Fixed: 2319219
Change-Id: I93e6343641ae5c72610a57dd6ba551cca0b010c1
2019-02-09 11:52:40 -08:00
Sravan Kumar Kairam
deb899b182 qcacmn: Fix implicit conversion error
Fix implicit conversion from enum type QDF_STATUS to
different enum type A_STATUS.

Change-Id: I549c9284e18d73685e879c2f0bb8c54330a35bda
CRs-Fixed: 2389838
2019-01-30 21:46:28 -08:00
Amir Patel
36a79a672c qcacmn: Fix htt ppdu tlv bitmap issue
Define two tlvs for 64-bit and 256-bit transmission window

CRs-Fixed: 2377256
Change-Id: Id11e1d3695101ef001c689d33e4546ac8a5faea6
2019-01-29 12:20:55 -08:00
nobelj
bc064fb1b9 qcacmn: Fix transmit type double increment and RU increment
transmit type is incremented twice on update status.
RU tone need to get increment for MIMO_OFDMA and OFDMA

Change-Id: I4e83a91b7653b7452cf5605b7f8aad956c355350
2019-01-24 09:59:08 -08:00
nobelj
4e9d51f914 qcacmn: Populate MU-MIMO user pos and mu group id
populate TX OFDMA and TX MU MIMO information from
user rate tlv and display the same in fc_peer_stats.

Change-Id: If1dab15bbdf391fba00a701abd6024c420d1d8f7
2019-01-24 09:59:06 -08:00
Pamidipati, Vijay
221b3e4ab7 qcacmn: Change the assert condition for PPDU Tag processing
Fix the assert in HTT PPDU TLV processing to account for
member additions at the end of htt_ppdu_stats structures by FW
This ensures Host-FW compatibility without placing hard constraints
on timelines for fwcmn header files to be synchronized with host.

Change-Id: I9f730e5896bec916c8e4e3f0eaa06b183c62f393
2019-01-20 17:28:29 -08:00
Chaithanya Garrepalli
9cc562c53b qcacmn: Modify CDP AST APIs to synchronize add and delete cmds to FW
Change the CDP abstraction APIs for ast entry find, add and delete
to avoid external references for ast entry in upper layers

Process the HTT v2 peer map messages which will be enabled for
nexthop ast entries and use these messages instead of WMI event
for HKv1 WAR where we have to wait for delete confirmation from
target event which is processed in control path

Change-Id: Ifa91a259c0762344deb8ab89e868fc5554d75543
CRs-fixed: 2354951
2019-01-17 02:22:24 -08:00
Venkata Sharath Chandra Manchala
96e3633874 qcacmn: Pktlog Enhancements
1. Reduce the log level for every buffer received
   from firmware
2. Set the default pktlog buffer size to 10MB.

Change-Id: Iad8827084579592fcfa69056dcfc9d57095151e7
CRs-Fixed: 2364380
2018-12-15 08:43:26 -08:00
chenguo
b21a49a57e qcacmn: Peer ref count leaks in ppdu stats and descriptor deliver
Because of reference counter decrement is not triggered for every
condition path, it is possible that peer reference counter leaking
happens under some perticular circumstance. Make sure the peer ref
count unreference is called for each possible path.

CRs-Fixed: 2352433
Change-Id: I60bc5a5210519c26c57cdc563d0d1b02d799e090
2018-12-05 13:13:46 -08:00
Amir Patel
c2cc252d18 qcacmn: Fix avg_tx_rate computaion
Assign dp_ath_rate_lpf return value to avg_tx_rate,
which is further used to compute ppdu_tx_rate

Change-Id: Ib51be85c2436bef8feffeb611982314720399a69
CRs-Fixed: 2356831
2018-12-04 15:12:31 -08:00
Mohit Khanna
40f76b57f8 qcacmn: Fix regression from DP init-deinit path changes
MCL DP initialization path is running into issues due to change
I5732453f617bdc16995fda916b645c41845c3ecb. Fix the same.

Move flow control lock variables to re-use region. This is needed since
flow control deinit happens in dp_soc_detach, while in dp_soc_deinit, the
soc memory is being partially reset.

De-init HTT memory in dp_soc_deinit and free HTT handle
in dp_soc_detach. The existing code was not freeing HTT
packets for MCL case and freeing the HTT handle twice.

CRs-Fixed: 2359409
Change-Id: I52dcccc0444d4ce139a29ffcb884598bbacda88f
2018-12-02 13:31:08 -08:00
Anish Nataraj
e9d4c3bf33 qcacmn: Reorganise DP init-deinit path to reuse memory
Avoid memory fragmentation that happens during
attach-detach flow.
- Reuse transmit allocated static pool memory across soc up/down.
 These memories are allocated during soc attach.
- Reuse DP source ring memory, DP soc context, DP pdev context
  across soc up/down.
- Reorganise structure members of DP soc and DP pdev so that
  we can zero out structure members across soc up/down
- Add cdp soc init/deinit and cdp pdev init/deinit that
  will be active across soc up/down

Change-Id: I5732453f617bdc16995fda916b645c41845c3ecb
2018-11-30 03:40:43 -08:00
Viyom Mittal
27fe1239d3 qcacmn: Set ack_rssi_valid to 1 for successful TX
The ack_rssi_valid flag to set to 1 only when completion_status
value is 0 which shows that the TX was successful.

Change-Id: I9e520422995e374d7d35b9db0c060d1fce2f9067
2018-11-27 11:20:21 -08:00
Amir Patel
3c60631d7c qcacmn: Add support for last_per
Calculate last_per based on unicast packets and success packets
in last one second

Change-Id: I8b469e5d9c1e40498b3267bf7bdf3149159bdc31
CRs-Fixed: 2343479
2018-11-15 03:38:29 -08:00
Venkata Sharath Chandra Manchala
0ce469e330 qcacmn: Add pktlog handler to process rate events
Add dp_msg_pktlog_handler to handle
rate events from the firmware.

Change-Id: I24776caa3b78ec38d94421f243ec72d81ee3102d
CRs-Fixed: 2340639
2018-11-11 09:27:32 -08:00
Amir Patel
756d05e9e5 qcacmn: Replace interface of dp stats updation to upper layer
Replace ol_if interface with WDI for dp stats updation to upper layer.
Define a new CDP API to get radiostats.

CRs-Fixed: 2326789
Change-Id: Ieaee2fe18fc9a0ad0e259e36f59529fe9bc4e208
2018-10-31 13:21:28 -07:00
Amir Patel
8ae687908d qcacmn: Avoid processing tx rate stats
Avoid processing tx rate stats if STATS_USR_RATE_TLV is not processed
in htt_ppdu_stats

Change-Id: Icce8ca0b351ae1ae784ba605d1d984dcdd033715
CRs-Fixed: 2316130
2018-10-30 08:47:20 -07:00
Venkata Sharath Chandra Manchala
8747958dff qcacmn: Enable Monitor Mode for QCA6390
Support Monitor Mode for QCA6390 as RXDMA1 block is
now removed.
1. Monitor buffers are now received on rxdma_err_dst_ring
2. RXDMA1 monitor status ring is moved to RXDMA0 monitor
   status ring
3. Msdu link descriptors are now returned to WBM descriptor
   release ring.
4. Reap the Monitor buffers and return it to SW Refill ring.
5. Use the same rx descriptor pool for regular and monitor data.

Change-Id: If41e5d13f942da2b97e5aab72b88ae344925ba67
CRs-Fixed: 2297300
2018-10-26 10:39:37 -07:00
Mohit Khanna
81179cb75e qcacmn: Fixes for IPA enablement for lithium/Hastings
- Support to pass IPA enabled(disabled) flag from ini to DP layer
- Use ioremap call to translate tx_comp_doorbell_paddr obtained from
  calling ipa_setup api to tx_comp_doorbell_vaddr. This is needed to
  write the initial value of HP at the doorbell address.
- Change REO_DST_RING_SIZE and WLAN_CFG_TX_RING_SIZE to 1023
  for napier/hastings if IPA is enabled. This is needed because,
  ipa_setup API can handle only 16-bit values for the size param(bytes)
  of the ring.
- Disable hash based flow steering for SAP peers in case IPA is enabled
  and set default reo_dest_ring_4 as default RX ring. Since IPA will be
  reaping RX packets from reo_dest_ring_4 only, flow steering is not
  needed for SAP peers.
- Unmap pre-allocated TX buffers for IPA in the TX completion ring.
- Donot execute IPA functionality if IPA is disabled from ini.

Change-Id: I6855bfe293a457ccc0abd1ad5567f5c95232a9d2
CRs-Fixed: 2183519
2018-10-17 17:42:35 -07:00
Venkata Sharath Chandra Manchala
d18887ee9f qcacmn: Compilation fixes for SM8150 platform
1. Address out of bounds array access while
   populating mcs rates.
2. Use cdp_sec_type enum inplace of htt_sec_type
   for common code.

Change-Id: I0ae1e0acaf7422e73dc26befc9f066f3f424ec6b
CRs-Fixed: 2327153
2018-10-11 10:39:55 -07:00
Chaithanya Garrepalli
3ba616a89a qcacmn: add locks in dp_get_vdev_from_soc_vdev_id_wifi3 API
In dp_get_vdev_from_soc_vdev_id_wifi3 add vdev list lock
while traversing through pdev->vdev_list

Change-Id: I24652a7a65247625b3a6da092476287bf8560e1b
CRs-fixed: 2323655
2018-10-09 19:58:48 -07:00
Sravan Kumar Kairam
26d471ec56 qcacmn: Take peer ref count and dec it after using
Currently peer reference is used with out taking any ref count.
In parallel context execution on different core peer reference may
be cleaned up in peer unmap event. So take ref count while using
the peer reference and decrement after done with it.

Change-Id: I02ca172cbdc4309fabd3bbbad00940826662bbd3
CRs-Fixed: 2301963
2018-09-27 20:24:36 -07:00
Amir Patel
1de3d3ddf3 qcacmn: Fix Tx rate for multicast packets
Fix tx rate for multicast packets

Change-Id: I0f5e628b571577a282817b165a62a1ff640bb0c5
CRs-Fixed: 2309177
2018-09-24 08:48:41 -07:00
Chaithanya Garrepalli
3e93e5f8ae qcacmn: changes to enable peer map V2 messaging
Host changes to enable HTT version 2 messaging for
PEER map and unmap in FW and changes to handle these
messages in host

Change-Id: Ifbe478212bbbc9c9ea1c1e4791c7a78407c376cc
2018-09-15 11:11:04 -07:00
sumedh baikady
59a2d33a2d qcacmn: Use monitor direct for smart monitor
Set monitor direct filter when smart monitor is
enabled. Deliver header from NAC if md bit is set
and smart mesh feature is used.

Change-Id: If1ef865e013c21bbb58bcb89a87856b12d6c7278
Crs-fixed: 2246660
2018-09-08 12:29:31 -07:00