diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-06-30 04:52:20 -0400 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-06-30 04:52:20 -0400 |
commit | c2d9b8387bce8b4a0fd402fab7dc1319d11a418d (patch) | |
tree | 082cf7dd287f61635198011e61c3de1be130cc42 /drivers/net/skfp/smt.c | |
parent | 2a322e4c08be4e7cb0c04b427ddaaa679fd88863 (diff) | |
parent | 9b4311eedb17fa88f02e4876cd6aa9a08e383cd6 (diff) |
Automerge with /usr/src/ntfs-2.6.git.
Diffstat (limited to 'drivers/net/skfp/smt.c')
-rw-r--r-- | drivers/net/skfp/smt.c | 48 |
1 files changed, 5 insertions, 43 deletions
diff --git a/drivers/net/skfp/smt.c b/drivers/net/skfp/smt.c index 71935eaf9d4e..f17c05cbe44b 100644 --- a/drivers/net/skfp/smt.c +++ b/drivers/net/skfp/smt.c | |||
@@ -86,7 +86,7 @@ static void smt_send_sif_config(struct s_smc *smc, struct fddi_addr *dest, | |||
86 | static void smt_send_sif_operation(struct s_smc *smc, struct fddi_addr *dest, | 86 | static void smt_send_sif_operation(struct s_smc *smc, struct fddi_addr *dest, |
87 | u_long tid, int local); | 87 | u_long tid, int local); |
88 | #ifdef LITTLE_ENDIAN | 88 | #ifdef LITTLE_ENDIAN |
89 | static void smt_string_swap(void); | 89 | static void smt_string_swap(char *data, const char *format, int len); |
90 | #endif | 90 | #endif |
91 | static void smt_add_frame_len(SMbuf *mb, int len); | 91 | static void smt_add_frame_len(SMbuf *mb, int len); |
92 | static void smt_fill_una(struct s_smc *smc, struct smt_p_una *una); | 92 | static void smt_fill_una(struct s_smc *smc, struct smt_p_una *una); |
@@ -110,7 +110,7 @@ static void smt_fill_setcount(struct s_smc *smc, struct smt_p_setcount *setcount | |||
110 | static void smt_fill_echo(struct s_smc *smc, struct smt_p_echo *echo, u_long seed, | 110 | static void smt_fill_echo(struct s_smc *smc, struct smt_p_echo *echo, u_long seed, |
111 | int len); | 111 | int len); |
112 | 112 | ||
113 | void smt_clear_una_dna(struct s_smc *smc); | 113 | static void smt_clear_una_dna(struct s_smc *smc); |
114 | static void smt_clear_old_una_dna(struct s_smc *smc); | 114 | static void smt_clear_old_una_dna(struct s_smc *smc); |
115 | #ifdef CONCENTRATOR | 115 | #ifdef CONCENTRATOR |
116 | static int entity_to_index(void); | 116 | static int entity_to_index(void); |
@@ -118,7 +118,7 @@ static int entity_to_index(void); | |||
118 | static void update_dac(struct s_smc *smc, int report); | 118 | static void update_dac(struct s_smc *smc, int report); |
119 | static int div_ratio(u_long upper, u_long lower); | 119 | static int div_ratio(u_long upper, u_long lower); |
120 | #ifdef USE_CAN_ADDR | 120 | #ifdef USE_CAN_ADDR |
121 | void hwm_conv_can(struct s_smc *smc, char *data, int len); | 121 | static void hwm_conv_can(struct s_smc *smc, char *data, int len); |
122 | #else | 122 | #else |
123 | #define hwm_conv_can(smc,data,len) | 123 | #define hwm_conv_can(smc,data,len) |
124 | #endif | 124 | #endif |
@@ -216,24 +216,6 @@ void smt_agent_task(struct s_smc *smc) | |||
216 | DB_SMT("SMT agent task\n",0,0) ; | 216 | DB_SMT("SMT agent task\n",0,0) ; |
217 | } | 217 | } |
218 | 218 | ||
219 | void smt_please_reconnect(struct s_smc *smc, int reconn_time) | ||
220 | /* struct s_smc *smc; Pointer to SMT context */ | ||
221 | /* int reconn_time; Wait for reconnect time in seconds */ | ||
222 | { | ||
223 | /* | ||
224 | * The please reconnect variable is used as a timer. | ||
225 | * It is decremented each time smt_event is called. | ||
226 | * This happens every second or when smt_force_irq is called. | ||
227 | * Note: smt_force_irq () is called on some packet receives and | ||
228 | * when a multicast address is changed. Since nothing | ||
229 | * is received during the disconnect and the multicast | ||
230 | * address changes can be viewed as not very often and | ||
231 | * the timer runs out close to its given value | ||
232 | * (reconn_time). | ||
233 | */ | ||
234 | smc->sm.please_reconnect = reconn_time ; | ||
235 | } | ||
236 | |||
237 | #ifndef SMT_REAL_TOKEN_CT | 219 | #ifndef SMT_REAL_TOKEN_CT |
238 | void smt_emulate_token_ct(struct s_smc *smc, int mac_index) | 220 | void smt_emulate_token_ct(struct s_smc *smc, int mac_index) |
239 | { | 221 | { |
@@ -1574,7 +1556,7 @@ static void smt_fill_echo(struct s_smc *smc, struct smt_p_echo *echo, u_long see | |||
1574 | * clear DNA and UNA | 1556 | * clear DNA and UNA |
1575 | * called from CFM if configuration changes | 1557 | * called from CFM if configuration changes |
1576 | */ | 1558 | */ |
1577 | void smt_clear_una_dna(struct s_smc *smc) | 1559 | static void smt_clear_una_dna(struct s_smc *smc) |
1578 | { | 1560 | { |
1579 | smc->mib.m[MAC0].fddiMACUpstreamNbr = SMT_Unknown ; | 1561 | smc->mib.m[MAC0].fddiMACUpstreamNbr = SMT_Unknown ; |
1580 | smc->mib.m[MAC0].fddiMACDownstreamNbr = SMT_Unknown ; | 1562 | smc->mib.m[MAC0].fddiMACDownstreamNbr = SMT_Unknown ; |
@@ -2058,30 +2040,10 @@ int smt_action(struct s_smc *smc, int class, int code, int index) | |||
2058 | } | 2040 | } |
2059 | 2041 | ||
2060 | /* | 2042 | /* |
2061 | * change tneg | ||
2062 | * set T_Req in MIB (Path Attribute) | ||
2063 | * calculate new values for MAC | ||
2064 | * if change required | ||
2065 | * disconnect | ||
2066 | * set reconnect | ||
2067 | * end | ||
2068 | */ | ||
2069 | void smt_change_t_neg(struct s_smc *smc, u_long tneg) | ||
2070 | { | ||
2071 | smc->mib.a[PATH0].fddiPATHMaxT_Req = tneg ; | ||
2072 | |||
2073 | if (smt_set_mac_opvalues(smc)) { | ||
2074 | RS_SET(smc,RS_EVENT) ; | ||
2075 | smc->sm.please_reconnect = 1 ; | ||
2076 | queue_event(smc,EVENT_ECM,EC_DISCONNECT) ; | ||
2077 | } | ||
2078 | } | ||
2079 | |||
2080 | /* | ||
2081 | * canonical conversion of <len> bytes beginning form *data | 2043 | * canonical conversion of <len> bytes beginning form *data |
2082 | */ | 2044 | */ |
2083 | #ifdef USE_CAN_ADDR | 2045 | #ifdef USE_CAN_ADDR |
2084 | void hwm_conv_can(struct s_smc *smc, char *data, int len) | 2046 | static void hwm_conv_can(struct s_smc *smc, char *data, int len) |
2085 | { | 2047 | { |
2086 | int i ; | 2048 | int i ; |
2087 | 2049 | ||