firmware.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  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. */
  16. #ifndef BRCMFMAC_FIRMWARE_H
  17. #define BRCMFMAC_FIRMWARE_H
  18. #define BRCMF_FW_REQUEST 0x000F
  19. #define BRCMF_FW_REQUEST_NVRAM 0x0001
  20. #define BRCMF_FW_REQ_FLAGS 0x00F0
  21. #define BRCMF_FW_REQ_NV_OPTIONAL 0x0010
  22. void brcmf_fw_nvram_free(void *nvram);
  23. /*
  24. * Request firmware(s) asynchronously. When the asynchronous request
  25. * fails it will not use the callback, but call device_release_driver()
  26. * instead which will call the driver .remove() callback.
  27. */
  28. int brcmf_fw_get_firmwares(struct device *dev, u16 flags,
  29. const char *code, const char *nvram,
  30. void (*fw_cb)(struct device *dev,
  31. const struct firmware *fw,
  32. void *nvram_image, u32 nvram_len));
  33. #endif /* BRCMFMAC_FIRMWARE_H */