Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2518024ybt; Sun, 21 Jun 2020 23:44:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAsNXjyAL33P8RvcSsEfacbtHUmTY4V5sFipBY+0gkNlQGZEwTRo/RI3uf6CPGzfrna+st X-Received: by 2002:a17:906:fcc2:: with SMTP id qx2mr13212031ejb.420.1592808280507; Sun, 21 Jun 2020 23:44:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592808280; cv=none; d=google.com; s=arc-20160816; b=XKOH/9b+TuKoUX7PqX57HmriCsIdkcGegx1Mkmp0BMK67E0SwqubVa3qYUMB71cKkv 9BUlbYAqObcdLOz7/8vQGNqjykT98kxz6zi2PT3AgKwJTiWeC5iesqmmB548yOkgFHb/ WHyitrLOpS8HQ9jkOv1dTEtRn9ideSYASsl8t2qWgfjvGuBHbKyBcwdcwCD4q+rCvtaX 3T4HeKP23+lXMj1Uk1OxOPuaxG15LoYA1HKHgR+NZyhNqZZXcTRFWv/U2imt7nDLgwsH Hy1Wj7rGayTuyYpqCLEXq3/Yjb7Vy6n7eoKSAiP48U4uyFD2MAY409GPEcrA1EKJrHyz wK8g== 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=PAB3ntUwyJsT5pf0GhW5UvGS0+V3iMH2WIuT9LeonSU=; b=I3aDzWGiP6gVAu7ltF83eU3RN1+w6ox9/L/XlkEqzbufPPuKs+zIFmJ3lMn4jZKtRY woG4ew9f1XKz3lmcIu/7+8IULExtBXQKZLfGfnubC28dQxZkgo/4YV4zNLaToLdofDdr i0IeLwkNGwA6ECmy8cm6LwECPe1iW/oLNP7gqweuAlDCPPlzQSM8gCIyvoxamB7PoBn3 dvt4RuaVKiUzxlvmWdxNsQK01yOoV55EyeqAIyVASZFf+05TtsI16Q6pRUkgCt3IZtfh 0ClM4vo5kXnJgvb1d/9H+Mdg5Dt2bOX5ZxErVXYYMjJdikXG7wVJFI8UjnEyJjRdJy2v lwmw== 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 h6si9255798edn.503.2020.06.21.23.44.17; Sun, 21 Jun 2020 23:44:40 -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 S1726750AbgFVGoE (ORCPT + 99 others); Mon, 22 Jun 2020 02:44:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbgFVGoE (ORCPT ); Mon, 22 Jun 2020 02:44:04 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE364C061795 for ; Sun, 21 Jun 2020 23:44:03 -0700 (PDT) Received: from [46.59.177.224] (helo=localhost.localdomain) by ds12 with esmtpa (Exim 4.89) (envelope-from ) id 1jnGBR-0001V5-FS; Mon, 22 Jun 2020 08:43:57 +0200 From: John Crispin To: Johannes Berg Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, Miles Hu , John Crispin Subject: [PATCH V55 2/3] mac80211: add support for setting fixed HE rate/gi/ltf Date: Mon, 22 Jun 2020 08:43:48 +0200 Message-Id: <20200622064349.2431682-2-john@phrozen.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200622064349.2431682-1-john@phrozen.org> References: <20200622064349.2431682-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 9b360544ad6f..6de20163875e 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2856,9 +2856,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; @@ -2875,6 +2879,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 ec1a71ac65f2..f8ed50421337 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -968,6 +968,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