From patchwork Mon Mar 18 16:53:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 781054 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 5241754BF1 for ; Mon, 18 Mar 2024 16:53:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710780829; cv=none; b=BP1jUlWCK5e013rJRBkFKIWFiN60DCwrY/bWo8eD/YF5n8yCcQn2yClaJ96Ed76NrPy0rI7jrP42rsnRFOx5fROq+SBWirgs8Ts0l4uNOxI0ppHn6U2/ipi/tyeyiUwPZ0a04R9SZ4s2k349KvxzRkwy3kLNXacfOHCKa4eHsq8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710780829; c=relaxed/simple; bh=3onFUZnNbcOkZTNuoeKtcvPha8NsDXZipwSyWwvwFT8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kGcFyqHLeSDiLz+/+AhInPYAkVTcRWszsv6yOqpq+rCfV1+B1Pz4vy5PAtZOwi7TlL+iFDTbWaLeRB6YyZaKk0zkbRh4WbL7qKCgEv7mckdtFKKob4iRrDqF6IcQ4m2WwGnuhGWGTYnErTUTrQLrlQZ0nw9YVDF4z6/prww473U= 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=JPTaVT6N; arc=none smtp.client-ip=192.198.163.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="JPTaVT6N" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710780827; x=1742316827; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3onFUZnNbcOkZTNuoeKtcvPha8NsDXZipwSyWwvwFT8=; b=JPTaVT6NkB/ExBaqJZ4Qj9ho64sIxC6jMI+sMqHjm756ImFfmAY+hMr5 uQHKgEshg8JJ7vWgO1mCM9kHeYETJCbDgyj9y9iRFm8TokRKRbRJllfRu 3TId2+E6XeI56zYUpjT10QyLS6dyUHpiIZnbnv1g2FI4yn3yeidLFV9SM YywYLf5oaJ4Wnr6jVXBuhJiL4k1B3YiCfmX9nePXWtuRrFRn5V3nSk1AV mthpqYih72PKAW9In5f/iay7sxd0qCb5h0kAH/UMktz9SSR+mxL1Rehk1 Z+dHcCy2hA3NX7y1jdqwqnql6/eYkZgi5dacegv14xCKVfHzsmgpZSgoP g==; X-IronPort-AV: E=McAfee;i="6600,9927,11017"; a="5819372" X-IronPort-AV: E=Sophos;i="6.07,134,1708416000"; d="scan'208";a="5819372" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2024 09:53:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,134,1708416000"; d="scan'208";a="13909746" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2024 09:53:46 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Ilan Peer Subject: [PATCH 02/15] wifi: ieee80211: fix ieee80211_mle_basic_sta_prof_size_ok() Date: Mon, 18 Mar 2024 18:53:18 +0200 Message-Id: <20240318184907.00bb0b20ed60.I8c41dd6fc14c4b187ab901dea15ade73c79fb98c@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240318165331.3170594-1-miriam.rachel.korenblit@intel.com> References: <20240318165331.3170594-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 From: Johannes Berg If there was a possibility of an MLE basic STA profile without subelements, we might reject it because we account for the one octet for sta_info_len twice (it's part of itself, and in the fixed portion). Like in ieee80211_mle_reconf_sta_prof_size_ok, subtract 1 to adjust that. When reading the elements we did take this into account, and since there are always elements, this never really mattered. Fixes: 7b6f08771bf6 ("wifi: ieee80211: Support validating ML station profile length") Signed-off-by: Johannes Berg Reviewed-by: Ilan Peer Signed-off-by: Miri Korenblit --- include/linux/ieee80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index a99f048404b8..4fd9735bb75e 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -5302,7 +5302,7 @@ static inline bool ieee80211_mle_basic_sta_prof_size_ok(const u8 *data, info_len += 1; return prof->sta_info_len >= info_len && - fixed + prof->sta_info_len <= len; + fixed + prof->sta_info_len - 1 <= len; } /** From patchwork Mon Mar 18 16:53:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 781053 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 EF57054FA4 for ; Mon, 18 Mar 2024 16:53:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710780833; cv=none; b=cHO0UqQWb7khDgR78azW9FJcbE8j6HqOaokqYNaiHQiWFVC2jRBnYpImDb+Pp4ZpGb6c5nPDqFxgUmJxoY2jhBoWUJ/szZVi9N+WIPeIfiq83klIaQ0WgZSeztyvijhv7texh/qOqgEIUhkheLLR4Fwgf9pIYwPFXo0uG1Kh7X4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710780833; c=relaxed/simple; bh=2+XOSAA3/2dmu4rimYG5Vy0Jx+I0tooRv+/7+e9me3g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Fd6Nva86lKafamgvDDM4yfgtM6VBpH4AOfPON79Xa5n3KW5uI6uY3p1qVnGmTx+JZkKiFwPfFhEbrSG19tIYVnFr99Gm89s6sCnMVfNCl3JrhJCoPWxxHhd+9SIsmMDTuDyZfZtYvE3P+ocuaO/dhQLpj6/uCBprfBy5zg7XueM= 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=CquGZVEx; arc=none smtp.client-ip=192.198.163.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="CquGZVEx" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710780832; x=1742316832; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2+XOSAA3/2dmu4rimYG5Vy0Jx+I0tooRv+/7+e9me3g=; b=CquGZVEx7MZQJulFm9RCsi0hiCBNWF47Sqyw3DyNHNJOTS6ICW/QqPp3 bgEwDX7713PT+deoXCt2E7wx6+GUNtmtT2roiIzv/C+Ut7O8Bx6p96fSf J+vhwXN61L16RlWfsE3ZDLBTWb/SL3LjlW88jL0YcvmYtwH8rt8TVoipZ iLOQQ9z2Ff83XuCMnnjg83YtAkEia3Mu+ipdNlDHINopdsIM0QOF9UH3i WuIcsyvhUdfgo1uFEojl2M/yrpRq8ao2yHNuJXNJmPY+80pCAZe9fI30E diqjvyyhb80t1LD4CywrqPt+82OE+NP5APA3gBKgNG+Ajtud7l/J4W9Na Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11017"; a="5819388" X-IronPort-AV: E=Sophos;i="6.07,134,1708416000"; d="scan'208";a="5819388" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2024 09:53:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,134,1708416000"; d="scan'208";a="13909782" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2024 09:53:51 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 04/15] wifi: mac80211: clarify the dormant/suspended links docs Date: Mon, 18 Mar 2024 18:53:20 +0200 Message-Id: <20240318184907.a5b24595b1a2.I92dd7d177b25df189b842d3bcddb1f2b13b1de13@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240318165331.3170594-1-miriam.rachel.korenblit@intel.com> References: <20240318165331.3170594-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 From: Johannes Berg Since I keep getting confused about this and asking about it, update the documentation. In the future, especially when we add more reasons for a link to be disabled, we should add a per-link 'disable state' bitmap instead of maintaining all these bitmaps with subset logic, to indicate each of the different states separately. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- include/net/mac80211.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 353488ab94a2..47fa73a62f8a 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -1921,10 +1921,12 @@ enum ieee80211_neg_ttlm_res { * @active_links: The bitmap of active links, or 0 for non-MLO. * The driver shouldn't change this directly, but use the * API calls meant for that purpose. - * @dormant_links: bitmap of valid but disabled links, or 0 for non-MLO. - * Must be a subset of valid_links. + * @dormant_links: subset of the valid links that are disabled/suspended + * due to advertised or negotiated TTLM respectively. + * 0 for non-MLO. * @suspended_links: subset of dormant_links representing links that are - * suspended. + * suspended due to negotiated TTLM, and could be activated in the + * future by tearing down the TTLM negotiation. * 0 for non-MLO. * @neg_ttlm: negotiated TID to link mapping info. * see &struct ieee80211_neg_ttlm. From patchwork Mon Mar 18 16:53:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 781052 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 7FCA655784 for ; Mon, 18 Mar 2024 16:53:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710780839; cv=none; b=c0AScjeTeLszNPzob3hdSMASAPDAnSJV7rrDyIMTcNHUu/OgNIam+m8cFsveb97I7dF0lDUZ7efkJbGGi9Ul5Qt/yEGDfO7EmjATfPOR4QBatnmc2vyM2P8oenFT7ms/NIQFuQxRvwd+99+aVy5YRzNpHAN+jACUF4NlpvCPrD8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710780839; c=relaxed/simple; bh=871JndVF66Ox22Baul085PLG5nnkJMtkTPaXhoL7zDA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=HTCJZdymGEvpLwiIs49kGPB4SZGOGDKQNXuQ9gSW4no9EYOvANUv8jrnSpD8ki2EdO+kuG+S+nr32yxON4NRjqEv1MR53Orb4CfMYO4ChexTZjY+cE9GLEAkylVbqLEgTmFpP65CU+ifc88qCsM7EVu2orysYrFdBAeXjBatJcY= 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=F6xSIRuw; arc=none smtp.client-ip=192.198.163.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="F6xSIRuw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710780838; x=1742316838; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=871JndVF66Ox22Baul085PLG5nnkJMtkTPaXhoL7zDA=; b=F6xSIRuwkCLO4zACZ+duUm6VJmkpzovHBSO/Bgkfcynkbqnny/Pl332i +ksTXQGm0edWJls4z6bIMv3w+BSLcGDTm8Tf+nA/NKeipIv/oaSMb1oHq kjXkMq1678BY2J+vLBFLhoePAwO+DlD83iXmtarnZkQgEXcr02aZzcWOo FK3pQTp+hnk5xT/bokXiUUKe1DbbpC6bxK8GNqq/8FrPr2rzLQbZXP5s/ 3LACxC5Ztq8WC5llqRjlVqY3pHFPZB55p6aRnaJK+YH6f+EC3eAnHOCwj /u8XrC2EOXF5GllN2ZMAlwbopdOJmN71I46Y6N52on3XVOTULV+/ZZzl4 w==; X-IronPort-AV: E=McAfee;i="6600,9927,11017"; a="5819406" X-IronPort-AV: E=Sophos;i="6.07,134,1708416000"; d="scan'208";a="5819406" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2024 09:53:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,134,1708416000"; d="scan'208";a="13909831" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2024 09:53:55 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ayala Beker , Johannes Berg , Ilan Peer Subject: [PATCH 06/15] wifi: mac80211: correctly set active links upon TTLM Date: Mon, 18 Mar 2024 18:53:22 +0200 Message-Id: <20240318184907.acddbbf39584.Ide858f95248fcb3e483c97fcaa14b0cd4e964b10@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240318165331.3170594-1-miriam.rachel.korenblit@intel.com> References: <20240318165331.3170594-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 From: Ayala Beker Fix ieee80211_ttlm_set_links() to not set all active links, but instead let the driver know that valid links status changed and select the active links properly. Fixes: 8f500fbc6c65 ("wifi: mac80211: process and save negotiated TID to Link mapping request") Signed-off-by: Ayala Beker Reviewed-by: Johannes Berg Reviewed-by: Ilan Peer Signed-off-by: Miri Korenblit --- net/mac80211/mlme.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 47a2cba8313f..30cba84e7053 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -5874,6 +5874,15 @@ static int ieee80211_ttlm_set_links(struct ieee80211_sub_if_data *sdata, } if (sdata->vif.active_links != active_links) { + /* usable links are affected when active_links are changed, + * so notify the driver about the status change + */ + changed |= BSS_CHANGED_MLD_VALID_LINKS; + active_links &= sdata->vif.active_links; + if (!active_links) + active_links = + BIT(__ffs(sdata->vif.valid_links & + ~dormant_links)); ret = ieee80211_set_active_links(&sdata->vif, active_links); if (ret) { sdata_info(sdata, "Failed to set TTLM active links\n"); @@ -5888,7 +5897,6 @@ static int ieee80211_ttlm_set_links(struct ieee80211_sub_if_data *sdata, goto out; } - changed |= BSS_CHANGED_MLD_VALID_LINKS; sdata->vif.suspended_links = suspended_links; if (sdata->vif.suspended_links) changed |= BSS_CHANGED_MLD_TTLM; From patchwork Mon Mar 18 16:53:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 781051 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 06D2C55C06 for ; Mon, 18 Mar 2024 16:54:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710780843; cv=none; b=Q7NDX2kUCjXXzyPXwfLebvs/hqjG9VlUyX+P/XPtMvjrWCiZsEEfXM+mPhndNaBabT8Nnwxys3OslaIvaGx1CaMbRxWnu3ceuJeNODYIWQtBS0DVzXr6ZfJBQZZt/ojBDRSRGI9bPEGUvBKcoNulkBPdbMCbOi0Gco2uduVl9ro= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710780843; c=relaxed/simple; bh=6fLWjM6GV1ndCKdjsQVlUtUxMeWVQxlH7pwnSZ6u8Z8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uX/zt1H6mUZk60cwv59bMjirPWE5Nzfn5A3tTlLiYNU/88x5sHDfc5zM2TKDfodRwYZidNEDmMLvGKfUKaK0NP1Xyozxl4X0PmWAKkqIg25Td0L+NFOyqg2bERv/VOBDIbMVS0Dc0cez/zN/W2ePev8+DJhXOL4sNQ87hfCLZPY= 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=R20yC2bW; arc=none smtp.client-ip=192.198.163.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="R20yC2bW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710780842; x=1742316842; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6fLWjM6GV1ndCKdjsQVlUtUxMeWVQxlH7pwnSZ6u8Z8=; b=R20yC2bWReV3BsAk1Clqx+O83kqhKNEZfw30fTVUrRxsDFjKZk04clhA 6FzxImWlnCEa/5/nq1HvCzhJRqhrNxI6etSpRh16Og1yr+zQ65M8/UK/L SuIYguOoi2ZtrJ9ijPC+mwNoT6z9dG+AG8b5vB4tfsEuBc7F7Fz4ihXNT wyggzJwqJ6N5YYBeGBwHYOknJ2eAnJTmOgxgvMh+o4233fjcqlOxI+wv7 xbxvAH2pIPLaZYs+3UwIBytXZuOJBzDMKJlbktWY7ICzih11F8e6G75+M 2v+RU4P1FvqzZ8YgBUH76vKVHLGWso/g6R2COH9aRWQBifaZK4H3iKQp3 g==; X-IronPort-AV: E=McAfee;i="6600,9927,11017"; a="5819423" X-IronPort-AV: E=Sophos;i="6.07,134,1708416000"; d="scan'208";a="5819423" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2024 09:54:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,134,1708416000"; d="scan'208";a="13909863" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2024 09:54:00 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Anjaneyulu Subject: [PATCH 08/15] wifi: cfg80211: handle indoor AFC/LPI AP in probe response and beacon Date: Mon, 18 Mar 2024 18:53:24 +0200 Message-Id: <20240318184907.091cfaaa5f45.I23cfa1104a16fd4eb9751b3d0d7b158db4ff3ecd@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240318165331.3170594-1-miriam.rachel.korenblit@intel.com> References: <20240318165331.3170594-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 From: Anjaneyulu Mark Indoor LPI and Indoor AFC power types as valid based on channel flags. While on it, added default case. Signed-off-by: Anjaneyulu Signed-off-by: Miri Korenblit --- net/wireless/scan.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 5a5dd3ce497f..b55ffe73e1ef 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -2140,11 +2140,15 @@ static bool cfg80211_6ghz_power_type_valid(const u8 *ie, size_t ielen, switch (u8_get_bits(he_6ghz_oper->control, IEEE80211_HE_6GHZ_OPER_CTRL_REG_INFO)) { case IEEE80211_6GHZ_CTRL_REG_LPI_AP: + case IEEE80211_6GHZ_CTRL_REG_INDOOR_LPI_AP: return true; case IEEE80211_6GHZ_CTRL_REG_SP_AP: + case IEEE80211_6GHZ_CTRL_REG_INDOOR_SP_AP: return !(flags & IEEE80211_CHAN_NO_6GHZ_AFC_CLIENT); case IEEE80211_6GHZ_CTRL_REG_VLP_AP: return !(flags & IEEE80211_CHAN_NO_6GHZ_VLP_CLIENT); + default: + return false; } } return false; From patchwork Mon Mar 18 16:53:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 781050 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 4825655C0E for ; Mon, 18 Mar 2024 16:54:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710780847; cv=none; b=O9WCXzt2ur5PekKwvMBc8H+g2TXeo40QlBVdYfS+nTtwjtbtQ3G1Ew1ShUrWExIykAdQpP7ioht/Hh+Pjn0KMzNjfHomHx1KckLqMQddGb/xU2RGdbECEHsksmyj5rK1iv7kyLAyfdw81fye27VzbiXT+UaFkB5GoavOz6i+ljk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710780847; c=relaxed/simple; bh=9mKzi/KlUctikmemDUwh4CbXuzghf8ptUFFFioOwJ+o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jj/s8rr5GOWIa9zg2UUwtD9oXsPmnJ2zFpoR9p54XKwYu1UVEw/wD9hFr19nA3UgBo1TR1msxx5ISqeMcW5orbvx+ouSKNjVWSXeODzph4XwEM0SL2WJS4/GZ5CciBVOGNNKGt2qmDHOHhYUqkj6/7SDdBSrERGehU5QdhcgAVQ= 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=hX7rCKvZ; arc=none smtp.client-ip=192.198.163.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="hX7rCKvZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710780846; x=1742316846; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9mKzi/KlUctikmemDUwh4CbXuzghf8ptUFFFioOwJ+o=; b=hX7rCKvZSCED0JMSerD9tH/MEzf/Fj1KlKrwrSpFrn4NpUZUi4TjT0Vi 9RsYssQ8g+YMg/oeJo3b0Z9T9gxuQ2XidYpz1L6h1WTazspau7QVCR2ET e0/+KOUBuVdSEjgQAOqSZpf52lOFrGyY3brlnd3EwrUYq+TToHUHotI6p PzreorfxPB/1qJgM/7uUn9UDBShavAf45M4uEvY8rbbuXh5jZlTxfaCIF R47IZYZWkeFy40NIk0Zn1MruqRrU+O186ahDuaF5SMh1zXf7zuFfVt1e2 mVdUlErdgvwdDtBRKVc/k05LWLnF5NPbJRKVLT0Ev+QRW2/jJ9JfWHyRL g==; X-IronPort-AV: E=McAfee;i="6600,9927,11017"; a="5819432" X-IronPort-AV: E=Sophos;i="6.07,134,1708416000"; d="scan'208";a="5819432" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2024 09:54:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,134,1708416000"; d="scan'208";a="13909888" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2024 09:54:05 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 10/15] wifi: mac80211: parse puncturing bitmap in 6 GHz Date: Mon, 18 Mar 2024 18:53:26 +0200 Message-Id: <20240318184907.e74b88ee45af.Id0dca4624127fa8f8e8aba1dcf9890b6327a3795@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240318165331.3170594-1-miriam.rachel.korenblit@intel.com> References: <20240318165331.3170594-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 From: Johannes Berg In ieee80211_chandef_he_6ghz_oper(), the HE/EHT information for the 6 GHz channel is parsed, but ieee80211_chandef_eht_oper() calls must be paired with extracting the puncturing bitmap. Fix this. Fixes: b82730bf57b5 ("wifi: cfg80211/mac80211: move puncturing into chandef") Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- net/mac80211/util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mac80211/util.c b/net/mac80211/util.c index a237cbcf7b49..a5d5e05688b4 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -3136,6 +3136,8 @@ bool ieee80211_chandef_he_6ghz_oper(struct ieee80211_local *local, } else { ieee80211_chandef_eht_oper((const void *)eht_oper->optional, &he_chandef); + he_chandef.punctured = + ieee80211_eht_oper_dis_subchan_bitmap(eht_oper); } if (!cfg80211_chandef_valid(&he_chandef)) From patchwork Mon Mar 18 16:53:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 781049 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 12E7855E5F for ; Mon, 18 Mar 2024 16:54:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710780852; cv=none; b=Cyqlf7xy1SBXGwaCjRM8/YyU7XaYqU3qtF//AlEGG5JJlI9YP3NSNbtNDquNAYlVOD3rPG2KyhKwXbajFRIROBk+6jgtMsPfZx87aVi7chI4rOVW9p/e9Ptn1vJnt8QB+d/QWldPDmVA9k6um8+7J/B2moAF/68DMRyW+3INzFw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710780852; c=relaxed/simple; bh=Pi7hUuORqtdkvAdIYbr2eOr7xAenqmjs+iF3qobsm/0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GmyzdoaWKC5ZQKv2mlWpaMhjAtvER6TNQ1OrjhVkR1LWncHkOyC7euLPdNcuYUc13CRsUV0+8i6zyJJda4e768T0E1IECqFLM8Lze3De4ttDL7VSJ4Is21B5kvq77h5tkzSOtK467JK8L8yYlEUuL5MuIqy/9D0l6/wpccrQH4o= 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=oEqi6Dyw; arc=none smtp.client-ip=192.198.163.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="oEqi6Dyw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710780851; x=1742316851; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Pi7hUuORqtdkvAdIYbr2eOr7xAenqmjs+iF3qobsm/0=; b=oEqi6Dyw+n+Qwv6pBjNekpZPcDoH39GS4sWkcrRmC/RJ0jh2QeuKTa+g B4mavoBmiPF7uui382v5CbklfQ/jshLcTzlXswjdEBIJrrLUour7BE+wq 4eH/+qnqvmxhRiUDuMwNLsIVreJ4a0Dfof18uN3uqhhht4N3BnSf7BSHk FBFE/0gnRRpIp3NLLgRhPiS3pF4h2v01E4rSLZH+AR5baTVivgUiR8p3X cd+rzWY+QMz9PHVQrEseBR2SWC3X3/BcVLAqze68w89DOC4AZLhLKGEW/ pJOcJTGMkIk60e35TsFH/HLmRjltTv091/g6z3CrjRQhtuSHhGcm+bRKG g==; X-IronPort-AV: E=McAfee;i="6600,9927,11017"; a="5819465" X-IronPort-AV: E=Sophos;i="6.07,134,1708416000"; d="scan'208";a="5819465" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2024 09:54:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,134,1708416000"; d="scan'208";a="13909927" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2024 09:54:09 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg , Johannes Berg Subject: [PATCH 12/15] wifi: cfg80211: check BSSID Index against MaxBSSID Date: Mon, 18 Mar 2024 18:53:28 +0200 Message-Id: <20240318184907.a7574d415adc.I02f40c2920a9f602898190679cc27d0c8ee2c67d@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240318165331.3170594-1-miriam.rachel.korenblit@intel.com> References: <20240318165331.3170594-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 From: Benjamin Berg Add a verification that the BSSID Index does not exceed the maximum number of BSSIDs in the Multiple-BSSID set. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit --- net/wireless/scan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/wireless/scan.c b/net/wireless/scan.c index b55ffe73e1ef..8ac2d19d8ede 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -2447,7 +2447,8 @@ cfg80211_parse_mbssid_data(struct wiphy *wiphy, profile, profile_len); if (!mbssid_index_ie || mbssid_index_ie[1] < 1 || mbssid_index_ie[2] == 0 || - mbssid_index_ie[2] > 46) { + mbssid_index_ie[2] > 46 || + mbssid_index_ie[2] >= (1 << elem->data[0])) { /* No valid Multiple BSSID-Index element */ continue; } From patchwork Mon Mar 18 16:53:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 781048 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 81FC555E77 for ; Mon, 18 Mar 2024 16:54:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710780857; cv=none; b=JdHjKhVpn3HWDyDMtQb+DVUUHAQVN1jHOSkHKuPP9GDTLizVnMjXe7/U8mpV6Iqmrx6mijvDOC8ZfuHfRoQz7HxTjCoPKt0zhgKsxD5auHD3VsUPwODaQ0kZ1FdMRVjjNOOSc5t3kzoxt9RMc+6Rx1jJBGvArSDtcb7En6h0Bso= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710780857; c=relaxed/simple; bh=y/ECBVb8eLLCzg5a3fwN3z8CRdKZ0eQJi/uGZAFFxTc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Nzbj9TSxFAPHmdc4P8ZPtn5TZMhTBEqcIX3rwb74sL0DbCJ5VBArSEAU+HfmgHHxCDQS0N1qxx8RfkMY+rub6uOzyoYwvyvkMp0WJG8onax9ytzKZxlcSfFdq75u3nD30IAXFSMnZztWI+NyuMS7dcTwep8NZKqAgGEdCyn2x3g= 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=X1Yh8ISl; arc=none smtp.client-ip=192.198.163.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="X1Yh8ISl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710780856; x=1742316856; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=y/ECBVb8eLLCzg5a3fwN3z8CRdKZ0eQJi/uGZAFFxTc=; b=X1Yh8ISlUK/AFBUcn9Yh1FXAqB3G6lIHssdoPP25dH7uPcdr71Sa5xnK amWVifMUq6ySIijlUZSryCZN/pCBt9JCNsOWZA669dWMPSSvo0V+rGk/p FxA4Qr4R5U/vwc9pw6Kb0HuEiipwpMOt4/jZVqCocSTfGf+NSkvoXOdxk 3iYoL1UJCqXKRONoatdDnjpxy8KhlUIgVxivSPMC8vViBejc5TS1cbmhy Vye0I0yvYIPK7ZHJSc5dImhus61Hotl1W6RTBc1gqejzbbMkmfun/Uupo IM5rnqtpqg8pv13iiu8OM5YhUfD0Jz3g6oQutHdeTERJD42BRdPXpRjfk w==; X-IronPort-AV: E=McAfee;i="6600,9927,11017"; a="5819482" X-IronPort-AV: E=Sophos;i="6.07,134,1708416000"; d="scan'208";a="5819482" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2024 09:54:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,134,1708416000"; d="scan'208";a="13909946" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2024 09:54:14 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 14/15] wifi: mac80211: fix prep_connection error path Date: Mon, 18 Mar 2024 18:53:30 +0200 Message-Id: <20240318184907.2780c1f08c3d.I033c9b15483933088f32a2c0789612a33dd33d82@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240318165331.3170594-1-miriam.rachel.korenblit@intel.com> References: <20240318165331.3170594-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 From: Johannes Berg If prep_channel fails in prep_connection, the code releases the deflink's chanctx, which is wrong since we may be using a different link. It's already wrong to even do that always though, since we might still have the station. Remove it only if prep_channel succeeded and later updates fail. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- net/mac80211/mlme.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 2434023317e9..082fe2bf14fd 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -7666,7 +7666,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, sdata_info(sdata, "failed to insert STA entry for the AP (error %d)\n", err); - goto out_err; + goto out_release_chan; } } else WARN_ON_ONCE(!ether_addr_equal(link->u.mgd.bssid, cbss->bssid)); @@ -7677,8 +7677,9 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, return 0; +out_release_chan: + ieee80211_link_release_channel(link); out_err: - ieee80211_link_release_channel(&sdata->deflink); ieee80211_vif_set_links(sdata, 0, 0); return err; }