• Johannes Berg's avatar
    iwlagn: fix iwl_is_any_associated · 054ec924
    Johannes Berg authored
    The function iwl_is_any_associated() was intended
    to check both contexts, but due to an oversight
    it only checks the BSS context. This leads to a
    problem with scanning since the passive dwell
    time isn't restricted appropriately and a scan
    that includes passive channels will never finish
    if only the PAN context is associated since the
    default dwell time of 120ms won't fit into the
    normal 100 TU DTIM interval.
    
    Fix the function by using for_each_context() and
    also reorganise the other functions a bit to take
    advantage of each other making the code easier to
    read.
    
    Cc: stable@kernel.org
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    054ec924
iwl-dev.h 42 KB