Merge "qcacld-3.0: Pass proper values to bit manipulation methods to avoid panic" into wlan-cld3.driver.lnx.2.0-dev

This commit is contained in:
Service qcabuildsw 2017-03-21 18:48:39 -07:00 • committed by Gerrit - the friendly Code Review server
commit fb3b44e1e5
3 changed files with 30 additions and 27 deletions

View file

@ -50,17 +50,20 @@
#include "qdf_mc_timer.h"
#include "cds_config.h"
#define TX_POST_EVENT_MASK 0x001
#define TX_SUSPEND_EVENT_MASK 0x002
#define RX_POST_EVENT_MASK 0x001
#define RX_SUSPEND_EVENT_MASK 0x002
#define TX_SHUTDOWN_EVENT_MASK 0x010
#define RX_SHUTDOWN_EVENT_MASK 0x010
#define WD_POST_EVENT_MASK 0x001
#define WD_SHUTDOWN_EVENT_MASK 0x002
#define WD_CHIP_RESET_EVENT_MASK 0x004
#define WD_WLAN_SHUTDOWN_EVENT_MASK 0x008
#define WD_WLAN_REINIT_EVENT_MASK 0x010
#define TX_POST_EVENT 0x001
#define TX_SUSPEND_EVENT 0x002
#define MC_POST_EVENT 0x001
#define MC_SUSPEND_EVENT 0x002
#define RX_POST_EVENT 0x001
#define RX_SUSPEND_EVENT 0x002
#define TX_SHUTDOWN_EVENT 0x010
#define MC_SHUTDOWN_EVENT 0x010
#define RX_SHUTDOWN_EVENT 0x010
#define WD_POST_EVENT 0x001
#define WD_SHUTDOWN_EVENT 0x002
#define WD_CHIP_RESET_EVENT 0x004
#define WD_WLAN_SHUTDOWN_EVENT 0x008
#define WD_WLAN_REINIT_EVENT 0x010
#ifdef QCA_CONFIG_SMP
/*

View file

@ -669,7 +669,7 @@ cds_indicate_rxpkt(p_cds_sched_context pSchedContext,
spin_lock_bh(&pSchedContext->ol_rx_queue_lock);
list_add_tail(&pkt->list, &pSchedContext->ol_rx_thread_queue);
spin_unlock_bh(&pSchedContext->ol_rx_queue_lock);
set_bit(RX_POST_EVENT_MASK, &pSchedContext->ol_rx_event_flag);
set_bit(RX_POST_EVENT, &pSchedContext->ol_rx_event_flag);
wake_up_interruptible(&pSchedContext->ol_rx_wait_queue);
}
@ -788,22 +788,22 @@ static int cds_ol_rx_thread(void *arg)
while (!shutdown) {
status =
wait_event_interruptible(pSchedContext->ol_rx_wait_queue,
test_bit(RX_POST_EVENT_MASK,
test_bit(RX_POST_EVENT,
&pSchedContext->ol_rx_event_flag)
|| test_bit(RX_SUSPEND_EVENT_MASK,
|| test_bit(RX_SUSPEND_EVENT,
&pSchedContext->ol_rx_event_flag));
if (status == -ERESTARTSYS)
break;
clear_bit(RX_POST_EVENT_MASK, &pSchedContext->ol_rx_event_flag);
clear_bit(RX_POST_EVENT, &pSchedContext->ol_rx_event_flag);
while (true) {
if (test_bit(RX_SHUTDOWN_EVENT_MASK,
if (test_bit(RX_SHUTDOWN_EVENT,
&pSchedContext->ol_rx_event_flag)) {
clear_bit(RX_SHUTDOWN_EVENT_MASK,
clear_bit(RX_SHUTDOWN_EVENT,
&pSchedContext->ol_rx_event_flag);
if (test_bit(RX_SUSPEND_EVENT_MASK,
if (test_bit(RX_SUSPEND_EVENT,
&pSchedContext->ol_rx_event_flag)) {
clear_bit(RX_SUSPEND_EVENT_MASK,
clear_bit(RX_SUSPEND_EVENT,
&pSchedContext->ol_rx_event_flag);
complete
(&pSchedContext->ol_suspend_rx_event);
@ -817,9 +817,9 @@ static int cds_ol_rx_thread(void *arg)
}
cds_rx_from_queue(pSchedContext);
if (test_bit(RX_SUSPEND_EVENT_MASK,
if (test_bit(RX_SUSPEND_EVENT,
&pSchedContext->ol_rx_event_flag)) {
clear_bit(RX_SUSPEND_EVENT_MASK,
clear_bit(RX_SUSPEND_EVENT,
&pSchedContext->ol_rx_event_flag);
spin_lock(&pSchedContext->ol_rx_thread_lock);
INIT_COMPLETION
@ -862,8 +862,8 @@ QDF_STATUS cds_sched_close(void *p_cds_context)
}
#ifdef QCA_CONFIG_SMP
/* Shut down Tlshim Rx thread */
set_bit(RX_SHUTDOWN_EVENT_MASK, &gp_cds_sched_context->ol_rx_event_flag);
set_bit(RX_POST_EVENT_MASK, &gp_cds_sched_context->ol_rx_event_flag);
set_bit(RX_SHUTDOWN_EVENT, &gp_cds_sched_context->ol_rx_event_flag);
set_bit(RX_POST_EVENT, &gp_cds_sched_context->ol_rx_event_flag);
wake_up_interruptible(&gp_cds_sched_context->ol_rx_wait_queue);
wait_for_completion(&gp_cds_sched_context->ol_rx_shutdown);
gp_cds_sched_context->ol_rx_thread = NULL;

View file

@ -1832,14 +1832,14 @@ next_adapter:
/* Suspend control path scheduler */
scheduler_register_hdd_suspend_callback(hdd_suspend_cb);
scheduler_set_event_mask(MC_SUSPEND_EVENT_MASK);
scheduler_set_event_mask(MC_SUSPEND_EVENT);
scheduler_wake_up_controller_thread();
/* Wait for suspend confirmation from scheduler */
rc = wait_for_completion_timeout(&pHddCtx->mc_sus_event_var,
msecs_to_jiffies(WLAN_WAIT_TIME_MCTHREAD_SUSPEND));
if (!rc) {
scheduler_clear_event_mask(MC_SUSPEND_EVENT_MASK);
scheduler_clear_event_mask(MC_SUSPEND_EVENT);
hdd_err("Failed to stop mc thread");
goto resume_tx;
}
@ -1847,14 +1847,14 @@ next_adapter:
#ifdef QCA_CONFIG_SMP
/* Suspend tlshim rx thread */
set_bit(RX_SUSPEND_EVENT_MASK, &cds_sched_context->ol_rx_event_flag);
set_bit(RX_SUSPEND_EVENT, &cds_sched_context->ol_rx_event_flag);
wake_up_interruptible(&cds_sched_context->ol_rx_wait_queue);
rc = wait_for_completion_timeout(&cds_sched_context->
ol_suspend_rx_event,
msecs_to_jiffies
(RX_TLSHIM_SUSPEND_TIMEOUT));
if (!rc) {
clear_bit(RX_SUSPEND_EVENT_MASK,
clear_bit(RX_SUSPEND_EVENT,
&cds_sched_context->ol_rx_event_flag);
hdd_err("Failed to stop tl_shim rx thread");
goto resume_all;