Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6026252rwl; Mon, 9 Jan 2023 03:17:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXtoFyesAi8qMZt3SbeIbFzBImTIBUFxwqBh0pMFacghseWv3/LhdWr9UoWDANDvC0Et6kHn X-Received: by 2002:a17:907:c301:b0:7fd:ecee:c8ba with SMTP id tl1-20020a170907c30100b007fdeceec8bamr82300508ejc.42.1673263056833; Mon, 09 Jan 2023 03:17:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673263056; cv=none; d=google.com; s=arc-20160816; b=eJMsjydWKp9Hzwqs8zaO440tOXJ5xgJFB0UCuPBP6OSKrKCS7y1yEH6gJ1Tfrx0HwQ FVH/l1yeMgpp+GexUek/xHtwYwvtybfDZrpQHZRbLlRiyyBbxzHfQ0qkwvOJiGmIfApz ZVji+7HclMzB68xwFcnI4ZRnZgMNx4gGhlOmue/nPh4g8y0PEo9IflYs1JBWd7fPw9Is paS77lZa/zO+GsUbANGAI49j4S0c1Beh9mWWN2ucLjiVmtH5gvnS3w6cvpEYfL6pfiqW 06MdMP3mKsa2r4FNeCHnvvuioG5Vub7m6jLUK2cSWLChSQbsbLDdD0BxyF9tOmcikczb H/pg== 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=NXl7vYu9QqJwar5NPBV2UBdX9lH6d66RspL0ozq5W8Q=; b=R2a1JyFLlejvlvom47xHRXHm1mjALGoLgFNEf/nltkUhBoXMtrLOAsBinpbExcnbd/ 8QUUVptHzX2s2u2MbQ5EBRZU3Kvt4+oq2/0wBXfvlbzyTuGQs4i24BREaP6KDMOhFyza EkWAcLhNQbgGTlLSMOebJhiAM3owmkD0XiFJusIzogdBAapfCNvL1k7tuZV14kd695jR TKiFUPccX51Blzn8Z+jBhAk7dAXdPzl7MJef+D7d4nXDbWabnA/T+X9mm6ygGj4rEDdW iqFqQGoCJt51dkS0Caf3+aEq9ez5+CuIdOpgstlfwu7FZOCuf1kf0aI1Kdq+DAWiFWzQ uI3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XoiSC+GA; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji5-20020a170907980500b0084ccb67b9e2si10153411ejc.592.2023.01.09.03.17.20; Mon, 09 Jan 2023 03:17:36 -0800 (PST) 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=@intel.com header.s=Intel header.b=XoiSC+GA; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233513AbjAILH6 (ORCPT + 65 others); Mon, 9 Jan 2023 06:07:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233491AbjAILHz (ORCPT ); Mon, 9 Jan 2023 06:07:55 -0500 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23679C7F for ; Mon, 9 Jan 2023 03:07:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673262474; x=1704798474; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=c7jQUZdkDunEJxBTew9IwU3qIN/Rn6dYJ+oB+VHPjNU=; b=XoiSC+GAXLLqClAWdoh9suypRCSDNIrHBrbglCyIwRSXCylFh+R8Z8cO ptfgxI7JVz6M0mk825z7SN9sZBpT7uRh22ucZAkPufQa5qw/fwVIuvFEw 3yuHKC/G1RqScGBt6QnV4550ewL8NMHzH8+5QJq+HdVSxVCs73yLiec2l ICbzOG3QDx0J1AGqwZICVNe1bLvn1IfBqrpAkaFkvyGuCUK8KA1N+BTMC GreDPhwZT3u1jz+jEWQz0PLUOwmUcZiyWmoyxz40pkoByP9vINDQUrT+o oQGLG0LvUttb0Fz+444lS+h8mHANA3X0C2Z8srbGE+cNo6dtgYPsrm3Io g==; X-IronPort-AV: E=McAfee;i="6500,9779,10584"; a="387296451" X-IronPort-AV: E=Sophos;i="5.96,311,1665471600"; d="scan'208";a="387296451" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2023 03:07:53 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10584"; a="689003136" X-IronPort-AV: E=Sophos;i="5.96,311,1665471600"; d="scan'208";a="689003136" Received: from djacobi-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.intel.com) ([10.251.191.194]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2023 03:07:52 -0800 From: gregory.greenman@intel.com To: kvalo@kernel.org, johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 2/2] iwlwifi: mvm: add minimal EHT rate reporting Date: Mon, 9 Jan 2023 13:07:22 +0200 Message-Id: <20230109130329.5f34d73d1f74.Ib27ae7bd23bc152d61021fd73aabdc76679b9fe4@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230109110722.212758-1-gregory.greenman@intel.com> References: <20230109110722.212758-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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 From: Johannes Berg Now with all the prework, this is fairly simple, just report the new bandwidth and RX_ENC_EHT type in RX, and for now just do a minimal report of the EHT TLC rate in iwl_mvm_set_sta_rate(). Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 7 +++++++ drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 5273ade71117..565522466eba 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -5116,6 +5116,9 @@ static void iwl_mvm_set_sta_rate(u32 rate_n_flags, struct rate_info *rinfo) case RATE_MCS_CHAN_WIDTH_160: rinfo->bw = RATE_INFO_BW_160; break; + case RATE_MCS_CHAN_WIDTH_320: + rinfo->bw = RATE_INFO_BW_320; + break; } if (format == RATE_MCS_CCK_MSK || @@ -5176,6 +5179,10 @@ static void iwl_mvm_set_sta_rate(u32 rate_n_flags, struct rate_info *rinfo) rinfo->flags |= RATE_INFO_FLAGS_SHORT_GI; switch (format) { + case RATE_MCS_EHT_MSK: + /* TODO: GI/LTF/RU. How does the firmware encode them? */ + rinfo->flags |= RATE_INFO_FLAGS_EHT_MCS; + break; case RATE_MCS_HE_MSK: gi_ltf = u32_get_bits(rate_n_flags, RATE_MCS_HE_GI_LTF_MSK); diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index 97b67270f384..a6f0aed5a815 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -1690,6 +1690,9 @@ static void iwl_mvm_rx_fill_status(struct iwl_mvm *mvm, case RATE_MCS_CHAN_WIDTH_160: rx_status->bw = RATE_INFO_BW_160; break; + case RATE_MCS_CHAN_WIDTH_320: + rx_status->bw = RATE_INFO_BW_320; + break; } /* must be before L-SIG data */ @@ -1726,6 +1729,9 @@ static void iwl_mvm_rx_fill_status(struct iwl_mvm *mvm, rx_status->he_dcm = !!(rate_n_flags & RATE_HE_DUAL_CARRIER_MODE_MSK); break; + case RATE_MCS_EHT_MSK: + rx_status->encoding = RX_ENC_EHT; + break; } switch (format) { @@ -1736,6 +1742,7 @@ static void iwl_mvm_rx_fill_status(struct iwl_mvm *mvm, break; case RATE_MCS_VHT_MSK: case RATE_MCS_HE_MSK: + case RATE_MCS_EHT_MSK: rx_status->nss = u32_get_bits(rate_n_flags, RATE_MCS_NSS_MSK) + 1; rx_status->rate_idx = rate_n_flags & RATE_MCS_CODE_MSK; -- 2.38.1