From patchwork Mon Oct 28 16:18:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 839315 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 CD7C618732E for ; Mon, 28 Oct 2024 16:19:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730132361; cv=none; b=WmsOJVCXODam9CvlqeYH6XXXEUlj7+LnHLXimSv4C2hNLZVbTag8E77F9Q5ZQOPw7kFeiafpO+Zxzm19DlKWHFClSYsIdekzCqMokAb5HL7vybdR1Y+9l2byYC6mNq9yExXYHFHKiRytGclvIo+LQFCg6FfZ19XVXFT1HYFU8UQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730132361; c=relaxed/simple; bh=p9ftd+kstM1Aun3rsIwwGaxvFnSVCNGC336ssYDhELE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oZA/jeGzTg4bEH84ajew/aiqJpl5tIAxBALZfHCqKf7uy+M+cuapKBAOlutuzXTgMJtVh2F2ncFSQmcbHQBgWVi2kPe3mXCRcZ1fS8TnGNDpBA+6+ugXzO62rZz34VsXl6PLnonzcpWWs7FFeJA3VoNPUdFZQZ/+R56BOqBwfAc= 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=WrDODJoi; arc=none smtp.client-ip=192.198.163.10 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="WrDODJoi" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730132359; x=1761668359; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=p9ftd+kstM1Aun3rsIwwGaxvFnSVCNGC336ssYDhELE=; b=WrDODJoiZ3XOyuaOzA7EZP7jQzjn3dbHAhEM/CLQHuQSTo0qX8QU877L PZw123P4TbGvK5IQclIn5LznteXQrgLqU4folPCWPyfgBDUgWcTZq8GkA FUEvABh/8/PjDWafHZFb1DIzO2zBTrzvAqDuPJPzaHEeDMkSccdKg/7gF M5xIBS2YVC6WAhQxUNZf5CtrcpZSOhXIZJ7La84tkwKcJgOMbqhw3QZR9 ALSLJmVbjKB7LX9itmFfzhhzbLAuxknK8dyq9XgD5giE3zHIy95AxMFiM NDxZdNhF/AcjxhPP1R0mAVFiFGwkcXIj8y3PK7cqdY5kUjtvg1lnmKKje Q==; X-CSE-ConnectionGUID: WTLeKXqCQ9KnoU3fBmr0wg== X-CSE-MsgGUID: EodM5Y2PRLilkC7aQEUiOA== X-IronPort-AV: E=McAfee;i="6700,10204,11239"; a="41099894" X-IronPort-AV: E=Sophos;i="6.11,239,1725346800"; d="scan'208";a="41099894" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2024 09:19:17 -0700 X-CSE-ConnectionGUID: T9I/ivfnSNa6rJIqUEsXiQ== X-CSE-MsgGUID: N3ru+5s/ScuuBNkecP4+4A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,239,1725346800"; d="scan'208";a="81561537" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2024 09:19:16 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Emmanuel Grumbach Subject: [PATCH 1/5] wifi: iwlwifi: mvm: remove pre-mld code from mld path Date: Mon, 28 Oct 2024 18:18:58 +0200 Message-Id: <20241028181512.ea8f08350665.I840b00a7b38f3967ec5e75ff6a85e756f4d82437@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241028161902.531165-1-miriam.rachel.korenblit@intel.com> References: <20241028161902.531165-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 This code is only relevant for older devices, that are not supporting mld, so shouldn't be in iwl_mvm_sta_del, which is common to both pre-mld and mld. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Reviewed-by: Emmanuel Grumbach --- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 42 ++++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index 9d05c344d967..45656132d05c 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c @@ -2063,28 +2063,6 @@ bool iwl_mvm_sta_del(struct iwl_mvm *mvm, struct ieee80211_vif *vif, lockdep_is_held(&mvm->mutex)); sta_id = mvm_link_sta->sta_id; - /* If there is a TXQ still marked as reserved - free it */ - if (mvm_sta->reserved_queue != IEEE80211_INVAL_HW_QUEUE) { - u8 reserved_txq = mvm_sta->reserved_queue; - enum iwl_mvm_queue_status *status; - - /* - * If no traffic has gone through the reserved TXQ - it - * is still marked as IWL_MVM_QUEUE_RESERVED, and - * should be manually marked as free again - */ - status = &mvm->queue_info[reserved_txq].status; - if (WARN((*status != IWL_MVM_QUEUE_RESERVED) && - (*status != IWL_MVM_QUEUE_FREE), - "sta_id %d reserved txq %d status %d", - sta_id, reserved_txq, *status)) { - *ret = -EINVAL; - return true; - } - - *status = IWL_MVM_QUEUE_FREE; - } - if (vif->type == NL80211_IFTYPE_STATION && mvm_link->ap_sta_id == sta_id) { /* if associated - we can't remove the AP STA now */ @@ -2143,6 +2121,26 @@ int iwl_mvm_rm_sta(struct iwl_mvm *mvm, iwl_mvm_disable_sta_queues(mvm, vif, sta); + /* If there is a TXQ still marked as reserved - free it */ + if (mvm_sta->reserved_queue != IEEE80211_INVAL_HW_QUEUE) { + u8 reserved_txq = mvm_sta->reserved_queue; + enum iwl_mvm_queue_status *status; + + /* + * If no traffic has gone through the reserved TXQ - it + * is still marked as IWL_MVM_QUEUE_RESERVED, and + * should be manually marked as free again + */ + status = &mvm->queue_info[reserved_txq].status; + if (WARN((*status != IWL_MVM_QUEUE_RESERVED) && + (*status != IWL_MVM_QUEUE_FREE), + "sta_id %d reserved txq %d status %d", + mvm_sta->deflink.sta_id, reserved_txq, *status)) + return -EINVAL; + + *status = IWL_MVM_QUEUE_FREE; + } + if (iwl_mvm_sta_del(mvm, vif, sta, &sta->deflink, &ret)) return ret; From patchwork Mon Oct 28 16:19:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 839314 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 16227189F20 for ; Mon, 28 Oct 2024 16:19:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730132362; cv=none; b=MzCv/syCujMyDIOE+7N6z736nO797WlakzzlLPHpCH1TGGwDL6jZIA5805sdmXgPXiJgovE8GUww9P1ZCFGoXHetQAnspEpRxBInhHd+h8AJqZa5i0BJyVpF5S2GwZT6iZQRwycRgYzxwPLxwjZGvU7DRaFCBFX1u0yBLpMuOxQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730132362; c=relaxed/simple; bh=IfMuFgoQwtWAnKhx2RgPbBK7s6cYLiE2MKfvs6Ifzqg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kCCO79xv92Dv2+B9eEsr7ysWG+N++qjG/kaBl7RbtaEY3l67Ej97sVKy/C/CHNm8/5UWqjF4/Wl2ReX0GmrbGgQ2yBLvRXamzXY+RLA3ZjflhNpAT4vE2rYgyeQ97qiFE0YFUDldTLO1AWkeALh9YX91cTeez98QxkYYhVt8+oM= 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=UzcyDpha; arc=none smtp.client-ip=192.198.163.10 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="UzcyDpha" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730132360; x=1761668360; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IfMuFgoQwtWAnKhx2RgPbBK7s6cYLiE2MKfvs6Ifzqg=; b=UzcyDphaEFQjobxzHXf10KSCaDn4fQr6s5IKSzsyViYhz46eiOGDzSt/ kOsLrsHJa638lE3Yux0sfJhaP0yZNHQITlZKv3SfkF+CHlTNeS2/E9drO 2Gn25dM057jmyp7WIzUQlD/PSIsJuHH23fJv47KGpSY0GuBd752LXkf90 bzOYU7wLQCj/PmMjkGnTZ6J+UxHdz3GOogUa0K58NwKxKKZwq9XfsVoJ3 ZuNIlFQ9lCxzefJApyF38YgEllgngnzxsX4J5jhPLo/0L51jmB+pR/WK/ HDuJZqNWoU4/evA1yaZHdbQqASXyCSBMH8x1LJQ0nHXxGhqmb2Ls3QGR0 Q==; X-CSE-ConnectionGUID: p9YjU/mISSWbnibAPc5QqA== X-CSE-MsgGUID: LOlbeFdaQr+qDP8hC7pXwQ== X-IronPort-AV: E=McAfee;i="6700,10204,11239"; a="41099899" X-IronPort-AV: E=Sophos;i="6.11,239,1725346800"; d="scan'208";a="41099899" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2024 09:19:19 -0700 X-CSE-ConnectionGUID: b90UvliIQuymdFgEDUPffg== X-CSE-MsgGUID: 7c5fd8j/Rpukn03qCVoTnw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,239,1725346800"; d="scan'208";a="81561552" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2024 09:19:19 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH 3/5] wifi: mac80211: add an option to filter a sta from being flushed Date: Mon, 28 Oct 2024 18:19:00 +0200 Message-Id: <20241028181512.8cef96922b5c.Icecf7f443bf98c9535ce8ec03b24d0d17dfbc28e@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241028161902.531165-1-miriam.rachel.korenblit@intel.com> References: <20241028161902.531165-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 Sometimes we might want to flush only part of the stations of a vif, for example only the TDLS ones. To allow this, add a do_not_flush_sta argument to __sta_info_flush, which in turn, will not flush this station. Signed-off-by: Miri Korenblit --- net/mac80211/cfg.c | 2 +- net/mac80211/sta_info.c | 5 ++++- net/mac80211/sta_info.h | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 6c0b228523cb..20cc46dc0f8e 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1671,7 +1671,7 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev, link_conf->ema_ap = false; link_conf->bssid_indicator = 0; - __sta_info_flush(sdata, true, link_id); + __sta_info_flush(sdata, true, link_id, NULL); ieee80211_remove_link_keys(link, &keys); if (!list_empty(&keys)) { diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index aa22f09e6d14..82c278fdfea3 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -1567,7 +1567,7 @@ void sta_info_stop(struct ieee80211_local *local) int __sta_info_flush(struct ieee80211_sub_if_data *sdata, bool vlans, - int link_id) + int link_id, struct sta_info *do_not_flush_sta) { struct ieee80211_local *local = sdata->local; struct sta_info *sta, *tmp; @@ -1585,6 +1585,9 @@ int __sta_info_flush(struct ieee80211_sub_if_data *sdata, bool vlans, (!vlans || sdata->bss != sta->sdata->bss)) continue; + if (sta == do_not_flush_sta) + continue; + if (link_id >= 0 && sta->sta.valid_links && !(sta->sta.valid_links & BIT(link_id))) continue; diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index 9f89fb5bee37..d4673e729525 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h @@ -899,9 +899,10 @@ void sta_info_stop(struct ieee80211_local *local); * @link_id: if given (>=0), all those STA entries using @link_id only * will be removed. If -1 is passed, all STA entries will be * removed. + * @do_not_flush_sta: a station that shouldn't be flushed. */ int __sta_info_flush(struct ieee80211_sub_if_data *sdata, bool vlans, - int link_id); + int link_id, struct sta_info *do_not_flush_sta); /** * sta_info_flush - flush matching STA entries from the STA table @@ -916,7 +917,7 @@ int __sta_info_flush(struct ieee80211_sub_if_data *sdata, bool vlans, static inline int sta_info_flush(struct ieee80211_sub_if_data *sdata, int link_id) { - return __sta_info_flush(sdata, false, link_id); + return __sta_info_flush(sdata, false, link_id, NULL); } void sta_set_rate_info_tx(struct sta_info *sta, From patchwork Mon Oct 28 16:19:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 839313 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 307AD1DE2D7 for ; Mon, 28 Oct 2024 16:19:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730132365; cv=none; b=I/HbPbpGF7jcSlPwXAFFz3wzuY59QZXa4eqjfppGwnOzcEALyruybRdhGODEzFYG0n9Q7emKpUKZHIrX/OjwAK++MP2o9OYVTNMrNZvY3tXxJqAgUUGdSXDHflmP5qlOm09uXtgFk/U10crih1X02YaH6CbkVNzL+v4ej0XyRqQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730132365; c=relaxed/simple; bh=1hv5NIKUS0DmAE2+YHJJOQG/0btmkcPNy6lICxLB6Uc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BEmLVIKo9KpE7qPtJh3LWntD04LASNSxuIhoFrK1wqlHS5hus3JKGw7yJrqpgFjL781ApBcvwtdvy0lDD+nA7ept/qs4/J0SsAxtMEZ4NV80StrM4vl2x4Koi3v88znIuM6unJ0p+Iv3etJMu5yl9jRz9aGw1LVfJqdOhmN9WUs= 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=h4l/laIp; arc=none smtp.client-ip=192.198.163.10 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="h4l/laIp" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730132363; x=1761668363; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1hv5NIKUS0DmAE2+YHJJOQG/0btmkcPNy6lICxLB6Uc=; b=h4l/laIpCvojSbZwvhoM858YEJD8rLvcmnpdadjm4pp4C0H7jgnnfPDL AO8q56Lq22LkwMWheYMljc8nisznDjp+rLzXgdejO7WXvRRXnrdmAPi3x +4xBce9+KN/oT26JfVpkkulhHrQ/p5L4XPqmVMURRZGfwPrBZcVTwstom MwxMjuvVZKCbdP3GENTBSq+cNPIKIFchllaXx0Yd+1iS/D+eRCpxtfDor JLVfv6yaxxanP2SFbjAc+XDbx2u/VU/XgDG2J3tlLF4zarTPpbdpdSlUA MK/NQAvKSi83tQL42hZVSLMbZdSjdMFk5MgQ2Wx3lJ4CVYYkZ27GLfN6A A==; X-CSE-ConnectionGUID: d2oWVkfpQQmRjkVCHzBrRg== X-CSE-MsgGUID: gN65NxeMRjKuoIDROkKXKg== X-IronPort-AV: E=McAfee;i="6700,10204,11239"; a="41099905" X-IronPort-AV: E=Sophos;i="6.11,239,1725346800"; d="scan'208";a="41099905" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2024 09:19:22 -0700 X-CSE-ConnectionGUID: OQlXnvKXSh6pXtQDH7c03w== X-CSE-MsgGUID: tQv4XHhnQMiayIptxyiDuQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,239,1725346800"; d="scan'208";a="81561571" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2024 09:19:21 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 5/5] wifi: iwlwifi: mvm: cleanup iwl_mvm_sta_del Date: Mon, 28 Oct 2024 18:19:02 +0200 Message-Id: <20241028181512.8101de3b9c09.Ia1cc352b871593be4f51cb3db98f9eedd5267857@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241028161902.531165-1-miriam.rachel.korenblit@intel.com> References: <20241028161902.531165-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 Now it neither sets the ret argument or return something else than false. Cleanup this function to be void and to not receive the ret argument. This also allows to get rid of the sta_in_fw parameter in iwl_mvm_mld_free_sta_link. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg --- .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- .../net/wireless/intel/iwlwifi/mvm/mld-sta.c | 27 ++++++------------- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 9 +++---- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 7 +++-- 4 files changed, 15 insertions(+), 30 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 0dfa2c0453e4..343e4814f504 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -1153,7 +1153,7 @@ static void iwl_mvm_cleanup_sta_iterator(void *data, struct ieee80211_sta *sta) * Delete the stale data to avoid issues later on. */ iwl_mvm_mld_free_sta_link(mvm, mvm_sta, mvm_link_sta, - link_id, false); + link_id); } } } diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c index 99eb1e1db1bb..0c724eb4a65b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c @@ -518,11 +518,9 @@ static int iwl_mvm_mld_cfg_sta(struct iwl_mvm *mvm, struct ieee80211_sta *sta, void iwl_mvm_mld_free_sta_link(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvm_sta, struct iwl_mvm_link_sta *mvm_sta_link, - unsigned int link_id, - bool is_in_fw) + unsigned int link_id) { - RCU_INIT_POINTER(mvm->fw_id_to_mac_id[mvm_sta_link->sta_id], - is_in_fw ? ERR_PTR(-EINVAL) : NULL); + RCU_INIT_POINTER(mvm->fw_id_to_mac_id[mvm_sta_link->sta_id], NULL); RCU_INIT_POINTER(mvm->fw_id_to_link_sta[mvm_sta_link->sta_id], NULL); RCU_INIT_POINTER(mvm_sta->link[link_id], NULL); @@ -543,7 +541,7 @@ static void iwl_mvm_mld_sta_rm_all_sta_links(struct iwl_mvm *mvm, if (!link) continue; - iwl_mvm_mld_free_sta_link(mvm, mvm_sta, link, link_id, false); + iwl_mvm_mld_free_sta_link(mvm, mvm_sta, link, link_id); } } @@ -835,18 +833,11 @@ int iwl_mvm_mld_rm_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct iwl_mvm_link_sta *mvm_link_sta = rcu_dereference_protected(mvm_sta->link[link_id], lockdep_is_held(&mvm->mutex)); - bool stay_in_fw; + iwl_mvm_sta_del(mvm, vif, sta, link_sta); - stay_in_fw = iwl_mvm_sta_del(mvm, vif, sta, link_sta, &ret); - if (ret) - break; - - if (!stay_in_fw) - ret = iwl_mvm_mld_rm_sta_from_fw(mvm, - mvm_link_sta->sta_id); + ret = iwl_mvm_mld_rm_sta_from_fw(mvm, mvm_link_sta->sta_id); - iwl_mvm_mld_free_sta_link(mvm, mvm_sta, mvm_link_sta, - link_id, stay_in_fw); + iwl_mvm_mld_free_sta_link(mvm, mvm_sta, mvm_link_sta, link_id); } kfree(mvm_sta->mpdu_counters); mvm_sta->mpdu_counters = NULL; @@ -1111,8 +1102,7 @@ int iwl_mvm_mld_update_sta_links(struct iwl_mvm *mvm, if (vif->type == NL80211_IFTYPE_STATION) mvm_vif_link->ap_sta_id = IWL_MVM_INVALID_STA; - iwl_mvm_mld_free_sta_link(mvm, mvm_sta, mvm_sta_link, link_id, - false); + iwl_mvm_mld_free_sta_link(mvm, mvm_sta, mvm_sta_link, link_id); } for_each_set_bit(link_id, &links_to_add, IEEE80211_MLD_MAX_NUM_LINKS) { @@ -1216,8 +1206,7 @@ int iwl_mvm_mld_update_sta_links(struct iwl_mvm *mvm, rcu_dereference_protected(mvm_sta->link[link_id], lockdep_is_held(&mvm->mutex)); - iwl_mvm_mld_free_sta_link(mvm, mvm_sta, mvm_sta_link, link_id, - false); + iwl_mvm_mld_free_sta_link(mvm, mvm_sta, mvm_sta_link, link_id); } return ret; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index 112b78c1b0e3..4187ca259a5f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c @@ -2045,9 +2045,9 @@ int iwl_mvm_wait_sta_queues_empty(struct iwl_mvm *mvm, * Returns if we're done with removing the station, either * with error or success */ -bool iwl_mvm_sta_del(struct iwl_mvm *mvm, struct ieee80211_vif *vif, +void iwl_mvm_sta_del(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct ieee80211_sta *sta, - struct ieee80211_link_sta *link_sta, int *ret) + struct ieee80211_link_sta *link_sta) { struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); struct iwl_mvm_vif_link_info *mvm_link = @@ -2080,8 +2080,6 @@ bool iwl_mvm_sta_del(struct iwl_mvm *mvm, struct ieee80211_vif *vif, mvm->tdls_cs.peer.sta_id = IWL_MVM_INVALID_STA; cancel_delayed_work(&mvm->tdls_cs.dwork); } - - return false; } int iwl_mvm_rm_sta(struct iwl_mvm *mvm, @@ -2137,8 +2135,7 @@ int iwl_mvm_rm_sta(struct iwl_mvm *mvm, *status = IWL_MVM_QUEUE_FREE; } - if (iwl_mvm_sta_del(mvm, vif, sta, &sta->deflink, &ret)) - return ret; + iwl_mvm_sta_del(mvm, vif, sta, &sta->deflink); ret = iwl_mvm_rm_sta_common(mvm, mvm_sta->deflink.sta_id); RCU_INIT_POINTER(mvm->fw_id_to_mac_id[mvm_sta->deflink.sta_id], NULL); diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.h b/drivers/net/wireless/intel/iwlwifi/mvm/sta.h index 4a3799ae7c18..54d8c0df2284 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.h @@ -507,9 +507,9 @@ void iwl_mvm_realloc_queues_after_restart(struct iwl_mvm *mvm, struct ieee80211_sta *sta); int iwl_mvm_wait_sta_queues_empty(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvm_sta); -bool iwl_mvm_sta_del(struct iwl_mvm *mvm, struct ieee80211_vif *vif, +void iwl_mvm_sta_del(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct ieee80211_sta *sta, - struct ieee80211_link_sta *link_sta, int *ret); + struct ieee80211_link_sta *link_sta); int iwl_mvm_rm_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct ieee80211_sta *sta); @@ -665,8 +665,7 @@ int iwl_mvm_mld_rm_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, void iwl_mvm_mld_free_sta_link(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvm_sta, struct iwl_mvm_link_sta *mvm_sta_link, - unsigned int link_id, - bool is_in_fw); + unsigned int link_id); int iwl_mvm_mld_rm_sta_id(struct iwl_mvm *mvm, u8 sta_id); int iwl_mvm_mld_update_sta_links(struct iwl_mvm *mvm, struct ieee80211_vif *vif,