Lines Matching refs:ptr
587 void *ptr = NULL; in dhd_pktgen() local
595 if ((ret = dhd_var_getbuf(dhd, "pktgen", NULL, 0, &ptr)) != 0) in dhd_pktgen()
597 memcpy(&pktgen, ptr, sizeof(pktgen)); in dhd_pktgen()
746 void *ptr = NULL; in dhd_sd_blocksize() local
773 if ((ret = dhd_var_getbuf(dhd, cmd->name, &func, sizeof(func), &ptr)) >= 0) in dhd_sd_blocksize()
774 printf("Function %d block size: %d\n", func, *(int*)ptr); in dhd_sd_blocksize()
881 char *ptr = NULL; in dhd_sdreg() local
897 sdreg.offset = strtoul(argv[1], &ptr, 0); in dhd_sdreg()
898 if (*ptr && *ptr != '/') { in dhd_sdreg()
904 if (*ptr == '/') { in dhd_sdreg()
905 sdreg.func = strtol((ptr+1), &ptr, 0); in dhd_sdreg()
906 if (*ptr || ((sdreg.func != 2) && sdreg.func != 4)) { in dhd_sdreg()
917 sdreg.value = strtoul(argv[2], &ptr, 0); in dhd_sdreg()
918 if (*ptr) { in dhd_sdreg()
925 ret = dhd_var_getbuf(dhd, argv[0], &sdreg, sizeof(sdreg), (void**)&ptr); in dhd_sdreg()
927 printf("0x%0*x\n", (2 * sdreg.func), *(int *)ptr); in dhd_sdreg()
940 char *ptr; in dhd_membytes() local
999 addr = strtoul(argv[0], &ptr, 0); in dhd_membytes()
1000 if (*ptr) { in dhd_membytes()
1006 len = strtoul(argv[1], &ptr, 0); in dhd_membytes()
1007 if (*ptr) { in dhd_membytes()
1027 params, (2 * sizeof(int)), (void**)&ptr); in dhd_membytes()
1032 fwrite(ptr + align, sizeof(char), chunk - align, stdout); in dhd_membytes()
1034 dhd_hexdump((uchar*)ptr + align, chunk - align, addr + align); in dhd_membytes()
1081 ptr = buf + strlen(buf) + 1; in dhd_membytes()
1083 memcpy(ptr, params, (2 * sizeof(int))); in dhd_membytes()
1084 ptr += (2 * sizeof(int)); in dhd_membytes()
1088 *ptr++ = *sptr++; in dhd_membytes()
1093 ret = dhd_set(dhd, DHD_SET_VAR, &buf[0], (ptr - buf)); in dhd_membytes()
1515 char *ptr; in dhd_verify_file_bytes() local
1521 ret = dhd_var_getbuf(dhd, "membytes", params, 2 * sizeof(int), (void**)&ptr); in dhd_verify_file_bytes()
1529 dst = (uint8 *)ptr; in dhd_verify_file_bytes()
2125 char *ptr; in dhd_upload()
2132 ret = dhd_var_getbuf(dhd, "membytes", params, 2 * sizeof(int), (void**)&ptr); in dhd_upload()
2139 if (fwrite(ptr, sizeof(*ptr), len, fp) != len) { in dhd_upload()
2198 void *ptr = NULL; in dhd_sd_reg() local
2247 if ((ret = dhd_var_getbuf(dhd, cmd->name, &sdreg, sizeof(sdreg), &ptr)) >= 0) in dhd_sd_reg()
2248 printf("0x%x\n", *(int *)ptr); in dhd_sd_reg()
2377 char *ptr; in dhd_version() local
2387 if ((ret = dhd_var_getbuf(dhd, cmd->name, NULL, 0, (void**)&ptr)) < 0) in dhd_version()
2391 printf("%s\n", ptr); in dhd_version()
2651 void *ptr; in dhd_varstr() local
2653 if ((error = dhd_var_getbuf(dhd, cmd->name, NULL, 0, &ptr)) < 0) in dhd_varstr()
2656 str = (char *)ptr; in dhd_varstr()
2671 void *ptr; in dhd_hostreorder_flows() local
2675 if ((ret = dhd_var_getbuf(dhd, cmd->name, NULL, 0, &ptr)) < 0) { in dhd_hostreorder_flows()
2679 flow_id = (uint8 *)ptr; in dhd_hostreorder_flows()