• Larry Finger's avatar
    rtlwifi: Fix enter/exit power_save · ba9f93f8
    Larry Finger authored
    In commit a5ffbe0a ("rtlwifi: Fix scheduling while atomic bug") and
    commit a269913c ("rtlwifi: Rework rtl_lps_leave() and rtl_lps_enter()
    to use work queue"), an error was introduced in the power-save routines
    due to the fact that leaving PS was delayed by the use of a work queue.
    
    This problem is fixed by detecting if the enter or leave routines are
    in interrupt mode. If so, the workqueue is used to place the request.
    If in normal mode, the enter or leave routines are called directly.
    
    Fixes: a269913c ("rtlwifi: Rework rtl_lps_leave() and rtl_lps_enter() to use work queue")
    Reported-by: default avatarPing-Ke Shih <pkshih@realtek.com>
    Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
    Cc: Stable <stable@vger.kernel.org>
    Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
    ba9f93f8
base.c 59.4 KB