mirror of https://gitee.com/openkylin/linux.git
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: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
8e17ea25b1
commit
a0b7315a19
|
@ -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 */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue