37 static int proc_get_stats_ap(
char *
page,
char **
start,
49 len +=
snprintf(page + len, count - len,
53 len +=
snprintf(page + len, count - len,
56 len +=
snprintf(page + len, count - len,
65 static int proc_get_registers_0(
char *page,
char **start,
66 off_t offset,
int count,
77 len +=
snprintf(page + len, count - len,
78 "\n####################page %x##################\n ",
80 len +=
snprintf(page + len, count - len,
81 "\nD: OF > 00 01 02 03 04 05 06 07 08 09 0A 0B "
83 for (n = 0; n <=
max;) {
84 len +=
snprintf(page + len, count - len,
"\nD: %2x > ", n);
85 for (i = 0; i < 16 && n <=
max; n++, i++)
86 len +=
snprintf(page + len, count - len,
90 len +=
snprintf(page + len, count - len,
"\n");
95 static int proc_get_registers_1(
char *page,
char **start,
96 off_t offset,
int count,
108 len +=
snprintf(page + len, count - len,
109 "\n####################page %x##################\n ",
111 len +=
snprintf(page + len, count - len,
112 "\nD: OF > 00 01 02 03 04 05 06 07 08 09 0A 0B "
114 for (n = 0; n <=
max;) {
115 len +=
snprintf(page + len, count - len,
117 for (i = 0; i < 16 && n <=
max; i++, n++)
118 len +=
snprintf(page + len, count - len,
122 len +=
snprintf(page + len, count - len,
"\n");
127 static int proc_get_registers_2(
char *page,
char **start,
128 off_t offset,
int count,
129 int *eof,
void *data)
140 len +=
snprintf(page + len, count - len,
141 "\n####################page %x##################\n ",
143 len +=
snprintf(page + len, count - len,
144 "\nD: OF > 00 01 02 03 04 05 06 07 08 09 0A 0B 0C "
146 for (n = 0; n <=
max;) {
147 len +=
snprintf(page + len, count - len,
149 for (i = 0; i < 16 && n <=
max; i++, n++)
150 len +=
snprintf(page + len, count - len,
154 len +=
snprintf(page + len, count - len,
"\n");
159 static int proc_get_registers_3(
char *page,
char **start,
160 off_t offset,
int count,
161 int *eof,
void *data)
172 len +=
snprintf(page + len, count - len,
173 "\n####################page %x##################\n ",
175 len +=
snprintf(page + len, count - len,
176 "\nD: OF > 00 01 02 03 04 05 06 07 08 09 0A 0B "
178 for (n = 0; n <=
max;) {
179 len +=
snprintf(page + len, count - len,
181 for (i = 0; i < 16 && n <=
max; i++, n++)
182 len +=
snprintf(page + len, count - len,
186 len +=
snprintf(page + len, count - len,
"\n");
191 static int proc_get_registers_4(
char *page,
char **start,
192 off_t offset,
int count,
193 int *eof,
void *data)
204 len +=
snprintf(page + len, count - len,
205 "\n####################page %x##################\n ",
207 len +=
snprintf(page + len, count - len,
208 "\nD: OF > 00 01 02 03 04 05 06 07 08 09 0A 0B "
210 for (n = 0; n <=
max;) {
211 len +=
snprintf(page + len, count - len,
213 for (i = 0; i < 16 && n <=
max; i++, n++)
214 len +=
snprintf(page + len, count - len,
218 len +=
snprintf(page + len, count - len,
"\n");
223 static int proc_get_registers_5(
char *page,
char **start,
224 off_t offset,
int count,
225 int *eof,
void *data)
236 len +=
snprintf(page + len, count - len,
237 "\n####################page %x##################\n ",
239 len +=
snprintf(page + len, count - len,
240 "\nD: OF > 00 01 02 03 04 05 06 07 08 09 0A 0B "
242 for (n = 0; n <=
max;) {
243 len +=
snprintf(page + len, count - len,
245 for (i = 0; i < 16 && n <=
max; i++, n++)
246 len +=
snprintf(page + len, count - len,
250 len +=
snprintf(page + len, count - len,
"\n");
255 static int proc_get_registers_6(
char *page,
char **start,
256 off_t offset,
int count,
257 int *eof,
void *data)
268 len +=
snprintf(page + len, count - len,
269 "\n####################page %x##################\n ",
271 len +=
snprintf(page + len, count - len,
272 "\nD: OF > 00 01 02 03 04 05 06 07 08 09 0A 0B "
274 for (n = 0; n <=
max;) {
275 len +=
snprintf(page + len, count - len,
277 for (i = 0; i < 16 && n <=
max; i++, n++)
278 len +=
snprintf(page + len, count - len,
282 len +=
snprintf(page + len, count - len,
"\n");
287 static int proc_get_registers_7(
char *page,
char **start,
288 off_t offset,
int count,
289 int *eof,
void *data)
300 len +=
snprintf(page + len, count - len,
301 "\n####################page %x##################\n ",
303 len +=
snprintf(page + len, count - len,
304 "\nD: OF > 00 01 02 03 04 05 06 07 08 09 0A 0B 0C "
306 for (n = 0; n <=
max;) {
307 len +=
snprintf(page + len, count - len,
309 for (i = 0; i < 16 && n <=
max; i++, n++)
310 len +=
snprintf(page + len, count - len,
314 len +=
snprintf(page + len, count - len,
"\n");
319 static int proc_get_registers_8(
char *page,
char **start,
320 off_t offset,
int count,
321 int *eof,
void *data)
332 len +=
snprintf(page + len, count - len,
333 "\n####################page %x##################\n",
335 for (n = 0; n <=
max;) {
336 len +=
snprintf(page + len, count - len,
"\nD: %2x > ", n);
337 for (i = 0; i < 4 && n <=
max; n += 4, i++)
338 len +=
snprintf(page + len, count - len,
342 len +=
snprintf(page + len, count - len,
"\n");
347 static int proc_get_registers_9(
char *page,
char **start,
348 off_t offset,
int count,
349 int *eof,
void *data)
360 len +=
snprintf(page + len, count - len,
361 "\n####################page %x##################\n",
363 for (n = 0; n <=
max;) {
364 len +=
snprintf(page + len, count - len,
"\nD: %2x > ", n);
365 for (i = 0; i < 4 && n <=
max; n += 4, i++)
366 len +=
snprintf(page + len, count - len,
370 len +=
snprintf(page + len, count - len,
"\n");
374 static int proc_get_registers_a(
char *page,
char **start,
375 off_t offset,
int count,
376 int *eof,
void *data)
387 len +=
snprintf(page + len, count - len,
388 "\n####################page %x##################\n",
390 for (n = 0; n <=
max;) {
391 len +=
snprintf(page + len, count - len,
"\nD: %2x > ", n);
392 for (i = 0; i < 4 && n <=
max; n += 4, i++)
393 len +=
snprintf(page + len, count - len,
397 len +=
snprintf(page + len, count - len,
"\n");
401 static int proc_get_registers_b(
char *page,
char **start,
402 off_t offset,
int count,
403 int *eof,
void *data)
414 len +=
snprintf(page + len, count - len,
415 "\n####################page %x##################\n",
417 for (n = 0; n <=
max;) {
418 len +=
snprintf(page + len, count - len,
"\nD: %2x > ", n);
419 for (i = 0; i < 4 && n <=
max; n += 4, i++)
420 len +=
snprintf(page + len, count - len,
424 len +=
snprintf(page + len, count - len,
"\n");
428 static int proc_get_registers_c(
char *page,
char **start,
429 off_t offset,
int count,
430 int *eof,
void *data)
441 len +=
snprintf(page + len, count - len,
442 "\n####################page %x##################\n",
444 for (n = 0; n <=
max;) {
445 len +=
snprintf(page + len, count - len,
"\nD: %2x > ", n);
446 for (i = 0; i < 4 && n <=
max; n += 4, i++)
447 len +=
snprintf(page + len, count - len,
451 len +=
snprintf(page + len, count - len,
"\n");
455 static int proc_get_registers_d(
char *page,
char **start,
456 off_t offset,
int count,
457 int *eof,
void *data)
468 len +=
snprintf(page + len, count - len,
469 "\n####################page %x##################\n",
471 for (n = 0; n <=
max;) {
472 len +=
snprintf(page + len, count - len,
"\nD: %2x > ", n);
473 for (i = 0; i < 4 && n <=
max; n += 4, i++)
474 len +=
snprintf(page + len, count - len,
478 len +=
snprintf(page + len, count - len,
"\n");
482 static int proc_get_registers_e(
char *page,
char **start,
483 off_t offset,
int count,
484 int *eof,
void *data)
495 len +=
snprintf(page + len, count - len,
496 "\n####################page %x##################\n",
498 for (n = 0; n <=
max;) {
499 len +=
snprintf(page + len, count - len,
"\nD: %2x > ", n);
500 for (i = 0; i < 4 && n <=
max; n += 4, i++)
501 len +=
snprintf(page + len, count - len,
505 len +=
snprintf(page + len, count - len,
"\n");
510 static int proc_get_reg_rf_a(
char *page,
char **start,
511 off_t offset,
int count,
512 int *eof,
void *data)
522 len +=
snprintf(page + len, count - len,
523 "\n#################### RF-A ##################\n ");
524 for (n = 0; n <=
max;) {
525 len +=
snprintf(page + len, count - len,
"\nD: %2x > ", n);
526 for (i = 0; i < 4 && n <=
max; n += 4, i++)
527 len +=
snprintf(page + len, count - len,
532 len +=
snprintf(page + len, count - len,
"\n");
537 static int proc_get_reg_rf_b(
char *page,
char **start,
538 off_t offset,
int count,
539 int *eof,
void *data)
549 len +=
snprintf(page + len, count - len,
550 "\n#################### RF-B ##################\n ");
551 for (n = 0; n <=
max;) {
552 len +=
snprintf(page + len, count - len,
"\nD: %2x > ", n);
553 for (i = 0; i < 4 && n <=
max; n += 4, i++)
554 len +=
snprintf(page + len, count - len,
559 len +=
snprintf(page + len, count - len,
"\n");
564 static int proc_get_reg_rf_c(
char *page,
char **start,
565 off_t offset,
int count,
566 int *eof,
void *data)
576 len +=
snprintf(page + len, count - len,
577 "\n#################### RF-C ##################\n");
578 for (n = 0; n <=
max;) {
579 len +=
snprintf(page + len, count - len,
"\nD: %2x > ", n);
580 for (i = 0; i < 4 && n <=
max; n += 4, i++)
581 len +=
snprintf(page + len, count - len,
586 len +=
snprintf(page + len, count - len,
"\n");
591 static int proc_get_reg_rf_d(
char *page,
char **start,
592 off_t offset,
int count,
593 int *eof,
void *data)
603 len +=
snprintf(page + len, count - len,
604 "\n#################### RF-D ##################\n ");
605 for (n = 0; n <=
max;) {
606 len +=
snprintf(page + len, count - len,
"\nD: %2x > ", n);
607 for (i = 0; i < 4 && n <=
max; n += 4, i++)
608 len +=
snprintf(page + len, count - len,
613 len +=
snprintf(page + len, count - len,
"\n");
618 static int proc_get_cam_register_1(
char *page,
char **start,
619 off_t offset,
int count,
620 int *eof,
void *data)
623 u32 target_command = 0;
624 u32 target_content = 0;
631 len +=
snprintf(page + len, count - len,
632 "\n#################### SECURITY CAM (0-10) ######"
634 for (
j = 0;
j < 11;
j++) {
635 len +=
snprintf(page + len, count - len,
"\nD: %2x > ",
j);
637 target_command = entry_i+CAM_CONTENT_COUNT*
j;
638 target_command = target_command |
BIT31;
642 if (ulStatus &
BIT31)
649 len +=
snprintf(page + len, count - len,
"%8.8x ",
654 len +=
snprintf(page + len, count - len,
"\n");
659 static int proc_get_cam_register_2(
char *page,
char **start,
660 off_t offset,
int count,
661 int *eof,
void *data)
664 u32 target_command = 0;
665 u32 target_content = 0;
672 len +=
snprintf(page + len, count - len,
673 "\n#################### SECURITY CAM (11-21) "
674 "##################\n ");
675 for (j = 11; j < 22; j++) {
676 len +=
snprintf(page + len, count - len,
"\nD: %2x > ", j);
678 target_command = entry_i + CAM_CONTENT_COUNT *
j;
679 target_command = target_command |
BIT31;
683 if (ulStatus &
BIT31)
690 len +=
snprintf(page + len, count - len,
"%8.8x ",
695 len +=
snprintf(page + len, count - len,
"\n");
700 static int proc_get_cam_register_3(
char *page,
char **start,
701 off_t offset,
int count,
702 int *eof,
void *data)
705 u32 target_command = 0;
706 u32 target_content = 0;
713 len +=
snprintf(page + len, count - len,
714 "\n#################### SECURITY CAM (22-31) ######"
717 len +=
snprintf(page + len, count - len,
"\nD: %2x > ", j);
719 target_command = entry_i + CAM_CONTENT_COUNT *
j;
720 target_command = target_command |
BIT31;
724 if (ulStatus &
BIT31)
731 len +=
snprintf(page + len, count - len,
"%8.8x ",
736 len +=
snprintf(page + len, count - len,
"\n");
740 static int proc_get_stats_tx(
char *page,
char **start,
741 off_t offset,
int count,
742 int *eof,
void *data)
749 len +=
snprintf(page + len, count - len,
750 "TX VI priority ok int: %lu\n"
751 "TX VO priority ok int: %lu\n"
752 "TX BE priority ok int: %lu\n"
753 "TX BK priority ok int: %lu\n"
754 "TX MANAGE priority ok int: %lu\n"
755 "TX BEACON priority ok int: %lu\n"
756 "TX BEACON priority error int: %lu\n"
757 "TX CMDPKT priority ok int: %lu\n"
758 "TX queue stopped?: %d\n"
759 "TX fifo overflow: %lu\n"
760 "TX total data packets %lu\n"
761 "TX total data bytes :%lu\n",
762 priv->
stats.txviokint,
763 priv->
stats.txvookint,
764 priv->
stats.txbeokint,
765 priv->
stats.txbkokint,
766 priv->
stats.txmanageokint,
767 priv->
stats.txbeaconokint,
768 priv->
stats.txbeaconerr,
769 priv->
stats.txcmdpktokint,
770 netif_queue_stopped(dev),
771 priv->
stats.txoverflow,
772 priv->
rtllib->stats.tx_packets,
773 priv->
rtllib->stats.tx_bytes
784 static int proc_get_stats_rx(
char *page,
char **start,
785 off_t offset,
int count,
786 int *eof,
void *data)
793 len +=
snprintf(page + len, count - len,
795 "RX data crc err: %lu\n"
796 "RX mgmt crc err: %lu\n"
798 "RX rx overflow error: %lu\n",
800 priv->
stats.rxdatacrcerr,
801 priv->
stats.rxmgmtcrcerr,
803 priv->
stats.rxoverflow);
874 priv->
dir_dev, proc_get_stats_rx, dev);
878 "/proc/net/rtl8192/%s/stats-rx\n",
882 priv->
dir_dev, proc_get_stats_tx, dev);
886 "/proc/net/rtl8192/%s/stats-tx\n",
890 priv->
dir_dev, proc_get_stats_ap, dev);
894 "/proc/net/rtl8192/%s/stats-ap\n",
898 priv->
dir_dev, proc_get_registers_0, dev);
901 "/proc/net/rtl8192/%s/registers-0\n",
904 priv->
dir_dev, proc_get_registers_1, dev);
907 "/proc/net/rtl8192/%s/registers-1\n",
910 priv->
dir_dev, proc_get_registers_2, dev);
913 "/proc/net/rtl8192/%s/registers-2\n",
916 priv->
dir_dev, proc_get_registers_3, dev);
919 "/proc/net/rtl8192/%s/registers-3\n",
922 priv->
dir_dev, proc_get_registers_4, dev);
925 "/proc/net/rtl8192/%s/registers-4\n",
928 priv->
dir_dev, proc_get_registers_5, dev);
931 "/proc/net/rtl8192/%s/registers-5\n",
934 priv->
dir_dev, proc_get_registers_6, dev);
937 "/proc/net/rtl8192/%s/registers-6\n",
940 priv->
dir_dev, proc_get_registers_7, dev);
943 "/proc/net/rtl8192/%s/registers-7\n",
946 priv->
dir_dev, proc_get_registers_8, dev);
949 "/proc/net/rtl8192/%s/registers-8\n",
952 priv->
dir_dev, proc_get_registers_9, dev);
955 "/proc/net/rtl8192/%s/registers-9\n",
958 priv->
dir_dev, proc_get_registers_a, dev);
961 "/proc/net/rtl8192/%s/registers-a\n",
964 priv->
dir_dev, proc_get_registers_b, dev);
967 "/proc/net/rtl8192/%s/registers-b\n",
970 priv->
dir_dev, proc_get_registers_c, dev);
973 "/proc/net/rtl8192/%s/registers-c\n",
976 priv->
dir_dev, proc_get_registers_d, dev);
979 "/proc/net/rtl8192/%s/registers-d\n",
982 priv->
dir_dev, proc_get_registers_e, dev);
985 "/proc/net/rtl8192/%s/registers-e\n",
988 priv->
dir_dev, proc_get_reg_rf_a, dev);
991 "/proc/net/rtl8192/%s/RF-A\n",
994 priv->
dir_dev, proc_get_reg_rf_b, dev);
997 "/proc/net/rtl8192/%s/RF-B\n",
1000 priv->
dir_dev, proc_get_reg_rf_c, dev);
1003 "/proc/net/rtl8192/%s/RF-C\n",
1006 priv->
dir_dev, proc_get_reg_rf_d, dev);
1009 "/proc/net/rtl8192/%s/RF-D\n",
1012 priv->
dir_dev, proc_get_cam_register_1, dev);
1015 "/proc/net/rtl8192/%s/SEC-CAM-1\n",
1018 priv->
dir_dev, proc_get_cam_register_2, dev);
1021 "/proc/net/rtl8192/%s/SEC-CAM-2\n",
1024 priv->
dir_dev, proc_get_cam_register_3, dev);
1027 "/proc/net/rtl8192/%s/SEC-CAM-3\n",