From owner-freebsd-wireless@freebsd.org Sun Jul 29 00:13:06 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 BDF5410628F3 for ; Sun, 29 Jul 2018 00:13:06 +0000 (UTC) (envelope-from khanzf@gmail.com) Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::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 575E986F30 for ; Sun, 29 Jul 2018 00:13:06 +0000 (UTC) (envelope-from khanzf@gmail.com) Received: by mail-it0-x233.google.com with SMTP id 72-v6so12657601itw.3 for ; Sat, 28 Jul 2018 17:13:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=xw3nT/ta4PVX1U6V+8HvV761huMgH4YrP09a6/ikT5w=; b=b1eFd0C7Hg+xCHxxn1mpZhKu1yZpcRVs8wM/knX1M1ONA81thwTN7SQMWrC9Ha5688 T4kQhrrZN02JE4l15hsIfIT44lYVI5WnCuM77n0ZKgWSI21PckuCqYXKjPAA2i0CcQ4l QzwJGvrXyf8ocIll7XaMH7nsj4Cyj999mGrwpmwtumUMF0znfPXls4QL6DyT3adx9o3+ kVlCAQlYsPsdzrk3jo2KOX8971PO5r+E/meMFC5HH7/v3aAFald7WfjF9/aIYPt0nLTW pQO37XAmL2t924ahOtlOwLYnkE2FZeIpYRCdfthxZZBtmIadOMBXUSjCXpJKzb/0sa+1 fTgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=xw3nT/ta4PVX1U6V+8HvV761huMgH4YrP09a6/ikT5w=; b=Dhhw9JI3NKmJ5njftP5XtsorVB5MLfEz/g0OyrA3srL51wKXvrHXEnUrIcjShB9aoW lCivp/jLTSF95BeWx0Z27INJvFRm1gc46r/cUCS3he+9N2tVRT4TPtpl0nTko+GV8zE+ wF9vKEJ+cdksVQRl16WT27JdZwGbih1oDUf1AXMusipFFb/dzfRkBtZEZpGLoXXYZErT qIrRDBG2BumRTlT919+bI2qhgSw/03Y193Sg4jUM5gQg6/idp6G+75qvk9VolAv6lpMh aBhPJyul6NXRH1G6dd4Uk7ok1Yd5Dcv8j5D2N6/TrJhm48kB1Ij91+vXESTvlicG6lyS 8AHQ== X-Gm-Message-State: AOUpUlGEuHVMhHAOh8NvyQ9QLJJXL2HKp3Hic48ECleQCdNcITwXl7Cg HihzfqwihQU3Nq8YOI8RXCDrJjwkzye58LsVskHN8Ck7 X-Google-Smtp-Source: AAOMgpc2QmGQEgiUBMyE1XXsytSSqEpL4iM5ZJuQsW0EmGSxTO/CD6W7p8ztRL5SlYwCEFjEUnNCf3MqGkQHnvskshg= X-Received: by 2002:a02:a1d9:: with SMTP id o25-v6mr11494534jah.86.1532823185443; Sat, 28 Jul 2018 17:13:05 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac0:8101:0:0:0:0:0 with HTTP; Sat, 28 Jul 2018 17:12:45 -0700 (PDT) From: Farhan Khan Date: Sat, 28 Jul 2018 20:12:45 -0400 Message-ID: Subject: What is the ieee80211_scanner variable? To: 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, 29 Jul 2018 00:13:06 -0000 Hi all, What is "ieee80211_scanner *scanners", as defined in ieee80211_scan.c and how is it set? I am trying to figure out why my driver does not produce any results when I run "ifconfig wlan0 scan". I traced the ioctl that ifconfig(8) sends up to ieee80211_start_scan(). Here it will run ieee80211_scanner_get(), which appears to check if the "scanners" variable is set to not-NULL, and if so, return that value. Back in ieee80211_start_scan() if the value is NULL, it will return 0. The surrounding debug printf message suggests that this means the card is not able to scan. Where is this value set? What is it? It seems to be defined within net80211(4) and not at the driver-level? Am I missing something? Please explain. Thanks, -- Farhan Khan PGP Fingerprint: B28D 2726 E2BC A97E 3854 5ABE 9A9F 00BC D525 16EE