Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp172881lqs; Thu, 13 Jun 2024 07:10:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU6YFXkiMH2/EVnfQRKdiZL9ij9U3HK4jj79X+Liblg2bqPXMI3MYquP8B6RxMrQm2zoC/kOqlIRX8F5V5bowsidB0Ncirwu8VW3IsDvA== X-Google-Smtp-Source: AGHT+IExEbIOO4dHjl9wUbDiLZYPGyU8/LDTi7Z5MKDgnSMUn0wRGDxg+o/hsse1f5lm077/chiI X-Received: by 2002:a50:8e51:0:b0:578:60a6:7c69 with SMTP id 4fb4d7f45d1cf-57caaad8e91mr3509664a12.30.1718287843870; Thu, 13 Jun 2024 07:10:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718287843; cv=pass; d=google.com; s=arc-20160816; b=mDJ1ZxjcqwXYGQ1x5hx22J0N4/W3Wc2eYVKh9DsCUQvnpay7zOdpYfQVuocS1Boqim IWsXh64nx704b/WxaVpuZ7SeTTwtJzvaQZXnBzQGb8rrVA/cHPGxGD63HHGUZEN0J4Cm rGd6QKYNnqvytsgebbbuMFIiJZjphImfBgrp8qkbaCUBWiPIlkMGOIccGRHS06ueP78A sbrrcng0MUxBsix73CE7t/sRYPCEXMVIarJ5p0I3Q4jzXikO3H3Pn0fWJl9MyDVDzM8m 1a7VswJeZVZ+eZOiog7PHFKnLE2mYOivHK2mTjZ73JLcR3hnuQpZ3SZY4bp5RF8vLRJM LYRQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=RClnKQFv64FuSlC1HxBHws576hIZFiDk+emFZ0rBLhM=; fh=hf7yt6gAq86lBfLhZUgknSIsFJxesf1c5mfeIKl6aZk=; b=hG+i8Pfm/obn4Jvr9z8VghzlgIGGnEVGbKaIBLzlX/2jxwl67w/rB/gHglOm42EgAt Zc/SkrKPY7RIO5wlHgyeUxeJE47ZqcJriOK/8zPjwUNoFQ4aH61rxHRTc7OYYB2L+wWP bkmqXaYgirvd74PpMZtOMzMSwte/qTrxxaLP0we+rxDxCBNCC6kJFdbuMAZBCWGp+k5h 3vrTUwtblqFepkf9Aax5Wp9exvlACBBKQjO+nTVWrPQV/nMY8azf3spgVu4N4EarG0rN 4j4PjEgjcoffhovJJqZMK3dJBhVijNMYl/G+NGcD28/aeLlgRWuMrZPVfF2gh5FQxs3A pR6g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=TXvnPkH9; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-wireless+bounces-8981-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8981-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57cb8c31b36si662765a12.648.2024.06.13.07.10.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 07:10:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8981-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=TXvnPkH9; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-wireless+bounces-8981-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8981-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 93C7A1F21894 for ; Thu, 13 Jun 2024 14:10:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 95132145B25; Thu, 13 Jun 2024 14:10:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="TXvnPkH9" X-Original-To: linux-wireless@vger.kernel.org Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (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 401E1144D21; Thu, 13 Jun 2024 14:10:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718287822; cv=none; b=GHm3lIiN+HZ4XXjaEQiHz1X8YIfP1QJfC7D3z3PX91SGP2mjmatjYNK0V3Za2czlZmvzvlilvwp5ka39IKkcbA+dGVDlU7/BMCWulJJxGyYvVBuFhgVq/hYo8KrLsW776Jz78cWspuAhHaIYgh7DXJHS4qTllXT0J5RxWUgIL0k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718287822; c=relaxed/simple; bh=GpFmutC7qNS5D63XKNVZU++STRMERLCcpZP+B831mbs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=abJ/ZOjurIjrspJgkBjYw3OtZzu7Afz4ZVH34Kgmbk1rzVgTuRhbX3hkaNkz6dcS0XHqXbp+LBSGbeMJUlrUVBVs96B6hKHP73/a1m9UvEvWYw5IpgH94cb0/o22Y+Eka6JFoQA0nOlgAwEdbxqvz0ZmQ3lKXu2J3+zxvZKYlrY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=TXvnPkH9; arc=none smtp.client-ip=217.70.183.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 697C61BF212; Thu, 13 Jun 2024 14:10:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1718287813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RClnKQFv64FuSlC1HxBHws576hIZFiDk+emFZ0rBLhM=; b=TXvnPkH95jxbM/0Oh9ooTTmgWKqly+qkpsIe4F8gyGh1TkJMU7P+cIP4hvbi7hBaTudAr2 QV4dF3kmbt+bzXGoqQDGMoFjukC49S83olv85zb9wE1B5kX3M+ZQo6mOXw7Pi3nKfNtrDw PEMDi8SMu1rUsVXOGQ4fTlXHQcgnApyhrWnIykBr+qV6WwB+q94i2tkIHzHDJ0J3KDaM7v olvbg+mZRK3rk66BXKyuGtyjBDg+qtsSHllStXNvTT/t+sLeJcJBSFBdaj9ckWcWEN+0N/ 0Xt+q6Fj49WpMWYVbXob72Dg3CSFa4ffNh6K3Y6RpCY3dnSStDOtCZ8CitgmKw== From: =?utf-8?q?Alexis_Lothor=C3=A9?= Date: Thu, 13 Jun 2024 16:06:44 +0200 Subject: [PATCH 5/6] wifi: wilc1000: remove suspend/resume from cfg80211 part Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240613-wilc_suspend-v1-5-c2f766d0988c@bootlin.com> References: <20240613-wilc_suspend-v1-0-c2f766d0988c@bootlin.com> In-Reply-To: <20240613-wilc_suspend-v1-0-c2f766d0988c@bootlin.com> To: linux-wireless@vger.kernel.org Cc: Ajay Singh , Claudiu Beznea , Kalle Valo , Thomas Petazzoni , linux-kernel@vger.kernel.org, =?utf-8?q?Alexis_Lothor=C3=A9?= X-Mailer: b4 0.13.0 X-GND-Sasl: alexis.lothore@bootlin.com WILC1000 suspend/resume implementation is currently composed of two parts: suspend/resume ops implemented in cfg80211 ops, which merely sets a flag, and suspend/resume ops in sdio/spi driver which, based on this flag, execute or not the suspend/resume mechanism. This dual set of ops is not really needed , so keep only the sdio part to implement suspend/resume. While doing so, remove the now unused suspend_event flag. Signed-off-by: Alexis Lothoré --- drivers/net/wireless/microchip/wilc1000/cfg80211.c | 19 ------------------- drivers/net/wireless/microchip/wilc1000/netdev.h | 1 - drivers/net/wireless/microchip/wilc1000/sdio.c | 6 ++---- 3 files changed, 2 insertions(+), 24 deletions(-) diff --git a/drivers/net/wireless/microchip/wilc1000/cfg80211.c b/drivers/net/wireless/microchip/wilc1000/cfg80211.c index ba02e6cfd3ae..eb37b228d54e 100644 --- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c +++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c @@ -1617,23 +1617,6 @@ static int del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev) return 0; } -static int wilc_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wow) -{ - struct wilc *wl = wiphy_priv(wiphy); - - if (!wow && wilc_wlan_get_num_conn_ifcs(wl)) - wl->suspend_event = true; - else - wl->suspend_event = false; - - return 0; -} - -static int wilc_resume(struct wiphy *wiphy) -{ - return 0; -} - static void wilc_set_wakeup(struct wiphy *wiphy, bool enabled) { struct wilc *wl = wiphy_priv(wiphy); @@ -1739,8 +1722,6 @@ static const struct cfg80211_ops wilc_cfg80211_ops = { .set_power_mgmt = set_power_mgmt, .set_cqm_rssi_config = set_cqm_rssi_config, - .suspend = wilc_suspend, - .resume = wilc_resume, .set_wakeup = wilc_set_wakeup, .set_tx_power = set_tx_power, .get_tx_power = get_tx_power, diff --git a/drivers/net/wireless/microchip/wilc1000/netdev.h b/drivers/net/wireless/microchip/wilc1000/netdev.h index e59d1b6f5d7d..95bc8b8fe65a 100644 --- a/drivers/net/wireless/microchip/wilc1000/netdev.h +++ b/drivers/net/wireless/microchip/wilc1000/netdev.h @@ -272,7 +272,6 @@ struct wilc { const struct firmware *firmware; struct device *dev; - bool suspend_event; struct workqueue_struct *hif_workqueue; struct wilc_cfg cfg; diff --git a/drivers/net/wireless/microchip/wilc1000/sdio.c b/drivers/net/wireless/microchip/wilc1000/sdio.c index 21398a3c600b..4e7014670945 100644 --- a/drivers/net/wireless/microchip/wilc1000/sdio.c +++ b/drivers/net/wireless/microchip/wilc1000/sdio.c @@ -980,8 +980,7 @@ static int wilc_sdio_suspend(struct device *dev) if (!IS_ERR(wilc->rtc_clk)) clk_disable_unprepare(wilc->rtc_clk); - if (wilc->suspend_event) - host_sleep_notify(wilc); + host_sleep_notify(wilc); ret = wilc_sdio_reset(wilc); if (ret) { @@ -1000,8 +999,7 @@ static int wilc_sdio_resume(struct device *dev) dev_info(dev, "sdio resume\n"); wilc_sdio_init(wilc, true); - if (wilc->suspend_event) - host_wakeup_notify(wilc); + host_wakeup_notify(wilc); return 0; } -- 2.45.2