Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1210612pxb; Thu, 16 Sep 2021 02:14:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw29oeV37bcJtI3zjVL9Ctqw6eAnmvoqCu5XHPW2HoOUF8wZy5SV0BSL/grp8+3ksHJtBgo X-Received: by 2002:a92:de0e:: with SMTP id x14mr3213020ilm.259.1631783693014; Thu, 16 Sep 2021 02:14:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631783693; cv=none; d=google.com; s=arc-20160816; b=aLuMuu4b6Z60rm+leBspyrtBb2tHNQMtSCKY0TmX47mwOfgmmENNIgYFISipIcr+tN Q2PXIzrylv/RnaqTLxwKDGtUwf5Y59bIxgKkFz2Lp0N9xDFIiPu+DJPIiwaMUp74PaiY OdI8kQSF39Ing2x92oIadCny0LiC1+5Mi8/po42OYEIRjGCrSKU8B9VxUCbYtEoSWZVy 65tVBU74EgPrOnXWrs3vTqxYPNE2rayetNEZsu6WJIN/tejYRsMljI+hZvTUJgVGSb5J 2RxgZcyUJTWMz8Vz5EGupagYHbC6BUB36q37J29TYZP0bBaa49c9Lnejl2CsecqtWvEq gyow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dmarc-filter:sender :dkim-signature; bh=GK5RrJBohqVNyxkCsNpqXozYtZFMscFYkIM9WyaOMZQ=; b=BG6bnN/01Ip+wm55pCv2IH5dY96c/59gXtCxikAvsJ+WgLgeTIY0SuwAif69ceMnXn M/fjO1zCC6t4WDbQG9XVaa9QbB3eQAXZjH/qhRLJm6zVljmv9bxNWr2d8TRAu1Vkj9Ol Ud1bvH/lLcvU97WaWew+41h1rujwUZ45I0+7lUuUauiOZ7SC2QbEOzAQh4//jDARF/FN s2J46qlSPD+71NfXBiychwSRDjDinRXvqc8iuuq+fL/+CtqWVhOd/xj60g0ilGK+ybvZ 8nqqmZzOEavVnZeyiyBXSfsXcaQjAtotnIbgP0whND+mX2kGTzB+53BiJHgN56m4Z1m2 0FSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=eDPla5BP; 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 h9si1820234ioh.20.2021.09.16.02.14.39; Thu, 16 Sep 2021 02:14:53 -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; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=eDPla5BP; 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 S235240AbhIPJPb (ORCPT + 79 others); Thu, 16 Sep 2021 05:15:31 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:45086 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235160AbhIPJPb (ORCPT ); Thu, 16 Sep 2021 05:15:31 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1631783651; h=Content-Type: MIME-Version: Message-ID: In-Reply-To: Date: References: Subject: Cc: To: From: Sender; bh=GK5RrJBohqVNyxkCsNpqXozYtZFMscFYkIM9WyaOMZQ=; b=eDPla5BPXcm9Twcf7I2l70l8IjO4cXe2q5y/X6LrOkx0jv6Uo1ATiEZit1cO1wC/5EyolyE9 UlfX/y8JOSu+WicydT4RPbDlwVR31ns9/TTu0VnmM44iTIXnNM1o0WGLENr6eSJiF1fh/vIq B6gzyuPAwWh4T/VMqtuCenbBIf0= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n04.prod.us-east-1.postgun.com with SMTP id 61430ae1ec62f57c9a06e096 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 16 Sep 2021 09:14:09 GMT Sender: kvalo=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 2C62BC4360C; Thu, 16 Sep 2021 09:14:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from tykki (tynnyri.adurom.net [51.15.11.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4CFDEC4338F; Thu, 16 Sep 2021 09:14:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 4CFDEC4338F Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Kalle Valo To: Jouni Malinen Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, Sathishkumar Muruganandam Subject: Re: [PATCH 1/2] ath11k: fix 4-addr tx failure for AP and STA modes References: <20210720213147.90042-1-jouni@codeaurora.org> Date: Thu, 16 Sep 2021 12:14:02 +0300 In-Reply-To: <20210720213147.90042-1-jouni@codeaurora.org> (Jouni Malinen's message of "Wed, 21 Jul 2021 00:31:46 +0300") Message-ID: <87wnngzxut.fsf@codeaurora.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Jouni Malinen writes: > From: Sathishkumar Muruganandam > > Ath11k FW requires peer parameter WMI_PEER_USE_4ADDR to be set for > 4-addr peers allowing 4-address frame transmission to those peers. > > Add ath11k driver callback for sta_set_4addr() to queue new workq > set_4addr_wk only once based on new boolean, use_4addr_set. > > sta_set_4addr() will be called during 4-addr STA association cases > applicable for both AP and STA modes. > > In ath11k_sta_set_4addr_wk(), > > AP mode: > WMI_PEER_USE_4ADDR will be set for the corresponding > associated 4-addr STA(s) > > STA mode: > WMI_PEER_USE_4ADDR will be set for the AP to which the > 4-addr STA got associated. > > Tested-on: IPQ8074 WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-1 > > Signed-off-by: Sathishkumar Muruganandam > Signed-off-by: Jouni Malinen > --- > drivers/net/wireless/ath/ath11k/core.h | 3 ++ > drivers/net/wireless/ath/ath11k/mac.c | 48 ++++++++++++++++++++++++-- > 2 files changed, 49 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h > index 018fb2385f2a..11c8dffd0236 100644 > --- a/drivers/net/wireless/ath/ath11k/core.h > +++ b/drivers/net/wireless/ath/ath11k/core.h > @@ -362,6 +362,7 @@ struct ath11k_sta { > enum hal_pn_type pn_type; > > struct work_struct update_wk; > + struct work_struct set_4addr_wk; > struct rate_info txrate; > struct rate_info last_txrate; > u64 rx_duration; > @@ -374,6 +375,8 @@ struct ath11k_sta { > /* protected by conf_mutex */ > bool aggr_mode; > #endif > + > + bool use_4addr_set; > }; [...] > +static void ath11k_mac_op_sta_set_4addr(struct ieee80211_hw *hw, > + struct ieee80211_vif *vif, > + struct ieee80211_sta *sta, bool enabled) > +{ > + struct ath11k *ar = hw->priv; > + struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv; > + > + if (enabled && !arsta->use_4addr_set) { > + ieee80211_queue_work(ar->hw, &arsta->set_4addr_wk); > + arsta->use_4addr_set = true; > + } > +} There's no locking for accessing arsta->use_4addr_set. Most likely it's just a theoretical issue but wanted to point out anyway. Maybe mac80211 handles serialisation of this callback? I'm going to apply this patch anyway so that I get my patch queue smaller, we can fix any issues in a followup patch. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches