Commit a0b7315a authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by John W. Linville

mwifiex: add VHT MCS rate configuration support

During Tx rate configuration, newer firmware V15 expects bitmap
for VHT MCS rates as well.
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 8e17ea25
......@@ -1105,6 +1105,7 @@ struct mwifiex_rate_scope {
__le16 hr_dsss_rate_bitmap;
__le16 ofdm_rate_bitmap;
__le16 ht_mcs_rate_bitmap[8];
__le16 vht_mcs_rate_bitmap[8];
} __packed;
struct mwifiex_rate_drop_pattern {
......
......@@ -116,7 +116,7 @@ enum {
#define MWIFIEX_TYPE_DATA 0
#define MWIFIEX_TYPE_EVENT 3
#define MAX_BITMAP_RATES_SIZE 10
#define MAX_BITMAP_RATES_SIZE 18
#define MAX_CHANNEL_BAND_BG 14
#define MAX_CHANNEL_BAND_A 165
......
......@@ -185,6 +185,13 @@ static int mwifiex_cmd_tx_rate_cfg(struct mwifiex_private *priv,
i++)
rate_scope->ht_mcs_rate_bitmap[i] =
cpu_to_le16(pbitmap_rates[2 + i]);
if (priv->adapter->fw_api_ver == MWIFIEX_FW_V15) {
for (i = 0;
i < ARRAY_SIZE(rate_scope->vht_mcs_rate_bitmap);
i++)
rate_scope->vht_mcs_rate_bitmap[i] =
cpu_to_le16(pbitmap_rates[10 + i]);
}
} else {
rate_scope->hr_dsss_rate_bitmap =
cpu_to_le16(priv->bitmap_rates[0]);
......@@ -195,6 +202,13 @@ static int mwifiex_cmd_tx_rate_cfg(struct mwifiex_private *priv,
i++)
rate_scope->ht_mcs_rate_bitmap[i] =
cpu_to_le16(priv->bitmap_rates[2 + i]);
if (priv->adapter->fw_api_ver == MWIFIEX_FW_V15) {
for (i = 0;
i < ARRAY_SIZE(rate_scope->vht_mcs_rate_bitmap);
i++)
rate_scope->vht_mcs_rate_bitmap[i] =
cpu_to_le16(priv->bitmap_rates[10 + i]);
}
}
rate_drop = (struct mwifiex_rate_drop_pattern *) ((u8 *) rate_scope +
......
......@@ -304,6 +304,15 @@ static int mwifiex_ret_tx_rate_cfg(struct mwifiex_private *priv,
priv->bitmap_rates[2 + i] =
le16_to_cpu(rate_scope->
ht_mcs_rate_bitmap[i]);
if (priv->adapter->fw_api_ver == MWIFIEX_FW_V15) {
for (i = 0; i < ARRAY_SIZE(rate_scope->
vht_mcs_rate_bitmap);
i++)
priv->bitmap_rates[10 + i] =
le16_to_cpu(rate_scope->
vht_mcs_rate_bitmap[i]);
}
break;
/* Add RATE_DROP tlv here */
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment