rendered paste bodydiff --git a/common.c b/common.cindex a3215b4..330147c 100644--- a/common.c+++ b/common.c@@ -287,7 +287,7 @@ void acx_dump_bytes(const void *data, int num) const u8 *ptr = (const u8 *)data; FN_ENTER;-+/* if (num <= 0) { printk("\n"); return;@@ -308,7 +308,7 @@ void acx_dump_bytes(const void *data, int num) printk("%02X ", *ptr++); printk("%02X\n", *ptr); }-+*/ FN_EXIT0; }@@ -2638,6 +2638,8 @@ acx_i_start_xmit(struct ieee80211_hw *hw, tx = acx_l_alloc_tx(adev); + printk("since you can read this - acx_l_alloc_tx shouldn't be the problem\n");+ if (unlikely(!tx)) { printk_ratelimited("%s: start_xmit: txdesc ring is full, " "dropping tx\n", wiphy_name(adev->ieee->wiphy));@@ -2649,24 +2651,33 @@ acx_i_start_xmit(struct ieee80211_hw *hw, if (unlikely(!txbuf)) { /* Card was removed */+ printk("!txbuf: card was probably removed\n"); txresult = NOT_OK; acx_l_dealloc_tx(adev, tx); goto end; }+ printk("maybe it's the memcpy() ???\n"); memcpy(txbuf, skb->data, skb->len);-+ printk("nah... possibly it's acx_l_tx_data !!!\n"); acx_l_tx_data(adev, tx, skb->len, ctl,skb);-+ printk("since you can't read this... acx_l_tx_data is the problem\n"); txresult = OK;+ printk("txresult = OK;\n"); adev->stats.tx_packets++; + printk("adev->stats.tx_packets = %lu\n", adev->stats.tx_packets); adev->stats.tx_bytes += skb->len;+ printk("adev->stats.tx_bytes %lu skb->len %u\n", adev->stats.tx_bytes, skb->len);+ printk("txresult = %d\n", txresult);+ printk("flags: %lu", flags); end: acx_unlock(adev, flags);+ printk("next1\n"); end_no_unlock: FN_EXIT1(txresult); + printk("next2\n"); return txresult; } /***********************************************************************@@ -4358,8 +4369,8 @@ void acx_remove_interface(struct ieee80211_hw *hw, printk("Removing interface: %d %d\n", adev->interface.operating, conf->type); if (adev->initialized) acx_select_opmode(adev);- flush_scheduled_work(); acx_unlock(adev, flags);+ flush_scheduled_work(); printk(KERN_INFO "Virtual interface removed " #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)@@ -4459,9 +4470,11 @@ int acx_net_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf) */ adev->tx_disabled = !conf->radio_enabled; if (conf->power_level != 0){+ acx_unlock(adev, flags); adev->tx_level_dbm = conf->power_level; acx_s_set_tx_level(adev, adev->tx_level_dbm); SET_BIT(adev->set_mask,GETSET_TXPOWER);+ acx_lock(adev, flags); //acx_schedule_task(adev, ACX_AFTER_IRQ_UPDATE_CARD_CFG); } diff --git a/pci.c b/pci.cindex cd33a86..7cbe979 100644--- a/pci.c+++ b/pci.c@@ -3093,6 +3093,7 @@ acxpci_l_tx_data(acx_device_t * adev, tx_t * tx_opaque, int len, /* if (unlikely(len < WLAN_HDR_A3_LEN)) goto end; */+ printk("1\n"); hostdesc1 = get_txhostdesc(adev, txdesc); wireless_header = (struct ieee80211_hdr *)hostdesc1->data; /* modify flag status in separate variable to be able to write it back@@ -3100,7 +3101,7 @@ acxpci_l_tx_data(acx_device_t * adev, tx_t * tx_opaque, int len, * accesses) */ Ctl_8 = txdesc->Ctl_8; Ctl2_8 = 0; /* really need to init it to 0, not txdesc->Ctl2_8, it seems */-+ printk("2\n"); hostdesc2 = hostdesc1 + 1; /* DON'T simply set Ctl field to 0 here globally,@@ -3114,19 +3115,22 @@ acxpci_l_tx_data(acx_device_t * adev, tx_t * tx_opaque, int len, SET_BIT(Ctl2_8, DESC_CTL2_RTS); else CLEAR_BIT(Ctl2_8, DESC_CTL2_RTS);-+ printk("3\n"); rate_cur = ieeectl->tx_rate; if (unlikely(!rate_cur)) { printk("acx: driver bug! bad ratemask\n"); goto end; }-+ printk("4\n"); /* used in tx cleanup routine for auto rate and accounting: */ /* put_txcr(adev, txdesc, clt, rate_cur); deprecated by mac80211 */ txdesc->total_length = cpu_to_le16(len);+ printk("f.1\n"); wlhdr_len = ieee80211_get_hdrlen(le16_to_cpu(wireless_header->frame_control));+ printk("f.2\n"); hostdesc2->length = cpu_to_le16(len - wlhdr_len);+ printk("5\n"); /* if (!ieeectl->do_not_encrypt && ieeectl->key_idx>= 0) {@@ -3140,6 +3144,7 @@ acxpci_l_tx_data(acx_device_t * adev, tx_t * tx_opaque, int len, } */ if (IS_ACX111(adev)) {+ printk("yes sir, this is an acx111\n"); /* note that if !txdesc->do_auto, txrate->cur ** has only one nonzero bit */ txdesc->u.r2.rate111 = cpu_to_le16(rate_cur@@ -3150,15 +3155,16 @@ acxpci_l_tx_data(acx_device_t * adev, tx_t * tx_opaque, int len, ** Disabled for now --vda */ /*| ((clt->shortpre && clt->cur!=RATE111_1) ? RATE111_SHORTPRE : 0) */ );-#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS+#if 0 /* TODO: FIGURE_OUT_WHEN_TO_SET_THIS */ /* should add this to rate111 above as necessary */ |(clt->pbcc511 ? RATE111_PBCC511 : 0) #endif hostdesc1->length = cpu_to_le16(len); } else { /* ACX100 */+ printk("nah, of course it's not an acx111\n"); u8 rate_100 = ieeectl->tx_rate; txdesc->u.r1.rate = rate_100;-#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS+#if 0 /* TODO: FIGURE_OUT_WHEN_TO_SET_THIS */ if (clt->pbcc511) { if (n == RATE100_5 || n == RATE100_11) n |= RATE100_PBCC511;@@ -3178,30 +3184,41 @@ acxpci_l_tx_data(acx_device_t * adev, tx_t * tx_opaque, int len, } /* don't need to clean ack/rts statistics here, already * done on descr cleanup */-+ printk("6\n");+ printk("hostdesc1: %p hostdesc2: %p\n", hostdesc1, hostdesc2);+ printk(" : %d : %d\n", hostdesc1->Ctl_16, hostdesc2->Ctl_16); /* clears HOSTOWN and ACXDONE bits, thus telling that the descriptors * are now owned by the acx100; do this as LAST operation */ CLEAR_BIT(Ctl_8, DESC_CTL_ACXDONE_HOSTOWN);+ printk("CB1\n");+ acx_s_mwait(1000); /* flush writes before we release hostdesc to the adapter here */ wmb();+ printk("wmb1\n");+ acx_s_mwait(1000); CLEAR_BIT(hostdesc1->Ctl_16, cpu_to_le16(DESC_CTL_HOSTOWN));- CLEAR_BIT(hostdesc2->Ctl_16, cpu_to_le16(DESC_CTL_HOSTOWN));-+ printk("CB2\n");+ acx_s_mwait(1000);+ printk("7\n"); /* write back modified flags */ CLEAR_BIT(Ctl2_8, DESC_CTL2_WEP);+ printk("CB4\n");+ acx_s_mwait(1000); txdesc->Ctl2_8 = Ctl2_8; txdesc->Ctl_8 = Ctl_8; /* unused: txdesc->tx_time = cpu_to_le32(jiffies); */-+ printk("8\n"); /* flush writes before we tell the adapter that it's its turn now */ mmiowb(); write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_TXPRC);+ printk("9\n"); write_flush(adev); /* log the packet content AFTER sending it, * in order to not delay sending any further than absolutely needed * Do separate logs for acx100/111 to have human-readable rates */ memcpy(&(hostdesc1->txstatus.control),ieeectl,sizeof(struct ieee80211_tx_control)); hostdesc1->skb = skb;+ printk("10\n"); end: FN_EXIT0; }