aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mesh.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 8a952e04690a..0fabb8bae9fb 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -76,6 +76,7 @@ bool mesh_matches_local(struct ieee80211_sub_if_data *sdata,
76 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; 76 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
77 struct ieee80211_local *local = sdata->local; 77 struct ieee80211_local *local = sdata->local;
78 u32 basic_rates = 0; 78 u32 basic_rates = 0;
79 enum nl80211_channel_type sta_channel_type = NL80211_CHAN_NO_HT;
79 80
80 /* 81 /*
81 * As support for each feature is added, check for matching 82 * As support for each feature is added, check for matching
@@ -102,10 +103,15 @@ bool mesh_matches_local(struct ieee80211_sub_if_data *sdata,
102 if (sdata->vif.bss_conf.basic_rates != basic_rates) 103 if (sdata->vif.bss_conf.basic_rates != basic_rates)
103 goto mismatch; 104 goto mismatch;
104 105
105 /* disallow peering with mismatched channel types for now */ 106 if (ie->ht_operation)
107 sta_channel_type =
108 ieee80211_ht_oper_to_channel_type(ie->ht_operation);
109
110 /* Disallow HT40+/- mismatch */
106 if (ie->ht_operation && 111 if (ie->ht_operation &&
107 (local->_oper_channel_type != 112 local->_oper_channel_type > NL80211_CHAN_HT20 &&
108 ieee80211_ht_oper_to_channel_type(ie->ht_operation))) 113 sta_channel_type > NL80211_CHAN_HT20 &&
114 local->_oper_channel_type != sta_channel_type)
109 goto mismatch; 115 goto mismatch;
110 116
111 return true; 117 return true;