diff mbox

wcn36xx: set self sta entry as HT capable

Message ID 1384870413-5569-1-git-send-email-yeohchunyeow@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Chun-Yeow Yeoh Nov. 19, 2013, 2:13 p.m. UTC
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 <yeohchunyeow@gmail.com>
---
 drivers/net/wireless/ath/wcn36xx/smd.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Eugene Krasnikov Nov. 20, 2013, 7:17 a.m. UTC | #1
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 <yeohchunyeow@gmail.com> 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 <yeohchunyeow@gmail.com>
> ---
>  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
>
Chun-Yeow Yeoh Nov. 20, 2013, 7:26 a.m. UTC | #2
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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Eugene Krasnikov Nov. 20, 2013, 7:40 a.m. UTC | #3
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 <yeohchunyeow@gmail.com> 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
Eugene Krasnikov Nov. 20, 2013, 7:55 a.m. UTC | #4
Most of these values are taken from wcn_band_2ghz

Will try to remember:

sta_params->ht_capable = 1
sta_params->tx_channel_width_set = 1
sta_params->lsig_txop_protection = 1
sta_params->max_ampdu_size = 3 // Might be wrong but let's have this
value as a begining.
sta_params->max_ampdu_density = 5 // Might be wrong but let's have
this value as a begining.
sta_params->max_amsdu_size = 0
sta_params->sgi_20Mhz = 1
sta_params->sgi_40mhz = 1
sta_params->green_field_capable = 1
sta_params->delayed_ba_support = 0
sta_params->dsss_cck_mode_40mhz = 1

On Wed, Nov 20, 2013 at 7:43 AM, Yeoh Chun-Yeow <yeohchunyeow@gmail.com> wrote:
>> 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
>
>
> I am alright with that. But I am not sure about the default value of other
> fields mentioned above. Are you able to provide that?
>
>>
>> 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?
>
>
> ---
> Chun-Yeow
Chun-Yeow Yeoh Nov. 20, 2013, 8:05 a.m. UTC | #5
Alright, I will resubmit the patch with these as default value.

---
Chun-Yeow

On Wed, Nov 20, 2013 at 3:55 PM, Eugene Krasnikov <k.eugene.e@gmail.com> wrote:
> Most of these values are taken from wcn_band_2ghz
>
> Will try to remember:
>
> sta_params->ht_capable = 1
> sta_params->tx_channel_width_set = 1
> sta_params->lsig_txop_protection = 1
> sta_params->max_ampdu_size = 3 // Might be wrong but let's have this
> value as a begining.
> sta_params->max_ampdu_density = 5 // Might be wrong but let's have
> this value as a begining.
> sta_params->max_amsdu_size = 0
> sta_params->sgi_20Mhz = 1
> sta_params->sgi_40mhz = 1
> sta_params->green_field_capable = 1
> sta_params->delayed_ba_support = 0
> sta_params->dsss_cck_mode_40mhz = 1
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);
 	}
 }