Commit Graph

15 Commits

Author SHA1 Message Date
gaurank kathpalia
6e4b9c54b6 qcacmn: Add support for src, dest in scheduler
Currently the scheduler is unaware of the source module
which posts the message to another layer.

To trace the src, dest, and the message under ML
logging, modify current infra, to include the src,
dest in the qip argument of the API
scheduler_post_msg_by_priority

Change-Id: Ia234f60cc33fcc37ab741c462052a6e50993e3bd
CRs-Fixed: 2300537
2018-08-23 15:25:42 -07:00
Vignesh Viswanathan
87a8e44583 qcacmn: Drop beacon/probe frames posted on Scan Queue if queue is full
Drop beacon/probe frames before posting on Scan queue if the queue
already has too many beacon/probes to process.

Also add scheduler API to get the queue size given the module ID.

Change-Id: I9153c7e77e74377863774b68e8163839e992358d
CRs-Fixed: 2298584
2018-08-21 01:51:29 -07:00
Dustin Brown
92d87f5161 qcacmn: Remove SYS_MSG_ID_MC_THR_PROBE
SYS_MSG_ID_MC_THR_PROBE is no longer used. Remove it from scheduler.

Change-Id: I23504da35778a54404e57df27ff4fa9100fa0cf3
CRs-Fixed: 2250404
2018-06-05 15:57:50 -07:00
Dustin Brown
c7ee85c4a8 qcacmn: Use qdf_flex_mem for scheduler messages
Currently, the scheduler thread keeps a large, pre-allocated array of
messages for use in message posting. The vast majority of the time,
however, the scheduler thread has zero or one messages pending in the
queue. This leads to a huge memory overhead for nominal driver
operation.

Replace the current pre-allocated scheduler message pool with a
hybrid static/dynamic approach.

Change-Id: Ie942bacfef43edf142a9f35ad0309069096cda90
CRs-Fixed: 2204172
2018-05-21 21:48:10 -07:00
Jeff Johnson
4865edfd19 qcacmn: scheduler: Fix misspelling of "message"
Address the following issue in scheduler_api.h:
CHECK: 'mesage' may be misspelled - perhaps 'message'?

Change-Id: Iaf5138f335be1dad2db2e3c52ffd47e28da21251
CRs-Fixed: 2241581
2018-05-19 19:40:36 -07:00
Vignesh Viswanathan
6ecd284e5a qcacmn: Add handlers for scan queue in scheduler core
Add scheduler message handler function for QDF_MODULE_ID_SCAN queue.

Also post scan beacon/probe frames and scan events to SCAN queue instead
of TARGET_IF queue.

Change-Id: I94e3ea2f0eb5c9592f5cfcd91738778fa65ba815
CRs-Fixed: 2214554
2018-04-23 00:30:55 -07:00
Vivek
f227fb7417 qcacmn: Reduce the number of scheduler message buffers for WIN
Reduced the number of scheduler message buffers for WIN to
2k from 4k since WIN is only using 2 scheduler queues.

Changed the order of two members of scheduler messgae structure
to avoid additional padding on 64bit platform.

Change-Id: Ic74d60878867c45413bc4fbd5c56feb4dd421699
CRs-Fixed: 2157621
2018-01-09 06:12:44 -08:00
Dustin Brown
e0c9f6699f qcacmn: split scheduler init/deinit
A commonly used and robust life-cycle pattern consists of the following
4 steps:

	1) create (allocate resources)
	2) start (mark resources as safe for use)
	3) stop (mark resources as unsafe for use)
	4) destroy (deallocate resources)

This pattern effectively prevents access to uninitialized and freed
resources. While the dispatcher psoc life-cycle follows this pattern,
the global life-cycle is condensed into steps 1 and 4. Unsurprisingly,
this led to uninitialized and freed resource access problems, especially
in regards to the scheduler thread.

Split the scheduler init and deinit life-cycle functions into init,
enable, disable, and deinit. Create new global enable and disable
dispatcher functions, and call the new scheduler APIs as appropriate.
This brings the global dispatcher life-cycle in line with the existing
psoc life-cycle, and prevents many scheduler related resource access
issues.

Change-Id: I58b65be0611f48e48354f28c221185f6f490f30c
CRs-Fixed: 2153283
2017-12-15 05:25:35 -08:00
Naveen Rawat
c3b7a68d54 qcacmn: Add SYS_MSG_ID_UMAC_STOP system message
Add SYS_MSG_ID_UMAC_STOP to allow umac close to be done in
mc thread context.

Change-Id: I11946ce7aa21ce96f71d604244b9981dcae9704a
CRs-Fixed: 2156189
2017-12-15 03:42:16 -08:00
Poddar, Siddarth
5c57a8905e qcacmn: Add register/deregister data stall detect cb api
Add register and deregister data stall detect callback apis.

Change-Id: I59d5871b7ec03da4b4f69d87b14f7eb5e8606c4a
CRs-Fixed: 2090654
2017-10-06 12:27:19 -07:00
Jeff Johnson
9b24afb720 qcacmn: Remove obsolete START and STOP SYS_MSG_IDs
The SYS_MSG_ID_MC_START and SYS_MSG_ID_MC_STOP message IDs are no
longer being used. so remove them.

Change-Id: I8d35a537ac2c2f7436b23033561e5d0ef09895df
CRs-Fixed: 2107075
2017-09-12 23:27:33 -07:00
Rajeev Kumar
e7e6e37448 qcacmn: Properly format new line spacing in scheduler_api.h
In scheudler_api.h properly format new line spacing between functions
and include files.

Change-Id: I7960ea7aeec3aef9c50a4a39efcd9db4d6f3951f
CRs-Fixed: 2051329
2017-05-30 17:31:20 -07:00
Rajeev Kumar
928e3ecad0 qcacmn: Add provision for flush callback in scheduler message
Add provision for flush callback in scheduler message such that
during driver unload scheduler can invoke the flush callback and
components can release the common object ref count which is taken
before posting the message.

Change-Id: I28490e18247239af27feef3a4b53e5080ab012fc
CRs-Fixed: 2034772
2017-04-18 17:13:14 -07:00
Krunal Soni
dce49ecf59 qcacmn: Deregister legacy & target queue callbacks upon scheduler down
Driver is missing couple of deregister handler while bringing down the
scheduler.

Change-Id: I99fe6e9a5d3cac800154945e41e707ebb7ee6396
CRs-Fixed: 2001133
2017-02-07 15:02:27 -08:00
Rajeev Kumar
cd39549564 qcacmn: Rename control path scheduler from sch to scheduler
Legacy protocol engine already has a module name 'sch' rename
control path scheduler from sch to scheduler to avoid naming
conflict with protocol sch.

Change-Id: I94ce9aa5037aa75319aaad2287116462444c03f4
CRs-Fixed: 1105115
2016-12-27 16:37:34 -08:00