]> git.karo-electronics.de Git - linux-beck.git/commitdiff
wl12xx: Set IEEE80211_TX_RC_SHORT_GI if short GI was used on
authorPontus Fuchs <pontus.fuchs@gmail.com>
Tue, 31 Jan 2012 15:54:41 +0000 (17:54 +0200)
committerLuciano Coelho <coelho@ti.com>
Wed, 15 Feb 2012 06:38:32 +0000 (08:38 +0200)
New FW reports usage of short GI as a rate class index. Check for
this rate and set the IEEE80211_TX_RC_SHORT_GI if used.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/wl12xx/conf.h
drivers/net/wireless/wl12xx/main.c
drivers/net/wireless/wl12xx/tx.c

index 209f053129095772635e9ab583924b5fea17cbe8..1147396bf7ebfe8b43edacba229c178509a4d78d 100644 (file)
@@ -66,7 +66,8 @@ enum {
 };
 
 enum {
-       CONF_HW_RXTX_RATE_MCS7 = 0,
+       CONF_HW_RXTX_RATE_MCS7_SGI = 0,
+       CONF_HW_RXTX_RATE_MCS7,
        CONF_HW_RXTX_RATE_MCS6,
        CONF_HW_RXTX_RATE_MCS5,
        CONF_HW_RXTX_RATE_MCS4,
@@ -92,7 +93,7 @@ enum {
 };
 
 /* Rates between and including these are MCS rates */
-#define CONF_HW_RXTX_RATE_MCS_MIN CONF_HW_RXTX_RATE_MCS7
+#define CONF_HW_RXTX_RATE_MCS_MIN CONF_HW_RXTX_RATE_MCS7_SGI
 #define CONF_HW_RXTX_RATE_MCS_MAX CONF_HW_RXTX_RATE_MCS0
 
 enum {
index 4ca7278201ec663f01dba71fceee2c34f77f4fb8..fa2bf307aa0d9def8ec4d34b2f5f169e116743d1 100644 (file)
@@ -4406,6 +4406,7 @@ static struct ieee80211_channel wl1271_channels[] = {
 /* mapping to indexes for wl1271_rates */
 static const u8 wl1271_rate_to_idx_2ghz[] = {
        /* MCS rates are used only with 11n */
+       7,                            /* CONF_HW_RXTX_RATE_MCS7_SGI */
        7,                            /* CONF_HW_RXTX_RATE_MCS7 */
        6,                            /* CONF_HW_RXTX_RATE_MCS6 */
        5,                            /* CONF_HW_RXTX_RATE_MCS5 */
@@ -4527,6 +4528,7 @@ static struct ieee80211_channel wl1271_channels_5ghz[] = {
 /* mapping to indexes for wl1271_rates_5ghz */
 static const u8 wl1271_rate_to_idx_5ghz[] = {
        /* MCS rates are used only with 11n */
+       7,                            /* CONF_HW_RXTX_RATE_MCS7_SGI */
        7,                            /* CONF_HW_RXTX_RATE_MCS7 */
        6,                            /* CONF_HW_RXTX_RATE_MCS6 */
        5,                            /* CONF_HW_RXTX_RATE_MCS5 */
index f95112f6769fae2ce029f99ea87274b6679697fe..ee313e7ce8fea0dab4e1430896872a7193c793b0 100644 (file)
@@ -766,10 +766,14 @@ out:
 
 static u8 wl1271_tx_get_rate_flags(u8 rate_class_index)
 {
+       u8 flags = 0;
+
        if (rate_class_index >= CONF_HW_RXTX_RATE_MCS_MIN &&
            rate_class_index <= CONF_HW_RXTX_RATE_MCS_MAX)
-               return IEEE80211_TX_RC_MCS;
-       return 0;
+               flags |= IEEE80211_TX_RC_MCS;
+       if (rate_class_index == CONF_HW_RXTX_RATE_MCS7_SGI)
+               flags |= IEEE80211_TX_RC_SHORT_GI;
+       return flags;
 }
 
 static void wl1271_tx_complete_packet(struct wl1271 *wl,