mac80211: rename RX_FLAG_TSFT
authorJohannes Berg <johannes.berg@intel.com>
Wed, 23 Feb 2011 14:06:08 +0000 (15:06 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 23 Feb 2011 21:25:29 +0000 (16:25 -0500)
The flag isn't very descriptive -- the intention
is that the driver provides a TSF timestamp at
the beginning of the MPDU -- make that clearer
by renaming the flag to RX_FLAG_MACTIME_MPDU.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 files changed:
drivers/net/wireless/ath/ath5k/base.c
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
drivers/net/wireless/ath/ath9k/recv.c
drivers/net/wireless/b43/xmit.c
drivers/net/wireless/b43legacy/xmit.c
drivers/net/wireless/iwlegacy/iwl-4965-lib.c
drivers/net/wireless/iwlwifi/iwl-agn-lib.c
drivers/net/wireless/p54/txrx.c
drivers/net/wireless/rtl818x/rtl8180/dev.c
drivers/net/wireless/rtl818x/rtl8187/dev.c
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
drivers/net/wireless/wl1251/rx.c
drivers/staging/brcm80211/sys/wlc_mac80211.c
include/net/mac80211.h
net/mac80211/ibss.c
net/mac80211/rx.c

index dbc45e085434589d5dda66d46fd79d6be6cedfae..80d9cf0c4cd28747836ba91f150cdba3d5256848 100644 (file)
@@ -1361,7 +1361,7 @@ ath5k_receive_frame(struct ath5k_softc *sc, struct sk_buff *skb,
         * right now, so it's not too bad...
         */
        rxs->mactime = ath5k_extend_tsf(sc->ah, rs->rs_tstamp);
-       rxs->flag |= RX_FLAG_TSFT;
+       rxs->flag |= RX_FLAG_MACTIME_MPDU;
 
        rxs->freq = sc->curchan->center_freq;
        rxs->band = sc->curchan->band;
index 564ac13596f1fe484e584ede1535b6549fd9c72b..4a4f27ba96afdbbba1f47632203464815122e316 100644 (file)
@@ -616,7 +616,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
        rx_status->freq = hw->conf.channel->center_freq;
        rx_status->signal =  rxbuf->rxstatus.rs_rssi + ATH_DEFAULT_NOISE_FLOOR;
        rx_status->antenna = rxbuf->rxstatus.rs_antenna;
-       rx_status->flag |= RX_FLAG_TSFT;
+       rx_status->flag |= RX_FLAG_MACTIME_MPDU;
 
        return true;
 
index daf171d2f610234b377f327e1f1e836b31f7de30..cb559e345b865ebb8aba346a72a6dbefe89ac3b0 100644 (file)
@@ -983,7 +983,7 @@ static int ath9k_rx_skb_preprocess(struct ath_common *common,
        rx_status->freq = hw->conf.channel->center_freq;
        rx_status->signal = ATH_DEFAULT_NOISE_FLOOR + rx_stats->rs_rssi;
        rx_status->antenna = rx_stats->rs_antenna;
-       rx_status->flag |= RX_FLAG_TSFT;
+       rx_status->flag |= RX_FLAG_MACTIME_MPDU;
 
        return 0;
 }
index e6b0528f3b52a31d38fb2c93e3a609f1eae14d2e..ad605bcdd40e450cafd0ec53771051b47828430d 100644 (file)
@@ -652,7 +652,7 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
                status.mactime += mactime;
                if (low_mactime_now <= mactime)
                        status.mactime -= 0x10000;
-               status.flag |= RX_FLAG_TSFT;
+               status.flag |= RX_FLAG_MACTIME_MPDU;
        }
 
        chanid = (chanstat & B43_RX_CHAN_ID) >> B43_RX_CHAN_ID_SHIFT;
index 7d177d97f1f7ff82803ed6dbbeabd4ce3bdb594f..3a95541708a6f2e244890c0e73da940534986185 100644 (file)
@@ -572,7 +572,7 @@ void b43legacy_rx(struct b43legacy_wldev *dev,
                status.mactime += mactime;
                if (low_mactime_now <= mactime)
                        status.mactime -= 0x10000;
-               status.flag |= RX_FLAG_TSFT;
+               status.flag |= RX_FLAG_MACTIME_MPDU;
        }
 
        chanid = (chanstat & B43legacy_RX_CHAN_ID) >>
index c1a24946715e92d4885769ad2a062a74fbb201b3..bd9618a4269d96f3e996e813fbee352689c85729 100644 (file)
@@ -639,7 +639,7 @@ void iwl4965_rx_reply_rx(struct iwl_priv *priv,
 
        /* TSF isn't reliable. In order to allow smooth user experience,
         * this W/A doesn't propagate it to the mac80211 */
-       /*rx_status.flag |= RX_FLAG_TSFT;*/
+       /*rx_status.flag |= RX_FLAG_MACTIME_MPDU;*/
 
        priv->ucode_beacon_time = le32_to_cpu(phy_res->beacon_time_stamp);
 
index 325ff5c89ee85a9351ead5399ddc0dd543155e05..0d0572ca7e7792e3d29302f1d3053df4dd7dbfca 100644 (file)
@@ -1173,7 +1173,7 @@ void iwlagn_rx_reply_rx(struct iwl_priv *priv,
 
        /* TSF isn't reliable. In order to allow smooth user experience,
         * this W/A doesn't propagate it to the mac80211 */
-       /*rx_status.flag |= RX_FLAG_TSFT;*/
+       /*rx_status.flag |= RX_FLAG_MACTIME_MPDU;*/
 
        priv->ucode_beacon_time = le32_to_cpu(phy_res->beacon_time_stamp);
 
index 917d5d948e3ceeb0c3ad8eef50527abd06918e57..a408ff333920ddaafea1b9b9895f713b32ab47a3 100644 (file)
@@ -367,7 +367,7 @@ static int p54_rx_data(struct p54_common *priv, struct sk_buff *skb)
        rx_status->mactime = ((u64)priv->tsf_high32) << 32 | tsf32;
        priv->tsf_low32 = tsf32;
 
-       rx_status->flag |= RX_FLAG_TSFT;
+       rx_status->flag |= RX_FLAG_MACTIME_MPDU;
 
        if (hdr->flags & cpu_to_le16(P54_HDR_FLAG_DATA_ALIGN))
                header_len += hdr->align[0];
index 5851cbc1e9577a08758f880d388c69f5c8f1d694..b85debb4f7b108d0c277e319c04ece00392ed565 100644 (file)
@@ -146,7 +146,7 @@ static void rtl8180_handle_rx(struct ieee80211_hw *dev)
                        rx_status.freq = dev->conf.channel->center_freq;
                        rx_status.band = dev->conf.channel->band;
                        rx_status.mactime = le64_to_cpu(entry->tsft);
-                       rx_status.flag |= RX_FLAG_TSFT;
+                       rx_status.flag |= RX_FLAG_MACTIME_MPDU;
                        if (flags & RTL818X_RX_DESC_FLAG_CRC32_ERR)
                                rx_status.flag |= RX_FLAG_FAILED_FCS_CRC;
 
index 6b82cac37ee3332c7e34e0430fac49a7732e3b62..1f5df12cb15639bb9426bfa00a8e53a466138e38 100644 (file)
@@ -373,7 +373,7 @@ static void rtl8187_rx_cb(struct urb *urb)
        rx_status.rate_idx = rate;
        rx_status.freq = dev->conf.channel->center_freq;
        rx_status.band = dev->conf.channel->band;
-       rx_status.flag |= RX_FLAG_TSFT;
+       rx_status.flag |= RX_FLAG_MACTIME_MPDU;
        if (flags & RTL818X_RX_DESC_FLAG_CRC32_ERR)
                rx_status.flag |= RX_FLAG_FAILED_FCS_CRC;
        memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
index 01b95427fee05749d0b7f688f86c38f77e0a3974..8a67372f71fbb028f3362f47f2a9ba32eb0e7767 100644 (file)
@@ -691,7 +691,7 @@ bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
        if (GET_RX_DESC_RXHT(pdesc))
                rx_status->flag |= RX_FLAG_HT;
 
-       rx_status->flag |= RX_FLAG_TSFT;
+       rx_status->flag |= RX_FLAG_MACTIME_MPDU;
 
        if (stats->decrypted)
                rx_status->flag |= RX_FLAG_DECRYPTED;
index 9855c3e0a4b294d146bf283aa9793fc1950f84ca..659e0ca95c64716406d790d03baa12efa76fdd69 100644 (file)
@@ -334,7 +334,7 @@ bool rtl92cu_rx_query_desc(struct ieee80211_hw *hw,
                rx_status->flag |= RX_FLAG_40MHZ;
        if (GET_RX_DESC_RX_HT(pdesc))
                rx_status->flag |= RX_FLAG_HT;
-       rx_status->flag |= RX_FLAG_TSFT;
+       rx_status->flag |= RX_FLAG_MACTIME_MPDU;
        if (stats->decrypted)
                rx_status->flag |= RX_FLAG_DECRYPTED;
        rx_status->rate_idx = _rtl92c_rate_mapping(hw,
index b659e15c78dffe49528cb7e11154e2ff39f88970..c1b3b3f03da257ca567c79a0dfcdc4af47fd387c 100644 (file)
@@ -81,7 +81,7 @@ static void wl1251_rx_status(struct wl1251 *wl,
        status->freq = ieee80211_channel_to_frequency(desc->channel,
                                                      status->band);
 
-       status->flag |= RX_FLAG_TSFT;
+       status->flag |= RX_FLAG_MACTIME_MPDU;
 
        if (desc->flags & RX_DESC_ENCRYPTION_MASK) {
                status->flag |= RX_FLAG_IV_STRIPPED | RX_FLAG_MMIC_STRIPPED;
index 1d5d01ac0a9b384e7b9c6d08f9b821f695d38f36..f305bf9486173fd27d40e552e29bea564cb64630 100644 (file)
@@ -6819,11 +6819,14 @@ prep_mac80211_status(struct wlc_info *wlc, d11rxhdr_t *rxh, struct sk_buff *p,
        ratespec_t rspec;
        unsigned char *plcp;
 
+#if 0
+       /* Clearly, this is bogus -- reading the TSF now is wrong */
        wlc_read_tsf(wlc, &tsf_l, &tsf_h);      /* mactime */
        rx_status->mactime = tsf_h;
        rx_status->mactime <<= 32;
        rx_status->mactime |= tsf_l;
-       rx_status->flag |= RX_FLAG_TSFT;
+       rx_status->flag |= RX_FLAG_MACTIME_MPDU; /* clearly wrong */
+#endif
 
        channel = WLC_CHAN_CHANNEL(rxh->RxChan);
 
index 8fcd1691cfb71b32b34d0ac07e6f9694822af0c5..a13c8d8fca5c4d2a30e7c97f5d5b1337e8822e6a 100644 (file)
@@ -599,9 +599,10 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info)
  *     the frame.
  * @RX_FLAG_FAILED_PLCP_CRC: Set this flag if the PCLP check failed on
  *     the frame.
- * @RX_FLAG_TSFT: The timestamp passed in the RX status (@mactime field)
- *     is valid. This is useful in monitor mode and necessary for beacon frames
- *     to enable IBSS merging.
+ * @RX_FLAG_MACTIME_MPDU: The timestamp passed in the RX status (@mactime
+ *     field) is valid and contains the time the first symbol of the MPDU
+ *     was received. This is useful in monitor mode and for proper IBSS
+ *     merging.
  * @RX_FLAG_SHORTPRE: Short preamble was used for this frame
  * @RX_FLAG_HT: HT MCS was used and rate_idx is MCS index
  * @RX_FLAG_40MHZ: HT40 (40 MHz) was used
@@ -614,7 +615,7 @@ enum mac80211_rx_flags {
        RX_FLAG_IV_STRIPPED     = 1<<4,
        RX_FLAG_FAILED_FCS_CRC  = 1<<5,
        RX_FLAG_FAILED_PLCP_CRC = 1<<6,
-       RX_FLAG_TSFT            = 1<<7,
+       RX_FLAG_MACTIME_MPDU    = 1<<7,
        RX_FLAG_SHORTPRE        = 1<<8,
        RX_FLAG_HT              = 1<<9,
        RX_FLAG_40MHZ           = 1<<10,
index a42aa61269eafd2d292628a3fe7de44940e13fdc..463271f9492eb5eab9e7d8b9509125214127e42f 100644 (file)
@@ -355,7 +355,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
        if (memcmp(cbss->bssid, sdata->u.ibss.bssid, ETH_ALEN) == 0)
                goto put_bss;
 
-       if (rx_status->flag & RX_FLAG_TSFT) {
+       if (rx_status->flag & RX_FLAG_MACTIME_MPDU) {
                /*
                 * For correct IBSS merging we need mactime; since mactime is
                 * defined as the time the first data symbol of the frame hits
index f502634d43afc5ff52986a4fa167e72acf77529e..5b534235d6be8e4065aaf29d63c634bb44587ff8 100644 (file)
@@ -77,7 +77,7 @@ ieee80211_rx_radiotap_len(struct ieee80211_local *local,
        /* always present fields */
        len = sizeof(struct ieee80211_radiotap_header) + 9;
 
-       if (status->flag & RX_FLAG_TSFT)
+       if (status->flag & RX_FLAG_MACTIME_MPDU)
                len += 8;
        if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM)
                len += 1;
@@ -123,7 +123,7 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
        /* the order of the following fields is important */
 
        /* IEEE80211_RADIOTAP_TSFT */
-       if (status->flag & RX_FLAG_TSFT) {
+       if (status->flag & RX_FLAG_MACTIME_MPDU) {
                put_unaligned_le64(status->mactime, pos);
                rthdr->it_present |=
                        cpu_to_le32(1 << IEEE80211_RADIOTAP_TSFT);