cfg80211: wifi: force to skip cfg80211_leave_all
authorLianghu Su <lianghu.su@amlogic.com>
Thu, 15 Jun 2017 07:01:57 +0000 (15:01 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Mon, 19 Jun 2017 13:54:57 +0000 (06:54 -0700)
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 <lianghu.su@amlogic.com>
net/wireless/sysfs.c

index 2927d06..d3ed6b2 100644 (file)
@@ -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);