Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1961480ybg; Thu, 30 Jul 2020 07:10:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDFEs+igpRw50wAuuTddK4LMuWI44ZwJ2z+vrjh107OiVrsO5Bvi59YYGurbnnvCxbEzXQ X-Received: by 2002:a50:da44:: with SMTP id a4mr2950827edk.379.1596118219789; Thu, 30 Jul 2020 07:10:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596118219; cv=none; d=google.com; s=arc-20160816; b=lG4tlzLTk1FI6PdPqlcfqpRQsO1fY54tLS6039fFX+/GQgz1FFVq7ewrmsH6t8Govv rOwPsLNx8Z4FjKc3+Ih1Ty5IbDEHsnGq5SKTX1BTFXWreU4LQqVFWA/nDezPoqh56Isb 6NrJiFhmfWk4cOSjcYR/dWK8bPJ4beV352JQRCWI7ICegNEWgstMjp9ey8UFKRV+QCtV /RwaWZ9lU5poFMJa1ZWu1Rc/dCHDUAHX1QBMH7Q0F3+1VXyA8TLiItLHh04dzOQ11j// rit8z/94sy1qr9XjTq2YIXci+XeueYJQjaqaZis4Ntl9XYgaRv6yWVBScEZeMIHvl1bk hL8A== 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=YNlKYB8mQCrieaAtUazoUZT44//VjU/u6Mwvna4ohd8=; b=Cigqysl7vMrlwx03b8tLP6BX5klD7nrKto1ii/uQU2wf5V5xi/Ny/q7xtdqpKrs7g7 RAUYAB91wKZuUu7F++FdEzugBvKNNCcLxAZOaGf7V7hHd0rnie1bc6PQn/8C5EzfFEHb 0q3/It+KGO0whuGthbf9SVW3bJc+/S+uwxSyKThJzpMdN8RdIlKkQ9FEZoCb1Pem76pY X8shHZaJHd2Wx21OA1i7wyQK6W13nAyNJnB4BGT8tgwMf60R1/GrKWen7qCGpSc8cNk/ I4T9AO3EPVixUV6KF4PartVnUb7++cfDusBuZEvBVfA/MeNOHzdKH095Ji2Xj7s3Df77 D+Bw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ba17si3258454edb.3.2020.07.30.07.09.52; Thu, 30 Jul 2020 07:10:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729333AbgG3OIe (ORCPT + 99 others); Thu, 30 Jul 2020 10:08:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728296AbgG3OId (ORCPT ); Thu, 30 Jul 2020 10:08:33 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C61FAC061574 for ; Thu, 30 Jul 2020 07:08:33 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) (envelope-from ) id 1k19EW-00DZFm-3Y; Thu, 30 Jul 2020 16:08:32 +0200 Message-ID: <65bbc2f69fe966d471eff3287a191919311ac641.camel@sipsolutions.net> Subject: Re: Lost beacon behavior changed as of 01afc6fed (hwsim) From: Johannes Berg To: James Prestwood , "linux-wireless@vger.kernel.org" Date: Thu, 30 Jul 2020 16:08:31 +0200 In-Reply-To: (sfid-20200702_001244_354404_5FEC9FBA) References: (sfid-20200702_001244_354404_5FEC9FBA) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.4 (3.36.4-1.fc32) 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 James, > First off, everything described here is using mac80211_hwsim. I have > not tested if any of this happens on physical hardware or not. > > Commit 01afc6fed seems to have changed the kernel behavior with regard > to lost beacons. So much so that it completely breaks all roaming tests > for IWD and (if kept this way) will require severe changes to the > existing roaming logic we have used for quite a long time. Plus > supporting older kernels AND this new behavior is going to be quite > annoying to deal with. > > Before, the kernel would only send a lost beacon QCM event when it > detected beacon loss. This allowed us to scan, find a suitable BSS to > roam to, and then roam. > > Now it also sends Del Station, Deauthenticate, and Disconnect all > immediately after a lost beacon, and the disconnect reason being > DISASSOC_DUE_TO_INACTIVITY (4). We handle these extra events as we > would at any other time, and fully disconnect which prevents us from > being able to roam quickly (as well as breaking tests). > > Looking at that commit nothing particular jumps out at me, but > obviously those added flags are causing something else to send these > extra events. > > Was this change actually intended to cause these extra events? And if > so, why was it changed? I don't think that was intentional. But really that was meant only to enable support for *powersave*. I suspect that the changes are actually caused by adding REPORTS_TX_ACK_STATUS, which is in fact necessary here. But I suspect that it could be that you're testing this in the wrong way? From your description, it almost seems like you turn off the AP interface, and roam after that? I'm not sure that's really realistic. If you wanted to test the "a few beacons were lost" behaviour, then you'd really have to lose a few beacons only (perhaps by adding something to wmediumd?), and not drop the AP off the air entirely. If the AP is in fact completely unreachable, then I'm pretty sure real hardware will behave just like hwsim here, albeit perhaps a bit slower, though not by much. And then you'd have the same issue there. The fact that hwsim behaved differently would likely have been just a timing thing - it didn't advertise REPORTS_TX_ACK_STATUS, so we'd wait a bit longer until deciding that the AP really was truly gone. If the ACK status is reported we just send a (few?) quick nullfunc(s) and decide that very quickly. But that's independent on hwsim or real hardware. johannes