Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp999340ybl; Fri, 13 Dec 2019 07:58:32 -0800 (PST) X-Google-Smtp-Source: APXvYqxK3K5KoJcVuxSKV9N8X6DN76UHfqPujlZIq/R0Oc/c/S/CQTJipUWqwQiquLZ7RLdSzmn6 X-Received: by 2002:a9d:282:: with SMTP id 2mr14802324otl.237.1576252712453; Fri, 13 Dec 2019 07:58:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576252712; cv=none; d=google.com; s=arc-20160816; b=WlcwIozez15sc6Yzpizv8C2KY+SeiLZDfAUWfk5r3RcrqWYDkoPuinVcNpb5Ua/ubk xz89EvcSW309ltASgXYjmHdMUV5vveq+8DDhzmjIASHYxdU/IppQPOqTdWlzBlZ4syHy vdwTzyRbltp0UYxAwoC4OSNtz9+s+ER/0HBpVm9DRoV/ng985jUqDwn+2LiD79ZeIVCS aTHl6/3wLOr2I24cNars4KRzVyVcYb0Yrb3EiXEglvCfP85WVCJ7tj5ytDNI1bjKRqIH riK/JhyaXlskG4KlRH3m+PwvLzuznm56gQv/Or+fZS0d/VngotyakEk8NGn9ZFxNX8OJ uYTg== 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 :message-id:date:subject:cc:to:from; bh=N0ZTR8FX3aSSiXE+TdPeIJ3HAgDa5CXsqVe88GUb6qo=; b=lC13f9WFDO+c9f2sdjxXlhCL/BY6Nzx1FLrOVy4iaodcbzDimx0RHmcCi9MuQuSg3k W948JN64SjjYDyVVczVplrDz1GBqtlkzYl+GjckVd+dibWxT+GgEhSowYjK5oGTQ5zAx V6Qmxue+VeprmpdFkR0qbZz4UZKqPLe+XljmBGksCKkNCOTlzVuz7qvfl4/hq7R7h5k0 aYGWN/g5fElvMhx9+czYmQ1xuUVaQpiaGLsK/AjlHqdajQZptoLrYD1DHpuwbrdlQfgB qik7OwxjUTW/PkTQxVCIn6kJObXWmutIrrm01dfoejl5D+QnfJ2XDNGvpF954JkZUZFN U1vA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s11si2824513otd.123.2019.12.13.07.58.17; Fri, 13 Dec 2019 07:58:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728042AbfLMP6P (ORCPT + 99 others); Fri, 13 Dec 2019 10:58:15 -0500 Received: from nbd.name ([46.4.11.11]:56200 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727932AbfLMP6O (ORCPT ); Fri, 13 Dec 2019 10:58:14 -0500 Received: from pd95fd344.dip0.t-ipconnect.de ([217.95.211.68] helo=bertha.fritz.box) by ds12 with esmtpa (Exim 4.89) (envelope-from ) id 1ifnKT-00073u-7l; Fri, 13 Dec 2019 16:58:09 +0100 From: John Crispin To: Johannes Berg , Kalle Valo Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, John Crispin Subject: [PATCH v2 1/7] mac80211: add a struct for holding BSS color settings Date: Fri, 13 Dec 2019 16:57:56 +0100 Message-Id: <20191213155802.25491-1-john@phrozen.org> X-Mailer: git-send-email 2.20.1 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 Right now we only track the actual color but not the other bits contained within the he_oper field. Fix this by creating a new struct to hold all of the info. Signed-off-by: John Crispin --- include/net/cfg80211.h | 15 +++++++++++++++ include/net/mac80211.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 8140c4837122..e395ef48af83 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -259,6 +259,19 @@ struct ieee80211_he_obss_pd { u8 max_offset; }; +/** + * struct ieee80211_he_bss_color - AP settings for BSS coloring + * + * @color: the current color. + * @disabled: is the feature disabled. + * @partial: define the AID equation. + */ +struct ieee80211_he_bss_color { + u8 color; + bool disabled; + bool partial; +}; + /** * struct ieee80211_sta_ht_cap - STA's HT capabilities * @@ -910,6 +923,7 @@ enum cfg80211_ap_settings_flags { * @twt_responder: Enable Target Wait Time * @flags: flags, as defined in enum cfg80211_ap_settings_flags * @he_obss_pd: OBSS Packet Detection settings + * @he_bss_color: BSS Color settings */ struct cfg80211_ap_settings { struct cfg80211_chan_def chandef; @@ -938,6 +952,7 @@ struct cfg80211_ap_settings { bool twt_responder; u32 flags; struct ieee80211_he_obss_pd he_obss_pd; + struct ieee80211_he_bss_color he_bss_color; }; /** diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 6781d4637557..16a5525ddab1 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -604,6 +604,7 @@ struct ieee80211_ftm_responder_params { * in order to discover all the nontransmitted BSSIDs in the set. * @he_operation: HE operation information of the AP we are connected to * @he_obss_pd: OBSS Packet Detection parameters. + * @he_bss_color: BSS coloring settings, if BSS supports HE */ struct ieee80211_bss_conf { const u8 *bssid; @@ -667,6 +668,7 @@ struct ieee80211_bss_conf { u8 profile_periodicity; struct ieee80211_he_operation he_operation; struct ieee80211_he_obss_pd he_obss_pd; + struct ieee80211_he_bss_color he_bss_color; }; /** -- 2.20.1