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
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,
{
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;
}
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,
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);
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,
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;
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();
/* 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;
}
}
}
hw->dltimeout = hfa384x2host_16(hw->dltimeout);
- WLAN_LOG_DEBUG(1,"flashdl_enable\n");
+ pr_debug("flashdl_enable\n");
hw->dlstate = HFA384x_DLSTATE_FLASHENABLED;
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 */
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 ) {
/* 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);
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 */
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);
/* 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,
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;
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
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;
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 */
* 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;
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;
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));
}
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
* 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) &&
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);
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. */
/* 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, */
/* 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 */
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;
}
( 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)) {
(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 */
(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 */
/* 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 */
/* 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;
}
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);
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;
}
} 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;
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;
}
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) {
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 ) {
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:
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:
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:
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;
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) {
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 ) {
} 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;
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) {
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);
}
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;
}
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;
}
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
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
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;
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:
/* 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));
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;
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:
/* 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;
/* 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;
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);
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;
/* 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 {
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 */
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;
/* 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;
hw->sniff_channel=word;
if ( result ) {
- WLAN_LOG_DEBUG(1,
+ pr_debug(
"failed to set channel %d, result=%d\n",
word,
result);
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);
}
if ( result ) {
- WLAN_LOG_DEBUG(1,
+ pr_debug(
"failed to set wepflags=0x%04x, result=%d\n",
word,
result);
/* 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;
/* 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;
if (msg->resultcode.data == P80211ENUM_resultcode_success) {
if (result != 0) {
- WLAN_LOG_DEBUG(1, "get/set failure, result=%d\n",
+ pr_debug("get/set failure, result=%d\n",
result);
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
*rate |= BIT(3);
break;
default:
- WLAN_LOG_DEBUG(1, "Unrecoginzed Rate of %d\n",
+ pr_debug("Unrecoginzed Rate of %d\n",
*datarate);
break;
}
#include <linux/netdevice.h>
#include <linux/workqueue.h>
#include <linux/byteorder/generic.h>
+#include <linux/ctype.h>
#include <asm/io.h>
#include <linux/delay.h>
switch( msg->msgcode )
{
case DIDmsg_dot11req_mibget :
- WLAN_LOG_DEBUG(2,"Received mibget request\n");
+ pr_debug("Received mibget request\n");
result = prism2mgmt_mibset_mibget(wlandev, msg);
break;
case DIDmsg_dot11req_mibset :
- WLAN_LOG_DEBUG(2,"Received mibset request\n");
+ pr_debug("Received mibset request\n");
result = prism2mgmt_mibset_mibget(wlandev, msg);
break;
case DIDmsg_dot11req_scan :
- WLAN_LOG_DEBUG(2,"Received scan request\n");
+ pr_debug("Received scan request\n");
result = prism2mgmt_scan(wlandev, msg);
break;
case DIDmsg_dot11req_scan_results :
- WLAN_LOG_DEBUG(2,"Received scan_results request\n");
+ pr_debug("Received scan_results request\n");
result = prism2mgmt_scan_results(wlandev, msg);
break;
case DIDmsg_dot11req_start :
- WLAN_LOG_DEBUG(2,"Received mlme start request\n");
+ pr_debug("Received mlme start request\n");
result = prism2mgmt_start(wlandev, msg);
break;
/*
* Prism2 specific messages
*/
case DIDmsg_p2req_readpda :
- WLAN_LOG_DEBUG(2,"Received mlme readpda request\n");
+ pr_debug("Received mlme readpda request\n");
result = prism2mgmt_readpda(wlandev, msg);
break;
case DIDmsg_p2req_ramdl_state :
- WLAN_LOG_DEBUG(2,"Received mlme ramdl_state request\n");
+ pr_debug("Received mlme ramdl_state request\n");
result = prism2mgmt_ramdl_state(wlandev, msg);
break;
case DIDmsg_p2req_ramdl_write :
- WLAN_LOG_DEBUG(2,"Received mlme ramdl_write request\n");
+ pr_debug("Received mlme ramdl_write request\n");
result = prism2mgmt_ramdl_write(wlandev, msg);
break;
case DIDmsg_p2req_flashdl_state :
- WLAN_LOG_DEBUG(2,"Received mlme flashdl_state request\n");
+ pr_debug("Received mlme flashdl_state request\n");
result = prism2mgmt_flashdl_state(wlandev, msg);
break;
case DIDmsg_p2req_flashdl_write :
- WLAN_LOG_DEBUG(2,"Received mlme flashdl_write request\n");
+ pr_debug("Received mlme flashdl_write request\n");
result = prism2mgmt_flashdl_write(wlandev, msg);
break;
/*
case DIDmsg_lnxreq_ifstate :
{
p80211msg_lnxreq_ifstate_t *ifstatemsg;
- WLAN_LOG_DEBUG(2,"Received mlme ifstate request\n");
+ pr_debug("Received mlme ifstate request\n");
ifstatemsg = (p80211msg_lnxreq_ifstate_t*)msg;
result = prism2sta_ifstate(wlandev, ifstatemsg->ifstate.data);
ifstatemsg->resultcode.status =
}
break;
case DIDmsg_lnxreq_wlansniff :
- WLAN_LOG_DEBUG(2,"Received mlme wlansniff request\n");
+ pr_debug("Received mlme wlansniff request\n");
result = prism2mgmt_wlansniff(wlandev, msg);
break;
case DIDmsg_lnxreq_autojoin :
- WLAN_LOG_DEBUG(2,"Received mlme autojoin request\n");
+ pr_debug("Received mlme autojoin request\n");
result = prism2mgmt_autojoin(wlandev, msg);
break;
case DIDmsg_lnxreq_commsquality: {
p80211msg_lnxreq_commsquality_t *qualmsg;
- WLAN_LOG_DEBUG(2,"Received commsquality request\n");
+ pr_debug("Received commsquality request\n");
qualmsg = (p80211msg_lnxreq_commsquality_t*) msg;
result = P80211ENUM_resultcode_implementation_failure;
- WLAN_LOG_DEBUG(2, "Current MSD state(%d), requesting(%d)\n",
+ pr_debug("Current MSD state(%d), requesting(%d)\n",
wlandev->msdstate, ifstate);
switch (ifstate)
{
----------------------------------------------------------------*/
static void prism2sta_inf_handover(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf)
{
- WLAN_LOG_DEBUG(2,"received infoframe:HANDOVER (unhandled)\n");
+ pr_debug("received infoframe:HANDOVER (unhandled)\n");
return;
}
nbss /= sizeof(hfa384x_ScanResultSub_t);
/* Print em */
- WLAN_LOG_DEBUG(1,"rx scanresults, reason=%d, nbss=%d:\n",
+ pr_debug("rx scanresults, reason=%d, nbss=%d:\n",
inf->info.scanresult.scanreason, nbss);
for ( i = 0; i < nbss; i++) {
- WLAN_LOG_DEBUG(1, "chid=%d anl=%d sl=%d bcnint=%d\n",
+ pr_debug("chid=%d anl=%d sl=%d bcnint=%d\n",
sr->result[i].chid,
sr->result[i].anl,
sr->result[i].sl,
sr->result[i].bcnint);
- WLAN_LOG_DEBUG(1, " capinfo=0x%04x proberesp_rate=%d\n",
+ pr_debug(" capinfo=0x%04x proberesp_rate=%d\n",
sr->result[i].capinfo,
sr->result[i].proberesp_rate);
}
int nbss;
nbss = (inf->framelen - 3) / 32;
- WLAN_LOG_DEBUG(1, "Received %d hostscan results\n", nbss);
+ pr_debug("Received %d hostscan results\n", nbss);
if (nbss > 32)
nbss = 32;
chinforesult->anl = hfa384x2host_16(inf->info.chinforesult.result[n].anl);
chinforesult->pnl = hfa384x2host_16(inf->info.chinforesult.result[n].pnl);
chinforesult->active = hfa384x2host_16(inf->info.chinforesult.result[n].active);
- WLAN_LOG_DEBUG(2, "chinfo: channel %d, %s level (avg/peak)=%d/%d dB, pcf %d\n",
+ pr_debug("chinfo: channel %d, %s level (avg/peak)=%d/%d dB, pcf %d\n",
channel+1,
chinforesult->active &
HFA384x_CHINFORESULT_BSSACTIVE ? "signal" : "noise",
HFA384x_RID_CURRENTBSSID,
wlandev->bssid, WLAN_BSSID_LEN);
if ( result ) {
- WLAN_LOG_DEBUG(1,
+ pr_debug(
"getconfig(0x%02x) failed, result = %d\n",
HFA384x_RID_CURRENTBSSID, result);
goto failed;
HFA384x_RID_CURRENTSSID,
&ssid, sizeof(ssid));
if ( result ) {
- WLAN_LOG_DEBUG(1,
+ pr_debug(
"getconfig(0x%02x) failed, result = %d\n",
HFA384x_RID_CURRENTSSID, result);
goto failed;
result = hfa384x_drvr_getconfig16(hw,
HFA384x_RID_PORTSTATUS, &portstatus);
if ( result ) {
- WLAN_LOG_DEBUG(1,
+ pr_debug(
"getconfig(0x%02x) failed, result = %d\n",
HFA384x_RID_PORTSTATUS, result);
goto failed;
HFA384x_RID_CURRENTBSSID,
wlandev->bssid, WLAN_BSSID_LEN);
if ( result ) {
- WLAN_LOG_DEBUG(1,
+ pr_debug(
"getconfig(0x%02x) failed, result = %d\n",
HFA384x_RID_CURRENTBSSID, result);
goto failed;
HFA384x_RID_CURRENTSSID,
&ssid, sizeof(ssid));
if ( result ) {
- WLAN_LOG_DEBUG(1,
+ pr_debug(
"getconfig(0x%02x) failed, result = %d\n",
HFA384x_RID_CURRENTSSID, result);
goto failed;
----------------------------------------------------------------*/
void prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status)
{
- WLAN_LOG_DEBUG(3, "TxExc status=0x%x.\n", status);
+ pr_debug("TxExc status=0x%x.\n", status);
return;
}
----------------------------------------------------------------*/
void prism2sta_ev_tx(wlandevice_t *wlandev, u16 status)
{
- WLAN_LOG_DEBUG(4, "Tx Complete, status=0x%04x\n", status);
+ pr_debug("Tx Complete, status=0x%04x\n", status);
/* update linux network stats */
wlandev->linux_stats.tx_packets++;
return;
// ASL_currBSS; // level
// qual.ANL_currFC; // noise
- WLAN_LOG_DEBUG(3, "commsqual %d %d %d\n",
+ pr_debug("commsqual %d %d %d\n",
hfa384x2host_16(hw->qual.CQ_currBSS),
hfa384x2host_16(hw->qual.ASL_currBSS),
hfa384x2host_16(hw->qual.ANL_currFC));
HFA384x_RID_CURRENTBSSID,
wlandev->bssid, WLAN_BSSID_LEN);
if ( result ) {
- WLAN_LOG_DEBUG(1,
+ pr_debug(
"getconfig(0x%02x) failed, result = %d\n",
HFA384x_RID_CURRENTBSSID, result);
goto done;
HFA384x_RID_CURRENTSSID,
&ssid, sizeof(ssid));
if ( result ) {
- WLAN_LOG_DEBUG(1,
+ pr_debug(
"getconfig(0x%02x) failed, result = %d\n",
HFA384x_RID_CURRENTSSID, result);
goto done;
#ifndef _WLAN_COMPAT_H
#define _WLAN_COMPAT_H
-/*=============================================================*/
-/*------ OS Portability Macros --------------------------------*/
-/*=============================================================*/
-
-
-#include <linux/hardirq.h>
-#include <linux/ctype.h>
-
-#define WLAN_HEX_DUMP( l, s, p, n)
-
-#define WLAN_LOG_DEBUG(l, s, args...)
-
-/*=============================================================*/
-/*--- Variables -----------------------------------------------*/
-/*=============================================================*/
-
#endif /* _WLAN_COMPAT_H */