• Luciano Coelho's avatar
    wl12xx: fix oops in sched_scan when forcing a passive scan · 66870b1c
    Luciano Coelho authored
    Fix kernel oops when trying to use passive scheduled scans.  The
    reason was that in passive scans there are no SSIDs, so there was a
    NULL pointer dereference.
    
    To solve the problem, we now check the number of SSIDs provided in the
    sched_scan request and only access the list if there's one or more
    (ie. passive scan is not forced).  We also force all the channels to
    be passive by adding the IEEE80211_CHAN_PASSIVE_SCAN flag locally
    before the checks in the wl1271_scan_get_sched_scan_channels()
    function.
    Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    66870b1c
scan.c 15.1 KB