diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-23 11:47:02 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-23 11:47:02 -0700 |
commit | 5f05647dd81c11a6a165ccc8f0c1370b16f3bcb0 (patch) | |
tree | 7851ef1c93aa1aba7ef327ca4b75fd35e6d10f29 /drivers/net/skfp/pmf.c | |
parent | 02f36038c568111ad4fc433f6fa760ff5e38fab4 (diff) | |
parent | ec37a48d1d16c30b655ac5280209edf52a6775d4 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1699 commits)
bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL.
vlan: Calling vlan_hwaccel_do_receive() is always valid.
tproxy: use the interface primary IP address as a default value for --on-ip
tproxy: added IPv6 support to the socket match
cxgb3: function namespace cleanup
tproxy: added IPv6 support to the TPROXY target
tproxy: added IPv6 socket lookup function to nf_tproxy_core
be2net: Changes to use only priority codes allowed by f/w
tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled
tproxy: added tproxy sockopt interface in the IPV6 layer
tproxy: added udp6_lib_lookup function
tproxy: added const specifiers to udp lookup functions
tproxy: split off ipv6 defragmentation to a separate module
l2tp: small cleanup
nf_nat: restrict ICMP translation for embedded header
can: mcp251x: fix generation of error frames
can: mcp251x: fix endless loop in interrupt handler if CANINTF_MERRF is set
can-raw: add msg_flags to distinguish local traffic
9p: client code cleanup
rds: make local functions/variables static
...
Fix up conflicts in net/core/dev.c, drivers/net/pcmcia/smc91c92_cs.c and
drivers/net/wireless/ath/ath9k/debug.c as per David
Diffstat (limited to 'drivers/net/skfp/pmf.c')
-rw-r--r-- | drivers/net/skfp/pmf.c | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/drivers/net/skfp/pmf.c b/drivers/net/skfp/pmf.c index a320fdb3727..9ac4665d741 100644 --- a/drivers/net/skfp/pmf.c +++ b/drivers/net/skfp/pmf.c @@ -328,7 +328,7 @@ static SMbuf *smt_build_pmf_response(struct s_smc *smc, struct smt_header *req, * build SMT header */ if (!(mb = smt_get_mbuf(smc))) - return(mb) ; + return mb; smt = smtod(mb, struct smt_header *) ; smt->smt_dest = req->smt_source ; /* DA == source of request */ @@ -493,7 +493,7 @@ static SMbuf *smt_build_pmf_response(struct s_smc *smc, struct smt_header *req, smt_add_para(smc,&set_pcon,(u_short) SMT_P1035,0,0) ; smt_add_para(smc,&set_pcon,(u_short) SMT_P1036,0,0) ; } - return(mb) ; + return mb; } static int smt_authorize(struct s_smc *smc, struct smt_header *sm) @@ -511,7 +511,7 @@ static int smt_authorize(struct s_smc *smc, struct smt_header *sm) if (i != 8) { if (memcmp((char *) &sm->smt_sid, (char *) &smc->mib.fddiPRPMFStation,8)) - return(1) ; + return 1; } /* * check authoriziation parameter if passwd not zero @@ -522,13 +522,13 @@ static int smt_authorize(struct s_smc *smc, struct smt_header *sm) if (i != 8) { pa = (struct smt_para *) sm_to_para(smc,sm,SMT_P_AUTHOR) ; if (!pa) - return(1) ; + return 1; if (pa->p_len != 8) - return(1) ; + return 1; if (memcmp((char *)(pa+1),(char *)smc->mib.fddiPRPMFPasswd,8)) - return(1) ; + return 1; } - return(0) ; + return 0; } static int smt_check_set_count(struct s_smc *smc, struct smt_header *sm) @@ -542,9 +542,9 @@ static int smt_check_set_count(struct s_smc *smc, struct smt_header *sm) if ((smc->mib.fddiSMTSetCount.count != sc->count) || memcmp((char *) smc->mib.fddiSMTSetCount.timestamp, (char *)sc->timestamp,8)) - return(1) ; + return 1; } - return(0) ; + return 0; } void smt_add_para(struct s_smc *smc, struct s_pcon *pcon, u_short para, @@ -1109,7 +1109,7 @@ static int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index, break ; case 0x2000 : if (mac < 0 || mac >= NUMMACS) { - return(SMT_RDF_NOPARAM) ; + return SMT_RDF_NOPARAM; } mib_m = &smc->mib.m[mac] ; mib_addr = (char *) mib_m ; @@ -1118,7 +1118,7 @@ static int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index, break ; case 0x3000 : if (path < 0 || path >= NUMPATHS) { - return(SMT_RDF_NOPARAM) ; + return SMT_RDF_NOPARAM; } mib_a = &smc->mib.a[path] ; mib_addr = (char *) mib_a ; @@ -1127,7 +1127,7 @@ static int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index, break ; case 0x4000 : if (port < 0 || port >= smt_mib_phys(smc)) { - return(SMT_RDF_NOPARAM) ; + return SMT_RDF_NOPARAM; } mib_p = &smc->mib.p[port_to_mib(smc,port)] ; mib_addr = (char *) mib_p ; @@ -1151,22 +1151,20 @@ static int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index, case SMT_P10F9 : #endif case SMT_P20F1 : - if (!local) { - return(SMT_RDF_NOPARAM) ; - } + if (!local) + return SMT_RDF_NOPARAM; break ; } pt = smt_get_ptab(pa->p_type) ; - if (!pt) { - return( (pa->p_type & 0xff00) ? SMT_RDF_NOPARAM : - SMT_RDF_ILLEGAL ) ; - } + if (!pt) + return (pa->p_type & 0xff00) ? SMT_RDF_NOPARAM : + SMT_RDF_ILLEGAL; switch (pt->p_access) { case AC_GR : case AC_S : break ; default : - return(SMT_RDF_ILLEGAL) ; + return SMT_RDF_ILLEGAL; } to = mib_addr + pt->p_offset ; swap = pt->p_swap ; /* pointer to swap string */ @@ -1292,7 +1290,7 @@ static int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index, break ; default : SMT_PANIC(smc,SMT_E0120, SMT_E0120_MSG) ; - return(SMT_RDF_ILLEGAL) ; + return SMT_RDF_ILLEGAL; } } /* @@ -1501,15 +1499,15 @@ change_mac_para: default : break ; } - return(0) ; + return 0; val_error: /* parameter value in frame is out of range */ - return(SMT_RDF_RANGE) ; + return SMT_RDF_RANGE; len_error: /* parameter value in frame is too short */ - return(SMT_RDF_LENGTH) ; + return SMT_RDF_LENGTH; #if 0 no_author_error: @@ -1518,7 +1516,7 @@ no_author_error: * because SBA denied is not a valid return code in the * PMF protocol. */ - return(SMT_RDF_AUTHOR) ; + return SMT_RDF_AUTHOR; #endif } @@ -1527,7 +1525,7 @@ 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 : NULL) ; + return pt->p_num ? pt : NULL; } static int smt_mib_phys(struct s_smc *smc) @@ -1535,11 +1533,11 @@ static int smt_mib_phys(struct s_smc *smc) #ifdef CONCENTRATOR SK_UNUSED(smc) ; - return(NUMPHYS) ; + return NUMPHYS; #else if (smc->s.sas == SMT_SAS) - return(1) ; - return(NUMPHYS) ; + return 1; + return NUMPHYS; #endif } @@ -1548,11 +1546,11 @@ static int port_to_mib(struct s_smc *smc, int p) #ifdef CONCENTRATOR SK_UNUSED(smc) ; - return(p) ; + return p; #else if (smc->s.sas == SMT_SAS) - return(PS) ; - return(p) ; + return PS; + return p; #endif } |