Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5447200pxb; Wed, 26 Jan 2022 12:10:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXtyZUXAs4UFQEDaCyrx/V935y+AZADllt2ubKBLZQeAVSCVP23oo68tnU/U3tsqUMHb0R X-Received: by 2002:a17:90a:e64e:: with SMTP id ep14mr10373384pjb.111.1643227851576; Wed, 26 Jan 2022 12:10:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643227851; cv=none; d=google.com; s=arc-20160816; b=0qcXFFFdG1/cmot66y+FClX1TGvqmTX46ZW2W731Zf2S5hNZPqPhAWfmyVHCYCsgn5 X9iPS4dbew3CB7yh0jhMOY/cXlXfQy91S0IL3nfHwRGpAvpS/GCKMeWFTcMdJxLiRMHg 3/Vgyi80A8mzvWNvPd1rlgM7zsMrBkQlPYBxdDcGNuUt39W7VxK7087kEZhfwcYq73ey x91pgavJJDgEM532DI0s+w6dMJdNBQdFa9oaczYvKiJkAjBM8l2HvM74kCDw+txJFRQ7 EMh/BXxC5MBklH8vYMIopRYs+JO1Z9qiJR9yzAqowj3zcjUcoyFfKU5L9pJV86dxU8Kw KXhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:cc:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=t8hOeIp91qIAihHomDZFOV5h+fopZv1icntSUvmh1gI=; b=xeK60bQHlEy+1XcU1VX/8uFI59PtLNR5G4dTz8ZvEFyUM2gbibTMPlVgskVA7AAG/Y JQ1ie+ejnsxOSLaQRMVuUt9S3t4BkPszehNDNdTWSp6IZsQ1MEa4/8O2N5HTRvTqUk0n oUrAvsXB2r9M58w3t2C38FUxLQ5/ZzAoVC13J3AUtnxVFIKu9sFIOYjQkTi2A1wBVRpP rYzqKIGNfFo7BijO6bWmGGvpBFVFE6aHkEOKlcKcjPq2dvCovAra6d+FFI2cegpY5gnU R34T5Q9QAFn9eaPSPtFVRMrhzibCHKmckdiwP6dpZxBVT4SalMNFdLm6hq6egs0mMhvR aMyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=RGFGBymC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 17si3538506pjk.9.2022.01.26.12.10.38; Wed, 26 Jan 2022 12:10:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=RGFGBymC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237124AbiAZG44 (ORCPT + 99 others); Wed, 26 Jan 2022 01:56:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233201AbiAZG44 (ORCPT ); Wed, 26 Jan 2022 01:56:56 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1288C06161C for ; Tue, 25 Jan 2022 22:56:55 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id k25so36360269ejp.5 for ; Tue, 25 Jan 2022 22:56:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:cc; bh=t8hOeIp91qIAihHomDZFOV5h+fopZv1icntSUvmh1gI=; b=RGFGBymCwu0l/NBsyeMfQgzgJQNYpLDTxR/7RkPIekobVCqJdvE0sDmSmm5qUmRC6T 0l75RtvvQOAENZKibU9bi3Fr/9T6ureFFHP9Xw7DD6QMmDwZ3umzuFdUImEdpQYq23C6 sqGXK5Pk/gNVPdgC3XPhVTtQqj3j5m1UtCUP7Njl3a9Ww6AOC4S3hNTa2DkVygh1vZLy huMM2VWk/wmzpI5CrmpV67pSziASp2mJBfRKPsrIQgmd96FHYfHtRNWtU5ehuNN6ou3H Y/n10d9a5I7BSfYBfQjd5Vo2b8UdKiiww5V4tMg9BPXnq4dHegsC5UJy/8itpLvKt2al v+yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:cc; bh=t8hOeIp91qIAihHomDZFOV5h+fopZv1icntSUvmh1gI=; b=cYCElnggFHSUqOg4AaxjUlJqcWnjWswQuyqtxh14B4zjnQNTOY8t+3Dv/vv40OulxZ aC5pnU9LRtVysO0svvcfvufKc3cpcvbEiBZyrGiKh2ApwdOWkgQ79r/BeEIkn0S/qe5d dv0Ut72citSC8iPkTGwGa9f/S37sgz5Mot6RFOLffkOMilksN2A63v3u+WLogFiM1K8L CDP/uD1H+0G+PFP9lekcLlJnxQIDzpyrU6XZtel9RoGdeHSilcq6NVU0K81engcXB+ib jZx0ATmhNoRcbKG+SVwGLApi6STqAQ4yyMWQHwZksN58yqb1qZSgHHUqCWt0buD2K6Ra zs+A== X-Gm-Message-State: AOAM530npdRgTX/C6f68bSsPXTgoDeTuXZp0AcLD31TnNdbM5WqKs7Ft 3wyZkWl+T6W2JhV5bu4LztOD60mTMCWp6ns6vgcnMA0DCcz0U9aN X-Received: by 2002:a17:906:4347:: with SMTP id z7mt16228582ejm.671.1643180214351; Tue, 25 Jan 2022 22:56:54 -0800 (PST) MIME-Version: 1.0 References: <20220113060235.546107-1-jaeman@google.com> In-Reply-To: <20220113060235.546107-1-jaeman@google.com> From: JaeMan Park Date: Wed, 26 Jan 2022 15:56:43 +0900 Message-ID: Subject: Re: [PATCH] mac80211_hwsim: initialize ieee80211_tx_info at hw_scan_work Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Alistair Delva , kernel-team@android.com Content-Type: text/plain; charset="UTF-8" To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Gentle ping on this patch. On Thu, Jan 13, 2022 at 3:03 PM JaeMan Park wrote: > > In mac80211_hwsim, the probe_req frame is created and sent while > scanning. It is sent with ieee80211_tx_info which is not initialized. > Uninitialized ieee80211_tx_info can cause problems when using > mac80211_hwsim with wmediumd. wmediumd checks the tx_rates field of > ieee80211_tx_info and doesn't relay probe_req frame to other clients > even if it is a broadcasting message. > > Call ieee80211_tx_prepare_skb() to initialize ieee80211_tx_info for > the probe_req that is created by hw_scan_work in mac80211_hwsim. > > Signed-off-by: JaeMan Park > --- > drivers/net/wireless/mac80211_hwsim.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c > index 0307a6677907..95f1e4899231 100644 > --- a/drivers/net/wireless/mac80211_hwsim.c > +++ b/drivers/net/wireless/mac80211_hwsim.c > @@ -2336,6 +2336,13 @@ static void hw_scan_work(struct work_struct *work) > if (req->ie_len) > skb_put_data(probe, req->ie, req->ie_len); > > + if (!ieee80211_tx_prepare_skb(hwsim->hw, > + hwsim->hw_scan_vif, > + probe, > + hwsim->tmp_chan->band, > + NULL)) > + continue; > + > local_bh_disable(); > mac80211_hwsim_tx_frame(hwsim->hw, probe, > hwsim->tmp_chan); > -- > 2.34.1.703.g22d0c6ccf7-goog > Thanks, JaeMan