ath10k: handle FW API differences for scan structures
[cascardo/linux.git] / drivers / net / wireless / ath / ath10k / core.c
index 8a68839..bd74dac 100644 (file)
@@ -53,33 +53,12 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
 
 static void ath10k_send_suspend_complete(struct ath10k *ar)
 {
-       ath10k_dbg(ATH10K_DBG_CORE, "%s\n", __func__);
+       ath10k_dbg(ATH10K_DBG_BOOT, "boot suspend complete\n");
 
        ar->is_target_paused = true;
        wake_up(&ar->event_queue);
 }
 
-static int ath10k_check_fw_version(struct ath10k *ar)
-{
-       char version[32];
-
-       if (ar->fw_version_major >= SUPPORTED_FW_MAJOR &&
-           ar->fw_version_minor >= SUPPORTED_FW_MINOR &&
-           ar->fw_version_release >= SUPPORTED_FW_RELEASE &&
-           ar->fw_version_build >= SUPPORTED_FW_BUILD)
-               return 0;
-
-       snprintf(version, sizeof(version), "%u.%u.%u.%u",
-                SUPPORTED_FW_MAJOR, SUPPORTED_FW_MINOR,
-                SUPPORTED_FW_RELEASE, SUPPORTED_FW_BUILD);
-
-       ath10k_warn("WARNING: Firmware version %s is not officially supported.\n",
-                   ar->hw->wiphy->fw_version);
-       ath10k_warn("Please upgrade to version %s (or newer)\n", version);
-
-       return 0;
-}
-
 static int ath10k_init_connect_htc(struct ath10k *ar)
 {
        int status;
@@ -101,7 +80,7 @@ static int ath10k_init_connect_htc(struct ath10k *ar)
                goto timeout;
        }
 
-       ath10k_dbg(ATH10K_DBG_CORE, "core wmi ready\n");
+       ath10k_dbg(ATH10K_DBG_BOOT, "boot wmi ready\n");
        return 0;
 
 timeout:
@@ -203,8 +182,8 @@ static int ath10k_push_board_ext_data(struct ath10k *ar,
                return ret;
        }
 
-       ath10k_dbg(ATH10K_DBG_CORE,
-                  "ath10k: Board extended Data download addr: 0x%x\n",
+       ath10k_dbg(ATH10K_DBG_BOOT,
+                  "boot push board extended data addr 0x%x\n",
                   board_ext_data_addr);
 
        if (board_ext_data_addr == 0)
@@ -541,6 +520,9 @@ struct ath10k *ath10k_core_create(void *hif_priv, struct device *dev,
        INIT_WORK(&ar->offchan_tx_work, ath10k_offchan_tx_work);
        skb_queue_head_init(&ar->offchan_tx_queue);
 
+       INIT_WORK(&ar->wmi_mgmt_tx_work, ath10k_mgmt_over_wmi_tx_work);
+       skb_queue_head_init(&ar->wmi_mgmt_tx_queue);
+
        init_waitqueue_head(&ar->event_queue);
 
        INIT_WORK(&ar->restart_work, ath10k_core_restart);
@@ -616,10 +598,6 @@ int ath10k_core_start(struct ath10k *ar)
 
        ath10k_info("firmware %s booted\n", ar->hw->wiphy->fw_version);
 
-       status = ath10k_check_fw_version(ar);
-       if (status)
-               goto err_disconnect_htc;
-
        status = ath10k_wmi_cmd_init(ar);
        if (status) {
                ath10k_err("could not send WMI init command (%d)\n", status);
@@ -722,6 +700,9 @@ static int ath10k_core_check_chip_id(struct ath10k *ar)
 {
        u32 hw_revision = MS(ar->chip_id, SOC_CHIP_ID_REV);
 
+       ath10k_dbg(ATH10K_DBG_BOOT, "boot chip_id 0x%08x hw_revision 0x%x\n",
+                  ar->chip_id, hw_revision);
+
        /* Check that we are not using hw1.0 (some of them have same pci id
         * as hw2.0) before doing anything else as ath10k crashes horribly
         * due to missing hw1.0 workarounds. */