Hante Meuleman | a74d036 | 2014-01-13 22:20:22 +0100 | [diff] [blame] | 1 | /* |
| 2 | * 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 | */ |
Arend van Spriel | dabedab | 2014-05-27 12:56:17 +0200 | [diff] [blame] | 16 | #ifndef BRCMFMAC_FIRMWARE_H |
| 17 | #define BRCMFMAC_FIRMWARE_H |
Hante Meuleman | a74d036 | 2014-01-13 22:20:22 +0100 | [diff] [blame] | 18 | |
Arend van Spriel | c1416e7 | 2014-05-27 12:56:21 +0200 | [diff] [blame] | 19 | #define BRCMF_FW_REQUEST 0x000F |
| 20 | #define BRCMF_FW_REQUEST_NVRAM 0x0001 |
| 21 | #define BRCMF_FW_REQ_FLAGS 0x00F0 |
| 22 | #define BRCMF_FW_REQ_NV_OPTIONAL 0x0010 |
Hante Meuleman | a74d036 | 2014-01-13 22:20:22 +0100 | [diff] [blame] | 23 | |
Daniel Kim | c1b2053 | 2014-07-12 08:49:37 +0200 | [diff] [blame] | 24 | #define BRCMF_FW_PATH_LEN 256 |
| 25 | #define BRCMF_FW_NAME_LEN 32 |
| 26 | |
| 27 | extern char brcmf_firmware_path[]; |
| 28 | |
Arend van Spriel | dabedab | 2014-05-27 12:56:17 +0200 | [diff] [blame] | 29 | void brcmf_fw_nvram_free(void *nvram); |
Arend van Spriel | c1416e7 | 2014-05-27 12:56:21 +0200 | [diff] [blame] | 30 | /* |
| 31 | * Request firmware(s) asynchronously. When the asynchronous request |
| 32 | * fails it will not use the callback, but call device_release_driver() |
| 33 | * instead which will call the driver .remove() callback. |
| 34 | */ |
Hante Meuleman | c436553 | 2015-04-14 20:10:33 +0200 | [diff] [blame^] | 35 | int brcmf_fw_get_firmwares_pcie(struct device *dev, u16 flags, |
| 36 | const char *code, const char *nvram, |
| 37 | void (*fw_cb)(struct device *dev, |
| 38 | const struct firmware *fw, |
| 39 | void *nvram_image, u32 nvram_len), |
| 40 | u16 domain_nr, u16 bus_nr); |
Arend van Spriel | c1416e7 | 2014-05-27 12:56:21 +0200 | [diff] [blame] | 41 | int brcmf_fw_get_firmwares(struct device *dev, u16 flags, |
| 42 | const char *code, const char *nvram, |
| 43 | void (*fw_cb)(struct device *dev, |
| 44 | const struct firmware *fw, |
| 45 | void *nvram_image, u32 nvram_len)); |
Hante Meuleman | a74d036 | 2014-01-13 22:20:22 +0100 | [diff] [blame] | 46 | |
Arend van Spriel | dabedab | 2014-05-27 12:56:17 +0200 | [diff] [blame] | 47 | #endif /* BRCMFMAC_FIRMWARE_H */ |