| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: ISC |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2013 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. |
|---|
| 15 | 4 | */ |
|---|
| 16 | 5 | |
|---|
| 17 | 6 | |
|---|
| .. | .. |
|---|
| 47 | 36 | if (brcmf_proto_msgbuf_attach(drvr)) |
|---|
| 48 | 37 | goto fail; |
|---|
| 49 | 38 | } else { |
|---|
| 50 | | - brcmf_err("Unsupported proto type %d\n", |
|---|
| 51 | | - drvr->bus_if->proto_type); |
|---|
| 39 | + bphy_err(drvr, "Unsupported proto type %d\n", |
|---|
| 40 | + drvr->bus_if->proto_type); |
|---|
| 52 | 41 | goto fail; |
|---|
| 53 | 42 | } |
|---|
| 54 | 43 | if (!proto->tx_queue_data || (proto->hdrpull == NULL) || |
|---|
| .. | .. |
|---|
| 56 | 45 | (proto->configure_addr_mode == NULL) || |
|---|
| 57 | 46 | (proto->delete_peer == NULL) || (proto->add_tdls_peer == NULL) || |
|---|
| 58 | 47 | (proto->debugfs_create == NULL)) { |
|---|
| 59 | | - brcmf_err("Not all proto handlers have been installed\n"); |
|---|
| 48 | + bphy_err(drvr, "Not all proto handlers have been installed\n"); |
|---|
| 60 | 49 | goto fail; |
|---|
| 61 | 50 | } |
|---|
| 62 | 51 | return 0; |
|---|
| .. | .. |
|---|
| 67 | 56 | return -ENOMEM; |
|---|
| 68 | 57 | } |
|---|
| 69 | 58 | |
|---|
| 70 | | -void brcmf_proto_detach_post_delif(struct brcmf_pub *drvr) |
|---|
| 59 | +void brcmf_proto_detach(struct brcmf_pub *drvr) |
|---|
| 71 | 60 | { |
|---|
| 72 | 61 | brcmf_dbg(TRACE, "Enter\n"); |
|---|
| 73 | 62 | |
|---|
| 74 | 63 | if (drvr->proto) { |
|---|
| 75 | 64 | if (drvr->bus_if->proto_type == BRCMF_PROTO_BCDC) |
|---|
| 76 | | - brcmf_proto_bcdc_detach_post_delif(drvr); |
|---|
| 65 | + brcmf_proto_bcdc_detach(drvr); |
|---|
| 77 | 66 | else if (drvr->bus_if->proto_type == BRCMF_PROTO_MSGBUF) |
|---|
| 78 | 67 | brcmf_proto_msgbuf_detach(drvr); |
|---|
| 79 | 68 | kfree(drvr->proto); |
|---|
| 80 | 69 | drvr->proto = NULL; |
|---|
| 81 | 70 | } |
|---|
| 82 | | -} |
|---|
| 83 | | - |
|---|
| 84 | | -void brcmf_proto_detach_pre_delif(struct brcmf_pub *drvr) |
|---|
| 85 | | -{ |
|---|
| 86 | | - if (drvr->proto && drvr->bus_if->proto_type == BRCMF_PROTO_BCDC) |
|---|
| 87 | | - brcmf_proto_bcdc_detach_pre_delif(drvr); |
|---|
| 88 | 71 | } |
|---|