• Sebastian Andrzej Siewior's avatar
    net: hostap: Remove in_interrupt() usage · 75fd2963
    Sebastian Andrzej Siewior authored
    in_interrupt() is ill defined and does not provide what the name
    suggests. The usage especially in driver code is deprecated and a tree wide
    effort to clean up and consolidate the (ab)usage of in_interrupt() and
    related checks is happening.
    
    hfa384x_cmd() and prism2_hw_reset() check in_interrupt() at function entry
    and if true emit a printk at debug loglevel and return. This is clearly debug
    code.
    
    Both functions invoke functions which can sleep. These functions already
    have appropriate debug checks which cover all invalid contexts, while
    in_interrupt() fails to detect context which just has preemption or
    interrupts disabled.
    
    Remove both checks as they are incomplete, debug only and already covered
    by the subsequently invoked functions properly. If called from invalid
    context the resulting back trace is definitely more helpful to analyze the
    problem than a printk at debug loglevel.
    Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Acked-by: default avatarKalle Valo <kvalo@codeaurora.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    75fd2963
hostap_hw.c 92.2 KB