Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5830614ybp; Tue, 8 Oct 2019 08:56:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYtgosEsKfkkQpVNx9CrfFLpqKYDN5PAJAe0WWlFJ5Ap8ONlc1mOT1xdqX7yyKDNfeZXN/ X-Received: by 2002:a50:d949:: with SMTP id u9mr34561950edj.142.1570550197130; Tue, 08 Oct 2019 08:56:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570550197; cv=none; d=google.com; s=arc-20160816; b=TydqjPnY+4cVVvgavcIFBQ4yokLRSY8nnMoDrPW67aK8F/sb210drGOJhGP9+2YLDZ 2mEFT+r2eWzLcMxDm1B87mq7eBjshwBFaXZYrBrqod/6iJgKIE34/b/OCk3W93hzDxFQ 3nke1l3t7Rgx8/EFHgODlNbM0k0G3kjvbIa13od6F49sTT+0scI+bUT/qpFs+/VTV3cd g+Au32pDjVeMCD8tDWuDAhL677iEDR1jJhqryVPEV99nPedhokM9zu/m9/w/ZZQ+YAAq 9UeGxZIe/l1tYSmWpRdrv24KM1+wXHZFt0s2u06n2+wDFixHlMKhp8trAdWrLUcrtWdY 088A== 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:mime-version :user-agent:references:in-reply-to:date:to:from:subject:message-id; bh=XtPXe+ZaJ6RaI1/SiJOX/ufoMGqpYquSdT3biAXF/9o=; b=U7wQ811ZJCPoNlc/P+Wa9F1cR/tHr1ES1Wj52NA/KqH3u06ru+hEFhmgBc5KLbRTKH YLM8uAmkj3aFrXC5b5H4AE4amSS2hljBZlgZSAUABdCX5wo0jKeIy6iYBWb0eGmTclMt bC2EHgOGiG4y4dJh8WO2UaYeC+ALM4Okp6aCAnEnrQn2ojfLMT2LguFZiMb1/zGCiVZD b91lIIDigt8XMPa2Vh9ru34Q4j7HHEsWI6q8DALqERVsqZqfCYeRQHXrFE3NVEKqXB+k qymwV9O5lo8sEkjaHT7SyXI82r/uxj1dKPrmZesc2Qm5hYzZ2b+1qpwprHCQrEKhOEC1 Sy6A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v3si10862149edc.404.2019.10.08.08.56.12; Tue, 08 Oct 2019 08:56:37 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729211AbfJHPwt (ORCPT + 99 others); Tue, 8 Oct 2019 11:52:49 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:42074 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729206AbfJHPws (ORCPT ); Tue, 8 Oct 2019 11:52:48 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.92.2) (envelope-from ) id 1iHrn4-0003Ef-Sf; Tue, 08 Oct 2019 17:52:46 +0200 Message-ID: <6530a6b06176790c5a6949d6ffccf37b506975bd.camel@sipsolutions.net> Subject: Re: [PATCH 2/2] mac80211: Support LIVE_ADDRESS_CHANGE feature From: Johannes Berg To: Denis Kenzior , James Prestwood , linux-wireless@vger.kernel.org Date: Tue, 08 Oct 2019 17:52:46 +0200 In-Reply-To: <6fa34e4c-5c81-4875-da29-cada1a078e2c@gmail.com> (sfid-20191008_174756_354544_4F2B93CF) References: <20190913195908.7871-1-prestwoj@gmail.com> <20190913195908.7871-2-prestwoj@gmail.com> <90ae00044bc0834d87d3f9fb75ce63dce4cfadd5.camel@gmail.com> <0b57c1288016310050ccd6233dda886fc4a89b02.camel@gmail.com> <6fa34e4c-5c81-4875-da29-cada1a078e2c@gmail.com> (sfid-20191008_174756_354544_4F2B93CF) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi, > > You could have two interfaces, one which is scanning right now, right? > > And then theoretically you don't care about the other one - it *should* > > be OK to remove/re-add (with new MAC address) the one that *isn't* > > scanning, right? > > Actually, I don't think you can? Unless I'm missing something? All the > scan state is stored on struct ieee80211_local, so if that struct is > allocated per phy as you point out below, then what you suggest is > currently not possible? ? The scan_req struct contains a reference to which interface is scanning, so it should very well be possible to have phy0: wlan0: IFF_UP & scanning wlan1: IFF_UP & change MAC address all the time just like it's possible to change the MAC address when wlan1 *isn't* IFF_UP even if wlan0 is scanning, right? > > But we don't have that granularity here for anything - you're just > > checking "sdata->local->something", and by going from sdata to local > > you've now checked the whole NIC, not just a single interface on that > > NIC. > > Right. But that seems to be a limitation of mac80211 actually. We > can't run two scans concurrently on different interfaces. This is > rather unintuitive given that scan requests require an ifindex/wdev. > > Can this be changed / fixed in mac80211 actually? I would expect that > if a card supports p2p and station simultaneously, then it can scan / go > offchannel on two interfaces simultaneously? Or not? What can iwlwifi > do for example? No, this typically cannot be fixed, and it doesn't really make sense. The NIC cannot possibly do two scans at a time since it has only a single radio resource :-) > > But it's also completely confusing to do it this way because you go from > > "sdata" to "local", and at that point the data that you're working on is > > no longer specific to that one interface, it's actually for the whole > > NIC. > > I agree its confusing, but that seems to be how mac80211 works? See above. > Given the above, I'm not sure I see anything wrong? The switch/case can > probably be gotten rid of, but it actually makes things clear that only > station/p2p_device and adhoc are handled specially. I just don't think they *should* be handled specially. Given your code now, you can have phy0: wlan0: STATION, IFF_UP & something is doing remain-on-channel wlan1: STATION, IFF_UP --> cannot change wlan1 MAC address phy0: wlan0: STATION, IFF_UP & something is doing remain-on-channel wlan1: AP, IFF_UP --> *can* change wlan1 MAC address This doesn't really make much sense? johannes