Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2315792pxp; Mon, 21 Mar 2022 16:44:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdtTQL9HRWw4XBJKLR7DLXJgmN2CNksRrGz+AlsvCV4/f9yPaCnBe8DCasAry/k2eCaQ3G X-Received: by 2002:a17:90a:e88:b0:1c6:92c9:d99d with SMTP id 8-20020a17090a0e8800b001c692c9d99dmr1694913pjx.92.1647906253893; Mon, 21 Mar 2022 16:44:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647906253; cv=none; d=google.com; s=arc-20160816; b=XRUOh2hJQ1ZsH3+oLPOD9wZCPkfuQNbpqrxlzp3utK9bc3ZmRkEZ1IIxWmqT7Ev307 APUErg6z+AWRpjlVTAMbXiai86058gfWaLh38m3FBEPvgIkvX+5QXJcwhxx7TwmNy5/g R7oAagQOBjdzFXrbILua0uEP17lV5OSRDGr0DZj2D6nbUuB3fdNUr8zqxlSm7laG7yo7 s1LFm54EiCUU1d71bT1gmIzWth1RQbcglw67GPYFrP/u2aNZCjeujmbs1iKmRH1eOJnj wh3TNMDSifaIkquS3NrBN4U5fZG5ARmT/10m1JgsSioGGsd8o6OzIdSUsktbz6nZ1kYb nA7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=B3k8XeIehCebVGnYu+X4/M90KsONe0lm83sqt9IZNVE=; b=wSBBDO35RbYBDGNqlHPm43DdUl8EyI6fUHXVWD6vmj/9n3PG2l+y1QB4kknNhWmABc JaWwr8g3I88Y11Kv3klNTayN6VTZEmP+5vEyZ71xGEhmMbpqzGGEy8G77E3w6jCDB9P1 K8zkv+oUHhFCT0liZFQUxkBzWw1Yv0Thz6zx1ED7zQ0lQsjeGqXhfiYmGKwtBL+PzMn2 HoQj4eyv/K9CezIJ7uyVQv2YtlwIJ3hEGcWxzWgtrGDS0pa8azNXxZywV37M5MvTmRME maADSGjkc4my8O8w5kt/Rp09nynXFCh4xg9rr38XGA2XGgar+CrlOd12YpfZERsFvpfA yYGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Xl/Vdd9a"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g15-20020a656ccf000000b003816043ef11si16781274pgw.262.2022.03.21.16.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 16:44:13 -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=@gmail.com header.s=20210112 header.b="Xl/Vdd9a"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 008D77E0B2; Mon, 21 Mar 2022 16:01:31 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231820AbiCUXA2 (ORCPT + 70 others); Mon, 21 Mar 2022 19:00:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233567AbiCUW7Q (ORCPT ); Mon, 21 Mar 2022 18:59:16 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61A632DD69 for ; Mon, 21 Mar 2022 15:47:05 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id p15so32766518ejc.7 for ; Mon, 21 Mar 2022 15:47:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=B3k8XeIehCebVGnYu+X4/M90KsONe0lm83sqt9IZNVE=; b=Xl/Vdd9aQ1md8c05zqF8ZFmtLUu6VrldOsAc0MNNRGBOKIKLwyAfL2zv5lSGUBMZfC MMI+NAEDuCCx0w3c8Z0b+c86tFwmULMTp8PPbzkvsaWeePfx+q1CdS/pRuDSyU3y2k+Q eVb15/PtFbKxPKXt4xdr9Z2F2XpKleCGUl/Xp7gd6FtRhS9GvL7UyxKUqAN0i7/vsNck yCRojuFiXFNKD9LrhEzoAqWyFQZczpFv4v/qqLn5rvItB5r5gWQkzoCEztzVLuO5iby9 ddDFFvQi64CIF64/xmXNiqBZCpZDhI0Xe4qOinNCSrIuCpG70xuCOVIsCMEoVoVNdOsg qBEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=B3k8XeIehCebVGnYu+X4/M90KsONe0lm83sqt9IZNVE=; b=aGvF54Ks3ZDEUu0gSkbCzufAtA9h1rYMAqcS3wjnm+6eDe6NCGyX7c/fdPwqUZcLoM OqlMG3AGo9i6IGVbtBkyU+wEzcsIqI45K5LE6KONF/ikaOE1IZwLKicYG3OS/M26eW3g SdiH39JD+Y5XybVb07SZVztPKEOjlN5KReKPNL+56qyUp03fkADJv30vuWpg77aMGPFp lsxz28mxSHN+Qd+MAJwi1wrRZjl/eMG+d2XUq5Vs3P86nFxczmZgCKdfExXgncCYv4sU s4fvsiQrHEp45Sl5ysMq8wH+ovW85u9EOve3T58qRWSPFEVGO/vp0iwxadVzUT0WqNLq PDYQ== X-Gm-Message-State: AOAM531/6O/bGg93XaWNF2JbNU+BRuRPN8oSJ0SbIZ0U9+VTwF992arp NuRWyW8RX/wloEoeJC483c0VcumeDnbPlQ== X-Received: by 2002:a17:907:1b25:b0:6da:8206:fc56 with SMTP id mp37-20020a1709071b2500b006da8206fc56mr22423558ejc.81.1647902823804; Mon, 21 Mar 2022 15:47:03 -0700 (PDT) Received: from ?IPV6:2a02:1811:cc83:eef0:7bf1:a0f8:a9aa:ac98? (ptr-dtfv0pmq82wc9dcpm6w.18120a2.ip6.access.telenet.be. [2a02:1811:cc83:eef0:7bf1:a0f8:a9aa:ac98]) by smtp.gmail.com with ESMTPSA id qk9-20020a1709077f8900b006dfbc4b9b83sm4348181ejc.163.2022.03.21.15.47.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Mar 2022 15:47:03 -0700 (PDT) Message-ID: Date: Mon, 21 Mar 2022 23:47:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [PATCH RFT] mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue Content-Language: en-US To: Brian Norris Cc: linux-wireless@vger.kernel.org, Amitkumar Karwar , Ganapathi Bhat , Sharvari Harisangam , Xinming Hu , Kalle Valo References: <20220319224751.72241-1-dossche.niels@gmail.com> From: Niels Dossche In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 21/03/2022 21:17, Brian Norris wrote: > 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: Thanks for the review, will change that and send a v2. > > Reviewed-by: Brian Norris > > Thanks. > >> + cfg80211_ch_switch_notify(netdev, &priv->dfs_chandef); >> + mutex_unlock(&netdev->ieee80211_ptr->mtx); >> } >> -- >> 2.35.1 >>