From a0c464d95c00e0601a30595dbf014cb38e82356d Mon Sep 17 00:00:00 2001 From: Lianghu Su Date: Thu, 15 Jun 2017 15:01:57 +0800 Subject: [PATCH] cfg80211: wifi: force to skip cfg80211_leave_all PD#145741: wifi: bcm: fix unable to enter deep suspend mode issue for the wowlan (wake on wireless lan) function under Linux platfrom, we have problem to configure it via wpa_supplicant as we do it at Android platform. so here when it enter into suspend mode, we try to skip calling cfg80211_leave_all() function at the wire core path. since this modify the wifi core code, it will also affect other wifi drivers (not only bcm wifi). Change-Id: I51eb9b2864afe1bb478ab9411eb7c590f995cd6e Signed-off-by: Lianghu Su --- net/wireless/sysfs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/wireless/sysfs.c b/net/wireless/sysfs.c index 2927d06faa6e..d3ed6b234de0 100644 --- a/net/wireless/sysfs.c +++ b/net/wireless/sysfs.c @@ -105,8 +105,13 @@ static int wiphy_suspend(struct device *dev) rtnl_lock(); if (rdev->wiphy.registered) { if (!rdev->wiphy.wowlan_config) { +#ifdef CONFIG_AMLOGIC_WIFI + printk_ratelimited(KERN_INFO + "force to skip cfg80211_leave_all due to wifi suspend/resume issue\n"); +#else cfg80211_leave_all(rdev); cfg80211_process_rdev_events(rdev); +#endif } if (rdev->ops->suspend) ret = rdev_suspend(rdev, rdev->wiphy.wowlan_config);