Lines Matching refs:buf
179 char buf[500]; in read_file_beacon() local
185 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_beacon()
190 len += scnprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\n", in read_file_beacon()
193 len += scnprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\n\n", in read_file_beacon()
197 len += scnprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", in read_file_beacon()
201 len += scnprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", in read_file_beacon()
205 len += scnprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", in read_file_beacon()
209 len += scnprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", in read_file_beacon()
213 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_beacon()
217 if (len > sizeof(buf)) in read_file_beacon()
218 len = sizeof(buf); in read_file_beacon()
220 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_beacon()
228 char buf[20]; in write_file_beacon() local
230 count = min_t(size_t, count, sizeof(buf) - 1); in write_file_beacon()
231 if (copy_from_user(buf, userbuf, count)) in write_file_beacon()
234 buf[count] = '\0'; in write_file_beacon()
235 if (strncmp(buf, "disable", 7) == 0) { in write_file_beacon()
238 } else if (strncmp(buf, "enable", 6) == 0) { in write_file_beacon()
300 char buf[700]; in read_file_debug() local
304 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_debug()
308 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_debug()
313 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_debug()
318 if (len > sizeof(buf)) in read_file_debug()
319 len = sizeof(buf); in read_file_debug()
321 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_debug()
330 char buf[20]; in write_file_debug() local
332 count = min_t(size_t, count, sizeof(buf) - 1); in write_file_debug()
333 if (copy_from_user(buf, userbuf, count)) in write_file_debug()
336 buf[count] = '\0'; in write_file_debug()
338 if (strncmp(buf, dbg_info[i].name, in write_file_debug()
362 char buf[700]; in read_file_antenna() local
367 len += scnprintf(buf + len, sizeof(buf) - len, "antenna mode\t%d\n", in read_file_antenna()
369 len += scnprintf(buf + len, sizeof(buf) - len, "default antenna\t%d\n", in read_file_antenna()
371 len += scnprintf(buf + len, sizeof(buf) - len, "tx antenna\t%d\n", in read_file_antenna()
374 len += scnprintf(buf + len, sizeof(buf) - len, "\nANTENNA\t\tRX\tTX\n"); in read_file_antenna()
376 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_antenna()
380 len += scnprintf(buf + len, sizeof(buf) - len, "[invalid]\t%d\t%d\n", in read_file_antenna()
384 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_antenna()
388 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_antenna()
391 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_antenna()
394 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_antenna()
397 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_antenna()
402 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_antenna()
407 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_antenna()
412 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_antenna()
417 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_antenna()
420 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_antenna()
423 if (len > sizeof(buf)) in read_file_antenna()
424 len = sizeof(buf); in read_file_antenna()
426 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_antenna()
435 char buf[20]; in write_file_antenna() local
437 count = min_t(size_t, count, sizeof(buf) - 1); in write_file_antenna()
438 if (copy_from_user(buf, userbuf, count)) in write_file_antenna()
441 buf[count] = '\0'; in write_file_antenna()
442 if (strncmp(buf, "diversity", 9) == 0) { in write_file_antenna()
445 } else if (strncmp(buf, "fixed-a", 7) == 0) { in write_file_antenna()
448 } else if (strncmp(buf, "fixed-b", 7) == 0) { in write_file_antenna()
451 } else if (strncmp(buf, "clear", 5) == 0) { in write_file_antenna()
475 char buf[700]; in read_file_misc() local
479 len += scnprintf(buf + len, sizeof(buf) - len, "bssid-mask: %pM\n", in read_file_misc()
481 len += scnprintf(buf + len, sizeof(buf) - len, "filter-flags: 0x%x ", in read_file_misc()
484 len += scnprintf(buf + len, sizeof(buf) - len, " UCAST"); in read_file_misc()
486 len += scnprintf(buf + len, sizeof(buf) - len, " MCAST"); in read_file_misc()
488 len += scnprintf(buf + len, sizeof(buf) - len, " BCAST"); in read_file_misc()
490 len += scnprintf(buf + len, sizeof(buf) - len, " CONTROL"); in read_file_misc()
492 len += scnprintf(buf + len, sizeof(buf) - len, " BEACON"); in read_file_misc()
494 len += scnprintf(buf + len, sizeof(buf) - len, " PROM"); in read_file_misc()
496 len += scnprintf(buf + len, sizeof(buf) - len, " XRPOLL"); in read_file_misc()
498 len += scnprintf(buf + len, sizeof(buf) - len, " PROBEREQ"); in read_file_misc()
500 len += scnprintf(buf + len, sizeof(buf) - len, " PHYERR-5212"); in read_file_misc()
502 len += scnprintf(buf + len, sizeof(buf) - len, " RADARERR-5212"); in read_file_misc()
504 snprintf(buf + len, sizeof(buf) - len, " PHYERR-5211"); in read_file_misc()
506 len += scnprintf(buf + len, sizeof(buf) - len, " RADARERR-5211"); in read_file_misc()
508 len += scnprintf(buf + len, sizeof(buf) - len, "\nopmode: %s (%d)\n", in read_file_misc()
511 if (len > sizeof(buf)) in read_file_misc()
512 len = sizeof(buf); in read_file_misc()
514 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_misc()
531 char buf[700]; in read_file_frameerrors() local
535 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_frameerrors()
537 len += scnprintf(buf + len, sizeof(buf) - len, "CRC\t%u\t(%u%%)\n", in read_file_frameerrors()
541 len += scnprintf(buf + len, sizeof(buf) - len, "PHY\t%u\t(%u%%)\n", in read_file_frameerrors()
547 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_frameerrors()
552 len += scnprintf(buf + len, sizeof(buf) - len, "FIFO\t%u\t(%u%%)\n", in read_file_frameerrors()
556 len += scnprintf(buf + len, sizeof(buf) - len, "decrypt\t%u\t(%u%%)\n", in read_file_frameerrors()
560 len += scnprintf(buf + len, sizeof(buf) - len, "MIC\t%u\t(%u%%)\n", in read_file_frameerrors()
564 len += scnprintf(buf + len, sizeof(buf) - len, "process\t%u\t(%u%%)\n", in read_file_frameerrors()
568 len += scnprintf(buf + len, sizeof(buf) - len, "jumbo\t%u\t(%u%%)\n", in read_file_frameerrors()
572 len += scnprintf(buf + len, sizeof(buf) - len, "[RX all\t%u]\n", in read_file_frameerrors()
574 len += scnprintf(buf + len, sizeof(buf) - len, "RX-all-bytes\t%u\n", in read_file_frameerrors()
577 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_frameerrors()
579 len += scnprintf(buf + len, sizeof(buf) - len, "retry\t%u\t(%u%%)\n", in read_file_frameerrors()
583 len += scnprintf(buf + len, sizeof(buf) - len, "FIFO\t%u\t(%u%%)\n", in read_file_frameerrors()
587 len += scnprintf(buf + len, sizeof(buf) - len, "filter\t%u\t(%u%%)\n", in read_file_frameerrors()
591 len += scnprintf(buf + len, sizeof(buf) - len, "[TX all\t%u]\n", in read_file_frameerrors()
593 len += scnprintf(buf + len, sizeof(buf) - len, "TX-all-bytes\t%u\n", in read_file_frameerrors()
596 if (len > sizeof(buf)) in read_file_frameerrors()
597 len = sizeof(buf); in read_file_frameerrors()
599 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_frameerrors()
608 char buf[20]; in write_file_frameerrors() local
610 count = min_t(size_t, count, sizeof(buf) - 1); in write_file_frameerrors()
611 if (copy_from_user(buf, userbuf, count)) in write_file_frameerrors()
614 buf[count] = '\0'; in write_file_frameerrors()
615 if (strncmp(buf, "clear", 5) == 0) { in write_file_frameerrors()
651 char buf[700]; in read_file_ani() local
654 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
658 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
661 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
663 len += scnprintf(buf + len, sizeof(buf) - len, "operating mode:\t\t\t"); in read_file_ani()
666 len += scnprintf(buf + len, sizeof(buf) - len, "OFF\n"); in read_file_ani()
669 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
673 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
677 len += scnprintf(buf + len, sizeof(buf) - len, "AUTO\n"); in read_file_ani()
680 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
684 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
687 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
690 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
693 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
696 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
700 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
703 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
712 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
715 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
718 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
722 len += scnprintf(buf + len, sizeof(buf) - len, "profcnt cycles\t\t%u\n", in read_file_ani()
724 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
727 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
731 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
735 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
740 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_ani()
746 if (len > sizeof(buf)) in read_file_ani()
747 len = sizeof(buf); in read_file_ani()
749 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_ani()
757 char buf[20]; in write_file_ani() local
759 count = min_t(size_t, count, sizeof(buf) - 1); in write_file_ani()
760 if (copy_from_user(buf, userbuf, count)) in write_file_ani()
763 buf[count] = '\0'; in write_file_ani()
764 if (strncmp(buf, "sens-low", 8) == 0) { in write_file_ani()
766 } else if (strncmp(buf, "sens-high", 9) == 0) { in write_file_ani()
768 } else if (strncmp(buf, "ani-off", 7) == 0) { in write_file_ani()
770 } else if (strncmp(buf, "ani-on", 6) == 0) { in write_file_ani()
772 } else if (strncmp(buf, "noise-low", 9) == 0) { in write_file_ani()
774 } else if (strncmp(buf, "noise-high", 10) == 0) { in write_file_ani()
777 } else if (strncmp(buf, "spur-low", 8) == 0) { in write_file_ani()
779 } else if (strncmp(buf, "spur-high", 9) == 0) { in write_file_ani()
782 } else if (strncmp(buf, "fir-low", 7) == 0) { in write_file_ani()
784 } else if (strncmp(buf, "fir-high", 8) == 0) { in write_file_ani()
786 } else if (strncmp(buf, "ofdm-off", 8) == 0) { in write_file_ani()
788 } else if (strncmp(buf, "ofdm-on", 7) == 0) { in write_file_ani()
790 } else if (strncmp(buf, "cck-off", 7) == 0) { in write_file_ani()
792 } else if (strncmp(buf, "cck-on", 6) == 0) { in write_file_ani()
813 char buf[700]; in read_file_queue() local
820 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_queue()
826 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_queue()
838 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_queue()
840 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_queue()
844 if (len > sizeof(buf)) in read_file_queue()
845 len = sizeof(buf); in read_file_queue()
847 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_queue()
855 char buf[20]; in write_file_queue() local
857 count = min_t(size_t, count, sizeof(buf) - 1); in write_file_queue()
858 if (copy_from_user(buf, userbuf, count)) in write_file_queue()
861 buf[count] = '\0'; in write_file_queue()
862 if (strncmp(buf, "start", 5) == 0) in write_file_queue()
864 else if (strncmp(buf, "stop", 4) == 0) in write_file_queue()
882 u16 *buf; member
893 u16 val, *buf; in open_file_eeprom() local
915 buf = vmalloc(array_size(eesize, 2)); in open_file_eeprom()
916 if (!buf) { in open_file_eeprom()
926 buf[i] = val; in open_file_eeprom()
937 ep->buf = buf; in open_file_eeprom()
945 vfree(buf); in open_file_eeprom()
956 return simple_read_from_buffer(user_buf, count, ppos, ep->buf, ep->len); in read_file_eeprom()
963 vfree(ep->buf); in release_file_eeprom()