• Rakesh Pillai's avatar
    mac80211: Restore vif beacon interval if start ap fails · 5f9d7b24
    Rakesh Pillai authored
    commit 83e37e0b upstream.
    
    The starting of AP interface can fail due to invalid
    beacon interval, which does not match the minimum gcd
    requirement set by the wifi driver. In such case, the
    beacon interval of that interface gets updated with
    that invalid beacon interval.
    
    The next time that interface is brought up in AP mode,
    an interface combination check is performed and the
    beacon interval is taken from the previously set value.
    
    In a case where an invalid beacon interval, i.e. a beacon
    interval value which does not satisfy the minimum gcd criteria
    set by the driver, is set, all the subsequent trials to
    bring that interface in AP mode will fail, even if the
    subsequent trials have a valid beacon interval.
    
    To avoid this, in case of a failure in bringing up an
    interface in AP mode due to interface combination error,
    the interface beacon interval which is stored in bss
    conf, needs to be restored with the last working value
    of beacon interval.
    
    Tested on ath10k using WCN3990.
    
    Cc: stable@vger.kernel.org
    Fixes: 0c317a02 ("cfg80211: support virtual interfaces with different beacon intervals")
    Signed-off-by: default avatarRakesh Pillai <pillair@codeaurora.org>
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    5f9d7b24
cfg.c 99.9 KB