Commit 4cf26d8acc54bcc7560e433fdf59d0f72974efbd

Original 20070101 tarball

Commit diff

Changelog

 
10410413:14:13 wlan0: tx error 0x20, buf 07!
10510513:14:13 wlan0: tx error 0x20, buf 08!
106106
107[20070101] 0.3.36
108* Andreas Mohr <andi@lisas.de>
109 - cope with *tons* of Linux kernel API changes (via added version checks):
110 - linux/utsrelease.h required in 2.6.18
111 - linux/config.h include removal in 2.6.19
112 - pt_regs interrupt handler arg removal in 2.6.19
113 - INIT_WORK() change in 2.6.20-rc1-git1
114 - "ESSID last char missing" API change in WE-21
115 If anything fails to work for a real non-prerelease mainline kernel version
116 (supported ones, that is: >= 2.6.10), then please yell immediately!
117 Those people *REALLY* want me to concentrate on getting this stuff ready for
118 mainline, it seems...
119 - MAC address change fix (contributed by Carlos Martín Nieto/Luis Padilla)
120 - fix iwlist wlan0 scan output (updated wrong pointer variable --> only one single rate value listed, doh!)
121 - fix buggy hidden ESSID handling (didn't cover all variants in all places)
122 - corrected(?) duration/sequence values in assoc steps handling
123 - use ioremap_nocache() instead of ioremap() (safer)
124 - add another TNETW1450 USB ID
125 - FIX buggy "correction" of medium busy percentage log message
126 - small /proc/driver/acx_wlan0_diag addition
127 - much more verbose firmware image query log message
128 - updated format of main hardware status log message
129 - slightly enhanced Reason Code log messages
130 - minor cleanup
131
107132[20060518]
108133* Fix warnings about packed structs and printf format mismatches.
109134 Fix "implicit declaration of function dma_free_coherent" warning.
toggle raw diff

acx_config.h

 
22#define CONFIG_ACX_PCI 1
33#define CONFIG_ACX_USB 1
44
5#define ACX_RELEASE "v0.3.35"
5#define ACX_RELEASE "v0.3.36"
66
77/* set to 0 if you don't want any debugging code to be compiled in */
88/* set to 1 if you want some debugging */
toggle raw diff

acx_func.h

 
241241}
242242
243243
244static inline int
245is_hidden_essid(char *essid)
246{
247 return (('\0' == essid[0]) ||
248 ((' ' == essid[0]) && ('\0' == essid[1])));
249}
250
244251/***********************************************************************
245252** LOCKING
246253** We have adev->sem and adev->lock.
toggle raw diff

acx_struct.h

 
298298DEF_IE(1xx_IE_DOT11_MAX_XMIT_MSDU_LIFETIME ,0x1008, 0x04);
299299DEF_IE(1xx_IE_DOT11_GROUP_ADDR ,0x1009, -1);
300300DEF_IE(1xx_IE_DOT11_CURRENT_REG_DOMAIN ,0x100a, 0x02);
301//It's harmless to have larger struct. Use USB case always.
301/* It's harmless to have larger struct. Use USB case always. */
302302DEF_IE(1xx_IE_DOT11_CURRENT_ANTENNA ,0x100b, 0x02); /* in fact len=1 for PCI */
303303DEF_IE(1xx_IE_DOT11_UNKNOWN_100C ,0x100c, -1); /* mapped to cfgInvalid in FW150 */
304304DEF_IE(1xx_IE_DOT11_TX_POWER_LEVEL ,0x100d, 0x01); /* TNETW1450 has length 2!! */
305305DEF_IE(1xx_IE_DOT11_CURRENT_CCA_MODE ,0x100e, 0x02); /* in fact len=1 for PCI */
306//USB doesn't return anything - len==0?!
306/* USB doesn't return anything - len==0?! */
307307DEF_IE(100_IE_DOT11_ED_THRESHOLD ,0x100f, 0x04);
308308DEF_IE(1xx_IE_DOT11_WEP_DEFAULT_KEY_SET ,0x1010, 0x01); /* set default key ID; TNETW1450: length 2 */
309309DEF_IE(100_IE_DOT11_UNKNOWN_1011 ,0x1011, -1); /* mapped to cfgInvalid in FW150 */
495495
496496/* I've hoped it's a 802.11 PHY header, but no...
497497 * so far, I've seen on acx111:
498 * 0000 3a00 0000 0000 IBBS Beacons
498 * 0000 3a00 0000 0000 IBSS Beacons
499499 * 0000 3c00 0000 0000 ESS Beacons
500500 * 0000 2700 0000 0000 Probe requests
501501 * --vda
toggle raw diff

common.c

 
3030** ---------------------------------------------------------------------
3131*/
3232
33#include <linux/config.h>
3433#include <linux/version.h>
34#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
35#include <linux/config.h>
36#endif
3537#include <linux/module.h>
3638#include <linux/kernel.h>
3739#include <linux/sched.h>
503503 /* 9 */ "reserved",
504504 /*10 */ "Cannot support all requested capabilities in Capability Information field",
505505 /*11 */ "Reassoc denied (reason outside of 802.11b scope)",
506 /*12 */ "Assoc denied (reason outside of 802.11b scope), maybe MAC filtering by peer?",
507 /*13 */ "Responding station doesnt support specified auth algorithm",
506 /*12 */ "Assoc denied (reason outside of 802.11b scope) -- maybe MAC filtering by peer?",
507 /*13 */ "Responding station doesnt support specified auth algorithm -- maybe WEP auth Open vs. Restricted?",
508508 /*14 */ "Auth rejected: wrong transaction sequence number",
509509 /*15 */ "Auth rejected: challenge failure",
510510 /*16 */ "Auth rejected: timeout for next frame in sequence",
621621 }
622622
623623 adev->firmware_numver = (u32)(
624 (hexarr[0] << 24) + (hexarr[1] << 16)
625 + (hexarr[2] << 8) + hexarr[3]);
624 (hexarr[0] << 24) | (hexarr[1] << 16)
625 | (hexarr[2] << 8) | hexarr[3]);
626626 log(L_DEBUG, "firmware_numver 0x%08X\n", adev->firmware_numver);
627627 }
628628 if (IS_ACX111(adev)) {
720720 break;
721721 }
722722
723 printk("acx: form factor 0x%02X (%s), "
724 "radio type 0x%02X (%s), EEPROM version 0x%02X, "
725 "uploaded firmware '%s' (0x%08X)\n",
726 adev->form_factor, form_str, adev->radio_type, radio_str,
727 adev->eeprom_version, adev->firmware_version,
728 adev->firmware_id);
723 printk("acx: === chipset %s, radio type 0x%02X (%s), "
724 "form factor 0x%02X (%s), EEPROM version 0x%02X: "
725 "uploaded firmware '%s' ===\n",
726 adev->chip_name, adev->radio_type, radio_str,
727 adev->form_factor, form_str, adev->eeprom_version,
728 adev->firmware_version);
729729
730730 FN_EXIT0;
731731}
12051205 "** PHY status **\n"
12061206 "tx_disabled %d, tx_level_dbm %d\n" /* "tx_level_val %d, tx_level_auto %d\n" */
12071207 "sensitivity %d, antenna 0x%02X, ed_threshold %d, cca %d, preamble_mode %d\n"
1208 "rate_basic 0x%04X, rate_oper 0x%04X\n"
12081209 "rts_threshold %d, frag_threshold %d, short_retry %d, long_retry %d\n"
12091210 "msdu_lifetime %d, listen_interval %d, beacon_interval %d\n",
12101211 adev->tx_disabled, adev->tx_level_dbm, /* adev->tx_level_val, adev->tx_level_auto, */
12111212 adev->sensitivity, adev->antenna, adev->ed_threshold, adev->cca, adev->preamble_mode,
1213 adev->rate_basic, adev->rate_oper,
12121214 adev->rts_threshold, adev->frag_threshold, adev->short_retry, adev->long_retry,
12131215 adev->msdu_lifetime, adev->listen_interval, adev->beacon_interval);
12141216
45854585
45864586 /* People moan about this being too noisy at L_ASSOC */
45874587 log(L_DEBUG,
4588 "found %s: ESSID='%s' ch=%d "
4588 "found %s: ESSID=\"%s\" ch=%d "
45894589 "BSSID="MACSTR" caps=0x%04X SIR=%d SNR=%d\n",
45904590 (bss->cap_info & WF_MGMT_CAP_IBSS) ? "Ad-Hoc peer" : "AP",
45914591 bss->essid, bss->channel, MAC(bss->bssid), bss->cap_info,
46234623 ** other candidates... */
46244624
46254625 printk("%s: association FAILED: peer sent "
4626 "response code %d (%s)\n",
4626 "Status Code %d (%s)\n",
46274627 adev->ndev->name, st, get_status_string(st));
46284628 res = NOT_OK;
46294629 }
47024702 seq = ieee2host16(*(req->auth_seq));
47034703 status = ieee2host16(*(req->status));
47044704
4705 log(L_ASSOC, "auth algorithm %d, auth sequence %d, status %d\n", alg, seq, status);
4706
47054707 ap = (adev->mode == ACX_MODE_3_AP);
47064708
47074709 if (adev->auth_alg <= 1) {
47144714 goto end;
47154715 }
47164716 }
4717 log(L_ASSOC, "algorithm is ok\n");
4718
47194717 if (ap) {
47204718 clt = acx_l_sta_list_get_or_add(adev, hdr->a2);
47214719 if (STA_LIST_ADD_CAN_FAIL && !clt) {
47334733
47344734 /* now check which step in the authentication sequence we are
47354735 * currently in, and act accordingly */
4736 log(L_ASSOC, "acx_process_authen auth seq step %d\n", seq);
47374736 switch (seq) {
47384737 case 1:
47394738 if (!ap)
47894789 acx_l_transmit_assoc_req(adev);
47904790 break;
47914791 }
4792 result = NOT_OK;
4792 result = OK;
47934793end:
47944794 FN_EXIT1(result);
47954795 return result;
48694869
48704870 FN_ENTER;
48714871
4872 log(L_ASSOC, "sending authentication1 request, "
4873 "awaiting response\n");
4872 log(L_ASSOC, "sending authentication1 request (auth algo %d), "
4873 "awaiting response\n", adev->auth_alg);
48744874
48754875 tx = acx_l_alloc_tx(adev);
48764876 if (!tx)
48834883 body = (void*)(head + 1);
48844884
48854885 head->fc = WF_FSTYPE_AUTHENi;
4886 head->dur = host2ieee16(0x8000);
4886 /* duration should be 0 instead of 0x8000 to have
4887 * the firmware calculate the value, right? */
4888 head->dur = 0;
48874889 MAC_COPY(head->da, adev->bssid);
48884890 MAC_COPY(head->sa, adev->dev_addr);
48894891 MAC_COPY(head->bssid, adev->bssid);
49414941 body = (void*)(head + 1);
49424942
49434943 head->fc = WF_FSTYPE_AUTHENi;
4944 head->dur = req->hdr->dur;
4944 head->dur = 0 /* req->hdr->dur */;
49454945 MAC_COPY(head->da, req->hdr->a2);
49464946 MAC_COPY(head->sa, adev->dev_addr);
49474947 MAC_COPY(head->bssid, req->hdr->a3);
4948 head->seq = req->hdr->seq;
4948 head->seq = 0 /* req->hdr->seq */;
49494949
49504950 /* already in IEEE format, no endianness conversion */
49514951 body->auth_alg = *(req->auth_alg);
49974997 }
49984998 body = (void*)(head + 1);
49994999
5000 /* add WF_FC_ISWEPi: auth step 3 needs to be encrypted */
50005001 head->fc = WF_FC_ISWEPi + WF_FSTYPE_AUTHENi;
50015002 /* FIXME: is this needed?? authen4 does it...
5003 * I think it's even wrong since we shouldn't re-use old
5004 * values but instead let the firmware calculate proper ones
50025005 head->dur = req->hdr->dur;
50035006 head->seq = req->hdr->seq;
50045007 */
50485048 body = (void*)(head + 1);
50495049
50505050 head->fc = WF_FSTYPE_AUTHENi; /* 0xb0 */
5051 head->dur = req->hdr->dur;
5051 head->dur = 0 /* req->hdr->dur */;
50525052 MAC_COPY(head->da, req->hdr->a2);
50535053 MAC_COPY(head->sa, adev->dev_addr);
50545054 MAC_COPY(head->bssid, req->hdr->a3);
5055 head->seq = req->hdr->seq;
5055 head->seq = 0 /* req->hdr->seq */;
50565056
50575057 /* already in IEEE format, no endianness conversion */
50585058 body->auth_alg = *(req->auth_alg);
51655165 /* calculate lengths */
51665166 packet_len = WLAN_HDR_A3_LEN + (p - body);
51675167
5168 log(L_ASSOC, "association: requesting caps 0x%04X, ESSID '%s'\n",
5168 log(L_ASSOC, "association: requesting caps 0x%04X, ESSID \"%s\"\n",
51695169 cap, adev->essid_for_assoc);
51705170
51715171 acx_l_tx_data(adev, tx, packet_len);
52825282 bss = &adev->sta_list[i];
52835283 if (!bss->used) continue;
52845284
5285 log(L_ASSOC, "scan table: SSID='%s' CH=%d SIR=%d SNR=%d\n",
5285 log(L_ASSOC, "scan table: SSID=\"%s\" CH=%d SIR=%d SNR=%d\n",
52865286 bss->essid, bss->channel, bss->sir, bss->snr);
52875287
52885288 if (!mac_is_bcast(adev->ap))
53595359 if (bss->channel == adev->channel)
53605360 break;
53615361 } else
5362 if (!bss->essid[0]
5363 || ((' ' == bss->essid[0]) && !bss->essid[1])
5364 ) {
5362 if (is_hidden_essid(bss->essid)) {
53655363 /* hmm, station with empty or single-space SSID:
53665364 * using hidden SSID broadcast?
53675365 */
53915391 bss = &adev->sta_list[idx_found];
53925392 adev->ap_client = bss;
53935393
5394 if (bss->essid[0] == '\0') {
5394 if (is_hidden_essid(bss->essid)) {
53955395 /* if the ESSID of the station we found is empty
53965396 * (no broadcast), then use user-configured ESSID
53975397 * instead */
63836383 u8 *paddr;
63846384
63856385 paddr = &stationID[4];
6386 memcpy(adev->dev_addr, adev->ndev->dev_addr, ETH_ALEN);
63866387 for (i = 0; i < ETH_ALEN; i++) {
63876388 /* copy the MAC address we obtained when we noticed
63886389 * that the ethernet iface's MAC changed
67916791 adev->ndev->name);
67926792 adev->recalib_msg_ratelimit++;
67936793 if (adev->recalib_msg_ratelimit == 5)
6794 printk("disabling above message\n");
6794 printk("disabling above message until next recalib\n");
67956795 }
67966796 return;
67976797 }
68286828 }
68296829}
68306830
6831#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
6832static void
6833acx_e_after_interrupt_task(struct work_struct *work)
6834{
6835 acx_device_t *adev = container_of(work, acx_device_t, after_interrupt_task);
6836#else
68316837static void
68326838acx_e_after_interrupt_task(void *data)
68336839{
68346840 struct net_device *ndev = (struct net_device*)data;
68356841 acx_device_t *adev = ndev2adev(ndev);
6842#endif
68366843
68376844 FN_ENTER;
68386845
69546954acx_init_task_scheduler(acx_device_t *adev)
69556955{
69566956 /* configure task scheduler */
6957#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
6958 INIT_WORK(&adev->after_interrupt_task, acx_e_after_interrupt_task);
6959#else
69576960 INIT_WORK(&adev->after_interrupt_task, acx_e_after_interrupt_task,
69586961 adev->ndev);
6962#endif
69596963}
69606964
69616965
69806980 SET_BIT(adev->set_mask, SET_TEMPLATES|SET_STA_LIST|GETSET_WEP
69816981 |GETSET_TXPOWER|GETSET_ANTENNA|GETSET_ED_THRESH|GETSET_CCA
69826982 |GETSET_REG_DOMAIN|GETSET_MODE|GETSET_CHANNEL
6983 |GETSET_TX|GETSET_RX);
6983 |GETSET_TX|GETSET_RX|GETSET_STATION_ID);
69846984
69856985 log(L_INIT, "updating initial settings on iface activation\n");
69866986 acx_s_update_card_settings(adev);
toggle raw diff

conv.c

 
3030** ---------------------------------------------------------------------
3131*/
3232
33#include <linux/config.h>
3433#include <linux/version.h>
34#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
35#include <linux/config.h>
36#endif
3537#include <linux/skbuff.h>
3638#include <linux/if_arp.h>
3739#include <linux/etherdevice.h>
toggle raw diff

ioctl.c

 
3030** ---------------------------------------------------------------------
3131*/
3232
33#include <linux/config.h>
3433#include <linux/version.h>
34#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
35#include <linux/config.h>
36#endif
3537#include <linux/kernel.h>
3638#include <linux/types.h>
3739#include <asm/io.h>
38//#include <asm/uaccess.h> /* required for 2.4.x kernels; verify_write() */
40/* #include <asm/uaccess.h> */ /* required for 2.4.x kernels; verify_write() */
3941#include <linux/if_arp.h>
4042#include <linux/wireless.h>
4143#include <net/iw_handler.h>
570570 if (rate & 1) {
571571 iwe.u.bitrate.value = *p * 500000; /* units of 500kb/s */
572572 log(L_IOCTL, "scan, rate: %d\n", iwe.u.bitrate.value);
573 ptr = iwe_stream_add_value(ptr, ptr_rate, end_buf,
573 ptr_rate = iwe_stream_add_value(ptr, ptr_rate, end_buf,
574574 &iwe, IW_EV_PARAM_LEN);
575575 }
576576 rate >>= 1;
664664 log(L_IOCTL, "set ESSID '%*s', length %d, flags 0x%04X\n",
665665 len, extra, len, dwrq->flags);
666666
667#if WIRELESS_EXT >= 21
668 /* WE 21 gives real ESSID strlen, not +1 (trailing zero):
669 * see LKML "[patch] drivers/net/wireless: correct reported ssid lengths" */
670 len += 1;
671#endif
672
667673 acx_sem_lock(adev);
668674
669675 /* ESSID disabled? */
22402240
22412241 usage.busytime = le32_to_cpu(usage.busytime);
22422242 usage.totaltime = le32_to_cpu(usage.totaltime);
2243 printk("%s: average busy percentage since last invocation: %d%% "
2243
2244 /* yes, this is supposed to be "Medium" (singular of media),
2245 not "average"! OK, reword the message to make it obvious... */
2246 printk("%s: busy percentage of medium (since last invocation): %d%% "
22442247 "(%u of %u microseconds)\n",
22452248 ndev->name,
22462249 usage.busytime / ((usage.totaltime / 100) + 1),
toggle raw diff

pci.c

 
3131*/
3232#define ACX_PCI 1
3333
34#include <linux/config.h>
3534#include <linux/version.h>
35#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
36#include <linux/config.h>
37#endif
38
39/* Linux 2.6.18+ uses <linux/utsrelease.h> */
40#ifndef UTS_RELEASE
41#include <linux/utsrelease.h>
42#endif
43
3644#include <linux/compiler.h> /* required for Lx 2.6.8 ?? */
3745#include <linux/kernel.h>
3846#include <linux/module.h>
106106/***********************************************************************
107107*/
108108static void acxpci_i_tx_timeout(struct net_device *ndev);
109#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
110static irqreturn_t acxpci_i_interrupt(int irq, void *dev_id);
111#else
109112static irqreturn_t acxpci_i_interrupt(int irq, void *dev_id, struct pt_regs *regs);
113#endif
110114static void acxpci_i_set_multicast_list(struct net_device *ndev);
111115
112116static int acxpci_e_open(struct net_device *ndev);
635635
636636 FN_ENTER;
637637
638 /* print exact chipset and radio ID to make sure people really get a clue on which files exactly they are supposed to provide,
639 * since firmware loading is the biggest enduser PITA with these chipsets.
640 * Not printing radio ID in 0xHEX in order to not confuse them into wrong file naming */
641 printk( "acx: need to load firmware for acx1%02d chipset with radio ID %02x, please provide via firmware hotplug:\n"
642 "acx: either one file only (<c>ombined firmware image file, radio-specific) or two files (radio-less base image file *plus* separate <r>adio-specific extension file)\n",
643 IS_ACX111(adev)*11, adev->radio_type);
644
638645 /* Try combined, then main image */
639646 adev->need_radio_fw = 0;
640647 snprintf(filename, sizeof(filename), "tiacx1%02dc%02X",
660660
661661 for (try = 1; try <= 5; try++) {
662662 res = acxpci_s_write_fw(adev, fw_image, 0);
663 log(L_DEBUG|L_INIT, "acx_write_fw (main/combined):%d\n", res);
663 log(L_DEBUG|L_INIT, "acx_write_fw (main/combined): %d\n", res);
664664 if (OK == res) {
665665 res = acxpci_s_validate_fw(adev, fw_image, 0);
666666 log(L_DEBUG|L_INIT, "acx_validate_fw "
667 "(main/combined):%d\n", res);
667 "(main/combined): %d\n", res);
668668 }
669669
670670 if (OK == res) {
15331533 printk("acx: cannot reserve PCI memory region 2\n");
15341534 goto fail_request_mem_region2;
15351535 }
1536 mem1 = ioremap(phymem1, mem_region1_size);
1536
1537 /* this used to be ioremap(), but ioremap_nocache()
1538 * is much less risky, right? (and slower?)
1539 * FIXME: we may want to go back to cached variant if it's
1540 * certain that our code really properly handles
1541 * cached operation (memory barriers, volatile?, ...)
1542 * (but always keep this comment here regardless!)
1543 * Possibly make this a driver config setting? */
1544
1545 mem1 = ioremap_nocache(phymem1, mem_region1_size);
15371546 if (!mem1) {
15381547 printk("acx: ioremap() FAILED\n");
15391548 goto fail_ioremap1;
15401549 }
1541 mem2 = ioremap(phymem2, mem_region2_size);
1550 mem2 = ioremap_nocache(phymem2, mem_region2_size);
15421551 if (!mem2) {
15431552 printk("acx: ioremap() #2 FAILED\n");
15441553 goto fail_ioremap2;
15691569 ndev = alloc_netdev(sizeof(*adev), "wlan%d", dummy_netdev_init);
15701570 /* (NB: memsets to 0 entire area) */
15711571 if (!ndev) {
1572 printk("acx: no memory for netdevice structure\n");
1572 printk("acx: no memory for netdevice struct\n");
15731573 goto fail_alloc_netdev;
15741574 }
15751575
16471647 acx_s_interrogate(adev, &co, ACX111_IE_CONFIG_OPTIONS);
16481648 }
16491649
1650//TODO: merge them into one function, they are called just once and are the same for pci & usb
1650/* TODO: merge them into one function, they are called just once and are the same for pci & usb */
16511651 if (OK != acxpci_read_eeprom_byte(adev, 0x05, &adev->eeprom_version))
16521652 goto fail_read_eeprom_version;
16531653
21012101
21022102 acx_init_task_scheduler(adev);
21032103
2104//TODO: pci_set_power_state(pdev, PCI_D0); ?
2104/* TODO: pci_set_power_state(pdev, PCI_D0); ? */
21052105
21062106 /* request shared IRQ handler */
21072107 if (request_irq(ndev->irq, acxpci_i_interrupt, SA_SHIRQ, ndev->name, ndev)) {
21602160 write_reg16(adev, IO_ACX_FEMR, 0x0);
21612161 free_irq(ndev->irq, ndev);
21622162
2163//TODO: pci_set_power_state(pdev, PCI_D3hot); ?
2163/* TODO: pci_set_power_state(pdev, PCI_D3hot); ? */
21642164
21652165 /* We currently don't have to do anything else.
21662166 * Higher layers know we're not ready from dev->start==0 and
24612461 printk(" Key_Not_Found");
24622462 }
24632463 if (irqtype & HOST_INT_IV_ICV_FAILURE) {
2464 printk(" IV_ICV_Failure");
2464 printk(" IV_ICV_Failure (crypto)");
24652465 }
24662466 /* HOST_INT_CMD_COMPLETE */
24672467 /* HOST_INT_INFO */
25032503#define MAX_IRQLOOPS_PER_JIFFY (20000/HZ) /* a la orinoco.c */
25042504
25052505static irqreturn_t
2506#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
2507acxpci_i_interrupt(int irq, void *dev_id)
2508#else
25062509acxpci_i_interrupt(int irq, void *dev_id, struct pt_regs *regs)
2510#endif
25072511{
25082512 acx_device_t *adev;
25092513 unsigned long flags;
33733373 adev->stats.tx_fifo_errors++;
33743374 break;
33753375 case 0x80:
3376 /* possibly ACPI C-state powersaving related!!!
3377 * (DMA timeout due to excessively high wakeup
3378 * latency after C-state activation!?)
3379 * Disable C-State powersaving and try again,
3380 * then PLEASE REPORT, I'm VERY interested in
3381 * whether my theory is correct that this is
3382 * actually the problem here.
3383 * In that case, use new Linux idle wakeup latency
3384 * requirements kernel API to prevent this issue. */
33763385 err = "DMA error";
33773386 adev->wstats.discard.misc++;
33783387 break;
toggle raw diff

usb.c

 
4545#define ACX_USB 1
4646
4747#include <linux/version.h>
48#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
4849#include <linux/config.h>
50#endif
4951#include <linux/types.h>
5052#include <linux/module.h>
5153#include <linux/moduleparam.h>
9090#define PRODUCT_ID_WUG2400 0xb21a /* AboCom WUG2400 or SafeCom SWLUT-54125 */
9191#define VENDOR_ID_AVM_GMBH 0x057c
9292#define PRODUCT_ID_AVM_WLAN_USB 0x5601
93#define PRODUCT_ID_AVM_WLAN_USB_si 0x6201 /* "self install" named Version: driver kills kernel on inbound scans from fritz box ??? */
9394#define VENDOR_ID_ZCOM 0x0cde
9495#define PRODUCT_ID_ZCOM_XG750 0x0017 /* not tested yet */
9596#define VENDOR_ID_TI 0x0451
115115*/
116116static int acxusb_e_probe(struct usb_interface *, const struct usb_device_id *);
117117static void acxusb_e_disconnect(struct usb_interface *);
118#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
119static void acxusb_i_complete_tx(struct urb *);
120static void acxusb_i_complete_rx(struct urb *);
121#else
118122static void acxusb_i_complete_tx(struct urb *, struct pt_regs *);
119123static void acxusb_i_complete_rx(struct urb *, struct pt_regs *);
124#endif
120125static int acxusb_e_open(struct net_device *);
121126static int acxusb_e_close(struct net_device *);
122127static void acxusb_i_set_rx_mode(struct net_device *);