Commit Graph

499 Commits

Author SHA1 Message Date
Pamidipati, Vijay
f82fb2b8f7 qcacmn: Add support to process v2 fw2wbm completion structure
FW has moved to using v2 HTT_FW2WBM message format for Tx completions
Add corresponding change on Host.
Add missing code to free Tx descriptors for few HTT completion types
Also change the descriptor pool lock to spinlock_bh since transmit path
and completions typically run in tasklet/softirq context

Change-Id: I024d44243f95907f19086225f0f02a5cd64f4508
CRs-Fixed: 2068155
2017-07-11 23:48:00 -07:00
Pamidipati, Vijay
be379457e6 qcacmn: Add a flag to enable/disable per-packet sync of DP stats
Currently all Host collected DP statitics are synced to upper layers
on per-packet basis; This is causing significant CPU overhead.
Add a flag which can be controlled through iwpriv to enable/disable
updating of these statistics from DP to higher layers

Change-Id: I983c6d91803c83c1efd49c5535769a0c10fbc9b5
CRs-Fixed: 2064113
2017-06-26 17:42:34 -07:00
Venkata Sharath Chandra Manchala
340c0d8903 qcacmn: Incorrect use of tx descriptor
Avoid accessing and releasing tx descriptor when it is
not allocated in tx path.

Change-Id: I36515b679c541d081fd836ea3fb732768031cc06
CRs-Fixed: 2062160
2017-06-23 10:41:30 -07:00
Tallapragada Kalyan
274eb9e76b qcacmn: Temporary WAR for Multicast echo check in host
This is a temporary WAR in host for multicast loopback check
until we finalize on exact design, and host or firmware will
take care of this

Change-Id: I4d2d1b0f5d2a78d4c8716740b74c4fee22c28e96
CRs-Fixed: 2039038
2017-06-16 17:12:15 -07:00
Venkata Sharath Chandra Manchala
d6ad0d5c49 qcacmn: Print tx descriptor id
Print the tx descriptor id when a new
descriptor is allocated for a skb.

Change-Id: I7326a79149de124edc8ebf5b2b0d6349e385b321
CRs-Fixed: 2054538
2017-06-05 19:28:57 -07:00
Venkateswara Swamy Bandaru
15c68dadff qcacmn: Fix channel information mesh frame tx completion
Added channel info to meta header in mesh frame tx completion.

Change-Id: If032ee92330cc76c683f2b81af3707bccfe76fa9
CRs-Fixed: 2003389
2017-05-24 02:41:08 -07:00
Venkata Sharath Chandra Manchala
35503cce26 qcacmn: TSO fixes
1. Unmap tso common segment only after receiving
   completions for all the tso segments for a given
   skb.
2. Keep a track of num of free tso descriptors available
   in the pool of tso descriptors.

Change-Id: I01bdbb9e40b7259f77dbcfeec22c6d8cd0c0a6dd
CRs-Fixed: 2042950
2017-05-22 17:05:21 -07:00
Ishank Jain
997955e336 qcacmn: Add Support for Inspect Path for Lithium
Add peer-id in the meta data for the reinjected by the FW
and queue them to the HW.

Change-Id: I3f25d5f928b6891c06cad6ce3ed81df77d4e33ed
CRs-Fixed: 2024450
2017-05-18 10:36:48 -07:00
Sathish Kumar
e7e784d1b4 qcacmn: Adding SW workaround for raw mode AMSDU packets
Due to HW limitation, WEP bit is expected to be set in AMSDU packets
transmitted in raw mode.

Set WEP bit if the QOS frame is AMSDU during the tx processing of the
raw mode packet.

Change-Id: Ibaa7d95f6ebcf9016e3c02355b5f0ce909eb9a93
CRs-Fixed: 2042666
2017-05-18 09:45:22 -07:00
Ishank Jain
57c42a193c qcacmn: Add missing TxRx Datapath stats
1.Add QDF_TRACE_STATS for datapath stats to remove
  module prints.
2.Fix Stats indentation for better readability.
3.Add missing stats
  a. Update Packets on Rx side on per-ring basis.
  b. Add stats for features (TSO/SG/RAW/Mesh)
  c. Add packet type count on Rx.

Change-Id: Ief1719b67330f729ff60703ec2be26bc5e4201e9
CRs-Fixed: 2034876
2017-05-05 00:27:21 -07:00
Kabilan Kannan
56bfd8fdb3 qcacmn: Update address search flags for TDLS
Add support to set address search flags in WLAN Tx Descriptor
for TDLS operation

Change-Id: Iafb15fb1efd84a4bef436062368401a5496e4468
CRs-Fixed: 2041759
2017-05-05 00:27:20 -07:00
Pamidipati, Vijay
c9a13a52c8 qcacmn: Set addr_search flags according to vdev opmode
Add support to set addr_search flags in WLAN Tx Descriptor
as per vdev operational mode

Change-Id: I25fcd4bf450982f8aecc6e91236211c17d5f3f22
CRs-Fixed: 2004658
2017-04-24 15:55:13 -07:00
Venkateswara Swamy Bandaru
7e19ec5b53 qcacmn: Fix mesh rate extraction from meta header
Accoring to new meta header format mcs, nss, preamble_type and retries
information will present in rate_info field. Changes done to extract
these fields and update ext2 header to firmware.

Change-Id: I56926f39f2ba17446418c7eae0fd382247430df8
CRs-Fixed: 2003389
2017-04-20 08:18:12 -07:00
Venkata Sharath Chandra Manchala
d817164e95 qcacmn: Remove debug message in Tx completion process
Remove debug message to print pdev id in
dp_tx_comp_process_desc to avoid flooding of
print messages on serial console

Change-Id: I141b59a9e477aec25f3d9f8a424397d382903d58
CRs-Fixed: 2017426
2017-04-18 17:15:04 -07:00
Ishank Jain
c838b133c1 qcacmn: Add Mcast enhancement feature support
Feature to convert Multicast packet and send them as unicast.

Change-Id: I64d44ac337bd366c6799226fd69f89cd3e46e65d
CRs-Fixed: 1116432
2017-04-14 10:17:19 -07:00
Venkateswara Swamy Bandaru
0bce0449f0 qcacmn: Fix for htt_included bit issue for mesh raw packets
HTT meta data valid set properly for scatter gather path mesh packets.

Change-Id: I6dc5b061bc187f3679e9bc80615168724469fdd3
CRs-Fixed: 2003389
2017-04-12 03:17:24 -07:00
Pamidipati, Vijay
8a4e27cd59 qcacmn: Move qdf_nbuf_map call to after adding HTT header
Remove the dependency of dma_map for align_pad calculation
move the dma_map to correct position after mesh mode header addition

Change-Id: Idd309ed47d82f68f97191048c582c1b429f3b378
CRs-Fixed: 2004658
2017-04-11 11:04:45 -07:00
Venkata Sharath Chandra Manchala
a405eb741b qcacmn: Add dump stats feature for Lithium
Add support for dump statistics in Lithium.
Statistics include:
	1. Tx path packet flow
	2. Tx Histogram stats per interrupt
	3. Rx path packet flow
	4. Rx Histogram stats per interrupt

Change-Id: I7f399b717a9fb29a3d6ab672b669c6e323f61e27
CRs-Fixed: 2023386
2017-04-11 11:04:37 -07:00
Pramod Simha
bc0a546d58 qcacmn: Fix for ping failure due to intrabss fwd logic
Intrabss forwarding logic turns around bcast (ARP) pkts on the
SAP with peer source addr. So a AST lookup on AddrY results will
route the pkt to HW and not FW which is not the design. Fix is to
enable lookup only on AddrX in SAP mode.

Change-Id: Iea41c53fd818acfb8dbfd9ad1582e43ba1c4bc83
CRs-Fixed: 2029656
2017-04-11 11:04:25 -07:00
Ishank Jain
e73c403a0b qcacmn: Add missing stats for Host Lithium Stats
Add Invalid Peer stats on rx side
Add aggregation stats missing on Tx
API to update Rx Errors

Change-Id: Ib757ee7b89d9b9113e1a41b5a520faabb9ff28bb
CRs-Fixed: 1114641
2017-04-11 11:04:18 -07:00
Pamidipati, Vijay
41e34b1ca3 qcacmn: Fix the position of qdf_nbuf_map in Tx DP
Move the qdf_nbuf_map to correct position before align_pad is
computed for mesh mode header addition

Change-Id: Ia62137daea2ab09e93a86c4b9da681f5591ce947
CRs-Fixes: 2004658
2017-04-04 16:14:53 -07:00
Ishank Jain
9f174c6e2f qcacmn: Add Non Association WDS(NAWDS) Support for Lithium
Add API to handle NAWDS packets on tx side.
Add API to handle invalid peers and pass them to umac.

Change-Id: Ie8c2508e4f51c7d6969c9eb6439919c57dd427d4
CRs-Fixed: 2008205
2017-04-03 14:38:51 -07:00
Pamidipati, Vijay
110bf96741 qcacmn: Fix size mismatch between dma_map and dma_unmap in Tx path
Change calls to qdf_dma_map_nbytes_single to qdf_dma_map to match with
qdf_dma_unmap used in tx completion path. Also fix the dma_addr value that is
passed to Tx HW; we were incorrectly subracting pkt_offset instead of just
subtracting alignment bytes from dma_addr

Change-Id: I2d6f32bd44e02824a1a788e3624dcb3680f1b242
CRs-Fixed: 2004658
2017-03-28 20:06:33 -07:00
Venkateswara Swamy Bandaru
a8d98c8f5e qcacmn: Fix incorrect meta header issue in mesh tx path
After updating the skb with meta header cache flush is not happening. This
is sending incorrect meta data to firmware. Fixed this by doing cache flush
after meta header updation in skb.

Change-Id: I0952093e3080f5b8ec2233e6ab1edf4f48351603
CRs-Fixed: 2003389
2017-03-28 20:06:31 -07:00
Ishank Jain
949674c4cb qcacmn: Add DSCP_TID changes for Lithium
Add command to set mapid for each VAP using:
iwpriv athX s_dscp_mapid  N

Add command to change tid values in PDEV maps using:
iwpriv wifiX s_dscp_tid_map <MAP_ID> <TOS> <TID>

Change-Id: I510a40e71ecec5c453dd2dff1b13fd5ebedbe98a
CRs-Fixed: 1108452
2017-03-21 22:01:27 -07:00
Ishank Jain
5122f8fc48 qcacmn: Enable TSO support for QCA8074/6290 DP
Add TSO support for transmit datapath of QCA8074/6290

Change-Id: Id7254859372aa43e3ed16f80c0240d1b78ae63cc
CRs-Fixed: 2004658
2017-03-17 00:36:45 -07:00
Ishank Jain
1e7401cbc7 qcacmn: Add Host Lithium Stats
Add per peer stats
Add support to update APSTATS
Change QDF_TRACE to DP_TRACE for improved readablility

Change-Id: I4be2adf2a1d7f978eb2961a544435d525c97923d
CRs-Fixed: 1114641
2017-03-16 20:03:16 -07:00
Venkateswara Swamy Bandaru
5caa83a44e qcacmn: Fix review comments(trivial) given previously
review comments give for 1779700 are addressed.

Change-Id: I1fb5321c2dbcf3ef987ee460c772e668e344e1fc
CRs-Fixed: 2003389
2017-03-13 01:28:32 -07:00
Ishank Jain
bc2d91f8f3 qcacmn: Add TxRx Statistics for Lithium datapath
Statistics can be displayed by issuing following commands

iwpriv ath0 txrx_fw_stats 3 /*Rx Rate Info*/
iwpriv ath0 txrx_fw_stats 6 /*Tx Rate Info*/
iwpriv ath0 txrx_fw_stats 8 /* print Tx stats */
iwpriv ath0 txrx_fw_stats 27 /*print Rx stats */

To reset the stats:
iwpriv ath0 txrx_fw_stats 9 /* clear all stats */

Change-Id: If4be2549f43403e71ef092c23b1cf14b35a2e5d4
CRs-Fixed: 1114641
2017-03-09 17:37:42 +05:30
Vijay Pamidipati
d61006cb6b qcacmn: Fix the offset for HAL Tx Rate stats and
enable stats by default

Add a WAR to not use macros from Hardware Header file.
Will be removed once it is fixed in Hardware header file.

Change-Id: I73152645c89813dd65c23d9060e8b6fad1d88678
CRs-Fixed: 1112381
2017-03-08 15:06:27 -08:00
Ishank Jain
2f81e9605e qcacmn: Increase size of MSDU EXT DESC
Size of MSDU Extension descriptor increased to accomodate HTT Meta data.

Change-Id: Iaaf87f2f184ec9f144501b9a508bf91d08cad791
CRs-Fixed: 1114769
2017-03-07 21:48:46 -08:00
Venkateswara Swamy Bandaru
3e5e077d52 qcacmn: Fix tx completion stats for mesh
Enabled tx completion stats for mesh vdev irrespective of process_tx_status
of soc.

Change-Id: I46b3550b6433b354ec89da3628668befe7e55f83
CRs-Fixed: 2003389
2017-03-06 02:57:48 -08:00
Venkateswara Swamy Bandaru
c64c862938 qcacmn: Add debug support for mesh
Added per packet prints for mesh both in tx and rx path for Mesh packets.

Change-Id: I4738cf682971962fe0b07cd9fb88f8586e123f89
CRs-Fixed: 2003389
2017-03-06 02:57:47 -08:00
Venkateswara Swamy Bandaru
3f62370e23 qcacmn: Add support for Mesh Tx path
Added mesh specific data path changes. Extract mesh meta header in the
packet and pass it to firmware. Fill tx completion stats and call upper layer
call back function incase external tx completion is registered.

Change-Id: Ic3c1c37b2f59b1a35e3cf00a4498342dc20427d2
CRs-Fixed: 2003389
2017-03-03 11:37:09 -08:00
Ravi Joshi
af9ace8358 qcacmn: Fix wlan_cfg file inclusion and remove duplicate static API
Due to issues in Kbuild wlan_cfg was included using relative path.
Also getting rid of a duplicate static function definition in
dp_peer.c.

Change-Id: Ie0883340a9143b739119f18c8871b4baa9787980
CRs-Fixed: 2005582
2017-03-01 19:01:51 -08:00
Ravi Joshi
1033363bad qcacmn: Add configuration to enable per-PDEV tx descriptor pool
Napier is using per-PDEV tx descriptor pool until per-VDEV tx
descriptor pools are enabled.

Change-Id: I7699547fd71dec392345a186b4c34135629cd783
CRs-Fixed: 2005582
2017-02-27 15:05:36 -08:00
Ravi Joshi
ab33d9bb8f qcacmn: Fix Tx completion handling by using pdev instead of vdev
The Tx completion is an asynchronous event from hardware that
cannot be synchronized with vdev deletion. This causes issues
in the datapath which attempts to use invalid vdev pointer
(if tx complete is received after vdev delete).

Change-Id: I8b27b3a59a3674214dcd45dc621b068f7253a6c6
CRs-Fixed: 2005584
2017-02-27 15:05:35 -08:00
Manoj Ekbote
6f56586d9a qcacmn: Add 1 to pdev_id for multi-radio
pdev id should be numbered as 1,2,3 for MAC 0,1,2 while
communicating with firmware.The pdev->pdev_id variable
holds 0,1,2 during init. Add 1 to the variable while
programming the ring metadata.

Change-Id: I2de7ef2c63d2bd59581d25ad2e45daaabdb579b6
2017-02-21 02:26:57 -08:00
Vijay Pamidipati
4d5d436e8a qcacmn: Add missing lock protection between DP Tx and Tx completions
Change-Id: I68dd5371688235c173a5bc6576601389146e0ecb
CRs-Fixed: 2004658
2017-02-17 10:35:25 -08:00
Debashis Dutt
af64522cc3 qcacmn: Add debug logging To Tx/Rx path
Add Tx completion status value to the logging
of Tx completions. In addition dump Rx meta-data
and first few bytes of Rx packet only on NAPIER
EMULATION platform. This is only to facilitate
faster debug from the logs, and will be disabled,
once we have more stability.

Change-Id: I69d9e2fd6ad32efe01b8e56f355db5ed6d4d2e70
CRs-Fixed: 1116939
2017-02-01 16:23:39 -08:00
Houston Hoffman
aa12e04bad qcacmn: noinline dp_tx_send_msdu_multiple when QDF_LOCK_STATS
When QDF_LOCK_STATS is enabled, dp_tx_send_msdu_multiple needs to
not be inlined to avoid an [-Werror=maybe-uninitialized] compilation error.

": error: 'msdu_info' may be used uninitialized in this function"

Change-Id: I46edc3e3f5fdc498cb31c4eab38c89f91def10ba
CRs-Fixed: 2000132
2017-01-31 18:53:14 -08:00
Venkateswara Swamy Bandaru
99075965f8 qcacmn: Add rawmode tx support for lithium
Added raw mode descriptor preparation support in tx path when packet is
in Interface configured in raw mode.

Change-Id: I3159bce9ec6f3cd86ccfb157c51d1cb5f6412b89
2017-01-19 15:07:45 -08:00
Jeff Johnson
755f261b0c qcacmn: Fix -Wmissing-prototypes in dp_tx.c
We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code in dp_tx.c that is generating warnings.  Fix
these warnings by making the following functions static:
	dp_tx_desc_release()
	dp_tx_prepare_htt_metadata()
	dp_tx_prepare_ext_desc()
	dp_tx_prepare_desc_single()
	dp_tx_prepare_desc()
	dp_tx_prepare_raw()
	dp_tx_hw_enqueue()
	dp_tx_classify_tid()
	dp_tx_send_msdu_single()
	dp_tx_send_msdu_multiple()
	dp_tx_prepare_sg()
	dp_tx_reinject_handler()
	dp_tx_inspect_handler()
	dp_tx_process_htt_completion()
	dp_tx_comp_process_desc()

Change-Id: I4d40b836af85ea3c3dbee0c11514e2c1d2e9c8cb
CRs-Fixed: 1108175
2017-01-09 09:55:29 -08:00
Vijay Pamidipati
5bcfa31ec4 qcacmn: Add support to process Tx completion status from WBM descriptor
Add HAL API to parse Tx completion statistics from WBM descriptor and
populate HAL Structure and a DP API to print the statistics per packet

CRs-Fixed: 1088985
Change-Id: Ic6e918aabdbd7743d8f640e0451070dc229c6f0d
2016-12-23 06:06:01 -08:00
Ankit Gupta
20e5958da3 qcacmn: Disable TQM bypass
Disable TQM_BYPASS_WAR flag from napier platform.

Change-Id: I0b17dad372204721058109b317389d4283e33a5c
CRs-Fixed: 1089685
2016-12-07 16:53:34 -08:00
Pamidipati, Vijay
b90a79ec7d qcacmn: Fix packet offset computation logic in Tx path
Fix the packet offset value filled in Tx descriptor.
Also fix a crash in Tx completion handler because of storing wrong
pointer in tx descriptor chain (next)

CRs-Fixed: 1088985
Change-Id: Ie2895700e0bb7e6f4b7b09a01da07a17d1c41160
2016-12-07 14:38:40 -08:00
Dhanashri Atre
10a93237e6 qcacmn: TQM bypass workaround
Enable the TQM bypass workaround.

CRs-Fixed: 1089685
Change-Id: I83859fdedd15ddd8784f9d6629d9a459a1d9c412
2016-11-26 13:35:32 -08:00
Leo Chang
5ea93a4527 qcacmn: wifi3 compile against cdp
Wifi 3.0 compile against cdp apis.
Make compilable against mobile code base.
selective hw common header include.

Change-Id: I051f917001c0d13c762d9cb5a3ec141cd278d0e7
CRs-fixed: 1075736
2016-11-17 19:13:03 -08:00
Pamidipati, Vijay
576bd154a2 qcacmn: Add Lithium DP Tx core functionality
Implement Lithium Core Tx Data Path, Tx HW descriptor processing
and Tx Completion Path (Processing of WBM Release Ring)

CRs-Fixed: 1073253
Change-Id: I11bebc49177398a157fcd161228859e2ef860402
2016-11-01 20:06:51 -07:00