Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3305844ybi; Tue, 2 Jul 2019 05:42:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrCkmNmiwVrgGqDThDEL5xBsGk6fVTgrDSdCOUVsMzwAOgtWWk3HeEz48R3V4Gl/jvoDZD X-Received: by 2002:a17:90a:7d09:: with SMTP id g9mr5335916pjl.38.1562071350650; Tue, 02 Jul 2019 05:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562071350; cv=none; d=google.com; s=arc-20160816; b=j6pgvZyzeG2Dika5MR3/HYz8ZlEGKN67wHOKj/ONlgAx3w0N0BSKdDZM3ExLFa6JIk L2FIlAMYG5pFPO8TORhK9aU9X/f28JxwB//c6It19f4i/IcnaNEm1ssZtKHSBd8+Ex8j nZWvuPdPer0a+vkKxcF8Ac98mzzfhTsrLl4qzBPUGGU9r08irbeOFj5tyIffSDKspNPi neahrvcj3ouz4tPxBEr9p9BrPoiGGAcjT3hAwdRVN6DUNUKJ9UmkJoHyfVhu7CCUyitE bO9P/lJ33JJOCiNePkbCaYsbvIe9COy08fThCfqqo8XRxVYNK53dMj7tO5STt0HqDPrt 96uQ== 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 :references:in-reply-to:date:cc:to:from:subject:message-id; bh=9x7mN+6eoVegES2mh3asdLbYABzVjMFEAA53zmMJ/84=; b=h/F2lCS8Iwlqb28HU8XaJzHsWp9czacnz68tE7tsSogVK4Rk+Qdr4Xef0B+xzveXUB OzvU1/Z/oaX4ygr71/8VZHu+v+K29BnHDZIJ2XbqEdXsphEYpeXT9RWEM5rX5i680kdz SePFyj8J5K8kuZaNCxFzQUPT9HTIfdIeaEpNKHk81zirZHmHmHbGSru1RiRenJaQJn4U hVR8ut1L4PNxPk1u9CGPUuY3GXYbDJ9AuwlsVOxbLLlZW8B7rU7CQqjp7hRp1XFcevM3 gPkt24gXA+79FP+uOnVbG8t04pYwBmnqevxMAHnG0wHbP5x0uBGlAv4s/RGgywdTi94/ iMhw== 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 m10si2241833pjl.77.2019.07.02.05.42.16; Tue, 02 Jul 2019 05:42:30 -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 S1726623AbfGBMlA (ORCPT + 99 others); Tue, 2 Jul 2019 08:41:00 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:37828 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726167AbfGBMlA (ORCPT ); Tue, 2 Jul 2019 08:41:00 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hiI5i-0007rp-GK; Tue, 02 Jul 2019 14:40:58 +0200 Message-ID: Subject: Re: [RFC PATCH] 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: Tue, 02 Jul 2019 14:40:57 +0200 In-Reply-To: <20190702115005.ulcfohbi4mkwpt2c@bars> References: <20190613112128.834-1-sergey.matyukevich.os@quantenna.com> <7c8b3493cd2c48beae5a12e23964c8d3ca181d04.camel@sipsolutions.net> <20190702115005.ulcfohbi4mkwpt2c@bars> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-3.fc28) 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, On Tue, 2019-07-02 at 11:50 +0000, Sergey Matyukevich wrote: > Thanks for review! Summarizing your comments, here are the options > and some of their highlights: > > 1. replace old entry with the new entry > - no easy way to update ifmgd->associated w/o rework of mac80211 csa Yes, this one's the tricky one. I don't think you can make this work easily. > 2. keep old entry, remove new entry > - this is what suggested RFC patch does > - works, but update of current_bss entry after csa may be delayed Correct. > 3. keep old entry, update it using data from new entry, then remove new entry > - this looks like a better approach > > Unless I am missing something, the last option can be implemented on top of > the current RFC patch w/o extra complexity. The required bss entry update is > what cfg80211_bss_update function does when bss in question already exists. > So it should be possible to reuse that code. Agree, you just need to sort of invert it, or call it like this: * relink the old entry, unlink a new entry (if any) * bss_update() with the new entry if there was one * it should free one of the entries if I remember correctly > I will post RFC patch v2 after more testing for both mac80211 and > fullmac cases. Sounds good, thanks a lot for working on this! johannes