]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/net/wireless/ath/wcn36xx/main.c
Merge tag 'wireless-drivers-next-for-davem-2017-11-03' of git://git.kernel.org/pub...
[mirror_ubuntu-jammy-kernel.git] / drivers / net / wireless / ath / wcn36xx / main.c
index b83f01d6e3ddd842e115a19266cb79d4dfcc6421..71812a2dd513d3192a4ec2d2243da6726d0c5e5e 100644 (file)
@@ -1135,7 +1135,8 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
                BIT(NL80211_IFTYPE_MESH_POINT);
 
        wcn->hw->wiphy->bands[NL80211_BAND_2GHZ] = &wcn_band_2ghz;
-       wcn->hw->wiphy->bands[NL80211_BAND_5GHZ] = &wcn_band_5ghz;
+       if (wcn->rf_id != RF_IRIS_WCN3620)
+               wcn->hw->wiphy->bands[NL80211_BAND_5GHZ] = &wcn_band_5ghz;
 
        wcn->hw->wiphy->max_scan_ssids = WCN36XX_MAX_SCAN_SSIDS;
        wcn->hw->wiphy->max_scan_ie_len = WCN36XX_MAX_SCAN_IE_LEN;
@@ -1168,6 +1169,7 @@ static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
                                          struct platform_device *pdev)
 {
        struct device_node *mmio_node;
+       struct device_node *iris_node;
        struct resource *res;
        int index;
        int ret;
@@ -1230,6 +1232,14 @@ static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
                goto unmap_ccu;
        }
 
+       /* External RF module */
+       iris_node = of_find_node_by_name(mmio_node, "iris");
+       if (iris_node) {
+               if (of_device_is_compatible(iris_node, "qcom,wcn3620"))
+                       wcn->rf_id = RF_IRIS_WCN3620;
+               of_node_put(iris_node);
+       }
+
        of_node_put(mmio_node);
        return 0;