• Bob Copeland's avatar
    ath5k: Fix loop variable initializations · 89fd2e28
    Bob Copeland authored
    In ath5k_tasklet_rx, both status structures 'rxs' and 'rs' are
    initialized at the top of the tasklet, but not within the loop.
    If the loop is executed multiple times in the tasklet then the
    variables may see changes from previous packets.
    
    For TKIP, this results in 'Invalid Michael MIC' errors if two packets
    are processed in the tasklet: rxs.flag gets set to RX_DECRYPTED by
    mac80211 when it decrypts the first encrypted packet.  The subsequent
    packet will have RX_DECRYPTED set upon entry to mac80211, so mac80211
    will not try to decrypt it.
    
    We currently initialize all but two fields in the structures, so fix
    the other two.
    Signed-off-by: default avatarBob Copeland <me@bobcopeland.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    89fd2e28
base.c 82 KB