firmware.c (df7686101956929dcea410971656e34926773b88) | firmware.c (c9692820710f57c826b2e43a6fb1e4cd307508b0) |
---|---|
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 --- 729 unchanged lines hidden (view full) --- 738 mp_path_len = strnlen(mp_path, BRCMF_FW_ALTPATH_LEN); 739 if (mp_path_len) 740 end = mp_path[mp_path_len - 1]; 741 742 fwreq->n_items = n_fwnames; 743 744 for (j = 0; j < n_fwnames; j++) { 745 fwreq->items[j].path = fwnames[j].path; | 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 --- 729 unchanged lines hidden (view full) --- 738 mp_path_len = strnlen(mp_path, BRCMF_FW_ALTPATH_LEN); 739 if (mp_path_len) 740 end = mp_path[mp_path_len - 1]; 741 742 fwreq->n_items = n_fwnames; 743 744 for (j = 0; j < n_fwnames; j++) { 745 fwreq->items[j].path = fwnames[j].path; |
746 fwnames[j].path[0] = '\0'; |
|
746 /* check if firmware path is provided by module parameter */ 747 if (brcmf_mp_global.firmware_path[0] != '\0') { 748 strlcpy(fwnames[j].path, mp_path, 749 BRCMF_FW_NAME_LEN); 750 751 if (end != '/') { 752 strlcat(fwnames[j].path, "/", 753 BRCMF_FW_NAME_LEN); 754 } 755 } 756 strlcat(fwnames[j].path, mapping_table[i].fw_base, 757 BRCMF_FW_NAME_LEN); 758 strlcat(fwnames[j].path, fwnames[j].extension, 759 BRCMF_FW_NAME_LEN); 760 fwreq->items[j].path = fwnames[j].path; 761 } 762 763 return fwreq; 764} | 747 /* check if firmware path is provided by module parameter */ 748 if (brcmf_mp_global.firmware_path[0] != '\0') { 749 strlcpy(fwnames[j].path, mp_path, 750 BRCMF_FW_NAME_LEN); 751 752 if (end != '/') { 753 strlcat(fwnames[j].path, "/", 754 BRCMF_FW_NAME_LEN); 755 } 756 } 757 strlcat(fwnames[j].path, mapping_table[i].fw_base, 758 BRCMF_FW_NAME_LEN); 759 strlcat(fwnames[j].path, fwnames[j].extension, 760 BRCMF_FW_NAME_LEN); 761 fwreq->items[j].path = fwnames[j].path; 762 } 763 764 return fwreq; 765} |