diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 10:38:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 10:38:50 -0500 |
commit | 1557d33007f63dd96e5d15f33af389378e5f2e54 (patch) | |
tree | 06d05722b2ba5d2a67532f779fa8a88efe3c88f1 /drivers/net | |
parent | 6ec22f9b037fc0c2e00ddb7023fad279c365324d (diff) | |
parent | c656ae95d1c5c8ed5763356263ace2d03087efec (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/sysctl-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/sysctl-2.6: (43 commits)
security/tomoyo: Remove now unnecessary handling of security_sysctl.
security/tomoyo: Add a special case to handle accesses through the internal proc mount.
sysctl: Drop & in front of every proc_handler.
sysctl: Remove CTL_NONE and CTL_UNNUMBERED
sysctl: kill dead ctl_handler definitions.
sysctl: Remove the last of the generic binary sysctl support
sysctl net: Remove unused binary sysctl code
sysctl security/tomoyo: Don't look at ctl_name
sysctl arm: Remove binary sysctl support
sysctl x86: Remove dead binary sysctl support
sysctl sh: Remove dead binary sysctl support
sysctl powerpc: Remove dead binary sysctl support
sysctl ia64: Remove dead binary sysctl support
sysctl s390: Remove dead sysctl binary support
sysctl frv: Remove dead binary sysctl support
sysctl mips/lasat: Remove dead binary sysctl support
sysctl drivers: Remove dead binary sysctl support
sysctl crypto: Remove dead binary sysctl support
sysctl security/keys: Remove dead binary sysctl support
sysctl kernel: Remove binary sysctl logic
...
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/arlan-proc.c | 245 |
1 files changed, 101 insertions, 144 deletions
diff --git a/drivers/net/wireless/arlan-proc.c b/drivers/net/wireless/arlan-proc.c index a8b689635a3b..b22983e6c0cf 100644 --- a/drivers/net/wireless/arlan-proc.c +++ b/drivers/net/wireless/arlan-proc.c | |||
@@ -816,84 +816,83 @@ static int arlan_sysctl_reset(ctl_table * ctl, int write, | |||
816 | 816 | ||
817 | 817 | ||
818 | /* Place files in /proc/sys/dev/arlan */ | 818 | /* Place files in /proc/sys/dev/arlan */ |
819 | #define CTBLN(num,card,nam) \ | 819 | #define CTBLN(card,nam) \ |
820 | { .ctl_name = num,\ | 820 | { .procname = #nam,\ |
821 | .procname = #nam,\ | ||
822 | .data = &(arlan_conf[card].nam),\ | 821 | .data = &(arlan_conf[card].nam),\ |
823 | .maxlen = sizeof(int), .mode = 0600, .proc_handler = &proc_dointvec} | 822 | .maxlen = sizeof(int), .mode = 0600, .proc_handler = proc_dointvec} |
824 | #ifdef ARLAN_DEBUGGING | 823 | #ifdef ARLAN_DEBUGGING |
825 | 824 | ||
826 | #define ARLAN_PROC_DEBUG_ENTRIES \ | 825 | #define ARLAN_PROC_DEBUG_ENTRIES \ |
827 | { .ctl_name = 48, .procname = "entry_exit_debug",\ | 826 | { .procname = "entry_exit_debug",\ |
828 | .data = &arlan_entry_and_exit_debug,\ | 827 | .data = &arlan_entry_and_exit_debug,\ |
829 | .maxlen = sizeof(int), .mode = 0600, .proc_handler = &proc_dointvec},\ | 828 | .maxlen = sizeof(int), .mode = 0600, .proc_handler = proc_dointvec},\ |
830 | { .ctl_name = 49, .procname = "debug", .data = &arlan_debug,\ | 829 | { .procname = "debug", .data = &arlan_debug,\ |
831 | .maxlen = sizeof(int), .mode = 0600, .proc_handler = &proc_dointvec}, | 830 | .maxlen = sizeof(int), .mode = 0600, .proc_handler = proc_dointvec}, |
832 | #else | 831 | #else |
833 | #define ARLAN_PROC_DEBUG_ENTRIES | 832 | #define ARLAN_PROC_DEBUG_ENTRIES |
834 | #endif | 833 | #endif |
835 | 834 | ||
836 | #define ARLAN_SYSCTL_TABLE_TOTAL(cardNo)\ | 835 | #define ARLAN_SYSCTL_TABLE_TOTAL(cardNo)\ |
837 | CTBLN(1,cardNo,spreadingCode),\ | 836 | CTBLN(cardNo,spreadingCode),\ |
838 | CTBLN(2,cardNo, channelNumber),\ | 837 | CTBLN(cardNo, channelNumber),\ |
839 | CTBLN(3,cardNo, scramblingDisable),\ | 838 | CTBLN(cardNo, scramblingDisable),\ |
840 | CTBLN(4,cardNo, txAttenuation),\ | 839 | CTBLN(cardNo, txAttenuation),\ |
841 | CTBLN(5,cardNo, systemId), \ | 840 | CTBLN(cardNo, systemId), \ |
842 | CTBLN(6,cardNo, maxDatagramSize),\ | 841 | CTBLN(cardNo, maxDatagramSize),\ |
843 | CTBLN(7,cardNo, maxFrameSize),\ | 842 | CTBLN(cardNo, maxFrameSize),\ |
844 | CTBLN(8,cardNo, maxRetries),\ | 843 | CTBLN(cardNo, maxRetries),\ |
845 | CTBLN(9,cardNo, receiveMode),\ | 844 | CTBLN(cardNo, receiveMode),\ |
846 | CTBLN(10,cardNo, priority),\ | 845 | CTBLN(cardNo, priority),\ |
847 | CTBLN(11,cardNo, rootOrRepeater),\ | 846 | CTBLN(cardNo, rootOrRepeater),\ |
848 | CTBLN(12,cardNo, SID),\ | 847 | CTBLN(cardNo, SID),\ |
849 | CTBLN(13,cardNo, registrationMode),\ | 848 | CTBLN(cardNo, registrationMode),\ |
850 | CTBLN(14,cardNo, registrationFill),\ | 849 | CTBLN(cardNo, registrationFill),\ |
851 | CTBLN(15,cardNo, localTalkAddress),\ | 850 | CTBLN(cardNo, localTalkAddress),\ |
852 | CTBLN(16,cardNo, codeFormat),\ | 851 | CTBLN(cardNo, codeFormat),\ |
853 | CTBLN(17,cardNo, numChannels),\ | 852 | CTBLN(cardNo, numChannels),\ |
854 | CTBLN(18,cardNo, channel1),\ | 853 | CTBLN(cardNo, channel1),\ |
855 | CTBLN(19,cardNo, channel2),\ | 854 | CTBLN(cardNo, channel2),\ |
856 | CTBLN(20,cardNo, channel3),\ | 855 | CTBLN(cardNo, channel3),\ |
857 | CTBLN(21,cardNo, channel4),\ | 856 | CTBLN(cardNo, channel4),\ |
858 | CTBLN(22,cardNo, txClear),\ | 857 | CTBLN(cardNo, txClear),\ |
859 | CTBLN(23,cardNo, txRetries),\ | 858 | CTBLN(cardNo, txRetries),\ |
860 | CTBLN(24,cardNo, txRouting),\ | 859 | CTBLN(cardNo, txRouting),\ |
861 | CTBLN(25,cardNo, txScrambled),\ | 860 | CTBLN(cardNo, txScrambled),\ |
862 | CTBLN(26,cardNo, rxParameter),\ | 861 | CTBLN(cardNo, rxParameter),\ |
863 | CTBLN(27,cardNo, txTimeoutMs),\ | 862 | CTBLN(cardNo, txTimeoutMs),\ |
864 | CTBLN(28,cardNo, waitCardTimeout),\ | 863 | CTBLN(cardNo, waitCardTimeout),\ |
865 | CTBLN(29,cardNo, channelSet), \ | 864 | CTBLN(cardNo, channelSet), \ |
866 | {.ctl_name = 30, .procname = "name",\ | 865 | { .procname = "name",\ |
867 | .data = arlan_conf[cardNo].siteName,\ | 866 | .data = arlan_conf[cardNo].siteName,\ |
868 | .maxlen = 16, .mode = 0600, .proc_handler = &proc_dostring},\ | 867 | .maxlen = 16, .mode = 0600, .proc_handler = proc_dostring},\ |
869 | CTBLN(31,cardNo,waitTime),\ | 868 | CTBLN(cardNo,waitTime),\ |
870 | CTBLN(32,cardNo,lParameter),\ | 869 | CTBLN(cardNo,lParameter),\ |
871 | CTBLN(33,cardNo,_15),\ | 870 | CTBLN(cardNo,_15),\ |
872 | CTBLN(34,cardNo,headerSize),\ | 871 | CTBLN(cardNo,headerSize),\ |
873 | CTBLN(36,cardNo,tx_delay_ms),\ | 872 | CTBLN(cardNo,tx_delay_ms),\ |
874 | CTBLN(37,cardNo,retries),\ | 873 | CTBLN(cardNo,retries),\ |
875 | CTBLN(38,cardNo,ReTransmitPacketMaxSize),\ | 874 | CTBLN(cardNo,ReTransmitPacketMaxSize),\ |
876 | CTBLN(39,cardNo,waitReTransmitPacketMaxSize),\ | 875 | CTBLN(cardNo,waitReTransmitPacketMaxSize),\ |
877 | CTBLN(40,cardNo,fastReTransCount),\ | 876 | CTBLN(cardNo,fastReTransCount),\ |
878 | CTBLN(41,cardNo,driverRetransmissions),\ | 877 | CTBLN(cardNo,driverRetransmissions),\ |
879 | CTBLN(42,cardNo,txAckTimeoutMs),\ | 878 | CTBLN(cardNo,txAckTimeoutMs),\ |
880 | CTBLN(43,cardNo,registrationInterrupts),\ | 879 | CTBLN(cardNo,registrationInterrupts),\ |
881 | CTBLN(44,cardNo,hardwareType),\ | 880 | CTBLN(cardNo,hardwareType),\ |
882 | CTBLN(45,cardNo,radioType),\ | 881 | CTBLN(cardNo,radioType),\ |
883 | CTBLN(46,cardNo,writeEEPROM),\ | 882 | CTBLN(cardNo,writeEEPROM),\ |
884 | CTBLN(47,cardNo,writeRadioType),\ | 883 | CTBLN(cardNo,writeRadioType),\ |
885 | ARLAN_PROC_DEBUG_ENTRIES\ | 884 | ARLAN_PROC_DEBUG_ENTRIES\ |
886 | CTBLN(50,cardNo,in_speed),\ | 885 | CTBLN(cardNo,in_speed),\ |
887 | CTBLN(51,cardNo,out_speed),\ | 886 | CTBLN(cardNo,out_speed),\ |
888 | CTBLN(52,cardNo,in_speed10),\ | 887 | CTBLN(cardNo,in_speed10),\ |
889 | CTBLN(53,cardNo,out_speed10),\ | 888 | CTBLN(cardNo,out_speed10),\ |
890 | CTBLN(54,cardNo,in_speed_max),\ | 889 | CTBLN(cardNo,in_speed_max),\ |
891 | CTBLN(55,cardNo,out_speed_max),\ | 890 | CTBLN(cardNo,out_speed_max),\ |
892 | CTBLN(56,cardNo,measure_rate),\ | 891 | CTBLN(cardNo,measure_rate),\ |
893 | CTBLN(57,cardNo,pre_Command_Wait),\ | 892 | CTBLN(cardNo,pre_Command_Wait),\ |
894 | CTBLN(58,cardNo,rx_tweak1),\ | 893 | CTBLN(cardNo,rx_tweak1),\ |
895 | CTBLN(59,cardNo,rx_tweak2),\ | 894 | CTBLN(cardNo,rx_tweak2),\ |
896 | CTBLN(60,cardNo,tx_queue_len),\ | 895 | CTBLN(cardNo,tx_queue_len),\ |
897 | 896 | ||
898 | 897 | ||
899 | 898 | ||
@@ -903,63 +902,56 @@ static ctl_table arlan_conf_table0[] = | |||
903 | 902 | ||
904 | #ifdef ARLAN_PROC_SHM_DUMP | 903 | #ifdef ARLAN_PROC_SHM_DUMP |
905 | { | 904 | { |
906 | .ctl_name = 150, | ||
907 | .procname = "arlan0-txRing", | 905 | .procname = "arlan0-txRing", |
908 | .data = &arlan_drive_info, | 906 | .data = &arlan_drive_info, |
909 | .maxlen = ARLAN_STR_SIZE, | 907 | .maxlen = ARLAN_STR_SIZE, |
910 | .mode = 0400, | 908 | .mode = 0400, |
911 | .proc_handler = &arlan_sysctl_infotxRing, | 909 | .proc_handler = arlan_sysctl_infotxRing, |
912 | }, | 910 | }, |
913 | { | 911 | { |
914 | .ctl_name = 151, | ||
915 | .procname = "arlan0-rxRing", | 912 | .procname = "arlan0-rxRing", |
916 | .data = &arlan_drive_info, | 913 | .data = &arlan_drive_info, |
917 | .maxlen = ARLAN_STR_SIZE, | 914 | .maxlen = ARLAN_STR_SIZE, |
918 | .mode = 0400, | 915 | .mode = 0400, |
919 | .proc_handler = &arlan_sysctl_inforxRing, | 916 | .proc_handler = arlan_sysctl_inforxRing, |
920 | }, | 917 | }, |
921 | { | 918 | { |
922 | .ctl_name = 152, | ||
923 | .procname = "arlan0-18", | 919 | .procname = "arlan0-18", |
924 | .data = &arlan_drive_info, | 920 | .data = &arlan_drive_info, |
925 | .maxlen = ARLAN_STR_SIZE, | 921 | .maxlen = ARLAN_STR_SIZE, |
926 | .mode = 0400, | 922 | .mode = 0400, |
927 | .proc_handler = &arlan_sysctl_info18, | 923 | .proc_handler = arlan_sysctl_info18, |
928 | }, | 924 | }, |
929 | { | 925 | { |
930 | .ctl_name = 153, | ||
931 | .procname = "arlan0-ring", | 926 | .procname = "arlan0-ring", |
932 | .data = &arlan_drive_info, | 927 | .data = &arlan_drive_info, |
933 | .maxlen = ARLAN_STR_SIZE, | 928 | .maxlen = ARLAN_STR_SIZE, |
934 | .mode = 0400, | 929 | .mode = 0400, |
935 | .proc_handler = &arlan_sysctl_info161719, | 930 | .proc_handler = arlan_sysctl_info161719, |
936 | }, | 931 | }, |
937 | { | 932 | { |
938 | .ctl_name = 154, | ||
939 | .procname = "arlan0-shm-cpy", | 933 | .procname = "arlan0-shm-cpy", |
940 | .data = &arlan_drive_info, | 934 | .data = &arlan_drive_info, |
941 | .maxlen = ARLAN_STR_SIZE, | 935 | .maxlen = ARLAN_STR_SIZE, |
942 | .mode = 0400, | 936 | .mode = 0400, |
943 | .proc_handler = &arlan_sysctl_info, | 937 | .proc_handler = arlan_sysctl_info, |
944 | }, | 938 | }, |
945 | #endif | 939 | #endif |
946 | { | 940 | { |
947 | .ctl_name = 155, | ||
948 | .procname = "config0", | 941 | .procname = "config0", |
949 | .data = &conf_reset_result, | 942 | .data = &conf_reset_result, |
950 | .maxlen = 100, | 943 | .maxlen = 100, |
951 | .mode = 0400, | 944 | .mode = 0400, |
952 | .proc_handler = &arlan_configure | 945 | .proc_handler = arlan_configure |
953 | }, | 946 | }, |
954 | { | 947 | { |
955 | .ctl_name = 156, | ||
956 | .procname = "reset0", | 948 | .procname = "reset0", |
957 | .data = &conf_reset_result, | 949 | .data = &conf_reset_result, |
958 | .maxlen = 100, | 950 | .maxlen = 100, |
959 | .mode = 0400, | 951 | .mode = 0400, |
960 | .proc_handler = &arlan_sysctl_reset, | 952 | .proc_handler = arlan_sysctl_reset, |
961 | }, | 953 | }, |
962 | { .ctl_name = 0 } | 954 | { } |
963 | }; | 955 | }; |
964 | 956 | ||
965 | static ctl_table arlan_conf_table1[] = | 957 | static ctl_table arlan_conf_table1[] = |
@@ -969,63 +961,56 @@ static ctl_table arlan_conf_table1[] = | |||
969 | 961 | ||
970 | #ifdef ARLAN_PROC_SHM_DUMP | 962 | #ifdef ARLAN_PROC_SHM_DUMP |
971 | { | 963 | { |
972 | .ctl_name = 150, | ||
973 | .procname = "arlan1-txRing", | 964 | .procname = "arlan1-txRing", |
974 | .data = &arlan_drive_info, | 965 | .data = &arlan_drive_info, |
975 | .maxlen = ARLAN_STR_SIZE, | 966 | .maxlen = ARLAN_STR_SIZE, |
976 | .mode = 0400, | 967 | .mode = 0400, |
977 | .proc_handler = &arlan_sysctl_infotxRing, | 968 | .proc_handler = arlan_sysctl_infotxRing, |
978 | }, | 969 | }, |
979 | { | 970 | { |
980 | .ctl_name = 151, | ||
981 | .procname = "arlan1-rxRing", | 971 | .procname = "arlan1-rxRing", |
982 | .data = &arlan_drive_info, | 972 | .data = &arlan_drive_info, |
983 | .maxlen = ARLAN_STR_SIZE, | 973 | .maxlen = ARLAN_STR_SIZE, |
984 | .mode = 0400, | 974 | .mode = 0400, |
985 | .proc_handler = &arlan_sysctl_inforxRing, | 975 | .proc_handler = arlan_sysctl_inforxRing, |
986 | }, | 976 | }, |
987 | { | 977 | { |
988 | .ctl_name = 152, | ||
989 | .procname = "arlan1-18", | 978 | .procname = "arlan1-18", |
990 | .data = &arlan_drive_info, | 979 | .data = &arlan_drive_info, |
991 | .maxlen = ARLAN_STR_SIZE, | 980 | .maxlen = ARLAN_STR_SIZE, |
992 | .mode = 0400, | 981 | .mode = 0400, |
993 | .proc_handler = &arlan_sysctl_info18, | 982 | .proc_handler = arlan_sysctl_info18, |
994 | }, | 983 | }, |
995 | { | 984 | { |
996 | .ctl_name = 153, | ||
997 | .procname = "arlan1-ring", | 985 | .procname = "arlan1-ring", |
998 | .data = &arlan_drive_info, | 986 | .data = &arlan_drive_info, |
999 | .maxlen = ARLAN_STR_SIZE, | 987 | .maxlen = ARLAN_STR_SIZE, |
1000 | .mode = 0400, | 988 | .mode = 0400, |
1001 | .proc_handler = &arlan_sysctl_info161719, | 989 | .proc_handler = arlan_sysctl_info161719, |
1002 | }, | 990 | }, |
1003 | { | 991 | { |
1004 | .ctl_name = 154, | ||
1005 | .procname = "arlan1-shm-cpy", | 992 | .procname = "arlan1-shm-cpy", |
1006 | .data = &arlan_drive_info, | 993 | .data = &arlan_drive_info, |
1007 | .maxlen = ARLAN_STR_SIZE, | 994 | .maxlen = ARLAN_STR_SIZE, |
1008 | .mode = 0400, | 995 | .mode = 0400, |
1009 | .proc_handler = &arlan_sysctl_info, | 996 | .proc_handler = arlan_sysctl_info, |
1010 | }, | 997 | }, |
1011 | #endif | 998 | #endif |
1012 | { | 999 | { |
1013 | .ctl_name = 155, | ||
1014 | .procname = "config1", | 1000 | .procname = "config1", |
1015 | .data = &conf_reset_result, | 1001 | .data = &conf_reset_result, |
1016 | .maxlen = 100, | 1002 | .maxlen = 100, |
1017 | .mode = 0400, | 1003 | .mode = 0400, |
1018 | .proc_handler = &arlan_configure, | 1004 | .proc_handler = arlan_configure, |
1019 | }, | 1005 | }, |
1020 | { | 1006 | { |
1021 | .ctl_name = 156, | ||
1022 | .procname = "reset1", | 1007 | .procname = "reset1", |
1023 | .data = &conf_reset_result, | 1008 | .data = &conf_reset_result, |
1024 | .maxlen = 100, | 1009 | .maxlen = 100, |
1025 | .mode = 0400, | 1010 | .mode = 0400, |
1026 | .proc_handler = &arlan_sysctl_reset, | 1011 | .proc_handler = arlan_sysctl_reset, |
1027 | }, | 1012 | }, |
1028 | { .ctl_name = 0 } | 1013 | { } |
1029 | }; | 1014 | }; |
1030 | 1015 | ||
1031 | static ctl_table arlan_conf_table2[] = | 1016 | static ctl_table arlan_conf_table2[] = |
@@ -1035,63 +1020,56 @@ static ctl_table arlan_conf_table2[] = | |||
1035 | 1020 | ||
1036 | #ifdef ARLAN_PROC_SHM_DUMP | 1021 | #ifdef ARLAN_PROC_SHM_DUMP |
1037 | { | 1022 | { |
1038 | .ctl_name = 150, | ||
1039 | .procname = "arlan2-txRing", | 1023 | .procname = "arlan2-txRing", |
1040 | .data = &arlan_drive_info, | 1024 | .data = &arlan_drive_info, |
1041 | .maxlen = ARLAN_STR_SIZE, | 1025 | .maxlen = ARLAN_STR_SIZE, |
1042 | .mode = 0400, | 1026 | .mode = 0400, |
1043 | .proc_handler = &arlan_sysctl_infotxRing, | 1027 | .proc_handler = arlan_sysctl_infotxRing, |
1044 | }, | 1028 | }, |
1045 | { | 1029 | { |
1046 | .ctl_name = 151, | ||
1047 | .procname = "arlan2-rxRing", | 1030 | .procname = "arlan2-rxRing", |
1048 | .data = &arlan_drive_info, | 1031 | .data = &arlan_drive_info, |
1049 | .maxlen = ARLAN_STR_SIZE, | 1032 | .maxlen = ARLAN_STR_SIZE, |
1050 | .mode = 0400, | 1033 | .mode = 0400, |
1051 | .proc_handler = &arlan_sysctl_inforxRing, | 1034 | .proc_handler = arlan_sysctl_inforxRing, |
1052 | }, | 1035 | }, |
1053 | { | 1036 | { |
1054 | .ctl_name = 152, | ||
1055 | .procname = "arlan2-18", | 1037 | .procname = "arlan2-18", |
1056 | .data = &arlan_drive_info, | 1038 | .data = &arlan_drive_info, |
1057 | .maxlen = ARLAN_STR_SIZE, | 1039 | .maxlen = ARLAN_STR_SIZE, |
1058 | .mode = 0400, | 1040 | .mode = 0400, |
1059 | .proc_handler = &arlan_sysctl_info18, | 1041 | .proc_handler = arlan_sysctl_info18, |
1060 | }, | 1042 | }, |
1061 | { | 1043 | { |
1062 | .ctl_name = 153, | ||
1063 | .procname = "arlan2-ring", | 1044 | .procname = "arlan2-ring", |
1064 | .data = &arlan_drive_info, | 1045 | .data = &arlan_drive_info, |
1065 | .maxlen = ARLAN_STR_SIZE, | 1046 | .maxlen = ARLAN_STR_SIZE, |
1066 | .mode = 0400, | 1047 | .mode = 0400, |
1067 | .proc_handler = &arlan_sysctl_info161719, | 1048 | .proc_handler = arlan_sysctl_info161719, |
1068 | }, | 1049 | }, |
1069 | { | 1050 | { |
1070 | .ctl_name = 154, | ||
1071 | .procname = "arlan2-shm-cpy", | 1051 | .procname = "arlan2-shm-cpy", |
1072 | .data = &arlan_drive_info, | 1052 | .data = &arlan_drive_info, |
1073 | .maxlen = ARLAN_STR_SIZE, | 1053 | .maxlen = ARLAN_STR_SIZE, |
1074 | .mode = 0400, | 1054 | .mode = 0400, |
1075 | .proc_handler = &arlan_sysctl_info, | 1055 | .proc_handler = arlan_sysctl_info, |
1076 | }, | 1056 | }, |
1077 | #endif | 1057 | #endif |
1078 | { | 1058 | { |
1079 | .ctl_name = 155, | ||
1080 | .procname = "config2", | 1059 | .procname = "config2", |
1081 | .data = &conf_reset_result, | 1060 | .data = &conf_reset_result, |
1082 | .maxlen = 100, | 1061 | .maxlen = 100, |
1083 | .mode = 0400, | 1062 | .mode = 0400, |
1084 | .proc_handler = &arlan_configure, | 1063 | .proc_handler = arlan_configure, |
1085 | }, | 1064 | }, |
1086 | { | 1065 | { |
1087 | .ctl_name = 156, | ||
1088 | .procname = "reset2", | 1066 | .procname = "reset2", |
1089 | .data = &conf_reset_result, | 1067 | .data = &conf_reset_result, |
1090 | .maxlen = 100, | 1068 | .maxlen = 100, |
1091 | .mode = 0400, | 1069 | .mode = 0400, |
1092 | .proc_handler = &arlan_sysctl_reset, | 1070 | .proc_handler = arlan_sysctl_reset, |
1093 | }, | 1071 | }, |
1094 | { .ctl_name = 0 } | 1072 | { } |
1095 | }; | 1073 | }; |
1096 | 1074 | ||
1097 | static ctl_table arlan_conf_table3[] = | 1075 | static ctl_table arlan_conf_table3[] = |
@@ -1101,63 +1079,56 @@ static ctl_table arlan_conf_table3[] = | |||
1101 | 1079 | ||
1102 | #ifdef ARLAN_PROC_SHM_DUMP | 1080 | #ifdef ARLAN_PROC_SHM_DUMP |
1103 | { | 1081 | { |
1104 | .ctl_name = 150, | ||
1105 | .procname = "arlan3-txRing", | 1082 | .procname = "arlan3-txRing", |
1106 | .data = &arlan_drive_info, | 1083 | .data = &arlan_drive_info, |
1107 | .maxlen = ARLAN_STR_SIZE, | 1084 | .maxlen = ARLAN_STR_SIZE, |
1108 | .mode = 0400, | 1085 | .mode = 0400, |
1109 | .proc_handler = &arlan_sysctl_infotxRing, | 1086 | .proc_handler = arlan_sysctl_infotxRing, |
1110 | }, | 1087 | }, |
1111 | { | 1088 | { |
1112 | .ctl_name = 151, | ||
1113 | .procname = "arlan3-rxRing", | 1089 | .procname = "arlan3-rxRing", |
1114 | .data = &arlan_drive_info, | 1090 | .data = &arlan_drive_info, |
1115 | .maxlen = ARLAN_STR_SIZE, | 1091 | .maxlen = ARLAN_STR_SIZE, |
1116 | .mode = 0400, | 1092 | .mode = 0400, |
1117 | .proc_handler = &arlan_sysctl_inforxRing, | 1093 | .proc_handler = arlan_sysctl_inforxRing, |
1118 | }, | 1094 | }, |
1119 | { | 1095 | { |
1120 | .ctl_name = 152, | ||
1121 | .procname = "arlan3-18", | 1096 | .procname = "arlan3-18", |
1122 | .data = &arlan_drive_info, | 1097 | .data = &arlan_drive_info, |
1123 | .maxlen = ARLAN_STR_SIZE, | 1098 | .maxlen = ARLAN_STR_SIZE, |
1124 | .mode = 0400, | 1099 | .mode = 0400, |
1125 | .proc_handler = &arlan_sysctl_info18, | 1100 | .proc_handler = arlan_sysctl_info18, |
1126 | }, | 1101 | }, |
1127 | { | 1102 | { |
1128 | .ctl_name = 153, | ||
1129 | .procname = "arlan3-ring", | 1103 | .procname = "arlan3-ring", |
1130 | .data = &arlan_drive_info, | 1104 | .data = &arlan_drive_info, |
1131 | .maxlen = ARLAN_STR_SIZE, | 1105 | .maxlen = ARLAN_STR_SIZE, |
1132 | .mode = 0400, | 1106 | .mode = 0400, |
1133 | .proc_handler = &arlan_sysctl_info161719, | 1107 | .proc_handler = arlan_sysctl_info161719, |
1134 | }, | 1108 | }, |
1135 | { | 1109 | { |
1136 | .ctl_name = 154, | ||
1137 | .procname = "arlan3-shm-cpy", | 1110 | .procname = "arlan3-shm-cpy", |
1138 | .data = &arlan_drive_info, | 1111 | .data = &arlan_drive_info, |
1139 | .maxlen = ARLAN_STR_SIZE, | 1112 | .maxlen = ARLAN_STR_SIZE, |
1140 | .mode = 0400, | 1113 | .mode = 0400, |
1141 | .proc_handler = &arlan_sysctl_info, | 1114 | .proc_handler = arlan_sysctl_info, |
1142 | }, | 1115 | }, |
1143 | #endif | 1116 | #endif |
1144 | { | 1117 | { |
1145 | .ctl_name = 155, | ||
1146 | .procname = "config3", | 1118 | .procname = "config3", |
1147 | .data = &conf_reset_result, | 1119 | .data = &conf_reset_result, |
1148 | .maxlen = 100, | 1120 | .maxlen = 100, |
1149 | .mode = 0400, | 1121 | .mode = 0400, |
1150 | .proc_handler = &arlan_configure, | 1122 | .proc_handler = arlan_configure, |
1151 | }, | 1123 | }, |
1152 | { | 1124 | { |
1153 | .ctl_name = 156, | ||
1154 | .procname = "reset3", | 1125 | .procname = "reset3", |
1155 | .data = &conf_reset_result, | 1126 | .data = &conf_reset_result, |
1156 | .maxlen = 100, | 1127 | .maxlen = 100, |
1157 | .mode = 0400, | 1128 | .mode = 0400, |
1158 | .proc_handler = &arlan_sysctl_reset, | 1129 | .proc_handler = arlan_sysctl_reset, |
1159 | }, | 1130 | }, |
1160 | { .ctl_name = 0 } | 1131 | { } |
1161 | }; | 1132 | }; |
1162 | 1133 | ||
1163 | 1134 | ||
@@ -1165,41 +1136,37 @@ static ctl_table arlan_conf_table3[] = | |||
1165 | static ctl_table arlan_table[] = | 1136 | static ctl_table arlan_table[] = |
1166 | { | 1137 | { |
1167 | { | 1138 | { |
1168 | .ctl_name = 0, | ||
1169 | .procname = "arlan0", | 1139 | .procname = "arlan0", |
1170 | .maxlen = 0, | 1140 | .maxlen = 0, |
1171 | .mode = 0600, | 1141 | .mode = 0600, |
1172 | .child = arlan_conf_table0, | 1142 | .child = arlan_conf_table0, |
1173 | }, | 1143 | }, |
1174 | { | 1144 | { |
1175 | .ctl_name = 0, | ||
1176 | .procname = "arlan1", | 1145 | .procname = "arlan1", |
1177 | .maxlen = 0, | 1146 | .maxlen = 0, |
1178 | .mode = 0600, | 1147 | .mode = 0600, |
1179 | .child = arlan_conf_table1, | 1148 | .child = arlan_conf_table1, |
1180 | }, | 1149 | }, |
1181 | { | 1150 | { |
1182 | .ctl_name = 0, | ||
1183 | .procname = "arlan2", | 1151 | .procname = "arlan2", |
1184 | .maxlen = 0, | 1152 | .maxlen = 0, |
1185 | .mode = 0600, | 1153 | .mode = 0600, |
1186 | .child = arlan_conf_table2, | 1154 | .child = arlan_conf_table2, |
1187 | }, | 1155 | }, |
1188 | { | 1156 | { |
1189 | .ctl_name = 0, | ||
1190 | .procname = "arlan3", | 1157 | .procname = "arlan3", |
1191 | .maxlen = 0, | 1158 | .maxlen = 0, |
1192 | .mode = 0600, | 1159 | .mode = 0600, |
1193 | .child = arlan_conf_table3, | 1160 | .child = arlan_conf_table3, |
1194 | }, | 1161 | }, |
1195 | { .ctl_name = 0 } | 1162 | { } |
1196 | }; | 1163 | }; |
1197 | 1164 | ||
1198 | #else | 1165 | #else |
1199 | 1166 | ||
1200 | static ctl_table arlan_table[MAX_ARLANS + 1] = | 1167 | static ctl_table arlan_table[] = |
1201 | { | 1168 | { |
1202 | { .ctl_name = 0 } | 1169 | { } |
1203 | }; | 1170 | }; |
1204 | #endif | 1171 | #endif |
1205 | 1172 | ||
@@ -1209,22 +1176,14 @@ static ctl_table arlan_table[MAX_ARLANS + 1] = | |||
1209 | static ctl_table arlan_root_table[] = | 1176 | static ctl_table arlan_root_table[] = |
1210 | { | 1177 | { |
1211 | { | 1178 | { |
1212 | .ctl_name = CTL_ARLAN, | ||
1213 | .procname = "arlan", | 1179 | .procname = "arlan", |
1214 | .maxlen = 0, | 1180 | .maxlen = 0, |
1215 | .mode = 0555, | 1181 | .mode = 0555, |
1216 | .child = arlan_table, | 1182 | .child = arlan_table, |
1217 | }, | 1183 | }, |
1218 | { .ctl_name = 0 } | 1184 | { } |
1219 | }; | 1185 | }; |
1220 | 1186 | ||
1221 | /* Make sure that /proc/sys/dev is there */ | ||
1222 | //static ctl_table arlan_device_root_table[] = | ||
1223 | //{ | ||
1224 | // {CTL_DEV, "dev", NULL, 0, 0555, arlan_root_table}, | ||
1225 | // {0} | ||
1226 | //}; | ||
1227 | |||
1228 | 1187 | ||
1229 | static struct ctl_table_header *arlan_device_sysctl_header; | 1188 | static struct ctl_table_header *arlan_device_sysctl_header; |
1230 | 1189 | ||
@@ -1234,8 +1193,6 @@ int __init init_arlan_proc(void) | |||
1234 | int i = 0; | 1193 | int i = 0; |
1235 | if (arlan_device_sysctl_header) | 1194 | if (arlan_device_sysctl_header) |
1236 | return 0; | 1195 | return 0; |
1237 | for (i = 0; i < MAX_ARLANS && arlan_device[i]; i++) | ||
1238 | arlan_table[i].ctl_name = i + 1; | ||
1239 | arlan_device_sysctl_header = register_sysctl_table(arlan_root_table); | 1196 | arlan_device_sysctl_header = register_sysctl_table(arlan_root_table); |
1240 | if (!arlan_device_sysctl_header) | 1197 | if (!arlan_device_sysctl_header) |
1241 | return -1; | 1198 | return -1; |