Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEC76C10F14 for ; Tue, 8 Oct 2019 15:49:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BDA4E206BB for ; Tue, 8 Oct 2019 15:49:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728285AbfJHPtF (ORCPT ); Tue, 8 Oct 2019 11:49:05 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:41988 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726839AbfJHPtE (ORCPT ); Tue, 8 Oct 2019 11:49:04 -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 1iHrjS-00038n-WA; Tue, 08 Oct 2019 17:49:03 +0200 Message-ID: <764782a00ba58b895add84ca87cc42db491c4e17.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:49:02 +0200 In-Reply-To: <2cf6ce4c-e9b7-9927-0f6f-52433ab3c66b@gmail.com> (sfid-20191008_173841_311495_63A9CFAA) References: <20190913195908.7871-1-prestwoj@gmail.com> <20190913195908.7871-2-prestwoj@gmail.com> <90ae00044bc0834d87d3f9fb75ce63dce4cfadd5.camel@gmail.com> <2cf6ce4c-e9b7-9927-0f6f-52433ab3c66b@gmail.com> (sfid-20191008_173841_311495_63A9CFAA) 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, > I concur that scanning should be checked as > if (sdata->local->scanning). So Johannes you're right that the polarity > is reversed. However, __ieee80211_start_scan seems to check for > local->scan_req instead to take deferred scans into account. So I > wonder if that is a better approach. Hmm. I don't think it's necessary. We basically only get to that kind of state if ieee80211_can_scan() returned false - then we assign local->scan_req and defer until ieee80211_run_deferred_scan() is called. But in the meantime, nothing in the scan requests references the MAC address. It does mean that we should grab local->mtx though for these checks, and then all around the interface change, so that we can be sure we don't actually start scanning in the middle of the changes here. johannes