Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3532776ybf; Tue, 3 Mar 2020 07:39:05 -0800 (PST) X-Google-Smtp-Source: ADFU+vvndWplTympBj/LqHZlMd8WeIr3II9Y6YUpSrqkjVbYKibyAo/ynjS+3hjZ50BfpIYrXaXB X-Received: by 2002:aca:4d47:: with SMTP id a68mr2665922oib.145.1583249945542; Tue, 03 Mar 2020 07:39:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583249945; cv=none; d=google.com; s=arc-20160816; b=KvFWun+WBs24GZmpUMNw8yJF9DO7ymRE43ehmLiHfCz58p+gI6bJNamDRR8DJLia18 82KlyBHyMqAca5sPav6G0SLvjhW9Z12g0kq8ckD6gLr30PflwkZpd+2wUJHOaNmZz8GQ IHSwL6AAiRE/4ubQIBd/xQggXUkThR/LQTLwL9h9efpZ3gRPrNCWp3eAq8/ZaxWHXXHn 2OGyKnnRYRm3zqttscjaf3X65d7B0y8naUltowm8b/5OhirOx4w6Qdf58mRCjH0dUdTG G0R8shKpVmjcivScpLur3qfwgxFu+hWic4zLUOpwe88zJ9LjxyhfWQn7VbtDIzca9022 rB9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:to:subject :dkim-signature:dkim-filter; bh=6Kt223n/D9FZaH9FGcu1XOU+1LL7IIe4j7DihVN2TRk=; b=zn0A03/86q3k5lrQCABbNwirZV7m2pREt48VRO82yBZLvQrzkuILVP0SoVbVWH/B9T SGR6tesJUNsSMiNNrgMWFCR3FI/MVpAdUQ3tom5f8E9y8FaKjSemaC0D9MoNG1JpgwW+ fnYIRKU3yOR94NOmN6F7OOGcBP3SSb6s+JpqioQDt60Q//TKCEAPnjI4qSwuNiMcPwxI 0RhkZnfi2VkCdKEEkCxO5pQoXzC3NA4zRaojqayYxsA8VZ/oZKn15SBNSQAu2aNuefxn MRBT+CF0cBbyo0DC80vf0FGq9OWAFycSfqal3iEGsNtfhUYK39dfvhNjzJnuOqq04/52 q/Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=MMyozALi; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u24si7003650otk.287.2020.03.03.07.38.26; Tue, 03 Mar 2020 07:39:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=MMyozALi; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728059AbgCCO5l (ORCPT + 99 others); Tue, 3 Mar 2020 09:57:41 -0500 Received: from mail2.candelatech.com ([208.74.158.173]:41502 "EHLO mail3.candelatech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726368AbgCCO5l (ORCPT ); Tue, 3 Mar 2020 09:57:41 -0500 Received: from [192.168.254.4] (unknown [50.46.151.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail3.candelatech.com (Postfix) with ESMTPSA id DB8F213C2B0; Tue, 3 Mar 2020 06:57:39 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com DB8F213C2B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1583247460; bh=4UHGMnfZU9Y0e9cG7MGyQft7ZWQN7zDAc5h/PseG9MU=; h=Subject:To:References:From:Date:In-Reply-To:From; b=MMyozALicXk5RCcCizmQBMO4dXnG1ReV+KNlH623XahgYPylJ3QgSVKsDtCLESB+D S9sPBkhMoZr/B0gDj368skw2v3PJDqdHoCvTGC9YcP2gBWe2ZfkkOXSaz7hwvasWEM 3YWlMCAxIE+5NJQ/DiQovfO8EthjZubuAi/K/xGU= Subject: Re: Any reason AID is not in the NL80211_STA_INFO enumeration? To: Johannes Berg , "linux-wireless@vger.kernel.org" References: <5E4B39B2.8050905@candelatech.com> <3fcaaf0ba9ed726c863f9f1e7c5d61c08ca40795.camel@sipsolutions.net> <29006a9e-4de2-1733-1a8a-a5aae686fd42@candelatech.com> From: Ben Greear Message-ID: <07235202-4134-f01a-5083-4c56c1ed604a@candelatech.com> Date: Tue, 3 Mar 2020 06:57:39 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 03/03/2020 06:08 AM, Johannes Berg wrote: > On Fri, 2020-02-28 at 07:26 -0800, Ben Greear wrote: >> >> On 02/28/2020 02:06 AM, Johannes Berg wrote: >>> On Mon, 2020-02-17 at 17:11 -0800, Ben Greear wrote: >>>> To sniff /AX stations, it is helpful to know their AID. So, any problems >>>> with adding it to 'iw station dump' output? >>> >>> No, no problem at all. I guess it was just never added because it >>> originally comes from userspace (hostapd), and so didn't really need to >>> be sent back. But yeah, we have trivial infrastructure to send it back, >>> so sure, why not. >> >> Ok, thanks for the response. >> >> From looking at debugfs for a station device, there is the netdev AID: >> >> cat /debug/ieee80211/wiphy0/netdev\:wlan0/aid >> 1 >> >> And there is a peer AID: >> >> cat /debug/ieee80211/wiphy0/netdev\:wlan0/stations/04\:f0\:21\:c2\:fd\:b0/aid >> 0 >> >> For sniffing AX, I'd need to use '1' here as far as I can tell. Maybe for station >> devices the peer is always zero? And for AP devices, the peer IDs are what is useful >> and the netdev AID is not? > > Yeah. The first is u.mgd.aid (i.e. the netdev data), and the latter is > the STA AID. > > It makes sense the latter is not assigned in the client-side case. > > Arguably, only the *latter* should be in nl80211 per STA, since in the > client-side case it's *our* AID, not the APs. Although it is a bit weird, I was thinking to always return the AID as part of the station dump, and for station netdevs, use the local netdev AID, and for APs, use the remote station AID. That seems a bit cleaner to me than having two separate ways to get the AID for stations and APs, but I can do two separate ways if you prefer that. Thanks, Ben > > johannes > -- Ben Greear Candela Technologies Inc http://www.candelatech.com