Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[deliverable/linux.git] / drivers / net / wireless / brcm80211 / brcmsmac / dma.c
index 7516639412ec6740389c6eb005414d4ef826830d..5e53305bd9a9bc57901c1a0597b00de32208a57b 100644 (file)
@@ -573,6 +573,7 @@ struct dma_pub *dma_attach(char *name, struct si_pub *sih,
        struct dma_info *di;
        u8 rev = core->id.rev;
        uint size;
+       struct si_info *sii = container_of(sih, struct si_info, pub);
 
        /* allocate private info structure */
        di = kzalloc(sizeof(struct dma_info), GFP_ATOMIC);
@@ -633,16 +634,20 @@ struct dma_pub *dma_attach(char *name, struct si_pub *sih,
         */
        di->ddoffsetlow = 0;
        di->dataoffsetlow = 0;
-       /* add offset for pcie with DMA64 bus */
-       di->ddoffsetlow = 0;
-       di->ddoffsethigh = SI_PCIE_DMA_H32;
+       /* for pci bus, add offset */
+       if (sii->icbus->hosttype == BCMA_HOSTTYPE_PCI) {
+               /* add offset for pcie with DMA64 bus */
+               di->ddoffsetlow = 0;
+               di->ddoffsethigh = SI_PCIE_DMA_H32;
+       }
        di->dataoffsetlow = di->ddoffsetlow;
        di->dataoffsethigh = di->ddoffsethigh;
+
        /* WAR64450 : DMACtl.Addr ext fields are not supported in SDIOD core. */
-       if ((core->id.id == SDIOD_CORE_ID)
+       if ((core->id.id == BCMA_CORE_SDIO_DEV)
            && ((rev > 0) && (rev <= 2)))
                di->addrext = false;
-       else if ((core->id.id == I2S_CORE_ID) &&
+       else if ((core->id.id == BCMA_CORE_I2S) &&
                 ((rev == 0) || (rev == 1)))
                di->addrext = false;
        else
This page took 0.025804 seconds and 5 git commands to generate.