• Rajeev Kumar Sirasanagandla's avatar
    cfg80211: Avoid regulatory restore when COUNTRY_IE_IGNORE is set · c2f459d3
    Rajeev Kumar Sirasanagandla authored
    [ Upstream commit 7417844b ]
    
    When REGULATORY_COUNTRY_IE_IGNORE is set,  __reg_process_hint_country_ie()
    ignores the country code change request from __cfg80211_connect_result()
    via regulatory_hint_country_ie().
    
    After Disconnect, similar to above, country code should not be reset to
    world when country IE ignore is set. But this is violated and restore of
    regulatory settings is invoked by cfg80211_disconnect_work via
    regulatory_hint_disconnect().
    
    To address this, avoid regulatory restore from regulatory_hint_disconnect()
    when COUNTRY_IE_IGNORE is set.
    
    Note: Currently, restore_regulatory_settings() takes care of clearing
    beacon hints. But in the proposed change, regulatory restore is avoided.
    Therefore, explicitly clear beacon hints when DISABLE_BEACON_HINTS
    is not set.
    Signed-off-by: default avatarRajeev Kumar Sirasanagandla <rsirasan@codeaurora.org>
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    c2f459d3
reg.c 101 KB