• Jussi Kivilinna's avatar
    zd1211rw: add beacon watchdog and setting HW beacon more failsafe · 9be23256
    Jussi Kivilinna authored
    When doing tx/rx at high packet rate (for example simply using ping -f),
    device starts to fail to respond to control messages. On non-AP modes
    this only causes problems for LED updating code but when we are running
    in AP-mode we are writing new beacon to HW usually every 100ms. Now if
    control message fails in HW beacon setup, device lock is kept locked
    and beacon data partially written. This can and usually does cause:
    
     1. HW beacon setup fail now on, as driver cannot acquire device lock.
     2. Beacon-done interrupt stop working as device has incomplete beacon.
    
    Therefore make zd_mac_config_beacon() always try to release device lock
    and add beacon watchdog to restart beaconing when stall is detected.
    
    Also fix zd_mac_config_beacon() try acquiring device lock for max 500ms,
    as what old code appeared to be trying to do using loop and msleep(1).
    Signed-off-by: default avatarJussi Kivilinna <jussi.kivilinna@mbnet.fi>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    9be23256
zd_mac.h 8.93 KB