• Ben Greear's avatar
    ath9k: fix regression in bssidmask calculation · daad1660
    Ben Greear authored
    The commit that went into 3.17:
    
        ath9k: Summarize hw state per channel context
    
        Group and set hw state (opmode, primary_sta, beacon conf) per
        channel context instead of whole list of vifs. This would allow
        each channel context to run in different mode (STA/AP).
    Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
    Signed-off-by: default avatarRajkumar Manoharan <rmanohar@qti.qualcomm.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    
    broke multi-vif configuration due to not properly calculating
    the bssid mask.
    
    The test case that caught this was:
    
     create wlan0 and sta0-4 (6 total), not sure how much that matters.
     associate all 6 (works fine)
     disconnect 5 of them, leaving sta0 up
     Start trying to bring up the other 5 one at a time.  It will
     fail, with iw events looking like this (in these logs, several
     sta are trying to come up, but symptom is the same with just one)
    
    The patch causing the regression made quite a few changes, but
    the part I think caused this particular problem was not
    recalculating the bssid mask when adding and removing interfaces.
    
    Re-adding those calls fixes my test case.  Fix bad comment
    as well.
    Signed-off-by: default avatarBen Greear <greearb@candelatech.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    daad1660
main.c 60 KB