Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2273284pxp; Mon, 21 Mar 2022 15:33:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjAXj1DzTOL2mCqkAfAvC7x1ohhhLvA4BLhzFPHX7BPZwhe9wB5OXfp7QnPXHW4hQYFfHk X-Received: by 2002:a05:6a00:4198:b0:4fa:8591:5456 with SMTP id ca24-20020a056a00419800b004fa85915456mr12450264pfb.81.1647902020574; Mon, 21 Mar 2022 15:33:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647902020; cv=none; d=google.com; s=arc-20160816; b=Os5rEBfyJaiYwItveeMkfuuaoBQZDabbdB/wf7ge0NpqnH+GsluOoLR73HM1n+zdhV KTeA4q8+EevwcBI8HqfLdTwuHj9IpCwPy6ObfAIxnQz1VA17rlJPdrla9AuPVqQ4DGF7 +NbrZYREg1ncfDVeYJzXJdtmer5pXCCbFE3C4+9Gr6xOlrdZdfhQPkJMG9dFBWPjAu/H irmIzwW23M7gjRVRKXl96OR9/WGouFwRgTpdgGIrwq5XrPfXBonTg6RWLqI0PbkeS4e9 uHYdoKAHdUfW+juS2TYZfKCMwWej9vti/yNDumJCTiyP+4lzEE26UlGDHIwDEVEB+XRr xQbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4pZUoUae/CV0+chIgjEa7wfBXVTwl8EKVh364hVPrfU=; b=CXejy++DNDjXpKLoeTk1wrOVD8eDvBfk64d3WsI25Z6GdaNpB0ipQoTR+iCMOHLSDx yz5+n5+3kVDnljRc5EYO4fZ1ENqJ+Vc1vPm2xDwx6XtCNoFvGVZfMfH5H4+OOwsiDsKx bM1KxO0cAlAqJ0oAFiaV4WywnR3qYyDZ/s/a1LzdZXSAMFuMdsZ7ZMZ2kHVrqYPWLuIR 40KjJoykEzPoryhuY89VPcs39gtqMKxQhAUqFwEXQgAPDuvdGP6IJmdRH5MwbjPdV0DQ YWPLlHaLDEK9Uhkpd4B8NSBQlUacoOkviWCP5KZ682BPDdUCCmYB1YGQx1bImDG71ETk 4DdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=X5KauTsk; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y7-20020a170902864700b00153b2d164ffsi11526409plt.263.2022.03.21.15.33.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 15:33:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=X5KauTsk; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3EB7F3D18CB; Mon, 21 Mar 2022 14:46:52 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245406AbiCUUTW (ORCPT + 70 others); Mon, 21 Mar 2022 16:19:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353225AbiCUUTV (ORCPT ); Mon, 21 Mar 2022 16:19:21 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26D001EA for ; Mon, 21 Mar 2022 13:17:56 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id c11so11089084pgu.11 for ; Mon, 21 Mar 2022 13:17:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=4pZUoUae/CV0+chIgjEa7wfBXVTwl8EKVh364hVPrfU=; b=X5KauTsk3eLQsj+qa7E6jSKCFBPSMKfod/+Be0ck0vCAvGL9W8url/Cgnp5nrIOrPN S7+X0KpRBOsWPMpBbFuCPvYXgvnetyKv5wSZ7jX3OhQ2G27rVrj/p+lwul0eoKFzZ9Sg SZ5Rk/TCBZW253dC+VWk9Wl/LGKtfyrqFG3Og= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=4pZUoUae/CV0+chIgjEa7wfBXVTwl8EKVh364hVPrfU=; b=h6QV5wgJLTMxYqBl6/6ME76/B4CyskdVB20AOvHcjIXv4OMELzcN0asgYxG6UAA9/7 OkEUrmy+yKIt6g+wkMYirTwXQ2ou9HTxoc3KAc77bjcPWwrdlUNzXc0lxMvYvGEyrOpB rlOR3XQ0v+moNago4ZnKCGobXJrQ0iTh9cH6YppvSZCFlsRXQuPdsbheIa2fZB2GvbtM 0bQ3+YAKY4m4f/fdGzdyo2iX12VNfFK8nZH4TGiH39dd6foHwqa0wEvUD15MAQdJCfYq n9D9KttsIBdNeKtNKUQ+al7NqEGwFYQW0eQ+U1HPGHNr1bf73CGJF1tqVhHb2R7aODMV 6yDw== X-Gm-Message-State: AOAM533jHY/+hSXDZoiz5zwFXC/PvxF12qYnBgGbh+Y5H5vgLxOrofdn i+RRxBRHli8svzSXFYP1gX+hQQ== X-Received: by 2002:a05:6a00:22cb:b0:4fa:ad77:1510 with SMTP id f11-20020a056a0022cb00b004faad771510mr3343403pfj.80.1647893875630; Mon, 21 Mar 2022 13:17:55 -0700 (PDT) Received: from google.com ([2620:15c:202:201:6dba:56e0:1f17:3446]) by smtp.gmail.com with ESMTPSA id r4-20020a638f44000000b0038105776895sm15804846pgn.76.2022.03.21.13.17.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 13:17:54 -0700 (PDT) Date: Mon, 21 Mar 2022 13:17:52 -0700 From: Brian Norris To: Niels Dossche Cc: linux-wireless@vger.kernel.org, Amitkumar Karwar , Ganapathi Bhat , Sharvari Harisangam , Xinming Hu , Kalle Valo Subject: Re: [PATCH RFT] mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue Message-ID: References: <20220319224751.72241-1-dossche.niels@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220319224751.72241-1-dossche.niels@gmail.com> X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Sat, Mar 19, 2022 at 11:47:52PM +0100, Niels Dossche wrote: > --- a/drivers/net/wireless/marvell/mwifiex/11h.c > +++ b/drivers/net/wireless/marvell/mwifiex/11h.c > @@ -285,6 +285,7 @@ void mwifiex_dfs_chan_sw_work_queue(struct work_struct *work) > struct mwifiex_private *priv = > container_of(delayed_work, struct mwifiex_private, > dfs_chan_sw_work); > + struct net_device *netdev; > > bss_cfg = &priv->bss_cfg; > if (!bss_cfg->beacon_period) { > @@ -301,7 +302,11 @@ void mwifiex_dfs_chan_sw_work_queue(struct work_struct *work) > return; > } > > + netdev = priv->netdev; > + > mwifiex_dbg(priv->adapter, MSG, > "indicating channel switch completion to kernel\n"); > - cfg80211_ch_switch_notify(priv->netdev, &priv->dfs_chandef); > + mutex_lock(&netdev->ieee80211_ptr->mtx); A more appropriate route to this object might be priv->wdev.mtx. But otherwise, I think this makes sense, and matches what ath6kl_cfg80211_ch_switch_notify() and qtnf_event_handle_freq_change() do. With the suggested change: Reviewed-by: Brian Norris Thanks. > + cfg80211_ch_switch_notify(netdev, &priv->dfs_chandef); > + mutex_unlock(&netdev->ieee80211_ptr->mtx); > } > -- > 2.35.1 >