Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1343330lqt; Wed, 20 Mar 2024 00:14:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVykzxeBHUlIswff2fLZ0dvd06POqF79gwgAaZaTIL09IAmxZT4Dyk8ei50UphIUMntEGOvihXHOdPk+OJQqC2lW5qX6MDizGhQVyYVGg== X-Google-Smtp-Source: AGHT+IHs7e/ENMg9u1nDuRlVql3qlQQsWdeGVKTgJZRMQx0kGzpr6fURoNH9gyJFeJ30kzBCAjSE X-Received: by 2002:a05:620a:1352:b0:787:f8fe:6608 with SMTP id c18-20020a05620a135200b00787f8fe6608mr1178741qkl.49.1710918886425; Wed, 20 Mar 2024 00:14:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710918886; cv=pass; d=google.com; s=arc-20160816; b=spTG3MC4U9GQvTim/pCgdf3FL+qwruFb5jsna1ScmQykLlVrUaRTFSXSBk4N1/3laF dPzl2Ce3sGEM+qWMXvYs1nb07Cll/MYJfDBAm35oAbtoC2/v1ub4ruYTZ6YGdjV9Cv+O s78hfzUHScWYcV1X4AuH3ogtdMVNShndsNxvsnzFyhd0NG766TZJ8oZK/Z0eRvOOg06Z vrMYWbLNgdoy9H/1aBrdKF6Nfi4KmnH2rh5MRHRFKjhk3vz4k9fuCNuWkjNRRPwa/6Qk JN5iyD7On/5Gy6+DmHrFUKSQPFhI3VPNGIlt4d04NKfcARkb9n9zp9Hww1EbmORrY/bO sjFw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:organization:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=kwRhL305LEdu3mVm5XFd489A3tuA4pcA7vc6pk7Ulw0=; fh=NRBMlq7I4FOSiqMpzl/x/HS/rtWhboVwRmYZYCpmD2M=; b=sIjEPuQgXsWJBLkpPP/1TTeOtoa0N+HIwn22rNTmNfAIG8qe4mFnG3emQgbLqFFfRq pJwiaQXFrQAe59luAXxZ05fR9JC55VOoH2lZnmvrKagk7tODjMkkmJ93Xm6Cn81xn+TV cIMNJ9MlRuH3sFTUeyV2F77av1re9PI5Zok+n3zGncxhHAaFgHSvugNHPZFHQ7oFmiyN s49gA3WQLq5wjCYndG6g9xFebK8iqkBsJi3ksviJoaVGHniWEOmLuYAWe3+Jb8YCQJWV Dl5FMa9OSrhLU8L3E78DL/n19qCUyZy7Qzye0bZU4lJdz7y/P+XOz5t4BNWfxCu2pm7+ T1Rw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NeBzXDVH; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-wireless+bounces-4945-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4945-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f25-20020a05620a15b900b0078a100072d2si3321326qkk.3.2024.03.20.00.14.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 00:14:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4945-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NeBzXDVH; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-wireless+bounces-4945-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4945-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2B5A81C222C3 for ; Wed, 20 Mar 2024 07:14:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 12B122C697; Wed, 20 Mar 2024 07:14:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NeBzXDVH" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED17C2BAF2 for ; Wed, 20 Mar 2024 07:14:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710918863; cv=none; b=MT7vUNUv3269hkHFfYAfJl/TF95ns+LD4hGH19EqTcZnHtTnkRF6OOfY+q8ecdXJ0k2Lv6CVkD7C/ltZshz5ri5QqFCz1i3VAm+9YvE0x++sMafbwdkLT8YrbXKL3L6fuHeZwrT7S8xc5DfkNe7RQ4KrS7H1nE4UmwI0pyw6PQY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710918863; c=relaxed/simple; bh=XfD/MD9aJLdMuYQ9JNy1aV5uqn0V5yb4tqrj6uooTpg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Torb0mFvqcOQu3uvfWJQFqewjA16u51srQGS+GsLV938JZREzlEbkeUi56IciGTl5itdb/zoSsDS/bJVXAQbHE1FskLpPYXbXadVPhN+cKKQEugRZnuN2VNAvE6kQQEGCpGA99stwqAgP9F7zdIWbm8O0P8tAUqQmSxUz6cK5Hg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NeBzXDVH; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710918861; x=1742454861; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XfD/MD9aJLdMuYQ9JNy1aV5uqn0V5yb4tqrj6uooTpg=; b=NeBzXDVHe1seBTLhAoU3c1Eo3ZtQ+78+nKutKPNRDqfDcxu83iw/UHc9 lPGqdZ6XeTaukz30LGCMwMcUAiBbltf4eZ2Wp2UFslnT4k5wPGUVn++Fv vWa1+LhX94vS3LRzdvye0EDZtKjclUsr1gow2ThIxL4OT6Koexg+t76ei mQrUH6S/mWo8HrfXYyTOjwYf0K8gnhEICyqhxs3LGyKSaJvvCm//B4E7L WXvkac8uCLyvc4LiyC5zCvd2Y3xTwShtf5VRALc/mZ5lE/fL6kTBPSikA pE9yLtVfQXRrnRWq4lQsg5VOB/r6cDsJL4rckZM6+snjIVWTsdSnxPph3 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11018"; a="5763832" X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="5763832" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 00:14:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="14477403" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 00:14:19 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Ayala Beker Subject: [PATCH 3/8] wifi: mac80211: clarify IEEE80211_STATUS_SUBDATA_MASK Date: Wed, 20 Mar 2024 09:14:00 +0200 Message-Id: <20240320091155.28ac7b665039.I1abbb13e90f016cab552492e05f5cb5b52de6463@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320071405.815427-1-miriam.rachel.korenblit@intel.com> References: <20240320071405.815427-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited Content-Transfer-Encoding: 8bit From: Johannes Berg We have 13 bits for the status_data, so restricting type to 4 and subdata to 8 bits is confusing, even if we don't need more bits now. Change subdata mask to be 9 bits instead, just to make things match up. If we actually need more types or more subdata bits we can later also reshuffle the bits between these, but we should probably keep them at 13 bits together. Signed-off-by: Johannes Berg Reviewed-by: Ayala Beker Signed-off-by: Miri Korenblit --- net/mac80211/ht.c | 2 +- net/mac80211/ieee80211_i.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index c3330aea4da3..d7e8cf8e48b7 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c @@ -580,7 +580,7 @@ int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata, /* we'll do more on status of this frame */ info = IEEE80211_SKB_CB(skb); info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS; - /* we have 12 bits, and need 6: link_id 4, smps 2 */ + /* we have 13 bits, and need 6: link_id 4, smps 2 */ info->status_data = IEEE80211_STATUS_TYPE_SMPS | u16_encode_bits(status_link_id << 2 | smps, IEEE80211_STATUS_SUBDATA_MASK); diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index c2212363dad3..fe81ab641620 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -90,7 +90,7 @@ enum ieee80211_status_data { IEEE80211_STATUS_TYPE_INVALID = 0, IEEE80211_STATUS_TYPE_SMPS = 1, IEEE80211_STATUS_TYPE_NEG_TTLM = 2, - IEEE80211_STATUS_SUBDATA_MASK = 0xff0, + IEEE80211_STATUS_SUBDATA_MASK = 0x1ff0, }; static inline bool -- 2.34.1