Status update, got the driver working quite well, no more Rx/Tx errors, it actualy was like the other drivers, where i had to read the status, save it into another added variable in the softc struct, and read it back in msk_intr for it to be able to read the status of everything =) But DHCP keeps loosing connection for some reason, am i doing something wrong here? :) Works perfectly a while then it just disconnects and wont get a new ip again :/ On Fri, Mar 5, 2010 at 8:41 PM, Tomas Wilhelmsson < tomas.wilhelmsson@xxxxxxxxx> wrote: > On Wed, Mar 3, 2010 at 10:40 PM, Colin Günther <coling@xxxxxx> wrote: > >> On 03.03.2010 09:49, Tomas Wilhelmsson wrote: >> >>> >>> Other proposed changes to freebsd_network is for the ssb driver needed >>> for BWM wifi driver (i think its a replacement for bwi driver) >>> >> >> Have less time to look into this atm, I would suggest to open an >> enhancement ticket on trac, where you can put your patches, so that they >> don't get lost. One ticket per patch would be best, as they aren't really >> related as far as I can tell. I'm supposing that the freebsd_network.patch >> is the one which is needed by the ssb driver (so i don't know what ssb is >> used for). >> And as Axel mentioned, would be nice to know which revision of FreeBSD you >> used, as there seems to be some copy and pasted code in the patches. >> >> well, the freebsd_network.patch is related due to the fact that there was > some more functions needed for the newer marvell_yukon driver =) the ssb i > guess is some kind of hardware that the bwm hardware uses or something i > dont realy know either, all i know is that an ssb driver is needed for the > bwm driver to work > > Ye, the revision of FreeBSD is kinda hard to tell realy but ive been > looking at it and it looks like the functions has been the same over alot of > freebsd releases, functions have been searched for on: > http://fxr.watson.org/fxr/ident?v=FREEBSD8 > > and taken where i could find a matching function name =) > > > >> Anyhow, if anyone can fix up the marvell_yukon driver so that i can use >> my brand new laptop in haiku i would love you =) >> >>> >>> Tried to clean up the patches but might have missed some basic coding >>> guidelines, first try at getting something done for haiku =) >>> >>> Have a nice day! >>> Tomas Wilhelmsson >>> >> >> When changing interrupt routines there are two files you need to look at: >> the driver file and the glue.c file. The glue.c file glues the Haiku >> interrupt handling code and the FreeBSD interrupt handling code together. So >> the Haiku part usually disables the interrupts of the network device, so >> that it stops interrupting as long as the interrupt wasn't handled by the >> FreeBSD part. >> >> So it is best that this disabling happens only once (you may need to >> "uncomment" interrupt disabling in the FreeBSD driver, though (conditionally >> compilation is your friend here (have a look at >> wlan/atheroswifi/dev/ath/if_ath.c::ath_intr() for to get the idea))). >> >> Then at some point the driver needs to reenable the interrupts again. >> Either this is done in the original FreeBSD-code already, than you don't >> have to do anything else, or there is nowhere a notion of reenabling >> interrupts (note: reenabling must not necessarily happen in the msk_intr() >> function) than you need to write a reenabling routine in glue.c (have a look >> at wlan/atheroswifi/glue.c). >> >> Thanks for your efforts :) >> >> -Colin >> >> > got the driver working but losing dhcp connection and getting rx/tx errors > full the syslog, atleast one step in the right direction i guess, added > HAIKU_CHECK_DISABLE_INTERRUPTS and copied over the disabling code in the > beginning of the msk_intr function to it and now cable connection works > without a kernel panic atleast, but doesnt work flawlessly as you might be > able to tell from the errors :P > Downloaded whole of haiku A1R1 atleast and managed to extract and mount it > browsing the image afterwards =) >