Lines Matching full:nvram

40  * @nvram: output buffer with parse result.
48 * @boardrev_found: nvram contains boardrev information.
54 u8 *nvram; member
67 * is_nvram_char() - check if char is a valid one for NVRAM entry
160 memcpy(&nvp->nvram[nvp->nvram_len], skv, cplen); in brcmf_nvram_handle_value()
162 nvp->nvram[nvp->nvram_len] = '\0'; in brcmf_nvram_handle_value()
223 nvp->nvram = kzalloc(size, GFP_KERNEL); in brcmf_init_nvram_parser()
224 if (!nvp->nvram) in brcmf_init_nvram_parser()
232 /* brcmf_fw_strip_multi_v1 :Some nvram files contain settings for multiple
234 * which data is to be returned. v1 is the version where nvram is stored
248 u8 *nvram; in brcmf_fw_strip_multi_v1() local
251 nvram = kzalloc(nvp->nvram_len + 1 + 3 + sizeof(u32), GFP_KERNEL); in brcmf_fw_strip_multi_v1()
252 if (!nvram) in brcmf_fw_strip_multi_v1()
274 if (strncmp(&nvp->nvram[i], "devpath", 7) == 0 && in brcmf_fw_strip_multi_v1()
275 (!strncmp(&nvp->nvram[i + 8], pci_path, pci_len) || in brcmf_fw_strip_multi_v1()
276 !strncmp(&nvp->nvram[i + 8], pcie_path, pcie_len))) { in brcmf_fw_strip_multi_v1()
277 id = nvp->nvram[i + 7] - '0'; in brcmf_fw_strip_multi_v1()
281 while (nvp->nvram[i] != 0) in brcmf_fw_strip_multi_v1()
288 /* Now copy all valid entries, release old nvram and assign new one */ in brcmf_fw_strip_multi_v1()
292 if ((nvp->nvram[i] - '0' == id) && (nvp->nvram[i + 1] == ':')) { in brcmf_fw_strip_multi_v1()
294 if (strncmp(&nvp->nvram[i], "boardrev", 8) == 0) in brcmf_fw_strip_multi_v1()
296 while (nvp->nvram[i] != 0) { in brcmf_fw_strip_multi_v1()
297 nvram[j] = nvp->nvram[i]; in brcmf_fw_strip_multi_v1()
301 nvram[j] = 0; in brcmf_fw_strip_multi_v1()
304 while (nvp->nvram[i] != 0) in brcmf_fw_strip_multi_v1()
308 kfree(nvp->nvram); in brcmf_fw_strip_multi_v1()
309 nvp->nvram = nvram; in brcmf_fw_strip_multi_v1()
314 kfree(nvram); in brcmf_fw_strip_multi_v1()
318 /* brcmf_fw_strip_multi_v2 :Some nvram files contain settings for multiple
320 * which data is to be returned. v2 is the version where nvram is stored
330 u8 *nvram; in brcmf_fw_strip_multi_v2() local
332 nvram = kzalloc(nvp->nvram_len + 1 + 3 + sizeof(u32), GFP_KERNEL); in brcmf_fw_strip_multi_v2()
333 if (!nvram) { in brcmf_fw_strip_multi_v2()
338 /* Copy all valid entries, release old nvram and assign new one. in brcmf_fw_strip_multi_v2()
347 if (strncmp(&nvp->nvram[i], prefix, len) == 0) { in brcmf_fw_strip_multi_v2()
349 if (strncmp(&nvp->nvram[i], "boardrev", 8) == 0) in brcmf_fw_strip_multi_v2()
351 while (nvp->nvram[i] != 0) { in brcmf_fw_strip_multi_v2()
352 nvram[j] = nvp->nvram[i]; in brcmf_fw_strip_multi_v2()
356 nvram[j] = 0; in brcmf_fw_strip_multi_v2()
359 while (nvp->nvram[i] != 0) in brcmf_fw_strip_multi_v2()
363 kfree(nvp->nvram); in brcmf_fw_strip_multi_v2()
364 nvp->nvram = nvram; in brcmf_fw_strip_multi_v2()
373 memcpy(&nvp->nvram[nvp->nvram_len], &BRCMF_FW_DEFAULT_BOARDREV, in brcmf_fw_add_defaults()
376 nvp->nvram[nvp->nvram_len] = '\0'; in brcmf_fw_add_defaults()
384 len = scnprintf(&nvp->nvram[nvp->nvram_len], BRCMF_FW_MACADDR_LEN + 1, in brcmf_fw_add_macaddr()
425 kfree(nvp.nvram); in brcmf_fw_nvram_strip()
437 nvp.nvram[pad] = 0; in brcmf_fw_nvram_strip()
445 memcpy(&nvp.nvram[*new_length], &token_le, sizeof(token_le)); in brcmf_fw_nvram_strip()
448 return nvp.nvram; in brcmf_fw_nvram_strip()
451 void brcmf_fw_nvram_free(void *nvram) in brcmf_fw_nvram_free() argument
453 kfree(nvram); in brcmf_fw_nvram_free()
465 /* In some cases the EFI-var stored nvram contains "ccode=ALL" or "ccode=XV"
499 status = efi.get_variable(L"nvram", &guid, NULL, &data_len, NULL); in brcmf_fw_nvram_from_efi()
507 status = efi.get_variable(L"nvram", &guid, NULL, &data_len, data); in brcmf_fw_nvram_from_efi()
512 brcmf_info("Using nvram EFI variable\n"); in brcmf_fw_nvram_from_efi()
545 void *nvram = NULL; in brcmf_fw_request_nvram_done() local
566 nvram = brcmf_fw_nvram_strip(data, data_len, &nvram_length, in brcmf_fw_request_nvram_done()
577 if (!nvram && !(cur->flags & BRCMF_FW_REQF_OPTIONAL)) in brcmf_fw_request_nvram_done()
580 brcmf_dbg(TRACE, "nvram %p len %d\n", nvram, nvram_length); in brcmf_fw_request_nvram_done()
581 cur->nv_data.data = nvram; in brcmf_fw_request_nvram_done()