• Shengzhen Li's avatar
    mwifiex: more_task flag for main_process · 04c7b363
    Shengzhen Li authored
    This patch handles a corner case where TX packet would remain in
    driver queue till next packet comes in.
    Here is sequence:
    1. TX packet is queued via hard_start_xmit and main_work is queued
    2. SDIO interrupt comes in which directly call mwifiex_main_process.
    This starts executing main superloop.
    3. Now work from step1 is scheduled but at first check itself it sees
    mwifiex_processing is set and exits.
    4. Now if superloop from step2 has passed TX processing part of superloop
    this packet would remain in queue until next packet/command/SDIO interrupt
    arrives and queues main_work.
    
    This patch fixes this corner case by defining more_task flag which is set when
    mwifiex_processing is found to be true. At end of superloop we again check if
    more_task flag is set and if set, execute superloop again.
    Signed-off-by: default avatarShengzhen Li <szli@marvell.com>
    Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
    Signed-off-by: default avatarCathy Luo <cluo@marvell.com>
    Signed-off-by: default avatarAvinash Patil <patila@marvell.com>
    Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
    04c7b363
main.h 41.8 KB