Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7cf7bae authored by Moritz Muehlenhoff's avatar Moritz Muehlenhoff Committed by Greg Kroah-Hartman
Browse files

Staging: wlan-ng: Replace WLAN_LOG_DEBUG() with printk(KERN_DEBUG

parent 16910554
Loading
Loading
Loading
Loading
+46 −46
Original line number Diff line number Diff line
@@ -359,20 +359,20 @@ get_active_ctlx(hfa384x_t *hw)
void
dbprint_urb(struct urb* urb)
{
	WLAN_LOG_DEBUG(3,"urb->pipe=0x%08x\n", urb->pipe);
	WLAN_LOG_DEBUG(3,"urb->status=0x%08x\n", urb->status);
	WLAN_LOG_DEBUG(3,"urb->transfer_flags=0x%08x\n", urb->transfer_flags);
	WLAN_LOG_DEBUG(3,"urb->transfer_buffer=0x%08x\n", (unsigned int)urb->transfer_buffer);
	WLAN_LOG_DEBUG(3,"urb->transfer_buffer_length=0x%08x\n", urb->transfer_buffer_length);
	WLAN_LOG_DEBUG(3,"urb->actual_length=0x%08x\n", urb->actual_length);
	WLAN_LOG_DEBUG(3,"urb->bandwidth=0x%08x\n", urb->bandwidth);
	WLAN_LOG_DEBUG(3,"urb->setup_packet(ctl)=0x%08x\n", (unsigned int)urb->setup_packet);
	WLAN_LOG_DEBUG(3,"urb->start_frame(iso/irq)=0x%08x\n", urb->start_frame);
	WLAN_LOG_DEBUG(3,"urb->interval(irq)=0x%08x\n", urb->interval);
	WLAN_LOG_DEBUG(3,"urb->error_count(iso)=0x%08x\n", urb->error_count);
	WLAN_LOG_DEBUG(3,"urb->timeout=0x%08x\n", urb->timeout);
	WLAN_LOG_DEBUG(3,"urb->context=0x%08x\n", (unsigned int)urb->context);
	WLAN_LOG_DEBUG(3,"urb->complete=0x%08x\n", (unsigned int)urb->complete);
	pr_debug("urb->pipe=0x%08x\n", urb->pipe);
	pr_debug("urb->status=0x%08x\n", urb->status);
	pr_debug("urb->transfer_flags=0x%08x\n", urb->transfer_flags);
	pr_debug("urb->transfer_buffer=0x%08x\n", (unsigned int)urb->transfer_buffer);
	pr_debug("urb->transfer_buffer_length=0x%08x\n", urb->transfer_buffer_length);
	pr_debug("urb->actual_length=0x%08x\n", urb->actual_length);
	pr_debug("urb->bandwidth=0x%08x\n", urb->bandwidth);
	pr_debug("urb->setup_packet(ctl)=0x%08x\n", (unsigned int)urb->setup_packet);
	pr_debug("urb->start_frame(iso/irq)=0x%08x\n", urb->start_frame);
	pr_debug("urb->interval(irq)=0x%08x\n", urb->interval);
	pr_debug("urb->error_count(iso)=0x%08x\n", urb->error_count);
	pr_debug("urb->timeout=0x%08x\n", urb->timeout);
	pr_debug("urb->context=0x%08x\n", (unsigned int)urb->context);
	pr_debug("urb->complete=0x%08x\n", (unsigned int)urb->complete);
}
#endif

@@ -725,7 +725,7 @@ usbctlx_get_status(const hfa384x_usb_cmdresp_t *cmdresp,
	result->resp1 = hfa384x2host_16(cmdresp->resp1);
	result->resp2 = hfa384x2host_16(cmdresp->resp2);

	WLAN_LOG_DEBUG(4, "cmdresult:status=0x%04x "
	pr_debug("cmdresult:status=0x%04x "
	                  "resp0=0x%04x resp1=0x%04x resp2=0x%04x\n",
	                result->status,
	                result->resp0,
@@ -860,7 +860,7 @@ static int usbctlx_rmem_completor_fn(usbctlx_completor_t *head)
{
	usbctlx_rmem_completor_t *complete = (usbctlx_rmem_completor_t*)head;

	WLAN_LOG_DEBUG(4,"rmemresp:len=%d\n", complete->rmemresp->frmlen);
	pr_debug("rmemresp:len=%d\n", complete->rmemresp->frmlen);
	memcpy(complete->data, complete->rmemresp->data, complete->len);
	return 0;
}
@@ -1095,7 +1095,7 @@ hfa384x_cmd_initialize(hfa384x_t *hw)
	result = hfa384x_docmd_wait(hw, &cmd);


	WLAN_LOG_DEBUG(3,"cmdresp.init: "
	pr_debug("cmdresp.init: "
		"status=0x%04x, resp0=0x%04x, "
		"resp1=0x%04x, resp2=0x%04x\n",
		cmd.result.status,
@@ -1277,7 +1277,7 @@ int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr,
	int	result = 0;
	hfa384x_metacmd_t cmd;

	WLAN_LOG_DEBUG(5,
	printk(KERN_DEBUG
		"mode=%d, lowaddr=0x%04x, highaddr=0x%04x, codelen=%d\n",
		mode, lowaddr, highaddr, codelen);

@@ -1564,7 +1564,7 @@ hfa384x_docmd(

	ctlx->outbufsize = sizeof(ctlx->outbuf.cmdreq);

	WLAN_LOG_DEBUG(4, "cmdreq: cmd=0x%04x "
	pr_debug("cmdreq: cmd=0x%04x "
		"parm0=0x%04x parm1=0x%04x parm2=0x%04x\n",
		cmd->cmd,
		cmd->parm0,
@@ -1836,14 +1836,14 @@ hfa384x_dormem(

	ctlx->outbufsize = sizeof(ctlx->outbuf.rmemreq);

	WLAN_LOG_DEBUG(4,
	pr_debug(
		"type=0x%04x frmlen=%d offset=0x%04x page=0x%04x\n",
		ctlx->outbuf.rmemreq.type,
		ctlx->outbuf.rmemreq.frmlen,
		ctlx->outbuf.rmemreq.offset,
		ctlx->outbuf.rmemreq.page);

	WLAN_LOG_DEBUG(4,"pktsize=%zd\n",
	pr_debug("pktsize=%zd\n",
		ROUNDUP64(sizeof(ctlx->outbuf.rmemreq)));

	ctlx->reapable = mode;
@@ -1918,7 +1918,7 @@ hfa384x_dowmem(
	int			result;
	hfa384x_usbctlx_t	*ctlx;

	WLAN_LOG_DEBUG(5, "page=0x%04x offset=0x%04x len=%d\n",
	pr_debug("page=0x%04x offset=0x%04x len=%d\n",
		page,offset,len);

	ctlx = usbctlx_alloc();
@@ -2109,7 +2109,7 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw)
	/* Check that a port isn't active */
	for ( i = 0; i < HFA384x_PORTID_MAX; i++) {
		if ( hw->port_enabled[i] ) {
			WLAN_LOG_DEBUG(1,"called when port enabled.\n");
			pr_debug("called when port enabled.\n");
			return -EINVAL;
		}
	}
@@ -2133,7 +2133,7 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw)
	}
	hw->dltimeout = hfa384x2host_16(hw->dltimeout);

	WLAN_LOG_DEBUG(1,"flashdl_enable\n");
	pr_debug("flashdl_enable\n");

	hw->dlstate = HFA384x_DLSTATE_FLASHENABLED;

@@ -2167,7 +2167,7 @@ int hfa384x_drvr_flashdl_disable(hfa384x_t *hw)
		return -EINVAL;
	}

	WLAN_LOG_DEBUG(1,"flashdl_enable\n");
	pr_debug("flashdl_enable\n");

	/* There isn't much we can do at this point, so I don't */
	/*  bother  w/ the return value */
@@ -2229,7 +2229,7 @@ hfa384x_drvr_flashdl_write(
	int		i;
	int		j;

	WLAN_LOG_DEBUG(5,"daddr=0x%08x len=%d\n", daddr, len);
	pr_debug("daddr=0x%08x len=%d\n", daddr, len);

	/* Check that we're in the flash download state */
	if ( hw->dlstate != HFA384x_DLSTATE_FLASHENABLED ) {
@@ -2242,7 +2242,7 @@ hfa384x_drvr_flashdl_write(
	/* NOTE: dlbuffer RID stores the address in AUX format */
	dlbufaddr = HFA384x_ADDR_AUX_MKFLAT(
			hw->bufinfo.page, hw->bufinfo.offset);
	WLAN_LOG_DEBUG(5,
	pr_debug(
		"dlbuf.page=0x%04x dlbuf.offset=0x%04x dlbufaddr=0x%08x\n",
		hw->bufinfo.page, hw->bufinfo.offset, dlbufaddr);

@@ -2496,7 +2496,7 @@ hfa384x_drvr_ramdl_disable(hfa384x_t *hw)
		return -EINVAL;
	}

	WLAN_LOG_DEBUG(3,"ramdl_disable()\n");
	pr_debug("ramdl_disable()\n");

	/* There isn't much we can do at this point, so I don't */
	/*  bother  w/ the return value */
@@ -2555,7 +2555,7 @@ hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr)
		return -EINVAL;
	}

	WLAN_LOG_DEBUG(3,"ramdl_enable, exeaddr=0x%08x\n", exeaddr);
	pr_debug("ramdl_enable, exeaddr=0x%08x\n", exeaddr);

	/* Call the download(1,addr) function */
	lowaddr = HFA384x_ADDR_CMD_MKOFF(exeaddr);
@@ -2568,7 +2568,7 @@ hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr)
		/* Set the download state */
		hw->dlstate = HFA384x_DLSTATE_RAMENABLED;
	} else {
		WLAN_LOG_DEBUG(1,
		pr_debug(
			"cmd_download(0x%04x, 0x%04x) failed, result=%d.\n",
			lowaddr,
			hiaddr,
@@ -2773,7 +2773,7 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len)
	result = pdaok ? 0 : -ENODATA;

	if ( result ) {
		WLAN_LOG_DEBUG(3,"Failure: pda is not okay\n");
		pr_debug("Failure: pda is not okay\n");
	}

	return result;
@@ -2893,9 +2893,9 @@ int hfa384x_drvr_start(hfa384x_t *hw)
			usb_kill_urb(&hw->rx_urb);
			goto done;
		} else {
			WLAN_LOG_DEBUG(0, "First cmd_initialize() failed (result %d),\n",
			pr_debug("First cmd_initialize() failed (result %d),\n",
				result1);
			WLAN_LOG_DEBUG(0, "but second attempt succeeded. All should be ok\n");
			pr_debug("but second attempt succeeded. All should be ok\n");
		}
	} else if (result2 != 0) {
		printk(KERN_WARNING
@@ -3490,18 +3490,18 @@ static void hfa384x_usbin_callback(struct urb *urb)

	case -ENODEV:
	case -ESHUTDOWN:
		WLAN_LOG_DEBUG(3,"status=%d, device removed.\n", urb->status);
		pr_debug("status=%d, device removed.\n", urb->status);
		action = ABORT;
		break;

	case -ENOENT:
	case -ECONNRESET:
		WLAN_LOG_DEBUG(3,"status=%d, urb explicitly unlinked.\n", urb->status);
		pr_debug("status=%d, urb explicitly unlinked.\n", urb->status);
		action = ABORT;
		break;

	default:
		WLAN_LOG_DEBUG(3,"urb status=%d, transfer flags=0x%x\n",
		pr_debug("urb status=%d, transfer flags=0x%x\n",
		                 urb->status, urb->transfer_flags);
		++(wlandev->linux_stats.rx_errors);
		action = RESUBMIT;
@@ -3561,17 +3561,17 @@ static void hfa384x_usbin_callback(struct urb *urb)
		break;

	case HFA384x_USB_BUFAVAIL:
		WLAN_LOG_DEBUG(3,"Received BUFAVAIL packet, frmlen=%d\n",
		pr_debug("Received BUFAVAIL packet, frmlen=%d\n",
			usbin->bufavail.frmlen);
		break;

	case HFA384x_USB_ERROR:
		WLAN_LOG_DEBUG(3,"Received USB_ERROR packet, errortype=%d\n",
		pr_debug("Received USB_ERROR packet, errortype=%d\n",
			usbin->usberror.errortype);
		break;

	default:
		WLAN_LOG_DEBUG(3,"Unrecognized USBIN packet, type=%x, status=%d\n",
		pr_debug("Unrecognized USBIN packet, type=%x, status=%d\n",
			usbin->type, urb_status);
		break;
	} /* switch */
@@ -3670,7 +3670,7 @@ static void hfa384x_usbin_ctlx(hfa384x_t *hw, hfa384x_usbin_t *usbin,
			 * our request has been acknowledged. Odd,
			 * but our OUT URB is still alive...
			 */
			WLAN_LOG_DEBUG(0, "Causality violation: please reboot Universe, or email linux-wlan-devel@lists.linux-wlan.com\n");
			pr_debug("Causality violation: please reboot Universe, or email linux-wlan-devel@lists.linux-wlan.com\n");
			ctlx->state = CTLX_RESP_COMPLETE;
			break;

@@ -3828,7 +3828,7 @@ static void hfa384x_usbin_rx(wlandevice_t *wlandev, struct sk_buff *skb)
			hfa384x_int_rxmonitor( wlandev, &usbin->rxfrm);
			dev_kfree_skb(skb);
		} else {
			WLAN_LOG_DEBUG(3,"Received monitor frame: FCSerr set\n");
			pr_debug("Received monitor frame: FCSerr set\n");
		}
		break;

@@ -3889,7 +3889,7 @@ static void hfa384x_int_rxmonitor( wlandevice_t *wlandev, hfa384x_usb_rxfrm_t *r
	if ( skblen >
	     (sizeof(p80211_caphdr_t) +
	      WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN + WLAN_CRC_LEN) ) {
		WLAN_LOG_DEBUG(1, "overlen frm: len=%zd\n",
		pr_debug("overlen frm: len=%zd\n",
			       skblen - sizeof(p80211_caphdr_t));
	}

@@ -4076,7 +4076,7 @@ static void hfa384x_ctlxout_callback(struct urb *urb)
	hfa384x_usbctlx_t	*ctlx;
	unsigned long	flags;

	WLAN_LOG_DEBUG(3,"urb->status=%d\n", urb->status);
	pr_debug("urb->status=%d\n", urb->status);
#ifdef DEBUG_USB
	dbprint_urb(urb);
#endif
@@ -4324,7 +4324,7 @@ hfa384x_usb_throttlefn(unsigned long data)
	 * We need to check BOTH the RX and the TX throttle controls,
	 * so we use the bitwise OR instead of the logical OR.
	 */
	WLAN_LOG_DEBUG(3, "flags=0x%lx\n", hw->usb_flags);
	pr_debug("flags=0x%lx\n", hw->usb_flags);
	if ( !hw->wlandev->hwremoved &&
	     (
	       (test_and_clear_bit(THROTTLE_RX, &hw->usb_flags) &&
@@ -4464,14 +4464,14 @@ hfa384x_isgood_pdrcode(u16 pdrcode)
	default:
		if ( pdrcode < 0x1000 ) {
			/* code is OK, but we don't know exactly what it is */
			WLAN_LOG_DEBUG(3,
			pr_debug(
				"Encountered unknown PDR#=0x%04x, "
				"assuming it's ok.\n",
				pdrcode);
			return 1;
		} else {
			/* bad code */
			WLAN_LOG_DEBUG(3,
			pr_debug(
				"Encountered unknown PDR#=0x%04x, "
				"(>=0x1000), assuming it's bad.\n",
				pdrcode);
+12 −12
Original line number Diff line number Diff line
@@ -129,12 +129,12 @@ int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
	memcpy(&e_hdr, skb->data, sizeof(e_hdr));

	if (skb->len <= 0) {
		WLAN_LOG_DEBUG(1, "zero-length skb!\n");
		pr_debug("zero-length skb!\n");
		return 1;
	}

	if ( ethconv == WLAN_ETHCONV_ENCAP ) { /* simplest case */
	        WLAN_LOG_DEBUG(3, "ENCAP len: %d\n", skb->len);
	        pr_debug("ENCAP len: %d\n", skb->len);
		/* here, we don't care what kind of ether frm. Just stick it */
		/*  in the 80211 payload */
		/* which is to say, leave the skb alone. */
@@ -142,7 +142,7 @@ int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
		/* step 1: classify ether frame, DIX or 802.3? */
		proto = ntohs(e_hdr.type);
		if ( proto <= 1500 ) {
		        WLAN_LOG_DEBUG(3, "802.3 len: %d\n", skb->len);
		        pr_debug("802.3 len: %d\n", skb->len);
                        /* codes <= 1500 reserved for 802.3 lengths */
			/* it's 802.3, pass ether payload unchanged,  */

@@ -152,7 +152,7 @@ int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
			/*   leave off any PAD octets.  */
			skb_trim(skb, proto);
		} else {
		        WLAN_LOG_DEBUG(3, "DIXII len: %d\n", skb->len);
		        pr_debug("DIXII len: %d\n", skb->len);
			/* it's DIXII, time for some conversion */

			/* trim off ethernet header */
@@ -327,7 +327,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
				       skb->data + payload_offset,
				       skb->data + payload_offset + payload_length - 4))) {
			/* de-wep failed, drop skb. */
			WLAN_LOG_DEBUG(1, "Host de-WEP failed, dropping frame (%d).\n", foo);
			pr_debug("Host de-WEP failed, dropping frame (%d).\n", foo);
			wlandev->rx.decrypt_err++;
			return 2;
		}
@@ -352,7 +352,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
	     ( e_llc->dsap != 0xaa || e_llc->ssap != 0xaa ) &&
	     ((memcmp(daddr, e_hdr->daddr, WLAN_ETHADDR_LEN) == 0) ||
	     (memcmp(saddr, e_hdr->saddr, WLAN_ETHADDR_LEN) == 0))) {
		WLAN_LOG_DEBUG(3, "802.3 ENCAP len: %d\n", payload_length);
		pr_debug("802.3 ENCAP len: %d\n", payload_length);
		/* 802.3 Encapsulated */
		/* Test for an overlength frame */
		if ( payload_length > (netdev->mtu + WLAN_ETHHDR_LEN)) {
@@ -377,7 +377,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
		    (p80211_stt_findproto(le16_to_cpu(e_snap->type)))) ||
		    (memcmp( e_snap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN)!=0)))
	{
		WLAN_LOG_DEBUG(3, "SNAP+RFC1042 len: %d\n", payload_length);
		pr_debug("SNAP+RFC1042 len: %d\n", payload_length);
		/* it's a SNAP + RFC1042 frame && protocol is in STT */
		/* build 802.3 + RFC1042 */

@@ -406,7 +406,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
		    (e_llc->dsap == 0xaa) &&
		    (e_llc->ssap == 0xaa) &&
		    (e_llc->ctl == 0x03) ) {
		WLAN_LOG_DEBUG(3, "802.1h/RFC1042 len: %d\n", payload_length);
		pr_debug("802.1h/RFC1042 len: %d\n", payload_length);
		/* it's an 802.1h frame || (an RFC1042 && protocol is not in STT) */
		/* build a DIXII + RFC894 */

@@ -440,7 +440,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
		/* chop off the 802.11 CRC */
		skb_trim(skb, skb->len - WLAN_CRC_LEN);
	} else {
		WLAN_LOG_DEBUG(3, "NON-ENCAP len: %d\n", payload_length);
		pr_debug("NON-ENCAP len: %d\n", payload_length);
		/* any NON-ENCAP */
		/* it's a generic 80211+LLC or IPX 'Raw 802.3' */
		/*  build an 802.3 frame */
@@ -546,17 +546,17 @@ p80211skb_rxmeta_detach(struct sk_buff *skb)

	/* Sanity checks */
	if ( skb==NULL ) {			/* bad skb */
		WLAN_LOG_DEBUG(1, "Called w/ null skb.\n");
		pr_debug("Called w/ null skb.\n");
		goto exit;
	}
	frmmeta = P80211SKB_FRMMETA(skb);
	if ( frmmeta == NULL ) { 		/* no magic */
		WLAN_LOG_DEBUG(1, "Called w/ bad frmmeta magic.\n");
		pr_debug("Called w/ bad frmmeta magic.\n");
		goto exit;
	}
	rxmeta = frmmeta->rx;
	if ( rxmeta == NULL ) {			/* bad meta ptr */
		WLAN_LOG_DEBUG(1, "Called w/ bad rxmeta ptr.\n");
		pr_debug("Called w/ bad rxmeta ptr.\n");
		goto exit;
	}

+14 −14
Original line number Diff line number Diff line
@@ -344,7 +344,7 @@ static void p80211netdev_rx_bh(unsigned long arg)
					netif_rx_ni(skb);
					continue;
				}
				WLAN_LOG_DEBUG(1, "p80211_to_ether failed.\n");
				pr_debug( "p80211_to_ether failed.\n");
			}
		}
		dev_kfree_skb(skb);
@@ -392,7 +392,7 @@ static int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netd
	memset(&p80211_wep, 0, sizeof(p80211_metawep_t));

	if ( netif_queue_stopped(netdev) ) {
		WLAN_LOG_DEBUG(1, "called when queue stopped.\n");
		pr_debug("called when queue stopped.\n");
		result = 1;
		goto failed;
	}
@@ -433,7 +433,7 @@ static int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netd
	} else {
		if ( skb_ether_to_p80211(wlandev, wlandev->ethconv, skb, &p80211_hdr, &p80211_wep) != 0 ) {
			/* convert failed */
			WLAN_LOG_DEBUG(1, "ether_to_80211(%d) failed.\n",
			pr_debug("ether_to_80211(%d) failed.\n",
					wlandev->ethconv);
			result = 1;
			goto failed;
@@ -459,17 +459,17 @@ static int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netd
		result = 0;
	} else if ( txresult == 1 ) {
		/* success, no more avail */
		WLAN_LOG_DEBUG(3, "txframe success, no more bufs\n");
		pr_debug("txframe success, no more bufs\n");
		/* netdev->tbusy = 1;  don't set here, irqhdlr */
		/*   may have already cleared it */
		result = 0;
	} else if ( txresult == 2 ) {
		/* alloc failure, drop frame */
		WLAN_LOG_DEBUG(3, "txframe returned alloc_fail\n");
		pr_debug("txframe returned alloc_fail\n");
		result = 1;
	} else {
		/* buffer full or queue busy, drop frame. */
		WLAN_LOG_DEBUG(3, "txframe returned full or busy\n");
		pr_debug("txframe returned full or busy\n");
		result = 1;
	}

@@ -593,7 +593,7 @@ static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd)
	wlandevice_t		*wlandev = dev->ml_priv;
	u8			*msgbuf;

	WLAN_LOG_DEBUG(2, "rx'd ioctl, cmd=%d, len=%d\n", cmd, req->len);
	pr_debug("rx'd ioctl, cmd=%d, len=%d\n", cmd, req->len);

#ifdef SIOCETHTOOL
	if (cmd == SIOCETHTOOL) {
@@ -992,7 +992,7 @@ static int p80211_rx_typedrop( wlandevice_t *wlandev, u16 fc)
	ftype = WLAN_GET_FC_FTYPE(fc);
	fstype = WLAN_GET_FC_FSTYPE(fc);
#if 0
	WLAN_LOG_DEBUG(4,
	pr_debug(
		"rx_typedrop : ftype=%d fstype=%d.\n", ftype, fstype);
#endif
	switch ( ftype ) {
@@ -1002,7 +1002,7 @@ static int p80211_rx_typedrop( wlandevice_t *wlandev, u16 fc)
			drop = 1;
			break;
		}
		WLAN_LOG_DEBUG(3, "rx'd mgmt:\n");
		pr_debug("rx'd mgmt:\n");
		wlandev->rx.mgmt++;
		switch( fstype ) {
		case WLAN_FSTYPE_ASSOCREQ:
@@ -1064,7 +1064,7 @@ static int p80211_rx_typedrop( wlandevice_t *wlandev, u16 fc)
			drop = 1;
			break;
		}
		WLAN_LOG_DEBUG(3, "rx'd ctl:\n");
		pr_debug("rx'd ctl:\n");
		wlandev->rx.ctl++;
		switch( fstype ) {
		case WLAN_FSTYPE_PSPOLL:
@@ -1116,19 +1116,19 @@ static int p80211_rx_typedrop( wlandevice_t *wlandev, u16 fc)
			wlandev->rx.data__cfack_cfpoll++;
			break;
		case WLAN_FSTYPE_NULL:
			WLAN_LOG_DEBUG(3, "rx'd data:null\n");
			pr_debug("rx'd data:null\n");
			wlandev->rx.null++;
			break;
		case WLAN_FSTYPE_CFACK:
			WLAN_LOG_DEBUG(3, "rx'd data:cfack\n");
			pr_debug("rx'd data:cfack\n");
			wlandev->rx.cfack++;
			break;
		case WLAN_FSTYPE_CFPOLL:
			WLAN_LOG_DEBUG(3, "rx'd data:cfpoll\n");
			pr_debug("rx'd data:cfpoll\n");
			wlandev->rx.cfpoll++;
			break;
		case WLAN_FSTYPE_CFACK_CFPOLL:
			WLAN_LOG_DEBUG(3, "rx'd data:cfack_cfpoll\n");
			pr_debug("rx'd data:cfack_cfpoll\n");
			wlandev->rx.cfack_cfpoll++;
			break;
		default:
+20 −20
Original line number Diff line number Diff line
@@ -740,9 +740,9 @@ static int p80211wext_siwessid(netdevice_t *dev,
	memcpy(msg.ssid.data.data, essid, length);
	msg.ssid.data.len = length;

	WLAN_LOG_DEBUG(1,"autojoin_ssid for %s \n",essid);
	pr_debug("autojoin_ssid for %s \n",essid);
	result = p80211req_dorequest(wlandev, (u8*)&msg);
        WLAN_LOG_DEBUG(1,"autojoin_ssid %d\n",result);
        pr_debug("autojoin_ssid %d\n",result);

	if (result) {
		err = -EFAULT;
@@ -1331,12 +1331,12 @@ wext_translate_bss(struct iw_request_info *info, char *current_ev,
		size = min_t(unsigned short, IW_ESSID_MAX_SIZE, bss->ssid.data.len);
		memset(&essid, 0, sizeof (essid));
		memcpy(&essid, bss->ssid.data.data, size);
		WLAN_LOG_DEBUG(1, " essid size = %d\n", size);
		pr_debug(" essid size = %d\n", size);
		iwe.u.data.length = size;
		iwe.u.data.flags = 1;
		iwe.cmd = SIOCGIWESSID;
		current_ev = iwe_stream_add_point(info, current_ev, end_buf, &iwe, &essid[0]);
		WLAN_LOG_DEBUG(1, " essid size OK.\n");
		pr_debug(" essid size OK.\n");
	}

	switch (bss->bsstype.data) {
@@ -1441,7 +1441,7 @@ static int p80211wext_set_encodeext(struct net_device *dev,
  struct iw_point *encoding = &wrqu->encoding;
  int idx = encoding->flags & IW_ENCODE_INDEX;

  WLAN_LOG_DEBUG(1,"set_encode_ext flags[%d] alg[%d] keylen[%d]\n",ext->ext_flags,(int)ext->alg,(int)ext->key_len);
  pr_debug("set_encode_ext flags[%d] alg[%d] keylen[%d]\n",ext->ext_flags,(int)ext->alg,(int)ext->key_len);


  if ( ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY ) {
@@ -1453,7 +1453,7 @@ static int p80211wext_set_encodeext(struct net_device *dev,
      } else
	idx--;
    }
    WLAN_LOG_DEBUG(1,"setting default key (%d)\n",idx);
    pr_debug("setting default key (%d)\n",idx);
    result = p80211wext_dorequest(wlandev, DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID, idx);
    if ( result )
      return -EFAULT;
@@ -1462,7 +1462,7 @@ static int p80211wext_set_encodeext(struct net_device *dev,

  if ( ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY ) {
    if (!(ext->alg & IW_ENCODE_ALG_WEP)) {
      WLAN_LOG_DEBUG(1,"asked to set a non wep key :(");
      pr_debug("asked to set a non wep key :(");
      return -EINVAL;
    }
    if (idx) {
@@ -1471,7 +1471,7 @@ static int p80211wext_set_encodeext(struct net_device *dev,
      else
	idx--;
    }
    WLAN_LOG_DEBUG(1,"Set WEP key (%d)\n",idx);
    pr_debug("Set WEP key (%d)\n",idx);
    wlandev->wep_keylens[idx] = ext->key_len;
    memcpy(wlandev->wep_keys[idx], ext->key, ext->key_len);

@@ -1497,7 +1497,7 @@ static int p80211wext_set_encodeext(struct net_device *dev,
    }
    msg.msgcode = DIDmsg_dot11req_mibset;
    result = p80211req_dorequest(wlandev,(u8*)&msg);
    WLAN_LOG_DEBUG(1,"result (%d)\n",result);
    pr_debug("result (%d)\n",result);
  }
  return result;
}
@@ -1516,22 +1516,22 @@ static int p80211wext_get_encodeext(struct net_device *dev,
	int max_len;
	int idx;

	WLAN_LOG_DEBUG(1,"get_encode_ext flags[%d] alg[%d] keylen[%d]\n",ext->ext_flags,(int)ext->alg,(int)ext->key_len);
	pr_debug("get_encode_ext flags[%d] alg[%d] keylen[%d]\n",ext->ext_flags,(int)ext->alg,(int)ext->key_len);


	max_len = encoding->length - sizeof(*ext);
	if ( max_len <= 0) {
		WLAN_LOG_DEBUG(1,"get_encodeext max_len [%d] invalid\n",max_len);
		pr_debug("get_encodeext max_len [%d] invalid\n",max_len);
		result = -EINVAL;
		goto exit;
	}
	idx = encoding->flags & IW_ENCODE_INDEX;

	WLAN_LOG_DEBUG(1,"get_encode_ext index [%d]\n",idx);
	pr_debug("get_encode_ext index [%d]\n",idx);

	if (idx) {
		if (idx < 1 || idx > NUM_WEPKEYS ) {
			WLAN_LOG_DEBUG(1,"get_encode_ext invalid key index [%d]\n",idx);
			pr_debug("get_encode_ext invalid key index [%d]\n",idx);
			result = -EINVAL;
			goto exit;
		}
@@ -1563,11 +1563,11 @@ static int p80211_wext_set_iwauth (struct net_device *dev,
  struct iw_param *param = &wrqu->param;
  int result =0;

  WLAN_LOG_DEBUG(1,"set_iwauth flags[%d]\n",(int)param->flags & IW_AUTH_INDEX );
  pr_debug("set_iwauth flags[%d]\n",(int)param->flags & IW_AUTH_INDEX );

  switch (param->flags & IW_AUTH_INDEX) {
  case IW_AUTH_DROP_UNENCRYPTED:
    WLAN_LOG_DEBUG(1,"drop_unencrypted %d\n",param->value);
    pr_debug("drop_unencrypted %d\n",param->value);
    if (param->value)
      result = p80211wext_dorequest(wlandev, DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted, P80211ENUM_truth_true);
    else
@@ -1575,7 +1575,7 @@ static int p80211_wext_set_iwauth (struct net_device *dev,
    break;

  case IW_AUTH_PRIVACY_INVOKED:
    WLAN_LOG_DEBUG(1,"privacy invoked %d\n",param->value);
    pr_debug("privacy invoked %d\n",param->value);
    if ( param->value)
      result = p80211wext_dorequest(wlandev, DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked, P80211ENUM_truth_true);
    else
@@ -1585,14 +1585,14 @@ static int p80211_wext_set_iwauth (struct net_device *dev,

  case IW_AUTH_80211_AUTH_ALG:
    if ( param->value & IW_AUTH_ALG_OPEN_SYSTEM ) {
      WLAN_LOG_DEBUG(1,"set open_system\n");
      pr_debug("set open_system\n");
      wlandev->hostwep &= ~HOSTWEP_SHAREDKEY;
    } else if ( param->value & IW_AUTH_ALG_SHARED_KEY) {
      WLAN_LOG_DEBUG(1,"set shared key\n");
      pr_debug("set shared key\n");
      wlandev->hostwep |= HOSTWEP_SHAREDKEY;
    } else {
      /* don't know what to do know :( */
      WLAN_LOG_DEBUG(1,"unknown AUTH_ALG (%d)\n",param->value);
      pr_debug("unknown AUTH_ALG (%d)\n",param->value);
      result = -EINVAL;
    }
    break;
@@ -1615,7 +1615,7 @@ static int p80211_wext_get_iwauth (struct net_device *dev,
  struct iw_param *param = &wrqu->param;
  int result =0;

  WLAN_LOG_DEBUG(1,"get_iwauth flags[%d]\n",(int)param->flags & IW_AUTH_INDEX );
  pr_debug("get_iwauth flags[%d]\n",(int)param->flags & IW_AUTH_INDEX );

  switch (param->flags & IW_AUTH_INDEX) {
  case IW_AUTH_DROP_UNENCRYPTED:
+16 −18
Original line number Diff line number Diff line
@@ -284,8 +284,6 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
        /* Issue the scan request */
        hw->scanflag = 0;

	WLAN_HEX_DUMP(5,"hscanreq", &scanreq, sizeof(scanreq));

        result = hfa384x_drvr_setconfig( hw,
                        HFA384x_RID_HOSTSCAN, &scanreq,
                        sizeof(hfa384x_HostScanRequest_data_t));
@@ -385,7 +383,7 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp)
	if (count > 32)  count = 32;

	if (req->bssindex.data >= count) {
		WLAN_LOG_DEBUG(0, "requested index (%d) out of range (%d)\n",
		pr_debug("requested index (%d) out of range (%d)\n",
				req->bssindex.data, count);
		result = 2;
		req->resultcode.data = P80211ENUM_resultcode_invalid_parameters;
@@ -667,7 +665,7 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)

	goto done;
failed:
	WLAN_LOG_DEBUG(1, "Failed to set a config option, result=%d\n", result);
	pr_debug("Failed to set a config option, result=%d\n", result);
	msg->resultcode.data = P80211ENUM_resultcode_invalid_parameters;

done:
@@ -1108,7 +1106,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
		/* Disable monitor mode */
		result = hfa384x_cmd_monitor(hw, HFA384x_MONITOR_DISABLE);
		if ( result ) {
			WLAN_LOG_DEBUG(1,
			pr_debug(
				"failed to disable monitor mode, result=%d\n",
				result);
			goto failed;
@@ -1116,7 +1114,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
		/* Disable port 0 */
		result = hfa384x_drvr_disable(hw, 0);
		if ( result ) {
			WLAN_LOG_DEBUG(1,
			pr_debug(
			"failed to disable port 0 after sniffing, result=%d\n",
			result);
			goto failed;
@@ -1129,7 +1127,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
				HFA384x_RID_CNFWEPFLAGS,
				hw->presniff_wepflags);
		if ( result ) {
			WLAN_LOG_DEBUG(1,
			pr_debug(
			"failed to restore wepflags=0x%04x, result=%d\n",
			hw->presniff_wepflags,
			result);
@@ -1142,7 +1140,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
			result = hfa384x_drvr_setconfig16(hw,
				HFA384x_RID_CNFPORTTYPE, word);
			if ( result ) {
				WLAN_LOG_DEBUG(1,
				pr_debug(
				"failed to restore porttype, result=%d\n",
				result);
				goto failed;
@@ -1151,7 +1149,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
			/* Enable the port */
			result = hfa384x_drvr_enable(hw, 0);
			if ( result ) {
				WLAN_LOG_DEBUG(1, "failed to enable port to presniff setting, result=%d\n", result);
				pr_debug("failed to enable port to presniff setting, result=%d\n", result);
				goto failed;
			}
		} else {
@@ -1173,7 +1171,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
								  HFA384x_RID_CNFPORTTYPE,
								  &(hw->presniff_port_type));
				if ( result ) {
					WLAN_LOG_DEBUG(1,"failed to read porttype, result=%d\n", result);
					pr_debug("failed to read porttype, result=%d\n", result);
					goto failed;
				}
				/* Save the wepflags state */
@@ -1181,13 +1179,13 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
								  HFA384x_RID_CNFWEPFLAGS,
								  &(hw->presniff_wepflags));
				if ( result ) {
					WLAN_LOG_DEBUG(1,"failed to read wepflags, result=%d\n", result);
					pr_debug("failed to read wepflags, result=%d\n", result);
					goto failed;
				}
				hfa384x_drvr_stop(hw);
				result = hfa384x_drvr_start(hw);
				if ( result ) {
					WLAN_LOG_DEBUG(1,
					pr_debug(
						       "failed to restart the card for sniffing, result=%d\n",
						       result);
					goto failed;
@@ -1196,7 +1194,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
				/* Disable the port */
				result = hfa384x_drvr_disable(hw, 0);
				if ( result ) {
					WLAN_LOG_DEBUG(1,
					pr_debug(
						       "failed to enable port for sniffing, result=%d\n",
						       result);
					goto failed;
@@ -1213,7 +1211,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
		hw->sniff_channel=word;

		if ( result ) {
			WLAN_LOG_DEBUG(1,
			pr_debug(
				       "failed to set channel %d, result=%d\n",
					       word,
				       result);
@@ -1227,7 +1225,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
			result = hfa384x_drvr_setconfig16(hw,
							  HFA384x_RID_CNFPORTTYPE, word);
			if ( result ) {
				WLAN_LOG_DEBUG(1,
				pr_debug(
					       "failed to set porttype %d, result=%d\n",
					       word,
					       result);
@@ -1241,7 +1239,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
			}

			if ( result ) {
				WLAN_LOG_DEBUG(1,
				pr_debug(
					       "failed to set wepflags=0x%04x, result=%d\n",
					       word,
					       result);
@@ -1266,7 +1264,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
		/* Enable the port */
		result = hfa384x_drvr_enable(hw, 0);
		if ( result ) {
			WLAN_LOG_DEBUG(1,
			pr_debug(
			"failed to enable port for sniffing, result=%d\n",
			result);
			goto failed;
@@ -1274,7 +1272,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
		/* Enable monitor mode */
		result = hfa384x_cmd_monitor(hw, HFA384x_MONITOR_ENABLE);
		if ( result ) {
			WLAN_LOG_DEBUG(1,
			pr_debug(
			"failed to enable monitor mode, result=%d\n",
			result);
			goto failed;
Loading