Merge tag 'iwlwifi-next-for-kalle-2020-06-11' of git://git.kernel.org/pub/scm/linux...
authorKalle Valo <kvalo@codeaurora.org>
Mon, 15 Jun 2020 17:23:23 +0000 (20:23 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 15 Jun 2020 17:23:23 +0000 (20:23 +0300)
First set of patches intended for v5.9

* Fix links to wiki;
* Some preparations for gcc-10;
* Make FW reconfiguration quieter by not using warn level;
* Some other small fixes and clean-up;

# gpg: Signature made Thu 11 Jun 2020 12:03:51 PM EEST using RSA key ID 1A3CC5FA
# gpg: Good signature from "Luciano Roth Coelho (Luca) <luca@coelho.fi>"
# gpg:                 aka "Luciano Roth Coelho (Intel) <luciano.coelho@intel.com>"

14 files changed:
drivers/net/wireless/intel/iwlegacy/4965-mac.c
drivers/net/wireless/intel/iwlwifi/Kconfig
drivers/net/wireless/intel/iwlwifi/dvm/commands.h
drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h
drivers/net/wireless/intel/iwlwifi/fw/api/tx.h
drivers/net/wireless/intel/iwlwifi/fw/dbg.c
drivers/net/wireless/intel/iwlwifi/fw/debugfs.c
drivers/net/wireless/intel/iwlwifi/iwl-config.h
drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h
drivers/net/wireless/intel/iwlwifi/iwl-trans.h
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/rs.c
drivers/net/wireless/intel/iwlwifi/mvm/sta.c

index da6d420..ad9d7e7 100644 (file)
@@ -1415,7 +1415,7 @@ il4965_hdl_c_stats(struct il_priv *il, struct il_rx_buf *rxb)
 /*
  * mac80211 queues, ACs, hardware queues, FIFOs.
  *
- * Cf. http://wireless.kernel.org/en/developers/Documentation/mac80211/queues
+ * Cf. https://wireless.wiki.kernel.org/en/developers/Documentation/mac80211/queues
  *
  * Mac80211 uses the following numbers, which we get as from it
  * by way of skb_get_queue_mapping(skb):
index 36153fa..1085afb 100644 (file)
@@ -31,7 +31,7 @@ config IWLWIFI
          In order to use this driver, you will need a firmware
          image for it. You can obtain the microcode from:
 
-                 <http://wireless.kernel.org/en/users/Drivers/iwlwifi>.
+                 <https://wireless.wiki.kernel.org/en/users/Drivers/iwlwifi>.
 
          The firmware is typically installed in /lib/firmware. You can
          look in the hotplug script /etc/hotplug/firmware.agent to
index 0f4be4b..fdcc129 100644 (file)
@@ -1023,7 +1023,7 @@ struct iwl_wep_cmd {
        u8 global_key_type;
        u8 flags;
        u8 reserved;
-       struct iwl_wep_key key[0];
+       struct iwl_wep_key key[];
 } __packed;
 
 #define WEP_KEY_WEP_TYPE 1
@@ -1305,7 +1305,7 @@ struct iwl_tx_cmd {
         * length is 26 or 30 bytes, followed by payload data
         */
        u8 payload[0];
-       struct ieee80211_hdr hdr[0];
+       struct ieee80211_hdr hdr[];
 } __packed;
 
 /*
@@ -2380,7 +2380,7 @@ struct iwl_scan_cmd {
         * for one scan to complete (i.e. receive SCAN_COMPLETE_NOTIFICATION)
         * before requesting another scan.
         */
-       u8 data[0];
+       u8 data[];
 } __packed;
 
 /* Can abort will notify by complete notification with abort status. */
@@ -2475,7 +2475,7 @@ struct iwl_tx_beacon_cmd {
        __le16 tim_idx;
        u8 tim_size;
        u8 reserved1;
-       struct ieee80211_hdr frame[0];  /* beacon frame */
+       struct ieee80211_hdr frame[];   /* beacon frame */
 } __packed;
 
 /******************************************************************************
@@ -3188,7 +3188,7 @@ struct iwl_calib_hdr {
 
 struct iwl_calib_cmd {
        struct iwl_calib_hdr hdr;
-       u8 data[0];
+       u8 data[];
 } __packed;
 
 struct iwl_calib_xtal_freq_cmd {
@@ -3216,7 +3216,7 @@ struct iwl_calib_temperature_offset_v2_cmd {
 /* IWL_PHY_CALIBRATE_CHAIN_NOISE_RESET_CMD */
 struct iwl_calib_chain_noise_reset_cmd {
        struct iwl_calib_hdr hdr;
-       u8 data[0];
+       u8 data[];
 };
 
 /* IWL_PHY_CALIBRATE_CHAIN_NOISE_GAIN_CMD */
index 6512d25..423d3c3 100644 (file)
@@ -200,6 +200,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
        iwl_leds_init(priv);
 
        wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
+       wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_EXT_KEY_ID);
 
        ret = ieee80211_register_hw(priv->hw);
        if (ret) {
index fd719c3..b6c31f0 100644 (file)
@@ -361,7 +361,7 @@ struct iwl_mcc_update_resp_v3 {
        __le16 time;
        __le16 geo_info;
        __le32 n_channels;
-       __le32 channels[0];
+       __le32 channels[];
 } __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_3 */
 
 /**
@@ -390,7 +390,7 @@ struct iwl_mcc_update_resp {
        u8 source_id;
        u8 reserved[3];
        __le32 n_channels;
-       __le32 channels[0];
+       __le32 channels[];
 } __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_4 */
 
 /**
index f1d1fe9..82d59b5 100644 (file)
@@ -293,7 +293,7 @@ struct iwl_tx_cmd {
        __le16 pm_frame_timeout;
        __le16 reserved4;
        u8 payload[0];
-       struct ieee80211_hdr hdr[0];
+       struct ieee80211_hdr hdr[];
 } __packed; /* TX_CMD_API_S_VER_6 */
 
 struct iwl_dram_sec_info {
@@ -319,7 +319,7 @@ struct iwl_tx_cmd_gen2 {
        __le32 flags;
        struct iwl_dram_sec_info dram_info;
        __le32 rate_n_flags;
-       struct ieee80211_hdr hdr[0];
+       struct ieee80211_hdr hdr[];
 } __packed; /* TX_CMD_API_S_VER_7 */
 
 /**
@@ -342,7 +342,7 @@ struct iwl_tx_cmd_gen3 {
        struct iwl_dram_sec_info dram_info;
        __le32 rate_n_flags;
        __le64 ttl;
-       struct ieee80211_hdr hdr[0];
+       struct ieee80211_hdr hdr[];
 } __packed; /* TX_CMD_API_S_VER_8 */
 
 /*
@@ -766,8 +766,8 @@ struct iwl_mvm_compressed_ba_notif {
        __le32 tx_rate;
        __le16 tfd_cnt;
        __le16 ra_tid_cnt;
-       struct iwl_mvm_compressed_ba_tfd tfd[0];
        struct iwl_mvm_compressed_ba_ratid ra_tid[0];
+       struct iwl_mvm_compressed_ba_tfd tfd[];
 } __packed; /* COMPRESSED_BA_RES_API_S_VER_4 */
 
 /**
@@ -784,7 +784,7 @@ struct iwl_mac_beacon_cmd_v6 {
        __le32 template_id;
        __le32 tim_idx;
        __le32 tim_size;
-       struct ieee80211_hdr frame[0];
+       struct ieee80211_hdr frame[];
 } __packed; /* BEACON_TEMPLATE_CMD_API_S_VER_6 */
 
 /**
@@ -805,7 +805,7 @@ struct iwl_mac_beacon_cmd_v7 {
        __le32 tim_size;
        __le32 ecsa_offset;
        __le32 csa_offset;
-       struct ieee80211_hdr frame[0];
+       struct ieee80211_hdr frame[];
 } __packed; /* BEACON_TEMPLATE_CMD_API_S_VER_7 */
 
 enum iwl_mac_beacon_flags {
@@ -840,7 +840,7 @@ struct iwl_mac_beacon_cmd {
        __le32 tim_size;
        __le32 ecsa_offset;
        __le32 csa_offset;
-       struct ieee80211_hdr frame[0];
+       struct ieee80211_hdr frame[];
 } __packed; /* BEACON_TEMPLATE_CMD_API_S_VER_10 */
 
 struct iwl_beacon_notif {
index 4d3687c..7ea55cf 100644 (file)
@@ -2554,7 +2554,7 @@ int iwl_fw_start_dbg_conf(struct iwl_fw_runtime *fwrt, u8 conf_id)
                return -EINVAL;
 
        if (fwrt->dump.conf != FW_DBG_INVALID)
-               IWL_WARN(fwrt, "FW already configured (%d) - re-configuring\n",
+               IWL_INFO(fwrt, "FW already configured (%d) - re-configuring\n",
                         fwrt->dump.conf);
 
        /* Send all HCMDs for configuring the FW debug */
index 6e72c27..267ad4e 100644 (file)
@@ -260,7 +260,7 @@ struct hcmd_write_data {
        __be32 cmd_id;
        __be32 flags;
        __be16 length;
-       u8 data[0];
+       u8 data[];
 } __packed;
 
 static ssize_t iwl_dbgfs_send_hcmd_write(struct iwl_fw_runtime *fwrt, char *buf,
index 244899f..e27c132 100644 (file)
@@ -641,6 +641,6 @@ extern const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0;
 extern const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0_long;
 extern const struct iwl_cfg iwlax411_2ax_cfg_sosnj_gf4_a0;
 extern const struct iwl_cfg iwlax211_cfg_snj_gf_a0;
-#endif /* CPTCFG_IWLMVM || CPTCFG_IWLFMAC */
+#endif /* CONFIG_IWLMVM */
 
 #endif /* __IWL_CONFIG_H__ */
index 3008a52..b35b892 100644 (file)
@@ -175,7 +175,7 @@ void iwl_opmode_deregister(const char *name);
 struct iwl_op_mode {
        const struct iwl_op_mode_ops *ops;
 
-       char op_mode_specific[0] __aligned(sizeof(void *));
+       char op_mode_specific[] __aligned(sizeof(void *));
 };
 
 static inline void iwl_op_mode_stop(struct iwl_op_mode *op_mode)
index a301e24..34788e7 100644 (file)
@@ -1006,7 +1006,7 @@ struct iwl_trans {
 
        /* pointer to trans specific struct */
        /*Ensure that this pointer will always be aligned to sizeof pointer */
-       char trans_specific[0] __aligned(sizeof(void *));
+       char trans_specific[] __aligned(sizeof(void *));
 };
 
 const char *iwl_get_cmd_string(struct iwl_trans *trans, u32 id);
index 7791623..9374c85 100644 (file)
@@ -543,6 +543,14 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
 
        hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
        wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
+
+       /* The new Tx API does not allow to pass the key or keyid of a MPDU to
+        * the hw, preventing us to control which key(id) to use per MPDU.
+        * Till that's fixed we can't use Extended Key ID for the newer cards.
+        */
+       if (!iwl_mvm_has_new_tx_api(mvm))
+               wiphy_ext_feature_set(hw->wiphy,
+                                     NL80211_EXT_FEATURE_EXT_KEY_ID);
        hw->wiphy->features |= NL80211_FEATURE_HT_IBSS;
 
        hw->wiphy->regulatory_flags |= REGULATORY_ENABLE_RELAX_NO_IR;
@@ -4903,7 +4911,7 @@ static void iwl_mvm_mac_sta_statistics(struct ieee80211_hw *hw,
        struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
 
        if (mvmsta->avg_energy) {
-               sinfo->signal_avg = mvmsta->avg_energy;
+               sinfo->signal_avg = -(s8)mvmsta->avg_energy;
                sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL_AVG);
        }
 
index a7264b2..86b2ebb 100644 (file)
@@ -603,7 +603,7 @@ static int rs_tl_turn_on_agg_for_tid(struct iwl_mvm *mvm,
                                     struct iwl_lq_sta *lq_data, u8 tid,
                                     struct ieee80211_sta *sta)
 {
-       int ret = -EAGAIN;
+       int ret;
 
        IWL_DEBUG_HT(mvm, "Starting Tx agg: STA: %pM tid: %d\n",
                     sta->addr, tid);
index fee01cb..53af3c9 100644 (file)
@@ -1369,14 +1369,6 @@ out_err:
        return ret;
 }
 
-static inline u8 iwl_mvm_tid_to_ac_queue(int tid)
-{
-       if (tid == IWL_MAX_TID_COUNT)
-               return IEEE80211_AC_VO; /* MGMT */
-
-       return tid_to_mac80211_ac[tid];
-}
-
 void iwl_mvm_add_new_dqa_stream_wk(struct work_struct *wk)
 {
        struct iwl_mvm *mvm = container_of(wk, struct iwl_mvm,