Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp159618ybz; Fri, 24 Apr 2020 13:37:30 -0700 (PDT) X-Google-Smtp-Source: APiQypJ154R+y7xhXXm/m/BBt4hrEd8kbkhU81QwSqAljtg01od0+i9geDt6tLSRMlWIliuvPtYD X-Received: by 2002:aa7:c34e:: with SMTP id j14mr9138662edr.195.1587760650648; Fri, 24 Apr 2020 13:37:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587760650; cv=none; d=google.com; s=arc-20160816; b=0TjLEkJ6lETEPCvaJbnNHIQiK5VsUcLHaC3gxopUuGWZj7ZsfzRQ93L0CPsuD7rGMP ybLltiWXxWOV7CZZ03Sthlybx6+nJpMDIF5++icYsZPqmOdOmRc/qZN3CWRmq8O4x+wz wHdNXhYxL0KxjLNh8mBnmQ0NTs39Ven696LaVZB/4DiefIcwU+nhdhMH0uTGLUmEhBiQ y1jiHN/ob+7qbqP9BjrBbfhRwwuefEM5FA0YhvfMHab0nIXtLCc4LhyMO3Jd6EnAzmYO qg28ptDfJ96bHV+S0UFOJYBxhaIBY/y1jnir+WNIpJT3pn4d1fQGLGkUCKKnXzbppdES bH2g== 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=F4vWO5E8x7qvdQLKNLDZhJmOxbat8N4hFKw9OJvTgt0=; b=rysEWJBJlz/+cXeQWOLcYu+kNoNnu453iHnLkBG4lEkrAdbhz6sd+1QuRmY5iY7JDa MTNGdCxRxv7C4y3dcMJhzopOF6HcKdJl/Avs0f+zHf6/LOJ05G4VhcN0ZrnMZ7LgkVPM C7tlaKyxfMcSyXHLFzmhGrIHdBq0WZwWyQQwlnEKG6y7CQVeZq02vE9l49r+3EswZa+P gtzmaHvzSJT0ZMVX1VQzgo4xwXThWSnAhXY9AmbcUllTBiIdGhoo+Q9j+rD1zHF7rveU pyY2Wn53kwYyC2+FfOrm587FRonGCVxTENZtmdVDJwaUgZf++gA7vQpme1XXAG+Rk9e5 XsbA== 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 a5si3644681ejv.381.2020.04.24.13.36.58; Fri, 24 Apr 2020 13:37:30 -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 S1726490AbgDXUfx (ORCPT + 99 others); Fri, 24 Apr 2020 16:35:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726094AbgDXUfv (ORCPT ); Fri, 24 Apr 2020 16:35:51 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4F01C09B048 for ; Fri, 24 Apr 2020 13:35:50 -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 1jS536-00FmK6-1R; Fri, 24 Apr 2020 22:35:48 +0200 Message-ID: <259da597c3902c79c9d5c6e171e109dcb68564eb.camel@sipsolutions.net> Subject: Re: Auth/Assoc/Connect events coming before CMD_CONNECT response (hwsim) From: Johannes Berg To: James Prestwood , linux-wireless@vger.kernel.org Date: Fri, 24 Apr 2020 22:35:46 +0200 In-Reply-To: (sfid-20200415_192413_715843_5D57B158) References: (sfid-20200415_192413_715843_5D57B158) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) 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 On Wed, 2020-04-15 at 10:23 -0700, James Prestwood wrote: > Hi, > > I have noticed this sometimes happening with mac80211_hwsim where the > Authenticate, Associate, and Connect events arrive in userspace before > the actual response to CMD_CONNECT. It seems to be a scheduling/timing > problem as turning on logging in hostapd or other applications "fixes" > the issue Yeah, sounds like a consequence of immediately handling the frames through. I guess you could "fix" that by running with wmediumd? Or adding some kind of fake air latency into hwsim. johannes