mac80211: Fix incorrect condition when checking rx timestamp
authorAvraham Stern <avraham.stern@intel.com>
Mon, 12 Jun 2017 07:44:58 +0000 (10:44 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 13 Jun 2017 08:24:32 +0000 (10:24 +0200)
If the driver reports the rx timestamp at PLCP start, mac80211 can
only handle legacy encoding, but the code checks that the encoding
is not legacy. Fix this.

Fixes: da6a4352e7c8 ("mac80211: separate encoding/bandwidth from flags")
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ieee80211_i.h

index 665501ac358f8d83630f2727fe6249dcfeeb9689..5e002f62c235fbae4c5154ef9eab65c0e5f842b8 100644 (file)
@@ -1531,7 +1531,7 @@ ieee80211_have_rx_timestamp(struct ieee80211_rx_status *status)
                return true;
        /* can't handle non-legacy preamble yet */
        if (status->flag & RX_FLAG_MACTIME_PLCP_START &&
-           status->encoding != RX_ENC_LEGACY)
+           status->encoding == RX_ENC_LEGACY)
                return true;
        return false;
 }