summaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-11-24 18:12:16 +0100
committerJohannes Berg <johannes.berg@intel.com>2014-11-27 17:36:47 +0100
commit2967e031d4d737d9cc8252d878a17924d7b704f0 (patch)
treef868e9a0fb7c1282d3a5c92f3280dd38431173f4 /net/mac80211/iface.c
parent601555cd75ddfc2b95ebbb5eb1224c6a995e8203 (diff)
downloadlinux-2967e031d4d737d9cc8252d878a17924d7b704f0.tar.gz
linux-2967e031d4d737d9cc8252d878a17924d7b704f0.tar.xz
mac80211: copy chandef from AP vif to VLANs
Instead of keeping track of all those special cases where VLAN interfaces have no bss_conf.chandef, just make sure they have the same as the AP interface they belong to. Among others, this fixes a crash getting a VLAN's channel from userspace since a NULL channel is returned as a good result (return value 0) for VLANs since the commit below. Cc: stable@vger.kernel.org [3.18 only] Fixes: c12bc4885f4b3 ("mac80211: return the vif's chandef in ieee80211_cfg_get_channel()") Signed-off-by: Felix Fietkau <nbd@openwrt.org> [rewrite commit log] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 82473d909bb6..96c4572c023e 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -520,6 +520,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
sdata->vif.cab_queue = master->vif.cab_queue;
memcpy(sdata->vif.hw_queue, master->vif.hw_queue,
sizeof(sdata->vif.hw_queue));
+ sdata->vif.bss_conf.chandef = master->vif.bss_conf.chandef;
break;
}
case NL80211_IFTYPE_AP: