From owner-freebsd-wireless@freebsd.org Sun Jul 22 22:07:37 2018 Return-Path: Delivered-To: freebsd-wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3D2B102F9AC for ; Sun, 22 Jul 2018 22:07:37 +0000 (UTC) (envelope-from khanzf@gmail.com) Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (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 460D38732B; Sun, 22 Jul 2018 22:07:37 +0000 (UTC) (envelope-from khanzf@gmail.com) Received: by mail-io0-x241.google.com with SMTP id q19-v6so14034175ioh.11; Sun, 22 Jul 2018 15:07:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=kPbZ/CsoCt8A+mAaBh9IS7llFEcFSkHiz76xYy3opQY=; b=B0TMjPy7uKKqBTXbhit5IEdDF+N+o7TxPSY0mqXZHIrAJjuW3SuBWUyKJPY0x3oeJM p6oN1vxlQ0x65UdP9bgzkN3DhJEwOtPTeNN+2ZHy5rvczT5mG1iwG5i78Z6tsuq9s2Nc cf1CStHNEBosOOYzdq3TqUISWsO5Jm8Ygi/cLyriJtFpQUKzl1AhaQkRYNsEdd4OX9hh HN8jjVJU82Xm46od+QkUFN4skgsbc58L2A9GnHQ0PTz1A1LDhQgxOsniN3q7IpL6vfwE SKIAG3ofk6JYLzOhw72L++4tL+4vuPfcmEeLQwSR7gfUWFNzaxom7OfZ+z2bxUE2aHxU jHEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=kPbZ/CsoCt8A+mAaBh9IS7llFEcFSkHiz76xYy3opQY=; b=qHFPRvJmsU37dkDjy2HPkUPxULdWZNAyJps1G42egQrPc7SRpfGcdAie1br0D+EIu3 LAv7Xf7wUwOYdLvIhs0CVpAJqX5Nva3CsahTtVvyFZl+rjzT1N/9c79nhB4w8PGO+XWf RMaCb5QG5BAQ/sKWO2tvV1U8GP7Y6bqm0PpPKj25spni4kFY5mvOwlMCLGhMjuD3rKx8 SIolkUAnZ5O+rbllQ1D/9iJXN60RLuIftbXRotUvBttwrBzMQ5j9zzB+a0X2eWaDeITY GN5XjuWdDQkic+/zBGmj/rxI8dEcqzSQQFy2o1INpVL3KvDWAyNUGRfmkageXmKP4cd9 T7Uw== X-Gm-Message-State: AOUpUlGIadT8XxgCOZLS6DBOcaqum+qZinjiFrys3autxwXCpM/oDPPH pDRZ68n7WHmwKBFP9gdGbQKsgBeShhvhO5N6Wz2wsg== X-Google-Smtp-Source: AAOMgpfGLXI3E4aMxwKALnWP6n4pOInqJPnH3Y8AERG8+5XdtcV7US51azvbue25BElQHsud1DK0i98+b93K5i3QPaQ= X-Received: by 2002:a6b:6410:: with SMTP id t16-v6mr8044063iog.11.1532297256300; Sun, 22 Jul 2018 15:07:36 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac0:8101:0:0:0:0:0 with HTTP; Sun, 22 Jul 2018 15:07:15 -0700 (PDT) In-Reply-To: References: From: Farhan Khan Date: Sun, 22 Jul 2018 18:07:15 -0400 Message-ID: Subject: Re: Where is rtwn(4) scan failing To: Kevin Lo , avos@freebsd.org, freebsd-wireless@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.27 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: Sun, 22 Jul 2018 22:07:37 -0000 On Fri, Jul 6, 2018 at 5:35 PM, Farhan Khan wrote: > Hi Kevin, Andriy, et al, > > As you know, I am working on expanding rtwn(4) to include the > rtl8188ee driver. It appears that net80211(4) performs a scan before > associating to a BSS, so I am working on scanning. When I run > `ifconfig wlan0 scan`, sta_pick_bss() returns immediately without any > listed networks suggesting that whatever happens in the driver is > failing. > > It appears that the scanning method begins at rtwn_scan_start(). Using > dtrace and manually tracing the source, I identified that the kernel > executes the following non-net80211(4) methods: > > * rtwn_raw_xmit > * r92c_fill_tx_desc_raw > * r88ee_tx_setup_macid > * r88ee_tx_setup_hwseq > * rtwn_pci_tx_start_frame > * r92ce_copy_tx_desc > * r92ce_tx_postsetup > * r92ce_dump_tx_desc > > First, can you please provide a conceptual overview of what is > happening in these functions? > > Second, I am not certain which (or more than one?) are failing to > function properly with the new driver. Any ideas? > > As you know, I am using the Linux rtlwifi code as documentation, but > their code is extremely difficult to read. I suspect that FreeBSD's > r92c_fill_tx_desc_raw is Linux's rtl92ce_tx_fill_desc, but as I said, > the Linux code is extremely difficult to trace through. The rtl8188ee > equivalent is rtl88ee_tx_fill_desc. I only noticed 1 difference thus > far which I do not understand yet. > > I suspect somewhere a value is set to 0x1f which should be 0x3f or > something of this nature. I was stuck on Rx for around some 6 months > and while eventually got it, it would be nice to be a little more > efficient with Tx :) > > Again, any assistance is greatly appreciated. > Thank you! > -- > Farhan Khan > PGP Fingerprint: B28D 2726 E2BC A97E 3854 5ABE 9A9F 00BC D525 16EE Hi all, I am still stuck on this and have made no progress in the past few weeks. Does anyone have any ideas? I could really use some assistance and have not heard anything back from anyone. "ifconfig wlan0 scan" immediately returns with no scan results. Where might the issues reside? Please please provide guidance. Thanks -- Farhan Khan PGP Fingerprint: B28D 2726 E2BC A97E 3854 5ABE 9A9F 00BC D525 16EE