rtl8xxxu: Bump TX power arrays to handle larger channel groups
authorJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 29 Feb 2016 22:05:21 +0000 (17:05 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 10 Mar 2016 13:29:13 +0000 (15:29 +0200)
Newer generation chips have more channels groups. In order to carry
the larger arrays in common structures, bump the array sizes to
match.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h

index c7b4c92ea732fb365bdadef7893dfc58db5f9f79..92768f54ce55786ef7bcd456c6ab4d7079fc2731 100644 (file)
@@ -53,7 +53,9 @@
 
 #define RTL8723A_CHANNEL_GROUPS                3
 #define RTL8723A_MAX_RF_PATHS          2
+#define RTL8723B_CHANNEL_GROUPS                6
 #define RTL8723B_MAX_RF_PATHS          4
+#define RTL8XXXU_MAX_CHANNEL_GROUPS    6
 #define RF6052_MAX_TX_PWR              0x3f
 
 #define EFUSE_MAP_LEN                  512
@@ -1046,19 +1048,24 @@ struct rtl8xxxu_priv {
        u8 mac_addr[ETH_ALEN];
        char chip_name[8];
        char chip_vendor[8];
-       u8 cck_tx_power_index_A[3];     /* 0x10 */
-       u8 cck_tx_power_index_B[3];
-       u8 ht40_1s_tx_power_index_A[3]; /* 0x16 */
-       u8 ht40_1s_tx_power_index_B[3];
+       u8 cck_tx_power_index_A[RTL8XXXU_MAX_CHANNEL_GROUPS];
+       u8 cck_tx_power_index_B[RTL8XXXU_MAX_CHANNEL_GROUPS];
+       u8 ht40_1s_tx_power_index_A[RTL8XXXU_MAX_CHANNEL_GROUPS];
+       u8 ht40_1s_tx_power_index_B[RTL8XXXU_MAX_CHANNEL_GROUPS];
        /*
         * The following entries are half-bytes split as:
         * bits 0-3: path A, bits 4-7: path B, all values 4 bits signed
         */
-       struct rtl8723au_idx ht40_2s_tx_power_index_diff[3];
-       struct rtl8723au_idx ht20_tx_power_index_diff[3];
-       struct rtl8723au_idx ofdm_tx_power_index_diff[3];
-       struct rtl8723au_idx ht40_max_power_offset[3];
-       struct rtl8723au_idx ht20_max_power_offset[3];
+       struct rtl8723au_idx ht40_2s_tx_power_index_diff[
+               RTL8XXXU_MAX_CHANNEL_GROUPS];
+       struct rtl8723au_idx ht20_tx_power_index_diff[
+               RTL8XXXU_MAX_CHANNEL_GROUPS];
+       struct rtl8723au_idx ofdm_tx_power_index_diff[
+               RTL8XXXU_MAX_CHANNEL_GROUPS];
+       struct rtl8723au_idx ht40_max_power_offset[
+               RTL8XXXU_MAX_CHANNEL_GROUPS];
+       struct rtl8723au_idx ht20_max_power_offset[
+               RTL8XXXU_MAX_CHANNEL_GROUPS];
        u32 chip_cut:4;
        u32 rom_rev:4;
        u32 is_multi_func:1;