diff options
author | Ashok Nagarajan <ashok@cozybit.com> | 2012-05-08 00:00:30 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-05-16 13:24:25 -0400 |
commit | 0e482db8d3713ad3a64a56e0dfe4fdf698fe7c1d (patch) | |
tree | 2505b2d5a523fedacf7c21eaee926a49995bb544 /net/mac80211/mesh.c | |
parent | 0d894ec5017f7f463254e24fd2206e41d13cadff (diff) |
mac80211: Fix don't use '>' operator for matching channel types
Johannes pointed out that the use of > operators for checking channel type
mismatch maynot be correct way as we may add other channel types in future.
Signed-off-by: Ashok Nagarajan <ashok@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mesh.c')
-rw-r--r-- | net/mac80211/mesh.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 0a21e4e55f43..d3a9a6c081e7 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -109,8 +109,10 @@ bool mesh_matches_local(struct ieee80211_sub_if_data *sdata, | |||
109 | 109 | ||
110 | /* Disallow HT40+/- mismatch */ | 110 | /* Disallow HT40+/- mismatch */ |
111 | if (ie->ht_operation && | 111 | if (ie->ht_operation && |
112 | local->_oper_channel_type > NL80211_CHAN_HT20 && | 112 | (local->_oper_channel_type == NL80211_CHAN_HT40MINUS || |
113 | sta_channel_type > NL80211_CHAN_HT20 && | 113 | local->_oper_channel_type == NL80211_CHAN_HT40PLUS) && |
114 | (sta_channel_type == NL80211_CHAN_HT40MINUS || | ||
115 | sta_channel_type == NL80211_CHAN_HT40PLUS) && | ||
114 | local->_oper_channel_type != sta_channel_type) | 116 | local->_oper_channel_type != sta_channel_type) |
115 | goto mismatch; | 117 | goto mismatch; |
116 | 118 | ||