iwlwifi: mvm: add use_ps-poll debugfs power option
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / iwlwifi / mvm / power.c
index 2b2d10800a55e1b90f3f4da4c91bd6cfe09629a8..8cbe7ea01a6995a4def19493a0737054636e418d 100644 (file)
@@ -198,8 +198,15 @@ static void iwl_mvm_power_configure_uapsd(struct iwl_mvm *mvm,
                }
        }
 
-       if (!(cmd->flags & cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK)))
+       if (!(cmd->flags & cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK))) {
+#ifdef CONFIG_IWLWIFI_DEBUGFS
+               /* set advanced pm flag with no uapsd ACs to enable ps-poll */
+               if (mvmvif->dbgfs_pm.use_ps_poll)
+                       cmd->flags |=
+                               cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK);
+#endif
                return;
+       }
 
        cmd->flags |= cpu_to_le16(POWER_FLAGS_UAPSD_MISBEHAVING_ENA_MSK);