Skip to contentSkip to conversation

wcn36xx: set self sta entry as HT capable

PATCH In review Chun-Yeow Yeoh 2 participants 6 messages Nov 19, 2013 – Nov 20, 2013 1 message not in the archive Qualcomm WCN36XX wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/wireless/ath/wcn36xx/smd.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/wcn36xx/smd.c +8 -1
index 19f43de..5160b04 100644
@@ -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);
 	}
 }
 
Signature · 1 line
1.7.9.5
#1 lore raw

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.

Quoted 39 lines · Chun-Yeow Yeoh

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

---
 drivers/net/wireless/ath/wcn36xx/smd.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/wcn36xx/smd.c +8 -2
index 19f43de..5160b04 100644
@@ -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

Signature · 2 lines
Best regards,
Eugene
#2 lore raw

Hi, Eugene

Quoted 3 lines

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

#3 lore raw

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?

Quoted 9 lines · Yeoh Chun-Yeow

Hi, Eugene

Quoted 3 lines

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

Signature · 2 lines
Best regards,
Eugene
#5 lore raw
In reply to a message not in the archive

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

Quoted 27 lines · Yeoh Chun-Yeow
Quoted 4 lines

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

Quoted 8 lines

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?

Quoted 6 lines

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

Signature · 2 lines
Best regards,
Eugene
#6 lore raw

Alright, I will resubmit the patch with these as default value.

---
Chun-Yeow

Quoted 17 lines · Eugene Krasnikov

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