From patchwork Sun Jun 11 09:14:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Greenman, Gregory" X-Patchwork-Id: 691619 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F9F2C7EE23 for ; Sun, 11 Jun 2023 09:15:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233296AbjFKJO5 (ORCPT ); Sun, 11 Jun 2023 05:14:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231984AbjFKJOq (ORCPT ); Sun, 11 Jun 2023 05:14:46 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11BE5193 for ; Sun, 11 Jun 2023 02:14:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686474884; x=1718010884; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RJuoJh2TcfX39MFCErjj5fvCceVT1KoTF7WcioLJ3t8=; b=GlRvOr32AaevG+TgIH44WR9gfGfZYOpEk+LNDAB64ZtHdTUdksvHeVtm ikd3aLLy3NX0mr5y6TtZnlgHg/62fR7SS7ELNpHtUzqTqyp65jg3pcFUs S99zGOuETQp0ZuehxC/Ebd88NznwgvhobGM6lcCiTxnNnHFdViuCPRsF0 WPXWSWCjerQ6o3E/gFNIwZjbDz3S7HtHANX+msKBQ1AXru3KEGJLrL1nR vSReKeKFkX86F5xZCwoNTv0aP4FsGSFVg0Uyon7A9Xh7fP0xSV8Nl/vYY 9WBS49pQpuAA1w0jcBC4vkTwF9fvR5Tuo5/V6gDQvnXVEcseBFbGAa7Gi g==; X-IronPort-AV: E=McAfee;i="6600,9927,10737"; a="347488932" X-IronPort-AV: E=Sophos;i="6.00,234,1681196400"; d="scan'208";a="347488932" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2023 02:14:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10737"; a="688249735" X-IronPort-AV: E=Sophos;i="6.00,234,1681196400"; d="scan'208";a="688249735" Received: from rganonx-mobl1.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.222.121]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2023 02:14:42 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ilan Peer , Gregory Greenman Subject: [PATCH 1/4] wifi: mac80211: Add debugfs entry to report dormant links Date: Sun, 11 Jun 2023 12:14:26 +0300 Message-Id: <20230611121219.7fa5f022adfb.Iff6fa3e1a3b00ae726612f9d5a31f7fe2fcbfc68@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230611091429.24517-1-gregory.greenman@intel.com> References: <20230611091429.24517-1-gregory.greenman@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ilan Peer Add debugfs entry to report dormant (valid but disabled) links. Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman --- net/mac80211/debugfs_netdev.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index 3fea86c9a276..6253d0127207 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c @@ -693,6 +693,19 @@ IEEE80211_IF_FILE(dot11MeshConnectedToAuthServer, debugfs_create_file(#name, mode, sdata->vif.debugfs_dir, \ sdata, &name##_ops) +#define DEBUGFS_ADD_X(_bits, _name, _mode) \ + debugfs_create_x##_bits(#_name, _mode, sdata->vif.debugfs_dir, \ + &sdata->vif._name) + +#define DEBUGFS_ADD_X8(_name, _mode) \ + DEBUGFS_ADD_X(8, _name, _mode) + +#define DEBUGFS_ADD_X16(_name, _mode) \ + DEBUGFS_ADD_X(16, _name, _mode) + +#define DEBUGFS_ADD_X32(_name, _mode) \ + DEBUGFS_ADD_X(32, _name, _mode) + #define DEBUGFS_ADD(name) DEBUGFS_ADD_MODE(name, 0400) static void add_common_files(struct ieee80211_sub_if_data *sdata) @@ -722,6 +735,7 @@ static void add_sta_files(struct ieee80211_sub_if_data *sdata) DEBUGFS_ADD_MODE(tdls_wider_bw, 0600); DEBUGFS_ADD_MODE(valid_links, 0200); DEBUGFS_ADD_MODE(active_links, 0600); + DEBUGFS_ADD_X16(dormant_links, 0400); } static void add_ap_files(struct ieee80211_sub_if_data *sdata) From patchwork Sun Jun 11 09:14:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Greenman, Gregory" X-Patchwork-Id: 691951 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E09FC77B7A for ; Sun, 11 Jun 2023 09:15:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233568AbjFKJO6 (ORCPT ); Sun, 11 Jun 2023 05:14:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232871AbjFKJOr (ORCPT ); Sun, 11 Jun 2023 05:14:47 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B905F173B for ; Sun, 11 Jun 2023 02:14:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686474886; x=1718010886; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tCrltpD/DlpZPpsEoKm+r8MLURR8tz5E3GndKl1iBzU=; b=X0rLcsN33LmFkLzwy3L3y9faWj1c/jKh3HoJnK5QmyYhiEHskSjFhQQO qCSWYHU7f9ypnE2vLuZ3lOq0/ujzRWjb2UglCVIGvSCb7LbPe0ETdVWuW D45AZDLWfeioXxbtwUz19BqoCP8FDoidg3jXuOLuxmKYb/QT03pkGsStf jUm2i+A8B6yzIro3M9cINXtgRhMuLOmQkBJm7xzhF1ZoUnaZLED/HE0sU qfWnZa/cwYIMJ3oJgVL/6HFoDGZUlXP07ij2cvKSCXkk9jlUS0XBKH/+0 nUDYvysMV2FGXPENt15NOFwZl32sxdNYGwkGGFg9A3uwEKtXSrx5Fbx4i w==; X-IronPort-AV: E=McAfee;i="6600,9927,10737"; a="347488938" X-IronPort-AV: E=Sophos;i="6.00,234,1681196400"; d="scan'208";a="347488938" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2023 02:14:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10737"; a="688249741" X-IronPort-AV: E=Sophos;i="6.00,234,1681196400"; d="scan'208";a="688249741" Received: from rganonx-mobl1.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.222.121]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2023 02:14:44 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ilan Peer , Gregory Greenman Subject: [PATCH 2/4] wifi: mac80211: Do not use "non-MLD AP" syntax Date: Sun, 11 Jun 2023 12:14:27 +0300 Message-Id: <20230611121219.77236a2e26ad.I8193ca8e236c9eb015870471f77a7d5134da3156@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230611091429.24517-1-gregory.greenman@intel.com> References: <20230611091429.24517-1-gregory.greenman@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ilan Peer Instead clarify the cases where link ID == 0 is intended for an AP STA that is not part of an AP MLD. Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman --- include/net/mac80211.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index b5704ef4308f..914448cb0ecf 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -5282,7 +5282,8 @@ struct ieee80211_mutable_offsets { * @vif: &struct ieee80211_vif pointer from the add_interface callback. * @offs: &struct ieee80211_mutable_offsets pointer to struct that will * receive the offsets that may be updated by the driver. - * @link_id: the link id to which the beacon belongs (or 0 for a non-MLD AP) + * @link_id: the link id to which the beacon belongs (or 0 for an AP STA + * that is not associated with AP MLD). * * If the driver implements beaconing modes, it must use this function to * obtain the beacon template. @@ -5379,7 +5380,8 @@ void ieee80211_beacon_free_ema_list(struct ieee80211_ema_beacons *ema_beacons); * @tim_length: pointer to variable that will receive the TIM IE length, * (including the ID and length bytes!). * Set to 0 if invalid (in non-AP modes). - * @link_id: the link id to which the beacon belongs (or 0 for a non-MLD AP) + * @link_id: the link id to which the beacon belongs (or 0 for an AP STA + * that is not associated with AP MLD). * * If the driver implements beaconing modes, it must use this function to * obtain the beacon frame. @@ -5402,7 +5404,8 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, * ieee80211_beacon_get - beacon generation function * @hw: pointer obtained from ieee80211_alloc_hw(). * @vif: &struct ieee80211_vif pointer from the add_interface callback. - * @link_id: the link id to which the beacon belongs (or 0 for a non-MLD AP) + * @link_id: the link id to which the beacon belongs (or 0 for an AP STA + * that is not associated with AP MLD). * * See ieee80211_beacon_get_tim(). * From patchwork Sun Jun 11 09:14:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Greenman, Gregory" X-Patchwork-Id: 691618 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E490C7EE37 for ; Sun, 11 Jun 2023 09:15:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233569AbjFKJPA (ORCPT ); Sun, 11 Jun 2023 05:15:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233345AbjFKJOt (ORCPT ); Sun, 11 Jun 2023 05:14:49 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 119EF193 for ; Sun, 11 Jun 2023 02:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686474889; x=1718010889; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eianGgCkBSQzE52ZAXpW4mlh7j7aKdF1SenvLZWSur8=; b=k0UyngctaJrMvLBtuOsLLnqagcNhu64bzzyQP5BzKYLtdG7S8kFv7Jin hP7jbSc2spgjke4XTh7krfqCZRaqelIfw7FCs8JHyUN+B+0gv+ZQYsbaY Z7tR1LQsDBMRnwQ2/w6bkpUnGKY5yHN/FlRr4aJ7wWDiEnkHRqPKrMWaw gEn+FZNt2XeQ0PR4llNSgAGKe3Ho6tlZybCdgHSy81HN1Z5Jq3mhqZIFI oO/viAiI8rzHPff2EPOgFAq1BM0WPdwTHKqFBGBeCBvciJqG9PlfK0cjB 04kfToSGWGNwPPQGeOPJ7R4pvJOnH2ZFkdS7kKM59w7jPcOKg24OIjwSa A==; X-IronPort-AV: E=McAfee;i="6600,9927,10737"; a="347488940" X-IronPort-AV: E=Sophos;i="6.00,234,1681196400"; d="scan'208";a="347488940" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2023 02:14:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10737"; a="688249747" X-IronPort-AV: E=Sophos;i="6.00,234,1681196400"; d="scan'208";a="688249747" Received: from rganonx-mobl1.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.222.121]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2023 02:14:47 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ilan Peer , Gregory Greenman Subject: [PATCH 3/4] wifi: mac80211: Fix permissions for valid_links debugfs entry Date: Sun, 11 Jun 2023 12:14:28 +0300 Message-Id: <20230611121219.c75316990411.I1565a7fcba8a37f83efffb0cc6b71c572b896e94@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230611091429.24517-1-gregory.greenman@intel.com> References: <20230611091429.24517-1-gregory.greenman@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ilan Peer The entry should be a read only one and not a write only one. Fix it. While at it, change the code to use debugs_create_x16(). Fixes: 3d9011029227 ("wifi: mac80211: implement link switching") Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman --- net/mac80211/debugfs_netdev.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index 6253d0127207..b45a45df062b 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c @@ -598,13 +598,6 @@ static ssize_t ieee80211_if_parse_tsf( } IEEE80211_IF_FILE_RW(tsf); -static ssize_t ieee80211_if_fmt_valid_links(const struct ieee80211_sub_if_data *sdata, - char *buf, int buflen) -{ - return snprintf(buf, buflen, "0x%x\n", sdata->vif.valid_links); -} -IEEE80211_IF_FILE_R(valid_links); - static ssize_t ieee80211_if_fmt_active_links(const struct ieee80211_sub_if_data *sdata, char *buf, int buflen) { @@ -733,7 +726,7 @@ static void add_sta_files(struct ieee80211_sub_if_data *sdata) DEBUGFS_ADD_MODE(uapsd_queues, 0600); DEBUGFS_ADD_MODE(uapsd_max_sp_len, 0600); DEBUGFS_ADD_MODE(tdls_wider_bw, 0600); - DEBUGFS_ADD_MODE(valid_links, 0200); + DEBUGFS_ADD_X16(valid_links, 0400); DEBUGFS_ADD_MODE(active_links, 0600); DEBUGFS_ADD_X16(dormant_links, 0400); } From patchwork Sun Jun 11 09:14:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Greenman, Gregory" X-Patchwork-Id: 691950 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E16BC7EE45 for ; Sun, 11 Jun 2023 09:15:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233581AbjFKJPB (ORCPT ); Sun, 11 Jun 2023 05:15:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233530AbjFKJOw (ORCPT ); Sun, 11 Jun 2023 05:14:52 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6889B173B for ; Sun, 11 Jun 2023 02:14:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686474891; x=1718010891; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=l1AJCMFaqPP3njOut+AdPOVV5yyBnGLxJE/AsJNI7aM=; b=fFW3ZyzhyKNnCfP8mrKhsrhPhYLISUdx0kg50zZEe0IhTo1akp6Z9PXD sx7m8sMOzz45uuvaSwCga6AVlt10cI8ysMHH2NHWJGQCekAEFoPAqo2/M nxAgnqjzR4mctGPEohCU0bX81vjqXbS50ZoVHpB/p5iXWsGPOPXqoj2+2 pMJ/wjZpG9yB6Y4JxG7iyvZbZ0UCUtUT6opTZenglkbyWz4+W6uicAcJI 304Ajlzw+avNujmLjhp4sEzBc4s38w4rOaacogMLwHwomb3Y4162/SlGj +nCt0KIcp/9cQKZkWIy7a55nqkWxyuElUbV/j4+nXaFUxVj9QdMQNRMUk Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10737"; a="347488944" X-IronPort-AV: E=Sophos;i="6.00,234,1681196400"; d="scan'208";a="347488944" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2023 02:14:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10737"; a="688249753" X-IronPort-AV: E=Sophos;i="6.00,234,1681196400"; d="scan'208";a="688249753" Received: from rganonx-mobl1.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.222.121]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2023 02:14:49 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg , Gregory Greenman Subject: [PATCH 4/4] wifi: mac80211: fragment per STA profile correctly Date: Sun, 11 Jun 2023 12:14:29 +0300 Message-Id: <20230611121219.9b5c793d904b.I7dad952bea8e555e2f3139fbd415d0cd2b3a08c3@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230611091429.24517-1-gregory.greenman@intel.com> References: <20230611091429.24517-1-gregory.greenman@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Benjamin Berg When fragmenting the ML per STA profile, the element ID should be IEEE80211_MLE_SUBELEM_PER_STA_PROFILE rather than WLAN_EID_FRAGMENT. Change the helper function to take the to be used element ID and pass the appropriate value for each of the fragmentation levels. Fixes: 81151ce462e5 ("wifi: mac80211: support MLO authentication/association with one link") Signed-off-by: Benjamin Berg Signed-off-by: Gregory Greenman --- net/mac80211/ieee80211_i.h | 2 +- net/mac80211/mlme.c | 5 +++-- net/mac80211/util.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 561a2980f92f..4afd5095366c 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -2317,7 +2317,7 @@ ieee802_11_parse_elems(const u8 *start, size_t len, bool action, return ieee802_11_parse_elems_crc(start, len, action, 0, 0, bss); } -void ieee80211_fragment_element(struct sk_buff *skb, u8 *len_pos); +void ieee80211_fragment_element(struct sk_buff *skb, u8 *len_pos, u8 frag_id); extern const int ieee802_1d_to_ac[8]; diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 6970d5e7ac8f..738822b82d3e 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1367,10 +1367,11 @@ static void ieee80211_assoc_add_ml_elem(struct ieee80211_sub_if_data *sdata, ieee80211_add_non_inheritance_elem(skb, outer_present_elems, link_present_elems); - ieee80211_fragment_element(skb, subelem_len); + ieee80211_fragment_element(skb, subelem_len, + IEEE80211_MLE_SUBELEM_FRAGMENT); } - ieee80211_fragment_element(skb, ml_elem_len); + ieee80211_fragment_element(skb, ml_elem_len, WLAN_EID_FRAGMENT); } static int ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 3aa363bdb6e0..2fc07717bcad 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -5128,7 +5128,7 @@ u8 *ieee80211_ie_build_eht_cap(u8 *pos, return pos; } -void ieee80211_fragment_element(struct sk_buff *skb, u8 *len_pos) +void ieee80211_fragment_element(struct sk_buff *skb, u8 *len_pos, u8 frag_id) { unsigned int elem_len; @@ -5148,7 +5148,7 @@ void ieee80211_fragment_element(struct sk_buff *skb, u8 *len_pos) memmove(len_pos + 255 + 3, len_pos + 255 + 1, elem_len); /* place the fragment ID */ len_pos += 255 + 1; - *len_pos = WLAN_EID_FRAGMENT; + *len_pos = frag_id; /* and point to fragment length to update later */ len_pos++; }