wcn36xx: Use V1 data structure to store supported rates
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Thu, 10 Sep 2020 15:04:50 +0000 (16:04 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 21 Sep 2020 13:13:23 +0000 (16:13 +0300)
This patch converts the internal data structure used to store data-rates
from version 0 to version 1.

This allows us to extend out the internal storage to represent VHT
parameters.

Using the extended version 1 data-structure allows us to avoid a whole raft
of version 1 specific fixup functions.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200910150450.2178784-3-bryan.odonoghue@linaro.org
drivers/net/wireless/ath/wcn36xx/smd.c
drivers/net/wireless/ath/wcn36xx/wcn36xx.h

index 55aaaeb78b1458fb103309e8f4e8f1095b49641e..d5ca9907af86cf089d3150c926985ee578eb6fc9 100644 (file)
@@ -242,9 +242,10 @@ static void wcn36xx_smd_set_sta_params(struct wcn36xx *wcn,
                sta_params->aid = sta_priv->aid;
                wcn36xx_smd_set_sta_ht_params(sta, sta_params);
                memcpy(&sta_params->supported_rates, &sta_priv->supported_rates,
-                       sizeof(sta_priv->supported_rates));
+                       sizeof(struct wcn36xx_hal_supported_rates));
        } else {
-               wcn36xx_set_default_rates(&sta_params->supported_rates);
+               wcn36xx_set_default_rates((struct wcn36xx_hal_supported_rates *)
+                                         &sta_params->supported_rates);
                wcn36xx_smd_set_sta_default_ht_params(sta_params);
        }
 }
index 342ca0ae7e2834275ffcdbdcd088fff7dbff8f76..d7d349de20e689dfc527cb6238823b191d3f142b 100644 (file)
@@ -169,7 +169,7 @@ struct wcn36xx_sta {
        u8 bss_dpu_desc_index;
        bool is_data_encrypted;
        /* Rates */
-       struct wcn36xx_hal_supported_rates supported_rates;
+       struct wcn36xx_hal_supported_rates_v1 supported_rates;
 
        spinlock_t ampdu_lock;          /* protects next two fields */
        enum wcn36xx_ampdu_state ampdu_state[16];