summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorManikanta <mmaddireddy@nvidia.com>2014-06-30 13:52:28 +0530
committerMandar Padmawar <mpadmawar@nvidia.com>2014-07-01 06:14:49 -0700
commitdb52a5ebf986ccb89cdff994f39889f66ece230e (patch)
tree1b02ba71fba22399b68b7f20b8e1c459bd5c6992 /drivers/net
parentfa9a15badd061956c4a75f1e492ca721b4647615 (diff)
net: wireless: bcmdhd: Fix LP0 in case of wifi tethering
PROPTX_STATUS periodically sends useful information (such as flow control info, RSSI etc) to the host, this prevents host from going into LP0 mode. Disable dhd_pm_callback pm notifier to fix this issue. bug 200016824 Change-Id: I50c0fa61e6a183d203f8ef49b1ed81a060e81351 Signed-off-by: Manikanta <mmaddireddy@nvidia.com> Reviewed-on: http://git-master/r/432654 Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/net')
-rwxr-xr-xdrivers/net/wireless/bcmdhd/dhd_linux.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c
index fad47e582e07..a50b365693df 100755
--- a/drivers/net/wireless/bcmdhd/dhd_linux.c
+++ b/drivers/net/wireless/bcmdhd/dhd_linux.c
@@ -595,7 +595,8 @@ static int dhd_wakelock_waive(dhd_info_t *dhdinfo);
static int dhd_wakelock_restore(dhd_info_t *dhdinfo);
#endif
-#if defined(CONFIG_PM_SLEEP)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) && (LINUX_VERSION_CODE <= \
+ KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM_SLEEP)
static int dhd_pm_callback(struct notifier_block *nfb, unsigned long action, void *ignored)
{
int ret = NOTIFY_DONE;
@@ -640,7 +641,7 @@ static bool dhd_pm_notifier_registered = FALSE;
extern int register_pm_notifier(struct notifier_block *nb);
extern int unregister_pm_notifier(struct notifier_block *nb);
-#endif /* CONFIG_PM_SLEEP */
+#endif /* (LINUX_VERSION >= 2.6.27 && LINUX_VERSION <= 2.6.39 && CONFIG_PM_SLEEP) */
/* Request scheduling of the bus rx frame */
static void dhd_sched_rxf(dhd_pub_t *dhdp, void *skb);
@@ -3532,14 +3533,15 @@ dhd_attach(osl_t *osh, struct dhd_bus *bus, uint bus_hdrlen)
*/
memcpy(netdev_priv(net), &dhd, sizeof(dhd));
-#if defined(CONFIG_PM_SLEEP)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) && (LINUX_VERSION_CODE <= \
+ KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM_SLEEP)
dhd->pm_notifier.notifier_call = dhd_pm_callback;
dhd->pm_notifier.priority = 10;
if (!dhd_pm_notifier_registered) {
dhd_pm_notifier_registered = TRUE;
register_pm_notifier(&dhd->pm_notifier);
}
-#endif /* CONFIG_PM_SLEEP */
+#endif /* (LINUX_VERSION >= 2.6.27 && LINUX_VERSION <= 2.6.39 && CONFIG_PM_SLEEP) */
#if defined(CONFIG_HAS_EARLYSUSPEND) && defined(DHD_USE_EARLYSUSPEND)
dhd->early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 20;
@@ -5141,12 +5143,13 @@ void dhd_detach(dhd_pub_t *dhdp)
if (dhdp->pno_state)
dhd_pno_deinit(dhdp);
#endif
-#if defined(CONFIG_PM_SLEEP)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) && (LINUX_VERSION_CODE <= \
+ KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM_SLEEP)
if (dhd_pm_notifier_registered) {
unregister_pm_notifier(&dhd->pm_notifier);
dhd_pm_notifier_registered = FALSE;
}
-#endif /* CONFIG_PM_SLEEP */
+#endif /* (LINUX_VERSION >= 2.6.27 && LINUX_VERSION <= 2.6.39 && CONFIG_PM_SLEEP) */
#ifdef DEBUG_CPU_FREQ
if (dhd->new_freq)
free_percpu(dhd->new_freq);