2012-11-27 03:28:41

by Bing Zhao

[permalink] [raw]
Subject: [PATCH] mwifiex: advertise GreenField, 40MHz intolerance support to cfg80211

From: Avinash Patil <[email protected]>

This patch adds support for advertising GreenField, 40MHz intolerance
or LDPC coding support to cfg80211.

Signed-off-by: Avinash Patil <[email protected]>
Signed-off-by: Bing Zhao <[email protected]>
---
drivers/net/wireless/mwifiex/cfg80211.c | 15 +++++++++++++++
drivers/net/wireless/mwifiex/fw.h | 2 ++
2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 3b1c277..13333e4 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -1948,6 +1948,21 @@ mwifiex_setup_ht_caps(struct ieee80211_sta_ht_cap *ht_info,
else
ht_info->cap &= ~IEEE80211_HT_CAP_TX_STBC;

+ if (ISSUPP_GREENFIELD(adapter->hw_dot_11n_dev_cap))
+ ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD;
+ else
+ ht_info->cap &= ~IEEE80211_HT_CAP_GRN_FLD;
+
+ if (ISENABLED_40MHZ_INTOLARENT(adapter->hw_dot_11n_dev_cap))
+ ht_info->cap |= IEEE80211_HT_CAP_40MHZ_INTOLERANT;
+ else
+ ht_info->cap &= ~IEEE80211_HT_CAP_40MHZ_INTOLERANT;
+
+ if (ISSUPP_RXLDPC(adapter->hw_dot_11n_dev_cap))
+ ht_info->cap |= IEEE80211_HT_CAP_LDPC_CODING;
+ else
+ ht_info->cap &= ~IEEE80211_HT_CAP_LDPC_CODING;
+
ht_info->cap &= ~IEEE80211_HT_CAP_MAX_AMSDU;
ht_info->cap |= IEEE80211_HT_CAP_SM_PS;

diff --git a/drivers/net/wireless/mwifiex/fw.h b/drivers/net/wireless/mwifiex/fw.h
index dda588b..b125b7a 100644
--- a/drivers/net/wireless/mwifiex/fw.h
+++ b/drivers/net/wireless/mwifiex/fw.h
@@ -194,6 +194,8 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
#define ISSUPP_TXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(25))
#define ISSUPP_RXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(26))
#define ISSUPP_GREENFIELD(Dot11nDevCap) (Dot11nDevCap & BIT(29))
+#define ISENABLED_40MHZ_INTOLARENT(Dot11nDevCap) (Dot11nDevCap & BIT(8))
+#define ISSUPP_RXLDPC(Dot11nDevCap) (Dot11nDevCap & BIT(22))

/* httxcfg bitmap
* 0 reserved
--
1.7.0.2



2012-11-27 10:10:58

by Gábor Stefanik

[permalink] [raw]
Subject: Re: [PATCH] mwifiex: advertise GreenField, 40MHz intolerance support to cfg80211

On Tue, Nov 27, 2012 at 4:28 AM, Bing Zhao <[email protected]> wrote:
> From: Avinash Patil <[email protected]>
>
> This patch adds support for advertising GreenField, 40MHz intolerance
> or LDPC coding support to cfg80211.
>
> Signed-off-by: Avinash Patil <[email protected]>
> Signed-off-by: Bing Zhao <[email protected]>
> ---
> drivers/net/wireless/mwifiex/cfg80211.c | 15 +++++++++++++++
> drivers/net/wireless/mwifiex/fw.h | 2 ++
> 2 files changed, 17 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
> index 3b1c277..13333e4 100644
> --- a/drivers/net/wireless/mwifiex/cfg80211.c
> +++ b/drivers/net/wireless/mwifiex/cfg80211.c
> @@ -1948,6 +1948,21 @@ mwifiex_setup_ht_caps(struct ieee80211_sta_ht_cap *ht_info,
> else
> ht_info->cap &= ~IEEE80211_HT_CAP_TX_STBC;
>
> + if (ISSUPP_GREENFIELD(adapter->hw_dot_11n_dev_cap))
> + ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD;
> + else
> + ht_info->cap &= ~IEEE80211_HT_CAP_GRN_FLD;
> +
> + if (ISENABLED_40MHZ_INTOLARENT(adapter->hw_dot_11n_dev_cap))
> + ht_info->cap |= IEEE80211_HT_CAP_40MHZ_INTOLERANT;
> + else
> + ht_info->cap &= ~IEEE80211_HT_CAP_40MHZ_INTOLERANT;
> +
> + if (ISSUPP_RXLDPC(adapter->hw_dot_11n_dev_cap))
> + ht_info->cap |= IEEE80211_HT_CAP_LDPC_CODING;
> + else
> + ht_info->cap &= ~IEEE80211_HT_CAP_LDPC_CODING;
> +
> ht_info->cap &= ~IEEE80211_HT_CAP_MAX_AMSDU;
> ht_info->cap |= IEEE80211_HT_CAP_SM_PS;
>
> diff --git a/drivers/net/wireless/mwifiex/fw.h b/drivers/net/wireless/mwifiex/fw.h
> index dda588b..b125b7a 100644
> --- a/drivers/net/wireless/mwifiex/fw.h
> +++ b/drivers/net/wireless/mwifiex/fw.h
> @@ -194,6 +194,8 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
> #define ISSUPP_TXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(25))
> #define ISSUPP_RXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(26))
> #define ISSUPP_GREENFIELD(Dot11nDevCap) (Dot11nDevCap & BIT(29))
> +#define ISENABLED_40MHZ_INTOLARENT(Dot11nDevCap) (Dot11nDevCap & BIT(8))

Typo?

> +#define ISSUPP_RXLDPC(Dot11nDevCap) (Dot11nDevCap & BIT(22))
>
> /* httxcfg bitmap
> * 0 reserved
> --
> 1.7.0.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html



--
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

2012-11-27 20:15:45

by Bing Zhao

[permalink] [raw]
Subject: RE: [PATCH] mwifiex: advertise GreenField, 40MHz intolerance support to cfg80211

Hi G?bor,

> > +#define ISENABLED_40MHZ_INTOLARENT(Dot11nDevCap) (Dot11nDevCap & BIT(8))
>
> Typo?

Thanks for catching this error. V2 has been sent.

Regards,
Bing