Commit c05a8bd8 authored by Bryan O'Donoghue's avatar Bryan O'Donoghue Committed by Kalle Valo

wcn36xx: Add wrapper function wcn36xx_smd_set_sta_params_v1()

This commit adds a wrapper function wcn36xx_smd_set_sta_params_v1() which
calls into wcn36xx_smd_set_sta_params() and then subsequently sets
version-1 specific parameters.
Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200910150552.2178882-8-bryan.odonoghue@linaro.org
parent 5a32029a
......@@ -1262,6 +1262,36 @@ static void wcn36xx_smd_convert_sta_to_v1(struct wcn36xx *wcn,
v1->p2p = orig->p2p;
}
void
wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta,
struct wcn36xx_hal_config_sta_params_v1 *sta_par);
void
wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta,
struct wcn36xx_hal_config_sta_params_v1 *sta_par)
{
struct wcn36xx_sta *sta_priv = NULL;
struct wcn36xx_hal_config_sta_params sta_par_v0;
wcn36xx_smd_set_sta_params(wcn, vif, sta, &sta_par_v0);
wcn36xx_smd_convert_sta_to_v1(wcn, &sta_par_v0, sta_par);
if (sta) {
sta_priv = wcn36xx_sta_to_priv(sta);
wcn36xx_smd_set_sta_vht_params(wcn, sta, sta_par);
wcn36xx_smd_set_sta_ht_ldpc_params(sta, sta_par);
memcpy(&sta_par->supported_rates, &sta_priv->supported_rates,
sizeof(sta_par->supported_rates));
} else {
wcn36xx_set_default_rates_v1(&sta_par->supported_rates);
wcn36xx_smd_set_sta_default_vht_params(wcn, sta_par);
wcn36xx_smd_set_sta_default_ht_ldpc_params(wcn, sta_par);
}
}
static int wcn36xx_smd_config_sta_rsp(struct wcn36xx *wcn,
struct ieee80211_sta *sta,
void *buf,
......
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