Skip to content

Commit 6ef9e2f

Browse files
Felix Fietkaulinvjw
authored andcommitted
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: [email protected] Signed-off-by: Felix Fietkau <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
1 parent 3e7a4ff commit 6ef9e2f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/net/wireless/rt2x00/rt2x00dev.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,8 +1236,10 @@ static inline void rt2x00lib_set_if_combinations(struct rt2x00_dev *rt2x00dev)
12361236
*/
12371237
if_limit = &rt2x00dev->if_limits_ap;
12381238
if_limit->max = rt2x00dev->ops->max_ap_intf;
1239-
if_limit->types = BIT(NL80211_IFTYPE_AP) |
1240-
BIT(NL80211_IFTYPE_MESH_POINT);
1239+
if_limit->types = BIT(NL80211_IFTYPE_AP);
1240+
#ifdef CONFIG_MAC80211_MESH
1241+
if_limit->types |= BIT(NL80211_IFTYPE_MESH_POINT);
1242+
#endif
12411243

12421244
/*
12431245
* Build up AP interface combinations structure.
@@ -1309,7 +1311,9 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
13091311
rt2x00dev->hw->wiphy->interface_modes |=
13101312
BIT(NL80211_IFTYPE_ADHOC) |
13111313
BIT(NL80211_IFTYPE_AP) |
1314+
#ifdef CONFIG_MAC80211_MESH
13121315
BIT(NL80211_IFTYPE_MESH_POINT) |
1316+
#endif
13131317
BIT(NL80211_IFTYPE_WDS);
13141318

13151319
rt2x00dev->hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;

0 commit comments

Comments
 (0)