Lines Matching refs:argv

120 static int dhd_do_msglevel(void *dhd, cmd_t *cmd, char **argv, dbg_msg_t *dbg_msg);
369 char **argv = *pargv; in dhd_option() local
373 while (*argv) { in dhd_option()
375 if (!strcmp(*argv, "-a") || !strcmp(*argv, "-i")) { in dhd_option()
376 char *opt = *argv++; in dhd_option()
377 ifname = *argv; in dhd_option()
387 else if (!strcmp(*argv, "-d")) in dhd_option()
389 else if (!strcmp(*argv, "-u")) in dhd_option()
391 else if (!strcmp(*argv, "-x")) in dhd_option()
395 else if (!strcmp(*argv, "-h")) in dhd_option()
405 argv ++; in dhd_option()
411 *pargv = argv; in dhd_option()
427 dhd_list(void *dhd, cmd_t *garb, char **argv) in dhd_list() argument
436 UNUSED_PARAMETER(argv); in dhd_list()
592 dhd_pktgen(void *dhd, cmd_t *cmd, char **argv) in dhd_pktgen() argument
614 if (*++argv) { in dhd_pktgen()
621 while ((opt_err = miniopt(&opts, argv)) != -1) { in dhd_pktgen()
627 argv += opts.consumed; in dhd_pktgen()
743 dhd_sd_msglevel(void *dhd, cmd_t *cmd, char **argv) in dhd_sd_msglevel() argument
745 return dhd_do_msglevel(dhd, cmd, argv, dhd_sd_msgs); in dhd_sd_msglevel()
749 dhd_sd_blocksize(void *dhd, cmd_t *cmd, char **argv) in dhd_sd_blocksize() argument
758 for (argc = 0; argv[argc]; argc++); in dhd_sd_blocksize()
766 func = strtol(argv[1], &endptr, 0); in dhd_sd_blocksize()
768 printf("Invalid function: %s\n", argv[1]); in dhd_sd_blocksize()
773 size = strtol(argv[2], &endptr, 0); in dhd_sd_blocksize()
775 printf("Invalid size: %s\n", argv[1]); in dhd_sd_blocksize()
793 dhd_sd_mode(void *wl, cmd_t *cmd, char **argv) in dhd_sd_mode() argument
800 for (argc = 0; argv[argc]; argc++); in dhd_sd_mode()
803 if (argv[1]) { in dhd_sd_mode()
804 if (!strcmp(argv[1], "spi")) { in dhd_sd_mode()
805 strcpy(argv[1], "0"); in dhd_sd_mode()
806 } else if (!strcmp(argv[1], "sd1")) { in dhd_sd_mode()
807 strcpy(argv[1], "1"); in dhd_sd_mode()
808 } else if (!strcmp(argv[1], "sd4")) { in dhd_sd_mode()
809 strcpy(argv[1], "2"); in dhd_sd_mode()
814 ret = dhd_var_setint(wl, cmd, argv); in dhd_sd_mode()
817 if ((ret = dhd_var_get(wl, cmd, argv))) { in dhd_sd_mode()
833 dhd_dma_mode(void *wl, cmd_t *cmd, char **argv) in dhd_dma_mode() argument
840 for (argc = 0; argv[argc]; argc++); in dhd_dma_mode()
843 if (argv[1]) { in dhd_dma_mode()
844 if (!stricmp(argv[1], "pio")) { in dhd_dma_mode()
845 strcpy(argv[1], "0"); in dhd_dma_mode()
846 } else if (!strcmp(argv[1], "0")) { in dhd_dma_mode()
847 } else if (!stricmp(argv[1], "dma")) { in dhd_dma_mode()
848 strcpy(argv[1], "1"); in dhd_dma_mode()
849 } else if (!stricmp(argv[1], "sdma")) { in dhd_dma_mode()
850 strcpy(argv[1], "1"); in dhd_dma_mode()
851 } else if (!strcmp(argv[1], "1")) { in dhd_dma_mode()
852 } else if (!stricmp(argv[1], "adma1")) { in dhd_dma_mode()
853 strcpy(argv[1], "2"); in dhd_dma_mode()
854 } else if (!stricmp(argv[1], "adma")) { in dhd_dma_mode()
855 strcpy(argv[1], "3"); in dhd_dma_mode()
856 } else if (!stricmp(argv[1], "adma2")) { in dhd_dma_mode()
857 strcpy(argv[1], "3"); in dhd_dma_mode()
862 ret = dhd_var_setint(wl, cmd, argv); in dhd_dma_mode()
865 if ((ret = dhd_var_get(wl, cmd, argv))) { in dhd_dma_mode()
884 dhd_sdreg(void *dhd, cmd_t *cmd, char **argv) in dhd_sdreg() argument
896 for (argc = 0; argv[argc]; argc++); in dhd_sdreg()
905 sdreg.offset = strtoul(argv[1], &ptr, 0); in dhd_sdreg()
907 printf("Bad arg: %s\n", argv[1]); in dhd_sdreg()
925 sdreg.value = strtoul(argv[2], &ptr, 0); in dhd_sdreg()
927 printf("Bad value: %s\n", argv[2]); in dhd_sdreg()
933 ret = dhd_var_getbuf(dhd, argv[0], &sdreg, sizeof(sdreg), (void**)&ptr); in dhd_sdreg()
937 ret = dhd_var_setbuf(dhd, argv[0], &sdreg, sizeof(sdreg)); in dhd_sdreg()
944 dhd_membytes(void *dhd, cmd_t *cmd, char **argv) in dhd_membytes() argument
964 argv++; in dhd_membytes()
965 while ((opt_err = miniopt(&opts, argv)) != -1) { in dhd_membytes()
975 argv += opts.consumed; in dhd_membytes()
989 for (argc = 0; argv[argc]; argc++); in dhd_membytes()
1007 addr = strtoul(argv[0], &ptr, 0); in dhd_membytes()
1009 fprintf(stderr, "Bad arg: %s\n", argv[0]); in dhd_membytes()
1014 len = strtoul(argv[1], &ptr, 0); in dhd_membytes()
1016 fprintf(stderr, "Bad value: %s\n", argv[1]); in dhd_membytes()
1047 uint patlen = strlen(argv[2]); in dhd_membytes()
1059 for (inptr = outptr = argv[2]; patlen; patlen -= 2) { in dhd_membytes()
1077 patlen = outptr - argv[2]; in dhd_membytes()
1080 sptr = argv[2]; in dhd_membytes()
1097 if (sptr >= (argv[2] + patlen)) in dhd_membytes()
1098 sptr = argv[2]; in dhd_membytes()
1112 dhd_idletime(void *dhd, cmd_t *cmd, char **argv) in dhd_idletime() argument
1118 if (argv[1]) { in dhd_idletime()
1119 if (!strcmp(argv[1], "never")) { in dhd_idletime()
1121 } else if (!strcmp(argv[1], "immediate") || !strcmp(argv[1], "immed")) { in dhd_idletime()
1124 idletime = strtol(argv[1], &endptr, 0); in dhd_idletime()
1126 fprintf(stderr, "invalid number %s\n", argv[1]); in dhd_idletime()
1131 fprintf(stderr, "invalid value %s\n", argv[1]); in dhd_idletime()
1143 if ((err = dhd_var_get(dhd, cmd, argv))) { in dhd_idletime()
1161 dhd_idleclock(void *dhd, cmd_t *cmd, char **argv) in dhd_idleclock() argument
1167 if (argv[1]) { in dhd_idleclock()
1168 if (!strcmp(argv[1], "active")) { in dhd_idleclock()
1170 } else if (!strcmp(argv[1], "stopped")) { in dhd_idleclock()
1173 idleclock = strtol(argv[1], &endptr, 0); in dhd_idleclock()
1175 fprintf(stderr, "invalid number %s\n", argv[1]); in dhd_idleclock()
1188 if ((err = dhd_var_get(dhd, cmd, argv))) { in dhd_idleclock()
1208 dhd_sprom(void *dhd, cmd_t *cmd, char **argv) in dhd_sprom() argument
1227 for (argc = 0; argv[argc]; argc++); in dhd_sprom()
1236 if (strcmp(argv[0], "srdump") == 0) { in dhd_sprom()
1255 if (strcmp(argv[0], "srwrite") != 0) { in dhd_sprom()
1256 fprintf(stderr, "Unimplemented sprom command: %s\n", argv[0]); in dhd_sprom()
1263 ((argc == 2) && ((nocrc = !strcmp(argv[1], "-c"))))) { in dhd_sprom()
1265 fname = nocrc ? argv[2] : argv[1]; in dhd_sprom()
1315 offset = strtoul(*++argv, &endptr, 0) * 2; in dhd_sprom()
1317 fprintf(stderr, "offset %s is not an integer\n", *argv); in dhd_sprom()
1331 for (words = 0, wordptr = (uint16*)bufp; *++argv; words++) { in dhd_sprom()
1332 *wordptr++ = (uint16)strtoul(*argv, &endptr, 0); in dhd_sprom()
1334 fprintf(stderr, "value %s is not an integer\n", *argv); in dhd_sprom()
1450 dhd_vars(void *dhd, cmd_t *cmd, char **argv) in dhd_vars() argument
1459 for (argc = 0; argv[argc]; argc++); in dhd_vars()
1480 vname = argv[1]; in dhd_vars()
1624 dhd_proptxstatusenable(void *dhd, cmd_t *cmd, char **argv) in dhd_proptxstatusenable() argument
1629 if (argv[1]) { in dhd_proptxstatusenable()
1630 flag = atoi(argv[1]); in dhd_proptxstatusenable()
1642 dhd_proptxstatusmode(void *dhd, cmd_t *cmd, char **argv) in dhd_proptxstatusmode() argument
1647 if (argv[1]) { in dhd_proptxstatusmode()
1648 mode = atoi(argv[1]); in dhd_proptxstatusmode()
1660 dhd_proptxopt(void *dhd, cmd_t *cmd, char **argv) in dhd_proptxopt() argument
1665 if (argv[1]) { in dhd_proptxopt()
1666 flag = atoi(argv[1]); in dhd_proptxopt()
1698 dhd_download(void *dhd, cmd_t *cmd, char **argv) in dhd_download() argument
1737 argv++; in dhd_download()
1738 while ((opt_err = miniopt(&opts, argv)) != -1) { in dhd_download()
1744 argv += opts.consumed; in dhd_download()
1953 dhd_dldn(void *dhd, cmd_t *cmd, char **argv) in dhd_dldn() argument
1977 argv++; in dhd_dldn()
1979 while ((opt_err = miniopt(&opts, argv)) != -1) { in dhd_dldn()
1985 argv += opts.consumed; in dhd_dldn()
2079 dhd_upload(void *dhd, cmd_t *cmd, char **argv) in dhd_upload() argument
2099 UNUSED_PARAMETER(argv); in dhd_upload()
2107 argv++; in dhd_upload()
2108 while ((opt_err = miniopt(&opts, argv)) != -1) { in dhd_upload()
2114 argv += opts.consumed; in dhd_upload()
2268 dhd_coredump(void *dhd, cmd_t *cmd, char **argv) in dhd_coredump() argument
2292 UNUSED_PARAMETER(argv); in dhd_coredump()
2297 argv++; in dhd_coredump()
2298 while ((opt_err = miniopt(&opts, argv)) != -1) { in dhd_coredump()
2304 argv += opts.consumed; in dhd_coredump()
2426 dhd_consoledump(void *dhd, cmd_t *cmd, char **argv) in dhd_consoledump() argument
2446 UNUSED_PARAMETER(argv); in dhd_consoledump()
2451 argv++; in dhd_consoledump()
2452 while ((opt_err = miniopt(&opts, argv)) != -1) { in dhd_consoledump()
2458 argv += opts.consumed; in dhd_consoledump()
2530 dhd_logstamp(void *dhd, cmd_t *cmd, char **argv) in dhd_logstamp() argument
2538 for (argc = 0; argv[argc]; argc++); in dhd_logstamp()
2539 argc--; argv++; in dhd_logstamp()
2545 valn[0] = strtol(argv[0], &endptr, 0); in dhd_logstamp()
2547 printf("bad val1: %s\n", argv[0]); in dhd_logstamp()
2553 valn[1] = strtol(argv[1], &endptr, 0); in dhd_logstamp()
2555 printf("bad val2: %s\n", argv[1]); in dhd_logstamp()
2566 dhd_sd_reg(void *dhd, cmd_t *cmd, char **argv) in dhd_sd_reg() argument
2577 for (argc = 0; argv[argc]; argc++); in dhd_sd_reg()
2582 argv++; in dhd_sd_reg()
2589 argv++; in dhd_sd_reg()
2595 sdreg.func = strtoul(*argv++, &endptr, 0); in dhd_sd_reg()
2604 sdreg.offset = strtoul(*argv++, &endptr, 0); in dhd_sd_reg()
2611 if (*argv) { in dhd_sd_reg()
2612 sdreg.value = strtoul(*argv, &endptr, 0); in dhd_sd_reg()
2620 if (!*argv) { in dhd_sd_reg()
2654 dhd_msglevel(void *dhd, cmd_t *cmd, char **argv) in dhd_msglevel() argument
2656 return dhd_do_msglevel(dhd, cmd, argv, dhd_msgs); in dhd_msglevel()
2660 dhd_do_msglevel(void *dhd, cmd_t *cmd, char **argv, dbg_msg_t *dbg_msg) in dhd_do_msglevel() argument
2669 if (!*++argv) { in dhd_do_msglevel()
2680 while (*argv) { in dhd_do_msglevel()
2681 char *s = *argv; in dhd_do_msglevel()
2695 if (**argv == '-') in dhd_do_msglevel()
2699 ++argv; in dhd_do_msglevel()
2748 dhd_version(void *dhd, cmd_t *cmd, char **argv) in dhd_version() argument
2754 UNUSED_PARAMETER(argv); in dhd_version()
2771 dhd_var_setint(void *dhd, cmd_t *cmd, char **argv) in dhd_var_setint() argument
2784 if (!*argv) { in dhd_var_setint()
2789 varname = *argv++; in dhd_var_setint()
2791 if (!*argv) { in dhd_var_setint()
2796 val = strtol(*argv, &endptr, 0); in dhd_var_setint()
2800 *argv, varname); in dhd_var_setint()
2821 dhd_var_get(void *dhd, cmd_t *cmd, char **argv) in dhd_var_get() argument
2828 if (!*argv) { in dhd_var_get()
2833 varname = *argv++; in dhd_var_get()
2835 if (*argv) { in dhd_var_get()
2836 printf("get: error, extra arg \"%s\"\n", *argv); in dhd_var_get()
2850 dhd_var_getint(void *dhd, cmd_t *cmd, char **argv) in dhd_var_getint() argument
2859 if ((err = dhd_var_get(dhd, cmd, argv))) in dhd_var_getint()
2873 dhd_var_getandprintstr(void *dhd, cmd_t *cmd, char **argv) in dhd_var_getandprintstr() argument
2877 if ((err = dhd_var_get(dhd, cmd, argv))) in dhd_var_getandprintstr()
2898 dhd_varint(void *dhd, cmd_t *cmd, char *argv[]) in dhd_varint() argument
2900 if (argv[1]) in dhd_varint()
2901 return (dhd_var_setint(dhd, cmd, argv)); in dhd_varint()
2903 return (dhd_var_getint(dhd, cmd, argv)); in dhd_varint()
2945 dhd_var_void(void *dhd, cmd_t *cmd, char **argv) in dhd_var_void() argument
2947 UNUSED_PARAMETER(argv); in dhd_var_void()
3019 dhd_varstr(void *dhd, cmd_t *cmd, char **argv) in dhd_varstr() argument
3024 if (!*++argv) { in dhd_varstr()
3034 str = *argv; in dhd_varstr()
3042 dhd_hostreorder_flows(void *dhd, cmd_t *cmd, char **argv) in dhd_hostreorder_flows() argument