Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e482db8 authored by Ashok Nagarajan's avatar Ashok Nagarajan Committed by John W. Linville
Browse files

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: default avatarAshok Nagarajan <ashok@cozybit.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 0d894ec5
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -109,8 +109,10 @@ bool mesh_matches_local(struct ieee80211_sub_if_data *sdata,


	/* Disallow HT40+/- mismatch */
	/* Disallow HT40+/- mismatch */
	if (ie->ht_operation &&
	if (ie->ht_operation &&
	    local->_oper_channel_type > NL80211_CHAN_HT20 &&
	    (local->_oper_channel_type == NL80211_CHAN_HT40MINUS ||
	    sta_channel_type > NL80211_CHAN_HT20 &&
	    local->_oper_channel_type == NL80211_CHAN_HT40PLUS) &&
	    (sta_channel_type == NL80211_CHAN_HT40MINUS ||
	     sta_channel_type == NL80211_CHAN_HT40PLUS) &&
	    local->_oper_channel_type != sta_channel_type)
	    local->_oper_channel_type != sta_channel_type)
		goto mismatch;
		goto mismatch;