Adding additional flag for commands which has been marked
for activation and for which cancel has been received.
After the commands marked for activation and also marked for cancel
really gets active, we remove the command from the active queue.
Change-Id: I5eb42459e216ad8cbcee15ce9a7572dec7f776a2
CRs-Fixed: 2326639
The movement of serialization non scan commands from pending to active
could be one or multiple commands, and it could be done by looking up
the vdev or pdev serialization non scan queues.
There were separate API's implemented for these movement
and activating the commands, moved to active queue as
part of the movement.
Implement a generic API for the movement of non scan commands from
pending to active, instead of having multiple API's either for either
single or multiple commands and do the lookup either from pdev
or vdev queues based on required checks.
Change-Id: I39864611cf019757e44f35d1e267458d35243cc2
CRs-Fixed: 2327461
This change provides support for unit testing the serialization module
using the test framework.
Change-Id: I62bc2e20120d5fa73b147aef84ad22c64c100706
CRs-Fixed: 2308317
With the new serialization code, the older instances of code,
where the queue traversal to find matching cmd was done
from the public API was replaced with wlan_serialization_find_cmd API.
However, there was an instance where the list traversal was done from
the public API and is now replaced with wlan_serialization_find_cmd API.
Change-Id: Idc37f2bdd52cedc578b30a71517c9e57453f25d0
CRs-Fixed: 2312992
In wlan_serialization_purge_cmd_list, driver stops the active cmd timer
and destroy it and thus in wlan_ser_cancel_non_scan_cmd as driver is
not able to get the timer the active cmd is not removed.
As wlan_ser_cancel_non_scan_cmd already takes care of the stopping and
destroying the timer and remove the logic from
wlan_serialization_purge_cmd_list.
Also update the active command bitmask and active/pending blocking
flags when an command is flushed.
Change-Id: Ie206f08920c2830c935d0aacb204dc4ee2676c91
CRs-Fixed: 2324890
When destry pdev, need release serialization active list if it
is not empty, but release pending list by mistake, assert will
happen.
Change-Id: I83be2cb512f3a832d03c0c33c8ea63243d745a54
CRs-Fixed: 2323512
Add qdf_platform source file to qdf/Kbuild and
clean-up WAR introduced in change
I8172f3dbe0716be24a4dda739afb49f94528a4f6
Change-Id: Icb76d53544590b8bcace275ef52870606fb5d826
The removal of blocking command from active non scan queue,
can result in movement of either single/multiple
blocking/non blocking commands from pending to active queue,
so the activation of new command(s) moved to active queue
as a result removal of blocking command, is done inside the
wlan_serialization_activate_multiple_cmd where the active
list is traversed and activated, which needs to be protected by the queue
lock to avoid concurrent access and updates to the cmds in the queue
from different contexts.
Change-Id: Ibf3034083d348ef7187bfac9cf2c540c748cd678
CRs-Fixed: 2317626
1. Keep serialization legacy api not broken.
Serialization enhancement have much changes on internal struct
and API, need re-implement serialization legacy APIs.
2. Set all cmds on MCL platform as blocking type.
MCL dones't support cmd concurrency on multi vdevs, while WIN need
it.
Change-Id: I5d5d6e0e16becb0b0f285fd8ed20982f2819659c
CRs-Fixed: 2315407
The serialization timers can be accessed from multiple contexts
when adding and removing commands to/from the serialization
queues. So the access to the serialization timers should be
atomic to protect the same timers being used for multiple
commands.
The serialization timers are maintained per psoc and are
protected with psoc timer locks.
Also the serialization lock APIs are updated to take the lock
object pointer as an argument
Change-Id: Ibdb41818fde9318fca6bbc92a536858364639365
CRs-Fixed: 2313039
The API wlan_serialization_is_active_cmd_allowed should used
when a serialization request is received and we need to decide
if a command can be moved to active queue or pending queue.
However when moving pending to active, the logic to move pending to
active is implemented in the function itself and is different from
what is implemented in wlan_serialization_is_active_cmd_allowed and thus
should not be used.
Change-Id: If04edf4a0012d9ae6cbbea9606b0e6b962f10b65
CRs-Fixed: 2312991
1. Split the serialization API's into the following files
1. serialization_api.c : Serialization public API's.
2. serialization_internal.c : Serialization internal API's.
3. serialization_queue.c : Serialization pdev/vdev queues API's.
4. serialization_main.c : Serialization object manager related API's.
5. serialization_utils.c : Serialization low level primitive API's.
2. Following files are not not used with new serialization
1. serialization_enqueue.c
2. serialization_dequeue.c
3. Using the new queue objects for pdev/vdev and component specific.
4. Implemented Locks for request, release and cancel APIs.
5. Removed locks for the lowest primitive queue API's
6. Timers executed in mc thread from MCL and timer context for WIN.
7. Allow cmds from multiple vdevs in parallel in non blocking mode.
Change-Id: I3cabcf512225331db46956ffad4ddab581c7e52b
CRs-Fixed: 2304513
-Add vdev identificaiton information to the
serialization command timeout log message.
-Trigger self recovery API instead of QDF_BUG.
Change-Id: Ic873a6acf5e4a5af95a4a28ffa2b32220a499263
CRs-Fixed: 2297487
Add per module logging macros without function/line info
to avoid adding function/line info where it is not required.
Change-Id: I34ba6f6485f9b506264daf4e116052d2858bed40
CRs-Fixed: 2278876
Map all enter/exit log macros to enter/exit QDF TRACE macro
to provide option to compile out enter/exit logs if required
Change-Id: I913ef0fb2486fde6b2ec4dfe8465884ca4d66ce4
CRs-Fixed: 2274857
The command eSmeCommandDelStaSession issues vdev delete to
firmware. As this command eSmeCommandDelStaSession is not
serialized, this may issue delete vdev before the peers for the
vdev are deleted, resulting in fw assert. Serialization
should be brought in for this command, so that first
eSmeCommandRoam command will do
vdev_stop-->remove_peer-->vdev_down and eSmeCommandDelStaSession
will be processed which will send vdev delete.
Post the command eSmeCommandDelStaSession to the serialization
module and WMA_DEL_STA_SELF_REQ will be posted from the sme
eSmeCommandDelStaSession handler.
Change-Id: I08f5db2d5034a29cd65929d218bf97b464447077
CRs-Fixed: 2280865
Map all module level log APIs to per-level log APIs
to compile out specific log level if required.
Change-Id: I4072b6740cb43200fd95c40943b66e1d5f8f1847
CRs-Fixed: 2266719
Serialization component's APIs may get called by various
component owners through different thread contexts. This makes
lock a mandatory requirement in order to prevent any shared data
corruption.
Implement abstract lock APIs within serialization component and
use them in all public serialization APIs which access various
command queues.
Protect the serialization list node by introducing a check for
the state of the node and check for the state before deleting
the node.
Change-Id: Ida74b2e958e37943f1ebedb854d5c35862813498
CRs-Fixed: 2226663
wlan_serialization_pdev_scan_status is used to check whether
there is scan cmd in active or pending list, don't need to
check details of each node in list.
While checking details of a node in list by wpa_supplicant,
the node may be removed by mc thread in race condition.
Change-Id: I019869c23ebb7d6e157babf5ad6eaf0668ff842a
CRs-Fixed: 2268619
P2P GO received deauth frame from p2p client and del_station is
received from userspace. As part of del_station FORCE_DEAUTH_STA
command is processed. Deauth frame is processed after this which
sends DEAUTH_IND to csr. Wm status change command is enqueued and
is not processed since there is already an active command. Cleanup
is done as part of del_station. Auth frame received is processed
and auth rsp is sent. Message is posted to lim on receiving assoc
req frame from p2p client. Wm status change command is processed
and DEAUTH_CNF msg is posted to lim. Assoc req frame is processed
and ASSOC_CNF is posted to lim. DEAUTH_CNF is processed before
ASSOC_CNF due to which sta_ds entry is removed. Assoc resp is
not transmitted as a result and p2p group formation fails.
Fix is to ignore deauth indication received when csr substate
is DEAUTH_REQ.
Change-Id: Ia1966a4cced3faf15605aeb3d69b8fafa2176c22
CRs-Fixed: 2269609
Address the following issues in the umac folder:
CHECK: 'defintions' may be misspelled - perhaps 'definitions'?
CHECK: 'destory' may be misspelled - perhaps 'destroy'?
CHECK: 'faild' may be misspelled - perhaps 'failed'?
CHECK: 'initilization' may be misspelled - perhaps 'initialization'?
CHECK: 'managment' may be misspelled - perhaps 'management'?
CHECK: 'muticast' may be misspelled - perhaps 'multicast'?
CHECK: 'ouput' may be misspelled - perhaps 'output'?
CHECK: 'segement' may be misspelled - perhaps 'segment'?
CHECK: 'successfull' may be misspelled - perhaps 'successful'?
CHECK: 'untill' may be misspelled - perhaps 'until'?
Change-Id: If60c276c134ef10ce6be26cd5a4036d53d5724b6
CRs-Fixed: 2241586
1. Enable scan command time out for all commands if not disabled
explicitly.
2. Remove QDF_BUG() for no serialization command buffers
Change-Id: I5357211ef6bc44f8ebd4b8acaa56a12f691fa46d
CRs-Fixed: 2175843
When serialization puts the command in active queue & activates
the command, it gives the callback to command owner as part of
the activation procedure. If this activation callback fails then
serialization suppose to give a callback to the owner to release
the memory.
There are some instances observed in legacy platforms where owner
releases the memory itself as part of activation callback failure
first and gets serialization callback as well to release the same
memory. These scenario creates "double free" or "memory
corruption" phenomena.
In order to avoid this scenario, add a sanity check to make sure
command still present in active queue and memory is not released
by command owner before calling callback to release the memory.
Change-Id: Ide341e3288aadd7d6e4441a5768118cd1439d38d
CRs-Fixed: 2161678
Loop through the active scan commands in the serialization
queue and find a match based on the scan ID provided. The API
wlan_serialization_get_scan_cmd_using_scan_id already exists
to achieve this. Move this API to wlan_serialization_api.c so
that it can be utilized by everyone as a public API.
Change-Id: If7250e1c994c728cd89f5d76db0023967027f12a
CRs-Fixed: 2169467
wlan_serialization_activate_cmd() always activates first command from
active queue which creates issue for scan command related operations.
This issue has been brought in through:
I8c63dd15d7ab8612a87950a3c189e73d1436c26a
When there are multiple scan commands put in to active queue,
wlan_serialization_activate_cmd() will keep pulling first command and
activates it.
Fix: Enhance wlan_serialization_activate_cmd() API to activate the
command which has been put in a active queue.
Change-Id: Id72449cbee81b65977070a8bbec8e417eb2bb655
CRs-Fixed: 2136142
wlan_serialization_timer can't be stopped before destroy it
always log: wlan_serialization_stop_timer: nothing to stop
No return in end of function
Change-Id: Ie40d8513ab5d7e84f21aebe720365d32b8205ea9
CRs-Fixed: 2133196
Issue description: When wlan_serialization_dequeue_cmd() gets called, it
will remove the command from active queue and try to move next pending
command from pending queue to active queue. But before it moves this
pending command to active queue completly, it calls the caller and
notify that command is activated through callback.
If that callback returns failure then serialization abandon the process
of moving it from pending to active. Now it again picks the same command
from pending and repeat the process. This creates unwanted recursion and
reference count mistakenly decremented multiple times.
Here is the recursion stack:
(a) wlan_serialization_move_pending_to_active()
(b) wlan_serialization_enqueue_cmd
(c) wlan_serialization_add_cmd_to_given_queue
(d) cmd_list->cmd.cmd_cb() fails
(e) wlan_serialization_put_back_to_global_list
(f) go back to (a) and repeat
Fix: Divide wlan_serialization_enqueue_cmd() API's logic in 2 parts.
1) Enqueue the command first through wlan_serialization_enqueue_cmd()
This ensures that command has been put in to given queue.
2) Once command has been put in to given queue and if this queue happen
to be active queue then activate the command through
wlan_serialization_activate_cmd()
Here is the stack after the fix:
(a) wlan_serialization_move_pending_to_active()
(b) wlan_serialization_enqueue_cmd
(c) wlan_serialization_add_cmd_to_given_queue
(d) returns WLAN_SER_CMD_ACTIVE or !WLAN_SER_CMD_ACTIVE
(a1) if (WLAN_SER_CMD_ACTIVE)
(b1) wlan_serialization_put_back_to_global_list() for pending cmd
(c1) wlan_serialization_activate_cmd()
(d1) if fail
(e1) wlan_serialization_put_back_to_global_list for active cmd
(f1) then repeat from (a)
(d2) if pass then return
(a2) if (!WLAN_SER_CMD_ACTIVE) then nothing to be done.
Change-Id: I8c63dd15d7ab8612a87950a3c189e73d1436c26a
CRs-Fixed: 2132975
Few of the serialization APIs are de-referencing the pointer without
checking it against NULL.
Add a NULL check before de-referencing it.
CRs-Fixed: 2130161
Change-Id: I109518332e593e1f32936404021db1db7a332df7
Fix serialization log to use proper module ID.
Replace QDF_MODULE_ID_HDD with QDF_MODULE_ID_SERIALIZATION.
Fix logging levels as per logging guidelines.
INFO_HIGH is not supposed to be used anymore.
Change-Id: I349254abc36565e5ba520d46588e5c3e27178ad9
CRs-Fixed: 2090993
Current wlan_serialization_cancel_request API cancels commands which
are in pending queue but it doesn't cancel command which are in active
queue.
Enhance the API to allow requester to cancel the commands from active
queue as well.
Change-Id: Id303c59cbb2a36f6c358f34b4885a0af66f5dac1
CRs-Fixed: 2123090
If serialization module has queued some commands for particular vdev
and if that vdev gets destroyed without informing serialization
module then upon those command timeout, serialization try to point
vdev pointer which is invalid. This situation create a crash.
If serialization module has some commands pending or active for vdev
which is being destroyed then remove those commands as part of vdev
destroyed notification.
CRs-Fixed: 2099063
Change-Id: I8df9900d83bea758ca5c50cbe0edf31e06f83a4c
Add an additional argument to wlan_serialization_comp_info_cb to pass
the vdev information while filling the information required to apply the
rules.
Change-Id: I44dadc01108e746fd2ce6353a90cdf9401dd6d06
CRs-Fixed: 2090987
Remove psoc/pdev locks from trivial API's. This follows the changes from
which the lock requirement from few simple APIs are removed.
Change-Id: Ib5769c2234c8d57f485c0eef5a4e3c61fa170508
CRs-Fixed: 2060880
Scan component provides API to check maximum scan
allowed. Replace all MAX_SCAN macros with API
Change-Id: I094b61978af015e5800784b90340e39aae94e7ba
CRs-Fixed: 2033852
In serialization timeout timer, do not free memory before removing the
cmd from serialization queue. Free only if command is not found in the
queue.
Change-Id: I775b4230f2cb558142a13cfe0a339f3a20a04a33
CRs-Fixed: 2029599
Fix passing NULL vdev object to object manager. Currently during unload
process, we are purging all the cmds in the cmd list. In this case
pointer vdev_id is passed as NULL since we wanted to clean up cmds
associated with all the vdevs. In wlan_serialization_purge_cmd_list()
vdev remains NULL in this scenario which results in an ASSERT in
wlan_objmgr_vdev_release_ref().
This change set will call wlan_objmgr_vdev_release_ref only if vdev is
not NULL.
Change-Id: I29a6114f4b5d9fcabe24b82f26defd8ab58cceec
CRs-Fixed: 2029580
Emulation being clocked at lowest rate,
SCAN and serialization timers are modified to handle
these scenarios
Change-Id: Ia937930483dbcd0268fd2fe2d0393e49f09b215f
CRs-Fixed: 2009490
Add dynamic rules registration callbacks which needs to be registered
by each component during its initialization phase.
These callbacks are used for serialization component to determine
whether serialization request can or can't be honored.
Change-Id: I02000426527bc7611cb9bb1d0ee26f3c03d9f2d1
This change defines WLAN_UMAC_COMP_WIFI_POS and WLAN_WIFI_POS_ID
to be used later by WIFI_POS component.
Change-Id: I70e35d45a9c7cbe72af91bb019e055699d61dd08
CRs-Fixed: 2003488
Rename wlan_serialization_legacy_mcl_api to
wlan_serialization_legacy_api for both header and c files
Change-Id: I94ed98c790a1f8f829fbc2de676dd3a0e9382b9d
CRs-Fixed: 2012863
In order to move old legacy to new mechanism, provide new serialization
APIs and message types.
CRs-Fixed: 2000032
Change-Id: Ifc0a54837ab85f1cc1156a5592f409c9e95ebd8e
The fix addresses following issues.
1) Add legacy SME ID in object manager reference debug id.
2) Add legacy SME message enum to serialization module.
3) Make cmd_id from uint16_t to uint32_t for compatiblity.
4) Adjust the cmd_type check as there are more cmd_types available.
5) Add some logging to make debugging easier.
6) Don't take the spin lock while iterating through pdevs
7) Add supporting APIs to check if command is present in queues
CRs-Fixed: 2000032
Change-Id: I43ed80c2a4d63940d8d6db29f1132373545cd4ab
By mistake, current serialization is passing component's command pointer
instead passing serialization's command pointer which leads to confusion
and incorrect behavior. Fix by passing correct parameters.
When serialization module's callback to activate the command fails, it
doesn't give callback to release the memory which will lead to memory
leak. Fix by calling release memory callback.
CRs-Fixed: 2000032
Change-Id: Ic08e00fd1a815674f54c16593baeb0dd6d14d033
Initialize rules callback handlers for different components,
Add serialization command processing logic, which calls
component info callback handler to get information about component
state. Component info then is passed to apply rules logic callback
to either deny or enqueue the serialization command
Change-Id: I59be9c5ee71e57fb5737558654222346bea4f1f8
CRs-Fixed: 2000032