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

22 Коммитов

Автор SHA1 Сообщение Дата
Jianmin Zhu
2b69562ed6 qcacld-3.0: Address race between ap stop and system suspend
A race between cfg80211 ap stop and wiphy system suspend can lead
to either DPM WD or serialization VDEV disconnect active command
timeout since scheduler thread gets suspended as part of wiphy
suspend and both cfg80211_disconnect and wiphy suspend/resume acquire
RTNL lock.
To address this race condition avoid ap stop when wiphy
suspend is already completed since scheduler thread gets suspended
as part of wiphy suspend and it can't process ap stop.

Change-Id: I5792b524a27326ca9e020600db2b82e16cc7ea96
CRs-Fixed: 3834305
2024-06-12 15:30:42 -07:00
Ashish Kumar Dhanotiya
bc1d0241e5 qcacld-3.0: Add Wait for uptree operations in dsc for vdev transitions
Currently host driver does not wait for uptree operations in dsc
before it starts vdev transitios, which may lead to memory domain
mismatch.

For example, if modules are closed because of idle shutdown, memory
domain in host driver will be init domain and at that time if some
psoc ops starts, memory allocated as part of this ops will be
allocated in init domain and if at the same time if vdev up starts
which will trigger the vdev trans and will start the modules and change
the memory domain to active domain, now when the memory allocated as
part of psoc operation is released on psoc ops completion will be
released in the active domain which leads the memory domain mismatch.

In current issue, host driver closes the modules because of idle
shutdown and changes the memory domain to init domain, now host driver
receives get features vendor command and starts psoc operation which
allocates memory in init domain, while this psoc operation is still in
progress, host driver receives interface create which starts vdev
operation and changes the memory domain to active domain as part of
start modules. Now, when ongoing psoc operation completes, it
releases the momory in active domain, which results in memory
domain mismatch.

To fix this issue, before starting vdev transition, add wait for uptree
operations in dsc tree, which includes wait for psoc operations and
driver operations as this issue is possible with the driver operations
as well.

Change-Id: I2cf395ebb94cafca728926a6617fdc34a073755a
CRs-Fixed: 3621530
2023-10-31 01:48:37 -07:00
Asutosh Mohapatra
4a32419413 qcacld-3.0: Don't start vdev trans if vdev ops is pending
Currently for REASSOC command host starts vdev ops
and tries to use vdev. In parallel if host receives
interface down and starts vdev trans then proceeds
to stop adapter and destroys the vdev, this leads
to null pointer dereference if vdev is destroyed
first.

This happens because driver doesn't wait for vdev ops
to complete after starting vdev trans.

To address this issue, start vdev trans and wait for
vdev ops to complete before proceeding to execute
further.

Change-Id: I363d05f742f7569dffed70cfa9b6bb9a0a766d9e
CRs-Fixed: 3445858
2023-04-27 17:13:38 -07:00
Jeff Johnson
9475bedf61 qcacld-3.0: Fix os_if documentation
The kernel-doc script identified documentation issues in the os_if
layer, so fix them.

Change-Id: I71dd7893776e4b49a80f6be186740967b08d3347
CRs-Fixed: 3341451
2022-11-26 15:51:20 -08:00
Jeff Johnson
c9693d2e8b qcacld-3.0: os_if: Fix misspellings
Fix misspellings in os_if/...

Change-Id: I040d4344f0065b1045e5ac7037c70123ca4231ef
CRs-Fixed: 3303622
2022-10-05 13:05:45 -07:00
Lin Bai
3e29620e42 qcacld-3.0: Add log when caching cmd during SSR
Add log when caching any north band cmd.

Change-Id: I0eb12a720334056b19bc420d6a17afe4564a7c1c
CRs-Fixed: 3267824
2022-08-16 03:02:21 -07:00
Bapiraju Alla
07eeda1420 qcacld-3.0: Increase the mac vdev support for 80211be
Currently max vdevs are defined as 6 in osif. Increase it to 9
in case of 11be.

Change-Id: If64306cfc55690d7523ee910074064051a1b1d78
CRs-Fixed: 3027377
2021-09-01 17:13:16 -07:00
Bapiraju Alla
2de2bf7fdf qcacld-3.0: Add support to cache north bound commands during SSR
Driver receives interface down/del virtual interface commands from kernel
with rtnl lock held. In driver, these commands will wait for SSR to be
completed. So in this case rtnl lock will be held for long time.

To avoid this, cache the north bound command received during SSR and
execute them in re-initialization sequence.

Change-Id: I5b4ca8e04c80e1cef49d137532198283aa35165f
CRs-Fixed: 2740368
2021-03-17 22:35:27 -07:00
Will Huang
19be165cba qcacld-3.0: Remove QDF_BUG of qdf_spin_is_locked
spin_is_locked() provided by kernel has statement that we should not
rely heavily on the return value, it only tells that the spinlock is
seen to be locked, not that it is locked on your CPU.
Further, on CONFIG_SMP=n builds with CONFIG_DEBUG_SPINLOCK=n, the
return value is always 0.

So we should not use QDF_BUG to test/assert its return value, only be
used for debugging purpose.

Change-Id: I8854ebc6b96698f5272d77750da7d18582a288e9
CRs-Fixed: 2852179
2021-01-15 04:06:46 -08:00
Rajeev Kumar
60a34715cf qcacld-3.0: Move os_if psoc locking inside when doing psoc trans wait
Since os_if_psoc_trans_wait may sleep on a wait event if there is any
active ongoing transition on driver, psoc or vdevs. Hence move the
os_if_psoc_sync_lock(a spin lock bh) inside sync calback API for psoc
look up such that spin lock is not held before starting the wait on
event. os_if_psoc_sync lock is for psoc look up and not for wait
and hence this fix makes locking fine granular as well.

Change-Id: I0537604337a6b594be3e7dc34dc97b79d5987ad4
CRs-Fixed: 2433409
2019-04-12 05:19:54 -07:00
Rajeev Kumar
0118dc9cc9 qcacld-3.0: Move os_if vdev lock inside when doing vdev trans wait
Since os_if_vdev_trans_wait may sleep on a wait event if there is any
active ongoing transition on driver, psoc or vdevs. Hence move the
os_if_vdev_sync_lock(a spin lock bh) inside sync calback API for vdev
look up such that spin lock is not held before starting the wait on
event. os_if_vdev_sync lock is for vdev look up and not for wait
and hence this fix makes locking fine granular as well.

Change-Id: I2cca560aeed9b79648168a09f596dbaa374ecbb5
CRs-Fixed: 2433829
2019-04-11 22:09:32 -07:00
Rajeev Kumar
70d2e56aae qcacld-3.0: Move os_if driver lock inside when doing driver trans wait
Since os_if_driver_trans_wait may sleep on a wait event if there is any
active ongoing transition on driver, psoc or vdevs. Hence move the
os_if_driver_sync_lock(a spin lock bh) inside sync calback API for driver
look up such that spin lock is not held before starting the wait on
event. os_if_driver_sync lock is for driver look up and not for wait
and hence this fix makes locking fine granular as well.

Change-Id: I32c582bedbbee81d3a5b171666fc3009c3dc7e5a
CRs-Fixed: 2433825
2019-04-11 22:09:28 -07:00
Dustin Brown
2a1755db02 qcacld-3.0: Add osif_sync high level documentation
While the concepts of osif_sync started out as a simple set of APIs, it
ultimately evolved into its own full-fledge code module. While the
per-function documenation is present, high-level documentation for the
osif_sync code module as a whole was over looked. Add a high-level
description of the purpose of osif_sync in osif_sync.h

Change-Id: I42cd28673b500c85ecf95de4b507b677804892ba
CRs-Fixed: 2421801
2019-03-25 12:39:26 -07:00
Dustin Brown
265e82b4d0 qcacld-3.0: Register for qdf_op_protect/unprotect
As a step towards removing qdf_ssr_protect, register for the
replacement APIs, qdf_op_protect/unprotect.

Change-Id: Ica5802082b3be51f47bdf4ae0eb132b80c29b08a
CRs-Fixed: 2418432
2019-03-21 21:20:14 -07:00
Dustin Brown
c1d81af5c6 qcacld-3.0: Migrate driver transitions to osif_driver_sync
With the recent addition of osif_driver_sync APIs, DSC use is abstracted
behind a common interface. Migrate HDD to the new interface by updating
driver transitions to use the new APIs.

Change-Id: I394f007dd5485cd8d22aee84af74f8854ed54bb6
CRs-Fixed: 2408211
2019-03-02 13:31:32 -08:00
Dustin Brown
60c206456f qcacld-3.0: Add osif_driver_sync APIs
To bring OSIF driver synchronization in line with recent VDEV and PSOC
enhancements, add osif_driver_sync APIs. These allow for atomically
acquiring the driver synchronization context, and protecting various
call flows via DSC primitives.

Change-Id: Iba8df54bb1a3894118adf3daf1d0de8a554284ae
CRs-Fixed: 2408210
2019-03-02 13:31:26 -08:00
Dustin Brown
c0591c0308 qcacld-3.0: Rename osif_*_sync_create_with_trans()
Rename the osif_*_sync_create_with_trans() to a slightly more
appropriate osid_*_sync_create_and_trans(), to help convey the fact that
the transition does not end when the function returns.

Change-Id: I5606fb613d786d65de773dae49fe8ad431b5342f
CRs-Fixed: 2406713
2019-02-28 01:27:50 -08:00
Dustin Brown
93bdff328c qcacld-3.0: Remove qdf_util.h from osif_sync
Now that qdf_status_to_os_return() has moved to qdf_status.h in
Iaa2efa5f662be014a61a8490c3fab411ec0f2054, remove references to
qdf_util.h from osif_sync.

Change-Id: I42e70c8ac1a29ebba6d00994a12b96076684c403
CRs-Fixed: 2397508
2019-02-15 13:10:01 -08:00
Dustin Brown
2c5e0480c0 qcacld-3.0: Rename hdd_vdev_sync to osif_vdev_sync
Change I556e9d2833edd2bd26266496b6000347649c5fbe moved hdd_dsc to osif,
but retained the existing naming. Rename hdd_vdev_sync to a more
appropriate osif_vdev_sync, and address any remaining naming problems.

Change-Id: Ic0983a79b09254b1615a348fe540f1dc0121baff
CRs-Fixed: 2396514
2019-02-12 04:47:24 -08:00
Dustin Brown
363b479eb4 qcacld-3.0: Rename hdd_psoc_sync to osif_psoc_sync
Change I556e9d2833edd2bd26266496b6000347649c5fbe moved hdd_dsc to osif,
but retained the existing naming. Rename hdd_psoc_sync to a more
appropriate osif_psoc_sync.

Change-Id: Ic877c0d4efc7e74426c048c440a49f72ee1b5b0f
CRs-Fixed: 2396513
2019-02-11 23:58:19 -08:00
Dustin Brown
6412d1f9cc qcacld-3.0: Move hdd_dsc to osif/sync
Move the contents of hdd_dsc to the new files added in osif/sync as part
of Ica94d32028d10d344294d6cc12d91a06efe1ab6c.

Change-Id: I556e9d2833edd2bd26266496b6000347649c5fbe
CRs-Fixed: 2396512
2019-02-11 23:58:12 -08:00
Dustin Brown
a17cacefdd qcacld-3.0: Add file structure for osif_sync
To better align with current organizational recommendations and allow
API use by os_if/nan, begin moving hdd_*_sync APIs to os_if. In step
one, create the new osif_sync file structure.

Change-Id: Ica94d32028d10d344294d6cc12d91a06efe1ab6c
CRs-Fixed: 2396511
2019-02-11 23:58:05 -08:00