X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Fskfp%2Frmt.c;h=5771dc42ced8db377788650643aac5e63e20d362;hb=2cf7311f007833d5818fc9241c09a372c0325a4a;hp=ef8d5672d9e8dad4e146332fee901f56b58a8ef2;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/drivers/net/skfp/rmt.c b/drivers/net/skfp/rmt.c index ef8d5672d..5771dc42c 100644 --- a/drivers/net/skfp/rmt.c +++ b/drivers/net/skfp/rmt.c @@ -102,17 +102,17 @@ static const char * const rmt_events[] = { /* * function declarations */ -static void rmt_fsm(struct s_smc *smc, int cmd); -static void start_rmt_timer0(struct s_smc *smc, u_long value, int event); -static void start_rmt_timer1(struct s_smc *smc, u_long value, int event); -static void start_rmt_timer2(struct s_smc *smc, u_long value, int event); -static void stop_rmt_timer0(struct s_smc *smc); -static void stop_rmt_timer1(struct s_smc *smc); -static void stop_rmt_timer2(struct s_smc *smc); -static void rmt_dup_actions(struct s_smc *smc); -static void rmt_reinsert_actions(struct s_smc *smc); -static void rmt_leave_actions(struct s_smc *smc); -static void rmt_new_dup_actions(struct s_smc *smc); +static void rmt_fsm() ; +static void start_rmt_timer0() ; +static void start_rmt_timer1() ; +static void start_rmt_timer2() ; +static void stop_rmt_timer0() ; +static void stop_rmt_timer1() ; +static void stop_rmt_timer2() ; +static void rmt_dup_actions() ; +static void rmt_reinsert_actions() ; +static void rmt_leave_actions() ; +static void rmt_new_dup_actions() ; #ifndef SUPERNET_3 extern void restart_trt_for_dbcn() ; @@ -122,7 +122,8 @@ extern void restart_trt_for_dbcn() ; init RMT state machine clear all RMT vars and flags */ -void rmt_init(struct s_smc *smc) +void rmt_init(smc) +struct s_smc *smc ; { smc->mib.m[MAC0].fddiMACRMTState = ACTIONS(RM0_ISOLATED) ; smc->r.dup_addr_test = DA_NONE ; @@ -144,7 +145,9 @@ void rmt_init(struct s_smc *smc) process event until SM is stable */ -void rmt(struct s_smc *smc, int event) +void rmt(smc,event) +struct s_smc *smc ; +int event ; { int state ; @@ -163,7 +166,9 @@ void rmt(struct s_smc *smc, int event) /* process RMT event */ -static void rmt_fsm(struct s_smc *smc, int cmd) +static void rmt_fsm(smc,cmd) +struct s_smc *smc ; +int cmd ; { /* * RM00-RM70 : from all states @@ -530,7 +535,8 @@ static void rmt_fsm(struct s_smc *smc, int cmd) * (jd) RMT duplicate address actions * leave the ring or reinsert just as configured */ -static void rmt_dup_actions(struct s_smc *smc) +static void rmt_dup_actions(smc) +struct s_smc *smc ; { if (smc->r.jm_flag) { } @@ -549,7 +555,8 @@ static void rmt_dup_actions(struct s_smc *smc) /* * Reconnect to the Ring */ -static void rmt_reinsert_actions(struct s_smc *smc) +static void rmt_reinsert_actions(smc) +struct s_smc *smc ; { queue_event(smc,EVENT_ECM,EC_DISCONNECT) ; queue_event(smc,EVENT_ECM,EC_CONNECT) ; @@ -558,7 +565,8 @@ static void rmt_reinsert_actions(struct s_smc *smc) /* * duplicate address detected */ -static void rmt_new_dup_actions(struct s_smc *smc) +static void rmt_new_dup_actions(smc) +struct s_smc *smc ; { smc->r.da_flag = TRUE ; smc->r.bn_flag = FALSE ; @@ -583,7 +591,8 @@ static void rmt_new_dup_actions(struct s_smc *smc) /* * leave the ring */ -static void rmt_leave_actions(struct s_smc *smc) +static void rmt_leave_actions(smc) +struct s_smc *smc ; { queue_event(smc,EVENT_ECM,EC_DISCONNECT) ; /* @@ -596,7 +605,10 @@ static void rmt_leave_actions(struct s_smc *smc) * SMT timer interface * start RMT timer 0 */ -static void start_rmt_timer0(struct s_smc *smc, u_long value, int event) +static void start_rmt_timer0(smc,value,event) +struct s_smc *smc ; +u_long value ; +int event ; { smc->r.timer0_exp = FALSE ; /* clear timer event flag */ smt_timer_start(smc,&smc->r.rmt_timer0,value,EV_TOKEN(EVENT_RMT,event)); @@ -606,7 +618,10 @@ static void start_rmt_timer0(struct s_smc *smc, u_long value, int event) * SMT timer interface * start RMT timer 1 */ -static void start_rmt_timer1(struct s_smc *smc, u_long value, int event) +static void start_rmt_timer1(smc,value,event) +struct s_smc *smc ; +u_long value ; +int event ; { smc->r.timer1_exp = FALSE ; /* clear timer event flag */ smt_timer_start(smc,&smc->r.rmt_timer1,value,EV_TOKEN(EVENT_RMT,event)); @@ -616,7 +631,10 @@ static void start_rmt_timer1(struct s_smc *smc, u_long value, int event) * SMT timer interface * start RMT timer 2 */ -static void start_rmt_timer2(struct s_smc *smc, u_long value, int event) +static void start_rmt_timer2(smc,value,event) +struct s_smc *smc ; +u_long value ; +int event ; { smc->r.timer2_exp = FALSE ; /* clear timer event flag */ smt_timer_start(smc,&smc->r.rmt_timer2,value,EV_TOKEN(EVENT_RMT,event)); @@ -626,7 +644,8 @@ static void start_rmt_timer2(struct s_smc *smc, u_long value, int event) * SMT timer interface * stop RMT timer 0 */ -static void stop_rmt_timer0(struct s_smc *smc) +static void stop_rmt_timer0(smc) +struct s_smc *smc ; { if (smc->r.rmt_timer0.tm_active) smt_timer_stop(smc,&smc->r.rmt_timer0) ; @@ -636,7 +655,8 @@ static void stop_rmt_timer0(struct s_smc *smc) * SMT timer interface * stop RMT timer 1 */ -static void stop_rmt_timer1(struct s_smc *smc) +static void stop_rmt_timer1(smc) +struct s_smc *smc ; { if (smc->r.rmt_timer1.tm_active) smt_timer_stop(smc,&smc->r.rmt_timer1) ; @@ -646,9 +666,9 @@ static void stop_rmt_timer1(struct s_smc *smc) * SMT timer interface * stop RMT timer 2 */ -static void stop_rmt_timer2(struct s_smc *smc) +static void stop_rmt_timer2(smc) +struct s_smc *smc ; { if (smc->r.rmt_timer2.tm_active) smt_timer_stop(smc,&smc->r.rmt_timer2) ; } -