aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/skfp/smt.c
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2005-06-21 04:47:06 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-06-27 00:19:53 -0400
commit7aa55fcec236daed20dd362c99229184691d0e7f (patch)
tree2abf60107b4cecf1403c681dc75570cc48e99529 /drivers/net/skfp/smt.c
parent9b25978ef8ebe010f582489117f8a7a43a6b44a3 (diff)
[PATCH] drivers/net/skfp/: cleanups
This patch contains the following cleanups: - make needlessly global code static - remove the completely unused smtparse.c - remove the following unused global functions: - drvfbi.c: init_dma - drvfbi.c: dis_dma - drvfbi.c: get_rom_byte - drvfbi.c: mac_drv_vpd_read - drvfbi.c: mac_drv_pci_fix - fplustm.c: mac_set_func_addr - fplustm.c: mac_del_multicast - hwmtm.c: mac_drv_rx_frag - pcmplc.c: pcm_set_lct_short - smt.c: smt_please_reconnect - smt.c: smt_change_t_neg - smtdef.c: smt_set_defaults Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'drivers/net/skfp/smt.c')
-rw-r--r--drivers/net/skfp/smt.c46
1 files changed, 4 insertions, 42 deletions
diff --git a/drivers/net/skfp/smt.c b/drivers/net/skfp/smt.c
index c3a0d2f10b2b..f17c05cbe44b 100644
--- a/drivers/net/skfp/smt.c
+++ b/drivers/net/skfp/smt.c
@@ -110,7 +110,7 @@ static void smt_fill_setcount(struct s_smc *smc, struct smt_p_setcount *setcount
110static void smt_fill_echo(struct s_smc *smc, struct smt_p_echo *echo, u_long seed, 110static void smt_fill_echo(struct s_smc *smc, struct smt_p_echo *echo, u_long seed,
111 int len); 111 int len);
112 112
113void smt_clear_una_dna(struct s_smc *smc); 113static void smt_clear_una_dna(struct s_smc *smc);
114static void smt_clear_old_una_dna(struct s_smc *smc); 114static void smt_clear_old_una_dna(struct s_smc *smc);
115#ifdef CONCENTRATOR 115#ifdef CONCENTRATOR
116static int entity_to_index(void); 116static int entity_to_index(void);
@@ -118,7 +118,7 @@ static int entity_to_index(void);
118static void update_dac(struct s_smc *smc, int report); 118static void update_dac(struct s_smc *smc, int report);
119static int div_ratio(u_long upper, u_long lower); 119static int div_ratio(u_long upper, u_long lower);
120#ifdef USE_CAN_ADDR 120#ifdef USE_CAN_ADDR
121void hwm_conv_can(struct s_smc *smc, char *data, int len); 121static 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
219void 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
238void smt_emulate_token_ct(struct s_smc *smc, int mac_index) 220void 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 */
1577void smt_clear_una_dna(struct s_smc *smc) 1559static 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 */
2069void 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
2084void hwm_conv_can(struct s_smc *smc, char *data, int len) 2046static void hwm_conv_can(struct s_smc *smc, char *data, int len)
2085{ 2047{
2086 int i ; 2048 int i ;
2087 2049