From owner-freebsd-wireless@freebsd.org Sat Mar 18 23:28:34 2017 Return-Path: Delivered-To: freebsd-wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72EFED12ED6 for ; Sat, 18 Mar 2017 23:28:34 +0000 (UTC) (envelope-from s3erios@gmail.com) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1EB7F130D for ; Sat, 18 Mar 2017 23:28:34 +0000 (UTC) (envelope-from s3erios@gmail.com) Received: by mail-wm0-x233.google.com with SMTP id t189so39952317wmt.1 for ; Sat, 18 Mar 2017 16:28:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:subject:references:date:cc:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=ZV/Vd5K+oahyGl8CNzaMAPxsgnXcVlCkbnHLY/u4lnE=; b=e4bHk7xig72fRltBM3kvpOQaa2ffDhE1yk3r2fSlU1jjucoJFxGfISVss6O+D3dbWh rm6IPayc2id83EO5fTJEFDnZA9d4ygnSlUHbJR5Fp1c6wP+REk2R8oWOUzXaP7d7YC73 sBpCcIeBLvgIpjpduc5L6OkBaIqiqkSslL6h5RxWCpYZfsKRwP+PR8xi6b1dH8M7YX/2 PlVlBymj1F3RtX7wl0KO/a+8oz9ybEHZaq1NlQwntO9ep3SBm1P1UWOy3dGnZfUZNzf2 n5ZB1D9Xh0BnYSzdBLIHgdT/qlaylWai9aYaEbYJ6e2exGGMlraCc2+8XkQQDk6tUpxu 9g/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:subject:references:date:cc:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=ZV/Vd5K+oahyGl8CNzaMAPxsgnXcVlCkbnHLY/u4lnE=; b=ZFJVmQHcwLYytUbleo4sEccrIxNlvumWw8WI3twQcKWi0Zs+OOXr24H3odjnKrcSVU U3R774FYNR59zjl98bi4aH2jbeQnky4gRZxOWlQD4OJx4Je/yV6R+M1ud6up18w3KkGJ dFa/zTXyKI7e+aAU0NBjt6X/tLQ9s4vTbfqnrMeO2Sfuw6ONbhFniPJKmv+tX0EZKY+D VaVropaIehJ/fHQYbxf6kzxC4/pj9csPAVKI5obfVpoRBhTdjWQi90YVwgJjQs/4e7IN YaCXlgB9blhkQ0/564SluSYwgscV9y9jwsNF2FW+6iVk3ubiO20JW/cmL5LaQpl6GAMU +l/w== X-Gm-Message-State: AFeK/H3P9wjAxwuBsSwQs/ykkERJsJLgSwP1uWjjcEj96kRroxuWKZdmaiJNd7yFsiGs9Q== X-Received: by 10.28.5.72 with SMTP id 69mr3949429wmf.6.1489879711444; Sat, 18 Mar 2017 16:28:31 -0700 (PDT) Received: from thinkpad-x220 (host-176-37-109-22.la.net.ua. [176.37.109.22]) by smtp.gmail.com with ESMTPSA id g5sm15001670wrb.48.2017.03.18.16.28.30 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 18 Mar 2017 16:28:30 -0700 (PDT) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Farhan Khan" Subject: Re: Trouble writing rtl8188ee driver References: Date: Sun, 19 Mar 2017 01:28:23 +0200 Cc: "freebsd-wireless@freebsd.org" MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable From: "Andriy Voskoboinyk" Message-ID: In-Reply-To: User-Agent: Opera Mail/12.15 (FreeBSD) X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Mar 2017 23:28:34 -0000 Sat, 18 Mar 2017 22:21:51 +0200 =D0=B1=D1=83=D0=BB=D0=BE =D0=BD=D0=B0=D0= =BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE Farhan Khan = : Hi, there is no need to create an additional rtl8188ee[e] directories / file= s; AFAIK, rtl8188ee is just a PCI-E version of rtl8188e chipset (and rtl818= 8eu 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/r= 88ee_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 memor= y > 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. T= he > 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 provid= e = > 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"