ath5k: set short preamble flag for rx
authorBruno Randolf <br1@einfach.org>
Tue, 5 Aug 2008 17:32:23 +0000 (19:32 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 22 Aug 2008 20:29:59 +0000 (16:29 -0400)
set the short preamble flag in ieee80211_rx_status for frames received with a
short preamble.

drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath5k/base.c

index c1de1ef09e59bfa812620215bd702118dcaa7483..cd598c0d8d6db1ccfc31d3f91d15fc2ca24a6746 100644 (file)
@@ -1763,12 +1763,10 @@ accept:
                rxs.rate_idx = ath5k_hw_to_driver_rix(sc, rs.rs_rate);
                rxs.flag |= ath5k_rx_decrypted(sc, ds, skb, &rs);
 
-#if 0          /* add rxs.flag SHORTPRE once it is in mac80211 */
-               if (rs.rs_rate >= ATH5K_RATE_CODE_2M &&
-                   rs.rs_rate <= ATH5K_RATE_CODE_11M &&
-                   rs.rs_rate & AR5K_SET_SHORT_PREAMBLE)
+               if (rxs.rate_idx >= 0 && rs.rs_rate ==
+                   sc->curband->bitrates[rxs.rate_idx].hw_value_short)
                        rxs.flag |= RX_FLAG_SHORTPRE;
-#endif
+
                ath5k_debug_dump_skb(sc, skb, "RX  ", 0);
 
                /* check beacons in IBSS mode */