summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wcn36xx/main.c
diff options
context:
space:
mode:
authorPontus Fuchs <pontus.fuchs@gmail.com>2014-02-12 19:04:45 +0000
committerJohn W. Linville <linville@tuxdriver.com>2014-02-13 15:20:17 -0500
commitf2ed5d2499b550917c7f5e50476e39548de68092 (patch)
tree725122899f2a0e45720640b0c00beb7dd6445b5d /drivers/net/wireless/ath/wcn36xx/main.c
parent2be6636a9610ca3924ac3ee1f4a49eced912297b (diff)
wcn36xx: Add support for 3680
3680 has a few registers on other addresses. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/wcn36xx/main.c')
-rw-r--r--drivers/net/wireless/ath/wcn36xx/main.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index 95fd5c6614b0..dca21ee69a62 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -221,6 +221,17 @@ static void wcn36xx_feat_caps_info(struct wcn36xx *wcn)
}
}
+static void wcn36xx_detect_chip_version(struct wcn36xx *wcn)
+{
+ if (get_feat_caps(wcn->fw_feat_caps, DOT11AC)) {
+ wcn36xx_info("Chip is 3680\n");
+ wcn->chip_version = WCN36XX_CHIP_3680;
+ } else {
+ wcn36xx_info("Chip is 3660\n");
+ wcn->chip_version = WCN36XX_CHIP_3660;
+ }
+}
+
static int wcn36xx_start(struct ieee80211_hw *hw)
{
struct wcn36xx *wcn = hw->priv;
@@ -267,6 +278,16 @@ static int wcn36xx_start(struct ieee80211_hw *hw)
goto out_free_smd_buf;
}
+ if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24)) {
+ ret = wcn36xx_smd_feature_caps_exchange(wcn);
+ if (ret)
+ wcn36xx_warn("Exchange feature caps failed\n");
+ else
+ wcn36xx_feat_caps_info(wcn);
+ }
+
+ wcn36xx_detect_chip_version(wcn);
+
/* DMA channel initialization */
ret = wcn36xx_dxe_init(wcn);
if (ret) {
@@ -276,13 +297,6 @@ static int wcn36xx_start(struct ieee80211_hw *hw)
wcn36xx_debugfs_init(wcn);
- if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24)) {
- ret = wcn36xx_smd_feature_caps_exchange(wcn);
- if (ret)
- wcn36xx_warn("Exchange feature caps failed\n");
- else
- wcn36xx_feat_caps_info(wcn);
- }
INIT_LIST_HEAD(&wcn->vif_list);
return 0;