Home | History | Annotate | Download | only in dhdutil

Lines Matching refs:dhd

2  * Common code for DHD command-line utility
87 static int dhd_var_getbuf(void *dhd, char *iovar, void *param, int param_len, void **bufptr);
88 static int dhd_var_setbuf(void *dhd, char *iovar, void *param, int param_len);
92 static int dhd_iovar_getint(void *dhd, char *name, int *var);
93 static int dhd_iovar_setint(void *dhd, char *name, int var);
119 static int dhd_do_msglevel(void *dhd, cmd_t *cmd, char **argv, dbg_msg_t *dbg_msg);
169 "reset the bus stats shown in the dhd dump"},
426 dhd_list(void *dhd, cmd_t *garb, char **argv)
433 UNUSED_PARAMETER(dhd);
518 dhd_check(void *dhd)
523 if ((ret = dhd_get(dhd, DHD_GET_MAGIC, &val, sizeof(int))) < 0)
527 if ((ret = dhd_get(dhd, DHD_GET_VERSION, &val, sizeof(int))) < 0)
591 dhd_pktgen(void *dhd, cmd_t *cmd, char **argv)
598 UNUSED_PARAMETER(dhd);
602 if ((ret = dhd_var_getbuf(dhd, "pktgen", NULL, 0, &ptr)) != 0)
690 ret = dhd_var_setbuf(dhd, "pktgen", &pktgen, sizeof(pktgen));
742 dhd_sd_msglevel(void *dhd, cmd_t *cmd, char **argv)
744 return dhd_do_msglevel(dhd, cmd, argv, dhd_sd_msgs);
748 dhd_sd_blocksize(void *dhd, cmd_t *cmd, char **argv)
780 if ((ret = dhd_var_getbuf(dhd, cmd->name, &func, sizeof(func), &ptr)) >= 0)
785 ret = dhd_var_setbuf(dhd, cmd->name, &size, sizeof(size));
883 dhd_sdreg(void *dhd, cmd_t *cmd, char **argv)
932 ret = dhd_var_getbuf(dhd, argv[0], &sdreg, sizeof(sdreg), (void**)&ptr);
936 ret = dhd_var_setbuf(dhd, argv[0], &sdreg, sizeof(sdreg));
943 dhd_membytes(void *dhd, cmd_t *cmd, char **argv)
1033 ret = dhd_var_getbuf(dhd, "membytes",
1100 ret = dhd_set(dhd, DHD_SET_VAR, &buf[0], (ptr - buf));
1111 dhd_idletime(void *dhd, cmd_t *cmd, char **argv)
1139 err = dhd_set(dhd, DHD_SET_VAR, &buf[0], (endptr - buf));
1142 if ((err = dhd_var_get(dhd, cmd, argv))) {
1160 dhd_idleclock(void *dhd, cmd_t *cmd, char **argv)
1184 err = dhd_set(dhd, DHD_SET_VAR, &buf[0], (endptr - buf));
1187 if ((err = dhd_var_get(dhd, cmd, argv))) {
1207 dhd_sprom(void *dhd, cmd_t *cmd, char **argv)
1348 ret = dhd_set(dhd, DHD_SET_VAR, buf,
1352 ret = dhd_get(dhd, DHD_GET_VAR, buf,
1449 dhd_vars(void *dhd, cmd_t *cmd, char **argv)
1464 if ((ret = dhd_var_getbuf(dhd, "vars", NULL, 0, (void**)&bufp)))
1495 ret = dhd_set(dhd, DHD_SET_VAR, buf, bufp - buf);
1518 dhd_verify_file_bytes(void *dhd, uint8 *memblock, int start, uint len)
1528 ret = dhd_var_getbuf(dhd, "membytes", params, 2 * sizeof(int), (void**)&ptr);
1550 dhd_load_file_bytes(void *dhd, cmd_t *cmd, FILE *fp, int fsize, int start, uint blk_sz, bool verify)
1595 ret = dhd_set(dhd, DHD_SET_VAR, &buf[0], (bufp - buf + len));
1604 if (dhd_verify_file_bytes(dhd, memblock, start, len) != 0) {
1623 dhd_proptxstatusenable(void *dhd, cmd_t *cmd, char **argv)
1630 ret = dhd_iovar_setint(dhd, cmd->name, flag);
1633 ret = dhd_iovar_getint(dhd, cmd->name, &flag);
1641 dhd_proptxstatusmode(void *dhd, cmd_t *cmd, char **argv)
1648 ret = dhd_iovar_setint(dhd, cmd->name, mode);
1651 ret = dhd_iovar_getint(dhd, cmd->name, &mode);
1659 dhd_proptxopt(void *dhd, cmd_t *cmd, char **argv)
1666 ret = dhd_iovar_setint(dhd, cmd->name, flag);
1669 ret = dhd_iovar_getint(dhd, cmd->name, &flag);
1679 dhd_get_ramstart(void *dhd, uint32 *ramstart)
1684 /* Read the bus type the DHD driver is associated to */
1685 if ((ret = dhd_var_get(dhd, NULL, ramstart_args)) != BCME_OK) {
1697 dhd_download(void *dhd, cmd_t *cmd, char **argv)
1730 if ((ret = dhd_get_ramstart(dhd, &start)) != BCME_OK)
1819 /* Check on which bus the dhd driver is sitting. Downloading methodology differs from
1825 /* Read the bus type the DHD driver is associated to */
1826 if ((ret = dhd_var_get(dhd, NULL, bustype_args))) {
1838 if ((ret = dhd_var_get(dhd, NULL, memszargs))) {
1850 if ((ret = dhd_iovar_setint(dhd, "dwnldstate", TRUE))) {
1877 if ((ret = dhd_load_file_bytes(dhd, cmd, fp, fsize, start, memblock_sz, verify))) {
1914 ret = dhd_set(dhd, DHD_SET_VAR, buf, (bufp - buf));
1924 if ((ret = dhd_iovar_setint(dhd, "dwnldstate", FALSE))) {
1952 dhd_dldn(void *dhd, cmd_t *cmd, char **argv)
2002 fd = dhd_set(dhd, DHD_DLDN_ST, NULL, 0);
2038 if ((ret = dhd_get_ramstart(dhd, &start)) != BCME_OK)
2048 ret = dhd_set(dhd, DHD_DLDN_WRITE, memblock, len);
2071 ret = dhd_set(dhd, DHD_DLDN_END, NULL, 0);
2078 dhd_upload(void *dhd, cmd_t *cmd, char **argv)
2100 if ((ret = dhd_get_ramstart(dhd, &start)) != BCME_OK)
2150 if ((ret = dhd_var_get(dhd, NULL, memszargs))) {
2179 ret = dhd_var_getbuf(dhd, "membytes", params, 2 * sizeof(int), (void**)&ptr);
2204 dhd_get_debug_info(void *dhd, hndrte_debug_t *debug_info)
2214 if ((ret = dhd_get_ramstart(dhd, &ramstart)) != BCME_OK)
2230 ret = dhd_var_getbuf(dhd, "membytes", params, 2 * sizeof(int), (void**)&buffer);
2246 ret = dhd_var_getbuf(dhd, "membytes", params, 2 * sizeof(int), (void**)&buffer);
2267 dhd_coredump(void *dhd, cmd_t *cmd, char **argv)
2331 if ((ret = dhd_get_debug_info(dhd, &debugInfo)) < 0)
2347 ret = dhd_var_getbuf(dhd, "membytes", params, 2 * sizeof(int), (void**)&ptr);
2401 ret = dhd_var_getbuf(dhd, "membytes", params, 2 * sizeof(int), (void**)&ptr);
2425 dhd_consoledump(void *dhd, cmd_t *cmd, char **argv)
2470 if ((ret = dhd_get_debug_info(dhd, &debugInfo)) < 0)
2482 ret = dhd_var_getbuf(dhd, "membytes", params, 2 * sizeof(int), (void**)&ptr);
2510 ret = dhd_var_getbuf(dhd, "membytes", params, 2 * sizeof(int), (void**)&ptr);
2529 dhd_logstamp(void *dhd, cmd_t *cmd, char **argv)
2559 ret = dhd_var_setbuf(dhd, cmd->name, valn, argc * sizeof(int));
2565 dhd_sd_reg(void *dhd, cmd_t *cmd, char **argv)
2620 if ((ret = dhd_var_getbuf(dhd, cmd->name, &sdreg, sizeof(sdreg), &ptr)) >= 0)
2623 ret = dhd_var_setbuf(dhd, cmd->name, &sdreg, sizeof(sdreg));
2653 dhd_msglevel(void *dhd, cmd_t *cmd, char **argv)
2655 return dhd_do_msglevel(dhd, cmd, argv, dhd_msgs);
2659 dhd_do_msglevel(void *dhd, cmd_t *cmd, char **argv, dbg_msg_t *dbg_msg)
2665 if ((ret = dhd_iovar_getint(dhd, cmd->name, (int*)&msglevel)) < 0)
2704 return (dhd_iovar_setint(dhd, cmd->name, msglevel));
2747 dhd_version(void *dhd, cmd_t *cmd, char **argv)
2760 if ((ret = dhd_var_getbuf(dhd, cmd->name, NULL, 0, (void**)&ptr)) < 0)
2770 dhd_var_setint(void *dhd, cmd_t *cmd, char **argv)
2816 return (dhd_set(dhd, DHD_SET_VAR, &buf[0], len));
2820 dhd_var_get(void *dhd, cmd_t *cmd, char **argv)
2845 return (dhd_get(dhd, DHD_GET_VAR, &buf[0], DHD_IOCTL_MAXLEN));
2849 dhd_var_getint(void *dhd, cmd_t *cmd, char **argv)
2858 if ((err = dhd_var_get(dhd, cmd, argv)))
2872 dhd_var_getandprintstr(void *dhd, cmd_t *cmd, char **argv)
2876 if ((err = dhd_var_get(dhd, cmd, argv)))
2885 dhd_printlasterror(void *dhd)
2889 if (dhd_var_get(dhd, NULL, cmd) != 0) {
2897 dhd_varint(void *dhd, cmd_t *cmd, char *argv[])
2900 return (dhd_var_setint(dhd, cmd, argv));
2902 return (dhd_var_getint(dhd, cmd, argv));
2906 dhd_var_getbuf(void *dhd, char *iovar, void *param, int param_len, void **bufptr)
2921 return dhd_get(dhd, DHD_GET_VAR, &buf[0], DHD_IOCTL_MAXLEN);
2925 dhd_var_setbuf(void *dhd, char *iovar, void *param, int param_len)
2940 return dhd_set(dhd, DHD_SET_VAR, &buf[0], len);
2944 dhd_var_void(void *dhd, cmd_t *cmd, char **argv)
2951 return dhd_var_setbuf(dhd, cmd->name, NULL, 0);
2983 dhd_iovar_getint(void *dhd, char *name, int *var)
2992 if ((error = dhd_get(dhd, DHD_GET_VAR, &ibuf, sizeof(ibuf))) < 0)
3001 dhd_iovar_setint(void *dhd, char *name, int var)
3011 if ((error = dhd_set(dhd, DHD_SET_VAR, &ibuf, len)) < 0)
3018 dhd_varstr(void *dhd, cmd_t *cmd, char **argv)
3026 if ((error = dhd_var_getbuf(dhd, cmd->name, NULL, 0, &ptr)) < 0)
3035 return dhd_var_setbuf(dhd, cmd->name, str, strlen(str) + 1);
3041 dhd_hostreorder_flows(void *dhd, cmd_t *cmd, char **argv)
3048 if ((ret = dhd_var_getbuf(dhd, cmd->name, NULL, 0, &ptr)) < 0) {