aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/xmit.c
diff options
context:
space:
mode:
authorSylvain Roger Rieunier <sylvain.roger.rieunier@gmail.com>2014-02-27 08:36:06 -0500
committerJohn W. Linville <linville@tuxdriver.com>2014-03-03 15:35:55 -0500
commit727b662c2b3476840b7fef7a44685fb0a0898c48 (patch)
treea4d940bba67bc757bb4fc9f2be1ea43d6db22ca3 /drivers/net/wireless/ath/ath9k/xmit.c
parentc8e4955653a470ece7bf580c84fc88eb58cc9850 (diff)
ath9k: fix invalid max frame length
According to 802.11n-2012 standard in paragraph PPDU Fromat(20.3.2) HT-mixed format Hearder PPDU contains : L_STF, L_LTF, L_SIG, HT_SIG, HT_STF, HT_LTF they are symbols in the preamble, there are in time unit(us) that's for why it can't be computed in bytes Signed-off-by: Sylvain ROGER RIEUNIER <sylvain.roger.rieunier@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/xmit.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 8f28711cfd4e..306ea322c65d 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1040,11 +1040,11 @@ static int ath_max_framelen(int usec, int mcs, bool ht40, bool sgi)
1040 int symbols, bits; 1040 int symbols, bits;
1041 int bytes = 0; 1041 int bytes = 0;
1042 1042
1043 usec -= L_STF + L_LTF + L_SIG + HT_SIG + HT_STF + HT_LTF(streams);
1043 symbols = sgi ? TIME_SYMBOLS_HALFGI(usec) : TIME_SYMBOLS(usec); 1044 symbols = sgi ? TIME_SYMBOLS_HALFGI(usec) : TIME_SYMBOLS(usec);
1044 bits = symbols * bits_per_symbol[mcs % 8][ht40] * streams; 1045 bits = symbols * bits_per_symbol[mcs % 8][ht40] * streams;
1045 bits -= OFDM_PLCP_BITS; 1046 bits -= OFDM_PLCP_BITS;
1046 bytes = bits / 8; 1047 bytes = bits / 8;
1047 bytes -= L_STF + L_LTF + L_SIG + HT_SIG + HT_STF + HT_LTF(streams);
1048 if (bytes > 65532) 1048 if (bytes > 65532)
1049 bytes = 65532; 1049 bytes = 65532;
1050 1050