diff options
Diffstat (limited to 'drivers/staging/rtl8192e/rtl819x_HTProc.c')
-rw-r--r-- | drivers/staging/rtl8192e/rtl819x_HTProc.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c index 9820dd2..573325c 100644 --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c @@ -135,25 +135,22 @@ u16 TxCountToDataRate(struct rtllib_device *ieee, u8 nDataRate) u8 is40MHz = 0; u8 isShortGI = 0; - if (nDataRate < 12) { + if (nDataRate < 12) return CCKOFDMRate[nDataRate]; - } else { - if (nDataRate >= 0x10 && nDataRate <= 0x1f) { - is40MHz = 0; - isShortGI = 0; - } else if (nDataRate >= 0x20 && nDataRate <= 0x2f) { - is40MHz = 1; - isShortGI = 0; - - } else if (nDataRate >= 0x30 && nDataRate <= 0x3f) { - is40MHz = 0; - isShortGI = 1; - } else if (nDataRate >= 0x40 && nDataRate <= 0x4f) { - is40MHz = 1; - isShortGI = 1; - } - return MCS_DATA_RATE[is40MHz][isShortGI][nDataRate&0xf]; + if (nDataRate >= 0x10 && nDataRate <= 0x1f) { + is40MHz = 0; + isShortGI = 0; + } else if (nDataRate >= 0x20 && nDataRate <= 0x2f) { + is40MHz = 1; + isShortGI = 0; + } else if (nDataRate >= 0x30 && nDataRate <= 0x3f) { + is40MHz = 0; + isShortGI = 1; + } else if (nDataRate >= 0x40 && nDataRate <= 0x4f) { + is40MHz = 1; + isShortGI = 1; } + return MCS_DATA_RATE[is40MHz][isShortGI][nDataRate&0xf]; } bool IsHTHalfNmodeAPs(struct rtllib_device *ieee) |