diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-02-26 16:09:55 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-02-27 14:12:52 -0500 |
commit | 6ef9e2f6d12ce9e2120916804d2ddd46b954a70b (patch) | |
tree | c67ad59676c72f393acc0e4a47ec01d157b698bb | |
parent | 3e7a4ff7c5b6423ddb644df9c41b8b6d2fb79d30 (diff) | |
download | linux-3.10-6ef9e2f6d12ce9e2120916804d2ddd46b954a70b.tar.gz linux-3.10-6ef9e2f6d12ce9e2120916804d2ddd46b954a70b.tar.bz2 linux-3.10-6ef9e2f6d12ce9e2120916804d2ddd46b954a70b.zip |
rt2x00: error in configurations with mesh support disabled
If CONFIG_MAC80211_MESH is not set, cfg80211 will now allow advertising
interface combinations with NL80211_IFTYPE_MESH_POINT present.
Add appropriate ifdefs to avoid running into errors.
Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 1031db66474..189744db65e 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c @@ -1236,8 +1236,10 @@ static inline void rt2x00lib_set_if_combinations(struct rt2x00_dev *rt2x00dev) */ if_limit = &rt2x00dev->if_limits_ap; if_limit->max = rt2x00dev->ops->max_ap_intf; - if_limit->types = BIT(NL80211_IFTYPE_AP) | - BIT(NL80211_IFTYPE_MESH_POINT); + if_limit->types = BIT(NL80211_IFTYPE_AP); +#ifdef CONFIG_MAC80211_MESH + if_limit->types |= BIT(NL80211_IFTYPE_MESH_POINT); +#endif /* * Build up AP interface combinations structure. @@ -1309,7 +1311,9 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev) rt2x00dev->hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_ADHOC) | BIT(NL80211_IFTYPE_AP) | +#ifdef CONFIG_MAC80211_MESH BIT(NL80211_IFTYPE_MESH_POINT) | +#endif BIT(NL80211_IFTYPE_WDS); rt2x00dev->hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; |