From: Jim C. <jim...@gm...> - 2012-05-19 07:38:23
|
- drop #if0d pci.c:acxpci_upload_fw() - make merge.c:acxpci_upload_fw() static - make merge.c:acxmem_upload_fw() static Signed-off-by: Jim Cromie <jim...@gm...> --- merge.c | 4 +-- pci.c | 86 ----------------------------------------------------------------- 2 files changed, 2 insertions(+), 88 deletions(-) diff --git a/merge.c b/merge.c index 228a9c4..c73f3d9 100644 --- a/merge.c +++ b/merge.c @@ -1414,7 +1414,7 @@ static int _acx_upload_fw(acx_device_t *adev, char *filename) return res; } -int acxmem_upload_fw(acx_device_t *adev) +static int acxmem_upload_fw(acx_device_t *adev) { char *filename = "WLANGEN.BIN"; int rc; @@ -1427,7 +1427,7 @@ int acxmem_upload_fw(acx_device_t *adev) return rc; } -int acxpci_upload_fw(acx_device_t *adev) +static int acxpci_upload_fw(acx_device_t *adev) { char filename[sizeof("tiacx1NNcNN")]; int rc; diff --git a/pci.c b/pci.c index 2e852d4..991add6 100644 --- a/pci.c +++ b/pci.c @@ -157,92 +157,6 @@ void acxpci_free_coherent(struct pci_dev *hwdev, size_t size, */ /* - * acxpci_s_upload_fw - * - * Called from acx_reset_dev - * - * Origin: Derived from FW dissection - */ -/* static */ -#if 0 // acxpci_upload_fw() -int acxpci_upload_fw(acx_device_t *adev) -{ - firmware_image_t *fw_image = NULL; - int res = NOT_OK; - int try; - u32 file_size; - char filename[sizeof("tiacx1NNcNN")]; - - FN_ENTER; - - /* print exact chipset and radio ID to make sure people really - * get a clue on which files exactly they need to provide. - * Firmware loading is a frequent end-user PITA with these - * chipsets. - */ - pr_acx("need firmware for acx1%02d chipset with radio ID %02X\n" - "Please provide via firmware hotplug:\n" - "either combined firmware (single file named 'tiacx1%02dc%02X')\n" - "or two files (base firmware file 'tiacx1%02d' " - "+ radio fw 'tiacx1%02dr%02X')\n", - IS_ACX111(adev)*11, adev->radio_type, - IS_ACX111(adev)*11, adev->radio_type, - IS_ACX111(adev)*11, - IS_ACX111(adev)*11, adev->radio_type - ); - - /* print exact chipset and radio ID to make sure people really - * get a clue on which files exactly they are supposed to - * provide, since firmware loading is the biggest enduser PITA - * with these chipsets. Not printing radio ID in 0xHEX in - * order to not confuse them into wrong file naming */ - pr_acx("need to load firmware for acx1%02d chipset with radio ID %02x, please provide via firmware hotplug:\n" - "acx: either one file only (<c>ombined firmware image file, radio-specific) or two files (radio-less base image file *plus* separate <r>adio-specific extension file)\n", - IS_ACX111(adev)*11, adev->radio_type); - - /* Try combined, then main image */ - adev->need_radio_fw = 0; - snprintf(filename, sizeof(filename), "tiacx1%02dc%02X", - IS_ACX111(adev) * 11, adev->radio_type); - - fw_image = acx_read_fw(adev->bus_dev, filename, &file_size); - if (!fw_image) { - adev->need_radio_fw = 1; - filename[sizeof("tiacx1NN") - 1] = '\0'; - fw_image = - acx_read_fw(adev->bus_dev, filename, &file_size); - if (!fw_image) { - FN_EXIT1(NOT_OK); - return NOT_OK; - } - } - - for (try = 1; try <= 5; try++) { - res = acx_write_fw(adev, fw_image, 0); - log(L_DEBUG | L_INIT, "acx_write_fw (main/combined): %d\n", res); - if (OK == res) { - res = acx_validate_fw(adev, fw_image, 0); - log(L_DEBUG | L_INIT, "acx_validate_fw " - "(main/combined): %d\n", res); - } - - if (OK == res) { - SET_BIT(adev->dev_state_mask, ACX_STATE_FW_LOADED); - break; - } - pr_acx("firmware upload attempt #%d FAILED, " - "retrying...\n", try); - acx_mwait(1000); /* better wait for a while... */ - } - - vfree(fw_image); - - FN_EXIT1(res); - return res; -} -#endif - -/* * BOM CMDs (Control Path) * ================================================== */ -- 1.7.10.1.487.ga3935e6 |