Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1322441

[PATCH v3 2/6] libertas: check whether bus can do more than polling

From Andreas Kemnade <andreas@kemnade.info>
Newsgroups linux.kernel
Subject [PATCH v3 2/6] libertas: check whether bus can do more than polling
Date 2016-01-30 18:10 +0100
Message-ID <qWHc9-70c-79@gated-at.bofh.it> (permalink)
References <qWHc6-70c-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


If a sdio host does not support sdio irqs, polling is used
instead. That has an impact on performance. Some functionality
should not be enabled then. This add a variable in
libertas_priv to indicate that.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
changes in v3:
corrected paths
 drivers/net/wireless/marvell/libertas/dev.h     | 1 +
 drivers/net/wireless/marvell/libertas/if_sdio.c | 2 +-
 drivers/net/wireless/marvell/libertas/if_usb.c  | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/libertas/dev.h b/drivers/net/wireless/libertas/dev.h
index 6bd1608..edf710b 100644
--- a/drivers/net/wireless/marvell/libertas/dev.h
+++ b/drivers/net/wireless/marvell/libertas/dev.h
@@ -99,6 +99,7 @@ struct lbs_private {
 	/* Hardware access */
 	void *card;
 	bool iface_running;
+	u8 is_polling; /* host has to poll the card irq */
 	u8 fw_ready;
 	u8 surpriseremoved;
 	u8 setup_fw_on_resume;
diff --git a/drivers/net/wireless/marvell/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
index f1f31a2..13db8b5 100644
--- a/drivers/net/wireless/marvell/libertas/if_sdio.c
+++ b/drivers/net/wireless/marvell/libertas/if_sdio.c
@@ -1271,7 +1271,7 @@ static int if_sdio_probe(struct sdio_func *func,
 	priv->reset_card = if_sdio_reset_card;
 	priv->power_save = if_sdio_power_save;
 	priv->power_restore = if_sdio_power_restore;
-
+	priv->is_polling = !(func->card->host->caps & MMC_CAP_SDIO_IRQ);
 	ret = if_sdio_power_on(card);
 	if (ret)
 		goto err_activate_card;
diff --git a/drivers/net/wireless/marvell/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
index dff08a2..aba0c99 100644
--- a/drivers/net/wireless/marvell/libertas/if_usb.c
+++ b/drivers/net/wireless/marvell/libertas/if_usb.c
@@ -267,6 +267,7 @@ static int if_usb_probe(struct usb_interface *intf,
 	priv->enter_deep_sleep = NULL;
 	priv->exit_deep_sleep = NULL;
 	priv->reset_deep_sleep_wakeup = NULL;
+	priv->is_polling = false;
 #ifdef CONFIG_OLPC
 	if (machine_is_olpc())
 		priv->reset_card = if_usb_reset_olpc_card;
-- 
2.1.4

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/6] libertas: ieee80211 powersave mode  Andreas Kemnade <andreas@kemnade.info> - 2016-01-30 18:10 +0100
  [PATCH v3 1/6] libertas: fix pointer bugs for PS_MODE commands Andreas Kemnade <andreas@kemnade.info> - 2016-01-30 18:10 +0100
    Re: [v3,1/6] libertas: fix pointer bugs for PS_MODE commands Kalle Valo <kvalo@codeaurora.org> - 2016-02-06 13:10 +0100
  [PATCH v3 5/6] libertas: fix ps-mode related removal problems Andreas Kemnade <andreas@kemnade.info> - 2016-01-30 18:10 +0100
  [PATCH v3 2/6] libertas: check whether bus can do more than polling Andreas Kemnade <andreas@kemnade.info> - 2016-01-30 18:10 +0100

csiph-web