Lines Matching refs:buf
124 const void *buf, size_t len) in ath6kl_dbg_dump() argument
130 print_hex_dump_bytes(prefix, DUMP_PREFIX_OFFSET, buf, len); in ath6kl_dbg_dump()
135 buf, len); in ath6kl_dbg_dump()
277 char *buf; in read_file_war_stats() local
281 buf = kzalloc(buf_len, GFP_KERNEL); in read_file_war_stats()
282 if (!buf) in read_file_war_stats()
285 len += scnprintf(buf + len, buf_len - len, "\n"); in read_file_war_stats()
286 len += scnprintf(buf + len, buf_len - len, "%25s\n", in read_file_war_stats()
288 len += scnprintf(buf + len, buf_len - len, "%25s\n\n", in read_file_war_stats()
290 len += scnprintf(buf + len, buf_len - len, "%20s %10u\n", in read_file_war_stats()
296 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_war_stats()
298 kfree(buf); in read_file_war_stats()
309 void ath6kl_debug_fwlog_event(struct ath6kl *ar, const void *buf, size_t len) in ath6kl_debug_fwlog_event() argument
327 memcpy(slot->payload, buf, len); in ath6kl_debug_fwlog_event()
378 char *buf; in ath6kl_fwlog_read() local
380 buf = vmalloc(count); in ath6kl_fwlog_read()
381 if (!buf) in ath6kl_fwlog_read()
397 memcpy(buf + len, skb->data, skb->len); in ath6kl_fwlog_read()
407 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_fwlog_read()
409 vfree(buf); in ath6kl_fwlog_read()
431 char *buf; in ath6kl_fwlog_block_read() local
434 buf = vmalloc(count); in ath6kl_fwlog_block_read()
435 if (!buf) in ath6kl_fwlog_block_read()
449 vfree(buf); in ath6kl_fwlog_block_read()
464 memcpy(buf + len, skb->data, skb->len); in ath6kl_fwlog_block_read()
474 not_copied = copy_to_user(user_buf, buf, len); in ath6kl_fwlog_block_read()
485 vfree(buf); in ath6kl_fwlog_block_read()
502 char buf[16]; in ath6kl_fwlog_mask_read() local
505 len = snprintf(buf, sizeof(buf), "0x%x\n", ar->debug.fwlog_mask); in ath6kl_fwlog_mask_read()
507 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_fwlog_mask_read()
544 char *buf; in read_file_tgt_stats() local
556 buf = kzalloc(buf_len, GFP_KERNEL); in read_file_tgt_stats()
557 if (!buf) in read_file_tgt_stats()
561 kfree(buf); in read_file_tgt_stats()
569 kfree(buf); in read_file_tgt_stats()
580 kfree(buf); in read_file_tgt_stats()
584 len += scnprintf(buf + len, buf_len - len, "\n"); in read_file_tgt_stats()
585 len += scnprintf(buf + len, buf_len - len, "%25s\n", in read_file_tgt_stats()
587 len += scnprintf(buf + len, buf_len - len, "%25s\n\n", in read_file_tgt_stats()
589 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
591 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
593 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
595 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
597 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
600 len += scnprintf(buf + len, buf_len - len, in read_file_tgt_stats()
603 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
605 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
607 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
609 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
611 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
613 len += scnprintf(buf + len, buf_len - len, "%25s %10llu\n\n", in read_file_tgt_stats()
617 len += scnprintf(buf + len, buf_len - len, "%25s\n", in read_file_tgt_stats()
619 len += scnprintf(buf + len, buf_len - len, "%25s\n", in read_file_tgt_stats()
622 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
624 len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", in read_file_tgt_stats()
626 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
628 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
630 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
632 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
634 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
636 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
638 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
640 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
642 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
644 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
646 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
648 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
650 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n\n", in read_file_tgt_stats()
653 len += scnprintf(buf + len, buf_len - len, "%25s\n", in read_file_tgt_stats()
655 len += scnprintf(buf + len, buf_len - len, "%25s\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", in read_file_tgt_stats()
661 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", in read_file_tgt_stats()
663 len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", in read_file_tgt_stats()
665 len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", in read_file_tgt_stats()
667 len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", in read_file_tgt_stats()
669 len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", in read_file_tgt_stats()
675 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_tgt_stats()
677 kfree(buf); in read_file_tgt_stats()
689 (len += scnprintf(buf + len, buf_len - len, fmt_str, \
701 char *buf; in read_file_credit_dist_stats() local
707 buf = kzalloc(buf_len, GFP_KERNEL); in read_file_credit_dist_stats()
708 if (!buf) in read_file_credit_dist_stats()
711 len += scnprintf(buf + len, buf_len - len, "%25s%5d\n", in read_file_credit_dist_stats()
714 len += scnprintf(buf + len, buf_len - len, "%25s%5d\n", in read_file_credit_dist_stats()
718 len += scnprintf(buf + len, buf_len - len, in read_file_credit_dist_stats()
734 len += scnprintf(buf + len, buf_len - len, "%12d\n", in read_file_credit_dist_stats()
741 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_credit_dist_stats()
742 kfree(buf); in read_file_credit_dist_stats()
753 static unsigned int print_endpoint_stat(struct htc_target *target, char *buf, in print_endpoint_stat() argument
761 len += scnprintf(buf + len, buf_len - len, "%s:", name); in print_endpoint_stat()
765 len += scnprintf(buf + len, buf_len - len, " %u", *counter); in print_endpoint_stat()
767 len += scnprintf(buf + len, buf_len - len, "\n"); in print_endpoint_stat()
778 char *buf; in ath6kl_endpoint_stats_read() local
784 buf = kmalloc(buf_len, GFP_KERNEL); in ath6kl_endpoint_stats_read()
785 if (!buf) in ath6kl_endpoint_stats_read()
790 len = print_endpoint_stat(target, buf, buf_len, len, \ in ath6kl_endpoint_stats_read()
822 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_endpoint_stats_read()
823 kfree(buf); in ath6kl_endpoint_stats_read()
887 u8 buf[50]; in ath6kl_regread_read() local
891 len += scnprintf(buf + len, sizeof(buf) - len, "0x%x\n", in ath6kl_regread_read()
894 len += scnprintf(buf + len, sizeof(buf) - len, in ath6kl_regread_read()
897 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_regread_read()
932 u8 *buf; in ath6kl_regdump_open() local
949 buf = vmalloc(reg_len); in ath6kl_regdump_open()
950 if (!buf) in ath6kl_regdump_open()
962 len += scnprintf(buf + len, reg_len - len, in ath6kl_regdump_open()
968 len += scnprintf(buf + len, reg_len - len, in ath6kl_regdump_open()
978 len += scnprintf(buf + len, reg_len - len, in ath6kl_regdump_open()
985 file->private_data = buf; in ath6kl_regdump_open()
990 vfree(buf); in ath6kl_regdump_open()
997 u8 *buf = file->private_data; in ath6kl_regdump_read() local
998 return simple_read_from_buffer(user_buf, count, ppos, buf, strlen(buf)); in ath6kl_regdump_read()
1037 char buf[32]; in ath6kl_lrssi_roam_read() local
1040 len = snprintf(buf, sizeof(buf), "%u\n", ar->lrssi_roam_threshold); in ath6kl_lrssi_roam_read()
1042 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_lrssi_roam_read()
1058 u8 buf[32]; in ath6kl_regwrite_read() local
1061 len = scnprintf(buf, sizeof(buf), "Addr: 0x%x Val: 0x%x\n", in ath6kl_regwrite_read()
1064 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_regwrite_read()
1072 char buf[32]; in ath6kl_regwrite_write() local
1077 len = min(count, sizeof(buf) - 1); in ath6kl_regwrite_write()
1078 if (copy_from_user(buf, user_buf, len)) in ath6kl_regwrite_write()
1081 buf[len] = '\0'; in ath6kl_regwrite_write()
1082 sptr = buf; in ath6kl_regwrite_write()
1115 int ath6kl_debug_roam_tbl_event(struct ath6kl *ar, const void *buf, in ath6kl_debug_roam_tbl_event() argument
1124 tbl = (const struct wmi_target_roam_tbl *) buf; in ath6kl_debug_roam_tbl_event()
1138 memcpy(ar->debug.roam_tbl, buf, len); in ath6kl_debug_roam_tbl_event()
1157 char *buf; in ath6kl_roam_table_read() local
1186 buf = kzalloc(buf_len, GFP_KERNEL); in ath6kl_roam_table_read()
1187 if (buf == NULL) in ath6kl_roam_table_read()
1190 len += scnprintf(buf + len, buf_len - len, in ath6kl_roam_table_read()
1197 len += scnprintf(buf + len, buf_len - len, in ath6kl_roam_table_read()
1207 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_roam_table_read()
1209 kfree(buf); in ath6kl_roam_table_read()
1226 char buf[20]; in ath6kl_force_roam_write() local
1230 len = min(count, sizeof(buf) - 1); in ath6kl_force_roam_write()
1231 if (copy_from_user(buf, user_buf, len)) in ath6kl_force_roam_write()
1233 buf[len] = '\0'; in ath6kl_force_roam_write()
1235 if (!mac_pton(buf, bssid)) in ath6kl_force_roam_write()
1258 char buf[20]; in ath6kl_roam_mode_write() local
1262 len = min(count, sizeof(buf) - 1); in ath6kl_roam_mode_write()
1263 if (copy_from_user(buf, user_buf, len)) in ath6kl_roam_mode_write()
1265 buf[len] = '\0'; in ath6kl_roam_mode_write()
1266 if (len > 0 && buf[len - 1] == '\n') in ath6kl_roam_mode_write()
1267 buf[len - 1] = '\0'; in ath6kl_roam_mode_write()
1269 if (strcasecmp(buf, "default") == 0) in ath6kl_roam_mode_write()
1271 else if (strcasecmp(buf, "bssbias") == 0) in ath6kl_roam_mode_write()
1273 else if (strcasecmp(buf, "lock") == 0) in ath6kl_roam_mode_write()
1301 char buf[16]; in ath6kl_keepalive_read() local
1304 len = snprintf(buf, sizeof(buf), "%u\n", ar->debug.keepalive); in ath6kl_keepalive_read()
1306 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_keepalive_read()
1346 char buf[16]; in ath6kl_disconnect_timeout_read() local
1349 len = snprintf(buf, sizeof(buf), "%u\n", ar->debug.disc_timeout); in ath6kl_disconnect_timeout_read()
1351 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_disconnect_timeout_read()
1387 char buf[200]; in ath6kl_create_qos_write() local
1398 len = min(count, sizeof(buf) - 1); in ath6kl_create_qos_write()
1399 if (copy_from_user(buf, user_buf, len)) in ath6kl_create_qos_write()
1401 buf[len] = '\0'; in ath6kl_create_qos_write()
1402 sptr = buf; in ath6kl_create_qos_write()
1565 char buf[100]; in ath6kl_delete_qos_write() local
1575 len = min(count, sizeof(buf) - 1); in ath6kl_delete_qos_write()
1576 if (copy_from_user(buf, user_buf, len)) in ath6kl_delete_qos_write()
1578 buf[len] = '\0'; in ath6kl_delete_qos_write()
1579 sptr = buf; in ath6kl_delete_qos_write()
1613 char buf[32]; in ath6kl_bgscan_int_write() local
1620 len = min(count, sizeof(buf) - 1); in ath6kl_bgscan_int_write()
1621 if (copy_from_user(buf, user_buf, len)) in ath6kl_bgscan_int_write()
1624 buf[len] = '\0'; in ath6kl_bgscan_int_write()
1625 if (kstrtou16(buf, 0, &bgscan_int)) in ath6kl_bgscan_int_write()
1653 char buf[32]; in ath6kl_listen_int_write() local
1660 len = min(count, sizeof(buf) - 1); in ath6kl_listen_int_write()
1661 if (copy_from_user(buf, user_buf, len)) in ath6kl_listen_int_write()
1664 buf[len] = '\0'; in ath6kl_listen_int_write()
1665 if (kstrtou16(buf, 0, &listen_interval)) in ath6kl_listen_int_write()
1684 char buf[32]; in ath6kl_listen_int_read() local
1691 len = scnprintf(buf, sizeof(buf), "%u\n", vif->listen_intvl_t); in ath6kl_listen_int_read()
1693 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath6kl_listen_int_read()
1709 u8 buf[100]; in ath6kl_power_params_write() local
1715 len = min(count, sizeof(buf) - 1); in ath6kl_power_params_write()
1716 if (copy_from_user(buf, user_buf, len)) in ath6kl_power_params_write()
1718 buf[len] = '\0'; in ath6kl_power_params_write()
1719 sptr = buf; in ath6kl_power_params_write()