[iwm] Fix inverted logic in iwm_tx().

The PROT_REQUIRE flag in should be set for data frames above a certain
    length, but we were setting it for !data frames above a certain length,
    which makes no sense at all.

    Taken-From: OpenBSD, Linux iwlwifi

Approved by:	adrian (mentor)
Obtained from:	DragonFlyBSD git 8cc03924a36c572c2908e659e624f44636dc2b33
Differential Revision:	https://reviews.freebsd.org/D7323
This commit is contained in:
Imre Vadász 2016-07-27 20:43:08 +00:00
parent f99ba4823c
commit 74adf80539

View File

@ -3344,7 +3344,7 @@ iwm_tx(struct iwm_softc *sc, struct mbuf *m, struct ieee80211_node *ni, int ac)
flags |= IWM_TX_CMD_FLG_ACK;
}
if (type != IEEE80211_FC0_TYPE_DATA
if (type == IEEE80211_FC0_TYPE_DATA
&& (totlen + IEEE80211_CRC_LEN > vap->iv_rtsthreshold)
&& !IEEE80211_IS_MULTICAST(wh->i_addr1)) {
flags |= IWM_TX_CMD_FLG_PROT_REQUIRE;