2013-11-19 14:13:55

by Chun-Yeow Yeoh

[permalink] [raw]
Subject: [PATCH] wcn36xx: set self sta entry as HT capable

Set the HT capable for self STA entry for bss configuration. Otherwise,
only legacy rate will be used for transmitting, especially for mesh
mode.

Signed-off-by: Chun-Yeow Yeoh <[email protected]>
---
drivers/net/wireless/ath/wcn36xx/smd.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 19f43de..5160b04 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -115,6 +115,13 @@ static void wcn36xx_smd_set_sta_ht_params(struct ieee80211_sta *sta,
}
}

+static void wcn36xx_smd_set_sta_default_ht_params(
+ struct wcn36xx_hal_config_sta_params *sta_params)
+{
+ wcn36xx_set_default_rates(&sta_params->supported_rates);
+ sta_params->ht_capable = 1;
+}
+
static void wcn36xx_smd_set_sta_params(struct wcn36xx *wcn,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta,
@@ -171,7 +178,7 @@ static void wcn36xx_smd_set_sta_params(struct wcn36xx *wcn,
memcpy(&sta_params->supported_rates, &priv_sta->supported_rates,
sizeof(priv_sta->supported_rates));
} else {
- wcn36xx_set_default_rates(&sta_params->supported_rates);
+ wcn36xx_smd_set_sta_default_ht_params(sta_params);
}
}

--
1.7.9.5



2013-11-20 07:40:43

by Eugene Krasnikov

[permalink] [raw]
Subject: Re: [PATCH] wcn36xx: set self sta entry as HT capable

How about wcn36xx_smd_set_sta_default_ht_params?

This function will set all of the following fields to default values:
sta_params->ht_capable
sta_params->tx_channel_width_set
sta_params->lsig_txop_protection
sta_params->max_ampdu_size
sta_params->max_ampdu_density
sta_params->max_amsdu_size
sta_params->sgi_20Mhz
sta_params->sgi_40mhz
sta_params->green_field_capable
sta_params->delayed_ba_support
sta_params->dsss_cck_mode_40mhz

And then in wcn36xx_smd_set_sta_params it is called like this:
wcn36xx_set_default_rates(&sta_params->supported_rates);
wcn36xx_smd_set_sta_default_ht_params

How does that sound?


On Wed, Nov 20, 2013 at 7:26 AM, Yeoh Chun-Yeow <[email protected]> wrote:
> Hi, Eugene
>
>> Why would the function that is setting default HT params will also set
>> default rates? There is no connection between HT params and default
>> rates.
> How about rename the function name to wcn36xx_smd_set_self_sta?
>
> ----
> Chun-Yeow



--
Best regards,
Eugene

2013-11-20 07:17:45

by Eugene Krasnikov

[permalink] [raw]
Subject: Re: [PATCH] wcn36xx: set self sta entry as HT capable

Why would the function that is setting default HT params will also set
default rates? There is no connection between HT params and default
rates.

But the idea to set HT by default in AP mode is something that we
definitely need.

On Tue, Nov 19, 2013 at 2:13 PM, Chun-Yeow Yeoh <[email protected]> wrote:
> Set the HT capable for self STA entry for bss configuration. Otherwise,
> only legacy rate will be used for transmitting, especially for mesh
> mode.
>
> Signed-off-by: Chun-Yeow Yeoh <[email protected]>
> ---
> drivers/net/wireless/ath/wcn36xx/smd.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
> index 19f43de..5160b04 100644
> --- a/drivers/net/wireless/ath/wcn36xx/smd.c
> +++ b/drivers/net/wireless/ath/wcn36xx/smd.c
> @@ -115,6 +115,13 @@ static void wcn36xx_smd_set_sta_ht_params(struct ieee80211_sta *sta,
> }
> }
>
> +static void wcn36xx_smd_set_sta_default_ht_params(
> + struct wcn36xx_hal_config_sta_params *sta_params)
> +{
> + wcn36xx_set_default_rates(&sta_params->supported_rates);
> + sta_params->ht_capable = 1;
> +}
> +
> static void wcn36xx_smd_set_sta_params(struct wcn36xx *wcn,
> struct ieee80211_vif *vif,
> struct ieee80211_sta *sta,
> @@ -171,7 +178,7 @@ static void wcn36xx_smd_set_sta_params(struct wcn36xx *wcn,
> memcpy(&sta_params->supported_rates, &priv_sta->supported_rates,
> sizeof(priv_sta->supported_rates));
> } else {
> - wcn36xx_set_default_rates(&sta_params->supported_rates);
> + wcn36xx_smd_set_sta_default_ht_params(sta_params);
> }
> }
>
> --
> 1.7.9.5
>



--
Best regards,
Eugene

2013-11-20 07:26:10

by Chun-Yeow Yeoh

[permalink] [raw]
Subject: Re: [PATCH] wcn36xx: set self sta entry as HT capable

Hi, Eugene

> Why would the function that is setting default HT params will also set
> default rates? There is no connection between HT params and default
> rates.
How about rename the function name to wcn36xx_smd_set_self_sta?

----
Chun-Yeow