Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp526327pxj; Thu, 13 May 2021 10:23:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmwpDsN/LDzGF7xAswArMB6MpXXmzs3OZ2gpNsDZ85ECOARfpL6BUq43/5OlQ7ANRfExtB X-Received: by 2002:a17:906:5210:: with SMTP id g16mr17571980ejm.116.1620926613626; Thu, 13 May 2021 10:23:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620926613; cv=none; d=google.com; s=arc-20160816; b=KWrJnhhhFjDznXDBReY0MboNk1YQpXCb6/jlXd5tbta/xPkQH4laGm/Gn89SNohC6k YtS3gpDOYLDSWGnNnvNMT7+Y4yW9/BItkw/MXcX8N+t52lCryC6p394XRwkmS/fe/BEI TDubSHEZ8Q54ItIE2zd32wcwTHmljDTA4mG5CKECo6kpNP7wyeL8MD92OWQ+BOQjrXgK qFwGsQW62APeu6HnVtWrlZFl2KvZy0nA32/4gZYFFWHDaEV3QBQzujG1h5RAGy9TLMS4 JZ7odpm0Usuj+Ya6ITGrcBIxQE3JF/+gP14RUsh6iSH7rAnDswG1IZe5QBEKzYpT5MOk 98Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=iM3ko5L1PPEvD7mpUvwhSW4LYEMmmMA1RfYovsAbYmk=; b=yAXkAW6hgHvDAhVz2AkXu33TJc3YXl6BjdWjCdEewlhD/g4rHtaskv2bYH2A0qHjOI B7gTFIFtlEunQFRldPoLejs448MYJ+gpupG2G5QLSlCAHBcOPysLY0jiAIyE73M8Sy0G 9eQ+UUKfy7w9zeSCkhzD80bPv//FRQcGte7dKHDOj/8o7AdexMoWBI0CMugy9P00KoFM Cc4o/tL+xDKDmRqRFfqfGiHm2Y2/lEQdFCj1fCwJkrm4rZB/X/DgqAWuOC7PCTQh+01M +iFWNwcGvSqUyKa9ojvYKbXZQSgClCSp36+3JqLR7sDW0mq3LFmlc37rHgzEsNUCNU4E UsGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=Tl+KboUU; 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 rs3si3467789ejb.501.2021.05.13.10.23.01; Thu, 13 May 2021 10:23:33 -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=Tl+KboUU; 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 S231208AbhEMRUW (ORCPT + 99 others); Thu, 13 May 2021 13:20:22 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:26342 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231277AbhEMRTs (ORCPT ); Thu, 13 May 2021 13:19:48 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1620926317; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=iM3ko5L1PPEvD7mpUvwhSW4LYEMmmMA1RfYovsAbYmk=; b=Tl+KboUUaf20pV4lPjo1CP/2HUeoChgvgVun8YXBsxY3+MAESreoO9ykNPkGsy3hfquESOuw ovC5EPWBj2XrWgDUKhrwerHqbZ6FUL1viMyza97PjoQ2SlT/94hF0URKAQy6ziF5FLGM85Qs JL+kKyXz1Fp6Yor1h1hF/6TPhRs= 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-n01.prod.us-east-1.postgun.com with SMTP id 609d5f62ff1bb9beecb323b2 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 13 May 2021 17:18:26 GMT Sender: jjohnson=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id EF3C1C433F1; Thu, 13 May 2021 17:18:24 +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, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jjohnson) by smtp.codeaurora.org (Postfix) with ESMTPSA id 83412C4338A; Thu, 13 May 2021 17:18:22 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 13 May 2021 10:18:22 -0700 From: Jeff Johnson To: Brian Norris Cc: Johannes Berg , linux-wireless , Wen Gong , stable Subject: Re: [PATCH 14/18] ath10k: drop MPDU which has discard flag set by firmware for SDIO In-Reply-To: References: <20210511180259.159598-1-johannes@sipsolutions.net> <20210511200110.11968c725b5c.Idd166365ebea2771c0c0a38c78b5060750f90e17@changeid> Message-ID: X-Sender: jjohnson@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2021-05-12 11:35, Brian Norris wrote: > On Tue, May 11, 2021 at 11:03 AM Johannes Berg > wrote: >> --- a/drivers/net/wireless/ath/ath10k/htt_rx.c >> +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c >> @@ -2312,6 +2312,11 @@ static bool ath10k_htt_rx_proc_rx_ind_hl(struct >> ath10k_htt *htt, >> fw_desc = &rx->fw_desc; >> rx_desc_len = fw_desc->len; >> >> + if (fw_desc->u.bits.discard) { >> + ath10k_dbg(ar, ATH10K_DBG_HTT, "htt discard mpdu\n"); >> + goto err; >> + } >> + >> /* I have not yet seen any case where num_mpdu_ranges > 1. >> * qcacld does not seem handle that case either, so we >> introduce >> the >> * same limitiation here as well. >> diff --git a/drivers/net/wireless/ath/ath10k/rx_desc.h >> b/drivers/net/wireless/ath/ath10k/rx_desc.h >> index f2b6bf8f0d60..705b6295e466 100644 >> --- a/drivers/net/wireless/ath/ath10k/rx_desc.h >> +++ b/drivers/net/wireless/ath/ath10k/rx_desc.h >> @@ -1282,7 +1282,19 @@ struct fw_rx_desc_base { >> #define FW_RX_DESC_UDP (1 << 6) >> >> struct fw_rx_desc_hl { >> - u8 info0; >> + union { >> + struct { >> + u8 discard:1, >> + forward:1, >> + any_err:1, >> + dup_err:1, >> + reserved:1, >> + inspect:1, >> + extension:2; >> + } bits; >> + u8 info0; >> + } u; > > Am I misled here, or are you introducing endianness issues here? From > C99: > > "The order of allocation of bit-fields within a unit (high-order to > low-order or low-order to high-order) is implementation-defined." > > Now, we're pretty well attuned to two implementations (big and little > endian), and this should work for the most common one (little endian), > but it's not wise to assume everyone is little endian. > > Brian This issue was identified in internal review, but due to the embargo expiring we sent it out as-is since that is what had been tested. The author will have a follow-up change to replace this. -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project