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
Object manager's API definition has been changed which causes
compilation error in serialization module. Fix the compilation.
Change-Id: I89cd20c12579f927984ca4c94cf6155ea567b9d7
CRs-Fixed: 2000032
Provide the implementation to enqueue, dequeue, cancel,
remove, flush operation of command.
Change-Id: Id62cf320fa0936ed3ddb1264464d35ab5c60e95a
CRs-Fixed: 2000032
This change implements ref count mechanism, before accessing/storing object,
its ref count has to be incremented to avoid "use after free" scenarios.
1) Increments ref count of each object on its creation
2) Increments parent object on creation of child object (ex: on peer creation
vdev object ref count gets incremented)
3) On get_obj() API, caller will be returned object after incrementing ref cnt
Change-Id: Ic01cb3217881d269cc451f0e63358e1e4decaaa7
CRS-Fixed: 1096009
Define folder and file structure for
Serialization UMAC convergence component.
Define the changes for initializing and de-initializing
the serialization component
Change-Id: I1074091a74bba8aa7426345f6fb1a5df127f1a59
CRs-Fixed: 2000032
Define the public APIs for serialization component for other
components to use.
Change-Id: I66c8fd2c85aaf7b78f98ea6a273784fa253969b6
CRs-Fixed: 2000032