Skip to contentSkip to conversation

libertas_tf: display debugging output only when debugging is enabled.

PATCH New Steve deRosier 1 participant 3 messages Sep 8, 2010 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 libertas_tf: display debugging output only when debugging is enabled.

From: Mattia Barbon <[email protected]>

---
 drivers/net/wireless/libertas_tf/cmd.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/wireless/libertas_tf/cmd.c +2 -0
index 8c15e35..1bca11b 100644
@@ -741,10 +741,12 @@ int lbtf_process_rx_command(struct lbtf_private *priv)
 	respcmd = le16_to_cpu(resp->command);
 	result = le16_to_cpu(resp->result);
 
+#ifdef CONFIG_LIBERTAS_THINFIRM_DEBUG
 	if (net_ratelimit())
 		pr_info("libertastf: cmd response 0x%04x, seq %d, size %d\n",
 			respcmd, le16_to_cpu(resp->seqnum),
 			le16_to_cpu(resp->size));
+#endif
 
 	if (resp->seqnum != priv->cur_cmd->cmdbuf->seqnum) {
 		spin_unlock_irqrestore(&priv->driver_lock, flags);
Signature · 1 line
1.7.0
#1 lore raw

PATCH 2/3 libertas_tf: fix the check for firmware already running on IGEPv2 boards.

From: Mattia Barbon <[email protected]>

On IGEP boards, the scratch register reports 0x8000 when there is no firmware running instead of 0x0000.

---
 drivers/net/wireless/libertas_tf/if_sdio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/libertas_tf/if_sdio.c +1 -1
index d1624e3..d3d101e 100644
@@ -738,7 +738,7 @@ static int if_sdio_prog_firmware(struct if_sdio_card *card)
 	if (scratch == IF_SDIO_FIRMWARE_OK) {
 		lbtf_deb_sdio("firmware already loaded\n");
 		goto success;
-	} else if ((card->model == IF_SDIO_MODEL_8686) && (scratch > 0)) {
+	} else if ((card->model == IF_SDIO_MODEL_8686) && ((scratch & 0x7fff) != 0)) {
 		lbtf_deb_sdio("firmware may be running\n");
 		if( lbtf_reset_fw == 0 ) {
 			goto success;
Signature · 1 line
1.7.0
#2 lore raw

PATCH 3/3 libertas_tf: flush the write queue in if_sdio_update_hw_spec.

In reply to Steve deRosier

From: Mattia Barbon <[email protected]>

After queuing the CMD_GET_HW_SPEC command, force a flush of the write queue before waiting for the command response.

---
 drivers/net/wireless/libertas_tf/if_sdio.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/wireless/libertas_tf/if_sdio.c +2 -0
index d3d101e..8660229 100644
@@ -946,6 +946,8 @@ int if_sdio_update_hw_spec(struct if_sdio_card *card)
 		goto out;
 	}
 
+	flush_workqueue(card->workqueue);
+
 	/* Wait for and retrieve response */
 	timeout = jiffies + HZ;
 	while (wait_cmd_done < 1) {
Signature · 1 line
1.7.0