Skip to contentSkip to conversation

libertas_tf: Removed some casts and fixed the printf format field specifiers to match.

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

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 libertas_tf: Removed some casts and fixed the printf format field specifiers to match.

From: Jason Spence <[email protected]>

Printf format fixes, one spelling fix and a note about reporting noise.

---
 drivers/net/wireless/libertas_tf/if_sdio.c |   58 ++++++++++++++--------------
 1 files changed, 29 insertions(+), 29 deletions(-)
drivers/net/wireless/libertas_tf/if_sdio.c +29 -29
index 09c028f..d1624e3 100644
@@ -205,8 +205,8 @@ static int if_sdio_handle_cmd(struct if_sdio_card *card,
 	lbtf_deb_enter(LBTF_DEB_SDIO);
 
 	if (size > LBS_CMD_BUFFER_SIZE) {
-		lbtf_deb_sdio("response packet too large (%d bytes)\n",
-			(int)size);
+		lbtf_deb_sdio("response packet too large (%u bytes)\n",
+			size);
 		ret = -E2BIG;
 		goto out;
 	}
@@ -235,8 +235,8 @@ static int if_sdio_handle_data(struct if_sdio_card *card,
 	lbtf_deb_enter(LBTF_DEB_INT);
 
 	if (size > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) {
-		lbtf_deb_sdio("response packet too large (%d bytes)\n",
-			(int)size);
+		lbtf_deb_sdio("response packet too large (%u bytes)\n",
+			size);
 		ret = -E2BIG;
 		goto out;
 	}
@@ -280,8 +280,8 @@ static int if_sdio_handle_event(struct if_sdio_card *card,
 		event >>= 3;
 	} else {
 		if (size < 4) {
-			lbtf_deb_sdio("event packet too small (%d bytes)\n",
-				(int)size);
+			lbtf_deb_sdio("event packet too small (%u bytes)\n",
+				size);
 			ret = -EINVAL;
 			goto out;
 		}
@@ -351,8 +351,8 @@ static int if_sdio_card_to_host(struct if_sdio_card *card)
 		goto out;
 
 	if (size < 4) {
-		lbtf_deb_sdio("invalid packet size (%d bytes) from firmware\n",
-			(int)size);
+		lbtf_deb_sdio("invalid packet size (%hu bytes) from firmware\n",
+			size);
 		ret = -EINVAL;
 		goto out;
 	}
@@ -375,19 +375,19 @@ static int if_sdio_card_to_host(struct if_sdio_card *card)
 	chunk = card->buffer[0] | (card->buffer[1] << 8);
 	type = card->buffer[2] | (card->buffer[3] << 8);
 
-	lbtf_deb_int("packet of type %d and size %d bytes\n",
-		(int)type, (int)chunk);
+	lbtf_deb_int("packet of type %hu and size %hu bytes\n",
+		type, chunk);
 
 	if (chunk > size) {
-		lbtf_deb_sdio("packet fragment (%d > %d)\n",
-			(int)chunk, (int)size);
+		lbtf_deb_sdio("packet fragment (%hu > %hu)\n",
+			chunk, size);
 		ret = -EINVAL;
 		goto out;
 	}
 
 	if (chunk < size) {
-		lbtf_deb_sdio("packet fragment (%d < %d)\n",
-			(int)chunk, (int)size);
+		lbtf_deb_sdio("packet fragment (%hu < %hu)\n",
+			chunk, size);
 	}
 
 	switch (type) {
@@ -407,8 +407,8 @@ static int if_sdio_card_to_host(struct if_sdio_card *card)
 			goto out;
 		break;
 	default:
-		lbtf_deb_sdio("invalid type (%d) from firmware\n",
-				(int)type);
+		lbtf_deb_sdio("invalid type (%hu) from firmware\n",
+				type);
 		ret = -EINVAL;
 		goto out;
 	}
@@ -525,7 +525,7 @@ static int if_sdio_prog_helper(struct if_sdio_card *card)
 		 */
 		mdelay(2);
 
-		chunk_size = min(size, (size_t)60);
+		chunk_size = min(size, 60U);
 
 		*((__le32*)chunk_buffer) = cpu_to_le32(chunk_size);
 		memcpy(chunk_buffer + 4, firmware, chunk_size);
@@ -991,22 +991,22 @@ int if_sdio_update_hw_spec(struct if_sdio_card *card)
 			chunk = card->buffer[0] | (card->buffer[1] << 8);
 			type = card->buffer[2] | (card->buffer[3] << 8);
 
-			lbtf_deb_sdio("packet of type %d and size %d bytes\n",
-				(int)type, (int)chunk);
+			lbtf_deb_sdio("packet of type %hu and size %hu bytes\n",
+				type, chunk);
 
 			lbtf_deb_hex(LBTF_DEB_SDIO, "SDIO Rx: ", card->buffer,
 						 min_t(unsigned int, size, 100));
 
 			if (chunk > size) {
-				lbtf_deb_sdio("packet fragment (%d > %d)\n",
-					(int)chunk, (int)size);
+				lbtf_deb_sdio("packet fragment (%hu > %hu)\n",
+					chunk, size);
 				ret = -EINVAL;
 				goto out;
 			}
 
 			if (chunk < size) {
-				lbtf_deb_sdio("packet fragment (%d < %d)\n",
-					(int)chunk, (int)size);
+				lbtf_deb_sdio("packet fragment (%hu < %hu)\n",
+					chunk, size);
 			}
 
 			switch (type) {
@@ -1022,8 +1022,8 @@ int if_sdio_update_hw_spec(struct if_sdio_card *card)
 				lbtf_deb_sdio("Got MVMS_EVENT");
 				continue;
 			default:
-				lbtf_deb_sdio("invalid type (%d) from firmware\n",
-						(int)type);
+				lbtf_deb_sdio("invalid type (%hu) from firmware\n",
+						type);
 				ret = -EINVAL;
 				goto out;
 			}
@@ -1085,7 +1085,7 @@ static void if_sdio_interrupt(struct sdio_func *func)
 	card = sdio_get_drvdata(func);
 
 	cause = sdio_readb(card->func, IF_SDIO_H_INT_STATUS, &ret);
-	lbtf_deb_int("interrupt: 0x%X\n", (unsigned)cause);
+	lbtf_deb_int("interrupt: 0x%hhX\n", cause);
 	lbtf_deb_int("interrupt ret: 0x%X\n", ret);
 	if (ret)
 		goto out;
@@ -1158,7 +1158,7 @@ static int if_sdio_probe(struct sdio_func *func,
 		card->scratch_reg = IF_SDIO_SCRATCH_OLD;
 		break;
 	case IF_SDIO_MODEL_8686:
-		lbtf_deb_sdio("Found Marvel 8686");
+		lbtf_deb_sdio("Found Marvell 8686");
 		card->scratch_reg = IF_SDIO_SCRATCH;
 		break;
 	case IF_SDIO_MODEL_8688:
@@ -1241,9 +1241,9 @@ static int if_sdio_probe(struct sdio_func *func,
 	sdio_set_drvdata(func, card);
 
 	lbtf_deb_sdio("class = 0x%X, vendor = 0x%X, "
-			"device = 0x%X, model = 0x%X, ioport = 0x%X\n",
+			"device = 0x%X, model = 0x%X, ioport = 0x%luX\n",
 			func->class, func->vendor, func->device,
-			model, (unsigned)card->ioport);
+			model, card->ioport);
 
 	/* Upload firmware */
 	lbtf_deb_sdio("Going to upload fw...");
Signature · 1 line
1.7.0
#1 lore raw

PATCH 2/2 libertas_tf: Add Kconfig note about Wi2Wi device and firmware location.

From: Jason Spence <[email protected]>

---
 drivers/net/wireless/Kconfig |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/net/wireless/Kconfig +5 -1
index fc6c713..cb2e74e 100644
@@ -49,7 +49,11 @@ config LIBERTAS_THINFIRM_SDIO
 	tristate "Marvell Libertas 8686 SDIO 802.11b/g cards"
 	depends on LIBERTAS_THINFIRM && MMC
 	---help---
-	  A driver for Marvell Libertas 8686 SDIO devices.
+	  A driver for Marvell Libertas 8686 SDIO devices and those that include
+	  the 88W8686 core, such as the Wi2Wi devices.  Special SDIO specific
+	  firmware is required to use this driver, see the OLPC site for details:
+
+	  <http://wiki.laptop.org/go/Thinfirm_1.5>
 
 config LIBERTAS_THINFIRM_USB
 	tristate "Marvell Libertas 8388 USB 802.11b/g cards with thin firmware"
Signature · 1 line
1.7.0