From owner-freebsd-wireless@freebsd.org Wed Aug 14 04:15:27 2019 Return-Path: Delivered-To: freebsd-wireless@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 48050C63E6 for ; Wed, 14 Aug 2019 04:15:27 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-yw1-xc2c.google.com (mail-yw1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467bpj5F2vz3Hgr for ; Wed, 14 Aug 2019 04:15:25 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-yw1-xc2c.google.com with SMTP id w10so7176988ywa.13 for ; Tue, 13 Aug 2019 21:15:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1Z2enCBAXeLz+71NSY2ZdOPifuXcbltQEnxwvl4BD94=; b=ID52XsOc8kpm4oFu+CHu6GhcTdn9S4bF3YIHGx5xci8k+836Z/kHdJvr6/j3l3JNDs T5MBzB+RdW5mEi3JObYO5koUQkopbwzeSTOTh861nG005r337kDKCzImIWXS1aUpBqg/ FaFdHA1JPVmA5/vOJBlhJTymGETyJ1LU6U8lgYuaNIHXh+lcH+3aQX7KLOZaW7lvat8z cxHrFXBi+am5/4CHD7k7dgFLfoyNXyMBDYbZtirrYoK14Ly5VNAOja0yY7Sn2ZWj0BRQ o8Ou9CvMi51pYU8A47bj4IwvlJVkjLJ0KjMeC/LMWSKwCE8LJGnfq2n0ZO/gfG7vPi7L IH5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1Z2enCBAXeLz+71NSY2ZdOPifuXcbltQEnxwvl4BD94=; b=uVkOkWUXJj+OqBpZhLUjKbB757d7uSwVYcenwTIX9ChILLB+IZj+xNHHloWxZ52Xa1 UYoJ2TUIkA3gxLkGLe4GH+pHcEpoofKJtdi51kL2oPueVSLwVfuvtGCMaHYuCuLXUUAp GGf1KrS+QBBizE/wa/usvy2/aaOSXSCPGdMt5KMEuSuK18BLgNJ5EZNu5elG8jw492QE GLxdN1ZFpUFqw2sGXRn2puKWiMEMCp60v1J6Ykv63oDjCoeM5WFU1W/LXq51euc4I7WW 1V/LpPNByXh5y5IMvzfBffqj8t6Vh7hP5If08YD0SEVJJLOHj20ZA12O/Jnm2T7sxRxB 7eKw== X-Gm-Message-State: APjAAAU+wmRYtqrpd6D9j1wS8YdMl6vlRQGSgdsvzYILZjjiC4998I43 mcxwSerdaF+cfDHrX8hq/fO47TNJqxYu4Gq5cAQ= X-Google-Smtp-Source: APXvYqyDpDqZGS5kDIZnYmRwGjY18cEApzcsqeV01xmVlH4wW6S0NoTVZAyyaqUfa/JH6RcaOrnXe0y15lmgpp+T2bw= X-Received: by 2002:a81:9a4f:: with SMTP id r76mr726305ywg.28.1565756124215; Tue, 13 Aug 2019 21:15:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Adrian Chadd Date: Tue, 13 Aug 2019 21:15:12 -0700 Message-ID: Subject: Re: rtwn driver To: "james.m.parsons" Cc: "freebsd-wireless@freebsd.org" X-Rspamd-Queue-Id: 467bpj5F2vz3Hgr X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=ID52XsOc; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of adrianchadd@gmail.com designates 2607:f8b0:4864:20::c2c as permitted sender) smtp.mailfrom=adrianchadd@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-0.998,0]; FREEMAIL_TO(0.00)[protonmail.com]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (-9.50), ipnet: 2607:f8b0::/32(-2.98), asn: 15169(-2.39), country: US(-0.05)]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-wireless@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[c.2.c.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.29 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: Wed, 14 Aug 2019 04:15:27 -0000 yay! -a On Tue, 13 Aug 2019 at 21:13, james.m.parsons < james.m.parsons@protonmail.com> wrote: > Thanks! I dd end up creating a a couple days ago and it looks like it got > commited. > > > Sent from ProtonMail mobile > > > > -------- Original Message -------- > On Aug 14, 2019, 12:09 AM, Adrian Chadd < adrian.chadd@gmail.com> wrote: > > > hi! > > Thanks for doing this! if it's the same chipset but a different ID then > yes, it's literally that easy most times. :) > > Nice work! If you file a PR then we'll try to get someone to commit it to > freebsd-head. > > > -a > > > On Sun, 11 Aug 2019 at 00:34, james.m.parsons via freebsd-wireless < > freebsd-wireless@freebsd.org> wrote: > >> Good morning, >> >> A few weeks ago, I installed FreeBSD 12.0-RELEASE on a box that had an >> [Asus PCE-N15](https://www.asus.com/us/Networking/PCEN15/) wireless >> network card based on the Realtek RTL8192CE chipset. According to the man >> page for the [rtwn]( >> https://www.freebsd.org/cgi/man.cgi?query=rtwn&sektion=4&manpath=freebsd-release-ports) >> driver, this card was supported, however the driver refused to attach. >> Running pciconf -lv would show the device as none0, but had the correct >> vendor information. >> >> Later on, after [inquiring on the forums]( >> https://forums.freebsd.org/threads/issue-getting-realtek-wireless-network-card-rtwn-driver-working-on-new-freebsd-installation.71677/), >> I decided to investigate the potential of patching the driver to work with >> my card. When I finally sat down tonight to start on it, I found the fix >> surprisingly simple. Looking at the driver source code under >> /sys/dev/rtwn/pci/rtwn_pci_attach.h, I see an array containing the vendor >> id's and device id's for PCI devices: >> >> static const struct rtwn_pci_ident rtwn_pci_ident_table[] = { >> { 0x10ec, 0x8176, "Realtek RTL8188CE", RTWN_CHIP_RTL8192CE }, >> { 0, 0, NULL, RTWN_CHIP_MAX_PCI } >> }; >> >> I noticed the device id 0x8176 was different from my card, which was >> reported as 0x8178. So I added to that array: >> >> { 0x10ec, 0x8178, "Realtek RTL8192CE", RTWN_CHIP_RTL8192CE }, >> >> And after building and installing a custom kernel with all the lines >> noted in the above man page to the config, I rebooted, noticed the driver >> is now attaching to the PCI device and have since been able to connect to >> my home wifi without issue. >> >> Honestly, I'm a bit suspicious at the ease of fixing this issue, and am >> not sure if this is something that should / could be contributed to the >> kernel code. I'm also sure, there are other device id's that would need >> added to have full support, but after asking some other people, I was >> suggested to send an email to this address. >> >> Thanks, >> James Parsons >> _______________________________________________ >> 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" >> >