mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
cnss2: Add config to disable time sync feature
Add the ability to dynamically control driver and device time sync feature. Change-Id: I753117995a1f7407b90d41b8d69d40b89ea5f4a3 Signed-off-by: Yue Ma <yuem@codeaurora.org>
This commit is contained in:
parent
aa860b5b17
commit
027d7b5db8
3 changed files with 13 additions and 0 deletions
|
|
@ -705,6 +705,8 @@ static int cnss_show_quirks_state(struct seq_file *s,
|
|||
continue;
|
||||
case IGNORE_PCI_LINK_FAILURE:
|
||||
seq_puts(s, "IGNORE_PCI_LINK_FAILURE");
|
||||
case DISABLE_TIME_SYNC:
|
||||
seq_puts(s, "DISABLE_TIME_SYNC");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -324,6 +324,7 @@ enum cnss_debug_quirks {
|
|||
DISABLE_DRV,
|
||||
DISABLE_IO_COHERENCY,
|
||||
IGNORE_PCI_LINK_FAILURE,
|
||||
DISABLE_TIME_SYNC,
|
||||
};
|
||||
|
||||
enum cnss_bdf_type {
|
||||
|
|
|
|||
|
|
@ -1690,6 +1690,16 @@ static void cnss_pci_time_sync_work_hdlr(struct work_struct *work)
|
|||
unsigned int time_sync_period_ms =
|
||||
plat_priv->ctrl_params.time_sync_period;
|
||||
|
||||
if (test_bit(DISABLE_TIME_SYNC, &plat_priv->ctrl_params.quirks)) {
|
||||
cnss_pr_dbg("Time sync is disabled\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!time_sync_period_ms) {
|
||||
cnss_pr_dbg("Skip time sync as time period is 0\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (cnss_pci_is_device_down(&pci_priv->pci_dev->dev))
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue