Lines Matching refs:buf
151 const void *buf, size_t len) in ath6kl_dbg_dump() argument
157 print_hex_dump_bytes(prefix, DUMP_PREFIX_OFFSET, buf, len); in ath6kl_dbg_dump()
162 buf, len); in ath6kl_dbg_dump()
304 char *buf; in read_file_war_stats() local
308 buf = kzalloc(buf_len, GFP_KERNEL); in read_file_war_stats()
309 if (!buf) in read_file_war_stats()
312 len += scnprintf(buf + len, buf_len - len, "\n"); in read_file_war_stats()
313 len += scnprintf(buf + len, buf_len - len, "%25s\n", in read_file_war_stats()
315 len += scnprintf(buf + len, buf_len - len, "%25s\n\n", in read_file_war_stats()
317 len += scnprintf(buf + len, buf_len - len, "%20s %10u\n", in read_file_war_stats()
323 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_war_stats()
325 kfree(buf); in read_file_war_stats()
336 void ath6kl_debug_fwlog_event(struct ath6kl *ar, const void *buf, size_t len) in ath6kl_debug_fwlog_event() argument
354 memcpy(slot->payload, buf, len); in ath6kl_debug_fwlog_event()
405 char *buf; in ath6kl_fwlog_read() local
407 buf = vmalloc(count); in ath6kl_fwlog_read()
408 if (!buf) in ath6kl_fwlog_read()
424 memcpy(buf + len, skb->data, skb->len); in ath6kl_fwlog_read()
434 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_fwlog_read()
436 vfree(buf); in ath6kl_fwlog_read()
458 char *buf; in ath6kl_fwlog_block_read() local
461 buf = vmalloc(count); in ath6kl_fwlog_block_read()
462 if (!buf) in ath6kl_fwlog_block_read()
476 vfree(buf); in ath6kl_fwlog_block_read()
491 memcpy(buf + len, skb->data, skb->len); in ath6kl_fwlog_block_read()
501 not_copied = copy_to_user(user_buf, buf, len); in ath6kl_fwlog_block_read()
512 vfree(buf); in ath6kl_fwlog_block_read()
529 char buf[16]; in ath6kl_fwlog_mask_read() local
532 len = snprintf(buf, sizeof(buf), "0x%x\n", ar->debug.fwlog_mask); in ath6kl_fwlog_mask_read()
534 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_fwlog_mask_read()
571 char *buf; in read_file_tgt_stats() local
581 buf = kzalloc(buf_len, GFP_KERNEL); in read_file_tgt_stats()
582 if (!buf) in read_file_tgt_stats()
587 kfree(buf); in read_file_tgt_stats()
593 len += scnprintf(buf + len, buf_len - len, "\n"); in read_file_tgt_stats()
594 len += scnprintf(buf + len, buf_len - len, "%25s\n", in read_file_tgt_stats()
596 len += scnprintf(buf + len, buf_len - len, "%25s\n\n", in read_file_tgt_stats()
598 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
600 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
602 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
604 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
606 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
609 len += scnprintf(buf + len, buf_len - len, in read_file_tgt_stats()
612 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
614 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
616 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
618 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
620 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
622 len += scnprintf(buf + len, buf_len - len, "%25s %10llu\n\n", in read_file_tgt_stats()
626 len += scnprintf(buf + len, buf_len - len, "%25s\n", in read_file_tgt_stats()
628 len += scnprintf(buf + len, buf_len - len, "%25s\n", in read_file_tgt_stats()
631 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
633 len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", in read_file_tgt_stats()
635 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
637 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
639 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
641 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
643 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
645 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
647 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
649 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
651 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
653 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
655 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
657 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
659 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n\n", in read_file_tgt_stats()
662 len += scnprintf(buf + len, buf_len - len, "%25s\n", in read_file_tgt_stats()
664 len += scnprintf(buf + len, buf_len - len, "%25s\n", in read_file_tgt_stats()
666 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
668 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
670 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
672 len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", in read_file_tgt_stats()
674 len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", in read_file_tgt_stats()
676 len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", in read_file_tgt_stats()
678 len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", in read_file_tgt_stats()
684 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_tgt_stats()
686 kfree(buf); in read_file_tgt_stats()
698 (len += scnprintf(buf + len, buf_len - len, fmt_str, \
710 char *buf; in read_file_credit_dist_stats() local
716 buf = kzalloc(buf_len, GFP_KERNEL); in read_file_credit_dist_stats()
717 if (!buf) in read_file_credit_dist_stats()
720 len += scnprintf(buf + len, buf_len - len, "%25s%5d\n", in read_file_credit_dist_stats()
723 len += scnprintf(buf + len, buf_len - len, "%25s%5d\n", in read_file_credit_dist_stats()
727 len += scnprintf(buf + len, buf_len - len, in read_file_credit_dist_stats()
743 len += scnprintf(buf + len, buf_len - len, "%12d\n", in read_file_credit_dist_stats()
750 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_credit_dist_stats()
751 kfree(buf); in read_file_credit_dist_stats()
762 static unsigned int print_endpoint_stat(struct htc_target *target, char *buf, in print_endpoint_stat() argument
770 len += scnprintf(buf + len, buf_len - len, "%s:", name); in print_endpoint_stat()
774 len += scnprintf(buf + len, buf_len - len, " %u", *counter); in print_endpoint_stat()
776 len += scnprintf(buf + len, buf_len - len, "\n"); in print_endpoint_stat()
787 char *buf; in ath6kl_endpoint_stats_read() local
793 buf = kmalloc(buf_len, GFP_KERNEL); in ath6kl_endpoint_stats_read()
794 if (!buf) in ath6kl_endpoint_stats_read()
799 len = print_endpoint_stat(target, buf, buf_len, len, \ in ath6kl_endpoint_stats_read()
831 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_endpoint_stats_read()
832 kfree(buf); in ath6kl_endpoint_stats_read()
896 u8 buf[50]; in ath6kl_regread_read() local
900 len += scnprintf(buf + len, sizeof(buf) - len, "0x%x\n", in ath6kl_regread_read()
903 len += scnprintf(buf + len, sizeof(buf) - len, in ath6kl_regread_read()
906 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_regread_read()
941 u8 *buf; in ath6kl_regdump_open() local
958 buf = vmalloc(reg_len); in ath6kl_regdump_open()
959 if (!buf) in ath6kl_regdump_open()
971 len += scnprintf(buf + len, reg_len - len, in ath6kl_regdump_open()
977 len += scnprintf(buf + len, reg_len - len, in ath6kl_regdump_open()
987 len += scnprintf(buf + len, reg_len - len, in ath6kl_regdump_open()
994 file->private_data = buf; in ath6kl_regdump_open()
999 vfree(buf); in ath6kl_regdump_open()
1006 u8 *buf = file->private_data; in ath6kl_regdump_read() local
1007 return simple_read_from_buffer(user_buf, count, ppos, buf, strlen(buf)); in ath6kl_regdump_read()
1046 char buf[32]; in ath6kl_lrssi_roam_read() local
1049 len = snprintf(buf, sizeof(buf), "%u\n", ar->lrssi_roam_threshold); in ath6kl_lrssi_roam_read()
1051 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_lrssi_roam_read()
1067 u8 buf[32]; in ath6kl_regwrite_read() local
1070 len = scnprintf(buf, sizeof(buf), "Addr: 0x%x Val: 0x%x\n", in ath6kl_regwrite_read()
1073 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_regwrite_read()
1081 char buf[32]; in ath6kl_regwrite_write() local
1086 len = min(count, sizeof(buf) - 1); in ath6kl_regwrite_write()
1087 if (copy_from_user(buf, user_buf, len)) in ath6kl_regwrite_write()
1090 buf[len] = '\0'; in ath6kl_regwrite_write()
1091 sptr = buf; in ath6kl_regwrite_write()
1124 int ath6kl_debug_roam_tbl_event(struct ath6kl *ar, const void *buf, in ath6kl_debug_roam_tbl_event() argument
1133 tbl = (const struct wmi_target_roam_tbl *) buf; in ath6kl_debug_roam_tbl_event()
1147 memcpy(ar->debug.roam_tbl, buf, len); in ath6kl_debug_roam_tbl_event()
1166 char *buf; in ath6kl_roam_table_read() local
1195 buf = kzalloc(buf_len, GFP_KERNEL); in ath6kl_roam_table_read()
1196 if (buf == NULL) in ath6kl_roam_table_read()
1199 len += scnprintf(buf + len, buf_len - len, in ath6kl_roam_table_read()
1206 len += scnprintf(buf + len, buf_len - len, in ath6kl_roam_table_read()
1216 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_roam_table_read()
1218 kfree(buf); in ath6kl_roam_table_read()
1235 char buf[20]; in ath6kl_force_roam_write() local
1239 len = min(count, sizeof(buf) - 1); in ath6kl_force_roam_write()
1240 if (copy_from_user(buf, user_buf, len)) in ath6kl_force_roam_write()
1242 buf[len] = '\0'; in ath6kl_force_roam_write()
1244 if (!mac_pton(buf, bssid)) in ath6kl_force_roam_write()
1267 char buf[20]; in ath6kl_roam_mode_write() local
1271 len = min(count, sizeof(buf) - 1); in ath6kl_roam_mode_write()
1272 if (copy_from_user(buf, user_buf, len)) in ath6kl_roam_mode_write()
1274 buf[len] = '\0'; in ath6kl_roam_mode_write()
1275 if (len > 0 && buf[len - 1] == '\n') in ath6kl_roam_mode_write()
1276 buf[len - 1] = '\0'; in ath6kl_roam_mode_write()
1278 if (strcasecmp(buf, "default") == 0) in ath6kl_roam_mode_write()
1280 else if (strcasecmp(buf, "bssbias") == 0) in ath6kl_roam_mode_write()
1282 else if (strcasecmp(buf, "lock") == 0) in ath6kl_roam_mode_write()
1310 char buf[16]; in ath6kl_keepalive_read() local
1313 len = snprintf(buf, sizeof(buf), "%u\n", ar->debug.keepalive); in ath6kl_keepalive_read()
1315 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_keepalive_read()
1355 char buf[16]; in ath6kl_disconnect_timeout_read() local
1358 len = snprintf(buf, sizeof(buf), "%u\n", ar->debug.disc_timeout); in ath6kl_disconnect_timeout_read()
1360 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_disconnect_timeout_read()
1396 char buf[200]; in ath6kl_create_qos_write() local
1407 len = min(count, sizeof(buf) - 1); in ath6kl_create_qos_write()
1408 if (copy_from_user(buf, user_buf, len)) in ath6kl_create_qos_write()
1410 buf[len] = '\0'; in ath6kl_create_qos_write()
1411 sptr = buf; in ath6kl_create_qos_write()
1574 char buf[100]; in ath6kl_delete_qos_write() local
1584 len = min(count, sizeof(buf) - 1); in ath6kl_delete_qos_write()
1585 if (copy_from_user(buf, user_buf, len)) in ath6kl_delete_qos_write()
1587 buf[len] = '\0'; in ath6kl_delete_qos_write()
1588 sptr = buf; in ath6kl_delete_qos_write()
1622 char buf[32]; in ath6kl_bgscan_int_write() local
1629 len = min(count, sizeof(buf) - 1); in ath6kl_bgscan_int_write()
1630 if (copy_from_user(buf, user_buf, len)) in ath6kl_bgscan_int_write()
1633 buf[len] = '\0'; in ath6kl_bgscan_int_write()
1634 if (kstrtou16(buf, 0, &bgscan_int)) in ath6kl_bgscan_int_write()
1662 char buf[32]; in ath6kl_listen_int_write() local
1669 len = min(count, sizeof(buf) - 1); in ath6kl_listen_int_write()
1670 if (copy_from_user(buf, user_buf, len)) in ath6kl_listen_int_write()
1673 buf[len] = '\0'; in ath6kl_listen_int_write()
1674 if (kstrtou16(buf, 0, &listen_interval)) in ath6kl_listen_int_write()
1693 char buf[32]; in ath6kl_listen_int_read() local
1700 len = scnprintf(buf, sizeof(buf), "%u\n", vif->listen_intvl_t); in ath6kl_listen_int_read()
1702 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_listen_int_read()
1718 u8 buf[100]; in ath6kl_power_params_write() local
1724 len = min(count, sizeof(buf) - 1); in ath6kl_power_params_write()
1725 if (copy_from_user(buf, user_buf, len)) in ath6kl_power_params_write()
1727 buf[len] = '\0'; in ath6kl_power_params_write()
1728 sptr = buf; in ath6kl_power_params_write()