Files
android_kernel_samsung_sm86…/dsc/inc/wlan_dsc.h
Dustin Brown 7e39722b42 qcacld-3.0: Add Driver Synchronization Core (common)
The Driver Synchronization Core (DSC) is a set of synchronization
primitives for use by the driver's orchestration layer. It provides APIs
for ensuring safe state transitions (including bring up and tear down)
of major driver objects: a single driver, associated psocs, and their
associated vdevs.

APIs are divided into two categories: mutual exclusion of conflicting
transitions, and operation tracking, blocking, and waiting capabilities.

For part 1, add common infrastructure and headers.

Change-Id: Id290e66d2dccd28b89fed5f285d3692ff3c814e7
CRs-Fixed: 2290260
2018-08-06 19:02:53 -07:00

56 lines
2.4 KiB
C

/*
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/**
* DOC: Driver Synchronization Core (DSC) APIs for use by the driver
* orchestration layer.
*
* This infrastructure accomplishes two high level goals:
* 1) Replace ad-hoc locking/flags (hdd_init_deinit_lock,
* iface_change_lock, con_mode_flag, etc., etc., etc.)
* 2) Make cds_ssr_protect() and driver state checking atomic
*
* These two goals are commplished in DSC via two corollary concepts:
* 1) Transitions (as in driver state machine transitions)
* These are mutually exclusive, and replace ad-hoc locking
* 2) Operations (as in operations the driver is currently servicing)
* These execute concurrently with other operations, and replace
* cds_ssr_protect(). Any active transition causes new operations to be
* rejected, in the same way as cds_ssr_protect/hdd_validate_context would.
*
* Transitions and operations are split into 3 distinct levels: driver, psoc,
* and vdev. These levels are arranged into a tree, with a single driver at
* the root, zero or more psocs per driver, and zero or more vdevs per psoc.
*
* High level transitions block transitions and operations at the same level
* down, and low level transitions block transitions at the same level up. So a
* driver transition effectively prevents any new activity in the system, while
* a vdev transition prevents transtitions on the same vdev, its parent psoc,
* and the driver. This also means that sibling nodes can transition at the same
* time, e.g. one vdev going up at the same time another is going down.
*/
#ifndef __WLAN_DSC_H
#define __WLAN_DSC_H
#include "wlan_dsc_driver.h"
#include "wlan_dsc_psoc.h"
#include "wlan_dsc_vdev.h"
#endif /* __WLAN_DSC_H */