Commit 4f3dfdfb authored by Avinash Patil's avatar Avinash Patil Committed by Kalle Valo

mwifiex: get supported BA stream info from FW

This patch adds support to get number of BA streams
supported information from FW. Some newer chips(e.g. 8897 series)
support 4 BA streams for TX; so driver should not disallow BA stream
setup just after 2 streams have been established.
Signed-off-by: default avatarAvinash Patil <patila@marvell.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 84b313b3
...@@ -130,7 +130,9 @@ static inline u8 mwifiex_space_avail_for_new_ba_stream( ...@@ -130,7 +130,9 @@ static inline u8 mwifiex_space_avail_for_new_ba_stream(
{ {
struct mwifiex_private *priv; struct mwifiex_private *priv;
u8 i; u8 i;
u32 ba_stream_num = 0; u32 ba_stream_num = 0, ba_stream_max;
ba_stream_max = MWIFIEX_MAX_TX_BASTREAM_SUPPORTED;
for (i = 0; i < adapter->priv_num; i++) { for (i = 0; i < adapter->priv_num; i++) {
priv = adapter->priv[i]; priv = adapter->priv[i];
...@@ -139,8 +141,14 @@ static inline u8 mwifiex_space_avail_for_new_ba_stream( ...@@ -139,8 +141,14 @@ static inline u8 mwifiex_space_avail_for_new_ba_stream(
&priv->tx_ba_stream_tbl_ptr); &priv->tx_ba_stream_tbl_ptr);
} }
return ((ba_stream_num < if (adapter->fw_api_ver == MWIFIEX_FW_V15) {
MWIFIEX_MAX_TX_BASTREAM_SUPPORTED) ? true : false); ba_stream_max =
GETSUPP_TXBASTREAMS(adapter->hw_dot_11n_dev_cap);
if (!ba_stream_max)
ba_stream_max = MWIFIEX_MAX_TX_BASTREAM_SUPPORTED;
}
return ((ba_stream_num < ba_stream_max) ? true : false);
} }
/* /*
......
...@@ -233,6 +233,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER { ...@@ -233,6 +233,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
#define ISSUPP_RXLDPC(Dot11nDevCap) (Dot11nDevCap & BIT(22)) #define ISSUPP_RXLDPC(Dot11nDevCap) (Dot11nDevCap & BIT(22))
#define ISSUPP_BEAMFORMING(Dot11nDevCap) (Dot11nDevCap & BIT(30)) #define ISSUPP_BEAMFORMING(Dot11nDevCap) (Dot11nDevCap & BIT(30))
#define ISALLOWED_CHANWIDTH40(ht_param) (ht_param & BIT(2)) #define ISALLOWED_CHANWIDTH40(ht_param) (ht_param & BIT(2))
#define GETSUPP_TXBASTREAMS(Dot11nDevCap) ((Dot11nDevCap >> 18) & 0xF)
/* httxcfg bitmap /* httxcfg bitmap
* 0 reserved * 0 reserved
......
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