Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1896541pxa; Mon, 3 Aug 2020 01:51:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx62V42XsrCOWRi1vupeSqrcwQHrvdG3CaXmusqysHW/n3Kz4y4+F1tcI/+su7LOOiqgGL9 X-Received: by 2002:a17:906:6055:: with SMTP id p21mr16326339ejj.173.1596444718177; Mon, 03 Aug 2020 01:51:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596444718; cv=none; d=google.com; s=arc-20160816; b=Ucko8LbY7EbewvHer9Rd3DxDDxFFHjP1xLcrYNxIhbeyyRF6SZZ5S84OLUCgv9r/1x Jnl5FcU1QVxvv+sd6rnjiJmSDui7b7UZ+qTJN6th9HOO6gUFuC1e7Tzxm6kIa7AlxpzD iBPV2G5ll4qBte/guD3Gnk75J+T2QgzBULHjxTFqgQB21O3gDbmaVpEEvtH7l47Zc4k+ arUeljY1FT52MRKWfm4pg++nZsItgQyiR0Fg2n86s4BdxzxhGqGaW+qFGqqNF0NGU4eU kReDOuN7l1hB29Z5Han3mugLnw9ZEFu/hT5sjKpFtDueiyDtzvBFCYWm72NOs0ITmLIZ i1+g== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=hIXpttKqlaBMcsr1C6losZYMWPxyqfYEepd6hN3Yrec=; b=oh4a3oto6tDjzACQc7NJStF9BO+Iu15Y17Vg+pROXFJHNnwDHCEZm+KceSY05aZj+Q lzLs721w8mOeTZ2vZ9hsrCk195J/lESNuTmV+w+fo4n/YAtbXkjVFtj1hA6psejiT3+U 5f8s/ZmN7pbZcKgc5wO5L6subqbsYiZD+j2a3+NA9o8yPEUkvSP6WvWgpvWapoFvB6PH 017gRwra7X8qFnLSrU5xRDvQj7O/6ygKjQSegJD9ymLoaS9Xas+mbFqEiCSkLR5DJbqp hAr6WBoreiBa2UwkumUpLb5EBz0FsyrxCszSLTlOYShY/hb54zNEPOgJsD15uxFrA/S1 9u9A== ARC-Authentication-Results: i=1; mx.google.com; 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 y7si7482260eju.152.2020.08.03.01.51.33; Mon, 03 Aug 2020 01:51:58 -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; 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 S1725926AbgHCIvb (ORCPT + 99 others); Mon, 3 Aug 2020 04:51:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725806AbgHCIva (ORCPT ); Mon, 3 Aug 2020 04:51:30 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2EAAC06174A for ; Mon, 3 Aug 2020 01:51:30 -0700 (PDT) Received: from [134.101.163.132] (helo=bertha9.fritz.box) by ds12 with esmtpa (Exim 4.89) (envelope-from ) id 1k2WBs-0002Pi-UR; Mon, 03 Aug 2020 10:51:29 +0200 From: John Crispin To: Johannes Berg Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, Miles Hu , John Crispin Subject: [PATCH V5 2/3] mac80211: add support for setting fixed HE rate/gi/ltf Date: Mon, 3 Aug 2020 10:51:26 +0200 Message-Id: <20200803085127.180550-2-john@phrozen.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200803085127.180550-1-john@phrozen.org> References: <20200803085127.180550-1-john@phrozen.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Miles Hu With nl80211 now able to receive fixed HE rate/gi/ltf settings we want to propagate these further down the stack into the mac80211 drivers. This patch copies the values into the sdata struct. Signed-off-by: Miles Hu Signed-off-by: John Crispin --- net/mac80211/cfg.c | 11 +++++++++++ net/mac80211/ieee80211_i.h | 3 +++ 2 files changed, 14 insertions(+) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 24e9e00decb8..efee1a4e0600 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2863,9 +2863,13 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy, memcpy(sdata->rc_rateidx_vht_mcs_mask[i], mask->control[i].vht_mcs, sizeof(mask->control[i].vht_mcs)); + memcpy(sdata->rc_rateidx_he_mcs_mask[i], + mask->control[i].he_mcs, + sizeof(mask->control[i].he_mcs)); sdata->rc_has_mcs_mask[i] = false; sdata->rc_has_vht_mcs_mask[i] = false; + sdata->rc_has_he_mcs_mask[i] = false; if (!sband) continue; @@ -2882,6 +2886,13 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy, break; } } + + for (j = 0; j < NL80211_HE_NSS_MAX; j++) { + if (~sdata->rc_rateidx_he_mcs_mask[i][j]) { + sdata->rc_has_he_mcs_mask[i] = true; + break; + } + } } return 0; diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 0b1eaec6649f..19ff8a2ff7b6 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -967,6 +967,9 @@ struct ieee80211_sub_if_data { u32 beacon_rateidx_mask[NUM_NL80211_BANDS]; bool beacon_rate_set; + bool rc_has_he_mcs_mask[NUM_NL80211_BANDS]; + u16 rc_rateidx_he_mcs_mask[NUM_NL80211_BANDS][NL80211_HE_NSS_MAX]; + union { struct ieee80211_if_ap ap; struct ieee80211_if_wds wds; -- 2.25.1