Commit Graph

1150 Commits

Author SHA1 Message Date
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
Karunakar Dasineni
ed1de12085 qcacmn: Lithium data path WMI changes
WMI changes for rx reorder queue setup. Also enable addba/delba handlers.

Change-Id: I360673d7493264d2591ffe3ba2bb5c3afba47f84
2016-12-24 10:13:22 -08:00
Dustin Brown
e2e8dc2163 qcacmn: Add dummy bus suspend/resume ops for data path
Currently, suspend/resume fails because data path suspend/resume ops
are not set. Add dummy ops for data path bus suspend and bus resume,
that simply return success. Actual implementations will follow.

Change-Id: Ic43dd05e3bd9a017ae0321eebc5d816116206aaf
CRs-Fixed: 1104135
2016-12-22 15:31:59 -08:00
Pamidipati, Vijay
b31b6b1d49 qcacmn: Add peer_unref_delete CB to CDP
Add peer_unref_delete to CDP ol_if ops. This API is
used to update peer count in SCN radio structure in ol_if layer

CRs-Fixed: 1099955
Change-Id: Idb84cfda60e5a8f67f1e5eae0c3f1e85d73b566a
2016-12-22 15:29:57 -08:00
Vijay Pamidipati
88c40ff685 qcacmn: Delay DP Interrupt Poll timer start until a VAP is created
Do not start interrupt poll timer for processing datapath SRNG
interrupts till any VAP is created and is up.

CRs-Fixed: 1088985
Change-Id: I3a9d148024f66d824dc839bdf8b158c351fe22cd
2016-12-06 13:18:20 -08:00
Pamidipati, Vijay
692f00cfd6 qcacmn: Add missing fields needed for DP Interrupt timer poll
Add timer instance in dp_soc for interrupt poll, to function in
poll mode till interrupts are enabled

CRs-Fixed: 1088985
Change-Id: I0d3207fe143b30317618d78b927133c43a552ef6
2016-12-06 13:18:19 -08:00
Dhanashri Atre
6d90ef32d5 qcacmn: Separate peer object creation from other initialization
Seperate the dp peer object allocation from setting the peer's
default routing and default rx tid queues.

This change is to address a race condition where the HTT peer map
message arrives before the peer object is created.

Change-Id: Ibb0671d29ffac41fd06bb8a88476f37120d99ccb
CRs-Fixed: 1089662
2016-11-26 13:35:33 -08:00
Ravi Joshi
05d9e677a8 qcacmn: Enable timer based polling for DP rings
Enable timer based polling of the UMAC rings for Tx completion
and Rx. (Interrupts are not yet ready on UMAC rings).
(DP_INTR_POLL_BASED is defined through Kbuild)
Also define the polling timer as 100 ms.

Change-Id: I243f94c3d49a80005ef9eec8a9a6f03abc81870c
CRs-Fixed: 1074199
2016-11-26 13:35:31 -08:00
Dhanashri Atre
57e420d642 qcacmn: Pass the device to memory allocation and free
Pass the device instance to the QDF memory allocation and
free functions.

Change-Id: Ia6297e311cdca708b96c72fb50f8961cddc95d83
CRs-Fixed: 1087538
2016-11-21 15:20:03 -08:00
Nandha Kishore Easwaran
fd7832e906 qcacmn: Change CDP layer to include build flags
Making changes in cdp layer to include proper compilation
flags

Change-Id: I6d325386f2a6a2b01a900d0c525c7f30aa128e47
Crs-fixed: 1075597
2016-11-21 13:07:31 -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
Vijay Pamidipati
b775e13093 qcacmn: Add top-level interrupt handling support for DP
Add support for initialization of Lithium Datapath interrupts
and top-level interrupt handler for Datapath interrupts

CRs-Fixed: 1073253
Change-Id: I690d914221cf8a6d2ffdeb25785b1d534f56dfe7
2016-11-01 20:06:53 -07:00
Vijay Pamidipati
d41d6d6a49 qcacmn: Add configuration interace for Lithium Datapath
Add a generic framework (wlan_cfg) for all configuration parameters
(eg.number of tx/rx rings) used by DP. Define all the parameters
as macro constants. We will later enhance wlan_cfg framework to
read these parameters from device tree file or ini file and populate
in DP config structures.

CRs-Fixed: 1073253
Change-Id: I7e4ddadb64006d17399acb68f92cf17fe23a98e2
2016-11-01 20:06:52 -07: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
Dhanashri Atre
7351d17b41 qcacmn: MCL Buffer Replenishment
Add support for replenishing the rx buffers using the host to
firmware buffer ring.

This includes adding a flag QCA_HOST2FW_RXBUF_RING:
When QCA_HOST2FW_RXBUF_RING is enabled the host will do the following:
- Allocate the refill buffer ring (HTT_HOST1_TO_FW_RXBUF_RING) and
populate it with
 rx buffers
- Send the refill buffer ring configuration to the firmware
- Allocate the rx DMA ring (HTT_RXDMA_HOST_BUF_RING), leave it empty.
- Send the rx DMA ring configuration to the firmware

When QCA_HOST2FW_RXBUF_RING is disabled, the host will do the following:
- Allocate the rx DMA ring (HTT_RXDMA_HOST_BUF_RING), and populate it with
 rx buffers
- Send the rx DMA ring configuration to the firmware

CRs-Fixed: 1074199
Change-Id: Iec05a973cd9d628c742e3aaa16b8dabc7797625d
2016-10-28 05:21:59 -07:00
Karunakar Dasineni
9b814ce7e5 qcacmn: Lithium data path initialization
1. Intial version of Lithium data path initialization
2. HAL changes for REO and WBM setup

Change-Id: I52f638faf6e60c2a932acc3c76788bf8946c30db
2016-10-27 15:21:45 -07:00