Avinash Patil <[email protected]> writes:
> From: Marc Yang <[email protected]>
>
> Current code does not check whether main_work_queue or
> rx_work_queue is running when preparing to do queue_work,
> this code fix add check before calling queue_work, reducing
> unnecessary queue_work switch.
>
> This change instead sets more_task flag to ensure we run main_process
> superloop once again.
>
> Signed-off-by: Marc Yang <[email protected]>
> Signed-off-by: Zhaoyang Liu <[email protected]>
> Signed-off-by: Shengzhen Li <[email protected]>
> Signed-off-by: Cathy Luo <[email protected]>
> Signed-off-by: Amitkumar Karwar <[email protected]>
> Signed-off-by: Avinash Patil <[email protected]>
Really, it took six persons to write this patch? Or do you just dump the
same names to each patch?
> +void mwifiex_queue_main_work(struct mwifiex_adapter *adapter)
> +{
> + unsigned long flags;
> +
> + spin_lock_irqsave(&adapter->main_proc_lock, flags);
> + if (adapter->mwifiex_processing) {
> + adapter->more_task_flag = true;
> + spin_unlock_irqrestore(&adapter->main_proc_lock, flags);
> + } else {
> + spin_unlock_irqrestore(&adapter->main_proc_lock, flags);
> + queue_work(adapter->workqueue, &adapter->main_work);
> + }
> +}
> +EXPORT_SYMBOL_GPL(mwifiex_queue_main_work);
> +
> +static void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)
> +{
> + unsigned long flags;
> +
> + spin_lock_irqsave(&adapter->rx_proc_lock, flags);
> + if (adapter->rx_processing) {
> + spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
> + } else {
> + spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
> + queue_work(adapter->rx_workqueue, &adapter->rx_work);
> + }
> +}
I can apply this patch, but to me this looks like a horrible hack.
--
Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html