diff options
-rw-r--r-- | drivers/staging/cw1200/main.c | 7 | ||||
-rw-r--r-- | drivers/staging/cw1200/txrx.c | 14 |
2 files changed, 10 insertions, 11 deletions
diff --git a/drivers/staging/cw1200/main.c b/drivers/staging/cw1200/main.c index f809ebc7584..7a4c2536976 100644 --- a/drivers/staging/cw1200/main.c +++ b/drivers/staging/cw1200/main.c @@ -71,6 +71,9 @@ static struct ieee80211_rate cw1200_rates[] = { RATETAB_ENT(360, 11, 0), RATETAB_ENT(480, 12, 0), RATETAB_ENT(540, 13, 0), +}; + +static struct ieee80211_rate cw1200_mcs_rates[] = { RATETAB_ENT(65, 14, IEEE80211_TX_RC_MCS), RATETAB_ENT(130, 15, IEEE80211_TX_RC_MCS), RATETAB_ENT(195, 16, IEEE80211_TX_RC_MCS), @@ -85,8 +88,8 @@ static struct ieee80211_rate cw1200_rates[] = { #define cw1200_a_rates_size (ARRAY_SIZE(cw1200_rates) - 4) #define cw1200_g_rates (cw1200_rates + 0) #define cw1200_g_rates_size (ARRAY_SIZE(cw1200_rates)) -#define cw1200_n_rates (cw1200_rates + 12) -#define cw1200_n_rates_size (ARRAY_SIZE(cw1200_rates) - 12) +#define cw1200_n_rates (cw1200_mcs_rates) +#define cw1200_n_rates_size (ARRAY_SIZE(cw1200_mcs_rates)) #define CHAN2G(_channel, _freq, _flags) { \ diff --git a/drivers/staging/cw1200/txrx.c b/drivers/staging/cw1200/txrx.c index 9b2864c8bde..0ca01c7ae0b 100644 --- a/drivers/staging/cw1200/txrx.c +++ b/drivers/staging/cw1200/txrx.c @@ -643,7 +643,6 @@ void cw1200_rx_cb(struct cw1200_common *priv, { struct sk_buff *skb = *skb_p; struct ieee80211_rx_status *hdr = IEEE80211_SKB_RXCB(skb); - const struct ieee80211_rate *rate; __le16 frame_control; hdr->flag = 0; @@ -680,16 +679,13 @@ void cw1200_rx_cb(struct cw1200_common *priv, arg->channelNumber, hdr->band); - if (arg->rxedRate >= 4) - rate = &priv->rates[arg->rxedRate - 2]; - else - rate = &priv->rates[arg->rxedRate]; - - if (rate >= priv->mcs_rates) { - hdr->rate_idx = rate - priv->mcs_rates; + if (arg->rxedRate >= 14) { hdr->flag |= RX_FLAG_HT; + hdr->rate_idx = arg->rxedRate - 14; + } else if (arg->rxedRate >= 4) { + hdr->rate_idx = arg->rxedRate - 2; } else { - hdr->rate_idx = rate - priv->rates; + hdr->rate_idx = arg->rxedRate; } hdr->signal = (s8)arg->rcpiRssi; |