aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_sdio.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_sdio.c b/drivers/net/wireless/bcmdhd/dhd_sdio.c
index c7f587c8320..4b628e94234 100644
--- a/drivers/net/wireless/bcmdhd/dhd_sdio.c
+++ b/drivers/net/wireless/bcmdhd/dhd_sdio.c
@@ -24,6 +24,10 @@
* $Id: dhd_sdio.c 506047 2014-10-02 12:43:31Z $
*/
+#include <linux/mmc/host.h>
+#include <linux/mmc/card.h>
+#include <linux/mmc/sdio_func.h>
+
#include <typedefs.h>
#include <osl.h>
#include <bcmsdh.h>
@@ -53,6 +57,7 @@
#include <sbsdpcmdev.h>
#include <bcmsdpcm.h>
#include <bcmsdbus.h>
+#include <bcmsdh_sdmmc.h>
#include <proto/ethernet.h>
#include <proto/802.1d.h>
@@ -1737,6 +1742,9 @@ static int dhdsdio_txpkt_preprocess(dhd_bus_t *bus, void *pkt, int chan, int txs
uint32 swhdr_offset;
bool alloc_new_pkt = FALSE;
uint8 sdpcm_hdrlen = bus->txglom_enable ? SDPCM_HDRLEN_TXGLOM : SDPCM_HDRLEN;
+ sdioh_info_t *sd = bus->sdh->sdioh;
+ struct sdio_func *sdio_func = sd->func[0];
+ struct mmc_host *host = sdio_func->card->host;
*new_pkt = NULL;
osh = bus->dhd->osh;
@@ -1814,7 +1822,7 @@ static int dhdsdio_txpkt_preprocess(dhd_bus_t *bus, void *pkt, int chan, int txs
* Use the padding packet to avoid memory copy if applicable,
* otherwise, just allocate a new pkt.
*/
- if (bus->pad_pkt) {
+ if (bus->pad_pkt && (host->max_segs > 1)) {
*pad_pkt_len = chain_tail_padding;
bus->tx_tailpad_chain++;
} else {