Lines Matching refs:ret
456 int ret; in dhd_check() local
459 if ((ret = dhd_get(dhd, DHD_GET_MAGIC, &val, sizeof(int)) < 0)) in dhd_check()
460 return ret; in dhd_check()
463 if ((ret = dhd_get(dhd, DHD_GET_VERSION, &val, sizeof(int)) < 0)) in dhd_check()
464 return ret; in dhd_check()
529 int ret = 0; in dhd_pktgen() local
538 if ((ret = dhd_var_getbuf(dhd, "pktgen", NULL, 0, &ptr)) != 0) in dhd_pktgen()
539 return ret; in dhd_pktgen()
559 ret = -1; in dhd_pktgen()
566 ret = -1; in dhd_pktgen()
614 ret = USAGE_ERROR; in dhd_pktgen()
621 ret = -1; in dhd_pktgen()
626 ret = dhd_var_setbuf(dhd, "pktgen", &pktgen, sizeof(pktgen)); in dhd_pktgen()
662 return ret; in dhd_pktgen()
685 int ret; in dhd_sd_blocksize() local
715 if ((ret = dhd_var_getbuf(dhd, cmd->name, &func, sizeof(func), &ptr)) >= 0) in dhd_sd_blocksize()
720 ret = dhd_var_setbuf(dhd, cmd->name, &size, sizeof(size)); in dhd_sd_blocksize()
723 return (ret); in dhd_sd_blocksize()
729 int ret; in dhd_sd_mode() local
748 ret = dhd_var_setint(wl, cmd, argv); in dhd_sd_mode()
751 if ((ret = dhd_var_get(wl, cmd, argv))) { in dhd_sd_mode()
752 return (ret); in dhd_sd_mode()
763 return (ret); in dhd_sd_mode()
770 int ret; in dhd_sdreg() local
817 ret = dhd_var_getbuf(dhd, argv[0], &sdreg, sizeof(sdreg), (void**)&ptr); in dhd_sdreg()
818 if (ret >= 0) in dhd_sdreg()
821 ret = dhd_var_setbuf(dhd, argv[0], &sdreg, sizeof(sdreg)); in dhd_sdreg()
824 return (ret); in dhd_sdreg()
830 int ret = -1; in dhd_membytes() local
852 ret = -1; in dhd_membytes()
867 ret = -1; in dhd_membytes()
915 ret = dhd_var_getbuf(dhd, "membytes", in dhd_membytes()
917 if (ret < 0) in dhd_membytes()
935 ret = USAGE_ERROR; in dhd_membytes()
947 ret = USAGE_ERROR; in dhd_membytes()
981 ret = dhd_set(dhd, DHD_SET_VAR, &buf[0], (ptr - buf)); in dhd_membytes()
982 if (ret < 0) in dhd_membytes()
988 return ret; in dhd_membytes()
1093 int ret, i; in dhd_sprom()
1148 if ((ret = file_size(fname)) < 0) in dhd_sprom()
1151 bytes = ret; in dhd_sprom()
1229 ret = dhd_set(dhd, DHD_SET_VAR, buf, in dhd_sprom()
1231 return (ret); in dhd_sprom()
1233 ret = dhd_get(dhd, DHD_GET_VAR, buf, in dhd_sprom()
1235 if (ret < 0) { in dhd_sprom()
1236 return ret; in dhd_sprom()
1332 int ret; in dhd_vars() local
1346 if ((ret = dhd_var_getbuf(dhd, "vars", NULL, 0, (void**)&bufp))) in dhd_vars()
1365 if ((ret = read_vars(vname, bufp, in dhd_vars()
1367 ret = -1; in dhd_vars()
1371 nvram_len = ret; in dhd_vars()
1375 ret = dhd_set(dhd, DHD_SET_VAR, buf, bufp - buf); in dhd_vars()
1381 ret = -1; in dhd_vars()
1385 return ret; in dhd_vars()
1405 int ret; in dhd_load_file_bytes() local
1430 ret = dhd_set(dhd, DHD_SET_VAR, &buf[0], (bufp - buf + len)); in dhd_load_file_bytes()
1432 if (ret) { in dhd_load_file_bytes()
1434 __FUNCTION__, ret, len, start); in dhd_load_file_bytes()
1455 int ret = 0; in dhd_download()
1477 ret = -1; in dhd_download()
1485 ret = -1; in dhd_download()
1493 ret = -1; in dhd_download()
1507 ret = -1; in dhd_download()
1512 ret = -1; in dhd_download()
1520 ret = -1; in dhd_download()
1527 ret = -1; in dhd_download()
1534 ret = -1; in dhd_download()
1560 if ((ret = dhd_var_get(dhd, NULL, memszargs))) { in dhd_download()
1570 ret = -1; in dhd_download()
1576 if ((ret = dhd_iovar_setint(dhd, "download", TRUE))) { in dhd_download()
1588 ret = -1; in dhd_download()
1620 if ((ret = read_vars(vname, bufp, in dhd_download()
1622 ret = -1; in dhd_download()
1626 nvram_len = ret; in dhd_download()
1630 ret = dhd_set(dhd, DHD_SET_VAR, buf, (bufp - buf)); in dhd_download()
1631 if (ret) { in dhd_download()
1633 __FUNCTION__, ret); in dhd_download()
1640 if ((ret = dhd_iovar_setint(dhd, "download", FALSE))) { in dhd_download()
1651 return ret; in dhd_download()
1664 int ret = 0; in dhd_upload()
1685 ret = -1; in dhd_upload()
1693 ret = -1; in dhd_upload()
1704 ret = -1; in dhd_upload()
1709 ret = -1; in dhd_upload()
1713 ret = -1; in dhd_upload()
1721 ret = -1; in dhd_upload()
1725 if ((ret = dhd_var_get(dhd, NULL, memszargs))) { in dhd_upload()
1737 ret = -1; in dhd_upload()
1744 ret = -1; in dhd_upload()
1761 ret = dhd_var_getbuf(dhd, "membytes", params, 2 * sizeof(int), (void**)&ptr); in dhd_upload()
1762 if (ret) { in dhd_upload()
1770 ret = -1; in dhd_upload()
1780 return ret; in dhd_upload()
1787 int ret; in dhd_logstamp() local
1815 ret = dhd_var_setbuf(dhd, cmd->name, valn, argc * sizeof(int)); in dhd_logstamp()
1817 return (ret); in dhd_logstamp()
1823 int ret; in dhd_sd_reg() local
1876 if ((ret = dhd_var_getbuf(dhd, cmd->name, &sdreg, sizeof(sdreg), &ptr)) >= 0) in dhd_sd_reg()
1879 ret = dhd_var_setbuf(dhd, cmd->name, &sdreg, sizeof(sdreg)); in dhd_sd_reg()
1882 return (ret); in dhd_sd_reg()
1914 int ret, i; in dhd_do_msglevel() local
1918 if ((ret = dhd_iovar_getint(dhd, cmd->name, (int*)&msglevel)) < 0) in dhd_do_msglevel()
1919 return (ret); in dhd_do_msglevel()
2002 int ret; in dhd_version() local
2013 if ((ret = dhd_var_getbuf(dhd, cmd->name, NULL, 0, (void**)&ptr)) < 0) in dhd_version()
2014 return ret; in dhd_version()