Граф коммитов

77 Коммитов

Автор SHA1 Сообщение Дата
Manoj Ekbote
46c03169ba qcacmn: Use correct offset for rx ring id
MAC id is needed to retrieve the ring id during srng
setup.

Change-Id: I42bb8db997df1e3540ba61cdc770e4e7810d10c4
2017-02-27 23:27:21 -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
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
Venkateswara Swamy Bandaru
9fac863f73 qcacmn: Fix for kernel panic in rx path
Add Null check for peer before accessing the structure.

Change-Id: Ic1b6e0c3a7a9aeecbc9aa9cc4a118e27726d94f2
CRs-Fixed: 2010214
2017-02-23 04:18:50 -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
Tallapragada Kalyan
1b4d08d6bb qcacmn: Add support to print MCS rate, SGI & TID
Add RX HAL APIs to retrieve the mcs, sgi & tid info
from the rx TLV headers and display them on per packet
basis.

Change-Id: Ic6ced3ad0728183437014c0e6c2a8afbdbead1c2
CRs-Fixed: 1101961
2017-02-22 23:42:40 -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
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
Tallapragada Kalyan
e7d51ef086 qcacmn: restore peer meta_data across msdus of A-MSDU
peer meta-data is copied across TLVs of individual MSDUs
of A-MSDU, This has to be saved and used till last msdu
of the MPDU.

Change-Id: Id30938eebd8f98716bf9625553aea2cd774104d0
CRs-Fixed: 2002766
2017-02-17 16:45:55 -08:00
Tallapragada Kalyan
4e3341aa2a qcacmn: RX nbuf allocation from phy addr 0x50000000 and above for x86
We should always ensure memory allocation for rx nbufs
should always happen from phy address 0x50000000 and above
else drop the nbuf and try for a new nbuf.

Change-Id: I675a0f1289e04f720949ad9b6917bbb733270a78
CRs-Fixed: 2003174
2017-02-17 15:57:41 -08:00
Tallapragada Kalyan
3549b43aab qcacmn: Drop pkts with same source MAC addr as BSS peer
Drop packets received with source mac address which match
BSS-peer MAC address

Change-Id: Ia89bdef8c747856e6eb0ade5946f2109aa6ee106
CRs-Fixed: 2003187
2017-02-17 11:13:14 -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
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
Nandha Kishore Easwaran
fb0a7e5c26 qcacmn: Change return type of get_vdev_rx_decap_type
Change the return type of get_vdev_rx_decap_type to htt_cmn_pkt_type
which is defined inside the cdp_if layer.

Change-Id: Ie931952e3618f8e52a5b8839648a0516132ede1f
CRs-fixed: 1075597
2017-02-08 04:01:58 -08:00
Dhanashri Atre
bda02dc9c2 qcacmn: Fix rx packet queue processsing
- Ensure the head and tail pointers are reset after
processing the packets on each vdev
- Ensure the network buffer is null terminated when
processing the null queue

Change-Id: I7bfab46b7fc6054e782f7f1fc09dd56a58e46a4d
CRs-Fixed: 2001835
2017-02-02 20:09:41 -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
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
Dhanashri Atre
8b3f377928 qcacmn: Null terminate the rx packets list
Add NULL termination to the list of rx frames
before passing them to the high level OS.

Change-Id: Ibc51f14b8b9ef2a8dff7147f4072910e11540093
CRs-Fixed: 1116939
2017-02-01 16:23:37 -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
Krishna Kumaar Natarajan
1741dc4546 qcacmn: Disable freeing TID's hw queue descriptor in dp_rx_tid_delete_cb()
Disable freeing TID's hw queue descriptor in dp_rx_tid_delete_cb() as a
workaround to avoid OOPS error.

Change-Id: I6ab5f8590ec3ac434cf024b1eb735bff273fd330
CRs-Fixed: 1116647
2017-02-01 11:47:52 -08:00
Krishna Kumaar Natarajan
e61cf8776f qcacmn: Delete unused dp_rx_tid_stats_cb() function
Delete unused dp_rx_tid_stats_cb() function.

Change-Id: Ifc7d5c989a8e5b24aeada3a515a0bcc2a0b2860e
CRs-Fixed: 1116647
2017-02-01 11:47:51 -08:00
Karunakar Dasineni
a8c779b2d1 qcacmn: Fix REO command issues
Fixes for issues seen while sending multiple REO commands:
- Fix bug in error return from hal_reo API.
- REO status for updates done as part of peer deletion are sometimes
  received after peer is deleted, causing crash due to invalid access
  in REO command status handler. Fixed by using temporary copies for
  rx_tid structures.
- Zero out REO command descriptors before setting up new commands.

Change-Id: I63409eb74fd91a21e0264fb2b3a62efb3a91bfe6
2017-02-01 11:47:50 -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
Houston Hoffman
fc0a960b55 qcacmn: Handle allocation failure in dp_rx_buffers_replenish
Need to handle allocation failure when replenishing rx buffers.

Change-Id: Iad9fad5b14bd0f9599105e255689f8fa174b816d
CRs-Fixed: 2000138
2017-01-31 18:53:12 -08:00
Houston Hoffman
4a033e4afe qcacmn: Fix wmissing-prototype errors (dp_reo.c)
include dp_internal.h for its prototypes.

Change-Id: I0992d2b14d559a0e641ded52cc74e8fe2434c5e6
CRs-Fixed: 1115552
2017-01-24 20:15:50 -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
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
Karunakar Dasineni
e8380bbece qcacmn: REO descriptor changes
Disable CHK_2K_MODE and OOR_MODE in REO descriptor. Also set RTY bit for non-BA TID queues as temporary WAR for duplicate detection issue.

Change-Id: Ifa51c20ffbfe31c807d4e7f99014cb76f411e066
2017-01-19 12:46:37 -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
Venkata Sharath Chandra Manchala
8e8d8f1e82 qcacmn: Fix for compilation issues in REO management
Added suitable typecasting for qdf_set_bit and
qdf_clear_bit functions

Change-Id: I90fc0f441a6eae8dfdea43705373fced81b26b48
CRs-Fixed: 1105853
2017-01-18 20:05:32 -08:00
Dhanashri Atre
a98e024f86 qcacmn: Change due to R102 hardware headers for QCA6290
Changes needed to support the new definitions introduced
in the R102 hardware header files for QCA6290.

Change-Id: I4e3c27dfdc48b4d6a44f0f50f3e4a907be20e53d
CRs-Fixed: 1105853
2017-01-18 20:05:31 -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
8a4fd9bec1 qcacmn: Fix -Wmissing-prototypes in dp_rx_err.c
We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code in dp_rx_err.c that is generating warnings.
Fix these warnings by making the following functions static:
	dp_rx_frag_handle()
	dp_rx_pn_error_handle()
	dp_rx_2k_jump_handle()
	dp_rx_null_q_desc_handle()

Change-Id: I45108fff8f69194b28391eebb5e079149ae5cc5a
CRs-Fixed: 1108176
2017-01-18 09:40:10 -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
Jeff Johnson
416168bfaf qcacmn: Fix -Wmissing-prototypes in dp_peer.c
We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code in dp_peer.c that is generating warnings.  Fix
these warnings by making the following functions static:
	dp_peer_find_hash_find()
	dp_rx_tid_update_wifi3()
	dp_rx_tid_delete_cb()
	dp_rx_tid_delete_wifi3()

And by exporting a public prototype for:
	dp_peer_find_hash_erase()

Change-Id: I5c945f27c0334a4d88da6136de8aacae2ba840a7
CRs-Fixed: 1108459
2017-01-12 07:11:56 -08:00
Tallapragada Kalyan
603c594e45 qcacmn: DP RX optimization changes
Added a separate loop to dequeue the rx pkts and relinquish
REO and rx-Refill ring faster. Additionl rx processing is
moved to a different per vdev loop.

CRs-Fixed: 1098453
Change-Id: I43b1fa302cf7e7c77f6114ea491306c0b724e365
2017-01-10 11:47:43 -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
Jeff Johnson
32140745b1 qcacmn: Make dp_htt_h2t_send_complete() static
Since dp_htt_h2t_send_complete() is only accessed from within
dp_htt.c, and since there is not a public prototype, make it static.

Change-Id: I002ac20d0e5ced8ddc9d5099a987a5ce208b4cfc
CRs-Fixed: 1108111
2017-01-09 09:55:26 -08:00
Jeff Johnson
2cb8fc7e18 qcacmn: Properly export dp_peer API
Currently some of the public functions in dp_peer.c do not have their
prototypes exposed in a header file. In addition clients of these
functions currently have local prototypes. Fix these issues by adding
the prototypes to dp_peer.h.

Change-Id: I461cf69024da56fad57b75a325775ecd68872c8e
CRs-Fixed: 1108085
2017-01-09 09:55:25 -08:00
Ankit Gupta
6fb389b4e4 qcacmn: Check peer for null before dereference
Check for peer null check before dereference in
dp_peer_state_update to update its state.

Change-Id: Id3b743d6cbe3d156a48ad111e467579b7478e4bb
CRs-Fixed: 1107176
2017-01-04 12:21:05 -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