Merge tag 'iwlwifi-next-for-kalle-2016-07-06' of git://git.kernel.org/pub/scm/linux...
authorKalle Valo <kvalo@codeaurora.org>
Fri, 8 Jul 2016 09:20:30 +0000 (12:20 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 8 Jul 2016 09:20:30 +0000 (12:20 +0300)
* work on DQA continued
* SAR BIOS implementation
* some work on debugging capabilities
* added support for GCMP encryption
* data path rework in preparation for new HW
* some cleanup to remove transport dependency on mac80211
* support for MSIx in preparation for new HW
* lots of work in preparation for HW support (9000 and a000 series)
* general cleanups
* general bugfixes

1  2 
drivers/net/wireless/intel/iwlwifi/iwl-drv.c
drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h
drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c

index 292fc8b516b7ffbbba030167f4cbd163c748e75e,d675bf0a9e99f0bcbc3e6ba5799e77d1f24941dc..45b2f679e4d8ec624be0090081aad2cbab2bec5a
@@@ -129,8 -129,8 +129,8 @@@ struct iwl_drv 
  };
  
  enum {
-       DVM_OP_MODE =   0,
-       MVM_OP_MODE =   1,
+       DVM_OP_MODE,
+       MVM_OP_MODE,
  };
  
  /* Protects the table contents, i.e. the ops pointer & drv list */
@@@ -326,8 -326,6 +326,6 @@@ static int iwl_store_cscheme(struct iwl
        int i, j;
        struct iwl_fw_cscheme_list *l = (struct iwl_fw_cscheme_list *)data;
        struct iwl_fw_cipher_scheme *fwcs;
-       struct ieee80211_cipher_scheme *cs;
-       u32 cipher;
  
        if (len < sizeof(*l) ||
            len < sizeof(l->size) + l->size * sizeof(l->cs[0]))
  
        for (i = 0, j = 0; i < IWL_UCODE_MAX_CS && i < l->size; i++) {
                fwcs = &l->cs[j];
-               cipher = le32_to_cpu(fwcs->cipher);
  
                /* we skip schemes with zero cipher suite selector */
-               if (!cipher)
+               if (!fwcs->cipher)
                        continue;
  
-               cs = &fw->cs[j++];
-               cs->cipher = cipher;
-               cs->iftype = BIT(NL80211_IFTYPE_STATION);
-               cs->hdr_len = fwcs->hdr_len;
-               cs->pn_len = fwcs->pn_len;
-               cs->pn_off = fwcs->pn_off;
-               cs->key_idx_off = fwcs->key_idx_off;
-               cs->key_idx_mask = fwcs->key_idx_mask;
-               cs->key_idx_shift = fwcs->key_idx_shift;
-               cs->mic_len = fwcs->mic_len;
+               fw->cs[j++] = *fwcs;
        }
  
        return 0;
@@@ -795,17 -783,17 +783,17 @@@ static int iwl_parse_tlv_firmware(struc
                 case IWL_UCODE_TLV_SEC_RT:
                        iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_REGULAR,
                                            tlv_len);
-                       drv->fw.mvm_fw = true;
+                       drv->fw.type = IWL_FW_MVM;
                        break;
                case IWL_UCODE_TLV_SEC_INIT:
                        iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_INIT,
                                            tlv_len);
-                       drv->fw.mvm_fw = true;
+                       drv->fw.type = IWL_FW_MVM;
                        break;
                case IWL_UCODE_TLV_SEC_WOWLAN:
                        iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_WOWLAN,
                                            tlv_len);
-                       drv->fw.mvm_fw = true;
+                       drv->fw.type = IWL_FW_MVM;
                        break;
                case IWL_UCODE_TLV_DEF_CALIB:
                        if (tlv_len != sizeof(struct iwl_tlv_calib_data))
                 case IWL_UCODE_TLV_SECURE_SEC_RT:
                        iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_REGULAR,
                                            tlv_len);
-                       drv->fw.mvm_fw = true;
+                       drv->fw.type = IWL_FW_MVM;
                        break;
                case IWL_UCODE_TLV_SECURE_SEC_INIT:
                        iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_INIT,
                                            tlv_len);
-                       drv->fw.mvm_fw = true;
+                       drv->fw.type = IWL_FW_MVM;
                        break;
                case IWL_UCODE_TLV_SECURE_SEC_WOWLAN:
                        iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_WOWLAN,
                                            tlv_len);
-                       drv->fw.mvm_fw = true;
+                       drv->fw.type = IWL_FW_MVM;
                        break;
                case IWL_UCODE_TLV_NUM_OF_CPU:
                        if (tlv_len != sizeof(u32))
@@@ -1253,10 -1241,7 +1241,10 @@@ static void iwl_req_fw_callback(const s
        if (err)
                goto try_again;
  
 -      api_ver = drv->fw.ucode_ver;
 +      if (fw_has_api(&drv->fw.ucode_capa, IWL_UCODE_TLV_API_NEW_VERSION))
 +              api_ver = drv->fw.ucode_ver;
 +      else
 +              api_ver = IWL_UCODE_API(drv->fw.ucode_ver);
  
        /*
         * api_ver should match the api version forming part of the
         * In mvm uCode there is no difference between data and instructions
         * sections.
         */
-       if (!fw->mvm_fw && validate_sec_sizes(drv, pieces, drv->cfg))
+       if (fw->type == IWL_FW_DVM && validate_sec_sizes(drv, pieces, drv->cfg))
                goto try_again;
  
        /* Allocate ucode buffers for card's bus-master loading ... */
        release_firmware(ucode_raw);
  
        mutex_lock(&iwlwifi_opmode_table_mtx);
-       if (fw->mvm_fw)
-               op = &iwlwifi_opmode_table[MVM_OP_MODE];
-       else
+       switch (fw->type) {
+       case IWL_FW_DVM:
                op = &iwlwifi_opmode_table[DVM_OP_MODE];
+               break;
+       default:
+               WARN(1, "Invalid fw type %d\n", fw->type);
+       case IWL_FW_MVM:
+               op = &iwlwifi_opmode_table[MVM_OP_MODE];
+               break;
+       }
  
        IWL_INFO(drv, "loaded firmware version %s op_mode %s\n",
                 drv->fw.fw_version, op->name);
index 4018e65f6d4356a3befd71593b38ea0e2035abdb,d56b3d8a31f6aa8c414366010c9f472fef88a788..1b1e045f89077f48f15b187cb624320982dabb98
@@@ -251,7 -251,6 +251,7 @@@ typedef unsigned int __bitwise__ iwl_uc
   * @IWL_UCODE_TLV_API_WIFI_MCC_UPDATE: ucode supports MCC updates with source.
   * @IWL_UCODE_TLV_API_WIDE_CMD_HDR: ucode supports wide command header
   * @IWL_UCODE_TLV_API_LQ_SS_PARAMS: Configure STBC/BFER via LQ CMD ss_params
 + * @IWL_UCODE_TLV_API_NEW_VERSION: new versioning format
   * @IWL_UCODE_TLV_API_EXT_SCAN_PRIORITY: scan APIs use 8-level priority
   *    instead of 3.
   * @IWL_UCODE_TLV_API_TX_POWER_CHAIN: TX power API has larger command size
@@@ -264,7 -263,6 +264,7 @@@ enum iwl_ucode_tlv_api 
        IWL_UCODE_TLV_API_WIFI_MCC_UPDATE       = (__force iwl_ucode_tlv_api_t)9,
        IWL_UCODE_TLV_API_WIDE_CMD_HDR          = (__force iwl_ucode_tlv_api_t)14,
        IWL_UCODE_TLV_API_LQ_SS_PARAMS          = (__force iwl_ucode_tlv_api_t)18,
 +      IWL_UCODE_TLV_API_NEW_VERSION           = (__force iwl_ucode_tlv_api_t)20,
        IWL_UCODE_TLV_API_EXT_SCAN_PRIORITY     = (__force iwl_ucode_tlv_api_t)24,
        IWL_UCODE_TLV_API_TX_POWER_CHAIN        = (__force iwl_ucode_tlv_api_t)27,
  
@@@ -330,6 -328,9 +330,9 @@@ typedef unsigned int __bitwise__ iwl_uc
   * @IWL_UCODE_TLV_CAPA_EXTEND_SHARED_MEM_CFG: support getting more shared
   *    memory addresses from the firmware.
   * @IWL_UCODE_TLV_CAPA_LQM_SUPPORT: supports Link Quality Measurement
+  * @IWL_UCODE_TLV_CAPA_TX_POWER_ACK: reduced TX power API has larger
+  *    command size (command version 4) that supports toggling ACK TX
+  *    power reduction.
   *
   * @NUM_IWL_UCODE_TLV_CAPA: number of bits used
   */
@@@ -370,6 -371,7 +373,7 @@@ enum iwl_ucode_tlv_capa 
        IWL_UCODE_TLV_CAPA_USNIFFER_UNIFIED             = (__force iwl_ucode_tlv_capa_t)77,
        IWL_UCODE_TLV_CAPA_EXTEND_SHARED_MEM_CFG        = (__force iwl_ucode_tlv_capa_t)80,
        IWL_UCODE_TLV_CAPA_LQM_SUPPORT                  = (__force iwl_ucode_tlv_capa_t)81,
+       IWL_UCODE_TLV_CAPA_TX_POWER_ACK                 = (__force iwl_ucode_tlv_capa_t)84,
  
        NUM_IWL_UCODE_TLV_CAPA
  #ifdef __CHECKER__
index e1b6b2c665eb61b63be7297a5dc55b14dec40ca6,6e692a8f5cda0de4746ff8cddba050c9adc024cb..1abcabb9b6cd78d675c5a0585eb4ee59d98c3b1e
@@@ -71,7 -71,7 +71,7 @@@
  #include "iwl-csr.h"
  
  static ssize_t iwl_mvm_read_coredump(char *buffer, loff_t offset, size_t count,
 -                                   const void *data, size_t datalen)
 +                                   void *data, size_t datalen)
  {
        const struct iwl_mvm_dump_ptrs *dump_ptrs = data;
        ssize_t bytes_read;
        return bytes_read + bytes_read_trans;
  }
  
 -static void iwl_mvm_free_coredump(const void *data)
 +static void iwl_mvm_free_coredump(void *data)
  {
        const struct iwl_mvm_dump_ptrs *fw_error_dump = data;
  
@@@ -288,7 -288,8 +288,8 @@@ static void iwl_mvm_dump_fifos(struct i
                        fifo_hdr->fifo_num = cpu_to_le32(i);
  
                        /* Mark the number of TXF we're pulling now */
-                       iwl_trans_write_prph(mvm->trans, TXF_CPU2_NUM, i);
+                       iwl_trans_write_prph(mvm->trans, TXF_CPU2_NUM, i +
+                               ARRAY_SIZE(mvm->shared_mem_cfg.txfifo_size));
  
                        fifo_hdr->available_bytes =
                                cpu_to_le32(iwl_trans_read_prph(mvm->trans,
This page took 0.031134 seconds and 5 git commands to generate.