wcn36xx: Differentiate wcn3660 from wcn3620
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Tue, 25 Jan 2022 00:40:46 +0000 (00:40 +0000)
committerKalle Valo <quic_kvalo@quicinc.com>
Mon, 31 Jan 2022 14:12:30 +0000 (16:12 +0200)
The spread of capability between the three WiFi silicon parts wcn36xx
supports is:

wcn3620 - 802.11 a/b/g
wcn3660 - 802.11 a/b/g/n
wcn3680 - 802.11 a/b/g/n/ac

We currently treat wcn3660 as wcn3620 thus limiting it to 2GHz channels.
Fix this regression by ensuring we differentiate between all three parts.

Fixes: 8490987bdb9a ("wcn36xx: Hook and identify RF_IRIS_WCN3680")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220125004046.4058284-1-bryan.odonoghue@linaro.org
drivers/net/wireless/ath/wcn36xx/main.c
drivers/net/wireless/ath/wcn36xx/wcn36xx.h

index 75661d449712766abd699544a744b993545b6424..243638259eccf1b086326ce82ee9096d83ea2f4a 100644 (file)
@@ -1583,6 +1583,9 @@ static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
        if (iris_node) {
                if (of_device_is_compatible(iris_node, "qcom,wcn3620"))
                        wcn->rf_id = RF_IRIS_WCN3620;
+               if (of_device_is_compatible(iris_node, "qcom,wcn3660") ||
+                   of_device_is_compatible(iris_node, "qcom,wcn3660b"))
+                       wcn->rf_id = RF_IRIS_WCN3660;
                if (of_device_is_compatible(iris_node, "qcom,wcn3680"))
                        wcn->rf_id = RF_IRIS_WCN3680;
                of_node_put(iris_node);
index 81eaa74601d0f49f774ffe4618a6f505daab998f..9aa08b636d08761dec68c02a32f9d290ee3bd86d 100644 (file)
@@ -97,6 +97,7 @@ enum wcn36xx_ampdu_state {
 
 #define RF_UNKNOWN     0x0000
 #define RF_IRIS_WCN3620        0x3620
+#define RF_IRIS_WCN3660        0x3660
 #define RF_IRIS_WCN3680        0x3680
 
 static inline void buff_to_be(u32 *buf, size_t len)