Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp900435pxb; Thu, 24 Mar 2022 08:58:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydXIJQWDCtn/E6yWa7AmPuIMNVF5DEWAZJ3UER3i1n3ReZs1jpNBXrQBjEyygGUmqMj7Tp X-Received: by 2002:a17:903:230a:b0:154:7271:9c30 with SMTP id d10-20020a170903230a00b0015472719c30mr6749043plh.84.1648137501125; Thu, 24 Mar 2022 08:58:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648137501; cv=none; d=google.com; s=arc-20160816; b=pkgdRj5WOXdhw8rpuKKKX9tvdxOqPju9q3PyhU+I0wCdSdy5hef8ZGHNl+bs3esI8I 1dSL87CaudcwJotqA7GAbUhlXHa8F9KvjcSoghD9DzMx7cLM61tDfzpUaN3MZudtsGNH +DgC1HGTgBC9T003dAJWiGlGQXjUwQSncFz7kHZDgOs06XUPIRW5BGp9RJvAPXSiOlS2 tJpN+oJJtORyMEp8i2wRR9I0J/kRtU7Y9ScBK/k7qeDsjhRNnZWrjRD3B+tqCWjf8pwu hl3nvpOcUqf09gauzJ+3LYkj8wp6lT72M5zz1BXkHBw9+m3KEx3v3gtbwmRPmE7MpQSt vSGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Ll1M4XLJeZ33EIstqlI3R1RG8FVmeRFTgtdd2vAQYW4=; b=dgbJgUuTXuq4efyNI71DyuW+Ytm9rwnxclPWMBzC4giq9RNYn5Pnt2QzYmqUT3erUw DMWlzJetttipHaRligtofnnYimZQnaWKJASnDRFYyn4O2ZbApgT1/QDkrOhW70njU3+F mbGWkYYhdRVDkvvMOw3OtkG7BxztUhss/nEWuzvgjfNBegFGNxApcKyM2Et1f3e4+ijm pDjUMx/pOiKLHXae30dEQpPCJ0S/WeQj2+A1dRl7Ri0ZdyGdKp9nOurDUBOo2+zxEJ+S JH2N1wUo/S/0S65vlpQOUSNOqAFKBh+qsCrEn7PPmGhB5j45FI34jBcdnm1yZ/NJAP9y takQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=pvgpjzTS; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 26-20020a630d5a000000b003816043f141si22167171pgn.822.2022.03.24.08.58.10; Thu, 24 Mar 2022 08:58:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=pvgpjzTS; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344132AbiCWTSm (ORCPT + 70 others); Wed, 23 Mar 2022 15:18:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344046AbiCWTSl (ORCPT ); Wed, 23 Mar 2022 15:18:41 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50EAE8879B for ; Wed, 23 Mar 2022 12:17:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1648063031; x=1679599031; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Ll1M4XLJeZ33EIstqlI3R1RG8FVmeRFTgtdd2vAQYW4=; b=pvgpjzTSF2e875SFX+RFxS53YyDygL5XJ7f0YTQaxb9olWn/TRAQeWdd ekliJBwNpYcN6BcXbwny4KdFCjnDHFQXI14kNZaI284fTcraeAxdqDAXC J52nSm30asTkSrLhYb517sHQXzAdtHnp/Zq8SO4UyTTxUYikr+jf4YYpu c=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 23 Mar 2022 12:17:10 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2022 12:17:10 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 23 Mar 2022 12:16:53 -0700 Received: from alokad-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 23 Mar 2022 12:16:53 -0700 From: Aloka Dixit To: , CC: Aloka Dixit Subject: [PATCH v2 4/4] mac80211: reset puncturing bitmap during width downgrade Date: Wed, 23 Mar 2022 12:16:40 -0700 Message-ID: <20220323191640.31230-4-quic_alokad@quicinc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220323191640.31230-1-quic_alokad@quicinc.com> References: <20220323191640.31230-1-quic_alokad@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Set the RU puncturing bitmap to 0 if for any reason bandwidth is downgraded to less than 80 Mhz. Signed-off-by: Aloka Dixit --- net/mac80211/util.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 682a164f795a..0dd7e8dae5a9 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -4135,6 +4135,13 @@ u32 ieee80211_chandef_downgrade(struct cfg80211_chan_def *c) break; } + if (c->width != NL80211_CHAN_WIDTH_320 && + c->width != NL80211_CHAN_WIDTH_160 && + c->width != NL80211_CHAN_WIDTH_80) { + c->ru_punct_bitmap = 0; + c->ru_punct_bitmap_supp_he = 0; + } + WARN_ON_ONCE(!cfg80211_chandef_valid(c)); return ret; -- 2.31.1