VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / drivers / net / skfp / pmf.c
index ee0a8c5..f2b446d 100644 (file)
 static const char ID_sccs[] = "@(#)pmf.c       1.37 97/08/04 (C) SK " ;
 #endif
 
-static int smt_authorize() ;
-static int smt_check_set_count() ;
-static const struct s_p_tab *smt_get_ptab() ;
-static int smt_mib_phys() ;
-int smt_set_para() ;
-void smt_add_para() ;
+static int smt_authorize(struct s_smc *smc, struct smt_header *sm);
+static int smt_check_set_count(struct s_smc *smc, struct smt_header *sm);
+static const struct s_p_tab* smt_get_ptab(u_short para);
+static int smt_mib_phys(struct s_smc *smc);
+int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index, int local,
+                int set);
+void smt_add_para(struct s_smc *smc, struct s_pcon *pcon, u_short para,
+                 int index, int local);
+static SMbuf *smt_build_pmf_response(struct s_smc *smc, struct smt_header *req,
+                                    int set, int local);
 
 #define MOFFSS(e)      ((int)&(((struct fddi_mib *)0)->e))
 #define MOFFSA(e)      ((int) (((struct fddi_mib *)0)->e))
@@ -280,13 +284,7 @@ static const struct s_p_tab {
        { 0 }
 } ;
 
-
-static SMbuf *smt_build_pmf_response() ;
-
-void smt_pmf_received_pack(smc,mb,local)
-struct s_smc *smc ;
-SMbuf *mb ;
-int local ;
+void smt_pmf_received_pack(struct s_smc *smc, SMbuf *mb, int local)
 {
        struct smt_header       *sm ;
        SMbuf           *reply ;
@@ -316,13 +314,8 @@ int local ;
        }
 }
 
-extern SMbuf   *smt_get_mbuf() ;
-
-static SMbuf *smt_build_pmf_response(smc,req,set,local)
-struct s_smc *smc ;
-struct smt_header *req ;
-int    set ;
-int    local ;
+static SMbuf *smt_build_pmf_response(struct s_smc *smc, struct smt_header *req,
+                                    int set, int local)
 {
        SMbuf                   *mb ;
        struct smt_header       *smt ;
@@ -509,11 +502,7 @@ int        local ;
        return(mb) ;
 }
 
-extern void *sm_to_para() ;
-
-static int smt_authorize(smc,sm)
-struct s_smc *smc ;
-struct smt_header *sm ;
+static int smt_authorize(struct s_smc *smc, struct smt_header *sm)
 {
        struct smt_para *pa ;
        int             i ;
@@ -548,9 +537,7 @@ struct smt_header *sm ;
        return(0) ;
 }
 
-static int smt_check_set_count(smc,sm)
-struct s_smc *smc ;
-struct smt_header *sm ;
+static int smt_check_set_count(struct s_smc *smc, struct smt_header *sm)
 {
        struct smt_para *pa ;
        struct smt_p_setcount   *sc ;
@@ -566,17 +553,13 @@ struct smt_header *sm ;
        return(0) ;
 }
 
-void smt_add_para(smc,pcon,para,index,local)
-struct s_smc *smc ;
-struct s_pcon *pcon ;
-u_short para ;
-int index ;
-int local ;
+void smt_add_para(struct s_smc *smc, struct s_pcon *pcon, u_short para,
+                 int index, int local)
 {
        struct smt_para *pa ;
        const struct s_p_tab    *pt ;
-       struct fddi_mib_m *mib_m = ;
-       struct fddi_mib_p *mib_p = ;
+       struct fddi_mib_m *mib_m = NULL;
+       struct fddi_mib_p *mib_p = NULL;
        int             len ;
        int             plen ;
        char            *from ;
@@ -661,7 +644,7 @@ int local ;
        /*
         * check special paras
         */
-       swap = ;
+       swap = NULL;
        switch (para) {
        case SMT_P10F0 :
        case SMT_P10F1 :
@@ -1095,12 +1078,8 @@ wrong_error:
 /*
  * set parameter
  */
-int smt_set_para(smc,pa,index,local,set)
-struct s_smc *smc ;
-struct smt_para        *pa ;
-int index ;
-int local ;
-int set ;
+int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index, int local,
+                int set)
 {
 #define IFSET(x)       if (set) (x)
 
@@ -1112,9 +1091,9 @@ int set ;
        char            c ;
        char            *mib_addr ;
        struct fddi_mib *mib ;
-       struct fddi_mib_m       *mib_m = ;
-       struct fddi_mib_a       *mib_a = ;
-       struct fddi_mib_p       *mib_p = ;
+       struct fddi_mib_m       *mib_m = NULL;
+       struct fddi_mib_a       *mib_a = NULL;
+       struct fddi_mib_p       *mib_p = NULL;
        int             mac ;
        int             path ;
        int             port ;
@@ -1549,17 +1528,15 @@ no_author_error:
 #endif
 }
 
-static const struct s_p_tab *smt_get_ptab(para)
-u_short para ;
+static const struct s_p_tab *smt_get_ptab(u_short para)
 {
        const struct s_p_tab    *pt ;
        for (pt = p_tab ; pt->p_num && pt->p_num != para ; pt++)
                ;
-       return(pt->p_num ? pt : 0) ;
+       return(pt->p_num ? pt : NULL) ;
 }
 
-static int smt_mib_phys(smc)
-struct s_smc *smc ;
+static int smt_mib_phys(struct s_smc *smc)
 {
 #ifdef CONCENTRATOR
        SK_UNUSED(smc) ;
@@ -1572,9 +1549,7 @@ struct s_smc *smc ;
 #endif
 }
 
-int port_to_mib(smc,p)
-struct s_smc *smc ;
-int p ;
+int port_to_mib(struct s_smc *smc, int p)
 {
 #ifdef CONCENTRATOR
        SK_UNUSED(smc) ;
@@ -1590,10 +1565,7 @@ int p ;
 
 #ifdef DEBUG
 #ifndef        BOOT
-void dump_smt(smc,sm,text)
-struct s_smc *smc ;
-struct smt_header *sm ;
-char *text ;
+void dump_smt(struct s_smc *smc, struct smt_header *sm, char *text)
 {
        int     len ;
        struct smt_para *pa ;
@@ -1680,9 +1652,7 @@ char *text ;
        printf("-------------------------------------------------\n\n") ;
 }
 
-void dump_hex(p,len)
-char *p ;
-int len ;
+void dump_hex(char *p, int len)
 {
        int     n = 0 ;
        while (len--) {