Date: Mon, 06 Jun 2011 18:50:14 -0700 From: Matt <sendtomatt@gmail.com> To: Adrian Chadd <adrian@freebsd.org> Cc: freebsd-wireless@freebsd.org Subject: Re: Ralink RT3090/RT2860 Message-ID: <4DED83D6.3020805@gmail.com> In-Reply-To: <BANLkTikJmM_6XT=Ywe=-=JSZMj0Fz-cSCg@mail.gmail.com> References: <4DD365A2.3090106@gmail.com> <20110518100203.7bfa63be@gmail.com> <BANLkTim4USyTSRUP0Ndgw8RT2oSFRGQ1%2BA@mail.gmail.com> <4DEC0234.8030300@gmail.com> <20110606022257.39093142.ray@ddteam.net> <4DED769A.6040405@gmail.com> <BANLkTikJmM_6XT=Ywe=-=JSZMj0Fz-cSCg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 06/06/11 18:26, Adrian Chadd wrote: > On 7 June 2011 08:53, Matt<sendtomatt@gmail.com> wrote: > >> Well, in anycase here is the patch I made for Ral. If no one wants to work >> on trying to port OpenBSD ral, I can try, but I am still learning very much! >> >> http://pastebin.com/GeAGVjtR > That's great work! > >> Please add manually rt2860.c to Makefile @ /usr/src/sys/modules/ral/Makefile >> >> Note about patch, it's still alpha quality in that it has a known bug (do >> not kldunload while interface is running!) and it is largely untested. >> Changes include softc, pci code& all functions put in monolithic file (to >> help compare against OpenBSD ral, mainly). They are in the wrong order for >> now, however. Ultimate plan was to compare side-by-side with OpenBSD ral to >> assist porting. >> >> There is still an "ecosystem" of includes per rt2860 original, didn't get >> around to combining them. > Well, I'm all for throwing this in if Matt's up for helping debug and > look after it in the meantime. > > I gather the long-term goal is to update to the OpenBSD driver but > this seems like a good middle-step, no? > > > Adrian > I didn't touch much in the actual "talks to hardware" part. I did however end up needing to change quite a bit in softc and steal parts of OpenBSD & Alexander's attach. Probably Alexander's copyright line from rt2860.c needs to be copied to if_ral_pci.c due to inclusion of vendor id detection and softc/opns assignment. Is there any value in condensing the includes to match the other devices? I can do this and touch up copyrights (there is some code from rt2860_pci.c that made it into if_ral_pci.c). If anyone with good eyes can look and make sure mutexes and memory are handled as sanely as possible, I'd appreciate it. I will make a new patch with some sanity changes, the LNA gain fix (there should only be one LNA per antenna needed, I think?) & some other hardware specific cases, as well as any fixes anyone notices in the next few days. Glad I can contribute to a very great operating system. I promise to read kernel normal style! Thanks Matt ("In The Hat", for disambiguation :)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DED83D6.3020805>