Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp210718rwl; Wed, 29 Mar 2023 00:08:53 -0700 (PDT) X-Google-Smtp-Source: AKy350YKbgmq3DZDwwTcOIJe8dvmpyZEOQK0cfnBUMJXVZrDv03s9VlvdP5O5AUraYmlKBOTcdzX X-Received: by 2002:a62:19cb:0:b0:624:7c9a:c832 with SMTP id 194-20020a6219cb000000b006247c9ac832mr16766174pfz.8.1680073732814; Wed, 29 Mar 2023 00:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680073732; cv=none; d=google.com; s=arc-20160816; b=Vh9++q5YX0AFJcUUTkAawqYzn0hJaBuWl2uIEvpQRDPuvlC6pb6r6Oy4YzHcSM/gbJ raVBe0mJePxxF9WwOBCQ8doN1vAuEPBU2Z9/Y89OJvEtu6j8y3F0W/koUkQrUwTxM+sP 0Nf5NyOhFDJokg7MI5pgpIVlgMuCh+S8VrNtZZbRyRLBNZrjWCk40aCfvLg9kgA28De7 gRpfkbx8O4Cz4T6dWL87C2FDJylZoB4LjPF4PJHoPiw8UDAPH6WlASxvaYWqwbNoUnz2 +tI88xhyYTjJApDHVKBofBVcobJR96h4LUtkksZFPE+hFmjBjT6eaKqtdUxqwHOempfA O1YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6cB1FjEnZ8DByjnEw2NbELtEVpF+cvG8roetDgbAwwE=; b=MuhTtFUYl5lqiRQnFkTnFS8NUlDBgIxFYyFFjHu95t8fqJ3OWv0P9F/GpMMHErgtp7 fVuivc3ysgTWbV4M37aGoXbr4XA9VuovI3Za4wsCWr0AHhJry+TJAr8hTKRoui3hmdwW s6Kbr4eKPiiKH4VRq0Ee3A0kTqUcrsmBiIrcl2kuYzAWl60jTC1cG3byjQawJl5/JOPu MixVEpNdeDQoG3RZp7ubdEH+bu2708RZ+fuztToewrdQDXWJhYbs5IN9vw7mOlT2QTtF dXePLnbsQ3oqIlRQujrEGm8+++Y6E3Z40RU/1DS1vvjrJ6fSEj8U0dYqnjTdvbcY4swX t1eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TesJl0eY; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u4-20020a056a00158400b00628217e3ea6si17891382pfk.316.2023.03.29.00.08.45; Wed, 29 Mar 2023 00:08:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TesJl0eY; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229791AbjC2HH2 (ORCPT + 60 others); Wed, 29 Mar 2023 03:07:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229687AbjC2HH1 (ORCPT ); Wed, 29 Mar 2023 03:07:27 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 328063C04 for ; Wed, 29 Mar 2023 00:07:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680073632; x=1711609632; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pCTtHSYx8xKbxBReULfEkURAbUoQ+QkoJfMf64QWImQ=; b=TesJl0eYY6HjfR9vjBRnfQ/UjGgj8l/ruBbmFrnYc3Sx9VpgLK90FULc aki3jKRaZfbIXJCM6jRMpM+yN9c2noyI/JpGSvKwsk+iTmjnUC9541m2m saI7Q3WlRibNiSbDg0JezYM9tqpLP5o5fqZIA9jimyISFOX/v0fETF4i7 ipj8qRFgoAykGM6LRIIvPZfA+A4oLGIwj7b28tw6sEkwoXwFgmLvSiLZn r+/yG5S43ASN9S5ocmVGCAx/mEJ7zI9NaFUfBoU2VAG8xfXGvbfyURF6H WXiFpPUKG1ahrG/Q2RUUdd/GF2UM5ycYSyr/gSAUSewefBFHrtoBbeMTk g==; X-IronPort-AV: E=McAfee;i="6600,9927,10663"; a="320450821" X-IronPort-AV: E=Sophos;i="5.98,300,1673942400"; d="scan'208";a="320450821" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2023 00:06:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10663"; a="795111319" X-IronPort-AV: E=Sophos;i="5.98,300,1673942400"; d="scan'208";a="795111319" Received: from sfrank1-mobl1.ger.corp.intel.com (HELO ggreenma-mobl2.intel.com) ([10.214.228.42]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2023 00:06:20 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Shaul Triebitz , Gregory Greenman Subject: [PATCH 14/34] wifi: iwlwifi: mvm: use bcast/mcast link station id Date: Wed, 29 Mar 2023 10:05:20 +0300 Message-Id: <20230329100039.0cffa6c45242.I342e17e7bca87b7f05939eb2ebd36fc2aff0b49f@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230329070540.2739372-1-gregory.greenman@intel.com> References: <20230329070540.2739372-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Shaul Triebitz For an MLD AP, use the correct link mcast or bcast station id. Signed-off-by: Shaul Triebitz Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c index 61a95ee3ef2d..ca1284f11f8b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c @@ -739,10 +739,23 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb) if (info.control.vif->type == NL80211_IFTYPE_P2P_DEVICE || info.control.vif->type == NL80211_IFTYPE_AP || info.control.vif->type == NL80211_IFTYPE_ADHOC) { + u32 link_id = u32_get_bits(info.control.flags, + IEEE80211_TX_CTRL_MLO_LINK); + struct iwl_mvm_vif_link_info *link; + + if (link_id == IEEE80211_LINK_UNSPECIFIED) { + if (info.control.vif->active_links) + link_id = ffs(info.control.vif->active_links) - 1; + else + link_id = 0; + } + + link = mvmvif->link[link_id]; + if (!ieee80211_is_data(hdr->frame_control)) - sta_id = mvmvif->deflink.bcast_sta.sta_id; + sta_id = link->bcast_sta.sta_id; else - sta_id = mvmvif->deflink.mcast_sta.sta_id; + sta_id = link->mcast_sta.sta_id; queue = iwl_mvm_get_ctrl_vif_queue(mvm, &info, hdr); } else if (info.control.vif->type == NL80211_IFTYPE_MONITOR) { -- 2.38.1