Commit Graph

1065 Commits

Author SHA1 Message Date
Dhanashri Atre
0da3122669 qcacmn: Lithium LRO Support in the Data Path
Add support to extract LRO information provided by
the hardware and utilize the support provided by QDF to
perform LRO.

Change-Id: I00a26573a450e9c32586b3d5fb656dbfe802cfac
CRs-Fixed: 1107169
2017-04-17 14:52:18 -07:00
Venkata Sharath Chandra Manchala
65bf2306f0 qcacmn: Fix memory leak for soc handle
Free the allocated memory for soc handle
in dp_soc_detach_wifi3

Change-Id: I555b9a7493338d064f2472704e24a5625800d081
CRs-Fixed: 2017582
2017-04-17 14:11:58 -07:00
Venkateswara Swamy Bandaru
19dc8b23a6 qcacmn: Fix to configure external group interrupts
After configuting the external group interrpts called configuring api
to configure external group interrupts.

Change-Id: I9db8c9dc941421fa05676be732147929be24b0e6
CRs-Fixed: 2018655
2017-04-14 11:50:32 -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
Tallapragada Kalyan
fd1edcc084 qcacmn: Add support for radio-based packet steering
packets received on a particular radio are queued to
a user configured reo destination ring.

Change-Id: I080090f22b80fd8d8868df4145b82888e1111cea
CRs-Fixed: 2017081
2017-04-12 04:42:35 -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
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
Pramod Simha
6b23f75bf8 qcacmn: Fix for unaligned memory access
Fix the logic to align a memory to the given boundary
and dma map the alinged address to the device.

Change-Id: I5cce07d5573949ab40f64cc08c937dfb7aa82b8e
CRs-Fixed: 2026493
2017-04-04 16:14:51 -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
Dhanashri Atre
398935eb56 qcacmn: Fix the null check before invoking function
Fix the logic that verifies that the dbs function pointer
in data path is valid.

Change-Id: I35418f2a66eb2d4b44260b005ab0d927d91eeac7
CRs-Fixed: 2025317
2017-04-03 13:45:57 -07:00
Karunakar Dasineni
1d891ed8d3 qcacmn: Fix for datapath latency issues
Reduce DP poll interval to 10ms and change per-packet prints in Rx path to debug level.
Also fixed HAL macros used to setup Rx buffer descriptors.

Change-Id: I112393a3f021b275dbe9da9df9c1bac584a96f3f
CRs-Fixed: 2026389
2017-03-31 14:50:19 -07:00
Dhanashri Atre
2c6381da6b qcacmn: Add null check before invoking function
Verify that the dbs function pointer in data path is valid.

Change-Id: I2add5cf3b58ef52240d9cda01220ba444b7716ad
CRs-Fixed: 2025317
2017-03-31 12:05:50 -07:00
Tallapragada
57d866024a qcacmn: fix crash found in intrabss-forwarding
We are zeroing out complete peer structure after
initialing ast_entry queue. so re-adjusted code.
Also wds source port learning is called before we
pull the TLVs from the nbuf resulting in accessing
wrong src mac address.

Change-Id: Ifd5a2056a3f9f03a1ff1cf5b79046f932dd38510
2017-03-31 05:54:35 -07:00
Dhanashri Atre
b178eb464d qcacmn: Initialize LRO and rx hash during vdev attach
We need to send the LRO and rx hash configuration to the
firmware during vdev attach. Currently they are being incorrectly
sent before WMI service ready indication.

Change-Id: I69680b48e6725c6deaad434d722546052cfe86b4
CRs-Fixed: 2022770
2017-03-30 14:53:31 -07:00
Kai Chen
6eca1a62da qcacmn: Monitor mode configuration and processing
This change is for supporting monitor mode VAP.  All the monitor mode ring
is configured. The related monitor mode ring includes:
-monitor mode buffer ring
-monitor mode destination ring
-monitor mode status ring
-monitor mode link descriptor ring
The packet is not sent to monitor mode ring unless the monitor mode VAP is
configured. This release support Multiple VAP - AP/STA VAP plus Monitor
VAP configuration. The status ring is not used in this release. However,
the ring is tested and the ring is moving and there are TLV's in the ring.

Change-Id: I782ee0c3b998d8b3bbac79b5e7fdecdbff15fa93
CRs-Fixed: 2013049
2017-03-29 05:58:52 -07:00
Venkata Sharath Chandra Manchala
87686d9a2f qcacmn: Fix for ampdu aggregation in host statistics
Ampdu count is populated in pdev
but zeroed before printing. Fix it to
be populated in peer and aggregated
in pdev before printing

Change-Id: I51d8f1968a87c0b9dbf53928acd1bbef45acc7ec
CRs-Fixed: 2025785
2017-03-28 11:03:06 -07:00
Tallapragada Kalyan
6f6166e36c qcacmn: Add support for intra-bss forwarding
pkts should be forwarded from one STA to another
STA belonging to same VAP from within the driver

Change-Id: I68eb0dd91f7ac54352b4882ffdb9d5d53d627db1

Conflicts:
	dp/wifi3.0/dp_rx.c
	dp/wifi3.0/dp_types.h

Conflicts:
	dp/wifi3.0/dp_rx.c

Change-Id: I68eb0dd91f7ac54352b4882ffdb9d5d53d627db1
2017-03-25 06:38:24 -07:00
Manikandan Mohan
e2fa8b7861 qcacmn: Setup CDP interface for flushing RX queue
Refactor flush rx queue function call based on soc by adding an
interface to CDP funtion indirection table.

Change-Id: Iea201553f555a6c317cf37e586433aa493e51623
CRs-fixed: 2023399
2017-03-24 19:01:10 -07:00
Karunakar Dasineni
7957fa9705 qcacmn: REO descriptor allocation change
Use normal allocation instead of alloc_consistent for REO descriptors to
allow freeing from interrupt context.
Also fixed an issue in ba_window_size setting in REO queues.

Change-Id: I91b06e04c0343eb7fe8580d8655c6bc5e33cfe06
2017-03-24 05:41:20 -07:00
Venkata Sharath Chandra Manchala
a77da0da85 qcacmn: Txrx statistics for Lithium datapath
Introduce a new iwpriv command txrx_stats to
print host and firmware statistics for lithium
chipset

Change-Id: Ib048c64f903c7a97508f8b03bebe7f7c1d9e6c05
CRs-Fixed: 2017426
2017-03-22 09:50:29 -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
Kiran Venkatappa
9edb9614d9 qcacmn: Send osif_pdev in peer_unref handler
peer count is maintained per pdev. Pass osif_pdev instead of osif_soc in
peer_unref handler.

Change-Id: Idc17e63a9a12562cd15aa4527e4aa6db08586690
2017-03-16 20:42:20 -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
Dhanashri Atre
1404917b6e qcacmn: Add support for hash based rx steering
This change includes:
- Adding the hooks to send LRO and hash configuration to the firmware
- Configuring the REO remap registers

Change-Id: I6d83e2a2365647f2c7a6440bd1d4b42fa7df7eff
CRs-Fixed: 1094775
2017-03-13 14:01:49 -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
Ravi Joshi
86e9826f04 qcacmn: Fix interrupt handling after pdev deinit
The interrupt polling timer needs to be disabled when the host
device driver decides to unload. Not handling this would cause
in processing of pending interrupts and access data structures
that are being deinitialized causing system instability.

Change-Id: I505281f36f90bef6e1fbf21a5461260272f7c7cb
CRs-Fixed: 2013609
2017-03-09 01:59:17 -08:00
Venkateswara Swamy Bandaru
ec4f8e61c6 qcacmn: Add support for Mesh Rx filters
Added support to filter out received packets on mesh vap based on
rx filter setting.

Change-Id: Ibc541324d928a9d006531c8908f4792e0c7d854e
CRs-Fixed: 2003389
2017-03-08 08:24:49 -08:00
Kiran Venkatappa
5dba3a3f9a qcacmn: Fix init failure and DP detach crash
Skip free of nbuf with physical address less than 0x50000000. This will
ensure that same buffer is not getting allocated again resulting longer
DP init time and affecting WMI init sequence. And use correct pointer
in pdev detach function.

Change-Id: Iaab70c92adef741d5f20115cba164bcd7718886b
CRs-Fixed: 2013500
2017-03-05 21:38:40 +05:30
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
Kalyan Tallapragada
277f45e2b1 qcacmn: Add support to handle RAW packets in RX path
API to handle pkts received on vdev which has RAW mode
enabled. Currently supports only MPDU with single MSDU.

Change-Id: Ife00699646bd97c5de0021fc32db434a544058f6
CRs-Fixed: 1111781
2017-02-23 14:05:53 -08:00
Karunakar Dasineni
8bebb003a4 qcacmn: WAR for REO queue deletion race with HW
Defer freeing of REO queue descriptors to avoid corruption due to possible cache
flush by REO HW of the queue descriptors that are already removed from a peer.

Change-Id: I4b5ef8ef4fe6a11f5faef4f1f14ce27de77768e0
2017-02-23 00:27:29 -08:00
Karunakar Dasineni
d0ea21f109 qcacmn: WBM ring changes to fix stability issues
1. Increased the sizes of following SRNGs used by WBM and also added max size
check in SRNG setup:
-idle link descriptor ring
-Tx completion ring
-Rx release ing

2. As per HW team, TP_ADDR and HP_ADDR for Idle link ring should remain 0 to avoid
some WBM stability issues. Remote head/tail pointers are not required since
this ring is completly managed by WBM HW

Change-Id: I93d70a287329dfeb08fcfb6b04306d65776b4834
2017-02-23 00:27:27 -08:00
Venkateswara Swamy Bandaru
9748234151 qcacmn: Add cdp support for external tx completion for mesh mode
Added cdp support for external tx completion. In case of mesh mode per
packet tx completion stats has to be filled in the meta header and external
function has to be called for updating these stats. It is the responsibility
of external function to free the buffer after reading the stats

Change-Id: I45ba800acf9b4d6091cc3f9aafc67c1f1f00f379
CRs-Fixed: 2003389
2017-02-20 02:38:25 -08:00
Venkata Sharath Chandra Manchala
f2a125a6f8 qcacmn: Handle void pointer declarations for pdev and vdev
Replace void pointer handles for pdev and vdev with
abstract structure handles in cdp.
New file cdp_txrx_handle.h has the abstract
structure declarations.

Change-Id: I333e6ea5e699e7cebbfc6281faf7f07c0aee4e2a
CRs-Fixed: 1109835
2017-02-15 12:26:39 -08:00
Manoj Ekbote
1f2c0b5242 qcacmn: Use osif_pdev for peer operations
Use correct scn handle for peer operations

Change-Id: I84e8ed945ead612b2ae4adb580ad7f12ffbb8ce5
2017-02-15 00:43:13 -08:00
Dhanashri Atre
2ea8c0fe00 qcacmn: Ensure the mac id sent to firmware starts at 1
Firmware expects the following:
- mac id for the refill ring configuration should be 0 (soc)
- mac id for the rx dma rings should be 1, 2 (mac 0 and mac 1)

Change-Id: I23c652e2e1f8e2fca69647906321e4d867a42609
CRs-Fixed: 2003050
2017-02-10 01:24:00 -08:00
Vijay Pamidipati
da0611616d qcacmn: Synchronize VDEV_DELETE and VDEV_DOWN with peer delete response
Hold additional reference to BSS node during node allocation, and free
it in delete response. This ensures BSS Node Freed event is sent to MLME
only after receving peer delete response for BSS node.

Change-Id: I384eac54f437000a1c09eb53751ad8b8e26617ad
CRs-Fixed: 1112381
2017-02-09 15:50:08 -08:00
Dhanashri Atre
d4032abf27 qcacmn: Support for configuring 2nd MAC
Add support to configure the second LMAC ring
which is needed for DBS.

Change-Id: Idb055621d174c994e267dc6dcca2bc798ae79bfc
CRs-Fixed: 1116939
2017-02-01 16:23:38 -08:00
Krishna Kumaar Natarajan
d684ba2f05 qcacmn: Update dp_peer structure to store qdf timers to detect DOS attack
Update dp_peer structure to store qdf timers to detect DOS attack. Following
driver ops are registerd to access the dp peer information
    - last_assoc_received
    - last_disassoc_received
    - last_deaauth_received
    - clear_peer

Change-Id: I21a3f4e5ab626e62f58f307d02640b7d96c9b1ef
CRs-Fixed: 1116647
2017-02-01 12:58:15 -08:00
Krishna Kumaar Natarajan
71e5b83377 qcacmn: Fix peer ref_cnt usage and add logs for the same
Enable logs to print peer ref_cnt and decrement ref_cnt
in helper functions.

Change-Id: I6e6a275fba35003011095d93c79d7a052d5ec56e
CRs-Fixed: 1116647
2017-02-01 11:47:54 -08:00
Krishna Kumaar Natarajan
604fe16cc0 qcacmn: Update peer delete sequence in dp_peer_delete_wifi3()
Update peer delete sequence in dp_peer_delete_wifi3(). Currently
local peer id is freed and peer_info_spinlock is destroyed after peer
is deleted. This is resulting in OOPS error. Call dp_unref_peer_delete
only after cleaning other peer information.

Change-Id: I58cd7114d07c7d7addc941e8509661f050c23a9c
CRs-Fixed: 1116647
2017-02-01 11:47:53 -08:00
Venkateswara Swamy Bandaru
bfbef4f48d qcacmn: Add rawmode simulation support in cdp interface
Added rx simulation decap function interface to do simulation decap.

Change-Id: I8ae3fceeec0f6ca08d7d2857c2d017dbbdafbb85
2017-01-19 15:07:43 -08:00
Ishank Jain
2fab33dcd4 qcacmn: Fix to make ping work on Hawkeye emulation(64 bit)
Change RXDMA_BUF_RING_SIZE to 2048
Change RXDMA_MONITOR_BUF_RING_SIZE to 2048

Change-Id: I1dee076e8e92259ffa43d2625a2dce0a94eb3164
CRs-Fixed: 1108439
2017-01-19 12:46:36 -08:00
Karunakar Dasineni
a0f09eae1d qcacmn: REO management changes
Changes to use REO HW command/status interface to update/delete REO queues.

Change-Id: I3500d45db021ef314b4d03fa878314d407ddfe65
2017-01-18 20:05:29 -08:00
Manoj Ekbote
4f0c6b1732 qcacmn: REO command access APIs
Implementation of APIs for Lithium REO command/status rings

Change-Id: Ib428dd995bd597f7fbfbfc458dade6e7e258000c
2017-01-18 20:05:28 -08:00
Jeff Johnson
0771857b80 qcacmn: Add WAR for dp_soc_attach_wifi3 -Wmissing-prototypes
Currently dp_main.c generates warnings when compiled with the GCC
-Wmissing-prototypes switch because it does not include a header file
which exports a prototype for dp_soc_attach_wifi3(). Currently the "dp
soc attach" APIs are defined in a strange manner, and there is not a
prototype which dp_main.c can include. So as a WAR define the
prototype internal to dp_main.c itself.

Of course the whole point of -Wmissing-prototypes is to prevent
mismatches between callers of an interface and the implementation of
an interface, and this WAR explicitly bypasses that protection. This
WAR should be superceded in the future by a proper registration
mechanism where the architecture-specific DP implementation attaches
to the Converged Data Path (CDP).

Change-Id: I1858ac4ec9f53c28cde622a43a3adb8643328916
CRs-Fixed: 1110197
2017-01-12 07:12:00 -08:00
Jeff Johnson
f135257ccb qcacmn: Fix -Wmissing-prototypes in dp_main.c
We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code in dp_main.c that is generating warnings.  Fix
these warnings by making all functions static that are only referenced
internally to dp_main.c.

Change-Id: If22f66ecdc3dbf4e91dbd32bb0e994a281d729e9
CRs-Fixed: 1110193
2017-01-12 07:11:58 -08:00
Tallapragada Kalyan
1ef5480ea4 qcacmn: Added support to handle NULL Q descriptors
The MC BC packets cause a NULL REO queue descriptor exception,
and hence are directed to the ring that is configured to receive
this exception from REO. As of now, this error is directed to
WBM release ring. Add handling to pass these packets to stack
instead of dropping them, when received on the WBM release ring.

Note that, the final fix may be route these to REO exception ring
from which the driver may need to pass them to stack.

CRs-Fixed: 1098153
Change-Id: If544911e7882a9f5e7dbffa5ef705618e9fcbbda
2016-12-29 01:48:29 -08:00