]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/skfp/smt.c
forcedeth bug fix: vitesse phy
[linux-2.6-omap-h63xx.git] / drivers / net / skfp / smt.c
index f17c05cbe44bf84a79eab3b4d3900369f9f8a706..75afc1f07ba0ab2b70d263738759cb30c9b52fa9 100644 (file)
@@ -18,6 +18,7 @@
 #include "h/fddi.h"
 #include "h/smc.h"
 #include "h/smt_p.h"
+#include <linux/bitrev.h>
 
 #define KERNEL
 #include "h/smtstate.h"
@@ -26,8 +27,6 @@
 static const char ID_sccs[] = "@(#)smt.c       2.43 98/11/23 (C) SK " ;
 #endif
 
-extern const u_char canonical[256] ;
-
 /*
  * FC in SMbuf
  */
@@ -180,7 +179,7 @@ void smt_agent_init(struct s_smc *smc)
        driver_get_bia(smc,&smc->mib.fddiSMTStationId.sid_node) ;
        for (i = 0 ; i < 6 ; i ++) {
                smc->mib.fddiSMTStationId.sid_node.a[i] =
-                       canonical[smc->mib.fddiSMTStationId.sid_node.a[i]] ;
+                       bitrev8(smc->mib.fddiSMTStationId.sid_node.a[i]);
        }
        smc->mib.fddiSMTManufacturerData[0] =
                smc->mib.fddiSMTStationId.sid_node.a[0] ;
@@ -1749,7 +1748,7 @@ char *addr_to_string(struct fddi_addr *addr)
 #endif
 
 #ifdef AM29K
-smt_ifconfig(int argc, char *argv[])
+int smt_ifconfig(int argc, char *argv[])
 {
        if (argc >= 2 && !strcmp(argv[0],"opt_bypass") &&
            !strcmp(argv[1],"yes")) {
@@ -1896,7 +1895,7 @@ void smt_swap_para(struct smt_header *sm, int len, int direction)
 
 static void smt_string_swap(char *data, const char *format, int len)
 {
-       const char      *open_paren = 0 ;
+       const char      *open_paren = NULL ;
        int     x ;
 
        while (len > 0  && *format) {
@@ -2049,9 +2048,8 @@ static void hwm_conv_can(struct s_smc *smc, char *data, int len)
 
        SK_UNUSED(smc) ;
 
-       for (i = len; i ; i--, data++) {
-               *data = canonical[*(u_char *)data] ;
-       }
+       for (i = len; i ; i--, data++)
+               *data = bitrev8(*data);
 }
 #endif