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/bcm_ring.h | 72 ++++++++++++++++++-----------------
1 files changed, 37 insertions(+), 35 deletions(-)
diff --git a/kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/include/bcm_ring.h b/kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/include/bcm_ring.h
index cea1983..63e41f4 100644
--- a/kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/include/bcm_ring.h
+++ b/kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/include/bcm_ring.h
@@ -1,20 +1,41 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __bcm_ring_included__
-#define __bcm_ring_included__
-
/*
- * +----------------------------------------------------------------------------
- *
* bcm_ring.h : Ring context abstraction
- *
* The ring context tracks the WRITE and READ indices where elements may be
* produced and consumed respectively. All elements in the ring need to be
* fixed size.
*
* NOTE: A ring of size N, may only hold N-1 elements.
*
- * +----------------------------------------------------------------------------
+ * 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
+ * you also meet, for each linked independent module, the terms and conditions of
+ * 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.
+ *
+ *
+ * <<Broadcom-WL-IPTag/Open:>>
+ *
+ * $Id: bcm_ring.h 700321 2017-05-18 16:09:07Z $
+ */
+#ifndef __bcm_ring_included__
+#define __bcm_ring_included__
+/*
* API Notes:
*
* Ring manipulation API allows for:
@@ -82,14 +103,16 @@
* private L1 data cache.
* +----------------------------------------------------------------------------
*
- * 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
@@ -97,12 +120,12 @@
* 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.
*
- * $Id$
+ * $Id: bcm_ring.h 700321 2017-05-18 16:09:07Z $
*
* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
* vim: set ts=4 noet sw=4 tw=80:
@@ -114,7 +137,7 @@
#define __ring_aligned ____cacheline_aligned
#else
#define __ring_aligned
-#endif
+#endif // endif
/* Conditional compile for debug */
/* #define BCM_RING_DEBUG */
@@ -147,7 +170,6 @@
int read __ring_aligned; /* READ index in a circular ring */
} bcm_ring_t;
-
static INLINE void bcm_ring_init(bcm_ring_t *ring);
static INLINE void bcm_ring_copy(bcm_ring_t *to, bcm_ring_t *from);
static INLINE bool bcm_ring_is_empty(bcm_ring_t *ring);
@@ -175,7 +197,6 @@
static INLINE int bcm_ring_cons_avail(const bcm_ring_t *ring,
const int ring_size);
static INLINE void bcm_ring_cons_all(bcm_ring_t *ring);
-
/**
* bcm_ring_init - initialize a ring context.
@@ -219,7 +240,6 @@
return (ring->read == ring->write);
}
-
/**
* __bcm_ring_next_write - determine the index where the next write may occur
* (with wrap-around).
@@ -235,7 +255,6 @@
return ((ring->write + 1) % ring_size);
}
-
/**
* __bcm_ring_full - support function for ring full test.
* @ring: pointer to a ring context
@@ -248,7 +267,6 @@
{
return (next_write == ring->read);
}
-
/**
* bcm_ring_is_full - "Boolean" test whether a ring is full.
@@ -266,7 +284,6 @@
return __bcm_ring_full(ring, next_write);
}
-
/**
* bcm_ring_prod_done - commit a previously pending index where production
* was requested.
@@ -280,7 +297,6 @@
RING_ASSERT(BCM_RING_IS_VALID(ring));
ring->write = write;
}
-
/**
* bcm_ring_prod_pend - Fetch in "pend" mode, the index where an element may be
@@ -305,7 +321,6 @@
return rtn;
}
-
/**
* bcm_ring_prod - Fetch and "commit" the next index where a ring element may
* be produced.
@@ -328,7 +343,6 @@
return prod_write;
}
-
/**
* bcm_ring_cons_done - commit a previously pending read
* @ring: pointer to a ring context
@@ -340,7 +354,6 @@
RING_ASSERT(BCM_RING_IS_VALID(ring));
ring->read = read;
}
-
/**
* bcm_ring_cons_pend - fetch in "pend" mode, the next index where a ring
@@ -365,7 +378,6 @@
return rtn;
}
-
/**
* bcm_ring_cons - fetch and "commit" the next index where a ring element may
* be consumed.
@@ -386,7 +398,6 @@
return cons_read;
}
-
/**
* bcm_ring_sync_read - on consumption, update peer's read index.
* @peer: pointer to peer's producer ring context
@@ -400,7 +411,6 @@
peer->read = self->read; /* flush read update to peer producer */
}
-
/**
* bcm_ring_sync_write - on consumption, update peer's write index.
* @peer: pointer to peer's consumer ring context
@@ -413,7 +423,6 @@
RING_ASSERT(BCM_RING_IS_VALID(self));
peer->write = self->write; /* flush write update to peer consumer */
}
-
/**
* bcm_ring_prod_avail - fetch total number of available empty slots in the
@@ -434,7 +443,6 @@
ASSERT(prod_avail < ring_size);
return prod_avail;
}
-
/**
* bcm_ring_cons_avail - fetch total number of available elements for consumption.
@@ -457,7 +465,6 @@
return cons_avail;
}
-
/**
* bcm_ring_cons_all - set ring in state where all elements are consumed.
* @ring: pointer to a ring context
@@ -467,7 +474,6 @@
{
ring->read = ring->write;
}
-
/**
* Work Queue
@@ -484,7 +490,6 @@
} __ring_aligned;
typedef struct bcm_workq bcm_workq_t;
-
/* #define BCM_WORKQ_DEBUG */
#if defined(BCM_WORKQ_DEBUG)
@@ -510,7 +515,6 @@
WORKQ_ASSERT((__index) < ((__workq)->ring_size)); \
((__elem_type *)((__workq)->buffer)) + (__index); \
})
-
static INLINE void bcm_workq_init(bcm_workq_t *workq, bcm_workq_t *workq_peer,
void *buffer, int ring_size);
@@ -584,7 +588,6 @@
bcm_ring_sync_read(WORKQ_PEER_RING(workq_cons), WORKQ_RING(workq_cons));
}
-
/**
* bcm_workq_prod_refresh - Fetch the updated consumer's read index
* @workq_prod: producer's workq whose read index must be refreshed from peer
@@ -610,6 +613,5 @@
/* cons::write <--- prod::write */
bcm_ring_sync_write(WORKQ_RING(workq_cons), WORKQ_PEER_RING(workq_cons));
}
-
#endif /* ! __bcm_ring_h_included__ */
--
Gitblit v1.6.2