Commit 98a1e2a9 authored by Michael Buesch's avatar Michael Buesch Committed by John W. Linville

b44/b43/b43legacy: Fix switch warnings introduced by SSB-SDIO

This fixes some gcc warnings for switch statements.
Signed-off-by: default avatarMichael Buesch <mb@bu3sch.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 24ea602e
...@@ -1303,10 +1303,13 @@ static void b44_chip_reset(struct b44 *bp, int reset_kind) ...@@ -1303,10 +1303,13 @@ static void b44_chip_reset(struct b44 *bp, int reset_kind)
& MDIO_CTRL_MAXF_MASK))); & MDIO_CTRL_MAXF_MASK)));
break; break;
case SSB_BUSTYPE_PCI: case SSB_BUSTYPE_PCI:
case SSB_BUSTYPE_PCMCIA:
bw32(bp, B44_MDIO_CTRL, (MDIO_CTRL_PREAMBLE | bw32(bp, B44_MDIO_CTRL, (MDIO_CTRL_PREAMBLE |
(0x0d & MDIO_CTRL_MAXF_MASK))); (0x0d & MDIO_CTRL_MAXF_MASK)));
break; break;
case SSB_BUSTYPE_PCMCIA:
case SSB_BUSTYPE_SDIO:
WARN_ON(1); /* A device with this bus does not exist. */
break;
} }
br32(bp, B44_MDIO_CTRL); br32(bp, B44_MDIO_CTRL);
...@@ -1764,10 +1767,13 @@ static void b44_get_drvinfo (struct net_device *dev, struct ethtool_drvinfo *inf ...@@ -1764,10 +1767,13 @@ static void b44_get_drvinfo (struct net_device *dev, struct ethtool_drvinfo *inf
case SSB_BUSTYPE_PCI: case SSB_BUSTYPE_PCI:
strlcpy(info->bus_info, pci_name(bus->host_pci), sizeof(info->bus_info)); strlcpy(info->bus_info, pci_name(bus->host_pci), sizeof(info->bus_info));
break; break;
case SSB_BUSTYPE_PCMCIA:
case SSB_BUSTYPE_SSB: case SSB_BUSTYPE_SSB:
strlcpy(info->bus_info, "SSB", sizeof(info->bus_info)); strlcpy(info->bus_info, "SSB", sizeof(info->bus_info));
break; break;
case SSB_BUSTYPE_PCMCIA:
case SSB_BUSTYPE_SDIO:
WARN_ON(1); /* A device with this bus does not exist. */
break;
} }
} }
......
...@@ -4092,16 +4092,20 @@ static void b43_imcfglo_timeouts_workaround(struct b43_wldev *dev) ...@@ -4092,16 +4092,20 @@ static void b43_imcfglo_timeouts_workaround(struct b43_wldev *dev)
bus->pcicore.dev->id.revision <= 5) { bus->pcicore.dev->id.revision <= 5) {
/* IMCFGLO timeouts workaround. */ /* IMCFGLO timeouts workaround. */
tmp = ssb_read32(dev->dev, SSB_IMCFGLO); tmp = ssb_read32(dev->dev, SSB_IMCFGLO);
tmp &= ~SSB_IMCFGLO_REQTO;
tmp &= ~SSB_IMCFGLO_SERTO;
switch (bus->bustype) { switch (bus->bustype) {
case SSB_BUSTYPE_PCI: case SSB_BUSTYPE_PCI:
case SSB_BUSTYPE_PCMCIA: case SSB_BUSTYPE_PCMCIA:
tmp &= ~SSB_IMCFGLO_REQTO;
tmp &= ~SSB_IMCFGLO_SERTO;
tmp |= 0x32; tmp |= 0x32;
break; break;
case SSB_BUSTYPE_SSB: case SSB_BUSTYPE_SSB:
tmp &= ~SSB_IMCFGLO_REQTO;
tmp &= ~SSB_IMCFGLO_SERTO;
tmp |= 0x53; tmp |= 0x53;
break; break;
default:
break;
} }
ssb_write32(dev->dev, SSB_IMCFGLO, tmp); ssb_write32(dev->dev, SSB_IMCFGLO, tmp);
} }
......
...@@ -3106,16 +3106,20 @@ static void b43legacy_imcfglo_timeouts_workaround(struct b43legacy_wldev *dev) ...@@ -3106,16 +3106,20 @@ static void b43legacy_imcfglo_timeouts_workaround(struct b43legacy_wldev *dev)
bus->pcicore.dev->id.revision <= 5) { bus->pcicore.dev->id.revision <= 5) {
/* IMCFGLO timeouts workaround. */ /* IMCFGLO timeouts workaround. */
tmp = ssb_read32(dev->dev, SSB_IMCFGLO); tmp = ssb_read32(dev->dev, SSB_IMCFGLO);
tmp &= ~SSB_IMCFGLO_REQTO;
tmp &= ~SSB_IMCFGLO_SERTO;
switch (bus->bustype) { switch (bus->bustype) {
case SSB_BUSTYPE_PCI: case SSB_BUSTYPE_PCI:
case SSB_BUSTYPE_PCMCIA: case SSB_BUSTYPE_PCMCIA:
tmp &= ~SSB_IMCFGLO_REQTO;
tmp &= ~SSB_IMCFGLO_SERTO;
tmp |= 0x32; tmp |= 0x32;
break; break;
case SSB_BUSTYPE_SSB: case SSB_BUSTYPE_SSB:
tmp &= ~SSB_IMCFGLO_REQTO;
tmp &= ~SSB_IMCFGLO_SERTO;
tmp |= 0x53; tmp |= 0x53;
break; break;
default:
break;
} }
ssb_write32(dev->dev, SSB_IMCFGLO, tmp); ssb_write32(dev->dev, SSB_IMCFGLO, tmp);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment