Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

Commit

Permalink
prima: Use freezable power efficient workqueue
Browse files Browse the repository at this point in the history
  • Loading branch information
Wikidepia authored and LinkBoi00 committed Jul 9, 2021
1 parent abbfdc3 commit 8ee8ef6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
9 changes: 6 additions & 3 deletions drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,8 @@ static void hdd_check_and_move_if_sap_is_on_dfs_chan(hdd_context_t *hdd_ctx,
}

hddLog(LOG1, "Schedule workqueue to move the SAP to non DFS channel");
schedule_delayed_work(&hdd_ctx->ecsa_chan_change_work,
queue_delayed_work(system_freezable_power_efficient_wq,
&hdd_ctx->ecsa_chan_change_work,
msecs_to_jiffies(ECSA_DFS_CHAN_CHANGE_DEFER_TIME));
}
}
Expand Down Expand Up @@ -2279,7 +2280,8 @@ hdd_schedule_ecsa_chan_change_work(hdd_context_t *hdd_ctx,
time_diff = ECSA_SCC_CHAN_CHANGE_DEFER_INTERVAL - time_diff;

hddLog(LOG1, FL("schedule ecsa_chan_change_work after %d ms"), time_diff);
schedule_delayed_work(&hdd_ctx->ecsa_chan_change_work,
queue_delayed_work(system_freezable_power_efficient_wq,
&hdd_ctx->ecsa_chan_change_work,
msecs_to_jiffies(time_diff));
}

Expand Down Expand Up @@ -4376,7 +4378,8 @@ eHalStatus hdd_smeRoamCallback( void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U3
(pHostapdAdapter->sessionCtx.ap.operatingChannel !=
pRoamInfo->chan_info.chan_id))
{
schedule_delayed_work(&pHddCtx->ecsa_chan_change_work, 0);
queue_delayed_work(system_freezable_power_efficient_wq,
&pHddCtx->ecsa_chan_change_work, 0);
}
else
hddLog(LOG1, FL("SAP restart not required"));
Expand Down
6 changes: 4 additions & 2 deletions drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -5606,7 +5606,8 @@ static int __wlan_hdd_cfg80211_set_spoofed_mac_oui(struct wiphy *wiphy,
pHddCtx->spoofMacAddr.isEnabled = FALSE;
}

schedule_delayed_work(&pHddCtx->spoof_mac_addr_work,
queue_delayed_work(system_freezable_power_efficient_wq,
&pHddCtx->spoof_mac_addr_work,
msecs_to_jiffies(MAC_ADDR_SPOOFING_DEFER_INTERVAL));

EXIT();
Expand Down Expand Up @@ -14911,7 +14912,8 @@ static eHalStatus hdd_cfg80211_scan_done_callback(tHalHandle halHandle,
/* Generate new random mac addr for next scan */
hddLog(VOS_TRACE_LEVEL_INFO, "scan completed - generate new spoof mac addr");

schedule_delayed_work(&pHddCtx->spoof_mac_addr_work,
queue_delayed_work(system_freezable_power_efficient_wq,
&pHddCtx->spoof_mac_addr_work,
msecs_to_jiffies(MAC_ADDR_SPOOFING_DEFER_INTERVAL));
}

Expand Down
3 changes: 2 additions & 1 deletion drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -13432,7 +13432,8 @@ void wlan_hdd_defer_scan_init_work(hdd_context_t *pHddCtx,
pHddCtx->scan_ctxt.attempt = 0;
pHddCtx->scan_ctxt.magic = TDLS_CTX_MAGIC;
}
schedule_delayed_work(&pHddCtx->scan_ctxt.scan_work, delay);
queue_delayed_work(system_freezable_power_efficient_wq,
&pHddCtx->scan_ctxt.scan_work, delay);
}

void wlan_hdd_init_deinit_defer_scan_context(scan_context_t *scan_ctx)
Expand Down
3 changes: 2 additions & 1 deletion drivers/staging/prima/CORE/HDD/src/wlan_hdd_p2p.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,8 @@ static int wlan_hdd_request_remain_on_channel( struct wiphy *wiphy,

mutex_unlock(&pHddCtx->roc_lock);

schedule_delayed_work(&pAdapter->roc_work,
queue_delayed_work(system_freezable_power_efficient_wq,
&pAdapter->roc_work,
msecs_to_jiffies(pHddCtx->cfg_ini->gP2PListenDeferInterval));
hddLog(VOS_TRACE_LEVEL_INFO, "Defer interval is %hu, pAdapter %pK",
pHddCtx->cfg_ini->gP2PListenDeferInterval, pAdapter);
Expand Down

0 comments on commit 8ee8ef6

Please sign in to comment.