libertas: replace PRINTM with dprintk

Marcelo Tosatti mtosatti at redhat.unroutablecom
Tue Nov 28 02:56:38 EST 2006


Commit:     67ce319af79169216374b99a4d5ee184adad23f4
Parent:     d51cadbe66c88b33744536d5621dbe38e50d31cd
commit 67ce319af79169216374b99a4d5ee184adad23f4
Author:     Marcelo Tosatti <mtosatti at redhat.com>
AuthorDate: Wed Nov 15 22:04:31 2006 -0200
Commit:     Marcelo Tosatti <mtosatti at redhat.com>
CommitDate: Wed Nov 15 22:04:31 2006 -0200

    libertas: replace PRINTM with dprintk
    
    And also add "libertas_debug" module parameter, making it easier to select
    wanted/unwanted messages.
    
    By default the firmware loading messages are not shown, now its necessary
    to load with "libertas_debug=2" for them to appear.
    
    Signed-off-by: Marcelo Tosatti <mtosatti at redhat.com>
---
 drivers/net/wireless/libertas/Makefile       |    3 
 drivers/net/wireless/libertas/if_usb.c       |  123 ++++++--------
 drivers/net/wireless/libertas/wlan_11d.c     |   64 ++++---
 drivers/net/wireless/libertas/wlan_assoc.c   |   54 +++---
 drivers/net/wireless/libertas/wlan_cmd.c     |  140 ++++++++-------
 drivers/net/wireless/libertas/wlan_cmdresp.c |  114 ++++++-------
 drivers/net/wireless/libertas/wlan_debugfs.c |    2 
 drivers/net/wireless/libertas/wlan_defs.h    |   43 +----
 drivers/net/wireless/libertas/wlan_ethtool.c |    2 
 drivers/net/wireless/libertas/wlan_fw.c      |   36 ++--
 drivers/net/wireless/libertas/wlan_ioctl.c   |  236 +++++++++++++-------------
 drivers/net/wireless/libertas/wlan_join.c    |  110 ++++++------
 drivers/net/wireless/libertas/wlan_main.c    |   88 +++++-----
 drivers/net/wireless/libertas/wlan_rx.c      |   34 ++--
 drivers/net/wireless/libertas/wlan_scan.c    |  118 +++++++------
 drivers/net/wireless/libertas/wlan_thread.h  |    2 
 drivers/net/wireless/libertas/wlan_tx.c      |   10 +
 drivers/net/wireless/libertas/wlan_wext.c    |   86 +++++----
 18 files changed, 612 insertions(+), 653 deletions(-)

diff --git a/drivers/net/wireless/libertas/Makefile b/drivers/net/wireless/libertas/Makefile
index d8375cc..bd93764 100644
--- a/drivers/net/wireless/libertas/Makefile
+++ b/drivers/net/wireless/libertas/Makefile
@@ -7,9 +7,8 @@ usb8xxx-objs := wlan_main.o wlan_fw.o wl
 		wlan_ioctl.o wlan_debugfs.o	  \
 		wlan_ethtool.o wlan_assoc.o
 
-EXTRA_CFLAGS += -DDEBUG_LEVEL2
 ifeq ($(CONFIG_LIBERTAS_USB_DEBUG), y)
-EXTRA_CFLAGS += -DDEBUG_LEVEL4 -DPROC_DEBUG
+EXTRA_CFLAGS += -DDEBUG -DPROC_DEBUG
 endif
 
 
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
index 5cd4a51..7bcfc14 100644
--- a/drivers/net/wireless/libertas/if_usb.c
+++ b/drivers/net/wireless/libertas/if_usb.c
@@ -131,16 +131,14 @@ static void if_usb_write_bulk_callback(s
 	struct net_device *dev = priv->wlan_dev.netdev;
 	struct usb_card_rec *cardp = priv->wlan_dev.card;
 
-	ENTER();
-
 	/* handle the transmission complete validations */
 
 	if (urb->status != 0) {
 		/* print the failure status number for debug */
-		PRINTM(FATAL, "URB in failure status\n");
+		printk(KERN_INFO "URB in failure status\n");
 	} else {
-		PRINTM(INFO, "URB status is successfull\n");
-		PRINTM(INFO, "Actual length transmitted %d\n",
+		dprintk(2, "URB status is successfull\n");
+		dprintk(2, "Actual length transmitted %d\n",
 		       urb->actual_length);
 		priv->wlan_dev.dnld_sent = DNLD_RES_RECEIVED;
 		if ((adapter->MediaConnectStatus == WlanMediaStateConnected))
@@ -149,7 +147,6 @@ static void if_usb_write_bulk_callback(s
 
 	cardp->BootCMDACK = 1;
 
-	LEAVE();
 	return;
 }
 
@@ -203,7 +200,7 @@ static int if_usb_probe(struct usb_inter
 	for (i = 0; if_usb_table[i].idVendor; i++) {
 		if (udev->descriptor.idVendor == if_usb_table[i].idVendor &&
 		    udev->descriptor.idProduct == if_usb_table[i].idProduct) {
-			PRINTM(INFO, "VID/PID = %X/%X, Boot2 version = %X\n",
+			dprintk(1, "VID/PID = %X/%X, Boot2 version = %X\n",
 			udev->descriptor.idVendor, udev->descriptor.idProduct,
 			udev->descriptor.bcdDevice);
 			break;
@@ -211,8 +208,8 @@ static int if_usb_probe(struct usb_inter
 	}
 
 	if (!if_usb_table[i].idVendor) {
-		PRINTM(INFO, "Discard the Probe request\n");
-		PRINTM(INFO, "VID = 0x%X PID = 0x%X\n",
+		dprintk(1, "Discard the Probe request\n");
+		dprintk(1, "VID = 0x%X PID = 0x%X\n",
 		       udev->descriptor.idVendor, udev->descriptor.idProduct);
 		LEAVE();
 		return -ENODEV;
@@ -220,7 +217,7 @@ static int if_usb_probe(struct usb_inter
 
 	usb_cardp = kzalloc(sizeof(struct usb_card_rec), GFP_KERNEL);
 	if (!usb_cardp) {
-		PRINTM(FATAL, "Out of memory allocating private data.\n");
+		printk(KERN_ERR "Out of memory allocating private data.\n");
 		goto error;
 	}
 
@@ -229,7 +226,7 @@ static int if_usb_probe(struct usb_inter
 	usb_cardp->udev = udev;
 	iface_desc = intf->cur_altsetting;
 
-	PRINTM(INFO, "bcdUSB = 0x%X bDeviceClass = 0x%X"
+	dprintk(1, "bcdUSB = 0x%X bDeviceClass = 0x%X"
 	       " bDeviceSubClass = 0x%X, bDeviceProtocol = 0x%X\n",
 	       udev->descriptor.bcdUSB,
 	       udev->descriptor.bDeviceClass,
@@ -242,12 +239,12 @@ static int if_usb_probe(struct usb_inter
 		    && ((endpoint->bmAttributes & BULK_ENDPOINT_MASK) ==
 			BULK_ENDPOINT_FOUND)) {
 			/* we found a bulk in endpoint */
-			PRINTM(INFO, "Bulk in size is %d\n",
+			dprintk(1, "Bulk in size is %d\n",
 			       endpoint->wMaxPacketSize);
 			if (!
 			    (usb_cardp->rx_urb =
 			     usb_alloc_urb(0, GFP_KERNEL))) {
-				PRINTM(INFO,
+				dprintk(1,
 				       "Rx URB allocation failed\n");
 				goto dealloc;
 			}
@@ -258,7 +255,7 @@ static int if_usb_probe(struct usb_inter
 			usb_cardp->bulk_in_endpointAddr =
 			    (endpoint->
 			     bEndpointAddress & ENDPOINT_NUMBER_MASK);
-			PRINTM(INFO, "in_endpoint = %d\n",
+			dprintk(1, "in_endpoint = %d\n",
 			       endpoint->bEndpointAddress);
 		}
 
@@ -271,25 +268,25 @@ static int if_usb_probe(struct usb_inter
 			if (!
 			    (usb_cardp->tx_urb =
 			     usb_alloc_urb(0, GFP_KERNEL))) {
-				PRINTM(INFO,
+				dprintk(1,
 				       "Tx URB allocation failed\n");
 				goto dealloc;
 			}
 
 			usb_cardp->bulk_out_size =
 			    endpoint->wMaxPacketSize;
-			PRINTM(INFO, "Bulk out size is %d\n",
+			dprintk(1, "Bulk out size is %d\n",
 			       endpoint->wMaxPacketSize);
 			usb_cardp->bulk_out_endpointAddr =
 			    endpoint->bEndpointAddress;
-			PRINTM(INFO, "out_endpoint = %d\n",
+			dprintk(1, "out_endpoint = %d\n",
 			       endpoint->bEndpointAddress);
 			usb_cardp->bulk_out_buffer =
 			    kmalloc(MRVDRV_ETH_TX_PACKET_BUFFER_SIZE,
 				    GFP_DMA);
 
 			if (!usb_cardp->bulk_out_buffer) {
-				PRINTM(INFO,
+				dprintk(1,
 				       "Could not allocate buffer\n");
 				goto dealloc;
 			}
@@ -355,7 +352,7 @@ static void if_usb_disconnect(struct usb
 	if_usb_free(cardp);
 
 	/* card is removed and we can call wlan_remove_card */
-	PRINTM(INFO, "call remove card\n");
+	dprintk(1, "call remove card\n");
 	cardp->remove(cardp);
 
 	usb_set_intfdata(intf, NULL);
@@ -378,11 +375,9 @@ int usb_tx_block(wlan_private * priv, u8
 	struct usb_card_rec *cardp = priv->wlan_dev.card;
 	int ret = WLAN_STATUS_FAILURE;
 
-	ENTER();
-
 	/* check if device is removed */
 	if (priv->adapter->SurpriseRemoved) {
-		PRINTM(INFO, "Device removed\n");
+		dprintk(1, "Device removed\n");
 		goto tx_ret;
 	}
 
@@ -399,16 +394,15 @@ int usb_tx_block(wlan_private * priv, u8
 
 	if ((ret = usb_submit_urb(cardp->tx_urb, GFP_ATOMIC))) {
 		/*  transfer failed */
-		PRINTM(INFO, "usb_submit_urb Failed\n");
+		dprintk(1, "usb_submit_urb Failed\n");
 
 		ret = WLAN_STATUS_FAILURE;
 	} else {
-		PRINTM(INFO, "usb_submit_urb Success\n");
+		dprintk(2, "usb_submit_urb Success\n");
 		ret = WLAN_STATUS_SUCCESS;
 	}
 
 tx_ret:
-	LEAVE();
 	return ret;
 }
 
@@ -454,15 +448,13 @@ static int __if_usb_submit_rx_urb(wlan_p
 	struct read_cb_info *rinfo;
 	int ret = WLAN_STATUS_FAILURE;
 
-	ENTER();
-
 	if (!(rinfo = kmalloc(sizeof(struct read_cb_info), GFP_ATOMIC))) {
-		PRINTM(FATAL, "No free read_callback_info\n");
+		printk(KERN_ERR "No free read_callback_info\n");
 		goto rx_ret;
 	}
 
 	if (!(skb = dev_alloc_skb(MRVDRV_ETH_RX_PACKET_BUFFER_SIZE))) {
-		PRINTM(FATAL, "No free skb\n");
+		printk(KERN_ERR "No free skb\n");
 		kfree(rinfo);
 		goto rx_ret;
 	}
@@ -480,18 +472,17 @@ static int __if_usb_submit_rx_urb(wlan_p
 
 	cardp->rx_urb->transfer_flags |= URB_ZERO_PACKET;
 
-	PRINTM(INFO, "Pointer for rx_urb %p\n", cardp->rx_urb);
+	dprintk(2, "Pointer for rx_urb %p\n", cardp->rx_urb);
 	if ((ret = usb_submit_urb(cardp->rx_urb, GFP_ATOMIC))) {
 		/* handle failure conditions */
-		PRINTM(INFO, "Submit Rx URB failed\n");
+		dprintk(1, "Submit Rx URB failed\n");
 		ret = WLAN_STATUS_FAILURE;
 	} else {
-		PRINTM(INFO, "Submit Rx URB Success\n");
+		dprintk(2, "Submit Rx URB Success\n");
 		ret = WLAN_STATUS_SUCCESS;
 	}
 
 rx_ret:
-	LEAVE();
 	return ret;
 }
 
@@ -504,19 +495,17 @@ static void if_usb_receive_fwload(struct
 	struct usb_card_rec *cardp = (struct usb_card_rec *)priv->wlan_dev.card;
 	struct FWSyncHeader *SyncFWHeader;
 
-	ENTER();
-
 	kfree(rinfo);
 
 	if (urb->status) {
-		PRINTM(INFO, "URB Status is failed during fw load\n");
+		dprintk(1, "URB Status is failed during fw load\n");
 		kfree_skb(skb);
 		return;
 	}
 
 	SyncFWHeader = kmalloc(sizeof(struct FWSyncHeader), GFP_ATOMIC);
 	if (!SyncFWHeader) {
-		PRINTM(INFO, "Failure to allocate SyncFWHeader\n");
+		dprintk(1, "Failure to allocate SyncFWHeader\n");
 		kfree_skb(skb);
 		return;
 	}
@@ -525,12 +514,12 @@ static void if_usb_receive_fwload(struct
 			sizeof(struct FWSyncHeader));
 
 	if (!SyncFWHeader->Cmd) {
-		PRINTM(INFO, "FW received Blk with correct CRC\n");
-		PRINTM(INFO, "FW received Blk SeqNum = %d\n",
+		dprintk(2, "FW received Blk with correct CRC\n");
+		dprintk(2, "FW received Blk SeqNum = %d\n",
 		       SyncFWHeader->SeqNum);
 		cardp->CRC_OK = 1;
 	} else {
-		PRINTM(INFO, "FW received Blk with CRC error\n");
+		dprintk(1, "FW received Blk with CRC error\n");
 		cardp->CRC_OK = 0;
 	}
 
@@ -578,20 +567,20 @@ #define MRVDRV_MIN_PKT_LEN	30
 
 	if (RecvLength) {
 		if (urb->status) {
-			PRINTM(INFO, "URB Status is failed\n");
+			dprintk(1, "URB Status is failed\n");
 			kfree_skb(skb);
 			goto setup_for_next;
 		}
 
 		RecvBuff = skb->data + IPFIELD_ALIGN_OFFSET;
 		memcpy(&RecvType, RecvBuff, sizeof(u32));
-		PRINTM(INFO, "Recv length = 0x%x\n", RecvLength);
-		PRINTM(INFO, "Receive type = 0x%X\n", RecvType);
+		dprintk(1, "Recv length = 0x%x\n", RecvLength);
+		dprintk(1, "Receive type = 0x%X\n", RecvType);
 		RecvType = wlan_le32_to_cpu(RecvType);
-		PRINTM(INFO, "Receive type after = 0x%X\n", RecvType);
+		dprintk(1, "Receive type after = 0x%X\n", RecvType);
 	} else if (urb->status) {
 		if (!cardp->rx_urb_recall) {
-			PRINTM(INFO, "Card Is Removed\n");
+			dprintk(1, "Card Is Removed\n");
 			spin_lock(&priv->adapter->driver_lock);
 			priv->adapter->SurpriseRemoved = 1;
 			// Wake up main thread to handle card removal.
@@ -606,7 +595,7 @@ #define MRVDRV_MIN_PKT_LEN	30
 	case CMD_TYPE_DATA:
 		if (RecvLength > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE +
 		    MESSAGE_HEADER_LEN || RecvLength < MRVDRV_MIN_PKT_LEN) {
-			PRINTM(INFO, "Packet length is Invalid\n");
+			dprintk(1, "Packet length is Invalid\n");
 
 			kfree_skb(skb);
 
@@ -624,7 +613,7 @@ #define MRVDRV_MIN_PKT_LEN	30
 
 	case CMD_TYPE_REQUEST:
 		if (RecvLength > MRVDRV_SIZE_OF_CMD_BUFFER) {
-			PRINTM(INFO, "The receive buffer is too large\n");
+			dprintk(1, "The receive buffer is too large\n");
 			kfree_skb(skb);
 
 			break;
@@ -650,7 +639,7 @@ #define MRVDRV_MIN_PKT_LEN	30
 		if_usb_interrupt(priv, HIS_CmdUpLdRdy, RX_SUCCESS);
 		spin_unlock(&priv->adapter->driver_lock);
 
-		PRINTM(INFO, "Wake up main thread to handle cmd response\n");
+		dprintk(1, "Wake up main thread to handle cmd response\n");
 		break;
 
 	case CMD_TYPE_INDICATION:
@@ -658,7 +647,7 @@ #define MRVDRV_MIN_PKT_LEN	30
 		spin_lock(&priv->adapter->driver_lock);
 		cardp->usb_event_cause = *(u32 *) (RecvBuff + MESSAGE_HEADER_LEN);
 
-		PRINTM(INFO, "**EVENT** 0x%X\n", cardp->usb_event_cause);
+		dprintk(1, "**EVENT** 0x%X\n", cardp->usb_event_cause);
 		if (cardp->usb_event_cause & 0xffff0000) {
 			libertas_send_tx_feedback(priv);
 			break;
@@ -698,8 +687,8 @@ int libertas_sbi_host_to_card(wlan_priva
 
 	ENTER();
 
-	PRINTM(INFO, "*** type = %u\n", type);
-	PRINTM(INFO, "Size after = %d\n", nb);
+	dprintk(1, "*** type = %u\n", type);
+	dprintk(1, "Size after = %d\n", nb);
 
 	if (type == MVMS_CMD) {
 		tmp = wlan_cpu_to_le32(CMD_TYPE_REQUEST);
@@ -740,7 +729,7 @@ int libertas_sbi_get_int_status(wlan_pri
 	*ireg = usb_int_cause;
 	usb_int_cause = 0;
 
-	PRINTM(INFO, "Int cause is 0x%X\n", *ireg);
+	dprintk(1, "Int cause is 0x%X\n", *ireg);
 
 	LEAVE();
 
@@ -872,7 +861,7 @@ int libertas_sbi_register_dev(wlan_priva
 
 	SET_NETDEV_DEV(cardp->eth_dev, &(cardp->udev->dev));
 
-	PRINTM(INFO, "udev pointer is at %p\n", cardp->udev);
+	dprintk(1, "udev pointer is at %p\n", cardp->udev);
 
 	LEAVE();
 	return WLAN_STATUS_SUCCESS;
@@ -900,8 +889,6 @@ static int if_prog_firmware(wlan_private
 	struct FWHeader *fwheader;
 	u8 *firmware = priv->firmware->data;
 
-	ENTER();
-
 	fwdata = kmalloc(sizeof(struct FWData), GFP_ATOMIC);
 
 	if (!fwdata)
@@ -914,7 +901,7 @@ static int if_prog_firmware(wlan_private
 		cardp->FWSeqNum = cardp->LastSeqNum - 1;
 	}
 
-	PRINTM(INFO, "TotalBytes = %d\n", cardp->TotalBytes);
+	dprintk(2, "TotalBytes = %d\n", cardp->TotalBytes);
 
 	memcpy(fwheader, &firmware[cardp->TotalBytes],
 	       sizeof(struct FWHeader));
@@ -922,11 +909,11 @@ static int if_prog_firmware(wlan_private
 	cardp->FwLastBlkSent = cardp->TotalBytes;
 	cardp->TotalBytes += sizeof(struct FWHeader);
 
-	PRINTM(INFO, "Copy Data\n");
+	dprintk(2, "Copy Data\n");
 	memcpy(fwdata->data, &firmware[cardp->TotalBytes],
 	       fwdata->fwheader.DataLength);
 
-	PRINTM(INFO, "Data Length = %d\n", fwdata->fwheader.DataLength);
+	dprintk(2, "Data Length = %d\n", fwdata->fwheader.DataLength);
 
 	cardp->FWSeqNum = cardp->FWSeqNum + 1;
 
@@ -935,27 +922,25 @@ static int if_prog_firmware(wlan_private
 	cardp->TotalBytes += fwdata->fwheader.DataLength;
 
 	if (fwheader->DnldCmd == FW_HAS_DATA_TO_RECV) {
-		PRINTM(INFO, "There is data to follow\n");
-		PRINTM(INFO, "SeqNum = %d TotalBytes = %d\n", cardp->FWSeqNum,
+		dprintk(2, "There is data to follow\n");
+		dprintk(2, "SeqNum = %d TotalBytes = %d\n", cardp->FWSeqNum,
 		       cardp->TotalBytes);
 		memcpy(cardp->bulk_out_buffer, fwheader, FW_DATA_XMIT_SIZE);
 		usb_tx_block(priv, cardp->bulk_out_buffer, FW_DATA_XMIT_SIZE);
 
 	} else if (fwdata->fwheader.DnldCmd == FW_HAS_LAST_BLOCK) {
-		PRINTM(INFO, "Host has finished FW downloading\n");
-		PRINTM(INFO, "Donwloading FW JUMP BLOCK\n");
+		dprintk(2, "Host has finished FW downloading\n");
+		dprintk(2, "Donwloading FW JUMP BLOCK\n");
 		memcpy(cardp->bulk_out_buffer, fwheader, FW_DATA_XMIT_SIZE);
 		usb_tx_block(priv, cardp->bulk_out_buffer, FW_DATA_XMIT_SIZE);
 		cardp->FWFinalBlk = 1;
 	}
 
-	PRINTM(INFO, "The firmware download is done size is %d\n",
+	dprintk(2, "The firmware download is done size is %d\n",
 		cardp->TotalBytes);
 
 	kfree(fwdata);
 
-	LEAVE();
-
 	return WLAN_STATUS_SUCCESS;
 }
 
@@ -978,7 +963,7 @@ #ifdef SUPPORT_BOOT_COMMAND
 #endif
 
 	if (if_usb_submit_rx_urb_fwload(priv) < 0) {
-		PRINTM(INFO, "URB submission is failed\n");
+		dprintk(1, "URB submission is failed\n");
 		libertas_sbi_unregister();
 		LEAVE();
 		return WLAN_STATUS_FAILURE;
@@ -999,7 +984,7 @@ restart:
 	if_prog_firmware(priv);
 
 	do {
-		PRINTM(INFO, "Wlan sched timeout\n");
+		dprintk(1, "Wlan sched timeout\n");
 		i++;
 		msleep_interruptible(100);
 		if (priv->adapter->SurpriseRemoved || i >= 20)
@@ -1007,7 +992,7 @@ restart:
 	} while (!cardp->FwDnldOver);
 
 	if (!cardp->FwDnldOver) {
-		PRINTM(FATAL, "Failed to load fw, resetting device!\n");
+		printk(KERN_INFO "Failed to load fw, resetting device!\n");
 		reset_count--;
 		if (!usb_reset_device(cardp->udev) && reset_count >= 0) {
 			msleep(10);
@@ -1015,7 +1000,7 @@ restart:
 			msleep(10);
 			goto restart;
 		}
-		PRINTM(FATAL, "FW download failure, time = %d ms\n", i * 100);
+		printk(KERN_INFO "FW download failure, time = %d ms\n", i * 100);
 		LEAVE();
 		return WLAN_STATUS_FAILURE;
 	}
diff --git a/drivers/net/wireless/libertas/wlan_11d.c b/drivers/net/wireless/libertas/wlan_11d.c
index a369d17..be8ef8b 100644
--- a/drivers/net/wireless/libertas/wlan_11d.c
+++ b/drivers/net/wireless/libertas/wlan_11d.c
@@ -129,7 +129,7 @@ static u8 wlan_get_chan_11d(u8 band, u8 
 
 	for (i = 0; i < cfp_no; i++) {
 		if ((cfp + i)->Channel == firstChan) {
-			PRINTM(INFO, "firstChan found\n");
+			dprintk(1, "firstChan found\n");
 			break;
 		}
 	}
@@ -165,13 +165,13 @@ static u8 wlan_channel_known_11d(u8 chan
 
 	for (i = 0; i < NoOfChan; i++) {
 		if (chan == chanPwr[i].chan) {
-			PRINTM(INFO, "11D: Found Chan:%d\n", chan);
+			dprintk(1, "11D: Found Chan:%d\n", chan);
 			LEAVE();
 			return 1;
 		}
 	}
 
-	PRINTM(INFO, "11D: Not Find Chan:%d\n", chan);
+	dprintk(1, "11D: Not Find Chan:%d\n", chan);
 	LEAVE();
 	return 0;
 }
@@ -231,7 +231,7 @@ static int wlan_generate_domain_info_11d
 	memcpy(domaininfo->CountryCode, parsed_region_chan->CountryCode,
 	       COUNTRY_CODE_LEN);
 
-	PRINTM(INFO, "11D:NoOfChan=%d\n", NoOfChan);
+	dprintk(1, "11D:NoOfChan=%d\n", NoOfChan);
 	HEXDUMP("11D:parsed_region_chan:", (char *)parsed_region_chan,
 		sizeof(struct parsed_region_chan_11d));
 
@@ -269,7 +269,7 @@ static int wlan_generate_domain_info_11d
 	}
 	domaininfo->NoOfSubband = NoOfSubband;
 
-	PRINTM(INFO, "NoOfSubband=%x\n", domaininfo->NoOfSubband);
+	dprintk(1, "NoOfSubband=%x\n", domaininfo->NoOfSubband);
 	HEXDUMP("11D:domaininfo:", (char *)domaininfo,
 		COUNTRY_CODE_LEN + 1 +
 		sizeof(struct IEEEtypes_SubbandSet) * NoOfSubband);
@@ -293,13 +293,13 @@ static void wlan_generate_parsed_region_
 	ENTER();
 
 	if (region_chan == NULL) {
-		PRINTM(INFO, "11D: region_chan is NULL\n");
+		dprintk(1, "11D: region_chan is NULL\n");
 		return;
 	}
 
 	cfp = region_chan->CFP;
 	if (cfp == NULL) {
-		PRINTM(INFO, "11D: cfp equal NULL \n");
+		dprintk(1, "11D: cfp equal NULL \n");
 		return;
 	}
 
@@ -308,19 +308,19 @@ static void wlan_generate_parsed_region_
 	memcpy(parsed_region_chan->CountryCode,
 	       wlan_code_2_region(region_chan->Region), COUNTRY_CODE_LEN);
 
-	PRINTM(INFO, "11D: region[0x%x] band[%d]\n", parsed_region_chan->region,
+	dprintk(1, "11D: region[0x%x] band[%d]\n", parsed_region_chan->region,
 	       parsed_region_chan->band);
 
 	for (i = 0; i < region_chan->NrCFP; i++, cfp++) {
 		parsed_region_chan->chanPwr[i].chan = cfp->Channel;
 		parsed_region_chan->chanPwr[i].pwr = cfp->MaxTxPower;
-		PRINTM(INFO, "11D: Chan[%d] Pwr[%d]\n",
+		dprintk(1, "11D: Chan[%d] Pwr[%d]\n",
 		       parsed_region_chan->chanPwr[i].chan,
 		       parsed_region_chan->chanPwr[i].pwr);
 	}
 	parsed_region_chan->NoOfChan = region_chan->NrCFP;
 
-	PRINTM(INFO, "11D: NoOfChan[%d]\n", parsed_region_chan->NoOfChan);
+	dprintk(1, "11D: NoOfChan[%d]\n", parsed_region_chan->NoOfChan);
 
 	LEAVE();
 	return;
@@ -405,7 +405,7 @@ static int wlan_parse_domain_info_11d(st
 	parsed_region_chan->region = region =
 	    wlan_region_2_code(CountryInfo->CountryCode);
 
-	PRINTM(INFO, "regioncode=%x\n", (u8) parsed_region_chan->region);
+	dprintk(1, "regioncode=%x\n", (u8) parsed_region_chan->region);
 	HEXDUMP("CountryCode:", (char *)CountryInfo->CountryCode,
 		COUNTRY_CODE_LEN);
 
@@ -421,7 +421,7 @@ static int wlan_parse_domain_info_11d(st
 
 		if (CountryInfo->Subband[j].FirstChan <= lastChan) {
 			/*Step2&3. Check First Chan Num increment and no overlap */
-			PRINTM(INFO, "11D: Chan[%d>%d] Overlap\n",
+			dprintk(1, "11D: Chan[%d>%d] Overlap\n",
 			       CountryInfo->Subband[j].FirstChan, lastChan);
 			continue;
 		}
@@ -434,7 +434,7 @@ static int wlan_parse_domain_info_11d(st
 
 			if (!wlan_get_chan_11d(band, firstChan, i, &curChan)) {
 				/* Chan is not found in UN table */
-				PRINTM(INFO, "chan is not supported: %d \n", i);
+				dprintk(1, "chan is not supported: %d \n", i);
 				break;
 			}
 
@@ -449,7 +449,7 @@ static int wlan_parse_domain_info_11d(st
 				idx++;
 			} else {
 				/*not supported and ignore the chan */
-				PRINTM(INFO,
+				dprintk(1,	
 				       "11D:i[%d] chan[%d] unsupported in region[%x] band[%d]\n",
 				       i, curChan, region, band);
 			}
@@ -461,7 +461,7 @@ static int wlan_parse_domain_info_11d(st
 
 	parsed_region_chan->NoOfChan = idx;
 
-	PRINTM(INFO, "NoOfChan=%x\n", parsed_region_chan->NoOfChan);
+	dprintk(1, "NoOfChan=%x\n", parsed_region_chan->NoOfChan);
 	HEXDUMP("11D:parsed_region_chan:", (s8 *) parsed_region_chan,
 		2 + COUNTRY_CODE_LEN + sizeof(struct parsed_region_chan_11d) * idx);
 
@@ -483,10 +483,10 @@ u8 libertas_get_scan_type_11d(u8 chan,
 	ENTER();
 
 	if (wlan_channel_known_11d(chan, parsed_region_chan)) {
-		PRINTM(INFO, "11D: Found and do Active Scan\n");
+		dprintk(1, "11D: Found and do Active Scan\n");
 		scan_type = HostCmd_SCAN_TYPE_ACTIVE;
 	} else {
-		PRINTM(INFO, "11D: Not Find and do Passive Scan\n");
+		dprintk(1, "11D: Not Find and do Passive Scan\n");
 	}
 
 	LEAVE();
@@ -548,7 +548,7 @@ static int wlan_enable_11d(wlan_private 
 				    HostCmd_OPTION_WAITFORRSP,
 				    OID_802_11D_ENABLE, &enable);
 	if (ret) {
-		PRINTM(INFO, "11D: Fail to enable 11D \n");
+		dprintk(1, "11D: Fail to enable 11D \n");
 	}
 
 	LEAVE();
@@ -565,7 +565,7 @@ static int wlan_set_domain_info_11d(wlan
 	int ret;
 
 	if (!libertas_get_state_11d(priv)) {
-		PRINTM(INFO, "11D: dnld domain Info with 11d disabled\n");
+		dprintk(1, "11D: dnld domain Info with 11d disabled\n");
 		return WLAN_STATUS_SUCCESS;
 	}
 
@@ -573,7 +573,7 @@ static int wlan_set_domain_info_11d(wlan
 				    HostCmd_ACT_GEN_SET,
 				    HostCmd_OPTION_WAITFORRSP, 0, NULL);
 	if (ret) {
-		PRINTM(INFO, "11D: Fail to dnld domain Info\n");
+		dprintk(1, "11D: Fail to dnld domain Info\n");
 	}
 
 	LEAVE();
@@ -600,7 +600,7 @@ int libertas_set_universaltable(wlan_pri
 	{
 		Adapter->universal_channel[i].NrCFP =
 		    sizeof(channel_freq_power_UN_BG) / size;
-		PRINTM(INFO, "11D: BG-band NrCFP=%d\n",
+		dprintk(1, "11D: BG-band NrCFP=%d\n",
 		       Adapter->universal_channel[i].NrCFP);
 
 		Adapter->universal_channel[i].CFP = channel_freq_power_UN_BG;
@@ -634,7 +634,7 @@ int libertas_cmd_802_11d_domain_info(wla
 
 	ENTER();
 
-	PRINTM(INFO, "NoOfSubband=%x\n", NoOfSubband);
+	dprintk(1, "NoOfSubband=%x\n", NoOfSubband);
 
 	cmd->Command = wlan_cpu_to_le16(cmdno);
 	pDomainInfo->Action = wlan_cpu_to_le16(CmdOption);
@@ -691,7 +691,7 @@ int libertas_cmd_enable_11d(wlan_private
 
 	data = *((int *)(wrq->u.name + SUBCMD_OFFSET));
 
-	PRINTM(INFO, "Enable 11D: %s\n",
+	dprintk(1, "Enable 11D: %s\n",
 	       (data == CMD_ENABLED) ? "Enable" : "Disable");
 	switch (data) {
 	case CMD_ENABLED:
@@ -738,10 +738,10 @@ int libertas_ret_802_11d_domain_info(wla
 	NoOfSubband = (domain->Header.Len - 3) / sizeof(struct IEEEtypes_SubbandSet);
 	/* countrycode 3 bytes */
 
-	PRINTM(INFO, "11D Domain Info Resp: NoOfSubband=%d\n", NoOfSubband);
+	dprintk(1, "11D Domain Info Resp: NoOfSubband=%d\n", NoOfSubband);
 
 	if (NoOfSubband > MRVDRV_MAX_SUBBAND_802_11D) {
-		PRINTM(INFO, "Invalid Numrer of Subband returned!!\n");
+		dprintk(1, "Invalid Numrer of Subband returned!!\n");
 		return WLAN_STATUS_FAILURE;
 	}
 
@@ -752,7 +752,7 @@ int libertas_ret_802_11d_domain_info(wla
 	case HostCmd_ACT_GET:
 		break;
 	default:
-		PRINTM(INFO, "Invalid Action:%d\n", domaininfo->Action);
+		dprintk(1, "Invalid Action:%d\n", domaininfo->Action);
 		ret = WLAN_STATUS_FAILURE;
 		break;
 	}
@@ -783,7 +783,7 @@ int libertas_parse_dnld_countryinfo_11d(
 					       &Adapter->parsed_region_chan);
 
 		if (ret == WLAN_STATUS_FAILURE) {
-			PRINTM(INFO, "11D: Err Parse domain_info from AP..\n");
+			dprintk(1, "11D: Err Parse domain_info from AP..\n");
 			LEAVE();
 			return ret;
 		}
@@ -796,7 +796,7 @@ int libertas_parse_dnld_countryinfo_11d(
 		ret = wlan_set_domain_info_11d(priv);
 
 		if (ret) {
-			PRINTM(INFO, "11D: Err set domainInfo to FW\n");
+			dprintk(1, "11D: Err set domainInfo to FW\n");
 			LEAVE();
 			return ret;
 		}
@@ -818,7 +818,7 @@ int libertas_create_dnld_countryinfo_11d
 	u8 j;
 
 	ENTER();
-	PRINTM(INFO, "11D:CurBssParams.Band[%d]\n", Adapter->CurBssParams.band);
+	dprintk(1, "11D:CurBssParams.Band[%d]\n", Adapter->CurBssParams.band);
 
 	if (libertas_get_state_11d(priv) == ENABLE_11D) {
 		/* update parsed_region_chan_11; dnld domaininf to FW */
@@ -827,7 +827,7 @@ int libertas_create_dnld_countryinfo_11d
 		     sizeof(Adapter->region_channel[0]); j++) {
 			region_chan = &Adapter->region_channel[j];
 
-			PRINTM(INFO, "11D:[%d] region_chan->Band[%d]\n", j,
+			dprintk(1, "11D:[%d] region_chan->Band[%d]\n", j,
 			       region_chan->Band);
 
 			if (!region_chan || !region_chan->Valid
@@ -840,7 +840,7 @@ int libertas_create_dnld_countryinfo_11d
 
 		if (j >= sizeof(Adapter->region_channel) /
 		    sizeof(Adapter->region_channel[0])) {
-			PRINTM(INFO, "11D:region_chan not found. Band[%d]\n",
+			dprintk(1, "11D:region_chan not found. Band[%d]\n",
 			       Adapter->CurBssParams.band);
 			LEAVE();
 			return WLAN_STATUS_FAILURE;
@@ -860,7 +860,7 @@ int libertas_create_dnld_countryinfo_11d
 		ret = wlan_set_domain_info_11d(priv);
 
 		if (ret) {
-			PRINTM(INFO, "11D: Err set domainInfo to FW\n");
+			dprintk(1, "11D: Err set domainInfo to FW\n");
 			LEAVE();
 			return ret;
 		}
diff --git a/drivers/net/wireless/libertas/wlan_assoc.c b/drivers/net/wireless/libertas/wlan_assoc.c
index 0d04dc1..a6bc46c 100644
--- a/drivers/net/wireless/libertas/wlan_assoc.c
+++ b/drivers/net/wireless/libertas/wlan_assoc.c
@@ -37,7 +37,7 @@ static int assoc_helper_essid(wlan_priva
 
 	ENTER();
 
-	PRINTM(INFO, "New SSID requested: %s\n", assoc_req->ssid.Ssid);
+	dprintk(1, "New SSID requested: %s\n", assoc_req->ssid.Ssid);
 	if (assoc_req->mode == Wlan802_11Infrastructure) {
 		if (adapter->Prescan) {
 			libertas_send_specific_SSID_scan(priv, &assoc_req->ssid, 1);
@@ -46,7 +46,7 @@ static int assoc_helper_essid(wlan_priva
 		i = libertas_find_SSID_in_list(adapter, &assoc_req->ssid,
 				NULL, Wlan802_11Infrastructure);
 		if (i >= 0) {
-			PRINTM(INFO,
+			dprintk(1,
 			       "SSID found in scan list ... associating...\n");
 
 			ret = wlan_associate(priv, &adapter->ScanTable[i]);
@@ -56,7 +56,7 @@ static int assoc_helper_essid(wlan_priva
 				       ETH_ALEN);
 			}
 		} else {
-			PRINTM(INFO, "SSID '%s' not found; cannot associate\n",
+			dprintk(1, "SSID '%s' not found; cannot associate\n",
 				assoc_req->ssid.Ssid);
 		}
 	} else if (assoc_req->mode == Wlan802_11IBSS) {
@@ -69,11 +69,11 @@ static int assoc_helper_essid(wlan_priva
 		i = libertas_find_SSID_in_list(adapter, &assoc_req->ssid, NULL,
 				Wlan802_11IBSS);
 		if (i >= 0) {
-			PRINTM(INFO, "SSID found at %d in List, so join\n", ret);
+			dprintk(1, "SSID found at %d in List, so join\n", ret);
 			libertas_join_adhoc_network(priv, &adapter->ScanTable[i]);
 		} else {
 			/* else send START command */
-			PRINTM(INFO, "SSID not found in list, so creating adhoc"
+			dprintk(1, "SSID not found in list, so creating adhoc"
 				" with SSID '%s'\n", assoc_req->ssid.Ssid);
 			libertas_start_adhoc_network(priv, &assoc_req->ssid);
 		}
@@ -93,21 +93,21 @@ static int assoc_helper_bssid(wlan_priva
 
 	ENTER();
 
-	PRINTM(INFO, "ASSOC: WAP: BSSID = " MAC_FMT "\n",
+	dprintk(1, "ASSOC: WAP: BSSID = " MAC_FMT "\n",
 		MAC_ARG(assoc_req->bssid));
 
 	/* Search for index position in list for requested MAC */
 	i = libertas_find_BSSID_in_list(adapter, assoc_req->bssid,
 			    assoc_req->mode);
 	if (i < 0) {
-		PRINTM(INFO, "ASSOC: WAP: BSSID " MAC_FMT " not found, "
+		dprintk(1, "ASSOC: WAP: BSSID " MAC_FMT " not found, "
 			"cannot associate.\n", MAC_ARG(assoc_req->bssid));
 		goto out;
 	}
 
 	if (assoc_req->mode == Wlan802_11Infrastructure) {
 		ret = wlan_associate(priv, &adapter->ScanTable[i]);
-		PRINTM(INFO, "ASSOC: return from wlan_associate(bssd) was %d\n", ret);
+		dprintk(1, "ASSOC: return from wlan_associate(bssd) was %d\n", ret);
 	} else if (assoc_req->mode == Wlan802_11IBSS) {
 		libertas_join_adhoc_network(priv, &adapter->ScanTable[i]);
 	}
@@ -133,7 +133,7 @@ static int assoc_helper_associate(wlan_p
 			ret = assoc_helper_bssid(priv, assoc_req);
 			done = 1;
 			if (ret) {
-				PRINTM(INFO, "ASSOC: bssid: ret = %d\n", ret);
+				dprintk(1, "ASSOC: bssid: ret = %d\n", ret);
 			}
 		}
 	}
@@ -141,7 +141,7 @@ static int assoc_helper_associate(wlan_p
 	if (!done && test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) {
 		ret = assoc_helper_essid(priv, assoc_req);
 		if (ret) {
-			PRINTM(INFO, "ASSOC: bssid: ret = %d\n", ret);
+			dprintk(1, "ASSOC: bssid: ret = %d\n", ret);
 		}
 	}
 
@@ -309,7 +309,7 @@ static int should_deauth_infrastructure(
 		return 0;
 
 	if (test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) {
-		PRINTM(INFO, "Deauthenticating due to new SSID in "
+		dprintk(1, "Deauthenticating due to new SSID in "
 			" configuration request.\n");
 		return 1;
 	}
@@ -317,14 +317,14 @@ static int should_deauth_infrastructure(
 	if (test_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags)) {
 		if (adapter->SecInfo.AuthenticationMode != 
 		    assoc_req->secinfo.AuthenticationMode) {
-			PRINTM(INFO, "Deauthenticating due to updated security "
+			dprintk(1, "Deauthenticating due to updated security "
 				"info in configuration request.\n");
 			return 1;
 		}
 	}
 
 	if (test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags)) {
-		PRINTM(INFO, "Deauthenticating due to new BSSID in "
+		dprintk(1, "Deauthenticating due to new BSSID in "
 			" configuration request.\n");
 		return 1;
 	}
@@ -382,7 +382,7 @@ void wlan_association_worker(void *user_
 		return;
 	}
 
-	PRINTM(INFO, "ASSOC: starting new association request: flags = 0x%lX\n",
+	dprintk(1, "ASSOC: starting new association request: flags = 0x%lX\n",
 		assoc_req->flags);
 
 	/* If 'any' SSID was specified, find an SSID to associate with */
@@ -403,7 +403,7 @@ void wlan_association_worker(void *user_
 		ret = libertas_find_best_network_SSID(priv, &assoc_req->ssid,
 				assoc_req->mode, &new_mode);
 		if (ret) {
-			PRINTM(INFO, "Could not find best network\n");
+			dprintk(1, "Could not find best network\n");
 			ret = -ENETUNREACH;
 			goto out;
 		}
@@ -423,7 +423,7 @@ void wlan_association_worker(void *user_
 		if (should_deauth_infrastructure(adapter, assoc_req)) {
 			ret = libertas_send_deauthentication(priv);
 			if (ret) {
-				PRINTM(INFO, "Deauthentication due to new "
+				dprintk(1, "Deauthentication due to new "
 					"configuration request failed: %d\n",
 					ret);
 			}
@@ -432,7 +432,7 @@ void wlan_association_worker(void *user_
 		if (should_stop_adhoc(adapter, assoc_req)) {
 			ret = libertas_stop_adhoc_network(priv);
 			if (ret) {
-				PRINTM(INFO, "Teardown of AdHoc network due to "
+				dprintk(1, "Teardown of AdHoc network due to "
 					"new configuration request failed: %d\n",
 					ret);
 			}
@@ -444,7 +444,7 @@ void wlan_association_worker(void *user_
 	if (test_bit(ASSOC_FLAG_MODE, &assoc_req->flags)) {
 		ret = assoc_helper_mode(priv, assoc_req);
 		if (ret) {
-PRINTM(INFO, "ASSOC(:%d) mode: ret = %d\n", __LINE__, ret);
+dprintk(1, "ASSOC(:%d) mode: ret = %d\n", __LINE__, ret);
 			goto out;
 		}
 	}
@@ -453,7 +453,7 @@ PRINTM(INFO, "ASSOC(:%d) mode: ret = %d\
 	    || test_bit(ASSOC_FLAG_WEP_TX_KEYIDX, &assoc_req->flags)) {
 		ret = assoc_helper_wep_keys(priv, assoc_req);
 		if (ret) {
-PRINTM(INFO, "ASSOC(:%d) wep_keys: ret = %d\n", __LINE__, ret);
+dprintk(1, "ASSOC(:%d) wep_keys: ret = %d\n", __LINE__, ret);
 			goto out;
 		}
 	}
@@ -461,7 +461,7 @@ PRINTM(INFO, "ASSOC(:%d) wep_keys: ret =
 	if (test_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags)) {
 		ret = assoc_helper_secinfo(priv, assoc_req);
 		if (ret) {
-PRINTM(INFO, "ASSOC(:%d) secinfo: ret = %d\n", __LINE__, ret);
+dprintk(1, "ASSOC(:%d) secinfo: ret = %d\n", __LINE__, ret);
 			goto out;
 		}
 	}
@@ -469,7 +469,7 @@ PRINTM(INFO, "ASSOC(:%d) secinfo: ret = 
 	if (test_bit(ASSOC_FLAG_WPA_IE, &assoc_req->flags)) {
 		ret = assoc_helper_wpa_ie(priv, assoc_req);
 		if (ret) {
-PRINTM(INFO, "ASSOC(:%d) wpa_ie: ret = %d\n", __LINE__, ret);
+dprintk(1, "ASSOC(:%d) wpa_ie: ret = %d\n", __LINE__, ret);
 			goto out;
 		}
 	}
@@ -478,7 +478,7 @@ PRINTM(INFO, "ASSOC(:%d) wpa_ie: ret = %
 	    || test_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags)) {
 		ret = assoc_helper_wpa_keys(priv, assoc_req);
 		if (ret) {
-PRINTM(INFO, "ASSOC(:%d) wpa_keys: ret = %d\n", __LINE__, ret);
+dprintk(1, "ASSOC(:%d) wpa_keys: ret = %d\n", __LINE__, ret);
 			goto out;
 		}
 	}
@@ -492,19 +492,19 @@ PRINTM(INFO, "ASSOC(:%d) wpa_keys: ret =
 
 		ret = assoc_helper_associate(priv, assoc_req);
 		if (ret) {
-			PRINTM(INFO, "ASSOC: association attempt unsuccessful: %d\n",
+			dprintk(1, "ASSOC: association attempt unsuccessful: %d\n",
 				ret);
 			success = 0;
 		}
 
 		if (adapter->MediaConnectStatus != WlanMediaStateConnected) {
-			PRINTM(INFO, "ASSOC: assoication attempt unsuccessful, "
+			dprintk(1, "ASSOC: assoication attempt unsuccessful, "
 				"not connected.\n");
 			success = 0;
 		}
 
 		if (success) {
-			PRINTM(INFO, "ASSOC: association attempt successful. "
+			dprintk(1, "ASSOC: association attempt successful. "
 				"Associated to '%s' (" MAC_FMT ")\n",
 				assoc_req->ssid.Ssid, MAC_ARG(assoc_req->bssid));
 		} else {
@@ -515,7 +515,7 @@ PRINTM(INFO, "ASSOC(:%d) wpa_keys: ret =
 
 out:
 	if (ret) {
-		PRINTM(INFO, "ASSOC: reconfiguration attempt unsuccessful: %d\n",
+		dprintk(1, "ASSOC: reconfiguration attempt unsuccessful: %d\n",
 			ret);
 	}
 	kfree(assoc_req);
@@ -533,7 +533,7 @@ struct assoc_request * wlan_get_associat
 	if (!adapter->assoc_req) {
 		adapter->assoc_req = kzalloc(sizeof(struct assoc_request), GFP_KERNEL);
 		if (!adapter->assoc_req) {
-			PRINTM(FATAL, "Not enough memory to allocate association"
+			printk(KERN_INFO "Not enough memory to allocate association"
 				" request!\n");
 			return NULL;
 		}
diff --git a/drivers/net/wireless/libertas/wlan_cmd.c b/drivers/net/wireless/libertas/wlan_cmd.c
index d338784..eef548f 100644
--- a/drivers/net/wireless/libertas/wlan_cmd.c
+++ b/drivers/net/wireless/libertas/wlan_cmd.c
@@ -121,8 +121,8 @@ static int wlan_cmd_802_11_ps_mode(wlan_
 	psm->MultipleDtim = 0;
 	switch (Action) {
 	case HostCmd_SubCmd_Enter_PS:
-		PRINTM(INFO, "PS Command:" "SubCode- Enter PS\n");
-		PRINTM(INFO, "LocalListenInterval = %d\n",
+		dprintk(1, "PS Command:" "SubCode- Enter PS\n");
+		dprintk(1, "LocalListenInterval = %d\n",
 		       Adapter->LocalListenInterval);
 
 		psm->LocalListenInterval =
@@ -134,11 +134,11 @@ static int wlan_cmd_802_11_ps_mode(wlan_
 		break;
 
 	case HostCmd_SubCmd_Exit_PS:
-		PRINTM(INFO, "PS Command:" "SubCode- Exit PS\n");
+		dprintk(1, "PS Command:" "SubCode- Exit PS\n");
 		break;
 
 	case HostCmd_SubCmd_Sleep_Confirmed:
-		PRINTM(INFO, "PS Command: SubCode- sleep confirm\n");
+		dprintk(1, "PS Command: SubCode- sleep confirm\n");
 		break;
 
 	default:
@@ -271,7 +271,7 @@ static int wlan_cmd_802_11_set_wep(wlan_
 		int i;
 
 		if (!assoc_req) {
-			PRINTM(INFO, "Invalid association request!");
+			dprintk(1, "Invalid association request!");
 			ret = WLAN_STATUS_FAILURE;
 			goto done;
 		}
@@ -283,7 +283,7 @@ static int wlan_cmd_802_11_set_wep(wlan_
 				                 (assoc_req->wep_tx_keyidx &
 				                 (u32)HostCmd_WEP_KEY_INDEX_MASK));
 
-		PRINTM(INFO, "Tx Key Index: %u\n", wep->KeyIndex);
+		dprintk(1, "Tx Key Index: %u\n", wep->KeyIndex);
 
 		/* Copy key types and material to host command structure */
 		for (i = 0; i < 4; i++) {
@@ -303,7 +303,7 @@ static int wlan_cmd_802_11_set_wep(wlan_
 			case 0:
 				break;
 			default:
-				PRINTM(INFO, "Invalid WEP Key %d length of %d\n",
+				dprintk(1, "Invalid WEP Key %d length of %d\n",
 				       i, pKey->len);
 				ret = WLAN_STATUS_FAILURE;
 				goto done;
@@ -519,7 +519,7 @@ static int wlan_cmd_802_11_snmp_mib(wlan
 
 	ENTER();
 
-	PRINTM(INFO, "SNMP_CMD: cmd_oid = 0x%x\n", cmd_oid);
+	dprintk(1, "SNMP_CMD: cmd_oid = 0x%x\n", cmd_oid);
 
 	cmd->Command = wlan_cpu_to_le16(HostCmd_CMD_802_11_SNMP_MIB);
 	cmd->Size =
@@ -624,11 +624,11 @@ static int wlan_cmd_802_11_snmp_mib(wlan
 		break;
 	}
 
-	PRINTM(INFO,
+	dprintk(1,
 	       "SNMP_CMD: Command=0x%x, Size=0x%x, SeqNum=0x%x, Result=0x%x\n",
 	       cmd->Command, cmd->Size, cmd->SeqNum, cmd->Result);
 
-	PRINTM(INFO,
+	dprintk(1,
 	       "SNMP_CMD: Action=0x%x, OID=0x%x, OIDSize=0x%x, Value=0x%x\n",
 	       pSNMPMIB->QueryType, pSNMPMIB->OID, pSNMPMIB->BufSize,
 	       *(u16 *) pSNMPMIB->Value);
@@ -710,7 +710,7 @@ static int wlan_cmd_802_11_rf_tx_power(w
 	cmd->Command = wlan_cpu_to_le16(HostCmd_CMD_802_11_RF_TX_POWER);
 	pRTP->Action = cmd_action;
 
-	PRINTM(INFO, "RF_TX_POWER_CMD: Size:%d Cmd:0x%x Act:%d\n", cmd->Size,
+	dprintk(1, "RF_TX_POWER_CMD: Size:%d Cmd:0x%x Act:%d\n", cmd->Size,
 	       cmd->Command, pRTP->Action);
 
 	switch (cmd_action) {
@@ -831,10 +831,10 @@ static int wlan_cmd_802_11_data_rate(wla
 
 	if (Action == HostCmd_ACT_SET_TX_FIX_RATE) {
 		pDataRate->DataRate[0] = libertas_data_rate_to_index(Adapter->DataRate);
-		PRINTM(INFO, "Setting FW for fixed rate 0x%02X\n",
+		dprintk(1, "Setting FW for fixed rate 0x%02X\n",
 		       Adapter->DataRate);
 	} else if (Action == HostCmd_ACT_SET_TX_AUTO) {
-		PRINTM(INFO, "Setting FW for AUTO rate\n");
+		dprintk(1, "Setting FW for AUTO rate\n");
 	}
 
 	LEAVE();
@@ -1087,7 +1087,7 @@ static int wlan_cmd_dft_access(wlan_priv
 			       u16 cmd_action, void *pdata_buf)
 {
 	struct HostCmd_DS_DFT_ACCESS *dft_access = &cmd->params.dft;
-	PRINTM(INFO, "DFT CMD(%d)\n", cmd_action);
+	dprintk(1, "DFT CMD(%d)\n", cmd_action);
 
 	cmd->Command = wlan_cpu_to_le16(HostCmd_CMD_DFT_ACCESS);
 	cmd->Size = wlan_cpu_to_le16(sizeof(struct HostCmd_DS_DFT_ACCESS)
@@ -1146,13 +1146,13 @@ void libertas_queue_cmd(wlan_adapter * A
 	ENTER();
 
 	if (!CmdNode) {
-		PRINTM(INFO, "QUEUE_CMD: CmdNode is NULL\n");
+		dprintk(1, "QUEUE_CMD: CmdNode is NULL\n");
 		goto done;
 	}
 
 	CmdPtr = (struct HostCmd_DS_COMMAND *)CmdNode->BufVirtualAddr;
 	if (!CmdPtr) {
-		PRINTM(INFO, "QUEUE_CMD: CmdPtr is NULL\n");
+		dprintk(1, "QUEUE_CMD: CmdPtr is NULL\n");
 		goto done;
 	}
 
@@ -1175,7 +1175,7 @@ void libertas_queue_cmd(wlan_adapter * A
 
 	spin_unlock_irqrestore(&Adapter->driver_lock, flags);
 
-	PRINTM(INFO, "QUEUE_CMD: Inserted node=0x%x, cmd=0x%x in CmdPendingQ\n",
+	dprintk(1, "QUEUE_CMD: Inserted node=0x%x, cmd=0x%x in CmdPendingQ\n",
 	       (u32) CmdNode,
 	       ((struct HostCmd_DS_GEN *)CmdNode->BufVirtualAddr)->Command);
 
@@ -1212,7 +1212,7 @@ static int DownloadCommandToStation(wlan
 	ENTER();
 
 	if (!Adapter || !CmdNode) {
-		PRINTM(INFO, "DNLD_CMD: Adapter = %#x, CmdNode = %#x\n",
+		dprintk(1, "DNLD_CMD: Adapter = %#x, CmdNode = %#x\n",
 		       (int)Adapter, (int)CmdNode);
 		if (CmdNode) {
 			spin_lock_irqsave(&Adapter->driver_lock, flags);	
@@ -1228,7 +1228,7 @@ static int DownloadCommandToStation(wlan
 
 	spin_lock_irqsave(&Adapter->driver_lock, flags);
 	if (!CmdPtr || !CmdPtr->Size) {
-		PRINTM(INFO, "DNLD_CMD: CmdPtr is Null or Cmd Size is Zero, "
+		dprintk(1, "DNLD_CMD: CmdPtr is Null or Cmd Size is Zero, "
 		       "Not sending\n");
 		__libertas_cleanup_and_insert_cmd(priv, CmdNode);
 		spin_unlock_irqrestore(&Adapter->driver_lock, flags);
@@ -1239,7 +1239,7 @@ static int DownloadCommandToStation(wlan
 	Adapter->CurCmd = CmdNode;
 	Adapter->CurCmdRetCode = 0;
 	spin_unlock_irqrestore(&Adapter->driver_lock, flags);
-	PRINTM(INFO, "DNLD_CMD:: Before download, Size of Cmd = %d\n",
+	dprintk(1, "DNLD_CMD:: Before download, Size of Cmd = %d\n",
 	       CmdPtr->Size);
 
 	CmdSize = CmdPtr->Size;
@@ -1252,7 +1252,7 @@ static int DownloadCommandToStation(wlan
 	ret = libertas_sbi_host_to_card(priv, MVMS_CMD, (u8 *) CmdPtr, CmdSize);
 
 	if (ret != 0) {
-		PRINTM(INFO, "DNLD_CMD: Host to Card Failed\n");
+		dprintk(1, "DNLD_CMD: Host to Card Failed\n");
 		spin_lock_irqsave(&Adapter->driver_lock, flags);
 		__libertas_cleanup_and_insert_cmd(priv, Adapter->CurCmd);
 		Adapter->CurCmd = NULL;
@@ -1261,7 +1261,7 @@ static int DownloadCommandToStation(wlan
 		goto done;
 	}
 
-	PRINTM(INFO, "DNLD_CMD: Sent command 0x%x @ %lu\n", Command, jiffies);
+	dprintk(1, "DNLD_CMD: Sent command 0x%x @ %lu\n", Command, jiffies);
 	HEXDUMP("DNLD_CMD: Command", CmdNode->BufVirtualAddr, CmdSize);
 
 	/* Setup the timer after transmit command */
@@ -1298,7 +1298,7 @@ static int wlan_cmd_mac_control(wlan_pri
 	    wlan_cpu_to_le16(sizeof(struct HostCmd_DS_MAC_CONTROL) + S_DS_GEN);
 	mac->Action = wlan_cpu_to_le16(priv->adapter->CurrentPacketFilter);
 
-	PRINTM(INFO, "wlan_cmd_mac_control(): Action=0x%X Size=%d\n",
+	dprintk(1, "wlan_cmd_mac_control(): Action=0x%X Size=%d\n",
 	       mac->Action, cmd->Size);
 
 	LEAVE();
@@ -1355,7 +1355,7 @@ int libertas_set_radio_control(wlan_priv
 				    HostCmd_ACT_GEN_SET,
 				    HostCmd_OPTION_WAITFORRSP, 0, NULL);
 
-	PRINTM(INFO, "RADIO_SET: on or off: 0x%X, Preamble = 0x%X\n",
+	dprintk(1, "RADIO_SET: on or off: 0x%X, Preamble = 0x%X\n",
 	       priv->adapter->RadioOn, priv->adapter->Preamble);
 
 	LEAVE();
@@ -1374,7 +1374,7 @@ int libertas_set_mac_packet_filter(wlan_
 
 	ENTER();
 
-	PRINTM(INFO, "libertas_set_mac_packet_filter Value = %x\n",
+	dprintk(1, "libertas_set_mac_packet_filter Value = %x\n",
 	       priv->adapter->CurrentPacketFilter);
 
 	/* Send MAC control command to station */
@@ -1410,13 +1410,13 @@ int libertas_prepare_and_send_command(wl
 	ENTER();
 
 	if (!Adapter) {
-		PRINTM(INFO, "PREP_CMD: Adapter is Null\n");
+		dprintk(1, "PREP_CMD: Adapter is Null\n");
 		ret = WLAN_STATUS_FAILURE;
 		goto done;
 	}
 
 	if (Adapter->SurpriseRemoved) {
-		PRINTM(INFO, "PREP_CMD: Card is Removed\n");
+		dprintk(1, "PREP_CMD: Card is Removed\n");
 		ret = WLAN_STATUS_FAILURE;
 		goto done;
 	}
@@ -1424,7 +1424,7 @@ int libertas_prepare_and_send_command(wl
 	CmdNode = libertas_get_free_cmd_ctrl_node(priv);
 
 	if (CmdNode == NULL) {
-		PRINTM(MSG, "PREP_CMD: No free CmdNode\n");
+		printk(KERN_ALERT "PREP_CMD: No free CmdNode\n");
 
 		/* Wake up main thread to execute next command */
 		wake_up_interruptible(&priv->MainThread.waitQ);
@@ -1436,11 +1436,11 @@ int libertas_prepare_and_send_command(wl
 
 	CmdPtr = (struct HostCmd_DS_COMMAND *)CmdNode->BufVirtualAddr;
 
-	PRINTM(INFO, "PREP_CMD: Val of Cmd ptr =0x%x, command=0x%X\n",
+	dprintk(1, "PREP_CMD: Val of Cmd ptr =0x%x, command=0x%X\n",
 	       (u32) CmdPtr, cmd_no);
 
 	if (!CmdPtr) {
-		PRINTM(MSG, "PREP_CMD: BufVirtualAddr of CmdNode is NULL\n");
+		printk(KERN_ALERT "PREP_CMD: BufVirtualAddr of CmdNode is NULL\n");
 		libertas_cleanup_and_insert_cmd(priv, CmdNode);
 		ret = WLAN_STATUS_FAILURE;
 		goto done;
@@ -1679,14 +1679,14 @@ #define ACTION_NUMLED_TLVTYPE_LEN_FIELDS
 		ret = WLAN_STATUS_SUCCESS;
 		break;
 	default:
-		PRINTM(INFO, "PREP_CMD: unknown command- %#x\n", cmd_no);
+		dprintk(1, "PREP_CMD: unknown command- %#x\n", cmd_no);
 		ret = WLAN_STATUS_FAILURE;
 		break;
 	}
 
 	/* return error, since the command preparation failed */
 	if (ret != WLAN_STATUS_SUCCESS) {
-		PRINTM(INFO, "PREP_CMD: Command preparation failed\n");
+		dprintk(1, "PREP_CMD: Command preparation failed\n");
 		libertas_cleanup_and_insert_cmd(priv, CmdNode);
 		ret = WLAN_STATUS_FAILURE;
 		goto done;
@@ -1700,14 +1700,14 @@ #define ACTION_NUMLED_TLVTYPE_LEN_FIELDS
 	libertas_sbi_reenable_host_interrupt(priv, 0x00);
 
 	if (wait_option & HostCmd_OPTION_WAITFORRSP) {
-		PRINTM(INFO, "PREP_CMD: Wait for CMD response\n");
+		dprintk(1, "PREP_CMD: Wait for CMD response\n");
 		wait_event_interruptible(CmdNode->cmdwait_q,
 					 CmdNode->CmdWaitQWoken);
 	}
 
 	spin_lock_irqsave(&Adapter->driver_lock, flags);
 	if (Adapter->CurCmdRetCode) {
-		PRINTM(INFO, "PREP_CMD: Command failed with return code=%d\n",
+		dprintk(1, "PREP_CMD: Command failed with return code=%d\n",
 		       Adapter->CurCmdRetCode);
 		Adapter->CurCmdRetCode = 0;
 		ret = WLAN_STATUS_FAILURE;
@@ -1741,7 +1741,7 @@ int libertas_allocate_cmd_buffer(wlan_pr
 	ulBufSize = sizeof(struct CmdCtrlNode) * MRVDRV_NUM_OF_CMD_BUFFER;
 
 	if (!(TempCmdArray = kmalloc(ulBufSize, GFP_KERNEL))) {
-		PRINTM(INFO,
+		dprintk(1,
 		       "ALLOC_CMD_BUF: Failed to allocate TempCmdArray\n");
 		ret = WLAN_STATUS_FAILURE;
 		goto done;
@@ -1754,7 +1754,7 @@ int libertas_allocate_cmd_buffer(wlan_pr
 	ulBufSize = MRVDRV_SIZE_OF_CMD_BUFFER;
 	for (i = 0; i < MRVDRV_NUM_OF_CMD_BUFFER; i++) {
 		if (!(pTempVirtualAddr = kmalloc(ulBufSize, GFP_KERNEL))) {
-			PRINTM(INFO,
+			dprintk(1,
 			       "ALLOC_CMD_BUF: pTempVirtualAddr: out of memory\n");
 			ret = WLAN_STATUS_FAILURE;
 			goto done;
@@ -1794,7 +1794,7 @@ int libertas_free_cmd_buffer(wlan_privat
 
 	/* need to check if cmd array is allocated or not */
 	if (Adapter->CmdArray == NULL) {
-		PRINTM(INFO, "FREE_CMD_BUF: CmdArray is Null\n");
+		dprintk(1, "FREE_CMD_BUF: CmdArray is Null\n");
 		goto done;
 	}
 
@@ -1804,7 +1804,7 @@ int libertas_free_cmd_buffer(wlan_privat
 	ulBufSize = MRVDRV_SIZE_OF_CMD_BUFFER;
 	for (i = 0; i < MRVDRV_NUM_OF_CMD_BUFFER; i++) {
 		if (TempCmdArray[i].BufVirtualAddr) {
-			PRINTM(INFO, "Free all the array\n");
+			dprintk(1, "Free all the array\n");
 			kfree(TempCmdArray[i].BufVirtualAddr);
 			TempCmdArray[i].BufVirtualAddr = NULL;
 		}
@@ -1812,7 +1812,7 @@ int libertas_free_cmd_buffer(wlan_privat
 
 	/* Release CmdCtrlNode */
 	if (Adapter->CmdArray) {
-		PRINTM(INFO, "Free CmdArray\n");
+		dprintk(1, "Free CmdArray\n");
 		kfree(Adapter->CmdArray);
 		Adapter->CmdArray = NULL;
 	}
@@ -1846,15 +1846,15 @@ struct CmdCtrlNode *libertas_get_free_cm
 		TempNode = (struct CmdCtrlNode *)Adapter->CmdFreeQ.next;
 		list_del((struct list_head *)TempNode);
 	} else {
-		PRINTM(INFO, "GET_CMD_NODE: CmdCtrlNode is not available\n");
+		dprintk(1, "GET_CMD_NODE: CmdCtrlNode is not available\n");
 		TempNode = NULL;
 	}
 
 	spin_unlock_irqrestore(&Adapter->driver_lock, flags);
 
 	if (TempNode) {
-		PRINTM(INFO, "GET_CMD_NODE: CmdCtrlNode available\n");
-		PRINTM(INFO, "GET_CMD_NODE: CmdCtrlNode Address = %p\n",
+		dprintk(1, "GET_CMD_NODE: CmdCtrlNode available\n");
+		dprintk(1, "GET_CMD_NODE: CmdCtrlNode Address = %p\n",
 		       TempNode);
 		CleanUpCmdCtrlNode(TempNode);
 	}
@@ -1934,7 +1934,7 @@ int libertas_execute_next_command(wlan_p
 	ENTER();
 
 	if (!Adapter) {
-		PRINTM(MSG, "EXEC_NEXT_CMD: Adapter is NULL\n");
+		printk(KERN_ALERT "EXEC_NEXT_CMD: Adapter is NULL\n");
 		ret = WLAN_STATUS_FAILURE;
 		goto done;
 	}
@@ -1942,7 +1942,7 @@ int libertas_execute_next_command(wlan_p
 	spin_lock_irqsave(&Adapter->driver_lock, flags);
 
 	if (Adapter->CurCmd) {
-		PRINTM(MSG, "EXEC_NEXT_CMD: there is command in processing!\n");
+		printk(KERN_ALERT "EXEC_NEXT_CMD: there is command in processing!\n");
 		spin_unlock_irqrestore(&Adapter->driver_lock, flags);
 		ret = WLAN_STATUS_FAILURE;
 		goto done;
@@ -1956,7 +1956,7 @@ int libertas_execute_next_command(wlan_p
 	spin_unlock_irqrestore(&Adapter->driver_lock, flags);
 
 	if (CmdNode) {
-		PRINTM(INFO,
+		dprintk(1,
 		       "EXEC_NEXT_CMD: Got next command from CmdPendingQ\n");
 		CmdPtr = (struct HostCmd_DS_COMMAND *)CmdNode->BufVirtualAddr;
 
@@ -1964,13 +1964,13 @@ int libertas_execute_next_command(wlan_p
 			if ((Adapter->PSState == PS_STATE_SLEEP)
 			    || (Adapter->PSState == PS_STATE_PRE_SLEEP)
 			    ) {
-				PRINTM(INFO,
+				dprintk(1,
 				       "EXEC_NEXT_CMD: Cannot send cmd 0x%x in PSState %d\n",
 				       CmdPtr->Command, Adapter->PSState);
 				ret = WLAN_STATUS_FAILURE;
 				goto done;
 			}
-			PRINTM(INFO, "EXEC_NEXT_CMD: OK to send command "
+			dprintk(1, "EXEC_NEXT_CMD: OK to send command "
 			       "0x%x in PSState %d\n",
 			       CmdPtr->Command, Adapter->PSState);
 		} else if (Adapter->PSState != PS_STATE_FULL_POWER) {
@@ -2007,13 +2007,13 @@ int libertas_execute_next_command(wlan_p
 				 */
 				struct HostCmd_DS_802_11_PS_MODE *psm =
 				    &CmdPtr->params.psmode;
-
-				PRINTM(INFO,
+				
+				dprintk(1,
 				       "EXEC_NEXT_CMD: PS cmd- Action=0x%x\n",
 				       psm->Action);
 				if (psm->Action !=
 				    wlan_cpu_to_le16(HostCmd_SubCmd_Exit_PS)) {
-					PRINTM(INFO,
+					dprintk(1,	
 					       "EXEC_NEXT_CMD: Ignore Enter PS cmd\n");
 					list_del((struct list_head *)CmdNode);
 					libertas_cleanup_and_insert_cmd(priv, CmdNode);
@@ -2025,7 +2025,7 @@ int libertas_execute_next_command(wlan_p
 				if ((Adapter->PSState == PS_STATE_SLEEP)
 				    || (Adapter->PSState == PS_STATE_PRE_SLEEP)
 				    ) {
-					PRINTM(INFO,
+					dprintk(1,
 					       "EXEC_NEXT_CMD: Ignore ExitPS cmd in sleep\n");
 					list_del((struct list_head *)CmdNode);
 					libertas_cleanup_and_insert_cmd(priv, CmdNode);
@@ -2035,12 +2035,12 @@ int libertas_execute_next_command(wlan_p
 					goto done;
 				}
 
-				PRINTM(INFO,
+				dprintk(1,
 				       "EXEC_NEXT_CMD: Sending Exit_PS down...\n");
 			}
 		}
 		list_del((struct list_head *)CmdNode);
-		PRINTM(INFO, "EXEC_NEXT_CMD: Sending 0x%04X Command\n",
+		dprintk(1, "EXEC_NEXT_CMD: Sending 0x%04X Command\n",
 		       CmdPtr->Command);
 		DownloadCommandToStation(priv, CmdNode);
 	} else {
@@ -2056,13 +2056,13 @@ int libertas_execute_next_command(wlan_p
 				/* check for valid WPA group keys */
 				if (Adapter->wpa_mcast_key.len
 				    || Adapter->wpa_unicast_key.len) {
-					PRINTM(INFO,
+					dprintk(1,
 					       "EXEC_NEXT_CMD: WPA enabled and GTK_SET"
 					       " go back to PS_SLEEP");
 					libertas_ps_sleep(priv, 0);
 				}
 			} else {
-				PRINTM(INFO,
+				dprintk(1,
 				       "EXEC_NEXT_CMD: Command PendQ is empty,"
 				       " go back to PS_SLEEP");
 				libertas_ps_sleep(priv, 0);
@@ -2099,11 +2099,11 @@ void libertas_send_iwevcustom_event(wlan
 	iwrq.data.length = strlen(buf) + 1 + IW_EV_LCP_LEN;
 
 	/* Send Event to upper layer */
-	PRINTM(INFO, "Event Indication string = %s\n",
+	dprintk(1, "Event Indication string = %s\n",
 	       (char *)iwrq.data.pointer);
-	PRINTM(INFO, "Event Indication String Length = %d\n", iwrq.data.length);
+	dprintk(1, "Event Indication String Length = %d\n", iwrq.data.length);
 
-	PRINTM(INFO, "Sending wireless event IWEVCUSTOM for %s\n", str);
+	dprintk(1, "Sending wireless event IWEVCUSTOM for %s\n", str);
 	wireless_send_event(priv->wlan_dev.netdev, IWEVCUSTOM, &iwrq, buf);
 
 	LEAVE();
@@ -2126,7 +2126,7 @@ static int SendConfirmSleep(wlan_private
 
 	ENTER();
 
-	PRINTM(INFO, "SEND_SLEEPC_CMD: Before download, Size of cmd = %d\n",
+	dprintk(1, "SEND_SLEEPC_CMD: Before download, Size of cmd = %d\n",
 	       size);
 
 	HEXDUMP("SEND_SLEEPC_CMD: Sleep confirm Command", CmdPtr, size);
@@ -2136,25 +2136,25 @@ static int SendConfirmSleep(wlan_private
 
 	spin_lock_irqsave(&Adapter->driver_lock, flags);
 	if (Adapter->IntCounter || Adapter->CurrentTxSkb)
-		PRINTM(INFO, "SEND_SLEEPC_CMD: IntCounter=%d CurrentTxSkb=%p\n",
+		dprintk(1, "SEND_SLEEPC_CMD: IntCounter=%d CurrentTxSkb=%p\n",
 		       Adapter->IntCounter, Adapter->CurrentTxSkb);
 	spin_unlock_irqrestore(&Adapter->driver_lock, flags);
 
 	if (ret) {
-		PRINTM(MSG,
+		printk(KERN_ALERT
 		       "SEND_SLEEPC_CMD: Host to Card Failed for Confirm Sleep\n");
 	} else {
 		spin_lock_irqsave(&Adapter->driver_lock, flags);
 		if (!Adapter->IntCounter) {
 			Adapter->PSState = PS_STATE_SLEEP;
 		} else {
-			PRINTM(INFO, "SEND_SLEEPC_CMD: After sent,IntC=%d\n",
+			dprintk(1, "SEND_SLEEPC_CMD: After sent,IntC=%d\n",
 			       Adapter->IntCounter);
 		}
 		spin_unlock_irqrestore(&Adapter->driver_lock, flags);
 
-		PRINTM(INFO, "SEND_SLEEPC_CMD: Sent Confirm Sleep command\n");
-		PRINTM(INFO, "+");
+		dprintk(1, "SEND_SLEEPC_CMD: Sent Confirm Sleep command\n");
+		dprintk(1, "+");
 	}
 
 	LEAVE();
@@ -2200,7 +2200,7 @@ void libertas_ps_wakeup(wlan_private * p
 
 	LocalPSMode = Wlan802_11PowerModeCAM;
 
-	PRINTM(INFO, "Exit_PS: LocalPSMode = %d\n", LocalPSMode);
+	dprintk(1, "Exit_PS: LocalPSMode = %d\n", LocalPSMode);
 
 	libertas_prepare_and_send_command(priv, HostCmd_CMD_802_11_PS_MODE,
 			      HostCmd_SubCmd_Exit_PS,
@@ -2228,26 +2228,26 @@ void libertas_ps_confirm_sleep(wlan_priv
 
 	if (priv->wlan_dev.dnld_sent) {
 		allowed = 0;
-		PRINTM(INFO, "D");
+		dprintk(1, "D");
 	}
 
 	spin_lock_irqsave(&Adapter->driver_lock, flags);
 	if (Adapter->CurCmd) {
 		allowed = 0;
-		PRINTM(INFO, "C");
+		dprintk(1, "C");
 	}
 	if (Adapter->IntCounter > 0) {
 		allowed = 0;
-		PRINTM(INFO, "I%d", Adapter->IntCounter);
+		dprintk(1, "I%d", Adapter->IntCounter);
 	}
 	spin_unlock_irqrestore(&Adapter->driver_lock, flags);
 
 	if (allowed) {
-		PRINTM(INFO, "Sending libertas_ps_confirm_sleep\n");
+		dprintk(1, "Sending libertas_ps_confirm_sleep\n");
 		SendConfirmSleep(priv, (u8 *) & Adapter->libertas_ps_confirm_sleep,
 				 sizeof(struct PS_CMD_ConfirmSleep));
 	} else {
-		PRINTM(INFO, "Sleep Confirm has been delayed\n");
+		dprintk(1, "Sleep Confirm has been delayed\n");
 	}
 
 	LEAVE();
diff --git a/drivers/net/wireless/libertas/wlan_cmdresp.c b/drivers/net/wireless/libertas/wlan_cmdresp.c
index cf8630d..6a25248 100644
--- a/drivers/net/wireless/libertas/wlan_cmdresp.c
+++ b/drivers/net/wireless/libertas/wlan_cmdresp.c
@@ -68,7 +68,7 @@ void libertas_mac_event_disconnected(wla
 	if (Adapter->MediaConnectStatus != WlanMediaStateConnected)
 		return;
 
-	PRINTM(INFO, "Handles disconnect event.\n");
+	dprintk(1, "Handles disconnect event.\n");
 
 	memset(wrqu.ap_addr.sa_data, 0x00, ETH_ALEN);
 	wrqu.ap_addr.sa_family = ARPHRD_ETHER;
@@ -98,10 +98,10 @@ void libertas_mac_event_disconnected(wla
 	Adapter->nextSNRNF = 0;
 	Adapter->numSNRNF = 0;
 	Adapter->RxPDRate = 0;
-	PRINTM(INFO, "Current SSID=%s, Ssid Length=%u\n",
+	dprintk(1, "Current SSID=%s, Ssid Length=%u\n",
 	       Adapter->CurBssParams.ssid.Ssid,
 	       Adapter->CurBssParams.ssid.SsidLength);
-	PRINTM(INFO, "Previous SSID=%s, Ssid Length=%u\n",
+	dprintk(1, "Previous SSID=%s, Ssid Length=%u\n",
 	       Adapter->PreviousSSID.Ssid, Adapter->PreviousSSID.SsidLength);
 
 	/* reset internal flags */
@@ -128,7 +128,7 @@ void libertas_mac_event_disconnected(wla
 
 	if (Adapter->PSState != PS_STATE_FULL_POWER) {
 		/* make firmware to exit PS mode */
-		PRINTM(INFO, "Disconnected, so exit PS mode.\n");
+		dprintk(1, "Disconnected, so exit PS mode.\n");
 		libertas_ps_wakeup(priv, 0);
 	}
 
@@ -152,7 +152,7 @@ static void HandleDisconnectEvent(wlan_p
 		libertas_mac_event_disconnected(priv);
 #ifdef REASSOCIATION
 		if (Adapter->Reassoc_on) {
-			PRINTM(INFO, "RE-ASSOC: trigger the timer\n");
+			dprintk(1, "RE-ASSOC: trigger the timer\n");
 			mod_timer(&Adapter->reassoc_timer, 0);
 		}
 #endif				/* REASSOCIATION */
@@ -271,13 +271,13 @@ static int wlan_ret_get_hw_spec(wlan_pri
 
 	Adapter->FWReleaseNumber = hwspec->FWReleaseNumber;
 
-	PRINTM(INFO, "GET_HW_SPEC: FWReleaseVersion- 0x%X\n",
+	dprintk(1, "GET_HW_SPEC: FWReleaseVersion- 0x%X\n",
 	       Adapter->FWReleaseNumber);
-	PRINTM(INFO, "GET_HW_SPEC: Permanent addr- %2x:%2x:%2x:%2x:%2x:%2x\n",
+	dprintk(1, "GET_HW_SPEC: Permanent addr- %2x:%2x:%2x:%2x:%2x:%2x\n",
 	       hwspec->PermanentAddr[0], hwspec->PermanentAddr[1],
 	       hwspec->PermanentAddr[2], hwspec->PermanentAddr[3],
 	       hwspec->PermanentAddr[4], hwspec->PermanentAddr[5]);
-	PRINTM(INFO, "GET_HW_SPEC: HWIfVersion=0x%X  Version=0x%X\n",
+	dprintk(1, "GET_HW_SPEC: HWIfVersion=0x%X  Version=0x%X\n",
 	       hwspec->HWIfVersion, hwspec->Version);
 
 	Adapter->RegionCode = wlan_le16_to_cpu(hwspec->RegionCode);
@@ -294,7 +294,7 @@ static int wlan_ret_get_hw_spec(wlan_pri
 	if (i >= MRVDRV_MAX_REGION_CODE) {
 		Adapter->RegionCode = 0x10;
 		Adapter->RegionTableIndex = 0;
-		PRINTM(WARN,
+		printk(KERN_INFO
 		       "unidentified region code, use the default (USA)\n");
 	}
 
@@ -335,7 +335,7 @@ static int wlan_ret_802_11_sleep_params(
 
 	ENTER();
 
-	PRINTM(INFO, "error=%x offset=%x stabletime=%x calcontrol=%x\n"
+	dprintk(1, "error=%x offset=%x stabletime=%x calcontrol=%x\n"
 	       " extsleepclk=%x\n", sp->Error, sp->Offset,
 	       sp->StableTime, sp->CalControl, sp->ExternalSleepClk);
 	Adapter->sp.sp_error = wlan_le16_to_cpu(sp->Error);
@@ -408,7 +408,7 @@ static int wlan_ret_802_11_reset(wlan_pr
 				 struct HostCmd_DS_COMMAND *resp)
 {
 	ENTER();
-	PRINTM(INFO, "HWAC - Reset command successful\n");
+	dprintk(1, "HWAC - Reset command successful\n");
 
 	return WLAN_STATUS_SUCCESS;
 }
@@ -451,9 +451,9 @@ static int wlan_ret_802_11_snmp_mib(wlan
 
 	ENTER();
 
-	PRINTM(INFO, "SNMP_RESP: value of the OID = %x, QueryType=%x\n", OID,
+	dprintk(1, "SNMP_RESP: value of the OID = %x, QueryType=%x\n", OID,
 	       QueryType);
-	PRINTM(INFO, "SNMP_RESP: Buf size  = %x\n",
+	dprintk(1, "SNMP_RESP: Buf size  = %x\n",
 	       wlan_le16_to_cpu(smib->BufSize));
 
 	if (QueryType == HostCmd_ACT_GEN_GET) {
@@ -462,21 +462,21 @@ static int wlan_ret_802_11_snmp_mib(wlan
 			priv->adapter->FragThsd =
 			    wlan_le16_to_cpu(*
 					     ((unsigned short *)(smib->Value)));
-			PRINTM(INFO, "SNMP_RESP: FragThsd =%u\n",
+			dprintk(1, "SNMP_RESP: FragThsd =%u\n",
 			       priv->adapter->FragThsd);
 			break;
 		case RtsThresh_i:
 			priv->adapter->RTSThsd =
 			    wlan_le16_to_cpu(*
 					     ((unsigned short *)(smib->Value)));
-			PRINTM(INFO, "SNMP_RESP: RTSThsd =%u\n",
+			dprintk(1, "SNMP_RESP: RTSThsd =%u\n",
 			       priv->adapter->RTSThsd);
 			break;
 		case ShortRetryLim_i:
 			priv->adapter->TxRetryCount =
 			    wlan_le16_to_cpu(*
 					     ((unsigned short *)(smib->Value)));
-			PRINTM(INFO, "SNMP_RESP: TxRetryCount =%u\n",
+			dprintk(1, "SNMP_RESP: TxRetryCount =%u\n",
 			       priv->adapter->RTSThsd);
 			break;
 		default:
@@ -604,7 +604,7 @@ static int wlan_ret_802_11_rf_tx_power(w
 
 	Adapter->TxPowerLevel = wlan_le16_to_cpu(rtp->CurrentLevel);
 
-	PRINTM(INFO, "Current TxPower Level = %d\n", Adapter->TxPowerLevel);
+	dprintk(1, "Current TxPower Level = %d\n", Adapter->TxPowerLevel);
 
 	LEAVE();
 	return WLAN_STATUS_SUCCESS;
@@ -632,7 +632,7 @@ static int wlan_ret_802_11_rf_antenna(wl
 		Adapter->TxAntennaMode =
 		    wlan_le16_to_cpu(pAntenna->AntennaMode);
 
-	PRINTM(INFO, "RF_ANT_RESP: Action = 0x%x, Mode = 0x%04x\n",
+	dprintk(1, "RF_ANT_RESP: Action = 0x%x, Mode = 0x%04x\n",
 	       Action, wlan_le16_to_cpu(pAntenna->AntennaMode));
 
 	return WLAN_STATUS_SUCCESS;
@@ -727,7 +727,7 @@ static int wlan_ret_802_11_rf_channel(wl
 
 	if (Action == HostCmd_OPT_802_11_RF_CHANNEL_GET
 	    && Adapter->CurBssParams.channel != newChannel) {
-		PRINTM(INFO, "Channel Switch: %d to %d\n",
+		dprintk(1, "Channel Switch: %d to %d\n",
 		       Adapter->CurBssParams.channel, newChannel);
 
 		/* Update the channel again */
@@ -768,7 +768,7 @@ static int wlan_ret_802_11_rssi(wlan_pri
 	    CAL_RSSI(Adapter->SNR[TYPE_BEACON][TYPE_AVG] / AVG_SCALE,
 		     Adapter->NF[TYPE_BEACON][TYPE_AVG] / AVG_SCALE);
 
-	PRINTM(INFO, "Beacon RSSI value = 0x%x\n",
+	dprintk(1, "Beacon RSSI value = 0x%x\n",
 	       Adapter->RSSI[TYPE_BEACON][TYPE_AVG]);
 
 	return WLAN_STATUS_SUCCESS;
@@ -786,11 +786,11 @@ static int wlan_ret_802_11_eeprom_access
 {
 	wlan_adapter *Adapter = priv->adapter;
 	wlan_ioctl_regrdwr *pBuf = (wlan_ioctl_regrdwr *) Adapter->pRdeeprom;
-	PRINTM(INFO, "eeprom read len=%x\n",
+	dprintk(1, "eeprom read len=%x\n",
 	       wlan_le16_to_cpu(resp->params.rdeeprom.ByteCount));
 	if (pBuf->NOB < wlan_le16_to_cpu(resp->params.rdeeprom.ByteCount)) {
 		pBuf->NOB = 0;
-		PRINTM(INFO, "eeprom read return length is too big\n");
+		dprintk(1, "eeprom read return length is too big\n");
 		return WLAN_STATUS_FAILURE;
 	}
 	pBuf->NOB = wlan_le16_to_cpu(resp->params.rdeeprom.ByteCount);
@@ -845,7 +845,7 @@ int libertas_process_rx_command(wlan_pri
 
 	ENTER();
 
-	PRINTM(INFO, "CMD_RESP: @ %lu\n", jiffies);
+	dprintk(1, "CMD_RESP: @ %lu\n", jiffies);
 
 	/* Now we got response from FW, cancel the command timer */
 	del_timer(&Adapter->command_timer);
@@ -854,7 +854,7 @@ int libertas_process_rx_command(wlan_pri
 	spin_lock_irqsave(&Adapter->driver_lock, flags);
 
 	if (!Adapter->CurCmd) {
-		PRINTM(INFO, "CMD_RESP: NULL CurCmd=%p\n", Adapter->CurCmd);
+		dprintk(1, "CMD_RESP: NULL CurCmd=%p\n", Adapter->CurCmd);
 		ret = WLAN_STATUS_FAILURE;
 		spin_unlock_irqrestore(&Adapter->driver_lock, flags);
 		goto done;
@@ -868,11 +868,11 @@ int libertas_process_rx_command(wlan_pri
 
 	Result = wlan_le16_to_cpu(resp->Result);
 
-	PRINTM(INFO, "CMD_RESP: %x Result: %d Length: %d\n", RespCmd,
+	dprintk(1, "CMD_RESP: %x Result: %d Length: %d\n", RespCmd,
 	       Result, priv->wlan_dev.upld_len);
 
 	if (!(RespCmd & 0x8000)) {
-		PRINTM(INFO, "Invalid response to command!");
+		dprintk(1, "Invalid response to command!");
 		Adapter->CurCmdRetCode = WLAN_STATUS_FAILURE;
 		__libertas_cleanup_and_insert_cmd(priv, Adapter->CurCmd);
 		Adapter->CurCmd = NULL;
@@ -888,13 +888,13 @@ int libertas_process_rx_command(wlan_pri
 		struct HostCmd_DS_802_11_PS_MODE *psmode;
 
 		psmode = &resp->params.psmode;
-		PRINTM(INFO,
+		dprintk(1,
 		       "CMD_RESP: PS_MODE cmd reply result=%#x action=0x%X\n",
 		       resp->Result, psmode->Action);
 		psmode->Action = wlan_cpu_to_le16(psmode->Action);
 
 		if (Result) {
-			PRINTM(INFO, "CMD_RESP: PS command failed- %#x \n",
+			dprintk(1, "CMD_RESP: PS command failed- %#x \n",
 			       resp->Result);
 			if (Adapter->InfrastructureMode == Wlan802_11IBSS) {
 				/* 
@@ -910,14 +910,14 @@ int libertas_process_rx_command(wlan_pri
 			Adapter->NeedToWakeup = 0;
 			Adapter->PSState = PS_STATE_AWAKE;
 
-			PRINTM(INFO, "CMD_RESP: Enter_PS command response\n");
+			dprintk(1, "CMD_RESP: Enter_PS command response\n");
 			if (Adapter->MediaConnectStatus !=
 			    WlanMediaStateConnected) {
 				/*
 				 * When Deauth Event received before Enter_PS command
 				 * response, We need to wake up the firmware.
 				 */
-				PRINTM(INFO,
+				dprintk(1,
 				       "Disconnected, Going to invoke libertas_ps_wakeup\n");
 
 				mutex_unlock(&Adapter->lock);
@@ -929,9 +929,9 @@ int libertas_process_rx_command(wlan_pri
 		} else if (psmode->Action == HostCmd_SubCmd_Exit_PS) {
 			Adapter->NeedToWakeup = 0;
 			Adapter->PSState = PS_STATE_FULL_POWER;
-			PRINTM(INFO, "CMD_RESP: Exit_PS command response\n");
+			dprintk(1, "CMD_RESP: Exit_PS command response\n");
 		} else {
-			PRINTM(INFO, "CMD_RESP: PS- Action=0x%X\n",
+			dprintk(1, "CMD_RESP: PS- Action=0x%X\n",
 			       psmode->Action);
 		}
 
@@ -952,7 +952,7 @@ int libertas_process_rx_command(wlan_pri
 
 	/* If the command is not successful, cleanup and return failure */
 	if ((Result != HostCmd_RESULT_OK || !(RespCmd & 0x8000))) {
-		PRINTM(INFO, "CMD_RESP: command reply %#x result=%#x\n",
+		dprintk(1, "CMD_RESP: command reply %#x result=%#x\n",
 		       resp->Command, resp->Result);
 		/*
 		 * Handling errors here
@@ -960,7 +960,7 @@ int libertas_process_rx_command(wlan_pri
 		switch (RespCmd) {
 		case HostCmd_RET_HW_SPEC_INFO:
 		case HostCmd_RET_802_11_RESET:
-			PRINTM(INFO, "CMD_RESP: Reset command Failed\n");
+			dprintk(1, "CMD_RESP: Reset command Failed\n");
 			Adapter->HardwareStatus = WlanHardwareStatusNotReady;
 			break;
 
@@ -1087,7 +1087,7 @@ int libertas_process_rx_command(wlan_pri
 	case HostCmd_RET_802_11_ENABLE_RSN:
 		break;
 	case HostCmd_RET_802_11_KEY_MATERIAL:
-		PRINTM(INFO, "CMD_RESP: KEY_MATERIAL command response\n");
+		dprintk(1, "CMD_RESP: KEY_MATERIAL command response\n");
 		ret = wlan_ret_802_11_key_material(priv, resp);
 		break;
 
@@ -1153,7 +1153,7 @@ int libertas_process_rx_command(wlan_pri
 		priv->adapter->TxRate = resp->params.txrate.TxRate;
 		break;
 	default:
-		PRINTM(INFO, "CMD_RESP: Unknown command response %#x\n",
+		dprintk(1, "CMD_RESP: Unknown command response %#x\n",
 		       resp->Command);
 		break;
 	}
@@ -1191,35 +1191,35 @@ int libertas_process_event(wlan_private 
 
 	ENTER();
 
-	PRINTM(INFO, "EVENT Cause %x\n", EventCause);
+	dprintk(1, "EVENT Cause %x\n", EventCause);
 
 	switch (EventCause >> SBI_EVENT_CAUSE_SHIFT) {
 	case MACREG_INT_CODE_LINK_SENSED:
-		PRINTM(INFO, "EVENT: MACREG_INT_CODE_LINK_SENSED\n");
+		dprintk(1, "EVENT: MACREG_INT_CODE_LINK_SENSED\n");
 		break;
 
 	case MACREG_INT_CODE_DEAUTHENTICATED:
-		PRINTM(INFO, "EVENT: Deauthenticated\n");
+		dprintk(1, "EVENT: Deauthenticated\n");
 		HandleDisconnectEvent(priv);
 		break;
 
 	case MACREG_INT_CODE_DISASSOCIATED:
-		PRINTM(INFO, "EVENT: Disassociated\n");
+		dprintk(1, "EVENT: Disassociated\n");
 		HandleDisconnectEvent(priv);
 		break;
 
 	case MACREG_INT_CODE_LINK_LOSE_NO_SCAN:
-		PRINTM(INFO, "EVENT: Link lost\n");
+		dprintk(1, "EVENT: Link lost\n");
 		HandleDisconnectEvent(priv);
 		break;
 
 	case MACREG_INT_CODE_PS_SLEEP:
-		PRINTM(INFO, "EVENT: SLEEP\n");
-		PRINTM(INFO, "_");
+		dprintk(1, "EVENT: SLEEP\n");
+		dprintk(1, "_");
 
 		/* handle unexpected PS SLEEP event */
 		if (Adapter->PSState == PS_STATE_FULL_POWER) {
-			PRINTM(INFO,
+			dprintk(1,
 			       "EVENT: In FULL POWER mode - ignore PS SLEEP\n");
 			break;
 		}
@@ -1230,12 +1230,12 @@ int libertas_process_event(wlan_private 
 		break;
 
 	case MACREG_INT_CODE_PS_AWAKE:
-		PRINTM(INFO, "EVENT: AWAKE \n");
-		PRINTM(INFO, "|");
+		dprintk(1, "EVENT: AWAKE \n");
+		dprintk(1, "|");
 
 		/* handle unexpected PS AWAKE event */
 		if (Adapter->PSState == PS_STATE_FULL_POWER) {
-			PRINTM(INFO,
+			dprintk(1,
 			       "EVENT: In FULL POWER mode - ignore PS AWAKE\n");
 			break;
 		}
@@ -1261,18 +1261,18 @@ #endif
 			 * Adapter->NeedToWakeup will be set to FALSE 
 			 * in libertas_ps_wakeup()
 			 */
-			PRINTM(INFO, "Waking up...\n");
+			dprintk(1, "Waking up...\n");
 			libertas_ps_wakeup(priv, 0);
 		}
 		break;
 
 	case MACREG_INT_CODE_MIC_ERR_UNICAST:
-		PRINTM(INFO, "EVENT: UNICAST MIC ERROR\n");
+		dprintk(1, "EVENT: UNICAST MIC ERROR\n");
 		HandleMICFailureEvent(priv, MACREG_INT_CODE_MIC_ERR_UNICAST);
 		break;
 
 	case MACREG_INT_CODE_MIC_ERR_MULTICAST:
-		PRINTM(INFO, "EVENT: MULTICAST MIC ERROR\n");
+		dprintk(1, "EVENT: MULTICAST MIC ERROR\n");
 		HandleMICFailureEvent(priv, MACREG_INT_CODE_MIC_ERR_MULTICAST);
 		break;
 	case MACREG_INT_CODE_MIB_CHANGED:
@@ -1280,27 +1280,27 @@ #endif
 		break;
 
 	case MACREG_INT_CODE_ADHOC_BCN_LOST:
-		PRINTM(INFO, "EVENT: HWAC - ADHOC BCN LOST\n");
+		dprintk(1, "EVENT: HWAC - ADHOC BCN LOST\n");
 		break;
 
 	case MACREG_INT_CODE_RSSI_LOW:
-		PRINTM(MSG, "EVENT: RSSI_LOW\n");
+		printk(KERN_ALERT "EVENT: RSSI_LOW\n");
 		break;
 	case MACREG_INT_CODE_SNR_LOW:
-		PRINTM(MSG, "EVENT: SNR_LOW\n");
+		printk(KERN_ALERT "EVENT: SNR_LOW\n");
 		break;
 	case MACREG_INT_CODE_MAX_FAIL:
-		PRINTM(MSG, "EVENT: MAX_FAIL\n");
+		printk(KERN_ALERT "EVENT: MAX_FAIL\n");
 		break;
 	case MACREG_INT_CODE_RSSI_HIGH:
-		PRINTM(MSG, "EVENT: RSSI_HIGH\n");
+		printk(KERN_ALERT "EVENT: RSSI_HIGH\n");
 		break;
 	case MACREG_INT_CODE_SNR_HIGH:
-		PRINTM(MSG, "EVENT: SNR_HIGH\n");
+		printk(KERN_ALERT "EVENT: SNR_HIGH\n");
 		break;
 
 	default:
-		PRINTM(INFO, "EVENT: unknown event id: %#x\n",
+		printk(KERN_ALERT "EVENT: unknown event id: %#x\n",
 		       EventCause >> SBI_EVENT_CAUSE_SHIFT);
 		break;
 	}
diff --git a/drivers/net/wireless/libertas/wlan_debugfs.c b/drivers/net/wireless/libertas/wlan_debugfs.c
index dd8814e..9d5079e 100644
--- a/drivers/net/wireless/libertas/wlan_debugfs.c
+++ b/drivers/net/wireless/libertas/wlan_debugfs.c
@@ -232,7 +232,7 @@ static int wlan_debugfs_write(struct fil
 		return 0;
 
 	if (copy_from_user(pdata, buf, cnt)) {
-		PRINTM(INFO, "Copy from user failed\n");
+		dprintk(1, "Copy from user failed\n");
 		kfree(pdata);
 		return 0;
 	}
diff --git a/drivers/net/wireless/libertas/wlan_defs.h b/drivers/net/wireless/libertas/wlan_defs.h
index 4b01c07..8b765ed 100644
--- a/drivers/net/wireless/libertas/wlan_defs.h
+++ b/drivers/net/wireless/libertas/wlan_defs.h
@@ -95,51 +95,24 @@ #define B_BIT_5		0x20
 #define B_BIT_6		0x40
 #define B_BIT_7		0x80
 
-/** Debug Macro definition*/
-#ifdef	DEBUG_LEVEL4
-#define	PRINTM_INFO(msg...)	printk(KERN_DEBUG msg)
-#ifndef DEBUG_LEVEL3
-#define	DEBUG_LEVEL3
-#endif
-#else
-#define	PRINTM_INFO(msg...)
-#endif
-
-#ifdef	DEBUG_LEVEL3
-#define	PRINTM_WARN(msg...)	printk(KERN_DEBUG msg)
-#ifndef DEBUG_LEVEL2
-#define	DEBUG_LEVEL2
-#endif
-#else
-#define	PRINTM_WARN(msg...)
-#endif
+extern unsigned int libertas_debug;
 
-#ifdef	DEBUG_LEVEL2
-#define	PRINTM_FATAL(msg...)	printk(KERN_INFO msg)
-#ifndef DEBUG_LEVEL1
-#define	DEBUG_LEVEL1
-#endif
-#else
-#define	PRINTM_FATAL(msg...)
-#endif
-
-#ifdef	DEBUG_LEVEL1
-#define	PRINTM_MSG(msg...)	printk(KERN_ALERT msg)
+/** Debug Macro definition*/
+#ifdef	DEBUG
+#define dprintk(level,format, args...)	if (libertas_debug >= level) printk(KERN_INFO format, ##args)
 #else
-#define	PRINTM_MSG(msg...)
+#define dprintk(format, args...)	do {} while (0)
 #endif
 
-#define	PRINTM(level,msg...)	PRINTM_##level(msg)
-
 #define ASSERT(cond)						\
 do {								\
 	if (!(cond))						\
-		PRINTM(INFO, "ASSERT: %s, %s:%i\n",		\
+		dprintk(1, "ASSERT: %s, %s:%i\n",		\
 		       __FUNCTION__, __FILE__, __LINE__);	\
 } while(0)
-#define	ENTER()			PRINTM(INFO, "Enter: %s, %s:%i\n", __FUNCTION__, \
+#define	ENTER()			dprintk(1, "Enter: %s, %s:%i\n", __FUNCTION__, \
 							__FILE__, __LINE__)
-#define	LEAVE()			PRINTM(INFO, "Leave: %s, %s:%i\n", __FUNCTION__, \
+#define	LEAVE()			dprintk(1, "Leave: %s, %s:%i\n", __FUNCTION__, \
 							__FILE__, __LINE__)
 
 #if defined(DEBUG_LEVEL4) && defined(__KERNEL__)
diff --git a/drivers/net/wireless/libertas/wlan_ethtool.c b/drivers/net/wireless/libertas/wlan_ethtool.c
index 190df69..d13dbc8 100644
--- a/drivers/net/wireless/libertas/wlan_ethtool.c
+++ b/drivers/net/wireless/libertas/wlan_ethtool.c
@@ -61,7 +61,7 @@ static int libertas_ethtool_get_eeprom(s
 
 	/* +14 is for Action, Offset, and NOB in
 	 * response */
-	PRINTM(INFO, "Action:%d Offset: %x NOB: %02x\n",
+	dprintk(1, "Action:%d Offset: %x NOB: %02x\n",
 	       regctrl.Action, regctrl.Offset, regctrl.NOB);
 
 	ret = libertas_prepare_and_send_command(priv,
diff --git a/drivers/net/wireless/libertas/wlan_fw.c b/drivers/net/wireless/libertas/wlan_fw.c
index 20d66ef..e6356ca 100644
--- a/drivers/net/wireless/libertas/wlan_fw.c
+++ b/drivers/net/wireless/libertas/wlan_fw.c
@@ -45,9 +45,11 @@ #include "wlan_fw.h"
 #include "wlan_wext.h"
 
 char *libertas_fw_name = NULL;
-
 module_param_named(fw_name, libertas_fw_name, charp, 0644);
 
+unsigned int libertas_debug = 1;
+module_param(libertas_debug, int, 0);
+
 /** 
  *  @brief This function downloads firmware image, gets
  *  HW spec from firmware and set basic parameters to
@@ -67,9 +69,9 @@ static int wlan_setup_station_hw(wlan_pr
 
 	if ((ret = request_firmware(&priv->firmware, libertas_fw_name,
 				    priv->hotplug_device)) < 0) {
-		PRINTM(FATAL, "request_firmware() failed, error code = %#x\n",
+		printk(KERN_ERR "request_firmware() failed, error code = %#x\n",
 		       ret);
-		PRINTM(FATAL, "%s not found in /lib/firmware\n", libertas_fw_name);
+		printk(KERN_ERR "%s not found in /lib/firmware\n", libertas_fw_name);
 		goto done;
 	}
 
@@ -78,14 +80,14 @@ static int wlan_setup_station_hw(wlan_pr
 	release_firmware(priv->firmware);
 
 	if (ret) {
-		PRINTM(INFO, "Bootloader in invalid state!\n");
+		dprintk(1, "Bootloader in invalid state!\n");
 		ret = WLAN_STATUS_FAILURE;
 		goto done;
 	}
 
 	/* check if the fimware is downloaded successfully or not */
 	if (libertas_sbi_verify_fw_download(priv)) {
-		PRINTM(INFO, "Firmware failed to be active in time!\n");
+		dprintk(1, "Firmware failed to be active in time!\n");
 		ret = WLAN_STATUS_FAILURE;
 		goto done;
 	}
@@ -335,27 +337,27 @@ void libertas_free_adapter(wlan_private 
 	ENTER();
 
 	if (!Adapter) {
-		PRINTM(INFO, "Why double free adapter?:)\n");
+		dprintk(1, "Why double free adapter?:)\n");
 		return;
 	}
 
-	PRINTM(INFO, "Free Command buffer\n");
+	dprintk(1, "Free Command buffer\n");
 	libertas_free_cmd_buffer(priv);
 
-	PRINTM(INFO, "Free CommandTimer\n");
+	dprintk(1, "Free CommandTimer\n");
 	del_timer(&Adapter->command_timer);
 #ifdef REASSOCIATION
-	PRINTM(INFO, "Free reassoc_timer\n");
+	dprintk(1, "Free reassoc_timer\n");
 	del_timer(&Adapter->reassoc_timer);
 #endif				/* REASSOCIATION */
 
-	PRINTM(INFO, "Free ScanTable\n");
+	dprintk(1, "Free ScanTable\n");
 	if (Adapter->ScanTable) {
 		kfree(Adapter->ScanTable);
 		Adapter->ScanTable = NULL;
 	}
 
-	PRINTM(INFO, "Free Adapter\n");
+	dprintk(1, "Free Adapter\n");
 
 	/* Free the adapter object itself */
 	kfree(Adapter);
@@ -379,7 +381,7 @@ static void command_timer_fn(unsigned lo
 
 	ENTER();
 
-	PRINTM(FATAL, "command_timer_fn fired.\n");
+	printk(KERN_INFO "command_timer_fn fired.\n");
 
 	pTempNode = Adapter->CurCmd;
 
@@ -387,7 +389,7 @@ static void command_timer_fn(unsigned lo
 		return;
 
 	if (pTempNode == NULL) {
-		PRINTM(INFO, "PTempnode Empty\n");
+		dprintk(1, "PTempnode Empty\n");
 		return;
 	}
 
@@ -395,7 +397,7 @@ static void command_timer_fn(unsigned lo
 	Adapter->CurCmd = NULL;
 	spin_unlock_irqrestore(&Adapter->driver_lock, flags);
 
-	PRINTM(INFO, "Re-sending same command as it timeout...!\n");
+	dprintk(1, "Re-sending same command as it timeout...!\n");
 	libertas_queue_cmd(Adapter, pTempNode, 0);
 
 	wake_up_interruptible(&priv->MainThread.waitQ);
@@ -419,17 +421,17 @@ void libertas_reassoc_timer_fn(unsigned 
 
 	ENTER();
 
-	PRINTM(INFO, "reassoc_timer fired.\n");
+	dprintk(1, "reassoc_timer fired.\n");
 	if (Adapter->PSState != PS_STATE_FULL_POWER) {
 		/* wait until Exit_PS command returns */
 		mod_timer(&Adapter->reassoc_timer, jiffies + 1*HZ);
-		PRINTM(INFO, "libertas_reassoc_timer_fn(PSState=%d) waiting"
+		dprintk(1, "libertas_reassoc_timer_fn(PSState=%d) waiting"
 		       "for Exit_PS done\n", Adapter->PSState);
 		LEAVE();
 		return;
 	}
 
-	PRINTM(INFO, "Waking Up the Event Thread\n");
+	dprintk(1, "Waking Up the Event Thread\n");
 
 	wake_up_interruptible(&priv->ReassocThread.waitQ);
 
diff --git a/drivers/net/wireless/libertas/wlan_ioctl.c b/drivers/net/wireless/libertas/wlan_ioctl.c
index cd6a4db..88dd680 100644
--- a/drivers/net/wireless/libertas/wlan_ioctl.c
+++ b/drivers/net/wireless/libertas/wlan_ioctl.c
@@ -75,7 +75,7 @@ static int SetRxAntenna(wlan_private * p
 
 	Adapter->RxAntennaMode = Mode;
 
-	PRINTM(INFO, "SET RX Antenna Mode to 0x%04x\n", Adapter->RxAntennaMode);
+	dprintk(1, "SET RX Antenna Mode to 0x%04x\n", Adapter->RxAntennaMode);
 
 	ret = libertas_prepare_and_send_command(priv, HostCmd_CMD_802_11_RF_ANTENNA,
 				    HostCmd_ACT_SET_RX,
@@ -103,7 +103,7 @@ static int SetTxAntenna(wlan_private * p
 
 	Adapter->TxAntennaMode = Mode;
 
-	PRINTM(INFO, "SET TX Antenna Mode to 0x%04x\n", Adapter->TxAntennaMode);
+	dprintk(1, "SET TX Antenna Mode to 0x%04x\n", Adapter->TxAntennaMode);
 
 	ret = libertas_prepare_and_send_command(priv, HostCmd_CMD_802_11_RF_ANTENNA,
 				    HostCmd_ACT_SET_TX,
@@ -140,7 +140,7 @@ static int GetRxAntenna(wlan_private * p
 		return ret;
 	}
 
-	PRINTM(INFO, "Get Rx Antenna Mode:0x%04x\n", Adapter->RxAntennaMode);
+	dprintk(1, "Get Rx Antenna Mode:0x%04x\n", Adapter->RxAntennaMode);
 
 	LEAVE();
 
@@ -174,7 +174,7 @@ static int GetTxAntenna(wlan_private * p
 		return ret;
 	}
 
-	PRINTM(INFO, "Get Tx Antenna Mode:0x%04x\n", Adapter->TxAntennaMode);
+	dprintk(1, "Get Tx Antenna Mode:0x%04x\n", Adapter->TxAntennaMode);
 
 	LEAVE();
 
@@ -205,7 +205,7 @@ static int wlan_set_region(wlan_private 
 
 	// if it's unidentified region code
 	if (i >= MRVDRV_MAX_REGION_CODE) {
-		PRINTM(INFO, "Region Code not identified\n");
+		dprintk(1, "Region Code not identified\n");
 		LEAVE();
 		return WLAN_STATUS_FAILURE;
 	}
@@ -235,16 +235,16 @@ static int wlan_txcontrol(wlan_private *
 	if ((int)wrq->u.data.length == 0) {
 		if (copy_to_user
 		    (wrq->u.data.pointer, &Adapter->PktTxCtrl, sizeof(u32))) {
-			PRINTM(MSG, "copy_to_user failed!\n");
+			printk(KERN_ALERT "copy_to_user failed!\n");
 			return -EFAULT;
 		}
 	} else {
 		if ((int)wrq->u.data.length > 1) {
-			PRINTM(MSG, "ioctl too many args!\n");
+			printk(KERN_ALERT "ioctl too many args!\n");
 			return -EFAULT;
 		}
 		if (copy_from_user(&data, wrq->u.data.pointer, sizeof(int))) {
-			PRINTM(INFO, "Copy from user failed\n");
+			printk(KERN_ALERT "Copy from user failed\n");
 			return -EFAULT;
 		}
 
@@ -274,16 +274,16 @@ static int wlan_null_pkt_interval(wlan_p
 		data = Adapter->NullPktInterval;
 
 		if (copy_to_user(wrq->u.data.pointer, &data, sizeof(int))) {
-			PRINTM(MSG, "copy_to_user failed!\n");
+			printk(KERN_ALERT "copy_to_user failed!\n");
 			return -EFAULT;
 		}
 	} else {
 		if ((int)wrq->u.data.length > 1) {
-			PRINTM(MSG, "ioctl too many args!\n");
+			printk(KERN_ALERT "ioctl too many args!\n");
 			return -EFAULT;
 		}
 		if (copy_from_user(&data, wrq->u.data.pointer, sizeof(int))) {
-			PRINTM(INFO, "Copy from user failed\n");
+			dprintk(1, "Copy from user failed\n");
 			return -EFAULT;
 		}
 
@@ -320,12 +320,12 @@ static int wlan_hostcmd_ioctl(struct net
 	 * Get a free command control node
 	 */
 	if (!(pCmdNode = libertas_get_free_cmd_ctrl_node(priv))) {
-		PRINTM(INFO, "Failed libertas_get_free_cmd_ctrl_node\n");
+		dprintk(1, "Failed libertas_get_free_cmd_ctrl_node\n");
 		return -ENOMEM;
 	}
 
 	if (!(tempResponseBuffer = kmalloc(3000, GFP_KERNEL))) {
-		PRINTM(INFO, "ERROR: Failed to allocate response buffer!\n");
+		dprintk(1, "ERROR: Failed to allocate response buffer!\n");
 		return -ENOMEM;
 	}
 
@@ -343,7 +343,7 @@ static int wlan_hostcmd_ioctl(struct net
 	 * Copy the whole command into the command buffer
 	 */
 	if (copy_from_user(pCmdPtr, req->ifr_data, gencmd->Size)) {
-		PRINTM(INFO, "Copy from user failed\n");
+		dprintk(1, "Copy from user failed\n");
 		kfree(tempResponseBuffer);
 		mutex_unlock(&Adapter->lock);
 		return -EFAULT;
@@ -355,11 +355,11 @@ static int wlan_hostcmd_ioctl(struct net
 	pCmdPtr->SeqNum = ++priv->adapter->SeqNum;
 	pCmdPtr->Result = 0;
 
-	PRINTM(INFO, "HOSTCMD Command: 0x%04x Size: %d SeqNum: %d\n",
+	dprintk(1, "HOSTCMD Command: 0x%04x Size: %d SeqNum: %d\n",
 	       pCmdPtr->Command, pCmdPtr->Size, pCmdPtr->SeqNum);
 	HEXDUMP("Command Data", (u8 *) (pCmdPtr),
 		min_t(u16, 32, pCmdPtr->Size));
-	PRINTM(INFO, "Copying data from : (user)0x%p -> 0x%p(driver)\n",
+	dprintk(1, "Copying data from : (user)0x%p -> 0x%p(driver)\n",
 	       req->ifr_data, pCmdPtr);
 
 	pCmdNode->CmdWaitQWoken = 0;
@@ -378,7 +378,7 @@ static int wlan_hostcmd_ioctl(struct net
 	pCmdPtr = (struct HostCmd_DS_GEN *)tempResponseBuffer;
 
 	if (copy_to_user(req->ifr_data, tempResponseBuffer, pCmdPtr->Size))
-		PRINTM(INFO, "ERROR: copy_to_user failed!\n");
+		dprintk(1, "ERROR: copy_to_user failed!\n");
 
 	kfree(tempResponseBuffer);
 
@@ -401,7 +401,7 @@ static int wlan_get_rxinfo(wlan_private 
 	data[0] = Adapter->SNR[TYPE_RXPD][TYPE_NOAVG];
 	data[1] = Adapter->RxPDRate;
 	if (copy_to_user(wrq->u.data.pointer, data, sizeof(int) * 2)) {
-		PRINTM(INFO, "Copy to user failed\n");
+		dprintk(1, "Copy to user failed\n");
 		return -EFAULT;
 	}
 	wrq->u.data.length = 2;
@@ -428,7 +428,7 @@ static int wlan_get_snr(wlan_private * p
 		if (copy_from_user
 		    (data, wrq->u.data.pointer,
 		     min_t(size_t, wrq->u.data.length, 4) * sizeof(int))) {
-			PRINTM(INFO, "Copy from user failed\n");
+			dprintk(1, "Copy from user failed\n");
 			return -EFAULT;
 		}
 	}
@@ -453,35 +453,35 @@ static int wlan_get_snr(wlan_private * p
 		data[2] = Adapter->SNR[TYPE_RXPD][TYPE_NOAVG];
 		data[3] = Adapter->SNR[TYPE_RXPD][TYPE_AVG] / AVG_SCALE;
 		if (copy_to_user(wrq->u.data.pointer, data, sizeof(int) * 4)) {
-			PRINTM(INFO, "Copy to user failed\n");
+			dprintk(1, "Copy to user failed\n");
 			return -EFAULT;
 		}
 		wrq->u.data.length = 4;
 	} else if (data[0] == 0) {
 		data[0] = Adapter->SNR[TYPE_BEACON][TYPE_NOAVG];
 		if (copy_to_user(wrq->u.data.pointer, data, sizeof(int))) {
-			PRINTM(INFO, "Copy to user failed\n");
+			dprintk(1, "Copy to user failed\n");
 			return -EFAULT;
 		}
 		wrq->u.data.length = 1;
 	} else if (data[0] == 1) {
 		data[0] = Adapter->SNR[TYPE_BEACON][TYPE_AVG];
 		if (copy_to_user(wrq->u.data.pointer, data, sizeof(int))) {
-			PRINTM(INFO, "Copy to user failed\n");
+			dprintk(1, "Copy to user failed\n");
 			return -EFAULT;
 		}
 		wrq->u.data.length = 1;
 	} else if (data[0] == 2) {
 		data[0] = Adapter->SNR[TYPE_RXPD][TYPE_NOAVG];
 		if (copy_to_user(wrq->u.data.pointer, data, sizeof(int))) {
-			PRINTM(INFO, "Copy to user failed\n");
+			dprintk(1, "Copy to user failed\n");
 			return -EFAULT;
 		}
 		wrq->u.data.length = 1;
 	} else if (data[0] == 3) {
 		data[0] = Adapter->SNR[TYPE_RXPD][TYPE_AVG] / AVG_SCALE;
 		if (copy_to_user(wrq->u.data.pointer, data, sizeof(int))) {
-			PRINTM(INFO, "Copy to user failed\n");
+			dprintk(1, "Copy to user failed\n");
 			return -EFAULT;
 		}
 		wrq->u.data.length = 1;
@@ -509,11 +509,11 @@ static int wlan_beacon_interval(wlan_pri
 
 	if (wrq->u.data.length > 0) {
 		if (copy_from_user(&data, wrq->u.data.pointer, sizeof(int))) {
-			PRINTM(INFO, "Copy from user failed\n");
+			dprintk(1, "Copy from user failed\n");
 			return -EFAULT;
 		}
 
-		PRINTM(INFO, "WLAN SET BEACON INTERVAL: %d\n", data);
+		dprintk(1, "WLAN SET BEACON INTERVAL: %d\n", data);
 		if ((data > MRVDRV_MAX_BEACON_INTERVAL)
 		    || (data < MRVDRV_MIN_BEACON_INTERVAL))
 			return -ENOTSUPP;
@@ -521,7 +521,7 @@ static int wlan_beacon_interval(wlan_pri
 	}
 	data = Adapter->BeaconPeriod;
 	if (copy_to_user(wrq->u.data.pointer, &data, sizeof(int))) {
-		PRINTM(INFO, "Copy to user failed\n");
+		dprintk(1, "Copy to user failed\n");
 		return -EFAULT;
 	}
 
@@ -635,7 +635,7 @@ static int wlan_get_nf(wlan_private * pr
 
 	temp = CAL_NF(temp);
 
-	PRINTM(INFO, "***temp = %d\n", temp);
+	dprintk(1, "***temp = %d\n", temp);
 	val = (int *)wrq->u.name;
 	*val = temp;
 	LEAVE();
@@ -657,7 +657,7 @@ static int wlan_get_txrate_ioctl(wlan_pr
 	int ret = WLAN_STATUS_SUCCESS;
 	ENTER();
 	Adapter->TxRate = 0;
-	PRINTM(INFO, "wlan_get_txrate_ioctl\n");
+	dprintk(1, "wlan_get_txrate_ioctl\n");
 	ret = libertas_prepare_and_send_command(priv, HostCmd_CMD_802_11_TX_RATE_QUERY,
 				    HostCmd_ACT_GET, HostCmd_OPTION_WAITFORRSP,
 				    0, NULL);
@@ -704,7 +704,7 @@ static int wlan_get_adhoc_status_ioctl(w
 		break;
 	}
 
-	PRINTM(INFO, "Status = %s\n", status);
+	dprintk(1, "Status = %s\n", status);
 	wrq->u.data.length = strlen(status) + 1;
 
 	if (wrq->u.data.pointer) {
@@ -734,7 +734,7 @@ static int wlan_regrdwr_ioctl(wlan_priva
 	ENTER();
 
 	if (copy_from_user(&regrdwr, req->ifr_data, sizeof(regrdwr))) {
-		PRINTM(INFO,
+		dprintk(1,
 		       "copy of regrdwr for wlan_regrdwr_ioctl from user failed \n");
 		LEAVE();
 		return -EFAULT;
@@ -743,7 +743,7 @@ static int wlan_regrdwr_ioctl(wlan_priva
 	offval.offset = regrdwr.Offset;
 	offval.value = (regrdwr.Action) ? regrdwr.Value : 0x00;
 
-	PRINTM(INFO, "RegAccess: %02x Action:%d "
+	dprintk(1, "RegAccess: %02x Action:%d "
 	       "Offset: %04x Value: %04x\n",
 	       regrdwr.WhichReg, regrdwr.Action, offval.offset, offval.value);
 
@@ -771,7 +771,7 @@ static int wlan_regrdwr_ioctl(wlan_priva
 	regrdwr.Value = Adapter->OffsetValue.value;
 	if (regrdwr.Action == HostCmd_ACT_GEN_READ) {
 		if (copy_to_user(req->ifr_data, &regrdwr, sizeof(regrdwr))) {
-			PRINTM(INFO,
+			dprintk(1,
 			       "copy of regrdwr for wlan_regrdwr_ioctl to user failed \n");
 			LEAVE();
 			return -EFAULT;
@@ -798,16 +798,16 @@ static int wlan_setwpaie_ioctl(wlan_priv
 
 	if (wrq->u.data.length) {
 		if (wrq->u.data.length > sizeof(Adapter->Wpa_ie)) {
-			PRINTM(INFO, "failed to copy WPA IE, too big \n");
+			dprintk(1, "failed to copy WPA IE, too big \n");
 			return -EFAULT;
 		}
 		if (copy_from_user(Adapter->Wpa_ie, wrq->u.data.pointer,
 				   wrq->u.data.length)) {
-			PRINTM(INFO, "failed to copy WPA IE \n");
+			dprintk(1, "failed to copy WPA IE \n");
 			return -EFAULT;
 		}
 		Adapter->Wpa_ie_len = wrq->u.data.length;
-		PRINTM(INFO, "Set Wpa_ie_len=%d IE=%#x\n", Adapter->Wpa_ie_len,
+		dprintk(1, "Set Wpa_ie_len=%d IE=%#x\n", Adapter->Wpa_ie_len,
 		       Adapter->Wpa_ie[0]);
 		HEXDUMP("Wpa_ie", Adapter->Wpa_ie, Adapter->Wpa_ie_len);
 		if (Adapter->Wpa_ie[0] == WPA_IE)
@@ -821,7 +821,7 @@ static int wlan_setwpaie_ioctl(wlan_priv
 	} else {
 		memset(Adapter->Wpa_ie, 0, sizeof(Adapter->Wpa_ie));
 		Adapter->Wpa_ie_len = wrq->u.data.length;
-		PRINTM(INFO, "Reset Wpa_ie_len=%d IE=%#x\n",
+		dprintk(1, "Reset Wpa_ie_len=%d IE=%#x\n",
 		       Adapter->Wpa_ie_len, Adapter->Wpa_ie[0]);
 		Adapter->SecInfo.WPAEnabled = 0;
 		Adapter->SecInfo.WPA2Enabled = 0;
@@ -852,7 +852,7 @@ static int wlan_subcmd_setprescan_ioctl(
 	ENTER();
 
 	data = *((int *)(wrq->u.name + SUBCMD_OFFSET));
-	PRINTM(INFO, "WLAN_SUBCMD_SET_PRESCAN %d\n", data);
+	dprintk(1, "WLAN_SUBCMD_SET_PRESCAN %d\n", data);
 	switch (data) {
 	case CMD_ENABLED:
 		Adapter->Prescan = 1;
@@ -895,7 +895,7 @@ static int wlan_set_multiple_dtim_ioctl(
 		ret = WLAN_STATUS_SUCCESS;
 	}
 	if (ret)
-		PRINTM(INFO, "Invalid parameter, MultipleDtim not changed.\n");
+		dprintk(1, "Invalid parameter, MultipleDtim not changed.\n");
 
 	LEAVE();
 	return ret;
@@ -921,12 +921,12 @@ static int wlan_setauthalg_ioctl(wlan_pr
 	} else {
 		//from wpa_supplicant subcmd
 		if (copy_from_user(&alg, wrq->u.data.pointer, sizeof(alg))) {
-			PRINTM(INFO, "Copy from user failed\n");
+			dprintk(1, "Copy from user failed\n");
 			return -EFAULT;
 		}
 	}
 
-	PRINTM(INFO, "auth alg is %#x\n", alg);
+	dprintk(1, "auth alg is %#x\n", alg);
 
 	switch (alg) {
 	case AUTH_ALG_SHARED_KEY:
@@ -965,11 +965,11 @@ static int wlan_set8021xauthalg_ioctl(wl
 	} else {
 		//from wpa_supplicant subcmd
 		if (copy_from_user(&alg, wrq->u.data.pointer, sizeof(int))) {
-			PRINTM(INFO, "Copy from user failed\n");
+			dprintk(1, "Copy from user failed\n");
 			return -EFAULT;
 		}
 	}
-	PRINTM(INFO, "802.1x auth alg is %#x\n", alg);
+	dprintk(1, "802.1x auth alg is %#x\n", alg);
 	priv->adapter->SecInfo.Auth1XAlg = alg;
 
 	LEAVE();
@@ -995,11 +995,11 @@ static int wlan_setencryptionmode_ioctl(
 	} else {
 		//from wpa_supplicant subcmd
 		if (copy_from_user(&mode, wrq->u.data.pointer, sizeof(int))) {
-			PRINTM(INFO, "Copy from user failed\n");
+			dprintk(1, "Copy from user failed\n");
 			return -EFAULT;
 		}
 	}
-	PRINTM(INFO, "encryption mode is %#x\n", mode);
+	dprintk(1, "encryption mode is %#x\n", mode);
 	priv->adapter->SecInfo.EncryptionMode = mode;
 
 	LEAVE();
@@ -1043,12 +1043,12 @@ static int wlan_set_linkmode_ioctl(wlan_
 		priv->adapter->linkmode = mode;
 		break;
 	default:
-		PRINTM(FATAL, "usb8388-5: invalid link-layer mode (%#x)\n",
+		printk(KERN_INFO "usb8388-5: invalid link-layer mode (%#x)\n",
 		       mode);
 		return WLAN_STATUS_NOT_ACCEPTED;
 		break;
 	}
-	PRINTM(INFO, "usb8388-5: link-layer mode is %#x\n", mode);
+	dprintk(1, "usb8388-5: link-layer mode is %#x\n", mode);
 
 	adjust_mtu(priv);
 
@@ -1078,12 +1078,12 @@ static int wlan_set_radiomode_ioctl(wlan
 		priv->adapter->radiomode = mode;
 		break;
 	default:
-		PRINTM(INFO, "usb8388-5: invalid radio header mode (%#x)\n",
+		dprintk(1, "usb8388-5: invalid radio header mode (%#x)\n",
 		       mode);
 		return WLAN_STATUS_NOT_ACCEPTED;
 		break;
 	}
-	PRINTM(INFO, "usb8388-5: radio-header mode is %#x\n", mode);
+	dprintk(1, "usb8388-5: radio-header mode is %#x\n", mode);
 
 	adjust_mtu(priv);
 
@@ -1121,13 +1121,13 @@ static int wlan_subcmd_getrxantenna_ioct
 
 	ENTER();
 
-	PRINTM(INFO, "WLAN_SUBCMD_GETRXANTENNA\n");
+	dprintk(1, "WLAN_SUBCMD_GETRXANTENNA\n");
 	len = GetRxAntenna(priv, buf);
 
 	wrq->u.data.length = len;
 	if (wrq->u.data.pointer) {
 		if (copy_to_user(wrq->u.data.pointer, &buf, len)) {
-			PRINTM(INFO, "CopyToUser failed\n");
+			dprintk(1, "CopyToUser failed\n");
 			return -EFAULT;
 		}
 	}
@@ -1151,13 +1151,13 @@ static int wlan_subcmd_gettxantenna_ioct
 
 	ENTER();
 
-	PRINTM(INFO, "WLAN_SUBCMD_GETTXANTENNA\n");
+	dprintk(1, "WLAN_SUBCMD_GETTXANTENNA\n");
 	len = GetTxAntenna(priv, buf);
 
 	wrq->u.data.length = len;
 	if (wrq->u.data.pointer) {
 		if (copy_to_user(wrq->u.data.pointer, &buf, len)) {
-			PRINTM(INFO, "CopyToUser failed\n");
+			dprintk(1, "CopyToUser failed\n");
 			return -EFAULT;
 		}
 	}
@@ -1186,10 +1186,10 @@ static int wlan_get_tsf_ioctl(wlan_priva
 				    HostCmd_CMD_GET_TSF,
 				    0, HostCmd_OPTION_WAITFORRSP, 0, &tsfVal);
 
-	PRINTM(INFO, "IOCTL: Get TSF = 0x%016llx\n", tsfVal);
+	dprintk(1, "IOCTL: Get TSF = 0x%016llx\n", tsfVal);
 
 	if (ret != WLAN_STATUS_SUCCESS) {
-		PRINTM(INFO, "IOCTL: Get TSF; Command exec failed\n");
+		dprintk(1, "IOCTL: Get TSF; Command exec failed\n");
 		ret = -EFAULT;
 	} else {
 		if (copy_to_user(wrq->u.data.pointer,
@@ -1197,7 +1197,7 @@ static int wlan_get_tsf_ioctl(wlan_priva
 				 min_t(size_t, wrq->u.data.length,
 				     sizeof(tsfVal))) != 0) {
 
-			PRINTM(INFO, "IOCTL: Get TSF; Copy to user failed\n");
+			dprintk(1, "IOCTL: Get TSF; Copy to user failed\n");
 			ret = -EFAULT;
 		} else {
 			ret = 0;
@@ -1234,7 +1234,7 @@ static int wlan_sleep_period(wlan_privat
 		sleeppd.Action = wlan_cpu_to_le16(HostCmd_ACT_GEN_GET);
 	} else {
 		if (copy_from_user(&data, wrq->u.data.pointer, sizeof(int))) {
-			PRINTM(INFO, "Copy from user failed\n");
+			dprintk(1, "Copy from user failed\n");
 			return -EFAULT;
 		}
 
@@ -1252,7 +1252,7 @@ static int wlan_sleep_period(wlan_privat
 
 	data = (int)Adapter->sleep_period.period;
 	if (copy_to_user(wrq->u.data.pointer, &data, sizeof(int))) {
-		PRINTM(INFO, "Copy to user failed\n");
+		dprintk(1, "Copy to user failed\n");
 		return -EFAULT;
 	}
 	wrq->u.data.length = 1;
@@ -1276,7 +1276,7 @@ static int wlan_adapt_rateset(wlan_priva
 	ENTER();
 	memset(data, 0, sizeof(data));
 	if (!wrq->u.data.length) {
-		PRINTM(INFO, "Get ADAPT RATE SET\n");
+		dprintk(1, "Get ADAPT RATE SET\n");
 		ret = libertas_prepare_and_send_command(priv,
 					    HostCmd_CMD_802_11_RATE_ADAPT_RATESET,
 					    HostCmd_ACT_GEN_GET,
@@ -1284,19 +1284,19 @@ static int wlan_adapt_rateset(wlan_priva
 		data[0] = Adapter->EnableHwAuto;
 		data[1] = Adapter->RateBitmap;
 		if (copy_to_user(wrq->u.data.pointer, data, sizeof(int) * 2)) {
-			PRINTM(INFO, "Copy to user failed\n");
+			dprintk(1, "Copy to user failed\n");
 			return -EFAULT;
 		}
 #define GET_TWO_INT	2
 		wrq->u.data.length = GET_TWO_INT;
 	} else {
-		PRINTM(INFO, "Set ADAPT RATE SET\n");
+		dprintk(1, "Set ADAPT RATE SET\n");
 		if (wrq->u.data.length > 2)
 			return -EINVAL;
 		if (copy_from_user
 		    (data, wrq->u.data.pointer,
 		     sizeof(int) * wrq->u.data.length)) {
-			PRINTM(INFO, "Copy from user failed\n");
+			dprintk(1, "Copy from user failed\n");
 			return -EFAULT;
 		}
 
@@ -1337,13 +1337,13 @@ static int wlan_inactivity_timeout(wlan_
 					    &timeout);
 		data = timeout;
 		if (copy_to_user(wrq->u.data.pointer, &data, sizeof(int))) {
-			PRINTM(INFO, "Copy to user failed\n");
+			dprintk(1, "Copy to user failed\n");
 			return -EFAULT;
 		}
 	} else {
 		/* Set */
 		if (copy_from_user(&data, wrq->u.data.pointer, sizeof(int))) {
-			PRINTM(INFO, "Copy from user failed\n");
+			dprintk(1, "Copy from user failed\n");
 			return -EFAULT;
 		}
 
@@ -1375,7 +1375,7 @@ static int wlan_do_getlog_ioctl(wlan_pri
 
 	ENTER();
 
-	PRINTM(INFO, " GET STATS\n");
+	dprintk(1, " GET STATS\n");
 
 	ret = libertas_prepare_and_send_command(priv, HostCmd_CMD_802_11_GET_LOG,
 				    0, HostCmd_OPTION_WAITFORRSP, 0, NULL);
@@ -1406,7 +1406,7 @@ static int wlan_do_getlog_ioctl(wlan_pri
 			Adapter->LogMsg.wepundecryptable);
 		wrq->u.data.length = strlen(buf) + 1;
 		if (copy_to_user(wrq->u.data.pointer, buf, wrq->u.data.length)) {
-			PRINTM(INFO, "Copy to user failed\n");
+			dprintk(1, "Copy to user failed\n");
 			return -EFAULT;
 		}
 	}
@@ -1433,7 +1433,7 @@ static int wlan_sleep_params_ioctl(wlan_
 
 	if (copy_from_user(&sp, wrq->u.data.pointer,
 			   min_t(size_t, sizeof(sp), wrq->u.data.length))) {
-		PRINTM(INFO, "Copy from user failed\n");
+		dprintk(1, "Copy from user failed\n");
 		return -EFAULT;
 	}
 
@@ -1446,7 +1446,7 @@ static int wlan_sleep_params_ioctl(wlan_
 	if (!ret && !sp.Action && wrq->u.data.pointer) {
 		memcpy(&sp.Error, &Adapter->sp, sizeof(struct sleep_params));
 		if (copy_to_user(wrq->u.data.pointer, &sp, sizeof(sp))) {
-			PRINTM(INFO, "Copy to user failed\n");
+			dprintk(1, "Copy to user failed\n");
 			return -EFAULT;
 		}
 		wrq->u.data.length = sizeof(sp);
@@ -1473,7 +1473,7 @@ static int wlan_do_getcis_ioctl(wlan_pri
 	if (wrq->u.data.pointer) {
 		if (copy_to_user(wrq->u.data.pointer, Adapter->CisInfoBuf,
 				 Adapter->CisInfoLen)) {
-			PRINTM(INFO, "Copy to user failed\n");
+			dprintk(1, "Copy to user failed\n");
 			return -EFAULT;
 		}
 		wrq->u.data.length = Adapter->CisInfoLen;
@@ -1501,7 +1501,7 @@ static int wlan_scan_type_ioctl(wlan_pri
 	ENTER();
 
 	if (libertas_get_state_11d(priv) == ENABLE_11D) {
-		PRINTM(INFO, "11D: Cannot set scantype when 11D enabled\n");
+		dprintk(1, "11D: Cannot set scantype when 11D enabled\n");
 		return -EFAULT;
 	}
 
@@ -1509,11 +1509,11 @@ static int wlan_scan_type_ioctl(wlan_pri
 
 	if (copy_from_user(buf, wrq->u.data.pointer, min_t(size_t, sizeof(buf),
 							 wrq->u.data.length))) {
-		PRINTM(INFO, "Copy from user failed\n");
+		dprintk(1, "Copy from user failed\n");
 		return -EFAULT;
 	}
 
-	PRINTM(INFO, "Scan Type Option = %s\n", buf);
+	dprintk(1, "Scan Type Option = %s\n", buf);
 
 	buf[sizeof(buf) - 1] = '\0';
 
@@ -1535,13 +1535,13 @@ static int wlan_scan_type_ioctl(wlan_pri
 		if (copy_to_user(wrq->u.data.pointer,
 				 option[Adapter->ScanType],
 				 wrq->u.data.length)) {
-			PRINTM(INFO, "Copy to user failed\n");
+			dprintk(1, "Copy to user failed\n");
 			ret = -EFAULT;
 		}
 
 		break;
 	default:
-		PRINTM(INFO, "Invalid Scan Type Ioctl Option\n");
+		dprintk(1, "Invalid Scan Type Ioctl Option\n");
 		ret = -EINVAL;
 		break;
 	}
@@ -1571,11 +1571,11 @@ static int wlan_scan_mode_ioctl(wlan_pri
 
 	if (copy_from_user(buf, wrq->u.data.pointer, min_t(size_t, sizeof(buf),
 							 wrq->u.data.length))) {
-		PRINTM(INFO, "Copy from user failed\n");
+		dprintk(1, "Copy from user failed\n");
 		return -EFAULT;
 	}
 
-	PRINTM(INFO, "Scan Mode Option = %s\n", buf);
+	dprintk(1, "Scan Mode Option = %s\n", buf);
 
 	buf[sizeof(buf) - 1] = '\0';
 
@@ -1599,24 +1599,24 @@ static int wlan_scan_mode_ioctl(wlan_pri
 
 		wrq->u.data.length = strlen(option[Adapter->ScanMode - 1]) + 1;
 
-		PRINTM(INFO, "Get Scan Mode Option = %s\n",
+		dprintk(1, "Get Scan Mode Option = %s\n",
 		       option[Adapter->ScanMode - 1]);
 
-		PRINTM(INFO, "Scan Mode Length %d\n", wrq->u.data.length);
+		dprintk(1, "Scan Mode Length %d\n", wrq->u.data.length);
 
 		if (copy_to_user(wrq->u.data.pointer,
 				 option[Adapter->ScanMode - 1],
 				 wrq->u.data.length)) {
-			PRINTM(INFO, "Copy to user failed\n");
+			dprintk(1, "Copy to user failed\n");
 			ret = -EFAULT;
 		}
-		PRINTM(INFO, "GET Scan Type Option after copy = %s\n",
+		dprintk(1, "GET Scan Type Option after copy = %s\n",
 		       (char *)wrq->u.data.pointer);
 
 		break;
 
 	default:
-		PRINTM(INFO, "Invalid Scan Mode Ioctl Option\n");
+		dprintk(1, "Invalid Scan Mode Ioctl Option\n");
 		ret = -EINVAL;
 		break;
 	}
@@ -1739,21 +1739,21 @@ #define ethaddr2 (ethaddrs+6)
 		return -EFAULT;
 
 	if ((pos = eth_str2addr(ethaddrs_str, ethaddr1)) == NULL) {
-		PRINTM(FATAL, "DFT_ADD: Invalid MAC address 1\n");
+		printk(KERN_INFO "DFT_ADD: Invalid MAC address 1\n");
 		return -EINVAL;
 	}
 
 	if (eth_str2addr(pos, ethaddr2) == NULL) {
-		PRINTM(FATAL, "DFT_ADD: Invalid MAC address 2\n");
+		printk(KERN_INFO "DFT_ADD: Invalid MAC address 2\n");
 		return -EINVAL;
 	}
 #ifdef DEBUG_LEVEL4
 	{
 		char ethaddr1_str[18], ethaddr2_str[18];
-		PRINTM(INFO, "DFT: adding %s\n", ethaddrs_str);
+		dprintk(1, "DFT: adding %s\n", ethaddrs_str);
 		eth_addr2str(ethaddr1, ethaddr1_str);
 		eth_addr2str(ethaddr2, ethaddr2_str);
-		PRINTM(INFO, "DFT: adding (%s,%s)\n", ethaddr1_str,
+		dprintk(1, "DFT: adding (%s,%s)\n", ethaddr1_str,
 		       ethaddr2_str);
 	}
 #endif
@@ -1783,11 +1783,11 @@ static int wlan_dft_del_ioctl(wlan_priva
 		return -EFAULT;
 
 	if ((pos = eth_str2addr(ethaddrs_str, ethaddr)) == NULL) {
-		PRINTM(FATAL, "Invalid MAC address\n");
+		printk(KERN_INFO "Invalid MAC address\n");
 		return -EINVAL;
 	}
 
-	PRINTM(INFO, "DFT: deleting %s\n", ethaddrs_str);
+	dprintk(1, "DFT: deleting %s\n", ethaddrs_str);
 
 	LEAVE();
 	return (libertas_prepare_and_send_command(priv,
@@ -1805,7 +1805,7 @@ static int wlan_dft_reset_ioctl(wlan_pri
 {
 	ENTER();
 
-	PRINTM(MSG, "DFT: resetting\n");
+	printk(KERN_ALERT "DFT: resetting\n");
 
 	LEAVE();
 	return (libertas_prepare_and_send_command(priv,
@@ -1837,7 +1837,7 @@ static int wlan_dft_list_ioctl(wlan_priv
 	ENTER();
 
 	if (copy_from_user(outstr, wrq->u.data.pointer, sizeof(outstr))) {
-		PRINTM(INFO, "Copy from user failed\n");
+		dprintk(1, "Copy from user failed\n");
 		return WLAN_STATUS_FAILURE;
 	}
 	param.id = simple_strtoul(outstr, NULL, 10);
@@ -1868,7 +1868,7 @@ static int wlan_dft_list_ioctl(wlan_priv
 	wrq->u.data.length = strlen(outstr);
 	if (copy_to_user(wrq->u.data.pointer, (char *)outstr,
 			 wrq->u.data.length)) {
-		PRINTM(INFO, "DFT_LIST: Copy to user failed!\n");
+		dprintk(1, "DFT_LIST: Copy to user failed!\n");
 		return -EFAULT;
 	}
 
@@ -1895,11 +1895,11 @@ static int wlan_bt_add_ioctl(wlan_privat
 		return -EFAULT;
 
 	if ((pos = eth_str2addr(ethaddrs_str, ethaddr)) == NULL) {
-		PRINTM(FATAL, "BT_ADD: Invalid MAC address\n");
+		printk(KERN_INFO "BT_ADD: Invalid MAC address\n");
 		return -EINVAL;
 	}
 
-	PRINTM(INFO, "BT: adding %s\n", ethaddrs_str);
+	dprintk(1, "BT: adding %s\n", ethaddrs_str);
 	LEAVE();
 	return (libertas_prepare_and_send_command(priv, HostCmd_CMD_DFT_ACCESS,
 				      HostCmd_ACT_BT_ACCESS_ADD,
@@ -1925,11 +1925,11 @@ static int wlan_bt_del_ioctl(wlan_privat
 		return -EFAULT;
 
 	if ((pos = eth_str2addr(ethaddrs_str, ethaddr)) == NULL) {
-		PRINTM(FATAL, "Invalid MAC address\n");
+		printk(KERN_INFO "Invalid MAC address\n");
 		return -EINVAL;
 	}
 
-	PRINTM(INFO, "BT: deleting %s\n", ethaddrs_str);
+	dprintk(1, "BT: deleting %s\n", ethaddrs_str);
 
 	return (libertas_prepare_and_send_command(priv,
 				      HostCmd_CMD_DFT_ACCESS,
@@ -1948,7 +1948,7 @@ static int wlan_bt_reset_ioctl(wlan_priv
 {
 	ENTER();
 
-	PRINTM(MSG, "BT: resetting\n");
+	printk(KERN_ALERT "BT: resetting\n");
 
 	return (libertas_prepare_and_send_command(priv,
 				      HostCmd_CMD_DFT_ACCESS,
@@ -1982,7 +1982,7 @@ static int wlan_bt_list_ioctl(wlan_priva
 	ENTER();
 
 	if (copy_from_user(outstr, wrq->u.data.pointer, sizeof(outstr))) {
-		PRINTM(INFO, "Copy from user failed\n");
+		dprintk(1, "Copy from user failed\n");
 		return WLAN_STATUS_FAILURE;
 	}
 	param.id = simple_strtoul(outstr, NULL, 10);
@@ -2009,7 +2009,7 @@ static int wlan_bt_list_ioctl(wlan_priva
 	wrq->u.data.length = strlen(outstr);
 	if (copy_to_user(wrq->u.data.pointer, (char *)outstr,
 			 wrq->u.data.length)) {
-		PRINTM(INFO, "BT_LIST: Copy to user failed!\n");
+		dprintk(1, "BT_LIST: Copy to user failed!\n");
 		return -EFAULT;
 	}
 
@@ -2077,7 +2077,7 @@ int libertas_do_ioctl(struct net_device 
 
 	ENTER();
 
-	PRINTM(INFO, "libertas_do_ioctl: ioctl cmd = 0x%x\n", cmd);
+	dprintk(1, "libertas_do_ioctl: ioctl cmd = 0x%x\n", cmd);
 	switch (cmd) {
 	case WLANEXTSCAN:
 		ret = libertas_extscan_ioctl(priv, req);
@@ -2091,7 +2091,7 @@ int libertas_do_ioctl(struct net_device 
 		break;
 
 	case WLANSCAN_TYPE:
-		PRINTM(INFO, "Scan Type Ioctl\n");
+		dprintk(1, "Scan Type Ioctl\n");
 		ret = wlan_scan_type_ioctl(priv, wrq);
 		break;
 
@@ -2109,12 +2109,12 @@ int libertas_do_ioctl(struct net_device 
 	case WLAN_SETNONE_GETNONE:	/* set WPA mode on/off ioctl #20 */
 		switch (wrq->u.data.flags) {
 		case WLANDEAUTH:
-			PRINTM(INFO, "Deauth\n");
+			dprintk(1, "Deauth\n");
 			libertas_send_deauth(priv);
 			break;
 
 		case WLANADHOCSTOP:
-			PRINTM(INFO, "Adhoc stop\n");
+			dprintk(1, "Adhoc stop\n");
 			ret = libertas_do_adhocstop_ioctl(priv);
 			break;
 
@@ -2189,12 +2189,12 @@ #endif				/* REASSOCIATION */
 		case WLAN_LISTENINTRVL:
 			if (!wrq->u.data.length) {
 				int data;
-				PRINTM(INFO, "Get LocalListenInterval Value\n");
+				dprintk(1, "Get LocalListenInterval Value\n");
 #define GET_ONE_INT	1
 				data = Adapter->LocalListenInterval;
 				if (copy_to_user(wrq->u.data.pointer,
 						 &data, sizeof(int))) {
-					PRINTM(INFO, "Copy to user failed\n");
+					dprintk(1, "Copy to user failed\n");
 					return -EFAULT;
 				}
 
@@ -2203,15 +2203,15 @@ #define GET_ONE_INT	1
 				int data;
 				if (copy_from_user
 				    (&data, wrq->u.data.pointer, sizeof(int))) {
-					PRINTM(INFO, "Copy from user failed\n");
+					dprintk(1, "Copy from user failed\n");
 					return -EFAULT;
 				}
 
-				PRINTM(INFO, "Set LocalListenInterval = %d\n",
+				dprintk(1, "Set LocalListenInterval = %d\n",
 				       data);
 #define MAX_U16_VAL	65535
 				if (data > MAX_U16_VAL) {
-					PRINTM(INFO, "Exceeds U16 value\n");
+					dprintk(1, "Exceeds U16 value\n");
 					return -EINVAL;
 				}
 				Adapter->LocalListenInterval = data;
@@ -2348,7 +2348,7 @@ #define MAX_U16_VAL	65535
 			break;
 
 		case WLANSCAN_MODE:
-			PRINTM(INFO, "Scan Mode Ioctl\n");
+			dprintk(1, "Scan Mode Ioctl\n");
 			ret = wlan_scan_mode_ioctl(priv, wrq);
 			break;
 
@@ -2377,7 +2377,7 @@ #define MAX_U16_VAL	65535
 		break;
 
 	case WLAN_SETCONF_GETCONF:
-		PRINTM(INFO, "The WLAN_SETCONF_GETCONF=0x%x is %d\n",
+		dprintk(1, "The WLAN_SETCONF_GETCONF=0x%x is %d\n",
 		       WLAN_SETCONF_GETCONF, *(u8 *) req->ifr_data);
 		switch (*(u8 *) req->ifr_data) {
 
@@ -2461,7 +2461,7 @@ #define MAX_U16_VAL	65535
 					if (copy_from_user
 					    (data, wrq->u.data.pointer,
 					     sizeof(int) * 5)) {
-						PRINTM(INFO,
+						dprintk(1,
 						       "Copy from user failed\n");
 						return -EFAULT;
 					}
@@ -2491,7 +2491,7 @@ #define MAX_U16_VAL	65535
 				if (copy_to_user
 				    (wrq->u.data.pointer, data,
 				     sizeof(int) * 5)) {
-					PRINTM(INFO, "Copy to user failed\n");
+					dprintk(1, "Copy to user failed\n");
 					return -EFAULT;
 				}
 
@@ -2515,7 +2515,7 @@ #define MAX_U16_VAL	65535
 					if (copy_from_user
 					    (data, wrq->u.data.pointer,
 					     sizeof(int) * 4)) {
-						PRINTM(INFO,
+						dprintk(1,
 						       "Copy from user failed\n");
 						return -EFAULT;
 					}
@@ -2541,7 +2541,7 @@ #define MAX_U16_VAL	65535
 				if (copy_to_user
 				    (wrq->u.data.pointer, data,
 				     sizeof(int) * 4)) {
-					PRINTM(INFO, "Copy to user failed\n");
+					dprintk(1, "Copy to user failed\n");
 					return -EFAULT;
 				}
 
@@ -2558,7 +2558,7 @@ #define MAX_U16_VAL	65535
 				if (copy_from_user
 				    (data, wrq->u.data.pointer,
 				     sizeof(int) * 3)) {
-					PRINTM(INFO, "Copy from user failed\n");
+					dprintk(1, "Copy from user failed\n");
 					return -EFAULT;
 				}
 				afc.afc_auto = data[0];
@@ -2595,7 +2595,7 @@ #define MAX_U16_VAL	65535
 				if (copy_to_user
 				    (wrq->u.data.pointer, data,
 				     sizeof(int) * 3)) {
-					PRINTM(INFO, "Copy to user failed\n");
+					dprintk(1, "Copy to user failed\n");
 					return -EFAULT;
 				}
 
@@ -2609,7 +2609,7 @@ #define MAX_U16_VAL	65535
 					if (copy_from_user
 					    (&data, wrq->u.data.pointer,
 					     sizeof(int))) {
-						PRINTM(INFO,
+						dprintk(1,
 						       "Copy from user failed\n");
 						return -EFAULT;
 					}
@@ -2620,7 +2620,7 @@ #define MAX_U16_VAL	65535
 					if (copy_to_user
 					    (wrq->u.data.pointer, &data,
 					     sizeof(int))) {
-						PRINTM(INFO,
+						dprintk(1,
 						       "Copy to user failed\n");
 						return -EFAULT;
 					}
@@ -2651,7 +2651,7 @@ #define MAX_U16_VAL	65535
 					    (data, wrq->u.data.pointer,
 					     sizeof(int) *
 					     wrq->u.data.length)) {
-						PRINTM(INFO,
+						dprintk(1,
 						       "Copy from user failed\n");
 						return -EFAULT;
 					}
@@ -2684,7 +2684,7 @@ #define MAX_U16_VAL	65535
 				if (copy_to_user(wrq->u.data.pointer, data,
 						 sizeof(int) *
 						 gpio->Header.Len)) {
-					PRINTM(INFO, "Copy to user failed\n");
+					dprintk(1, "Copy to user failed\n");
 					return -EFAULT;
 				}
 
diff --git a/drivers/net/wireless/libertas/wlan_join.c b/drivers/net/wireless/libertas/wlan_join.c
index ac0ebb7..b19f285 100644
--- a/drivers/net/wireless/libertas/wlan_join.c
+++ b/drivers/net/wireless/libertas/wlan_join.c
@@ -90,7 +90,7 @@ static int get_common_rates(wlan_adapter
 	HEXDUMP("rate1 (AP) Rates:", tmp, sizeof(tmp));
 	HEXDUMP("rate2 (Card) Rates:", rate2, rate2_size);
 	HEXDUMP("Common Rates:", ptr, rate1_size);
-	PRINTM(INFO, "Tx DataRate is set to 0x%X\n", Adapter->DataRate);
+	dprintk(1, "Tx DataRate is set to 0x%X\n", Adapter->DataRate);
 
 	if (!Adapter->Is_DataRate_Auto) {
 		while (*ptr) {
@@ -100,7 +100,7 @@ static int get_common_rates(wlan_adapter
 			}
 			ptr++;
 		}
-		PRINTM(MSG, "Previously set fixed data rate %#x isn't "
+		printk(KERN_ALERT "Previously set fixed data rate %#x isn't "
 		       "compatible with the network.\n", Adapter->DataRate);
 
 		ret = WLAN_STATUS_FAILURE;
@@ -223,19 +223,19 @@ int libertas_start_adhoc_network(wlan_pr
 	Adapter->AdhocCreate = 1;
 
 	if (!Adapter->capInfo.ShortPreamble) {
-		PRINTM(INFO, "AdhocStart: Long Preamble\n");
+		dprintk(1, "AdhocStart: Long Preamble\n");
 		Adapter->Preamble = HostCmd_TYPE_LONG_PREAMBLE;
 	} else {
-		PRINTM(INFO, "AdhocStart: Short Preamble\n");
+		dprintk(1, "AdhocStart: Short Preamble\n");
 		Adapter->Preamble = HostCmd_TYPE_SHORT_PREAMBLE;
 	}
 
 	libertas_set_radio_control(priv);
 
-	PRINTM(INFO, "Adhoc Channel = %d\n", Adapter->AdhocChannel);
-	PRINTM(INFO, "CurBssParams.channel = %d\n",
+	dprintk(1, "Adhoc Channel = %d\n", Adapter->AdhocChannel);
+	dprintk(1, "CurBssParams.channel = %d\n",
 	       Adapter->CurBssParams.channel);
-	PRINTM(INFO, "CurBssParams.band = %d\n", Adapter->CurBssParams.band);
+	dprintk(1, "CurBssParams.band = %d\n", Adapter->CurBssParams.band);
 
 	ret = libertas_prepare_and_send_command(priv, HostCmd_CMD_802_11_AD_HOC_START,
 				    0, HostCmd_OPTION_WAITFORRSP, 0, AdhocSSID);
@@ -260,12 +260,12 @@ int libertas_join_adhoc_network(wlan_pri
 
 	ENTER();
 
-	PRINTM(INFO, "libertas_join_adhoc_network: CurBss.ssid =%s\n",
+	dprintk(1, "libertas_join_adhoc_network: CurBss.ssid =%s\n",
 	       Adapter->CurBssParams.ssid.Ssid);
-	PRINTM(INFO, "libertas_join_adhoc_network: CurBss.ssid_len =%u\n",
+	dprintk(1, "libertas_join_adhoc_network: CurBss.ssid_len =%u\n",
 	       Adapter->CurBssParams.ssid.SsidLength);
-	PRINTM(INFO, "libertas_join_adhoc_network: ssid =%s\n", pBSSDesc->Ssid.Ssid);
-	PRINTM(INFO, "libertas_join_adhoc_network: ssid len =%u\n",
+	dprintk(1, "libertas_join_adhoc_network: ssid =%s\n", pBSSDesc->Ssid.Ssid);
+	dprintk(1, "libertas_join_adhoc_network: ssid len =%u\n",
 	       pBSSDesc->Ssid.SsidLength);
 
 	/* check if the requested SSID is already joined */
@@ -274,7 +274,7 @@ int libertas_join_adhoc_network(wlan_pri
 	    && (Adapter->CurBssParams.BSSDescriptor.InfrastructureMode ==
 		Wlan802_11IBSS)) {
 
-		PRINTM(INFO,
+        dprintk(1,
 		       "ADHOC_J_CMD: New ad-hoc SSID is the same as current, "
 		       "not attempting to re-join");
 
@@ -284,18 +284,18 @@ int libertas_join_adhoc_network(wlan_pri
 	/*Use ShortPreamble only when both creator and card supports
 	   short preamble */
 	if (!pBSSDesc->Cap.ShortPreamble || !Adapter->capInfo.ShortPreamble) {
-		PRINTM(INFO, "AdhocJoin: Long Preamble\n");
+		dprintk(1, "AdhocJoin: Long Preamble\n");
 		Adapter->Preamble = HostCmd_TYPE_LONG_PREAMBLE;
 	} else {
-		PRINTM(INFO, "AdhocJoin: Short Preamble\n");
+		dprintk(1, "AdhocJoin: Short Preamble\n");
 		Adapter->Preamble = HostCmd_TYPE_SHORT_PREAMBLE;
 	}
 
 	libertas_set_radio_control(priv);
 
-	PRINTM(INFO, "CurBssParams.channel = %d\n",
+	dprintk(1, "CurBssParams.channel = %d\n",
 	       Adapter->CurBssParams.channel);
-	PRINTM(INFO, "CurBssParams.band = %c\n", Adapter->CurBssParams.band);
+	dprintk(1, "CurBssParams.band = %c\n", Adapter->CurBssParams.band);
 
 	Adapter->AdhocCreate = 0;
 
@@ -351,9 +351,9 @@ int libertas_idle_off(wlan_private * pri
 			if (memcmp(Adapter->PreviousBSSID, zeroMac,
 				   sizeof(zeroMac)) != 0) {
 
-				PRINTM(INFO, "Previous SSID = %s\n",
+				dprintk(1, "Previous SSID = %s\n",
 				       Adapter->PreviousSSID.Ssid);
-				PRINTM(INFO, "Previous BSSID = "
+				dprintk(1, "Previous BSSID = "
 				       "%02x:%02x:%02x:%02x:%02x:%02x:\n",
 				       Adapter->PreviousBSSID[0],
 				       Adapter->PreviousBSSID[1],
@@ -419,7 +419,7 @@ int libertas_idle_off(wlan_private * pri
 	}
 	/* else it is connected */
 
-	PRINTM(INFO, "\nwlanidle is off");
+	dprintk(1, "\nwlanidle is off");
 	LEAVE();
 	return ret;
 }
@@ -439,7 +439,7 @@ int libertas_idle_on(wlan_private * priv
 
 	if (Adapter->MediaConnectStatus == WlanMediaStateConnected) {
 		if (Adapter->InfrastructureMode == Wlan802_11Infrastructure) {
-			PRINTM(INFO, "Previous SSID = %s\n",
+			dprintk(1, "Previous SSID = %s\n",
 			       Adapter->PreviousSSID.Ssid);
 			memmove(&Adapter->PreviousSSID,
 				&Adapter->CurBssParams.ssid,
@@ -455,7 +455,7 @@ #ifdef REASSOCIATION
 	del_timer(&Adapter->reassoc_timer);
 #endif /* REASSOCIATION */
 
-	PRINTM(INFO, "\nwlanidle is on");
+	dprintk(1, "\nwlanidle is on");
 
 	LEAVE();
 	return ret;
@@ -487,7 +487,7 @@ int libertas_cmd_80211_authenticate(wlan
 	pAuthenticate->AuthType = Adapter->SecInfo.AuthenticationMode;
 	memcpy(pAuthenticate->MacAddr, bssid, ETH_ALEN);
 
-	PRINTM(INFO, "AUTH_CMD: Bssid is : %x:%x:%x:%x:%x:%x\n",
+	dprintk(1, "AUTH_CMD: Bssid is : %x:%x:%x:%x:%x:%x\n",
 	       bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5]);
 
 	return WLAN_STATUS_SUCCESS;
@@ -639,7 +639,7 @@ int libertas_cmd_80211_associate(wlan_pr
 	memcpy(&Adapter->CurBssParams.DataRates, &rates->Rates,
 	       min_t(size_t, sizeof(Adapter->CurBssParams.DataRates), rates->Header.Len));
 
-	PRINTM(INFO, "ASSOC_CMD: rates->Header.Len = %d\n", rates->Header.Len);
+	dprintk(1, "ASSOC_CMD: rates->Header.Len = %d\n", rates->Header.Len);
 
 	/* set IBSS field */
 	if (pBSSDesc->InfrastructureMode == Wlan802_11Infrastructure) {
@@ -657,7 +657,7 @@ #define CAPINFO_ESS_MODE 1
 	/* set the Capability info at last */
 	memcpy(&TmpCap, &pBSSDesc->Cap, sizeof(pAsso->CapInfo));
 	TmpCap &= CAPINFO_MASK;
-	PRINTM(INFO, "ASSOC_CMD: TmpCap=%4X CAPINFO_MASK=%4X\n",
+	dprintk(1, "ASSOC_CMD: TmpCap=%4X CAPINFO_MASK=%4X\n",
 	       TmpCap, CAPINFO_MASK);
 	TmpCap = wlan_cpu_to_le16(TmpCap);
 	memcpy(&pAsso->CapInfo, &TmpCap, sizeof(pAsso->CapInfo));
@@ -715,7 +715,7 @@ int libertas_cmd_80211_ad_hoc_start(wlan
 	memcpy(adhs->SSID, ((struct WLAN_802_11_SSID *)pssid)->Ssid,
 	       ((struct WLAN_802_11_SSID *)pssid)->SsidLength);
 
-	PRINTM(INFO, "ADHOC_S_CMD: SSID = %s\n", adhs->SSID);
+	dprintk(1, "ADHOC_S_CMD: SSID = %s\n", adhs->SSID);
 
 	memset(pBSSDesc->Ssid.Ssid, 0, IW_ESSID_MAX_SIZE);
 	memcpy(pBSSDesc->Ssid.Ssid,
@@ -739,7 +739,7 @@ #define DS_PARA_IE_LEN  1
 
 	ASSERT(Adapter->AdhocChannel);
 
-	PRINTM(INFO, "ADHOC_S_CMD: Creating ADHOC on Channel %d\n",
+	dprintk(1, "ADHOC_S_CMD: Creating ADHOC on Channel %d\n",
 	       Adapter->AdhocChannel);
 
 	Adapter->CurBssParams.channel = Adapter->AdhocChannel;
@@ -774,11 +774,11 @@ #define IBSS_PARA_IE_LEN  2
 	if (Adapter->SecInfo.WEPStatus == Wlan802_11WEPEnabled) {
 
 #define AD_HOC_CAP_PRIVACY_ON 1
-		PRINTM(INFO, "ADHOC_S_CMD: WEPStatus set, Privacy to WEP\n");
+		dprintk(1, "ADHOC_S_CMD: WEPStatus set, Privacy to WEP\n");
 		pBSSDesc->Privacy = Wlan802_11PrivFilter8021xWEP;
 		adhs->Cap.Privacy = AD_HOC_CAP_PRIVACY_ON;
 	} else {
-		PRINTM(INFO, "ADHOC_S_CMD: WEPStatus NOT set, Setting "
+		dprintk(1, "ADHOC_S_CMD: WEPStatus NOT set, Setting "
 		       "Privacy to ACCEPT ALL\n");
 		pBSSDesc->Privacy = Wlan802_11PrivFilterAcceptAll;
 	}
@@ -802,14 +802,14 @@ #define AD_HOC_CAP_PRIVACY_ON 1
 	memcpy(&Adapter->CurBssParams.DataRates,
 	       &adhs->DataRate, Adapter->CurBssParams.NumOfRates);
 
-	PRINTM(INFO, "ADHOC_S_CMD: Rates=%02x %02x %02x %02x \n",
+	dprintk(1, "ADHOC_S_CMD: Rates=%02x %02x %02x %02x \n",
 	       adhs->DataRate[0], adhs->DataRate[1],
 	       adhs->DataRate[2], adhs->DataRate[3]);
 
-	PRINTM(INFO, "ADHOC_S_CMD: AD HOC Start command is ready\n");
+	dprintk(1, "ADHOC_S_CMD: AD HOC Start command is ready\n");
 
 	if (libertas_create_dnld_countryinfo_11d(priv)) {
-		PRINTM(INFO, "ADHOC_S_CMD: dnld_countryinfo_11d failed\n");
+		dprintk(1, "ADHOC_S_CMD: dnld_countryinfo_11d failed\n");
 		ret = WLAN_STATUS_FAILURE;
 		goto done;
 	}
@@ -894,13 +894,13 @@ int libertas_cmd_80211_ad_hoc_join(wlan_
 
 	TmpCap &= CAPINFO_MASK;
 
-	PRINTM(INFO, "ADHOC_J_CMD: TmpCap=%4X CAPINFO_MASK=%4X\n",
+	dprintk(1, "ADHOC_J_CMD: TmpCap=%4X CAPINFO_MASK=%4X\n",
 	       TmpCap, CAPINFO_MASK);
 	memcpy(&pAdHocJoin->BssDescriptor.Cap, &TmpCap,
 	       sizeof(struct IEEEtypes_CapInfo));
 
 	/* information on BSSID descriptor passed to FW */
-	PRINTM(INFO,
+    dprintk(1,
 	       "ADHOC_J_CMD: BSSID = %2x-%2x-%2x-%2x-%2x-%2x, SSID = %s\n",
 	       pAdHocJoin->BssDescriptor.BSSID[0],
 	       pAdHocJoin->BssDescriptor.BSSID[1],
@@ -910,7 +910,7 @@ int libertas_cmd_80211_ad_hoc_join(wlan_
 	       pAdHocJoin->BssDescriptor.BSSID[5],
 	       pAdHocJoin->BssDescriptor.SSID);
 
-	PRINTM(INFO, "ADHOC_J_CMD: Data Rate = %x\n",
+	dprintk(1, "ADHOC_J_CMD: Data Rate = %x\n",
 	       (u32) pAdHocJoin->BssDescriptor.DataRates);
 
 	/* FailTimeOut */
@@ -935,7 +935,7 @@ int libertas_cmd_80211_ad_hoc_join(wlan_
 	if (get_common_rates(Adapter, pAdHocJoin->BssDescriptor.DataRates,
 			     sizeof(pAdHocJoin->BssDescriptor.DataRates),
 			     card_rates, card_rates_size)) {
-		PRINTM(INFO, "ADHOC_J_CMD: get_common_rates returns error.\n");
+		dprintk(1, "ADHOC_J_CMD: get_common_rates returns error.\n");
 		ret = WLAN_STATUS_FAILURE;
 		goto done;
 	}
@@ -1034,7 +1034,7 @@ int libertas_ret_80211_associate(wlan_pr
 
 		libertas_mac_event_disconnected(priv);
 
-		PRINTM(INFO,
+        dprintk(1,
 		       "ASSOC_RESP: Association Failed, status code = %d\n",
 		       pAssocRsp->StatusCode);
 
@@ -1051,7 +1051,7 @@ int libertas_ret_80211_associate(wlan_pr
 	/* Set the attempted BSSID Index to current */
 	pBSSDesc = Adapter->pAttemptedBSSDesc;
 
-	PRINTM(INFO, "ASSOC_RESP: %s\n", pBSSDesc->Ssid.Ssid);
+	dprintk(1, "ASSOC_RESP: %s\n", pBSSDesc->Ssid.Ssid);
 
 	/* Set the new SSID to current SSID */
 	memcpy(&Adapter->CurBssParams.ssid,
@@ -1065,7 +1065,7 @@ int libertas_ret_80211_associate(wlan_pr
 	memcpy(&Adapter->CurBssParams.BSSDescriptor,
 	       pBSSDesc, sizeof(struct bss_descriptor));
 
-	PRINTM(INFO, "ASSOC_RESP: CurrentPacketFilter is %x\n",
+	dprintk(1, "ASSOC_RESP: CurrentPacketFilter is %x\n",
 	       Adapter->CurrentPacketFilter);
 
 	Adapter->MediaConnectStatus = WlanMediaStateConnected;
@@ -1083,7 +1083,7 @@ int libertas_ret_80211_associate(wlan_pr
 		netif_wake_queue(priv->wlan_dev.netdev);
 	}
 
-	PRINTM(INFO, "ASSOC_RESP: Associated \n");
+	dprintk(1, "ASSOC_RESP: Associated \n");
 
 	memcpy(wrqu.ap_addr.sa_data, Adapter->CurBssParams.bssid, ETH_ALEN);
 	wrqu.ap_addr.sa_family = ARPHRD_ETHER;
@@ -1134,9 +1134,9 @@ int libertas_ret_80211_ad_hoc_start(wlan
 
 	pAdHocResult = &resp->params.result;
 
-	PRINTM(INFO, "ADHOC_S_RESP: Size = %d\n", wlan_le16_to_cpu(resp->Size));
-	PRINTM(INFO, "ADHOC_S_RESP: Command = %x\n", Command);
-	PRINTM(INFO, "ADHOC_S_RESP: Result = %x\n", Result);
+	dprintk(1, "ADHOC_S_RESP: Size = %d\n", wlan_le16_to_cpu(resp->Size));
+	dprintk(1, "ADHOC_S_RESP: Command = %x\n", Command);
+	dprintk(1, "ADHOC_S_RESP: Result = %x\n", Result);
 
 	pBSSDesc = Adapter->pAttemptedBSSDesc;
 
@@ -1144,7 +1144,7 @@ int libertas_ret_80211_ad_hoc_start(wlan
 	 * Join result code 0 --> SUCCESS
 	 */
 	if (Result) {
-		PRINTM(INFO, "ADHOC_RESP Failed\n");
+		dprintk(1, "ADHOC_RESP Failed\n");
 		if (Adapter->MediaConnectStatus == WlanMediaStateConnected) {
 			libertas_mac_event_disconnected(priv);
 		}
@@ -1160,7 +1160,7 @@ int libertas_ret_80211_ad_hoc_start(wlan
 	 * Now the join cmd should be successful
 	 * If BSSID has changed use SSID to compare instead of BSSID
 	 */
-	PRINTM(INFO, "ADHOC_J_RESP  %s\n", pBSSDesc->Ssid.Ssid);
+	dprintk(1, "ADHOC_J_RESP  %s\n", pBSSDesc->Ssid.Ssid);
 
 	/* Send a Media Connected event, according to the Spec */
 	Adapter->MediaConnectStatus = WlanMediaStateConnected;
@@ -1194,9 +1194,9 @@ int libertas_ret_80211_ad_hoc_start(wlan
 	wrqu.ap_addr.sa_family = ARPHRD_ETHER;
 	wireless_send_event(priv->wlan_dev.netdev, SIOCGIWAP, &wrqu, NULL);
 
-	PRINTM(INFO, "ADHOC_RESP: - Joined/Started Ad Hoc\n");
-	PRINTM(INFO, "ADHOC_RESP: Channel = %d\n", Adapter->AdhocChannel);
-	PRINTM(INFO, "ADHOC_RESP: BSSID = %02x:%02x:%02x:%02x:%02x:%02x\n",
+	dprintk(1, "ADHOC_RESP: - Joined/Started Ad Hoc\n");
+	dprintk(1, "ADHOC_RESP: Channel = %d\n", Adapter->AdhocChannel);
+	dprintk(1, "ADHOC_RESP: BSSID = %02x:%02x:%02x:%02x:%02x:%02x\n",
 	       pAdHocResult->BSSID[0], pAdHocResult->BSSID[1],
 	       pAdHocResult->BSSID[2], pAdHocResult->BSSID[3],
 	       pAdHocResult->BSSID[4], pAdHocResult->BSSID[5]);
@@ -1248,7 +1248,7 @@ int libertas_reassociation_thread(void *
 		add_wait_queue(&thread->waitQ, &wait);
 		set_current_state(TASK_INTERRUPTIBLE);
 
-		PRINTM(INFO, "Reassoc: Thread sleeping...\n");
+		dprintk(1, "Reassoc: Thread sleeping...\n");
 
 		schedule();
 
@@ -1264,10 +1264,10 @@ int libertas_reassociation_thread(void *
 			break;
 		}
 
-		PRINTM(INFO, "Reassoc: Thread waking up...\n");
+		dprintk(1, "Reassoc: Thread waking up...\n");
 
 		if (Adapter->InfrastructureMode != Wlan802_11Infrastructure) {
-			PRINTM(MSG,
+			printk(KERN_ALERT
 			       "Reassoc: non infra mode is not supported\n");
 			continue;
 		}
@@ -1278,22 +1278,22 @@ int libertas_reassociation_thread(void *
 		   libertas_set_user_scan_ioctl/wlan_set_wap is used.
 		 */
 		if (down_interruptible(&Adapter->ReassocSem)) {
-			PRINTM(FATAL,
+            printk(KERN_INFO
 			       "Acquire semaphore error, reassociation thread\n");
 			goto settimer;
 		}
 
 		if (Adapter->MediaConnectStatus != WlanMediaStateDisconnected) {
 			up(&Adapter->ReassocSem);
-			PRINTM(MSG,
+            printk(KERN_ALERT
 			       "Reassoc: Adapter->MediaConnectStatus is wrong\n");
 			continue;
 		}
 
-		PRINTM(INFO, "Reassoc: Required ESSID: %s\n",
+		dprintk(1, "Reassoc: Required ESSID: %s\n",
 		       Adapter->PreviousSSID.Ssid);
 
-		PRINTM(INFO, "Reassoc: Performing Active Scan @ %lu\n",
+		dprintk(1, "Reassoc: Performing Active Scan @ %lu\n",
 		       jiffies);
 
 		libertas_send_specific_SSID_scan(priv, &Adapter->PreviousSSID, 1);
@@ -1319,7 +1319,7 @@ int libertas_reassociation_thread(void *
 
 	      settimer:
 		if (Adapter->MediaConnectStatus == WlanMediaStateDisconnected) {
-			PRINTM(INFO, "Reassoc: No AP found or assoc failed."
+			dprintk(1, "Reassoc: No AP found or assoc failed."
 			       "Restarting re-assoc Timer @ %lu\n", jiffies);
 
             mod_timer(&Adapter->reassoc_timer, jiffies + 10*HZ); /* 10s */
diff --git a/drivers/net/wireless/libertas/wlan_main.c b/drivers/net/wireless/libertas/wlan_main.c
index 2c29a45..eba4a33 100644
--- a/drivers/net/wireless/libertas/wlan_main.c
+++ b/drivers/net/wireless/libertas/wlan_main.c
@@ -247,7 +247,7 @@ static int wlan_open(struct net_device *
 		msleep_interruptible(100);
 	}
 	if (!adapter->fw_ready) {
-		PRINTM(FATAL,
+		printk(KERN_INFO
 		       "FW not ready, wlan_open() return failure\n");
 		LEAVE();
 		return WLAN_STATUS_FAILURE;
@@ -304,17 +304,17 @@ static int wlan_pm_callback(struct pm_de
 	wlan_adapter *Adapter = priv->adapter;
 	struct net_device *dev = priv->wlan_dev.netdev;
 
-	PRINTM(INFO, "WPRM_PM_CALLBACK: pmreq = %d.\n", pmreq);
+	dprintk(1, "WPRM_PM_CALLBACK: pmreq = %d.\n", pmreq);
 
 	switch (pmreq) {
 	case PM_SUSPEND:
-		PRINTM(INFO, "WPRM_PM_CALLBACK: enter PM_SUSPEND.\n");
+		dprintk(1, "WPRM_PM_CALLBACK: enter PM_SUSPEND.\n");
 
 		/* in associated mode */
 		if (Adapter->MediaConnectStatus == WlanMediaStateConnected) {
 			if ((Adapter->PSState != PS_STATE_SLEEP)
 			    ) {
-				PRINTM(INFO,
+				dprintk(1,
 				       "wlan_pm_callback: can't enter sleep mode\n");
 				return WLAN_STATUS_FAILURE;
 			} else {
@@ -325,7 +325,7 @@ static int wlan_pm_callback(struct pm_de
 				 */
 				if (netif_running(dev)) {
 					netif_device_detach(dev);
-					PRINTM(INFO,
+					dprintk(1,
 					       "netif_device_detach().\n");
 				}
 				libertas_sbi_suspend(priv);
@@ -368,10 +368,10 @@ static int wlan_pm_callback(struct pm_de
 				 */
 				if (netif_running(dev)) {
 					netif_device_attach(dev);
-					PRINTM(INFO,
+					dprintk(1,
 					       "after netif_device_attach().\n");
 				}
-				PRINTM(INFO,
+				dprintk(1,
 				       "After netif attach, in associated mode.\n");
 			}
 			break;
@@ -389,7 +389,7 @@ static int wlan_pm_callback(struct pm_de
 		if (netif_running(dev))
 			netif_device_attach(dev);
 
-		PRINTM(INFO, "after netif attach, in NON associated mode.\n");
+		dprintk(1, "after netif attach, in NON associated mode.\n");
 		break;
 	}
 
@@ -438,7 +438,7 @@ static void wlan_tx_timeout(struct net_d
 
 	ENTER();
 
-	PRINTM(FATAL, "tx watch dog timeout!\n");
+	printk(KERN_ERR "tx watch dog timeout!\n");
 
 	priv->wlan_dev.dnld_sent = DNLD_RES_RECEIVED;
 	dev->trans_start = jiffies;
@@ -499,7 +499,7 @@ static int wlan_set_mac_address(struct n
 				    HostCmd_OPTION_WAITFORRSP, 0, NULL);
 
 	if (ret) {
-		PRINTM(INFO, "set mac address failed.\n");
+		dprintk(1, "set mac address failed.\n");
 		ret = WLAN_STATUS_FAILURE;
 		goto done;
 	}
@@ -544,7 +544,7 @@ static void wlan_set_multicast_list(stru
 	OldPacketFilter = Adapter->CurrentPacketFilter;
 
 	if (dev->flags & IFF_PROMISC) {
-		PRINTM(INFO, "Enable Promiscuous mode\n");
+		dprintk(1, "Enable Promiscuous mode\n");
 		Adapter->CurrentPacketFilter |=
 		    HostCmd_ACT_MAC_PROMISCUOUS_ENABLE;
 		Adapter->CurrentPacketFilter &=
@@ -557,7 +557,7 @@ static void wlan_set_multicast_list(stru
 
 		if (dev->flags & IFF_ALLMULTI || dev->mc_count >
 		    MRVDRV_MAX_MULTICAST_LIST_SIZE) {
-			PRINTM(INFO, "Enabling All Multicast!\n");
+			dprintk(1, "Enabling All Multicast!\n");
 			Adapter->CurrentPacketFilter |=
 			    HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE;
 			Adapter->CurrentPacketFilter &=
@@ -567,7 +567,7 @@ static void wlan_set_multicast_list(stru
 			    ~HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE;
 
 			if (!dev->mc_count) {
-				PRINTM(INFO, "No multicast addresses - "
+				dprintk(1, "No multicast addresses - "
 				       "disabling multicast!\n");
 				Adapter->CurrentPacketFilter &=
 				    ~HostCmd_ACT_MAC_MULTICAST_ENABLE;
@@ -580,11 +580,11 @@ static void wlan_set_multicast_list(stru
 				Adapter->NumOfMulticastMACAddr =
 				    wlan_copy_multicast_address(Adapter, dev);
 
-				PRINTM(INFO, "Multicast addresses: %d\n",
+				dprintk(1, "Multicast addresses: %d\n",
 				       dev->mc_count);
 
 				for (i = 0; i < dev->mc_count; i++) {
-					PRINTM(INFO, "Multicast address %d:"
+					dprintk(1, "Multicast address %d:"
 					       "%x %x %x %x %x %x\n", i,
 					       Adapter->MulticastList[i][0],
 					       Adapter->MulticastList[i][1],
@@ -632,7 +632,7 @@ static int wlan_service_main_thread(void
 	init_waitqueue_entry(&wait, current);
 
 	for (;;) {
-		PRINTM(INFO, "main-thread 111: IntCounter=%d "
+		dprintk(1, "main-thread 111: IntCounter=%d "
 		       "CurrentTxSkb=%p dnld_sent=%d\n",
 		       Adapter->IntCounter,
 		       Adapter->CurrentTxSkb, priv->wlan_dev.dnld_sent);
@@ -644,7 +644,7 @@ static int wlan_service_main_thread(void
 		    (!Adapter->IntCounter
 		     && (priv->wlan_dev.dnld_sent || Adapter->CurCmd ||
 			 list_empty(&Adapter->CmdPendingQ)))) {
-			PRINTM(INFO,
+			dprintk(1,
 			       "main-thread sleeping... Conn=%d IntC=%d PS_Mode=%d PS_State=%d\n",
 			       Adapter->MediaConnectStatus, Adapter->IntCounter,
 			       Adapter->PSMode, Adapter->PSState);
@@ -654,7 +654,7 @@ static int wlan_service_main_thread(void
 			spin_unlock_irq(&Adapter->driver_lock);
 
 
-		PRINTM(INFO,
+		dprintk(1,
 		       "main-thread 222 (waking up): IntCounter=%d CurrentTxSkb=%p "
 		       "dnld_sent=%d\n", Adapter->IntCounter,
 		       Adapter->CurrentTxSkb, priv->wlan_dev.dnld_sent);
@@ -663,14 +663,14 @@ static int wlan_service_main_thread(void
 		remove_wait_queue(&thread->waitQ, &wait);
 		try_to_freeze();
 
-		PRINTM(INFO, "main-thread 333: IntCounter=%d CurrentTxSkb=%p "
+		dprintk(1, "main-thread 333: IntCounter=%d CurrentTxSkb=%p "
 		       "dnld_sent=%d\n",
 		       Adapter->IntCounter,
 		       Adapter->CurrentTxSkb, priv->wlan_dev.dnld_sent);
 
 		if (kthread_should_stop()
 		    || Adapter->SurpriseRemoved) {
-			PRINTM(INFO,
+			dprintk(1,
 			       "main-thread: break from main thread: SurpriseRemoved=0x%x\n",
 			       Adapter->SurpriseRemoved);
 			break;
@@ -684,7 +684,7 @@ static int wlan_service_main_thread(void
 			int_status = libertas_sbi_get_int_status(priv, &ireg);
 
 			if (int_status) {
-				PRINTM(INFO,
+				dprintk(1,
 				       "main-thread: reading HOST_INT_STATUS_REG failed\n");
 				spin_unlock_irq(&Adapter->driver_lock);
 				continue;
@@ -692,14 +692,14 @@ static int wlan_service_main_thread(void
 			Adapter->HisRegCpy |= ireg;
 		} 
 
-		PRINTM(INFO, "main-thread 444: IntCounter=%d CurrentTxSkb=%p "
+		dprintk(1, "main-thread 444: IntCounter=%d CurrentTxSkb=%p "
 		       "dnld_sent=%d\n",
 		       Adapter->IntCounter,
 		       Adapter->CurrentTxSkb, priv->wlan_dev.dnld_sent);
 
 		/* Command response? */
 		if (Adapter->HisRegCpy & HIS_CmdUpLdRdy) {
-			PRINTM(INFO, "main-thread: Cmd response ready.\n");
+			dprintk(1, "main-thread: Cmd response ready.\n");
 
 			Adapter->HisRegCpy &= ~HIS_CmdUpLdRdy;
 			spin_unlock_irq(&Adapter->driver_lock);
@@ -709,12 +709,12 @@ static int wlan_service_main_thread(void
 
 		/* Any Card Event */
 		if (Adapter->HisRegCpy & HIS_CardEvent) {
-			PRINTM(INFO, "main-thread: Card Event Activity.\n");
+			dprintk(1, "main-thread: Card Event Activity.\n");
 
 			Adapter->HisRegCpy &= ~HIS_CardEvent;
 
 			if (libertas_sbi_read_event_cause(priv)) {
-				PRINTM(MSG,
+				printk(KERN_ALERT
 				       "main-thread: libertas_sbi_read_event_cause failed.\n");
 				spin_unlock_irq(&Adapter->driver_lock);
 				continue;
@@ -729,7 +729,7 @@ static int wlan_service_main_thread(void
 			if (!priv->wlan_dev.dnld_sent && !Adapter->CurCmd) {
 				if (Adapter->MediaConnectStatus ==
 				    WlanMediaStateConnected) {
-					PRINTM(INFO,
+					dprintk(1,
 					       "main_thread: PRE_SLEEP--IntCounter=%d CurrentTxSkb=%p "
 					       "dnld_sent=%d CurCmd=%p, confirm now\n",
 					       Adapter->IntCounter,
@@ -746,7 +746,7 @@ static int wlan_service_main_thread(void
 					 * after firmware fixes it
 	`				 */
 					Adapter->PSState = PS_STATE_AWAKE;
-					PRINTM(MSG,
+					printk(KERN_ALERT
 					       "main-thread: ignore PS_SleepConfirm in non-connected state\n");
 				}
 			}
@@ -788,13 +788,13 @@ static wlan_private *wlan_add_card(void 
 
 	/* probe the card */
 	if (libertas_sbi_probe_card(card) < 0) {
-		PRINTM(MSG, "NO card found!\n");
+		printk(KERN_ALERT "NO card found!\n");
 		return NULL;
 	}
 
 	/* Allocate an Ethernet device and register it */
 	if (!(dev = alloc_etherdev(sizeof(wlan_private)))) {
-		PRINTM(MSG, "Init ethernet device failed!\n");
+		printk(KERN_ALERT "Init ethernet device failed!\n");
 		return NULL;
 	}
 
@@ -802,7 +802,7 @@ static wlan_private *wlan_add_card(void 
 
 	/* allocate buffer for wlan_adapter */
 	if (!(priv->adapter = kmalloc(sizeof(wlan_adapter), GFP_KERNEL))) {
-		PRINTM(MSG, "Allocate buffer for wlan_adapter failed!\n");
+		printk(KERN_ALERT "Allocate buffer for wlan_adapter failed!\n");
 		goto err_kmalloc;
 	}
 
@@ -842,7 +842,7 @@ #define NETIF_F_DYNALLOC 16
 
 	spin_lock_init(&priv->adapter->driver_lock);
 
-	PRINTM(INFO, "Starting kthread...\n");
+	dprintk(1, "Starting kthread...\n");
 	priv->MainThread.priv = priv;
 	wlan_create_thread(wlan_service_main_thread,
 			   &priv->MainThread, "wlan_main_service");
@@ -861,7 +861,7 @@ #endif				/* REASSOCIATION */
 	 * IRQ. 
 	 */
 	if (libertas_sbi_register_dev(priv) < 0) {
-		PRINTM(FATAL, "Failed to register wlan device!\n");
+		printk(KERN_INFO "Failed to register wlan device!\n");
 		goto err_registerdev;
 	}
 
@@ -870,7 +870,7 @@ #endif				/* REASSOCIATION */
 
 	/* init FW and HW */
 	if (libertas_init_fw(priv)) {
-		PRINTM(INFO, "Firmware Init Failed\n");
+		dprintk(1, "Firmware Init Failed\n");
 		goto err_registerdev;
 	}
 
@@ -879,13 +879,13 @@ #endif				/* REASSOCIATION */
 		goto err_init_fw;
 	}
 
-	PRINTM(WARN, "%s: Marvell Wlan 802.11 Adapter ", dev->name);
+	printk(KERN_INFO "%s: Marvell Wlan 802.11 Adapter ", dev->name);
 
 	libertas_debugfs_init_one(priv, dev);
 
 #ifdef ENABLE_PM
 	if (!(wlan_pm_dev = pm_register(PM_UNKNOWN_DEV, 0, wlan_pm_callback)))
-		PRINTM(MSG, "Failed to register PM callback\n");
+		printk(KERN_ALERT "Failed to register PM callback\n");
 #endif
 
 	LEAVE();
@@ -940,7 +940,7 @@ static int wlan_remove_card(void *card)
 	dev = priv->wlan_dev.netdev;
 
 	if (Adapter->CurCmd) {
-		PRINTM(INFO, "Wake up current cmdwait_q\n");
+		dprintk(1, "Wake up current cmdwait_q\n");
 		wake_up_interruptible(&Adapter->CurCmd->cmdwait_q);
 	}
 
@@ -981,23 +981,23 @@ #endif				/* REASSOCIATION */
 
 	libertas_debugfs_remove_one(priv);
 
-	PRINTM(INFO, "unregister dev\n");
+	dprintk(1, "unregister dev\n");
 	libertas_sbi_unregister_dev(priv);
 
-	PRINTM(INFO, "Free Adapter\n");
+	dprintk(1, "Free Adapter\n");
 	libertas_free_adapter(priv);
 
 	/* Last reference is our one */
-	PRINTM(INFO, "refcnt = %d\n", atomic_read(&dev->refcnt));
+	dprintk(1, "refcnt = %d\n", atomic_read(&dev->refcnt));
 
 	msleep(10);
 
-	PRINTM(INFO, "netdev_finish_unregister: %s%s.\n", dev->name,
+	dprintk(1, "netdev_finish_unregister: %s%s.\n", dev->name,
 	       (dev->features & NETIF_F_DYNALLOC) ? "" : ", old style");
 
 	unregister_netdev(dev);
 
-	PRINTM(INFO, "Unregister finish\n");
+	dprintk(1, "Unregister finish\n");
 
 	priv->wlan_dev.netdev = NULL;
 	free_netdev(dev);
@@ -1025,7 +1025,7 @@ struct chan_freq_power *libertas_get_reg
 	end = sizeof(region_cfp_table)/sizeof(struct region_cfp_table);
 
 	for (i = 0; i < end ; i++) {
-		PRINTM(INFO, "region_cfp_table[i].region=%d\n",
+		dprintk(1, "region_cfp_table[i].region=%d\n",
 			region_cfp_table[i].region);
 		if (region_cfp_table[i].region == region) {
 			*cfp_no = region_cfp_table[i].cfp_no_BG;
@@ -1064,7 +1064,7 @@ int libertas_set_regiontable(wlan_privat
 			Adapter->region_channel[i].NrCFP = cfp_no;
 			Adapter->region_channel[i].CFP = cfp;
 		} else {
-			PRINTM(INFO, "wrong region code %#x in Band B-G\n",
+			dprintk(1, "wrong region code %#x in Band B-G\n",
 			       region);
 			return WLAN_STATUS_FAILURE;
 		}
@@ -1091,7 +1091,7 @@ void libertas_interrupt(struct net_devic
 
 	ENTER();
 
-	PRINTM(INFO, "libertas_interrupt: IntCounter=%d\n",
+	dprintk(1, "libertas_interrupt: IntCounter=%d\n",
 	       priv->adapter->IntCounter);
 
 	priv->adapter->IntCounter++;
diff --git a/drivers/net/wireless/libertas/wlan_rx.c b/drivers/net/wireless/libertas/wlan_rx.c
index af1988e..c56215d 100644
--- a/drivers/net/wireless/libertas/wlan_rx.c
+++ b/drivers/net/wireless/libertas/wlan_rx.c
@@ -132,8 +132,8 @@ static void wlan_compute_rssi(wlan_priva
 
 	ENTER();
 
-	PRINTM(INFO, "RxPD: SNR = %d, NF = %d\n", pRxPD->SNR, pRxPD->NF);
-	PRINTM(INFO, "Before computing SNR: SNR- avg = %d, NF-avg = %d\n",
+	dprintk(1, "RxPD: SNR = %d, NF = %d\n", pRxPD->SNR, pRxPD->NF);
+	dprintk(1, "Before computing SNR: SNR- avg = %d, NF-avg = %d\n",
 	       Adapter->SNR[TYPE_RXPD][TYPE_AVG] / AVG_SCALE,
 	       Adapter->NF[TYPE_RXPD][TYPE_AVG] / AVG_SCALE);
 
@@ -145,7 +145,7 @@ static void wlan_compute_rssi(wlan_priva
 
 	Adapter->SNR[TYPE_RXPD][TYPE_AVG] = wlan_getAvgSNR(priv) * AVG_SCALE;
 	Adapter->NF[TYPE_RXPD][TYPE_AVG] = wlan_getAvgNF(priv) * AVG_SCALE;
-	PRINTM(INFO, "After computing SNR: SNR-avg = %d, NF-avg = %d\n",
+	dprintk(1, "After computing SNR: SNR-avg = %d, NF-avg = %d\n",
 	       Adapter->SNR[TYPE_RXPD][TYPE_AVG] / AVG_SCALE,
 	       Adapter->NF[TYPE_RXPD][TYPE_AVG] / AVG_SCALE);
 
@@ -166,7 +166,7 @@ static void wlan_compute_rssi(wlan_priva
 
 int libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb)
 {
-	PRINTM(INFO, "skb->data=%p\n", skb->data);
+	dprintk(1, "skb->data=%p\n", skb->data);
 
 	skb->dev = priv->wlan_dev.netdev;
 	skb->protocol = eth_type_trans(skb, priv->wlan_dev.netdev);
@@ -214,7 +214,7 @@ int libertas_process_rxed_packet(wlan_pr
 		 min_t(unsigned int, skb->len, 100));
 
 	if (skb->len < (ETH_HLEN + 8 + sizeof(struct RxPD))) {
-		PRINTM(INFO, "RX Error: FRAME RECEIVED WITH BAD LENGTH\n");
+		dprintk(1, "RX Error: FRAME RECEIVED WITH BAD LENGTH\n");
 		priv->stats.rx_length_errors++;
 		ret = WLAN_STATUS_SUCCESS;
 		goto done;
@@ -224,14 +224,14 @@ int libertas_process_rxed_packet(wlan_pr
 	 * Check RxPD status and update 802.3 stat,
 	 */
 	if (!(pRxPD->Status & MRVDRV_RXPD_STATUS_OK)) {
-		PRINTM(INFO, "RX Error: frame received with bad status\n");
+		dprintk(1, "RX Error: frame received with bad status\n");
 		printk("<1> RxPD Not OK\n");
 		priv->stats.rx_errors++;
 		ret = WLAN_STATUS_SUCCESS;
 		goto done;
 	}
 
-	PRINTM(INFO, "RX Data: skb->len - sizeof(RxPd) = %d - %d = %d\n",
+	dprintk(1, "RX Data: skb->len - sizeof(RxPd) = %d - %d = %d\n",
 	       skb->len, sizeof(struct RxPD), skb->len - sizeof(struct RxPD));
 
 	HEXDUMP("RX Data: Dest", pRxPkt->eth803_hdr.dest_addr,
@@ -290,9 +290,9 @@ int libertas_process_rxed_packet(wlan_pr
 
 	wlan_compute_rssi(priv, pRxPD);
 
-	PRINTM(INFO, "RX Data: Size of actual packet = %d\n", skb->len);
+	dprintk(1, "RX Data: Size of actual packet = %d\n", skb->len);
 	if (libertas_upload_rx_packet(priv, skb)) {
-		PRINTM(INFO, "RX Error: libertas_upload_rx_packet"
+		dprintk(1, "RX Error: libertas_upload_rx_packet"
 		       " returns failure\n");
 		ret = WLAN_STATUS_FAILURE;
 		goto done;
@@ -342,7 +342,7 @@ static u8 convert_mv_rate_to_radiotap(u8
 	case 11:		/*  54 Mbps */
 		return 108;
 	}
-	PRINTM(MSG, "Invalid Marvell WLAN rate (%i)\n", rate);
+	printk(KERN_ALERT "Invalid Marvell WLAN rate (%i)\n", rate);
 	return 0;
 }
 
@@ -372,7 +372,7 @@ static int ProcessRxed_802_11_Packet(wla
 	// HEXDUMP("RX Data: Before chop RxPD", skb->data, min(skb->len, 100));
 
 	if (skb->len < (ETH_HLEN + 8 + sizeof(struct RxPD))) {
-		PRINTM(INFO, "RX Error: FRAME RECEIVED WITH BAD LENGTH\n");
+		dprintk(1, "RX Error: FRAME RECEIVED WITH BAD LENGTH\n");
 		priv->stats.rx_length_errors++;
 		ret = WLAN_STATUS_SUCCESS;
 		goto done;
@@ -382,11 +382,11 @@ static int ProcessRxed_802_11_Packet(wla
 	 * Check RxPD status and update 802.3 stat,
 	 */
 	if (!(pRxPD->Status & MRVDRV_RXPD_STATUS_OK)) {
-		//PRINTM(INFO, "RX Error: frame received with bad status\n");
+		//dprintk(1, "RX Error: frame received with bad status\n");
 		priv->stats.rx_errors++;
 	}
 
-	PRINTM(INFO, "RX Data: skb->len - sizeof(RxPd) = %d - %d = %d\n",
+	dprintk(1, "RX Data: skb->len - sizeof(RxPd) = %d - %d = %d\n",
 	       skb->len, sizeof(struct RxPD), skb->len - sizeof(struct RxPD));
 
 	/* create the exported radio header */
@@ -427,7 +427,7 @@ static int ProcessRxed_802_11_Packet(wla
 		if ((skb_headroom(skb) < sizeof(struct RxRadiotapHdr)) &&
 		    pskb_expand_head(skb, sizeof(struct RxRadiotapHdr), 0,
 				     GFP_ATOMIC)) {
-			PRINTM(MSG, "%s: couldn't pskb_expand_head\n",
+			printk(KERN_ALERT "%s: couldn't pskb_expand_head\n",
 			       __func__);
 		}
 
@@ -442,7 +442,7 @@ static int ProcessRxed_802_11_Packet(wla
 
 	default:
 		/* unknown header */
-		PRINTM(MSG, "Unknown radiomode (%i)\n",
+		printk(KERN_ALERT "Unknown radiomode (%i)\n",
 		       priv->adapter->radiomode);
 		/* don't export any header */
 		/* chop the RxPD */
@@ -459,10 +459,10 @@ static int ProcessRxed_802_11_Packet(wla
 
 	wlan_compute_rssi(priv, pRxPD);
 
-	PRINTM(INFO, "RX Data: Size of actual packet = %d\n", skb->len);
+	dprintk(1, "RX Data: Size of actual packet = %d\n", skb->len);
 
 	if (libertas_upload_rx_packet(priv, skb)) {
-		PRINTM(INFO, "RX Error: libertas_upload_rx_packet "
+		dprintk(1, "RX Error: libertas_upload_rx_packet "
 			"returns failure\n");
 		ret = WLAN_STATUS_FAILURE;
 		goto done;
diff --git a/drivers/net/wireless/libertas/wlan_scan.c b/drivers/net/wireless/libertas/wlan_scan.c
index 7c06326..c15afa8 100644
--- a/drivers/net/wireless/libertas/wlan_scan.c
+++ b/drivers/net/wireless/libertas/wlan_scan.c
@@ -148,7 +148,7 @@ static int IsNetworkCompatible(wlan_adap
 			      && Adapter->ScanTable[index].Privacy */
 		    ) {
 			/* WPA enabled */
-			PRINTM(INFO,
+            dprintk(1,
 			       "IsNetworkCompatible() WPA: index=%d wpa_ie=%#x "
 			       "wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s EncMode=%#x "
 			       "privacy=%#x\n", index,
@@ -174,7 +174,7 @@ static int IsNetworkCompatible(wlan_adap
 			      && Adapter->ScanTable[index].Privacy */
 		    ) {
 			/* WPA2 enabled */
-			PRINTM(INFO,
+            dprintk(1,
 			       "IsNetworkCompatible() WPA2: index=%d wpa_ie=%#x "
 			       "wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s EncMode=%#x "
 			       "privacy=%#x\n", index,
@@ -202,7 +202,7 @@ static int IsNetworkCompatible(wlan_adap
 			   && Adapter->SecInfo.EncryptionMode != CIPHER_NONE
 			   && Adapter->ScanTable[index].Privacy) {
 			/* dynamic WEP enabled */
-			PRINTM(INFO,
+            dprintk(1,
 			       "IsNetworkCompatible() dynamic WEP: index=%d "
 			       "wpa_ie=%#x wpa2_ie=%#x EncMode=%#x privacy=%#x\n",
 			       index,
@@ -216,7 +216,7 @@ static int IsNetworkCompatible(wlan_adap
 		}
 
 		/* security doesn't match */
-		PRINTM(INFO,
+        dprintk(1,
 		       "IsNetworkCompatible() FAILED: index=%d wpa_ie=%#x "
 		       "wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s EncMode=%#x privacy=%#x\n",
 		       index,
@@ -300,7 +300,7 @@ static void wlan_scan_process_results(wl
 	}
 
 	for (i = 0; i < Adapter->NumInScanTable; i++) {
-		PRINTM(INFO, "Scan:(%02d) %02x:%02x:%02x:%02x:%02x:%02x, "
+		dprintk(1, "Scan:(%02d) %02x:%02x:%02x:%02x:%02x:%02x, "
 		       "RSSI[%03d], SSID[%s]\n",
 		       i,
 		       Adapter->ScanTable[i].MacAddress[0],
@@ -583,7 +583,7 @@ wlan_scan_setup_scan_config(wlan_private
 
 	if (pUserScanIn && pUserScanIn->chanList[0].chanNumber) {
 
-		PRINTM(INFO, "Scan: Using supplied channel list\n");
+		dprintk(1, "Scan: Using supplied channel list\n");
 
 		for (chanIdx = 0;
 		     chanIdx < WLAN_IOCTL_USER_SCAN_CHAN_MAX
@@ -627,11 +627,11 @@ wlan_scan_setup_scan_config(wlan_private
 				       ==
 				       priv->adapter->CurBssParams.channel)) {
 			*pScanCurrentOnly = 1;
-			PRINTM(INFO, "Scan: Scanning current channel only");
+			dprintk(1, "Scan: Scanning current channel only");
 		}
 
 	} else {
-		PRINTM(INFO, "Scan: Creating full region channel list\n");
+		dprintk(1, "Scan: Creating full region channel list\n");
 		wlan_scan_create_channel_list(priv, pScanChanList,
 					      *pFilteredScan);
 	}
@@ -679,7 +679,7 @@ static int wlan_scan_channel_list(wlan_p
 	ENTER();
 
 	if (pScanCfgOut == 0 || pChanTlvOut == 0 || pScanChanList == 0) {
-		PRINTM(INFO, "Scan: Null detect: %p, %p, %p\n",
+		dprintk(1, "Scan: Null detect: %p, %p, %p\n",
 		       pScanCfgOut, pChanTlvOut, pScanChanList);
 		return WLAN_STATUS_FAILURE;
 	}
@@ -710,12 +710,12 @@ static int wlan_scan_channel_list(wlan_p
 		while (tlvIdx < maxChanPerScan && pTmpChan->ChanNumber
 		       && !doneEarly) {
 
-			PRINTM(INFO,
-			       "Scan: Chan(%3d), Radio(%d), Mode(%d,%d), Dur(%d)\n",
-			       pTmpChan->ChanNumber, pTmpChan->RadioType,
-			       pTmpChan->ChanScanMode.PassiveScan,
-			       pTmpChan->ChanScanMode.DisableChanFilt,
-			       pTmpChan->MaxScanTime);
+            dprintk(1,
+                    "Scan: Chan(%3d), Radio(%d), Mode(%d,%d), Dur(%d)\n",
+                pTmpChan->ChanNumber, pTmpChan->RadioType,
+                pTmpChan->ChanScanMode.PassiveScan,
+                pTmpChan->ChanScanMode.DisableChanFilt,
+                pTmpChan->MaxScanTime);
 
 			/* Copy the current channel TLV to the command being prepared */
 			memcpy(pChanTlvOut->ChanScanParam + tlvIdx,
@@ -892,20 +892,20 @@ static void wlan_scan_create_brief_scan_
 
 	if (copy_to_user
 	    (pTmpBuf, pBssDesc->TimeStamp, sizeof(pBssDesc->TimeStamp))) {
-		PRINTM(INFO, "Copy to user failed\n");
+		dprintk(1, "Copy to user failed\n");
 		return;
 	}
 	pTmpBuf += sizeof(pBssDesc->TimeStamp);
 
 	if (copy_to_user(pTmpBuf, &pBssDesc->BeaconPeriod,
 			 sizeof(pBssDesc->BeaconPeriod))) {
-		PRINTM(INFO, "Copy to user failed\n");
+		dprintk(1, "Copy to user failed\n");
 		return;
 	}
 	pTmpBuf += sizeof(pBssDesc->BeaconPeriod);
 
 	if (copy_to_user(pTmpBuf, &pBssDesc->Cap, sizeof(pBssDesc->Cap))) {
-		PRINTM(INFO, "Copy to user failed\n");
+		dprintk(1, "Copy to user failed\n");
 		return;
 	}
 	pTmpBuf += sizeof(pBssDesc->Cap);
@@ -913,14 +913,14 @@ static void wlan_scan_create_brief_scan_
 	tmpSSIDHdr[0] = 0;	/* Element ID for SSID is zero */
 	tmpSSIDHdr[1] = pBssDesc->Ssid.SsidLength;
 	if (copy_to_user(pTmpBuf, tmpSSIDHdr, sizeof(tmpSSIDHdr))) {
-		PRINTM(INFO, "Copy to user failed\n");
+		dprintk(1, "Copy to user failed\n");
 		return;
 	}
 	pTmpBuf += sizeof(tmpSSIDHdr);
 
 	if (copy_to_user(pTmpBuf, pBssDesc->Ssid.Ssid,
 			 pBssDesc->Ssid.SsidLength)) {
-		PRINTM(INFO, "Copy to user failed\n");
+		dprintk(1, "Copy to user failed\n");
 		return;
 	}
 	pTmpBuf += pBssDesc->Ssid.SsidLength;
@@ -955,7 +955,7 @@ void wlan_ret_802_11_scan_get_tlv_ptrs(s
 	tlvBufLeft = tlvBufSize;
 	*pTsfTlv = NULL;
 
-	PRINTM(INFO, "SCAN_RESP: tlvBufSize = %d\n", tlvBufSize);
+	dprintk(1, "SCAN_RESP: tlvBufSize = %d\n", tlvBufSize);
 	HEXDUMP("SCAN_RESP: TLV Buf", (u8 *) pTlv, tlvBufSize);
 
 	while (tlvBufLeft >= sizeof(struct MrvlIEtypesHeader)) {
@@ -968,7 +968,7 @@ void wlan_ret_802_11_scan_get_tlv_ptrs(s
 			break;
 
 		default:
-			PRINTM(INFO, "SCAN_RESP: Unhandled TLV = %d\n",
+			dprintk(1, "SCAN_RESP: Unhandled TLV = %d\n",
 			       tlvType);
 			/* Give up, this seems corrupted */
 			return;
@@ -1052,7 +1052,7 @@ static int InterpretBSSDescriptionWithIE
 	pwpa2_supplicant = &pBSSEntry->wpa2_supplicant;
 
 	memcpy(pBSSEntry->MacAddress, pCurrentPtr, ETH_ALEN);
-	PRINTM(INFO, "InterpretIE: AP MAC Addr-%x:%x:%x:%x:%x:%x\n",
+	dprintk(1, "InterpretIE: AP MAC Addr-%x:%x:%x:%x:%x:%x\n",
 	       pBSSEntry->MacAddress[0], pBSSEntry->MacAddress[1],
 	       pBSSEntry->MacAddress[2], pBSSEntry->MacAddress[3],
 	       pBSSEntry->MacAddress[4], pBSSEntry->MacAddress[5]);
@@ -1061,7 +1061,7 @@ static int InterpretBSSDescriptionWithIE
 	bytesLeftForCurrentBeacon -= ETH_ALEN;
 
 	if (bytesLeftForCurrentBeacon < 12) {
-		PRINTM(INFO, "InterpretIE: Not enough bytes left\n");
+		dprintk(1, "InterpretIE: Not enough bytes left\n");
 		return WLAN_STATUS_FAILURE;
 	}
 
@@ -1072,7 +1072,7 @@ static int InterpretBSSDescriptionWithIE
 
 	/* RSSI is 1 byte long */
 	pBSSEntry->Rssi = wlan_le32_to_cpu((long)(*pCurrentPtr));
-	PRINTM(INFO, "InterpretIE: RSSI=%02X\n", *pCurrentPtr);
+	dprintk(1, "InterpretIE: RSSI=%02X\n", *pCurrentPtr);
 	pCurrentPtr += 1;
 	bytesLeftForCurrentBeacon -= 1;
 
@@ -1090,7 +1090,7 @@ static int InterpretBSSDescriptionWithIE
 
 	/* capability information is 2 bytes long */
 	memcpy(&fixedIE.Capabilities, pCurrentPtr, 2);
-	PRINTM(INFO, "InterpretIE: fixedIE.Capabilities=0x%X\n",
+	dprintk(1, "InterpretIE: fixedIE.Capabilities=0x%X\n",
 	       fixedIE.Capabilities);
 	fixedIE.Capabilities = wlan_le16_to_cpu(fixedIE.Capabilities);
 	pCap = (struct IEEEtypes_CapInfo *) & fixedIE.Capabilities;
@@ -1099,14 +1099,14 @@ static int InterpretBSSDescriptionWithIE
 	bytesLeftForCurrentBeacon -= 2;
 
 	/* rest of the current buffer are IE's */
-	PRINTM(INFO, "InterpretIE: IELength for this AP = %d\n",
+	dprintk(1, "InterpretIE: IELength for this AP = %d\n",
 	       bytesLeftForCurrentBeacon);
 
 	HEXDUMP("InterpretIE: IE info", (u8 *) pCurrentPtr,
 		bytesLeftForCurrentBeacon);
 
 	if (pCap->Privacy) {
-		PRINTM(INFO, "InterpretIE: AP WEP enabled\n");
+		dprintk(1, "InterpretIE: AP WEP enabled\n");
 		pBSSEntry->Privacy = Wlan802_11PrivFilter8021xWEP;
 	} else {
 		pBSSEntry->Privacy = Wlan802_11PrivFilterAcceptAll;
@@ -1124,7 +1124,7 @@ static int InterpretBSSDescriptionWithIE
 		elemLen = *((u8 *) pCurrentPtr + 1);
 
 		if (bytesLeftForCurrentBeacon < elemLen) {
-			PRINTM(INFO, "InterpretIE: Error in processing IE, "
+			dprintk(1, "InterpretIE: Error in processing IE, "
 			       "bytes left < IE length\n");
 			bytesLeftForCurrentBeacon = 0;
 			continue;
@@ -1136,7 +1136,7 @@ static int InterpretBSSDescriptionWithIE
 			pBSSEntry->Ssid.SsidLength = elemLen;
 			memcpy(pBSSEntry->Ssid.Ssid, (pCurrentPtr + 2),
 			       elemLen);
-			PRINTM(INFO, "Ssid: %32s", pBSSEntry->Ssid.Ssid);
+			dprintk(1, "Ssid: %32s", pBSSEntry->Ssid.Ssid);
 			break;
 
 		case SUPPORTED_RATES:
@@ -1149,7 +1149,7 @@ static int InterpretBSSDescriptionWithIE
 			break;
 
 		case EXTRA_IE:
-			PRINTM(INFO, "InterpretIE: EXTRA_IE Found!\n");
+			dprintk(1, "InterpretIE: EXTRA_IE Found!\n");
 			pBSSEntry->extra_ie = 1;
 			break;
 
@@ -1203,7 +1203,7 @@ static int InterpretBSSDescriptionWithIE
 			if (pcountryinfo->Len <
 			    sizeof(pcountryinfo->CountryCode)
 			    || pcountryinfo->Len > 254) {
-				PRINTM(INFO, "InterpretIE: 11D- Err "
+				dprintk(1, "InterpretIE: 11D- Err "
 				       "CountryInfo len =%d min=%d max=254\n",
 				       pcountryinfo->Len,
 				       sizeof(pcountryinfo->CountryCode));
@@ -1323,7 +1323,7 @@ int libertas_find_BSSID_in_list(wlan_ada
 	if (!bssid)
 		return -EFAULT;
 
-	PRINTM(INFO, "FindBSSID: Num of BSSIDs = %d\n",
+	dprintk(1, "FindBSSID: Num of BSSIDs = %d\n",
 	       Adapter->NumInScanTable);
 
 	/* Look through the scan table for a compatible match. The ret return
@@ -1367,7 +1367,7 @@ int libertas_find_SSID_in_list(wlan_adap
 	int i;
 	int j;
 
-	PRINTM(INFO, "Num of Entries in Table = %d\n", Adapter->NumInScanTable);
+	dprintk(1, "Num of Entries in Table = %d\n", Adapter->NumInScanTable);
 
 	for (i = 0; i < Adapter->NumInScanTable; i++) {
 		if (!libertas_SSID_cmp(&Adapter->ScanTable[i].Ssid, ssid) &&
@@ -1435,7 +1435,7 @@ int libertas_find_best_SSID_in_list(wlan
 
 	ENTER();
 
-	PRINTM(INFO, "Num of BSSIDs = %d\n", Adapter->NumInScanTable);
+	dprintk(1, "Num of BSSIDs = %d\n", Adapter->NumInScanTable);
 
 	for (i = 0; i < Adapter->NumInScanTable; i++) {
 		switch (mode) {
@@ -1531,7 +1531,7 @@ int libertas_set_scan(struct net_device 
 
 #ifdef REASSOCIATION
 	if (down_interruptible(&Adapter->ReassocSem)) {
-		PRINTM(FATAL, "Acquire semaphore error, libertas_set_scan\n");
+		printk(KERN_INFO "Acquire semaphore error, libertas_set_scan\n");
 		return -EBUSY;
 	}
 #endif
@@ -1654,10 +1654,10 @@ #define RSSI_DIFF    ((u8)(PERFECT_RSSI 
 	ENTER();
 
 	if (Adapter->MediaConnectStatus == WlanMediaStateConnected)
-		PRINTM(INFO, "Current Ssid: %32s\n",
+		dprintk(1, "Current Ssid: %32s\n",
 		       Adapter->CurBssParams.ssid.Ssid);
 
-	PRINTM(INFO, "Scan: Get: NumInScanTable = %d\n",
+	dprintk(1, "Scan: Get: NumInScanTable = %d\n",
 	       Adapter->NumInScanTable);
 
 	/* The old API using SIOCGIWAPLIST had a hard limit of IW_MAX_AP.
@@ -1667,7 +1667,7 @@ #define RSSI_DIFF    ((u8)(PERFECT_RSSI 
 	 */
 	for (i = 0; i < Adapter->NumInScanTable; i++) {
 		if ((current_ev + MAX_SCAN_CELL_SIZE) >= end_buf) {
-			PRINTM(INFO, "i=%d break out: current_ev=%p end_buf=%p "
+			dprintk(1, "i=%d break out: current_ev=%p end_buf=%p "
 			       "MAX_SCAN_CELL_SIZE=%d\n",
 			       i, current_ev, end_buf, MAX_SCAN_CELL_SIZE);
 			break;
@@ -1675,13 +1675,13 @@ #define RSSI_DIFF    ((u8)(PERFECT_RSSI 
 
 		pScanTable = &Adapter->ScanTable[i];
 
-		PRINTM(INFO, "i=%d  Ssid: %32s\n", i, pScanTable->Ssid.Ssid);
+		dprintk(1, "i=%d  Ssid: %32s\n", i, pScanTable->Ssid.Ssid);
 
 		cfp =
 		    libertas_find_cfp_by_band_and_channel(Adapter, 0,
 						 pScanTable->Channel);
 		if (!cfp) {
-			PRINTM(INFO, "Invalid channel number %d\n",
+			dprintk(1, "Invalid channel number %d\n",
 			       pScanTable->Channel);
 			continue;
 		}
@@ -1866,9 +1866,9 @@ #define RSSI_DIFF    ((u8)(PERFECT_RSSI 
 			ptr += sprintf(ptr, "extra_ie");
 			iwe.u.data.length = strlen(buf);
 
-			PRINTM(INFO, "iwe.u.data.length %d\n",
+			dprintk(1, "iwe.u.data.length %d\n",
 			       iwe.u.data.length);
-			PRINTM(INFO, "BUF: %s \n", buf);
+			dprintk(1, "BUF: %s \n", buf);
 
 			iwe.cmd = IWEVCUSTOM;
 			iwe.len = IW_EV_POINT_LEN + iwe.u.data.length;
@@ -1927,13 +1927,13 @@ int libertas_get_scan_table_ioctl(wlan_p
 	if (copy_from_user(&scanStart,
 			   wrq->u.data.pointer, sizeof(scanStart)) != 0) {
 		/* copy_from_user failed  */
-		PRINTM(INFO, "GetScanTable: copy from user failed\n");
+		dprintk(1, "GetScanTable: copy from user failed\n");
 		retcode = -EFAULT;
 
 	} else {
 
-		PRINTM(INFO, "GetScanTable: scanStart req = %d\n", scanStart);
-		PRINTM(INFO, "GetScanTable: length avail = %d\n",
+		dprintk(1, "GetScanTable: scanStart req = %d\n", scanStart);
+		dprintk(1, "GetScanTable: length avail = %d\n",
 		       wrq->u.data.length);
 
 		Adapter = priv->adapter;
@@ -1970,7 +1970,7 @@ int libertas_get_scan_table_ioctl(wlan_p
 			spaceNeeded = fixedSize + variableSize;
 			spaceLeft = pBufferEnd - pCurrent;
 
-			PRINTM(INFO,
+			dprintk(1,
 			       "GetScanTable: bss[%d], need(%d), left(%d)\n",
 			       scanStart + numScansDone, spaceNeeded,
 			       spaceLeft);
@@ -1979,7 +1979,7 @@ int libertas_get_scan_table_ioctl(wlan_p
 				spaceLeft = 0;
 			} else {
 
-				PRINTM(INFO, "GetScanTable: bss[%d] = "
+				dprintk(1, "GetScanTable: bss[%d] = "
 				       "%02x:%02x:%02x:%02x:%02x:%02x\n",
 				       scanStart + numScansDone,
 				       pBssInfo->MacAddress[0],
@@ -2008,7 +2008,7 @@ int libertas_get_scan_table_ioctl(wlan_p
 				 */
 				if (copy_to_user
 				    (pCurrent, &tmpRspEntry, fixedSize)) {
-					PRINTM(INFO, "Copy to user failed\n");
+					dprintk(1, "Copy to user failed\n");
 					return -EFAULT;
 				}
 
@@ -2053,7 +2053,7 @@ int libertas_set_user_scan_ioctl(wlan_pr
 			   wrq->u.data.pointer,
 			   min_t(size_t, wrq->u.data.length, sizeof(scanReq))) != 0) {
 		/* copy_from_user failed  */
-		PRINTM(INFO, "SetUserScan: copy from user failed\n");
+		dprintk(1, "SetUserScan: copy from user failed\n");
 		retcode = -EFAULT;
 
 	} else {
@@ -2109,7 +2109,7 @@ int libertas_cmd_80211_scan(wlan_private
 				     + sizeof(pScan->BSSID)
 				     + pScanCfg->tlvBufferLen + S_DS_GEN);
 
-	PRINTM(INFO, "SCAN_CMD: Command=%x, Size=%x, SeqNum=%x\n",
+	dprintk(1, "SCAN_CMD: Command=%x, Size=%x, SeqNum=%x\n",
 	       cmd->Command, cmd->Size, cmd->SeqNum);
 	LEAVE();
 	return WLAN_STATUS_SUCCESS;
@@ -2160,7 +2160,7 @@ int libertas_ret_80211_scan(wlan_private
 	pScan = &resp->params.scanresp;
 
 	if (pScan->NumberOfSets > MRVDRV_MAX_BSSID_LIST) {
-		PRINTM(INFO,
+        dprintk(1,
 		       "SCAN_RESP: Invalid number of AP returned (%d)!!\n",
 		       pScan->NumberOfSets);
 		LEAVE();
@@ -2168,10 +2168,10 @@ int libertas_ret_80211_scan(wlan_private
 	}
 
 	bytesLeft = wlan_le16_to_cpu(pScan->BSSDescriptSize);
-	PRINTM(INFO, "SCAN_RESP: BSSDescriptSize %d\n", bytesLeft);
+	dprintk(1, "SCAN_RESP: BSSDescriptSize %d\n", bytesLeft);
 
 	scanRespSize = wlan_le16_to_cpu(resp->Size);
-	PRINTM(INFO, "SCAN_RESP: returned %d AP before parsing\n",
+	dprintk(1, "SCAN_RESP: returned %d AP before parsing\n",
 	       pScan->NumberOfSets);
 
 	numInTable = Adapter->NumInScanTable;
@@ -2208,7 +2208,7 @@ int libertas_ret_80211_scan(wlan_private
 		     WLAN_STATUS_SUCCESS)
 		    && CHECK_SSID_IS_VALID(&newBssEntry.Ssid)) {
 
-			PRINTM(INFO,
+            dprintk(1,
 			       "SCAN_RESP: BSSID = %02x:%02x:%02x:%02x:%02x:%02x\n",
 			       newBssEntry.MacAddress[0],
 			       newBssEntry.MacAddress[1],
@@ -2241,7 +2241,7 @@ int libertas_ret_80211_scan(wlan_private
 					      Ssid,
 					      newBssEntry.Ssid.SsidLength) ==
 					     0)) {
-						PRINTM(INFO,
+                        dprintk(1,
 						       "SCAN_RESP: Duplicate of index: %d\n",
 						       bssIdx);
 						break;
@@ -2285,12 +2285,12 @@ int libertas_ret_80211_scan(wlan_private
 		} else {
 
 			/* Error parsing/interpreting the scan response, skipped */
-			PRINTM(INFO, "SCAN_RESP: "
+			dprintk(1, "SCAN_RESP: "
 			       "InterpretBSSDescriptionWithIE returned ERROR\n");
 		}
 	}
 
-	PRINTM(INFO, "SCAN_RESP: Scanned %2d APs, %d valid, %d total\n",
+	dprintk(1, "SCAN_RESP: Scanned %2d APs, %d valid, %d total\n",
 	       pScan->NumberOfSets, numInTable - Adapter->NumInScanTable,
 	       numInTable);
 
@@ -2318,7 +2318,7 @@ int libertas_extscan_ioctl(wlan_private 
 
 	if (copy_from_user(&Ext_Scan_SSID, req->ifr_data,
 			   sizeof(Ext_Scan_SSID))) {
-		PRINTM(INFO, "copy of SSID for ext scan from user failed \n");
+		dprintk(1, "copy of SSID for ext scan from user failed \n");
 		LEAVE();
 		return -EFAULT;
 	}
diff --git a/drivers/net/wireless/libertas/wlan_thread.h b/drivers/net/wireless/libertas/wlan_thread.h
index f591e83..d91d739 100644
--- a/drivers/net/wireless/libertas/wlan_thread.h
+++ b/drivers/net/wireless/libertas/wlan_thread.h
@@ -57,7 +57,7 @@ static inline int wlan_terminate_thread(
 
 	/* Check if the thread is active or not */
 	if (!thr->pid) {
-		PRINTM(INFO, "Thread does not exist\n");
+		printk(KERN_ERR "Thread does not exist\n");
 		return -1;
 	}
 	kthread_stop(thr->task);
diff --git a/drivers/net/wireless/libertas/wlan_tx.c b/drivers/net/wireless/libertas/wlan_tx.c
index c0fbdb8..282957b 100644
--- a/drivers/net/wireless/libertas/wlan_tx.c
+++ b/drivers/net/wireless/libertas/wlan_tx.c
@@ -103,7 +103,7 @@ static int SendSinglePacket(wlan_private
 			 min_t(unsigned int, skb->len, 100));
 
 	if (!skb->len || (skb->len > MRVDRV_ETH_TX_PACKET_BUFFER_SIZE)) {
-		PRINTM(INFO, "Tx Error: Bad skb length %d : %d\n",
+		dprintk(1, "Tx Error: Bad skb length %d : %d\n",
 		       skb->len, MRVDRV_ETH_TX_PACKET_BUFFER_SIZE);
 		ret = WLAN_STATUS_FAILURE;
 		goto done;
@@ -167,11 +167,11 @@ #endif
 			       sizeof(struct TxPD));
 
 	if (ret) {
-		PRINTM(INFO, "Tx Error: libertas_sbi_host_to_card failed: 0x%X\n", ret);
+		dprintk(1, "Tx Error: libertas_sbi_host_to_card failed: 0x%X\n", ret);
 		goto done;
 	}
 
-	PRINTM(INFO, "SendSinglePacket succeeds\n");
+	dprintk(1, "SendSinglePacket succeeds\n");
 
       done:
 	if (!ret) {
@@ -248,7 +248,7 @@ int libertas_process_tx(wlan_private * p
 	HEXDUMP("TX Data", skb->data, min_t(unsigned int, skb->len, 100));
 
 	if (priv->wlan_dev.dnld_sent) {
-		PRINTM(MSG, "TX Error: dnld_sent = %d, not sending\n",
+		printk(KERN_ALERT "TX Error: dnld_sent = %d, not sending\n",
 		       priv->wlan_dev.dnld_sent);
 		goto done;
 	}
@@ -306,7 +306,7 @@ int libertas_send_null_packet(wlan_priva
 			       priv->adapter->TmpTxBuf, sizeof(struct TxPD));
 
 	if (ret != 0) {
-		PRINTM(INFO, "TX Error: libertas_send_null_packet failed!\n");
+		dprintk(1, "TX Error: libertas_send_null_packet failed!\n");
 		goto done;
 	}
 
diff --git a/drivers/net/wireless/libertas/wlan_wext.c b/drivers/net/wireless/libertas/wlan_wext.c
index 4d9ef9e..5e1389c 100644
--- a/drivers/net/wireless/libertas/wlan_wext.c
+++ b/drivers/net/wireless/libertas/wlan_wext.c
@@ -137,7 +137,7 @@ struct chan_freq_power *libertas_find_cf
 	}
 
 	if (!cfp && channel)
-		PRINTM(INFO, "libertas_find_cfp_by_band_and_channel(): cannot find "
+		dprintk(1, "libertas_find_cfp_by_band_and_channel(): cannot find "
 		       "cfp by band %d & channel %d\n", band, channel);
 
 	return cfp;
@@ -180,7 +180,7 @@ static struct chan_freq_power *find_cfp_
 	}
 
 	if (!cfp && freq)
-		PRINTM(INFO, "find_cfp_by_band_and_freql(): cannot find cfp by "
+		dprintk(1, "find_cfp_by_band_and_freql(): cannot find cfp by "
 		       "band %d & freq %d\n", band, freq);
 
 	return cfp;
@@ -203,7 +203,7 @@ static int UpdateCurrentChannel(wlan_pri
 				    HostCmd_OPT_802_11_RF_CHANNEL_GET,
 				    HostCmd_OPTION_WAITFORRSP, 0, NULL);
 
-	PRINTM(INFO, "Current Channel = %d\n",
+	dprintk(1, "Current Channel = %d\n",
 	       priv->adapter->CurBssParams.channel);
 
 	return ret;
@@ -218,7 +218,7 @@ static int UpdateCurrentChannel(wlan_pri
  */
 static int SetCurrentChannel(wlan_private * priv, int channel)
 {
-	PRINTM(INFO, "Set Channel = %d\n", channel);
+	dprintk(1, "Set Channel = %d\n", channel);
 
 	/* 
 	 **  Current channel is not set to AdhocChannel requested, set channel
@@ -250,7 +250,7 @@ static int ChangeAdhocChannel(wlan_priva
 		return WLAN_STATUS_SUCCESS;
 	}
 
-	PRINTM(INFO, "Updating Channel from %d to %d\n",
+	dprintk(1, "Updating Channel from %d to %d\n",
 	       Adapter->CurBssParams.channel, Adapter->AdhocChannel);
 
 	SetCurrentChannel(priv, Adapter->AdhocChannel);
@@ -258,7 +258,7 @@ static int ChangeAdhocChannel(wlan_priva
 	UpdateCurrentChannel(priv);
 
 	if (Adapter->CurBssParams.channel != Adapter->AdhocChannel) {
-		PRINTM(INFO, "Failed to updated Channel to %d, channel = %d\n",
+		dprintk(1, "Failed to updated Channel to %d, channel = %d\n",
 		       Adapter->AdhocChannel, Adapter->CurBssParams.channel);
 		LEAVE();
 		return WLAN_STATUS_FAILURE;
@@ -268,14 +268,14 @@ static int ChangeAdhocChannel(wlan_priva
 		int i;
 		struct WLAN_802_11_SSID curAdhocSsid;
 
-		PRINTM(INFO, "Channel Changed while in an IBSS\n");
+		dprintk(1, "Channel Changed while in an IBSS\n");
 
 		/* Copy the current ssid */
 		memcpy(&curAdhocSsid, &Adapter->CurBssParams.ssid,
 		       sizeof(struct WLAN_802_11_SSID));
 
 		/* Exit Adhoc mode */
-		PRINTM(INFO, "In ChangeAdhocChannel(): Sending Adhoc Stop\n");
+		dprintk(1, "In ChangeAdhocChannel(): Sending Adhoc Stop\n");
 		ret = libertas_stop_adhoc_network(priv);
 
 		if (ret) {
@@ -292,12 +292,12 @@ static int ChangeAdhocChannel(wlan_priva
 				   Wlan802_11IBSS);
 
 		if (i >= 0) {
-			PRINTM(INFO, "SSID found at %d in List,"
+			dprintk(1, "SSID found at %d in List,"
 			       "so join\n", i);
 			libertas_join_adhoc_network(priv, &Adapter->ScanTable[i]);
 		} else {
 			// else send START command
-			PRINTM(INFO, "SSID not found in list, "
+			dprintk(1, "SSID not found in list, "
 			       "so creating adhoc with ssid = %s\n",
 			       curAdhocSsid.Ssid);
 			libertas_start_adhoc_network(priv, &curAdhocSsid);
@@ -323,7 +323,7 @@ int wlan_radio_ioctl(wlan_private * priv
 	ENTER();
 
 	if (Adapter->RadioOn != option) {
-		PRINTM(INFO, "Switching %s the Radio\n", option ? "On" : "Off");
+		dprintk(1, "Switching %s the Radio\n", option ? "On" : "Off");
 		Adapter->RadioOn = option;
 
 		ret = libertas_prepare_and_send_command(priv,
@@ -374,12 +374,12 @@ static int get_active_data_rates(wlan_ad
 	if (Adapter->MediaConnectStatus != WlanMediaStateConnected) {
 		if (Adapter->InfrastructureMode == Wlan802_11Infrastructure) {
 			//Infra. mode
-			PRINTM(INFO, "Infra\n");
+			dprintk(1, "Infra\n");
 			k = CopyRates(rates, k, libertas_supported_rates,
 				      sizeof(libertas_supported_rates));
 		} else {
 			//ad-hoc mode
-			PRINTM(INFO, "Adhoc G\n");
+			dprintk(1, "Adhoc G\n");
 			k = CopyRates(rates, k, libertas_adhoc_rates_g,
 				      sizeof(libertas_adhoc_rates_g));
 		}
@@ -475,7 +475,7 @@ static int wlan_get_freq(struct net_devi
 
 	if (!cfp) {
 		if (Adapter->CurBssParams.channel)
-			PRINTM(INFO, "Invalid channel=%d\n",
+			dprintk(1, "Invalid channel=%d\n",
 			       Adapter->CurBssParams.channel);
 		return -EINVAL;
 	}
@@ -483,7 +483,7 @@ static int wlan_get_freq(struct net_devi
 	fwrq->m = (long)cfp->Freq * 100000;
 	fwrq->e = 1;
 
-	PRINTM(INFO, "freq=%u\n", fwrq->m);
+	dprintk(1, "freq=%u\n", fwrq->m);
 
 	LEAVE();
 	return WLAN_STATUS_SUCCESS;
@@ -799,7 +799,7 @@ static int wlan_get_txpow(struct net_dev
 		return ret;
 	}
 
-	PRINTM(INFO, "TXPOWER GET %d dbm.\n", Adapter->TxPowerLevel);
+	dprintk(1, "TXPOWER GET %d dbm.\n", Adapter->TxPowerLevel);
 	vwrq->value = Adapter->TxPowerLevel;
 	vwrq->fixed = 1;
 	if (Adapter->RadioOn) {
@@ -970,7 +970,7 @@ static int wlan_get_range(struct net_dev
 		range->bitrate[i] = (rates[i] & 0x7f) * 500000;
 	}
 	range->num_bitrates = i;
-	PRINTM(INFO, "IW_MAX_BITRATES=%d num_bitrates=%d\n", IW_MAX_BITRATES,
+	dprintk(1, "IW_MAX_BITRATES=%d num_bitrates=%d\n", IW_MAX_BITRATES,
 	       range->num_bitrates);
 
 	range->num_frequency = 0;
@@ -983,18 +983,18 @@ static int wlan_get_range(struct net_dev
 		    &Adapter->parsed_region_chan;
 
 		if (parsed_region_chan == NULL) {
-			PRINTM(INFO, "11D:parsed_region_chan is NULL\n");
+			dprintk(1, "11D:parsed_region_chan is NULL\n");
 			LEAVE();
 			return 0;
 		}
 		band = parsed_region_chan->band;
-		PRINTM(INFO, "band=%d NoOfChan=%d\n", band,
+		dprintk(1, "band=%d NoOfChan=%d\n", band,
 		       parsed_region_chan->NoOfChan);
 
 		for (i = 0; (range->num_frequency < IW_MAX_FREQUENCIES)
 		     && (i < parsed_region_chan->NoOfChan); i++) {
 			chan_no = parsed_region_chan->chanPwr[i].chan;
-			PRINTM(INFO, "chan_no=%d\n", chan_no);
+			dprintk(1, "chan_no=%d\n", chan_no);
 			range->freq[range->num_frequency].i = (long)chan_no;
 			range->freq[range->num_frequency].m =
 			    (long)libertas_chan_2_freq(chan_no, band) * 100000;
@@ -1023,7 +1023,7 @@ static int wlan_get_range(struct net_dev
 		}
 	}
 
-	PRINTM(INFO, "IW_MAX_FREQUENCIES=%d num_frequency=%d\n",
+	dprintk(1, "IW_MAX_FREQUENCIES=%d num_frequency=%d\n",
 	       IW_MAX_FREQUENCIES, range->num_frequency);
 
 	range->num_channels = range->num_frequency;
@@ -1148,11 +1148,11 @@ static int wlan_set_power(struct net_dev
 	}
 
 	if ((vwrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
-		PRINTM(INFO,
+		dprintk(1,
 		       "Setting power timeout command is not supported\n");
 		return -EINVAL;
 	} else if ((vwrq->flags & IW_POWER_TYPE) == IW_POWER_PERIOD) {
-		PRINTM(INFO, "Setting power period command is not supported\n");
+		dprintk(1, "Setting power period command is not supported\n");
 		return -EINVAL;
 	}
 
@@ -1744,8 +1744,8 @@ static struct iw_statistics *wlan_get_wi
 		    CAL_NF(Adapter->NF[TYPE_BEACON][TYPE_NOAVG]);
 	}
 
-	PRINTM(INFO, "Signal Level = %#x\n", priv->wstats.qual.level);
-	PRINTM(INFO, "Noise = %#x\n", priv->wstats.qual.noise);
+	dprintk(1, "Signal Level = %#x\n", priv->wstats.qual.level);
+	dprintk(1, "Noise = %#x\n", priv->wstats.qual.noise);
 
 	rssi = priv->wstats.qual.level - priv->wstats.qual.noise;
 	if (rssi < 15)
@@ -1842,7 +1842,7 @@ int wlan_set_freq(struct net_device *dev
 
 		cfp = find_cfp_by_band_and_freq(Adapter, 0, f);
 		if (!cfp) {
-			PRINTM(INFO, "Invalid freq=%ld\n", f);
+			dprintk(1, "Invalid freq=%ld\n", f);
 			return -EINVAL;
 		}
 
@@ -1874,7 +1874,7 @@ int wlan_set_freq(struct net_device *dev
 				 */
 				if (Adapter->SecInfo.WEPStatus ==
 				    Wlan802_11WEPEnabled) {
-					PRINTM(INFO, "set_freq: WEP Enabled\n");
+					dprintk(1, "set_freq: WEP Enabled\n");
 					ret = libertas_prepare_and_send_command(priv,
 								    HostCmd_CMD_802_11_SET_WEP,
 								    HostCmd_ACT_ADD,
@@ -1956,7 +1956,7 @@ int wlan_set_rate(struct net_device *dev
 
 	ENTER();
 
-	PRINTM(INFO, "Vwrq->value = %d\n", vwrq->value);
+	dprintk(1, "Vwrq->value = %d\n", vwrq->value);
 
 	if (vwrq->value == -1) {
 		action = HostCmd_ACT_SET_TX_AUTO;	// Auto
@@ -1973,14 +1973,14 @@ int wlan_set_rate(struct net_device *dev
 		get_active_data_rates(Adapter, rates);
 		rate = rates;
 		while (*rate) {
-			PRINTM(INFO, "Rate=0x%X  Wanted=0x%X\n", *rate,
+			dprintk(1, "Rate=0x%X  Wanted=0x%X\n", *rate,
 			       data_rate);
 			if ((*rate & 0x7f) == (data_rate & 0x7f))
 				break;
 			rate++;
 		}
 		if (!*rate) {
-			PRINTM(MSG, "The fixed data rate 0x%X is out "
+			printk(KERN_ALERT "The fixed data rate 0x%X is out "
 			       "of range.\n", data_rate);
 			return -EINVAL;
 		}
@@ -2048,24 +2048,24 @@ int wlan_set_mode(struct net_device *dev
 
 	switch (*uwrq) {
 	case IW_MODE_ADHOC:
-		PRINTM(INFO, "Wanted Mode is ad-hoc: current DataRate=%#x\n",
+		dprintk(1, "Wanted Mode is ad-hoc: current DataRate=%#x\n",
 		       adapter->DataRate);
 		new_mode = Wlan802_11IBSS;
 		adapter->AdhocChannel = DEFAULT_AD_HOC_CHANNEL;
 		break;
 
 	case IW_MODE_INFRA:
-		PRINTM(INFO, "Wanted Mode is Infrastructure\n");
+		dprintk(1, "Wanted Mode is Infrastructure\n");
 		new_mode = Wlan802_11Infrastructure;
 		break;
 
 	case IW_MODE_AUTO:
-		PRINTM(INFO, "Wanted Mode is Auto\n");
+		dprintk(1, "Wanted Mode is Auto\n");
 		new_mode = Wlan802_11AutoUnknown;
 		break;
 
 	default:
-		PRINTM(INFO, "Wanted Mode is Unknown: 0x%x\n", *uwrq);
+		dprintk(1, "Wanted Mode is Unknown: 0x%x\n", *uwrq);
 		return -EINVAL;
 	}
 
@@ -2109,7 +2109,7 @@ static int wlan_get_encode(struct net_de
 
 	ENTER();
 
-	PRINTM(INFO, "flags=0x%x index=%d length=%d wep_tx_keyidx=%d\n",
+	dprintk(1, "flags=0x%x index=%d length=%d wep_tx_keyidx=%d\n",
 	       dwrq->flags, index, dwrq->length, adapter->wep_tx_keyidx);
 
 	dwrq->flags = 0;
@@ -2165,11 +2165,11 @@ static int wlan_get_encode(struct net_de
 
 	dwrq->flags |= IW_ENCODE_NOKEY;
 
-	PRINTM(INFO, "Key:%02x:%02x:%02x:%02x:%02x:%02x KeyLen=%d\n",
+	dprintk(1, "Key:%02x:%02x:%02x:%02x:%02x:%02x KeyLen=%d\n",
 	       extra[0], extra[1], extra[2],
 	       extra[3], extra[4], extra[5], dwrq->length);
 
-	PRINTM(INFO, "Return flags=0x%x\n", dwrq->flags);
+	dprintk(1, "Return flags=0x%x\n", dwrq->flags);
 
 	LEAVE();
 	return WLAN_STATUS_SUCCESS;
@@ -2222,7 +2222,7 @@ static int wlan_set_wep_key(struct assoc
 	if (set_tx_key) {
 		/* Ensure the chosen key is valid */
 		if (!pKey->len) {
-			PRINTM(INFO, "Key not set, so cannot enable it\n");
+			dprintk(1, "Key not set, so cannot enable it\n");
 			LEAVE();
 			return -EINVAL;
 		}
@@ -2509,7 +2509,7 @@ static int wlan_set_encodeext(struct net
 			&& (ext->key_len != KEY_LEN_WPA_TKIP))
 		    || ((alg == IW_ENCODE_ALG_CCMP)
 		        && (ext->key_len != KEY_LEN_WPA_AES))) {
-				PRINTM(INFO, "Invalid size %d for key of alg"
+				dprintk(1, "Invalid size %d for key of alg"
 				       "type %d.\n",
 				       ext->key_len,
 				       alg);
@@ -2850,7 +2850,7 @@ int wlan_set_txpow(struct net_device *de
 	if (vwrq->fixed == 0)
 		dbm = 0xffff;
 
-	PRINTM(INFO, "<1>TXPOWER SET %d dbm.\n", dbm);
+	dprintk(1, "<1>TXPOWER SET %d dbm.\n", dbm);
 
 	ret = libertas_prepare_and_send_command(priv,
 				    HostCmd_CMD_802_11_RF_TX_POWER,
@@ -2936,7 +2936,7 @@ #ifdef REASSOCIATION
 	del_timer(&Adapter->reassoc_timer);
 
 	if (down_interruptible(&Adapter->ReassocSem)) {
-		PRINTM(FATAL, "%s(%d): could not acquire reassociation lock\n",
+		printk(KERN_INFO "%s(%d): could not acquire reassociation lock\n",
 			__func__, __LINE__);
 		return -EBUSY;
 	}
@@ -2966,7 +2966,7 @@ #endif /* REASSOCIATION */
 		ssid.SsidLength = ssid_len;
 	}
 
-	PRINTM(INFO, "Requested new SSID = %s\n",
+	dprintk(1, "Requested new SSID = %s\n",
 	       (ssid.SsidLength > 0) ? (char *)ssid.Ssid : "any");
 
 out:
@@ -3021,7 +3021,7 @@ int wlan_set_wap(struct net_device *dev,
 	if (awrq->sa_family != ARPHRD_ETHER)
 		return -EINVAL;
 
-	PRINTM(INFO, "ASSOC: WAP: sa_data: " MAC_FMT "\n", MAC_ARG(awrq->sa_data));
+	dprintk(1, "ASSOC: WAP: sa_data: " MAC_FMT "\n", MAC_ARG(awrq->sa_data));
 
 #ifdef REASSOCIATION
 	// cancel re-association timer if there's one


More information about the Commits-kernel mailing list