Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #886 (reopened defect)

Opened 13 years ago

Last modified 12 years ago

HAL oopses or throws AHB PROC interrupts on WiSOC platforms

Reported by: mhojlund@hotmail.com Assigned to:
Priority: major Milestone: version 0.9.x - progressive release candidate phase
Component: madwifi: driver Version: trunk
Keywords: Cc:
Patch is attached: 1 Pending:

Description

When running MadWifi on Atheros Wireless System-on-a-Chip platforms (AP30, AP43, etc), it is missing an important argument in the call to ath_hal_attach(). If this argument is corrected, the HAL causes the platform to throw an AHB PROC interrupt becuase the WLAN chip has not been correctly reset by the kernel.

This patch adds the missing configuration parameter to ath_hal_attach and resets the WLAN chip before calling ath_attach. It has been lightly tested on a DLink-DWL2100AP, kernel 2.4.32. Note that in order to make madwifi compile on e.g. OpenWRT, the header flags must be modified in ap30.hal.o, something that isn't done by this patch.

This patch fixes Ticket #501 and possibly others as well.

Signed-Off-By: Mats Hojlund <mhojlund@hotmail.com>

Attachments

107-wisoc.patch (5.8 kB) - added by mhojlund@hotmail.com on 09/15/06 15:26:16.
Enables MadWifi on WiSOC systems

Change History

09/15/06 15:26:16 changed by mhojlund@hotmail.com

  • attachment 107-wisoc.patch added.

Enables MadWifi on WiSOC systems

09/15/06 18:43:23 changed by mentor

Looks fine apart from that sleep. I'm not sure how sleeping in the kernel works, so I'll just check.

Also, I hate the HAL type opaqueness thing; this is notable here with the HAL_BUS_TAG. Of course, this is nothing to do with the patch. I'm just saying.

09/16/06 14:48:22 changed by mentor

Yes, we should be using mdelay, for short periods and msleep for long sleeps. Should we really be sleeping for 15 seconds? it seems a bit excessive...

09/16/06 15:33:06 changed by mhojlund@hotmail.com

udelay delays for the specified number of microseconds. udelay(15000) delays for 15 miliseconds, which would correspond to mdelay(15). I have no clue on what the shortest required delay is, the current value was taken from NetBSD's bus init code.

09/16/06 16:26:09 changed by mentor

  • status changed from new to closed.
  • resolution set to fixed.

Commited as r1714. The large udelay has been changed to an mdelay to prevent overflow issues.

09/16/06 16:34:15 changed by mrenzmann

  • milestone set to version 0.9.3.

02/13/07 11:00:12 changed by bitbucket

It seems to me that this bug is not fixed. I tried madwifi-ng hal version 0.9.17.2 and patched ath_ahb on Atheros based DLINK DWL-2100 (tested like ap30, ap51) - it throws:
AHB interrupt: PROCADDR=0x18000014 PROC1=0x80000a16 DMAADDR=0x00000000 DMA1=0x00000000

Kernel - 2.6.19.2 from OpenWRT svn. madwifi-ng - one from OpenWRT, one from daily snapshoots.

02/13/07 15:26:24 changed by mrenzmann

@bitbucket: which revision exactly did you test?

02/13/07 16:35:47 changed by bitbucket

madwifi-ng-r2100-20070210 and shipped with OpenWRT madwifi-0.9.2.1 - it uses platform ap51, I tested ap51, ap30.

02/14/07 06:27:40 changed by mrenzmann

  • status changed from closed to reopened.
  • version changed from v0.9.2 to trunk.
  • resolution deleted.
  • milestone changed from version 0.9.3 to version 0.9.x - progressive release candidate phase.

Reopening the ticket and rescheduling it for the next release.

02/17/07 18:20:00 changed by mentor

Maybe try with a ridiculously long delay?

03/10/07 11:43:45 changed by bitbucket

long delays does not help, but i solved this problem on DLink DWL2100AP:
I dont know why, but in DWL2100 wlan0 device does not exist(!!??!!). So I have to change if_ath_ahb.c to use wlan1:

static int ahb_wmac_probe(struct platform_device *pdev)
{
        u32 devid;
        struct ar531x_config *config;

        config = (struct ar531x_config *) pdev->dev.platform_data;
        devid = (u32) config->tag;
        config->tag = NULL;

+++     if (pdev->id>0) return -ENODEV;

---     return init_ath_wmac((u_int16_t) devid, pdev->id, config);
+++     return init_ath_wmac((u_int16_t) devid, pdev->id+1, config);
}


TARGET=ap43, hal 0.9.18.0.
Now I have linux working on DWL2100AP.

03/10/07 21:54:14 changed by mentor

Erg. Hacky. Off by one error somewhere I guess.

03/11/07 15:24:18 changed by mentor

Ah. It looks like we may be probing the chipno/wlannum badly.