Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11852066ybi; Fri, 26 Jul 2019 00:36:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqybf9fJMUIdrxiDOa1l8WcCAFNFaaVegd++2mFsnZOlMyL59ms6Ty3GKP7+UWjD5wlaQ3tw X-Received: by 2002:a17:90a:9386:: with SMTP id q6mr95762285pjo.81.1564126612953; Fri, 26 Jul 2019 00:36:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564126612; cv=none; d=google.com; s=arc-20160816; b=sy3LR+q8UfDNIDty7EbY8YWPYYP3xuAh+B3v5DFjh7VVG1FX+8gjlrPRG16lmtOvfw dVx76TyZxXP0MO1M0vMN+sqqvoDINSFag2SfWYKkzaMywybysgrrCIItDMR+zG327DX2 Fw/2XXCHTxcYMRCVJ4OgwJn/YK8Ai7CtGSvV4zJQgQmMFl08jA5truSJQGNqN2IyAM8w 4fHoS4DkU37tD+IPyhruJ0OFFnlNbyo0nGZQuOs6nUGme/fsSXxUR8VoWIfwkUFWU/4j isJmMYxZsTolnMagypfts0M6rRHP78H4Z4W7pvaxKw17ZAEbnM5LWpWfFn70XiGvYr0n U3Xg== 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:cc:to:from:subject :message-id; bh=lrdDhmiQJvsjPn02WJwKcbBWKAc4lph3ONJHelr5Hgw=; b=Fz9Up3OR11ejp0Blw3BmBDfa2qkN6hVV6M8mlWtmkrMb3Cix9OjDcEIHQMDZ0aqNll 87vvWSymjn6vZJRJ4ljVxMB7zC8O/nkndDB6S84mOjGMelZyzjIpNqTNgiNHzJyGYoSU GB5ix1UaWSRWyFL7p7kRYQrb+vtYXCgUTeHxsiOci7njescT8HwGfloscWFYdPTpbFWP eUvbp0+kWAtky0y0yekdEy7xS5FtM4cha/W7VOPvYDCss2/6MfP2c6L31quBbyrK9kyq sK2da+as7AzRGbhb26KtznwlOi4hOlbkJtI0rnG3Y03GSFJYgW/+SS1LDj+Vu7nOm/WE i/Qg== 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 w10si20140857pgt.451.2019.07.26.00.36.32; Fri, 26 Jul 2019 00:36:52 -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 S1726138AbfGZHgX (ORCPT + 99 others); Fri, 26 Jul 2019 03:36:23 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:44440 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725869AbfGZHgX (ORCPT ); Fri, 26 Jul 2019 03:36:23 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hqum4-0006vt-Sg; Fri, 26 Jul 2019 09:36:20 +0200 Message-ID: <2efa83ab8120e29d1eb1be8295d59568b4eacc9a.camel@sipsolutions.net> Subject: Re: [RFC PATCH v3 0/2] cfg80211: fix duplicated scan entries after channel switch From: Johannes Berg To: Sergey Matyukevich Cc: "linux-wireless@vger.kernel.org" , Igor Mitsyanko , Mikhail Karpenko Date: Fri, 26 Jul 2019 09:36:19 +0200 In-Reply-To: <20190712105212.clf77zne6i4gh5ti@bars> References: <20190710173651.15770-1-sergey.matyukevich.os@quantenna.com> <1c371a5921200a11da459b591df121bbcb0f967d.camel@sipsolutions.net> <20190712092716.ywnkns473s5rtoku@bars> <43055be7b2d7ff0f8dbadd19443fc73f30f93bb6.camel@sipsolutions.net> <20190712105212.clf77zne6i4gh5ti@bars> 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 Sergey, Sorry for dropping the ball on this thread. > > Right, it will be updated on RX. But then if we chanswitch, we would > > probably (mac80211 using a pointer to the non-transmitting BSS) update > > only one of the nontransmitting BSSes? > > > > Just saying that maybe we need to be careful there - or your wording > > might be incorrect. We might end up updating a *nontransmitting* BSS, > > and then its transmitting/other non-tx ones only later? > > Hmmm... I am not sure we are on the same page here. Could you please > clarify your concerns here ? I'm trying to say we might have this: cfg80211 * transmitting BSS 0 - nontx BSS 1 - nontx BSS 2 - nontx BSS 3 mac80211 * ifmgd->associated (and cfg80211's wdev->current_bss?) = nontx BSS 2 Now, things like the channel information etc. will always be identical between the 4 BSSes, by definition. However, if you chanswitch and mac80211 just lets cfg80211 know about the current_bss, then you may end up in a situation where the channel information is no longer the same, which is very surprising. > The normal (non multi-BSSID) BSS usecase seem to be clear: keep old and > remove new (if any), since it is not easy to update ifmgd->associated. Right. > Now let me take another look at the usecase when STA is connected to > a transmitting or non-transmitting BSS of a multi-BSS AP. At the moment > suggested code does the following. If STA is connected to the non-transmitting > BSS, then we switch to its transmitting BSS, instead of working with > current_bss directly. We switch? Where? Maybe I missed that. > So we look for the new entry (with new channel) of the transmitting BSS. > If it exists, then we remove it and _all_ of its non-transmitting BSSs. > Finally, we update channel and location in rb-tree of the existing (old) > transmitting BSS as well as _all_ of its non-transmitting entries. That would indeed address the scenario I was thinking of ... johannes