diff options
author | Pontus Fuchs <pontus.fuchs@gmail.com> | 2012-01-31 10:54:41 -0500 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-02-15 01:38:32 -0500 |
commit | defe02c720d54fc9bda3e5e625be70adac347a61 (patch) | |
tree | 6f6f2a6a92b107da5e9cf9494b14d236fa9f581f /drivers | |
parent | d2e2d769e3d328ba7cbf08e8ed85e3f817915843 (diff) |
wl12xx: Set IEEE80211_TX_RC_SHORT_GI if short GI was used on
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/conf.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/tx.c | 8 |
3 files changed, 11 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/conf.h b/drivers/net/wireless/wl12xx/conf.h index 209f05312909..1147396bf7eb 100644 --- a/drivers/net/wireless/wl12xx/conf.h +++ b/drivers/net/wireless/wl12xx/conf.h | |||
@@ -66,7 +66,8 @@ enum { | |||
66 | }; | 66 | }; |
67 | 67 | ||
68 | enum { | 68 | enum { |
69 | CONF_HW_RXTX_RATE_MCS7 = 0, | 69 | CONF_HW_RXTX_RATE_MCS7_SGI = 0, |
70 | CONF_HW_RXTX_RATE_MCS7, | ||
70 | CONF_HW_RXTX_RATE_MCS6, | 71 | CONF_HW_RXTX_RATE_MCS6, |
71 | CONF_HW_RXTX_RATE_MCS5, | 72 | CONF_HW_RXTX_RATE_MCS5, |
72 | CONF_HW_RXTX_RATE_MCS4, | 73 | CONF_HW_RXTX_RATE_MCS4, |
@@ -92,7 +93,7 @@ enum { | |||
92 | }; | 93 | }; |
93 | 94 | ||
94 | /* Rates between and including these are MCS rates */ | 95 | /* Rates between and including these are MCS rates */ |
95 | #define CONF_HW_RXTX_RATE_MCS_MIN CONF_HW_RXTX_RATE_MCS7 | 96 | #define CONF_HW_RXTX_RATE_MCS_MIN CONF_HW_RXTX_RATE_MCS7_SGI |
96 | #define CONF_HW_RXTX_RATE_MCS_MAX CONF_HW_RXTX_RATE_MCS0 | 97 | #define CONF_HW_RXTX_RATE_MCS_MAX CONF_HW_RXTX_RATE_MCS0 |
97 | 98 | ||
98 | enum { | 99 | enum { |
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 4ca7278201ec..fa2bf307aa0d 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -4406,6 +4406,7 @@ static struct ieee80211_channel wl1271_channels[] = { | |||
4406 | /* mapping to indexes for wl1271_rates */ | 4406 | /* mapping to indexes for wl1271_rates */ |
4407 | static const u8 wl1271_rate_to_idx_2ghz[] = { | 4407 | static const u8 wl1271_rate_to_idx_2ghz[] = { |
4408 | /* MCS rates are used only with 11n */ | 4408 | /* MCS rates are used only with 11n */ |
4409 | 7, /* CONF_HW_RXTX_RATE_MCS7_SGI */ | ||
4409 | 7, /* CONF_HW_RXTX_RATE_MCS7 */ | 4410 | 7, /* CONF_HW_RXTX_RATE_MCS7 */ |
4410 | 6, /* CONF_HW_RXTX_RATE_MCS6 */ | 4411 | 6, /* CONF_HW_RXTX_RATE_MCS6 */ |
4411 | 5, /* CONF_HW_RXTX_RATE_MCS5 */ | 4412 | 5, /* CONF_HW_RXTX_RATE_MCS5 */ |
@@ -4527,6 +4528,7 @@ static struct ieee80211_channel wl1271_channels_5ghz[] = { | |||
4527 | /* mapping to indexes for wl1271_rates_5ghz */ | 4528 | /* mapping to indexes for wl1271_rates_5ghz */ |
4528 | static const u8 wl1271_rate_to_idx_5ghz[] = { | 4529 | static const u8 wl1271_rate_to_idx_5ghz[] = { |
4529 | /* MCS rates are used only with 11n */ | 4530 | /* MCS rates are used only with 11n */ |
4531 | 7, /* CONF_HW_RXTX_RATE_MCS7_SGI */ | ||
4530 | 7, /* CONF_HW_RXTX_RATE_MCS7 */ | 4532 | 7, /* CONF_HW_RXTX_RATE_MCS7 */ |
4531 | 6, /* CONF_HW_RXTX_RATE_MCS6 */ | 4533 | 6, /* CONF_HW_RXTX_RATE_MCS6 */ |
4532 | 5, /* CONF_HW_RXTX_RATE_MCS5 */ | 4534 | 5, /* CONF_HW_RXTX_RATE_MCS5 */ |
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c index f95112f6769f..ee313e7ce8fe 100644 --- a/drivers/net/wireless/wl12xx/tx.c +++ b/drivers/net/wireless/wl12xx/tx.c | |||
@@ -766,10 +766,14 @@ out: | |||
766 | 766 | ||
767 | static u8 wl1271_tx_get_rate_flags(u8 rate_class_index) | 767 | static u8 wl1271_tx_get_rate_flags(u8 rate_class_index) |
768 | { | 768 | { |
769 | u8 flags = 0; | ||
770 | |||
769 | if (rate_class_index >= CONF_HW_RXTX_RATE_MCS_MIN && | 771 | if (rate_class_index >= CONF_HW_RXTX_RATE_MCS_MIN && |
770 | rate_class_index <= CONF_HW_RXTX_RATE_MCS_MAX) | 772 | rate_class_index <= CONF_HW_RXTX_RATE_MCS_MAX) |
771 | return IEEE80211_TX_RC_MCS; | 773 | flags |= IEEE80211_TX_RC_MCS; |
772 | return 0; | 774 | if (rate_class_index == CONF_HW_RXTX_RATE_MCS7_SGI) |
775 | flags |= IEEE80211_TX_RC_SHORT_GI; | ||
776 | return flags; | ||
773 | } | 777 | } |
774 | 778 | ||
775 | static void wl1271_tx_complete_packet(struct wl1271 *wl, | 779 | static void wl1271_tx_complete_packet(struct wl1271 *wl, |