summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h
AgeCommit message (Collapse)Author
2018-11-06brcmfmac: Add support for first trying to get a board specific nvram fileHans de Goede
The nvram files which some brcmfmac chips need are board-specific. To be able to distribute these as part of linux-firmware, so that devices with such a wifi chip will work OOTB, multiple (one per board) versions must co-exist under /lib/firmware. This commit adds support for callers of the brcmfmac/firmware.c code to pass in a board_type parameter through the request structure. If that parameter is set then the code will first try to load chipmodel.board_type.txt before falling back to the old chipmodel.txt name. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30brcmfmac: constify firmware mapping tablesArend Van Spriel
The information in the firmware mapping does not need to be modified so it can be static const. Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> Reviewed-by: Franky Lin <franky.lin@broadcom.com> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-03-27brcmfmac: get rid of brcmf_fw_map_chip_to_name()Arend Van Spriel
The function is no longer used so removing it. Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> Reviewed-by: Franky Lin <franky.lin@broadcom.com> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-03-27brcmfmac: introduce brcmf_fw_alloc_request() functionArend Van Spriel
The function brcmf_fw_alloc_request() takes a list of required files and allocated the struct brcmf_fw_request instance accordingly. The request can be modified by the caller before being passed to the brcmf_fw_request_firmwares() function. Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> Reviewed-by: Franky Lin <franky.lin@broadcom.com> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-03-27brcmfmac: pass struct in brcmf_fw_get_firmwares()Arend Van Spriel
Make the function brcmf_fw_get_firmwares() a bit more easy to extend using a structure to pass the request parameters. Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> Reviewed-by: Franky Lin <franky.lin@broadcom.com> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-03-27brcmfmac: derive firmware filenames from basename mappingArend Van Spriel
Instead of defining individual filenames for firmware and nvram use a basename and derive the names from that. Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> Reviewed-by: Franky Lin <franky.lin@broadcom.com> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-06-15brcmfmac: add parameter to pass error code in firmware callbackArend Van Spriel
Extend the parameters in the firmware callback so it can be called upon success and failure. This allows the caller to properly clear all resources in the failure path. Right now the error code is always zero, ie. success. Cc: stable@vger.kernel.org # 4.9.x- Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> Reviewed-by: Franky Lin <franky.lin@broadcom.com> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-01-18brcmfmac: fix BRCMF_FW_NVRAM_DEF macro for older gcc compilersArend van Spriel
With gcc < 4.3 __UNIQUE_ID does not create unique ids with the macro BRCMF_FW_NVRAM_DEF. Fix this by removing the MODULE_FIRMWARE instance for the nvram file. This file is not in linux-firmware repo so it may not be needed anyway. Otherwise consider this as a temporary fix. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Arend van Spriel <aspriel@gmail.com> Acked-by: Kalle Valo <kvalo@codeaurora.org> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-30brcmfmac: Unify methods to define and map firmware files.Hante Meuleman
All bus drivers (sdio, usb and pcie) require firmware files which needs to be downloaded to the device, The definitions and mapping of device id and revision to firmware and nvram file is done by each bus driver. This patch creates common functions and defines to simplify and unify the definition of these firmware and nvram files and mapping. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-11-18brcm80211: move under broadcom vendor directoryKalle Valo
Part of reorganising wireless drivers directory and Kconfig. Note that I had to edit Makefiles from subdirectories to use the new location. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>