Date: Sun, 19 Mar 2017 01:28:23 +0200 From: "Andriy Voskoboinyk" <s3erios@gmail.com> To: "Farhan Khan" <khanzf@gmail.com> Cc: "freebsd-wireless@freebsd.org" <freebsd-wireless@freebsd.org> Subject: Re: Trouble writing rtl8188ee driver Message-ID: <op.yxbktlthiew4ia@thinkpad-x220> In-Reply-To: <CAFd4kYBbxJZAYgxPHTQhcVd2Ygsm36oA8gT_ASpXmSVZF-HpyA@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
Sat, 18 Mar 2017 22:21:51 +0200 було написано Farhan Khan <khanzf@gmail.com>: Hi, there is no need to create an additional rtl8188ee[e] directories / files; AFAIK, rtl8188ee is just a PCI-E version of rtl8188e chipset (and rtl8188eu is an USB-based version); you should just separate pci / usb code inside rtl8188e directory (most of it will be the same; you can use rtl8192c as an example (but you should use rtl8188eu as an template - they are somewhat different)) About this particular bug: you don't have RTWN_FLAG_EXT_HDR set (non-rtl8192c chipsets may contain an 'extended header' in encoded ROM image; it is generally used to extend maximum ROM image size over 128 bytes) > Hi team, > > I'm toothe from the IRC channel. I hope you all are doing well :) Let me > tell you where I am in writing my code. In short, I am stuck and need > asisstance. > > I created a copy of the rtl8192c code, and placed it here: > https://github.com/khanzf/freebsd/tree/master/sys/dev/rtwn/rtl8188ee > > I zero'd out all functions and went one-by-one to replace them as > necessary. The section of code that I am stuck at is reading the > EEPROM/ROM > from the chip. I backed into the ROM image for the first 222 bytes by > using > the Linux source as documentation and created this: ( > https://github.com/khanzf/freebsd/blob/master/sys/dev/rtwn/rtl8188ee/r88ee_rom_image.h#L56) > When > I read from the ROM, I basically get 500~ bytes of 0xFF - the first 10 or > so are set properly, suggesting that I am reading from the right memory > segment. Specifically, the first 2 bytes are 0x8129, which is accurate > per > the Linux driver. But why is everything else coming up as 0xFF's? > > I delved into how FreeBSD's rtwn and Linux's rtl8188ee drivers work. The > efuse code is very similiar, of course, but I do not understand the > reasoning for what is occurring. The main difference I found, so far, was > that the Linux driver will read from EFUSE_CTRL + an offset (1, 2 or 3), > whereas the FreeBSD driver does not use an offset. > > This is where I am stuck. I would easily just change the code over to add > the offset on the FreeBSD code, but it is in > sys/dev/rtwn/if_rtwn_efuse.c, > which is used by multiple drivers. > > I am unsure what is wrong or how to diagnose it. Can you please provide > me > some guidance? I have been stuck on this same issue for a little more > than > a month. > > Thank you! > > -- > Farhan Khan > PGP Fingerprint: 782F 342B 5B08 0D2F F4E8 82C3 FFA1 CAE1 6536 51CA > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to > "freebsd-wireless-unsubscribe@freebsd.org"help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.yxbktlthiew4ia>
