]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: Restore vif beacon interval if start ap fails
authorRakesh Pillai <pillair@codeaurora.org>
Fri, 15 Feb 2019 08:46:02 +0000 (14:16 +0530)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 15 Feb 2019 12:30:24 +0000 (13:30 +0100)
commit37a3412e11ddd63da7c3fd5ff14ac0ba2adced09
tree71c364088f0b80de1a739e8e2b783ec2f0cb18fb
parent9be7f4493566790d77ae0c67b14ca1a34999d852
mac80211: Restore vif beacon interval if start ap fails

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: f17ef23d1a6e ("cfg80211: support virtual interfaces with different beacon intervals")
Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/cfg.c