From 297b60346df8beafee954a0fd7c2d64f33f3b9bc Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Sat, 11 May 2024 01:44:05 +0000
Subject: [PATCH] rtl8211F_led_control
---
kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/include/osl_ext.h | 115 ++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 92 insertions(+), 23 deletions(-)
diff --git a/kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/include/osl_ext.h b/kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/include/osl_ext.h
index 6bebb64..2418e27 100644
--- a/kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/include/osl_ext.h
+++ b/kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/include/osl_ext.h
@@ -1,16 +1,17 @@
-/* SPDX-License-Identifier: GPL-2.0 */
/*
* OS Abstraction Layer Extension - the APIs defined by the "extension" API
* are only supported by a subset of all operating systems.
*
- * Copyright (C) 1999-2019, Broadcom Corporation
- *
+ * Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation
+ *
+ * Copyright (C) 1999-2017, Broadcom Corporation
+ *
* Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
* under the terms of the GNU General Public License version 2 (the "GPL"),
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
* following added to such license:
- *
+ *
* As a special exception, the copyright holders of this software give you
* permission to link this software with independent modules, and to copy and
* distribute the resulting executable under terms of your choice, provided that
@@ -18,7 +19,7 @@
* the license of that module. An independent module is a module which is not
* derived from this software. The special exception does not apply to any
* modifications of the software.
- *
+ *
* Notwithstanding the above, under no circumstances may you combine this
* software in any way with any other Broadcom software provided under a license
* other than the GPL, without Broadcom's express prior written consent.
@@ -26,12 +27,11 @@
*
* <<Broadcom-WL-IPTag/Open:>>
*
- * $Id: osl_ext.h 514727 2014-11-12 03:02:48Z $
+ * $Id: osl_ext.h 627993 2016-03-29 10:07:29Z $
*/
#ifndef _osl_ext_h_
#define _osl_ext_h_
-
/* ---- Include Files ---------------------------------------------------- */
@@ -42,14 +42,14 @@
#include <threadx_osl_ext.h>
#else
#define OSL_EXT_DISABLED
-#endif
+#endif // endif
/* Include base operating system abstraction. */
#include <osl.h>
#ifdef __cplusplus
extern "C" {
-#endif
+#endif // endif
/* ---- Constants and Types ---------------------------------------------- */
@@ -67,6 +67,7 @@
#define OSL_EXT_TIME_FOREVER ((osl_ext_time_ms_t)(-1))
typedef unsigned int osl_ext_time_ms_t;
+typedef unsigned int osl_ext_time_us_t;
typedef unsigned int osl_ext_event_bits_t;
@@ -88,7 +89,6 @@
/* User registered callback and parameter to invoke when timer expires. */
typedef void* osl_ext_timer_arg_t;
typedef void (*osl_ext_timer_callback)(osl_ext_timer_arg_t arg);
-
/* -----------------------------------------------------------------------
* Tasks.
@@ -115,12 +115,10 @@
OSL_EXT_TASK_NUM_PRIORITES
} osl_ext_task_priority_t;
-
#ifndef OSL_EXT_DISABLED
/* ---- Variable Externs ------------------------------------------------- */
/* ---- Function Prototypes ---------------------------------------------- */
-
/* --------------------------------------------------------------------------
** Semaphore
@@ -189,7 +187,6 @@
*/
osl_ext_status_t osl_ext_sem_take(osl_ext_sem_t *sem, osl_ext_time_ms_t timeout_msec);
-
/* --------------------------------------------------------------------------
** Mutex
*/
@@ -252,7 +249,6 @@
*/
osl_ext_status_t osl_ext_mutex_release(osl_ext_mutex_t *mutex);
-
/* --------------------------------------------------------------------------
** Timers
*/
@@ -311,6 +307,23 @@
osl_ext_time_ms_t timeout_msec, osl_ext_timer_mode_t mode);
/****************************************************************************
+* Function: osl_ext_timer_start
+*
+* Purpose: Start a previously created timer object.
+*
+* Parameters: timer (in) Timer object.
+* timeout_usec (in) Invoke callback after this number of micro-seconds.
+* mode (in) One-shot or periodic timer.
+*
+* Returns: OSL_EXT_SUCCESS if the timer was created successfully, or an
+* error code if the timer could not be created.
+*****************************************************************************
+*/
+osl_ext_status_t
+osl_ext_timer_start_us(osl_ext_timer_t *timer,
+ osl_ext_time_us_t timeout_usec, osl_ext_timer_mode_t mode);
+
+/****************************************************************************
* Function: osl_ext_timer_stop
*
* Purpose: Stop a previously created timer object.
@@ -360,12 +373,31 @@
#define osl_ext_task_create(name, stack, stack_size, priority, func, arg, task) \
osl_ext_task_create_ex((name), (stack), (stack_size), (priority), 0, (func), \
- (arg), (task))
+ (arg), TRUE, (task))
+
+/****************************************************************************
+* Function: osl_ext_task_create_ex
+*
+* Purpose: Create a task with autostart option.
+*
+* Parameters: name (in) Pointer to task string descriptor.
+* stack (in) Pointer to stack. NULL to allocate.
+* stack_size (in) Stack size - in bytes.
+* priority (in) Abstract task priority.
+* func (in) A pointer to the task entry point function.
+* arg (in) Value passed into task entry point function.
+* autostart (in) TRUE to start task after creation.
+* task (out) Task to create.
+*
+* Returns: OSL_EXT_SUCCESS if the task was created successfully, or an
+* error code if the task could not be created.
+*****************************************************************************
+*/
osl_ext_status_t osl_ext_task_create_ex(char* name,
void *stack, unsigned int stack_size, osl_ext_task_priority_t priority,
osl_ext_time_ms_t timslice_msec, osl_ext_task_entry func, osl_ext_task_arg_t arg,
- osl_ext_task_t *task);
+ bool autostart, osl_ext_task_t *task);
/****************************************************************************
* Function: osl_ext_task_delete
@@ -380,7 +412,6 @@
*/
osl_ext_status_t osl_ext_task_delete(osl_ext_task_t *task);
-
/****************************************************************************
* Function: osl_ext_task_is_running
*
@@ -392,7 +423,6 @@
*****************************************************************************
*/
osl_ext_task_t *osl_ext_task_current(void);
-
/****************************************************************************
* Function: osl_ext_task_yield
@@ -407,6 +437,44 @@
*/
osl_ext_status_t osl_ext_task_yield(void);
+/****************************************************************************
+* Function: osl_ext_task_yield
+*
+* Purpose: Yield the CPU to other tasks of the same priority that are
+* ready-to-run.
+*
+* Parameters: None.
+*
+* Returns: OSL_EXT_SUCCESS if successful, else error code.
+*****************************************************************************
+*/
+osl_ext_status_t osl_ext_task_yield(void);
+
+/****************************************************************************
+* Function: osl_ext_task_suspend
+*
+* Purpose: Suspend a task.
+*
+* Parameters: task (mod) Task to suspend.
+*
+* Returns: OSL_EXT_SUCCESS if the task was suspended successfully, or an
+* error code if the task could not be suspended.
+*****************************************************************************
+*/
+osl_ext_status_t osl_ext_task_suspend(osl_ext_task_t *task);
+
+/****************************************************************************
+* Function: osl_ext_task_resume
+*
+* Purpose: Resume a task.
+*
+* Parameters: task (mod) Task to resume.
+*
+* Returns: OSL_EXT_SUCCESS if the task was resumed successfully, or an
+* error code if the task could not be resumed.
+*****************************************************************************
+*/
+osl_ext_status_t osl_ext_task_resume(osl_ext_task_t *task);
/****************************************************************************
* Function: osl_ext_task_enable_stack_check
@@ -419,7 +487,6 @@
*****************************************************************************
*/
osl_ext_status_t osl_ext_task_enable_stack_check(void);
-
/* --------------------------------------------------------------------------
** Queue
@@ -519,7 +586,6 @@
*/
osl_ext_status_t osl_ext_queue_count(osl_ext_queue_t *queue, int *count);
-
/* --------------------------------------------------------------------------
** Event
*/
@@ -585,7 +651,6 @@
osl_ext_status_t osl_ext_event_set(osl_ext_event_t *event,
osl_ext_event_bits_t event_bits);
-
/* --------------------------------------------------------------------------
** Interrupt
*/
@@ -601,7 +666,6 @@
*****************************************************************************
*/
osl_ext_interrupt_state_t osl_ext_interrupt_disable(void);
-
/****************************************************************************
* Function: osl_ext_interrupt_restore
@@ -619,6 +683,11 @@
#else
/* ---- Constants and Types ---------------------------------------------- */
+
+/* Interrupt control */
+#define OSL_INTERRUPT_SAVE_AREA
+#define OSL_DISABLE
+#define OSL_RESTORE
/* Semaphore. */
#define osl_ext_sem_t
@@ -693,6 +762,6 @@
#ifdef __cplusplus
}
-#endif
+#endif // endif
#endif /* _osl_ext_h_ */
--
Gitblit v1.6.2