hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/commonring.c
....@@ -1,16 +1,6 @@
1
-/* Copyright (c) 2014 Broadcom Corporation
2
- *
3
- * Permission to use, copy, modify, and/or distribute this software for any
4
- * purpose with or without fee is hereby granted, provided that the above
5
- * copyright notice and this permission notice appear in all copies.
6
- *
7
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
10
- * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
12
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
13
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1
+// SPDX-License-Identifier: ISC
2
+/*
3
+ * Copyright (c) 2014 Broadcom Corporation
144 */
155
166 #include <linux/types.h>
....@@ -190,14 +180,8 @@
190180
191181 int brcmf_commonring_write_complete(struct brcmf_commonring *commonring)
192182 {
193
- void *address;
194
-
195
- address = commonring->buf_addr;
196
- address += (commonring->f_ptr * commonring->item_len);
197
- if (commonring->f_ptr > commonring->w_ptr) {
198
- address = commonring->buf_addr;
183
+ if (commonring->f_ptr > commonring->w_ptr)
199184 commonring->f_ptr = 0;
200
- }
201185
202186 commonring->f_ptr = commonring->w_ptr;
203187