diff --git a/common.c b/common.c index a3215b4..1376968 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)); @@ -2653,10 +2655,11 @@ acx_i_start_xmit(struct ieee80211_hw *hw, 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; adev->stats.tx_packets++; adev->stats.tx_bytes += skb->len; @@ -4358,8 +4361,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 +4462,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.c index cd33a86..3b245e7 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,20 @@ 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); wlhdr_len = ieee80211_get_hdrlen(le16_to_cpu(wireless_header->frame_control)); hostdesc2->length = cpu_to_le16(len - wlhdr_len); + printk("5\n"); /* if (!ieeectl->do_not_encrypt && ieeectl->key_idx>= 0) { @@ -3140,6 +3142,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 +3153,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,7 +3182,7 @@ 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"); /* 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); @@ -3186,22 +3190,24 @@ acxpci_l_tx_data(acx_device_t * adev, tx_t * tx_opaque, int len, wmb(); CLEAR_BIT(hostdesc1->Ctl_16, cpu_to_le16(DESC_CTL_HOSTOWN)); CLEAR_BIT(hostdesc2->Ctl_16, cpu_to_le16(DESC_CTL_HOSTOWN)); - + printk("7\n"); /* write back modified flags */ CLEAR_BIT(Ctl2_8, DESC_CTL2_WEP); 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; }