Lines Matching refs:buf

203 	char *buf;  in ath10k_read_wmi_services()  local
210 buf = kzalloc(buf_len, GFP_KERNEL); in ath10k_read_wmi_services()
211 if (!buf) in ath10k_read_wmi_services()
226 len += scnprintf(buf + len, buf_len - len, in ath10k_read_wmi_services()
233 len += scnprintf(buf + len, buf_len - len, in ath10k_read_wmi_services()
239 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath10k_read_wmi_services()
243 kfree(buf); in ath10k_read_wmi_services()
419 void *buf = NULL; in ath10k_fw_stats_open() local
429 buf = vmalloc(ATH10K_FW_STATS_BUF_SIZE); in ath10k_fw_stats_open()
430 if (!buf) { in ath10k_fw_stats_open()
441 ret = ath10k_wmi_fw_stats_fill(ar, &ar->debug.fw_stats, buf); in ath10k_fw_stats_open()
447 file->private_data = buf; in ath10k_fw_stats_open()
453 vfree(buf); in ath10k_fw_stats_open()
470 const char *buf = file->private_data; in ath10k_fw_stats_read() local
471 unsigned int len = strlen(buf); in ath10k_fw_stats_read()
473 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath10k_fw_stats_read()
490 char *buf; in ath10k_debug_fw_reset_stats_read() local
493 buf = kmalloc(buf_len, GFP_KERNEL); in ath10k_debug_fw_reset_stats_read()
494 if (!buf) in ath10k_debug_fw_reset_stats_read()
500 len += scnprintf(buf + len, buf_len - len, in ath10k_debug_fw_reset_stats_read()
502 len += scnprintf(buf + len, buf_len - len, in ath10k_debug_fw_reset_stats_read()
505 len += scnprintf(buf + len, buf_len - len, in ath10k_debug_fw_reset_stats_read()
511 ret = simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath10k_debug_fw_reset_stats_read()
513 kfree(buf); in ath10k_debug_fw_reset_stats_read()
549 const char buf[] = in ath10k_read_simulate_fw_crash() local
556 return simple_read_from_buffer(user_buf, count, ppos, buf, strlen(buf)); in ath10k_read_simulate_fw_crash()
571 char buf[32]; in ath10k_write_simulate_fw_crash() local
576 simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, user_buf, count); in ath10k_write_simulate_fw_crash()
579 buf[sizeof(buf) - 1] = 0; in ath10k_write_simulate_fw_crash()
588 if (buf[count - 1] == '\n') { in ath10k_write_simulate_fw_crash()
589 buf[count - 1] = 0; in ath10k_write_simulate_fw_crash()
593 if (!strcmp(buf, "soft")) { in ath10k_write_simulate_fw_crash()
596 } else if (!strcmp(buf, "hard")) { in ath10k_write_simulate_fw_crash()
604 } else if (!strcmp(buf, "assert")) { in ath10k_write_simulate_fw_crash()
607 } else if (!strcmp(buf, "hw-restart")) { in ath10k_write_simulate_fw_crash()
641 char buf[50]; in ath10k_read_chip_id() local
643 len = scnprintf(buf, sizeof(buf), "0x%08x\n", ar->chip_id); in ath10k_read_chip_id()
645 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath10k_read_chip_id()
677 unsigned char *buf; in ath10k_build_dump_file() local
687 buf = vzalloc(len); in ath10k_build_dump_file()
688 if (!buf) in ath10k_build_dump_file()
695 vfree(buf); in ath10k_build_dump_file()
699 dump_data = (struct ath10k_dump_file_data *)(buf); in ath10k_build_dump_file()
732 dump_tlv = (struct ath10k_tlv_dump_data *)(buf + sofar); in ath10k_build_dump_file()
792 u8 buf[32]; in ath10k_reg_addr_read() local
800 len += scnprintf(buf + len, sizeof(buf) - len, "0x%x\n", reg_addr); in ath10k_reg_addr_read()
802 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath10k_reg_addr_read()
840 u8 buf[48]; in ath10k_reg_value_read() local
856 len = scnprintf(buf, sizeof(buf), "0x%08x:0x%08x\n", reg_addr, reg_val); in ath10k_reg_value_read()
858 ret = simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath10k_reg_value_read()
911 u8 *buf; in ath10k_mem_value_read() local
922 buf = vmalloc(count); in ath10k_mem_value_read()
923 if (!buf) { in ath10k_mem_value_read()
934 ret = ath10k_hif_diag_read(ar, *ppos, buf, count); in ath10k_mem_value_read()
941 ret = copy_to_user(user_buf, buf, count); in ath10k_mem_value_read()
952 vfree(buf); in ath10k_mem_value_read()
963 u8 *buf; in ath10k_mem_value_write() local
974 buf = vmalloc(count); in ath10k_mem_value_write()
975 if (!buf) { in ath10k_mem_value_write()
986 ret = copy_from_user(buf, user_buf, count); in ath10k_mem_value_write()
992 ret = ath10k_hif_diag_write(ar, *ppos, buf, count); in ath10k_mem_value_write()
1003 vfree(buf); in ath10k_mem_value_write()
1063 char buf[32]; in ath10k_read_htt_stats_mask() local
1066 len = scnprintf(buf, sizeof(buf), "%lu\n", ar->debug.htt_stats_mask); in ath10k_read_htt_stats_mask()
1068 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath10k_read_htt_stats_mask()
1116 char buf[64]; in ath10k_read_htt_max_amsdu_ampdu() local
1126 len = scnprintf(buf, sizeof(buf), "%u %u\n", amsdu, ampdu); in ath10k_read_htt_max_amsdu_ampdu()
1128 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath10k_read_htt_max_amsdu_ampdu()
1137 char buf[64]; in ath10k_write_htt_max_amsdu_ampdu() local
1140 simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, user_buf, count); in ath10k_write_htt_max_amsdu_ampdu()
1143 buf[sizeof(buf) - 1] = 0; in ath10k_write_htt_max_amsdu_ampdu()
1145 res = sscanf(buf, "%u %u", &amsdu, &ampdu); in ath10k_write_htt_max_amsdu_ampdu()
1179 char buf[64]; in ath10k_read_fw_dbglog() local
1181 len = scnprintf(buf, sizeof(buf), "0x%08x %u\n", in ath10k_read_fw_dbglog()
1184 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath10k_read_fw_dbglog()
1193 char buf[64]; in ath10k_write_fw_dbglog() local
1196 simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, user_buf, count); in ath10k_write_fw_dbglog()
1199 buf[sizeof(buf) - 1] = 0; in ath10k_write_fw_dbglog()
1201 ret = sscanf(buf, "%x %u", &mask, &log_level); in ath10k_write_fw_dbglog()
1404 void *buf; in ath10k_debug_cal_data_open() local
1417 buf = vmalloc(QCA988X_CAL_DATA_LEN); in ath10k_debug_cal_data_open()
1418 if (!buf) { in ath10k_debug_cal_data_open()
1431 ret = ath10k_hif_diag_read(ar, le32_to_cpu(addr), buf, in ath10k_debug_cal_data_open()
1438 file->private_data = buf; in ath10k_debug_cal_data_open()
1445 vfree(buf); in ath10k_debug_cal_data_open()
1457 void *buf = file->private_data; in ath10k_debug_cal_data_read() local
1460 buf, QCA988X_CAL_DATA_LEN); in ath10k_debug_cal_data_read()
1510 char buf[32]; in ath10k_read_ani_enable() local
1512 len = scnprintf(buf, sizeof(buf) - len, "%d\n", in ath10k_read_ani_enable()
1515 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath10k_read_ani_enable()
1540 char buf[32]; in ath10k_read_nf_cal_period() local
1542 len = scnprintf(buf, sizeof(buf), "%d\n", in ath10k_read_nf_cal_period()
1545 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath10k_read_nf_cal_period()
1639 unsigned int j, char *buf, unsigned int *len) in ath10k_tpc_stats_print() argument
1655 *len += scnprintf(buf + *len, buf_len - *len, in ath10k_tpc_stats_print()
1657 *len += scnprintf(buf + *len, buf_len - *len, in ath10k_tpc_stats_print()
1660 *len += scnprintf(buf + *len, buf_len - *len, in ath10k_tpc_stats_print()
1662 *len += scnprintf(buf + *len, buf_len - *len, in ath10k_tpc_stats_print()
1666 *len += scnprintf(buf + *len, buf_len - *len, in ath10k_tpc_stats_print()
1673 *len += scnprintf(buf + *len, buf_len - *len, in ath10k_tpc_stats_print()
1679 char *buf) in ath10k_tpc_stats_fill() argument
1693 len += scnprintf(buf + len, buf_len - len, "\n"); in ath10k_tpc_stats_fill()
1694 len += scnprintf(buf + len, buf_len - len, in ath10k_tpc_stats_fill()
1696 len += scnprintf(buf + len, buf_len - len, in ath10k_tpc_stats_fill()
1700 len += scnprintf(buf + len, buf_len - len, in ath10k_tpc_stats_fill()
1702 len += scnprintf(buf + len, buf_len - len, in ath10k_tpc_stats_fill()
1706 len += scnprintf(buf + len, buf_len - len, in ath10k_tpc_stats_fill()
1710 len += scnprintf(buf + len, buf_len - len, in ath10k_tpc_stats_fill()
1714 len += scnprintf(buf + len, buf_len - len, in ath10k_tpc_stats_fill()
1723 len += scnprintf(buf + len, buf_len - len, in ath10k_tpc_stats_fill()
1728 ath10k_tpc_stats_print(tpc_stats, j, buf, &len); in ath10k_tpc_stats_fill()
1732 len += scnprintf(buf + len, buf_len - len, in ath10k_tpc_stats_fill()
1737 ath10k_tpc_stats_print(tpc_stats, j, buf, &len); in ath10k_tpc_stats_fill()
1741 len += scnprintf(buf + len, buf_len - len, in ath10k_tpc_stats_fill()
1746 ath10k_tpc_stats_print(tpc_stats, j, buf, &len); in ath10k_tpc_stats_fill()
1749 len += scnprintf(buf + len, buf_len - len, in ath10k_tpc_stats_fill()
1759 buf[len - 1] = 0; in ath10k_tpc_stats_fill()
1761 buf[len] = 0; in ath10k_tpc_stats_fill()
1767 void *buf = NULL; in ath10k_tpc_stats_open() local
1777 buf = vmalloc(ATH10K_TPC_CONFIG_BUF_SIZE); in ath10k_tpc_stats_open()
1778 if (!buf) { in ath10k_tpc_stats_open()
1790 ath10k_tpc_stats_fill(ar, ar->debug.tpc_stats, buf); in ath10k_tpc_stats_open()
1791 file->private_data = buf; in ath10k_tpc_stats_open()
1797 vfree(buf); in ath10k_tpc_stats_open()
1814 const char *buf = file->private_data; in ath10k_tpc_stats_read() local
1815 unsigned int len = strlen(buf); in ath10k_tpc_stats_read()
1817 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath10k_tpc_stats_read()
1909 len += scnprintf(buf + len, size - len, "%-28s : %10u\n", s, \
1913 len += scnprintf(buf + len, size - len, "%-28s : %10u\n", s, \
1922 char *buf; in ath10k_read_dfs_stats() local
1924 buf = kzalloc(size, GFP_KERNEL); in ath10k_read_dfs_stats()
1925 if (buf == NULL) in ath10k_read_dfs_stats()
1929 len += scnprintf(buf + len, size - len, "DFS not enabled\n"); in ath10k_read_dfs_stats()
1936 len += scnprintf(buf + len, size - len, "Pulse detector statistics:\n"); in ath10k_read_dfs_stats()
1944 len += scnprintf(buf + len, size - len, "Global Pool statistics:\n"); in ath10k_read_dfs_stats()
1957 retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath10k_read_dfs_stats()
1958 kfree(buf); in ath10k_read_dfs_stats()
2020 char buf[32]; in ath10k_read_pktlog_filter() local
2025 len = scnprintf(buf, sizeof(buf) - len, "%08x\n", in ath10k_read_pktlog_filter()
2029 return simple_read_from_buffer(ubuf, count, ppos, buf, len); in ath10k_read_pktlog_filter()
2064 char buf[32]; in ath10k_read_quiet_period() local
2069 len = scnprintf(buf, sizeof(buf) - len, "%d\n", in ath10k_read_quiet_period()
2073 return simple_read_from_buffer(ubuf, count, ppos, buf, len); in ath10k_read_quiet_period()
2225 const void *buf, size_t len) in ath10k_dbg_dump() argument
2235 for (ptr = buf; (ptr - buf) < len; ptr += 16) { in ath10k_dbg_dump()
2241 (unsigned int)(ptr - buf)); in ath10k_dbg_dump()
2242 hex_dump_to_buffer(ptr, len - (ptr - buf), 16, 1, in ath10k_dbg_dump()
2251 buf, len); in ath10k_dbg_dump()