hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c
....@@ -1,17 +1,6 @@
1
+// SPDX-License-Identifier: ISC
12 /*
23 * Copyright (c) 2010 Broadcom Corporation
3
- *
4
- * Permission to use, copy, modify, and/or distribute this software for any
5
- * purpose with or without fee is hereby granted, provided that the above
6
- * copyright notice and this permission notice appear in all copies.
7
- *
8
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11
- * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
154 */
165
176 /*******************************************************************************
....@@ -178,8 +167,8 @@
178167 *fwerr = 0;
179168 ret = brcmf_proto_bcdc_msg(drvr, ifidx, cmd, buf, len, false);
180169 if (ret < 0) {
181
- brcmf_err("brcmf_proto_bcdc_msg failed w/status %d\n",
182
- ret);
170
+ bphy_err(drvr, "brcmf_proto_bcdc_msg failed w/status %d\n",
171
+ ret);
183172 goto done;
184173 }
185174
....@@ -195,9 +184,9 @@
195184 if ((id < bcdc->reqid) && (++retries < RETRIES))
196185 goto retry;
197186 if (id != bcdc->reqid) {
198
- brcmf_err("%s: unexpected request id %d (expected %d)\n",
199
- brcmf_ifname(brcmf_get_ifp(drvr, ifidx)), id,
200
- bcdc->reqid);
187
+ bphy_err(drvr, "%s: unexpected request id %d (expected %d)\n",
188
+ brcmf_ifname(brcmf_get_ifp(drvr, ifidx)), id,
189
+ bcdc->reqid);
201190 ret = -EINVAL;
202191 goto done;
203192 }
....@@ -245,9 +234,9 @@
245234 id = (flags & BCDC_DCMD_ID_MASK) >> BCDC_DCMD_ID_SHIFT;
246235
247236 if (id != bcdc->reqid) {
248
- brcmf_err("%s: unexpected request id %d (expected %d)\n",
249
- brcmf_ifname(brcmf_get_ifp(drvr, ifidx)), id,
250
- bcdc->reqid);
237
+ bphy_err(drvr, "%s: unexpected request id %d (expected %d)\n",
238
+ brcmf_ifname(brcmf_get_ifp(drvr, ifidx)), id,
239
+ bcdc->reqid);
251240 ret = -EINVAL;
252241 goto done;
253242 }
....@@ -312,8 +301,8 @@
312301 }
313302 if (((h->flags & BCDC_FLAG_VER_MASK) >> BCDC_FLAG_VER_SHIFT) !=
314303 BCDC_PROTO_VER) {
315
- brcmf_err("%s: non-BCDC packet received, flags 0x%x\n",
316
- brcmf_ifname(tmp_if), h->flags);
304
+ bphy_err(drvr, "%s: non-BCDC packet received, flags 0x%x\n",
305
+ brcmf_ifname(tmp_if), h->flags);
317306 return -EBADE;
318307 }
319308
....@@ -408,9 +397,9 @@
408397 }
409398
410399 static void brcmf_proto_bcdc_rxreorder(struct brcmf_if *ifp,
411
- struct sk_buff *skb)
400
+ struct sk_buff *skb, bool inirq)
412401 {
413
- brcmf_fws_rxreorder(ifp, skb);
402
+ brcmf_fws_rxreorder(ifp, skb, inirq);
414403 }
415404
416405 static void
....@@ -460,7 +449,7 @@
460449
461450 /* ensure that the msg buf directly follows the cdc msg struct */
462451 if ((unsigned long)(&bcdc->msg + 1) != (unsigned long)bcdc->buf) {
463
- brcmf_err("struct brcmf_proto_bcdc is not correctly defined\n");
452
+ bphy_err(drvr, "struct brcmf_proto_bcdc is not correctly defined\n");
464453 goto fail;
465454 }
466455
....@@ -490,18 +479,11 @@
490479 return -ENOMEM;
491480 }
492481
493
-void brcmf_proto_bcdc_detach_pre_delif(struct brcmf_pub *drvr)
494
-{
495
- struct brcmf_bcdc *bcdc = drvr->proto->pd;
496
-
497
- brcmf_fws_detach_pre_delif(bcdc->fws);
498
-}
499
-
500
-void brcmf_proto_bcdc_detach_post_delif(struct brcmf_pub *drvr)
482
+void brcmf_proto_bcdc_detach(struct brcmf_pub *drvr)
501483 {
502484 struct brcmf_bcdc *bcdc = drvr->proto->pd;
503485
504486 drvr->proto->pd = NULL;
505
- brcmf_fws_detach_post_delif(bcdc->fws);
487
+ brcmf_fws_detach(bcdc->fws);
506488 kfree(bcdc);
507489 }