diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2010-06-08 20:18:10 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2010-06-08 20:18:10 +0000 |
commit | a8c13fe54fb122396f636adfd9728f388ce21d04 (patch) | |
tree | 2c76724715bd78428ae4245756e7d43f4e211591 /target/linux | |
parent | 0bff315185da58d5484ee47f10469ffd1721b385 (diff) | |
download | upstream-a8c13fe54fb122396f636adfd9728f388ce21d04.tar.gz upstream-a8c13fe54fb122396f636adfd9728f388ce21d04.tar.bz2 upstream-a8c13fe54fb122396f636adfd9728f388ce21d04.zip |
ip17xx: Fix indentation in get_state() and update_state()
Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21712 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/generic-2.6/files/drivers/net/phy/ip175c.c | 152 |
1 files changed, 76 insertions, 76 deletions
diff --git a/target/linux/generic-2.6/files/drivers/net/phy/ip175c.c b/target/linux/generic-2.6/files/drivers/net/phy/ip175c.c index 8e1afcd7c2..6379f2be00 100644 --- a/target/linux/generic-2.6/files/drivers/net/phy/ip175c.c +++ b/target/linux/generic-2.6/files/drivers/net/phy/ip175c.c @@ -440,39 +440,39 @@ static int get_state(struct ip175c_state *state) } if (REG_SUPP(state->regs->VLAN_LOOKUP_REG)) { - for (j=0; j<MAX_PORTS; j++) { - state->ports[j].shareports = 0; // initialize them in case. - } - for (j=0; j<state->regs->NUM_PORTS; j++) { - reg addr; - const bitnum *bit_lookup = (j%2==0)? - state->regs->VLAN_LOOKUP_EVEN_BIT: - state->regs->VLAN_LOOKUP_ODD_BIT; - addr = state->regs->VLAN_LOOKUP_REG; - if (state->regs->SIMPLE_VLAN_REGISTERS) { - addr.m += j; - } else { - switch (j) { - case 0: - case 1: - break; - case 2: - case 3: - addr.m+=1; - break; - case 4: - addr.m+=2; - break; - case 5: - addr = state->regs->VLAN_LOOKUP_REG_5; - break; - } + for (j=0; j<MAX_PORTS; j++) { + state->ports[j].shareports = 0; // initialize them in case. } + for (j=0; j<state->regs->NUM_PORTS; j++) { + reg addr; + const bitnum *bit_lookup = (j%2==0)? + state->regs->VLAN_LOOKUP_EVEN_BIT: + state->regs->VLAN_LOOKUP_ODD_BIT; + addr = state->regs->VLAN_LOOKUP_REG; + if (state->regs->SIMPLE_VLAN_REGISTERS) { + addr.m += j; + } else { + switch (j) { + case 0: + case 1: + break; + case 2: + case 3: + addr.m+=1; + break; + case 4: + addr.m+=2; + break; + case 5: + addr = state->regs->VLAN_LOOKUP_REG_5; + break; + } + } - if (REG_SUPP(addr)) { - GET_PORT_BITS(state, state->ports[j].shareports, addr, bit_lookup); + if (REG_SUPP(addr)) { + GET_PORT_BITS(state, state->ports[j].shareports, addr, bit_lookup); + } } - } } else { for (j=0; j<MAX_PORTS; j++) { state->ports[j].shareports = 0xff; @@ -568,57 +568,57 @@ static int update_state(struct ip175c_state *state) state->regs->REMOVE_TAG_REG, state->regs->REMOVE_TAG_BIT); if (REG_SUPP(state->regs->VLAN_LOOKUP_REG)) { - for (j=0; j<state->regs->NUM_PORTS; j++) { - reg addr; - const bitnum *bit_lookup = (j%2==0)? - state->regs->VLAN_LOOKUP_EVEN_BIT: - state->regs->VLAN_LOOKUP_ODD_BIT; - - // duplicate code -- sorry - addr = state->regs->VLAN_LOOKUP_REG; - if (state->regs->SIMPLE_VLAN_REGISTERS) { - addr.m += j; - } else { - switch (j) { - case 0: - case 1: - break; - case 2: - case 3: - addr.m+=1; - break; - case 4: - addr.m+=2; - break; - case 5: - addr = state->regs->VLAN_LOOKUP_REG_5; - break; - default: - addr.m = -1; // shouldn't get here, but... - break; + for (j=0; j<state->regs->NUM_PORTS; j++) { + reg addr; + const bitnum *bit_lookup = (j%2==0)? + state->regs->VLAN_LOOKUP_EVEN_BIT: + state->regs->VLAN_LOOKUP_ODD_BIT; + + // duplicate code -- sorry + addr = state->regs->VLAN_LOOKUP_REG; + if (state->regs->SIMPLE_VLAN_REGISTERS) { + addr.m += j; + } else { + switch (j) { + case 0: + case 1: + break; + case 2: + case 3: + addr.m+=1; + break; + case 4: + addr.m+=2; + break; + case 5: + addr = state->regs->VLAN_LOOKUP_REG_5; + break; + default: + addr.m = -1; // shouldn't get here, but... + break; + } + } + //printf("shareports for %d is %02X\n",j,state->ports[j].shareports); + if (REG_SUPP(addr)) { + SET_PORT_BITS(state, state->ports[j].shareports, addr, bit_lookup); } } - //printf("shareports for %d is %02X\n",j,state->ports[j].shareports); - if (REG_SUPP(addr)) { - SET_PORT_BITS(state, state->ports[j].shareports, addr, bit_lookup); - } - } } if (REG_SUPP(state->regs->TAG_VLAN_MASK_REG)) { - for (j=0; j<MAX_VLANS; j++) { - reg addr = state->regs->TAG_VLAN_MASK_REG; - const bitnum *bit_lookup = (j%2==0)? - state->regs->TAG_VLAN_MASK_EVEN_BIT: - state->regs->TAG_VLAN_MASK_ODD_BIT; - unsigned int vlan_mask; - if (state->regs->SIMPLE_VLAN_REGISTERS) { - addr.m += j; - } else { - addr.m += j/2; + for (j=0; j<MAX_VLANS; j++) { + reg addr = state->regs->TAG_VLAN_MASK_REG; + const bitnum *bit_lookup = (j%2==0)? + state->regs->TAG_VLAN_MASK_EVEN_BIT: + state->regs->TAG_VLAN_MASK_ODD_BIT; + unsigned int vlan_mask; + if (state->regs->SIMPLE_VLAN_REGISTERS) { + addr.m += j; + } else { + addr.m += j/2; + } + vlan_mask = state->vlan_ports[j]; + SET_PORT_BITS(state, vlan_mask, addr, bit_lookup); } - vlan_mask = state->vlan_ports[j]; - SET_PORT_BITS(state, vlan_mask, addr, bit_lookup); - } } for (i=0; i<MAX_PORTS; i++) { |