Commit Graph

305 Commits

Author SHA1 Message Date
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
Anish Nataraj
376d9b19f3 qcacmn: Include sgi parameter for ratekps calculation
Currently gi value was not considered for ratekbps calculation
if sgi is enabled, include gi parameter for ratekbps calculation

Change-Id: Idd8b36375493c26f22f2f4f0c7ae922df37e65a1
2018-08-31 04:01:22 -07:00
Anish Nataraj
7235d9b33d qcacmn: Update ack rssi only for successful completion status
Currently ack rssi is updated unconditionally. Check completion
status before updating ack rssi

Change-Id: I9dec8a051adc933ceab33c71ccbb784471b2756e
2018-08-23 01:45:38 -07:00
Anish Nataraj
37b649522c qcacmn: Assign valid user index even for TLVs peerid 0xffff
Peerid 0xffff is for scan peer and rate information needs to
be delivered using valid user index from API dp_get_ppdu_info_user_index

Change-Id: If200467755c4b18002db221413976624ca66a9c9
2018-08-20 11:52:46 -07:00
Chaithanya Garrepalli
be9d5fcc14 qcacmn: populate delayed_ba bit to tx PPDU descriptor
Populate delayed_ba bit to the user info in tx PPDU
descriptor from htt user common tlv

Change-Id: I7d22b10123015cd3799e1c3b2f31c7da6f020c13
2018-08-11 00:29:36 -07:00
y
db24745af8 qcacmn: PPDU changes for DP Componentization
PPDU rate related change moved to data path layer

Change-Id: Id362da61336fb439e394437636af53c0c2c10988
2018-08-10 18:11:36 -07:00
Aditya Sathish
ded018e406 qcacmn: Clean up dp component prints
Clean up datapath component prints by correcting trace levels for
regularly occurring prints and removing newlines from converged
print APIs since qdf_trace_msh appends them by default.

Change-Id: Ie8fe319fcb737720f7400a165e134b6a18bd15b5
CRs-Fixed: 2243843
2018-08-10 18:11:21 -07:00
Amir Patel
52c6b73468 qcacmn: Notify peer stats change to upper layer
Notify peer stats change to upper layer via WDI interface.

Change-Id: I4b9ea3ed98ba09b4afc03e3c3edc42ab9c9f3cba
CRs-Fixed: 2287145
2018-08-06 04:21:34 -07:00
Alok Singh
40a622b062 qcacmn: Add check for bpr feature
Disable m_copy/enhanced_stats feature causes the bpr feature disable.
Hence add check for bpr feature status during enable/disable of m_copy
and enhanced_stats.

CRs-Fixed: 2275686
Change-Id: I5592b422823446374ce560fe3653990be4c796b0
2018-08-01 03:50:18 -07:00
Balamurugan Mahalingam
f72cb1f1ff qcacmn: include hal_hw_headers.h header file
macros and fw cmn headers included in hal_internal.h is moved
to a new hal_hw_headers.h to avoid these getting included in hif
layer. Include the new hal_hw_headers.h file

Change-Id: I3390ae9e71ca561d94a265e1fdf4d9354e7b2474
2018-07-21 00:03:27 -07:00
Akshay Kosigi
5902dfd254 qcacmn: Remove filling mgmt_ctrl frame buffer for NON TLV payload
Reverting the change where mgmt ctrl frame buffer was assinged NULL for
NONTLV payload case as this check is handled later in the same path.

Change-Id: Icccfb401fe34da593198bac27650139654021636
CRs-Fixed: 2276923
2018-07-13 10:36:20 -07:00
Soumya Bhat
1dfef0346b qcacmn: Reset variables appropriately
In existing code, variable used to track mgmt. and control
TLV is getting reset only in success case.

Add change to reset it appropriately.
CRs-Fixed: 2248313

Change-Id: Ieac5dc215f441b0530013ea1e36abcba19294754
2018-07-12 04:58:47 -07:00
Akshay Kosigi
1a9c6d1d4c qcacmn: Rename osif_pdev and os_if_vdev in dp_pdev and osif_dev
structures

Rename osif_pdev to ctrl_pdev and os_if_vdev to ctrl_vdev in dp_pdev and
osif_dev structures respectively which are
pointing to objmgr_pdev and objmgr_vdev structures to maintain
uniformity

Change-Id: Ida95a1a90ea74513573f00c652338baee3df897a
CRs-Fixed: 2241362
2018-07-09 02:02:23 -07:00
Keyur Parekh
d005ca2492 qcacmn: Added change to correct Tx PPDU BW value
This change required to match Tx PPDU BW value with
FW stats. As per firmware enums its starts with 5MHz
BW value. So to match 20MHz value with enum zero, need
to subtract from BW populated from TLV.

Change-Id: Ifcc49839c08de78c9200b877890fdce2e0846f1d
2018-07-02 16:08:56 -07:00
Nandha Kishore Easwaran
dd68508f03 qcacmn: Check pdevhandle before processing htt msg
Add null check for pdevhandle before processing htt msg.
This is added for polled mode to avoid race between pdev detach
and CE poll timer stop.

Change-Id: I925e70985bd11e05e0679ad0107493aaefe8a273
CRs-fixed: 2352564
2018-07-01 04:37:44 -07:00
Soumya Bhat
51240dc6db qcacmn: Fix beacon metadata in debug sniffer mode
In existing code the HTT stats buffer was getting freed after
parsing mgmt. payload TLV, which was leading to missing beacon
metadata.

Add change to continue processing HTT stats buffer even after
receiving mgmt. payload TLV.

Change-Id: Iac67577ea5e362f046a1d5432204362a9559c788
CRs-Fixed: 2248313
2018-06-26 22:43:02 -07:00
Vinay Adella
873dc40d46 qcacmn: Beacon to replace a probe response
Cancel broadcast of probe response if beacon is already sent
in beacon offload.

Change-Id: I4fea51433fbb959e05988c2daac89fbe839b1cdf
CRs-Fixed: 2209282
2018-06-15 12:39:38 -07:00
Jeff Johnson
ff2dfb217b qcacmn: dp: Fix misspellings
Address the following issues in the dp folder:
CHECK: 'availble' may be misspelled - perhaps 'available'?
CHECK: 'catagory' may be misspelled - perhaps 'category'?
CHECK: 'endianess' may be misspelled - perhaps 'endianness'?
CHECK: 'exceded' may be misspelled - perhaps 'exceeded'?
CHECK: 'explicitely' may be misspelled - perhaps 'explicitly'?
CHECK: 'Inteface' may be misspelled - perhaps 'Interface'?
CHECK: 'lengh' may be misspelled - perhaps 'length'?
CHECK: 'messsages' may be misspelled - perhaps 'messages'?
CHECK: 'miscelleneous' may be misspelled - perhaps 'miscellaneous'?
CHECK: 'Ouput' may be misspelled - perhaps 'Output'?
CHECK: 'poiter' may be misspelled - perhaps 'pointer'?
CHECK: 'Poiter' may be misspelled - perhaps 'Pointer'?
CHECK: 'psuedo' may be misspelled - perhaps 'pseudo'?
CHECK: 'registerd' may be misspelled - perhaps 'registered'?
CHECK: 'requred' may be misspelled - perhaps 'required'?
CHECK: 'retreive' may be misspelled - perhaps 'retrieve'?
CHECK: 'succesfully' may be misspelled - perhaps 'successfully'?
CHECK: 'vaild' may be misspelled - perhaps 'valid'?
CHECK: 'virtaul' may be misspelled - perhaps 'virtual'?

Change-Id: I66b9cdc6115dd133b385e60c9d02cefd1bd0bac3
CRs-Fixed: 2241574
2018-05-19 19:41:02 -07:00
Venkata Sharath Chandra Manchala
4face24247 qcacmn: Generate pdev mask based on mac number
Set pdev mask in the HTT Stats request based on
mac id number provided from the user.

Change-Id: Ie8f1208fd3598efd2ea3736719c8b444ef86881a
CRs-Fixed: 2237467
2018-05-15 00:36:28 -07:00
Chaithanya Garrepalli
2faa46fbfb qcacmn: avoid vdev stats aggregate for every ppdu stats event
Avoid vdev aggregate stats for every ppdu stats event as it is
consuming high CPU in veriwave max clients testcase. Instead
aggregate the stats when ifconfig athX command is issued. Add
CDP API to aggregate and update stats called when needed

Change-Id: I801d5f8fab0c275942b77a9975293f95bd4026b0
CRs-Fixed: 2220704
2018-05-05 21:34:38 -07:00
Venkata Sharath Chandra Manchala
f5e2570abe qcacmn: Fill htt message length correctly
Fill htt msg length before the htt stats response
handler so that the wifistats tool can read the
htt msg data correctly.

Change-Id: I544d1b97c8d74a0115a4a5a509780a6e9c273ab7
CRs-Fixed: 2231948
2018-04-30 15:29:34 -07:00
Kiran Venkatappa
d1a16871a3 qcacmn: Fix compiler error with WDI_EVENT_ENABLE disabled
Update function prototype of dp_ppdu_stats_ind_handler. It should be
same when WDI_EVENT_ENABLE is defined and not defined.

Change-Id: I390d35b3b9f5f283fc3b960f00563fb997ef7f95
CRs-Fixed: 2230955
2018-04-29 23:44:09 -07:00
Venkata Sharath Chandra Manchala
e37bc4601e qcacmn: Add stats counters to account for Error packets
Retrieve length from every htt msg to
parse the tlv's from the htt msg and also
add statistics counters to account for error
packets in Rx path.

Change-Id: I17105174734975dc0d5093c587697346a8ada725
CRs-Fixed: 2214594
2018-04-11 09:15:22 -07:00
Soumya Bhat
402fe1a26a qcacmn: Tx capture/Mcopy mode changes
The following changes are added for Tx capture/Mcopy mode
1. Append ppduid for FW generated mgmt. frames
2. Append ppduid received in mgmt. TX completion for host
   generated mgmt. frames
3. Reuse nbuf received in HTT msg to send mgmt. payload to
   upper layers

Change-Id: I073cafa6389ed1ed835cc3ba4b9421b7a4b97d7f
CRs-Fixed: 2185543
2018-04-06 14:47:18 -07:00
Abhiram Jogadenu
27d55ecd7d qcacmn: Add support for PPDU ACK timestamp
Make Ack timestamp same as PPDU END timestamp

Change-Id: I4030f461ed19d46e176819168ceca735c7c63f9f
2018-03-21 22:42:50 -07:00
Anish Nataraj
0dae67614e qcacmn: Assign bss peer in peer map event
Assign num_mpdu to mpdu_tried_mcast for mcast stats updation
Defer bss peer assigning till peer map event arrives
Do not set delete_in_progress for bss Peer

Change-Id: I0881ea3c8804990c336d97cb7b239a991ec64fa9
2018-03-20 02:10:07 -07:00
Anish Nataraj
b9e7d01e52 qcacmn: Add linked list logic to store per ppdu descriptor status tlv
Add linked list logic to hold all ppdu descriptor status in a list till
all TLVs have been processed
This design handles asynchronous arrival of tlvs from fw per ppdu

Change-Id: Ib8943d7c826c0b441f58f0eaba7ae0bdc0539d9a
2018-03-12 14:14:06 -07:00
Venkata Sharath Chandra Manchala
ac863c4b4d qcacmn: Set the pdev mask based on channel id
Set pdev mask in HTT extension stats msg based
on channel id information.

Change-Id: I7c971494049e16ae8e0eb694984857346c3a38b7
CRs-Fixed: 2185219
2018-03-08 22:06:11 -08:00
nobelj
8c07d61785 qcacmn: Add support for PPDU END TSF in ppdu stats
Add support for PPDU END TSF by adding START TSF and Duration.

Change-Id: Ida04a793876f2a5b029726cc85f2715b71a30834
2018-03-04 21:11:56 -08:00
Pamidipati, Vijay
87a93cf03a qcacmn: Use MSDU indications to update Tx byte counters
Byte counts reported in HTT Tx PPDU indications is sum of MPDU bytes
(including the 802.11 header).In Rx, we derive byte count from per-MSDU
Rx indications and this does not include 802.11 header bytes.
This is causing mismatch in reporting of Tx and Rx byte counts.
Also PPDU TLV for mcast MPDUs is not giving correct multicast bytes count.

Move the byte count update for Tx also to per-MSDU indications to match
the behavior with Rx

CRs-Fixed: 2182576
Change-Id: I92e779661014b058ba98c830881ff8eded4ea6ff
2018-02-27 23:33:50 -08:00
Prathyusha Guduri
43bb056ed0 qcacmn: Add fw stats to cdp_pdev_stats
Add htt tx and rx structs from HTT to cdp_pdev_stats.
These Fw tx and rx stats are obtained through HTT events.
athstats application uses cdp_pdev_stats that contains host stats
and fw stats.

Change-Id: Ia063f406bdc6d32a684c4026b8425ecc96faa3db
CRs-Fixed: 2190793
2018-02-27 23:33:48 -08:00
Anish Nataraj
57614da632 qcacmn: Populate timestamp,duration,lsig_a stats
ppdu stats timestamp,duration,channel etc were not
updated and corrected the same

Also RSSI was incorrectly getting updated for
mcast frames also, fix both of the above issues

Change-Id: Id8446c6c0cfe8761f8c524fc7af0ff5bdd8b96aa
2018-02-12 21:46:51 -08:00
Soumya Bhat
0d6245c0ac qcacmn: PPDU stats debug enhancement
1. Assert if length received from FW is not equal to
   the expected length
2. Count the number of PPDU stats received by host and
   print in "iwpriv athX txrx_stats 260"
3. Optimize the PPDU stats tag mask sent to FW for
   enhanced stats enabling

Change-Id: I60019de93bb3914955a03546504efc820c960746
CRs-Fixed: 2170704
2018-02-12 07:34:57 -08:00
Soumya Bhat
1df9464a4d qcacmn: Handle TLV received asynchronously from Firmware
When TLVs come from TAC_thread last tlv sent by FW is
HTT_PPDU_STATS_SCH_CMD_STATUS_TLV
and in Tqm thread HTT_PPDU_STATS_USR_COMPLTN_ACK_BA_STATUS_TLV is the last
TLV to be sent. HTT_PPDU_STATS_USR_COMPLTN_ACK_BA_STATUS_TLV though can
come either in tqm thread or tac thread based on tid type.

Add change to process HTT_PPDU_STATS_USR_COMPLTN_ACK_BA_STATUS_TLV when it
comes from tqm thread and pass the populated buffer to the appropriate APIs

Change-Id: I7a064aba4e3c6814b63dcf4bb97cfb3be0194c39
CRs-Fixed: 2180477
2018-02-05 03:40:11 -08:00
Sathyanarayanan Esakkiappan
38c6f988d5 qcacmn: Pass psoc/pdev object as ctrl objects to DP
pass psoc/pdev object as ctrl pointers to instead of legacy objects.
It introduces new APIs to get feature pointers of psoc/pdev.

DP attach API param modified to pass ctrl psoc (psoc object)

Change-Id: I3d83f28c3e72e5ee984a4220b9d5cf3c4522b501
CRs-Fixed: 2177109
2018-02-03 15:11:15 -08:00
Pranita Solanke
a5a3ae721e qcacmn: Add support for Tx and RX Broadcast Packets
Add counters to display the broadcast packets on Tx and Rx side

Change-Id: I85bea07b83d34dc15b185297e7ec63208d8ab8e8
2018-01-30 05:39:04 -08:00
Pranita Solanke
ed0aba69a9 qcacmn: Rx and Tx peer statistics update
* Update the pkt_type counters correctly within the array bound
 * Add support for NSS counters on Tx side
 * Update ampdu flag in PPDU struct
 * Add support for ampdu flag in hal_ppdu struct

Change-Id: I79ea52727124ea4be4d82912cb2513ea58e2af10
2018-01-18 02:33:34 -08:00
Keyur Parekh
73554f9a8c qcacmn: pktlog host change for pdev id
Use correct API to extract pdev_id from HTT
message

Change-Id: Ia9e697f2a01391a073a68945de51c273efbfe5b5
2018-01-12 11:30:37 -08:00