]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: fix regression in multi-vif AP start
authorFelix Fietkau <nbd@openwrt.org>
Tue, 19 Jun 2012 00:50:57 +0000 (02:50 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 20 Jun 2012 09:10:43 +0000 (11:10 +0200)
commit863ce3c487a8e2a2f96ad6fdf2c06a07c90e60e8
tree79f89f85ca9f6aff2efa1f7f1aed319ae3c1a51f
parenta149c9e7e2755e3c7aeae46b1721ea24ed38523b
cfg80211: fix regression in multi-vif AP start

Commit "cfg80211: provide channel to start_ap function" assumes that the
channel is always passed to the NL80211_CMD_START_AP command, however
in case of multi-BSSID, hostapd only passes the channel for the first vif.
This makes starting beaconing on secondary vifs fail with -EINVAL.

Fix this by storing the channel provided to .start_ap in wdev->preset_chan
and picking the first AP vif's channel for secondary vifs if not provided.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c