Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1838961yba; Thu, 25 Apr 2019 06:35:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqwulEnLQ+OL6Q7jhXlygBqs6FdV7IL1IshhRx5fhr8zZ0hp6IWWc2OSCcEcXb/s4tfXG4jp X-Received: by 2002:a17:902:6b8b:: with SMTP id p11mr38814005plk.225.1556199316982; Thu, 25 Apr 2019 06:35:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556199316; cv=none; d=google.com; s=arc-20160816; b=aA4Mg5I3bJHIftbpgkPqao+okesBS8ymJu2gM5/8cq0vyL6BA9+UOqAn5UXFxYj/Lp l2rn4BW82iOmqhDdoJ+a3y1LS1hnfolfnuMRdP54r13ZCLZbCILoSex7eYW1SPnjVFAB 53ASkuAD6M7isYwZcBZYzNUIYanELAlfRZCgJ6fw5QzPlODN5UBU5Dj8fe46UOQChyNP 2PUxnYvy+FHdv7zN+FsRuhskEjIBayZpMBlbSJvtkDcS56tqVT0136t7KyzEtIFMFOa+ N7ZvNcURYrjQy2vipN2Uga/nLuIeFIiB7nQFEjcmWvB2k9PbD9/S2P1rwW9kfzV3H2uf nktg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=9g7GpgMRW/7NmFiw3exLo7k8Yrf6f9c2WsvXfc4KMVI=; b=m8W5nxB8i2/WoR5ovekFhndu2qq8sR3MWc4GXZVIF/xwlj8qlXoKOdYuM1fW8Y2WLl qoPGYABV9INMpLeutDKOn7bcWP/bH9Tk1vpJCF9MKHfFpvy1wGnhVUJZQFbUdG2o0Omx a7mqXN5U0AfRoN6IcZS0H8w1nPgFleYihK4Oif+QprbzRTAywwZ+l5Gr4voc75UY4fe2 oYPUZ43GSSvFeqbIEU3l+mOc8grCvtsjVI18sFpTb25L4LsLx1iS/zbZGRpPyWujccne i/5WrtDvQ/D/q3d5bU+mZvCo+9UIzOU9h5E0p/bK8f1oaPS5HvLDxjtlWy89iCujaJqH 3iCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=C4GuRxjh; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e126si20956742pgc.211.2019.04.25.06.35.01; Thu, 25 Apr 2019 06:35:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=C4GuRxjh; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727608AbfDYLW3 (ORCPT + 99 others); Thu, 25 Apr 2019 07:22:29 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:46824 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725935AbfDYLW3 (ORCPT ); Thu, 25 Apr 2019 07:22:29 -0400 Received: by mail-ed1-f68.google.com with SMTP id d1so18780141edd.13 for ; Thu, 25 Apr 2019 04:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=9g7GpgMRW/7NmFiw3exLo7k8Yrf6f9c2WsvXfc4KMVI=; b=C4GuRxjhuqlvyufpTuBQGs0TgTMZNC4xqSRyQv4bSmw3nLavwNMYQBKbu+9grZs7H1 vkcnVdFZBvYkwnxVm2tbOo/RXUMAcUUOZ7qemNmLjQPdpnwAdwfiW9/kfsMM+4WCyL4F bHBaRMPyGjQkkFhu57dF6VOypCruLkISb/LHA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9g7GpgMRW/7NmFiw3exLo7k8Yrf6f9c2WsvXfc4KMVI=; b=W9d1oeQl10IddPL5TDhknsKKJO3t/zUIEnuE+fBYRnvb5muhkYuECm7vGB0KiJzL2S T/cO3YI1VIugPZFP5KeT1yybLmYmJRF+gg8nbqgeN6nR9imEhdztcBdoDjrQxqLSPx5i 4QjfX46gzrxNNZLxB6tP3d1ryA0Llh7HkTOgBJnEGhJJINAddhQS5F1t2xX8lir9ammE 4O84CSsfdSQhOMp6u3miItlLkTlpWaELaiUdVKIjjQiMKlsIYHTdtyySfOiUlSy50zh5 /mOoZiV7aSSW433wUaiT5VTsxhr/IR/L87KBPQZKHb8dxjA8qNC+EpAT731fWnSxUZEN qEAw== X-Gm-Message-State: APjAAAWaCTjdoEW1CeFqAYKsLeIIXb274vvDlkJsPcBA+IJmM/WiPAJ2 bEkQrw7MBrEU5fxJZJ7WpW7eIXdVSPgP8A== X-Received: by 2002:a17:906:2356:: with SMTP id m22mr8428959eja.255.1556191347846; Thu, 25 Apr 2019 04:22:27 -0700 (PDT) Received: from [10.230.40.234] ([192.19.215.250]) by smtp.gmail.com with ESMTPSA id y19sm6044622edq.53.2019.04.25.04.22.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Apr 2019 04:22:27 -0700 (PDT) Subject: Re: [PATCH] brcmfmac: allocate msgbuf pktid from 1 to pktids array size To: Wright Feng , "franky.lin@broadcom.com" , "hante.meuleman@broadcom.com" , "kvalo@codeaurora.org" , Chi-Hsien Lin Cc: "linux-wireless@vger.kernel.org" , "brcm80211-dev-list.pdl@broadcom.com" References: <1556179487-147593-1-git-send-email-wright.feng@cypress.com> From: Arend Van Spriel Message-ID: <66165629-aa4d-afbe-5b09-3a592ff44a82@broadcom.com> Date: Thu, 25 Apr 2019 13:22:25 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1556179487-147593-1-git-send-email-wright.feng@cypress.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 4/25/2019 10:04 AM, Wright Feng wrote: > Some PCIE firmwares drop txstatus if pktid is 0 and make packet held in > host side and not be released. If that packet type is 802.1x, the > pend_8021x_cnt value will be always greater than 0 and show "Timed out > waiting for no pending 802.1x packets" error message when sending key to > dongle. > > To be compatible with all firmwares, host should allocate msgbuf pktid > from 1 instead of from 0. looking at it we are wasting entry 0 with this patch. Could we avoid that? Regards, Arend > Signed-off-by: Wright Feng > --- > drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c > index d3780ea..b2fab3c 100644 > --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c > +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c > @@ -348,7 +348,7 @@ brcmf_msgbuf_alloc_pktid(struct device *dev, > do { > (*idx)++; > if (*idx == pktids->array_size) > - *idx = 0; > + *idx = 1; > if (array[*idx].allocated.counter == 0) > if (atomic_cmpxchg(&array[*idx].allocated, 0, 1) == 0) > break; >