iwlwifi: updates intended for v4.12 2017-04-11
cover iwlwifi: updates intended for v4.12 2017-04-11
From: Luca Coelho <[email protected]>
Hi,
This is my first patch set intended for v4.12. These are the changes:
* Some small fixes here and there;
* The usual cleanups and small improvements;
* Work to support A000 devices continues;
* New FW API version;
* Some debugging improvements;
As usual, I'm pushing this to a pending branch, for kbuild bot, and will send a pull-request later.
Please review.
Cheers,
Luca.
Emmanuel Grumbach (2):
iwlwifi: mvm: add DQA_ENABLE_CMD to the command list
iwlwifi: pcie: print less data upon firmware crash
Golan Ben-Ami (1):
iwlwifi: mvm: support MFUART dump in case of MFUART assert
Johannes Berg (3):
iwlwifi: mvm: fix RX SKB header size and align it properly
iwlwifi: use upper_32_bits/lower_32_bits where appropriate
iwlwifi: pcie: use iwl_get_dma_hi_addr()
Liad Kaufman (1):
iwlwifi: add support for 9000 HW B-step NICs
Luca Coelho (4):
iwlwifi: be more verbose about needed firmware
iwlwifi: remove support for deprecated RF
iwlwifi: mvm: bump max API to 30
iwlwifi: remove unnecessary dev_cmd_headroom parameter
Sara Sharon (14):
iwlwifi: mvm: support new binding API
iwlwifi: mvm: adjust new API of compressed BA
iwlwifi: mvm: cleanup pending frames in DQA mode
iwlwifi: mvm: add multicast station
iwlwifi: mvm: support new ADD_MODIFY_STA_KEY command
iwlwifi: mvm: optimize reorder timeout frame releasing
iwlwifi: mvm: don't assume static queue numbers Revert "iwlwifi: introduce trans API to get byte count table"
iwlwifi: pcie: remove the active field in struct iwl_txq
iwlwifi: pcie: use WFPM_GP for debugging D3 flows
iwlwifi: pcie: introduce split point to a000 devices
iwlwifi: pcie: add context information support
iwlwifi: mvm: remove call for paging in new init flow
iwlwifi: mvm: separate queue mapping from queue enablement
drivers/net/wireless/intel/iwlwifi/Makefile | 1 + drivers/net/wireless/intel/iwlwifi/iwl-7000.c | 4 +- drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 4 +- drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 46 ++-- drivers/net/wireless/intel/iwlwifi/iwl-a000.c | 5 +- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 12 +- .../net/wireless/intel/iwlwifi/iwl-context-info.h | 203 +++++++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 1 - drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 34 ++- drivers/net/wireless/intel/iwlwifi/iwl-fh.h | 6 +- drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 5 + drivers/net/wireless/intel/iwlwifi/iwl-io.c | 4 +- drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 2 + drivers/net/wireless/intel/iwlwifi/iwl-trans.c | 7 +- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 28 +-- drivers/net/wireless/intel/iwlwifi/mvm/binding.c | 17 +- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 20 +- .../net/wireless/intel/iwlwifi/mvm/fw-api-sta.h | 34 ++- drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 5 + drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 40 ++- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 32 ++- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 34 ++- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 25 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 12 + drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 18 +- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 20 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 241 ++++++++++++------ drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 5 +- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 49 ++-- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 34 ++- .../net/wireless/intel/iwlwifi/pcie/ctxt-info.c | 274 +++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 17 +- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 53 +++- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 48 +++- .../net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 226 +++++++++++++++++ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 218 ++++++++-------- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 99 +++++--- 38 files changed, 1462 insertions(+), 422 deletions(-) create mode 100644 drivers/net/wireless/intel/iwlwifi/iwl-context-info.h create mode 100644 drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c create mode 100644 drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
Signature · 1 line
2.11.0
PATCH 2/25 iwlwifi: be more verbose about needed firmware
From: Luca Coelho <[email protected]>
If the supported firmware versions are not found, we currently only print "no suitable firmware found". This is not very informative for the user trying to find the correct version to use. Improve this by printing the exact firmware name(s) the driver supports and pointing to the git repository where they can be found.
--- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-)
drivers/net/wireless/intel/iwlwifi/iwl-drv.c +19 -4
@@ -211,24 +211,39 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw,static int iwl_request_firmware (struct iwl_drv *drv,bool first) { -const char *name_pre = drv->trans->cfg->fw_name_pre; +const struct iwl_cfg *cfg = drv->trans->cfg;char tag[8 ];if (first) { - drv->fw_index = drv->trans->cfg->ucode_api_max; + drv->fw_index = cfg->ucode_api_max;sprintf (tag,"%d" , drv->fw_index); }else { drv->fw_index--;sprintf (tag,"%d" , drv->fw_index); } -if (drv->fw_index < drv->trans->cfg->ucode_api_min) { +if (drv->fw_index < cfg->ucode_api_min) {IWL_ERR (drv,"no suitable firmware found!\n" ); + +if (cfg->ucode_api_min == cfg->ucode_api_max) { +IWL_ERR (drv,"%s%d is required\n" , cfg->fw_name_pre, + cfg->ucode_api_max); + }else { +IWL_ERR (drv,"minimum version required: %s%d\n" , + cfg->fw_name_pre, + cfg->ucode_api_min); +IWL_ERR (drv,"maximum version supported: %s%d\n" , + cfg->fw_name_pre, + cfg->ucode_api_max); + } + +IWL_ERR (drv, +"check git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git\n" );return -ENOENT ; }snprintf (drv->firmware_name,sizeof (drv->firmware_name),"%s%s.ucode" , - name_pre, tag); + cfg->fw_name_pre, tag);IWL_DEBUG_INFO (drv,"attempting to load firmware '%s'\n" , drv->firmware_name);
Signature · 1 line
2.11.0
PATCH 1/25 iwlwifi: mvm: support new binding API
In reply to Luca CoelhoFrom: Sara Sharon <[email protected]>
For a000 devices the binding API needs to include relevant lmac ID - support the new API.
The new API should be used regardless if the device had CDB or not. If there is no actual CDB support the binding is bound to first lmac regardless of the band.
There are some functionality changes in binding restrictions and quota allocations that will be handled in future patches.
--- drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/binding.c | 17 ++++++++++++++++- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 16 ++++++++++++++-- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 14 +++++++++++--- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 14 ++++++++------ 5 files changed, 51 insertions(+), 12 deletions(-)
drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h +2 -0
@@ -344,6 +344,8 @@ enum iwl_ucode_tlv_capa {IWL_UCODE_TLV_CAPA_BT_COEX_RRC = (__force iwl_ucode_tlv_capa_t )30 ,IWL_UCODE_TLV_CAPA_GSCAN_SUPPORT = (__force iwl_ucode_tlv_capa_t )31 ,IWL_UCODE_TLV_CAPA_STA_PM_NOTIF = (__force iwl_ucode_tlv_capa_t )38 , +IWL_UCODE_TLV_CAPA_BINDING_CDB_SUPPORT = (__force iwl_ucode_tlv_capa_t )39 , +IWL_UCODE_TLV_CAPA_CDB_SUPPORT = (__force iwl_ucode_tlv_capa_t )40 ,IWL_UCODE_TLV_CAPA_EXTENDED_DTS_MEASURE = (__force iwl_ucode_tlv_capa_t )64 ,IWL_UCODE_TLV_CAPA_SHORT_PM_TIMEOUTS = (__force iwl_ucode_tlv_capa_t )65 , IWL_UCODE_TLV_CAPA_BT_MPLUT_SUPPORT = (__force iwl_ucode_tlv_capa_t)67,
drivers/net/wireless/intel/iwlwifi/mvm/binding.c +16 -1
@@ -6,6 +6,7 @@* GPL LICENSE SUMMARY * * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. +* Copyright(c) 2016 Intel Deutschland GmbH * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as
@@ -31,6 +32,7 @@* BSD LICENSE * * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. +* Copyright(c) 2016 Intel Deutschland GmbH * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -82,6 +84,19 @@ static int iwl_mvm_binding_cmd(struct iwl_mvm *mvm, u32 action,struct iwl_mvm_phy_ctxt *phyctxt = data->phyctxt;int i, ret;u32 status; +int size; + +if (fw_has_capa (&mvm->fw->ucode_capa, +IWL_UCODE_TLV_CAPA_BINDING_CDB_SUPPORT )) { + size =sizeof (cmd); +if (phyctxt->channel->band ==NL80211_BAND_2GHZ || + !iwl_mvm_is_cdb_supported (mvm)) + cmd.lmac_id =cpu_to_le32 (IWL_LMAC_24G_INDEX ); +else + cmd.lmac_id =cpu_to_le32 (IWL_LMAC_5G_INDEX ); + }else { + size =IWL_BINDING_CMD_SIZE_V1 ; + }memset (&cmd,0 ,sizeof (cmd));
@@ -99,7 +114,7 @@ static int iwl_mvm_binding_cmd(struct iwl_mvm *mvm, u32 action, status =0 ; ret =iwl_mvm_send_cmd_pdu_status (mvm,BINDING_CONTEXT_CMD , -sizeof (cmd), &cmd, &status); + size, &cmd, &status);if (ret) {IWL_ERR (mvm,"Failed to send binding (action:%d): %d\n" , action, ret);
drivers/net/wireless/intel/iwlwifi/mvm/d3.c +14 -2
@@ -665,6 +665,19 @@ static int iwl_mvm_d3_reprogram(struct iwl_mvm *mvm, struct ieee80211_vif *vif,struct iwl_binding_cmd binding_cmd = {};struct iwl_time_quota_cmd quota_cmd = {};u32 status; +int size; + +if (fw_has_capa (&mvm->fw->ucode_capa, +IWL_UCODE_TLV_CAPA_BINDING_CDB_SUPPORT )) { + size =sizeof (binding_cmd); +if (mvmvif->phy_ctxt->channel->band ==NL80211_BAND_2GHZ || + !iwl_mvm_is_cdb_supported (mvm)) + binding_cmd.lmac_id =cpu_to_le32 (IWL_LMAC_24G_INDEX ); +else + binding_cmd.lmac_id =cpu_to_le32 (IWL_LMAC_5G_INDEX ); + }else { + size =IWL_BINDING_CMD_SIZE_V1 ; + }/* add back the PHY */ if (WARN_ON (!mvmvif->phy_ctxt))
@@ -711,8 +724,7 @@ static int iwl_mvm_d3_reprogram(struct iwl_mvm *mvm, struct ieee80211_vif *vif, status =0 ; ret =iwl_mvm_send_cmd_pdu_status (mvm,BINDING_CONTEXT_CMD , -sizeof (binding_cmd), &binding_cmd, - &status); + size, &binding_cmd, &status);if (ret) {IWL_ERR (mvm,"Failed to add binding: %d\n" , ret);return ret;
drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h +11 -3
@@ -673,10 +673,8 @@ struct iwl_error_resp {/* Common PHY, MAC and Bindings definitions */ -#define MAX_MACS_IN_BINDING (3)#define MAX_BINDINGS (4) -#define AUX_BINDING_INDEX (3)/* Used to extract ID and color from the context dword */ #define FW_CTXT_ID_POS (0)
@@ -960,6 +958,7 @@ struct iwl_time_event_notif {* @action: action to perform, one of FW_CTXT_ACTION_* * @macs: array of MAC id and colors which belong to the binding * @phy: PHY id and color which belongs to the binding +* @lmac_id: the lmac id the binding belongs to */ struct iwl_binding_cmd {/* COMMON_INDEX_HDR_API_S_VER_1 */
@@ -968,7 +967,13 @@ struct iwl_binding_cmd {/* BINDING_DATA_API_S_VER_1 */ __le32 macs[MAX_MACS_IN_BINDING ];__le32 phy; -} __packed;/* BINDING_CMD_API_S_VER_1 */ +/* BINDING_CMD_API_S_VER_1 */ +__le32 lmac_id; +} __packed;/* BINDING_CMD_API_S_VER_2 */ + +#define IWL_BINDING_CMD_SIZE_V1 offsetof(struct iwl_binding_cmd, lmac_id) +#define IWL_LMAC_24G_INDEX 0 +#define IWL_LMAC_5G_INDEX 1/* The maximal number of fragments in the FW's schedule session */ #define IWL_MVM_MAX_QUOTA 128
@@ -990,6 +995,9 @@ struct iwl_time_quota_data {* struct iwl_time_quota_cmd - configuration of time quota between bindings * ( TIME_QUOTA_CMD = 0x2c ) * @quotas: allocations per binding +* Note: on non-CDB the fourth one is the auxilary mac and is +* essentially zero. +* On CDB the fourth one is a regular binding. */ struct iwl_time_quota_cmd {struct iwl_time_quota_data quotas[MAX_BINDINGS ];
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +8 -6
@@ -1222,13 +1222,15 @@ static inline bool iwl_mvm_is_cdb_supported(struct iwl_mvm *mvm) {/* * TODO: -* The issue of how to determine CDB support is still not well defined. -* It may be that it will be for all next HW devices and it may be per -* FW compilation and it may also differ between different devices. -* For now take a ride on the new TX API and get back to it when -* it is well defined. +* The issue of how to determine CDB APIs and usage is still not fully +* defined. +* There is a compilation for CDB and non-CDB FW, but there may +* be also runtime check. +* For now there is a TLV for checking compilation mode, but a +* runtime check will also have to be here - once defined. */ -return iwl_mvm_has_new_tx_api (mvm); +return fw_has_capa (&mvm->fw->ucode_capa, +IWL_UCODE_TLV_CAPA_CDB_SUPPORT ); }static inline bool iwl_mvm_is_tt_in_fw (struct iwl_mvm *mvm)
Signature · 1 line
2.11.0
PATCH 3/25 iwlwifi: mvm: add DQA_ENABLE_CMD to the command list
In reply to Luca CoelhoFrom: Emmanuel Grumbach <[email protected]>
This will allow to print the name of the commands in the logs when we sent it.
--- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/intel/iwlwifi/mvm/ops.c +1 -0
@@ -452,6 +452,7 @@ static const struct iwl_hcmd_names iwl_mvm_phy_names[] = {* Access is done through binary search */ static const struct iwl_hcmd_names iwl_mvm_data_path_names[] = { +HCMD_NAME (DQA_ENABLE_CMD ),HCMD_NAME (UPDATE_MU_GROUPS_CMD ),HCMD_NAME (TRIGGER_RX_QUEUES_NOTIF_CMD ),HCMD_NAME (STA_PM_NOTIF ),
Signature · 1 line
2.11.0
PATCH 4/25 iwlwifi: remove support for deprecated RF
In reply to Luca CoelhoFrom: Luca Coelho <[email protected]>
One of the RF modules we support has been deprecated and never released publicly. Remove support for this module.
--- drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 19 ------------------- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 1 - drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 1 - drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 17 +++++------------ 4 files changed, 5 insertions(+), 33 deletions(-)
drivers/net/wireless/intel/iwlwifi/iwl-9000.c +0 -19
@@ -74,13 +74,10 @@#define IWL9000_FW_PRE "iwlwifi-9000-pu-a0-jf-a0-"#define IWL9260_FW_PRE "iwlwifi-9260-th-a0-jf-a0-" -#define IWL9000LC_FW_PRE "iwlwifi-9000-pu-a0-lc-a0-"#define IWL9000_MODULE_FIRMWARE (api) \ IWL9000_FW_PRE "-" __stringify(api) ".ucode"#define IWL9260_MODULE_FIRMWARE (api) \ IWL9260_FW_PRE "-" __stringify(api) ".ucode" -#define IWL9000LC_MODULE_FIRMWARE (api) \ - IWL9000LC_FW_PRE "-" __stringify(api) ".ucode"#define NVM_HW_SECTION_NUM_FAMILY_9000 10
@@ -198,21 +195,5 @@ const struct iwl_cfg iwl9560_2ac_cfg = { .integrated = true, }; -/* -* TODO the struct below is for internal testing only this should be -* removed by EO 2016~ -*/ -const struct iwl_cfg iwl9000lc_2ac_cfg = { - .name ="Intel(R) Dual Band Wireless AC 9000" , - .fw_name_pre =IWL9000LC_FW_PRE , -IWL_DEVICE_9000 , - .ht_params = &iwl9000_ht_params, - .nvm_ver =IWL9000_NVM_VERSION , - .nvm_calib_ver =IWL9000_TX_POWER_VERSION , - .max_ht_ampdu_exponent =IEEE80211_HT_MAX_AMPDU_64K , - .integrated = true, -}; -MODULE_FIRMWARE (IWL9000_MODULE_FIRMWARE (IWL9000_UCODE_API_MAX ));MODULE_FIRMWARE (IWL9260_MODULE_FIRMWARE (IWL9000_UCODE_API_MAX )); -MODULE_FIRMWARE (IWL9000LC_MODULE_FIRMWARE (IWL9000_UCODE_API_MAX ));
drivers/net/wireless/intel/iwlwifi/iwl-config.h +0 -1
@@ -449,7 +449,6 @@ extern const struct iwl_cfg iwl4165_2ac_cfg;extern const struct iwl_cfg iwl8260_2ac_sdio_cfg;extern const struct iwl_cfg iwl8265_2ac_sdio_cfg;extern const struct iwl_cfg iwl4165_2ac_sdio_cfg; -extern const struct iwl_cfg iwl9000lc_2ac_cfg;extern const struct iwl_cfg iwl9160_2ac_cfg;extern const struct iwl_cfg iwl9260_2ac_cfg;extern const struct iwl_cfg iwl9270_2ac_cfg;
drivers/net/wireless/intel/iwlwifi/iwl-csr.h +0 -1
@@ -348,7 +348,6 @@ enum {/* RF_ID value */ #define CSR_HW_RF_ID_TYPE_JF (0x00105000) -#define CSR_HW_RF_ID_TYPE_LC (0x00101000)#define CSR_HW_RF_ID_TYPE_HR (0x00109000)/* EEPROM REG */
drivers/net/wireless/intel/iwlwifi/pcie/drv.c +5 -12
@@ -667,18 +667,11 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) iwl_trans->cfg = cfg_7265d; } -if (iwl_trans->cfg->rf_id) { -if (cfg == &iwl9460_2ac_cfg && - iwl_trans->hw_rf_id ==CSR_HW_RF_ID_TYPE_LC ) { - cfg = &iwl9000lc_2ac_cfg; - iwl_trans->cfg = cfg; - } - -if (cfg == &iwla000_2ac_cfg_hr && - iwl_trans->hw_rf_id ==CSR_HW_RF_ID_TYPE_JF ) { - cfg = &iwla000_2ac_cfg_jf; - iwl_trans->cfg = cfg; - } +if (iwl_trans->cfg->rf_id && + (cfg == &iwla000_2ac_cfg_hr && + iwl_trans->hw_rf_id ==CSR_HW_RF_ID_TYPE_JF )) { + cfg = &iwla000_2ac_cfg_jf; + iwl_trans->cfg = cfg; }#endif
Signature · 1 line
2.11.0
PATCH 6/25 iwlwifi: mvm: adjust new API of compressed BA
In reply to Luca CoelhoFrom: Sara Sharon <[email protected]>
Final API has a reserved field - adjust accordingly.
--- drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h +5 -0
@@ -635,6 +635,10 @@ enum iwl_mvm_ba_resp_flags {* @tx_rate: the rate the aggregation was sent at * @tfd_cnt: number of TFD-Q elements * @ra_tid_cnt: number of RATID-Q elements +* @ba_tfd: array of TFD queue status updates. See &iwl_mvm_compressed_ba_tfd +* for details. +* @ra_tid: array of RA-TID queue status updates. For debug purposes only. See +* &iwl_mvm_compressed_ba_ratid for more details. */ struct iwl_mvm_compressed_ba_notif {__le32 flags;
@@ -646,6 +650,7 @@ struct iwl_mvm_compressed_ba_notif {__le16 query_frame_cnt;__le16 txed;__le16 done; +__le16 reserved;__le32 wireless_time;__le32 tx_rate;__le16 tfd_cnt;
Signature · 1 line
2.11.0
PATCH 7/25 iwlwifi: mvm: fix RX SKB header size and align it properly
In reply to Luca CoelhoFrom: Johannes Berg <[email protected]>
When receiving a frame, we currently pull in sizeof(*hdr) plus some extra (crypto/snap), which is too much, most headers aren't actually sizeof(*hdr) since that takes into account the 4-address format but doesn't take into account QoS. As a result, a typical frame will have 4 bytes of the payload in the SKB header already.
Fix this by calculating the correct header length, and now that we have that, align the end of the SKB header to a multiple of 4 so that the IP header will be aligned properly when pulled in.
--- drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/rx.c +15 -3
@@ -104,7 +104,20 @@ static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm,u8 crypt_len, struct iwl_rx_cmd_buffer *rxb) { - unsigned int hdrlen, fraglen; + unsigned int hdrlen = ieee80211_hdrlen(hdr->frame_control); +unsigned int fraglen; + +/* +* The 'hdrlen' (plus the 8 bytes for the SNAP and the crypt_len, +* but those are all multiples of 4 long) all goes away, but we +* want the *end* of it, which is going to be the start of the IP +* header, to be aligned when it gets pulled in. +* The beginning of the skb->data is aligned on at least a 4-byte +* boundary after allocation. Everything here is aligned at least +* on a 2-byte boundary so we can just take hdrlen & 3 and pad by +* the result. +*/ +skb_reserve (skb, hdrlen &3 );/* If frame is small enough to fit in skb->head, pull it completely. * If not, only pull ieee80211_hdr (including crypto if present, and
@@ -118,8 +131,7 @@ static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm,* If the latter changes (there are efforts in the standards group * to do so) we should revisit this and ieee80211_data_to_8023(). */ - hdrlen = (len <=skb_tailroom (skb)) ? len : -sizeof (*hdr) + crypt_len +8 ; + hdrlen = (len <=skb_tailroom (skb)) ? len : hdrlen + crypt_len +8 ;memcpy (skb_put (skb, hdrlen), hdr, hdrlen); fraglen = len - hdrlen;
Signature · 1 line
2.11.0
PATCH 8/25 iwlwifi: pcie: print less data upon firmware crash
In reply to Luca CoelhoFrom: Emmanuel Grumbach <[email protected]>
We don't need to print so much data in the kernel log. Limit the data to be printed to the queue that actually got stuck in case of a TFD queue hang, and stop dumping all the CSR and FH registers. Over the course of time, the CSR and FH values haven't proven themselves to be really useful for debugging, and they are now in the firmware dump anyway.
This comes as a preparation to the addition of more data required to be printed by the firwmare team.
--- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 3 -- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 64 ++++++++++--------------- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 3 -- 3 files changed, 24 insertions(+), 46 deletions(-)
drivers/net/wireless/intel/iwlwifi/pcie/rx.c +0 -3
@@ -1393,9 +1393,6 @@ static void iwl_pcie_irq_handle_error(struct iwl_trans *trans)return ; } -iwl_pcie_dump_csr (trans); -iwl_dump_fh (trans,NULL ); -local_bh_disable ();/* The STATUS_FW_ERROR bit is set in this function. This must happen * before we wake up the command caller, to ensure a proper cleanup. */
drivers/net/wireless/intel/iwlwifi/pcie/trans.c +24 -40
86 lines not on this page · raw message
drivers/net/wireless/intel/iwlwifi/pcie/tx.c +0 -3
@@ -164,9 +164,6 @@ static void iwl_pcie_txq_stuck_timer(unsigned long data) }spin_unlock (&txq->lock); -IWL_ERR (trans,"Queue %d stuck for %u ms.\n" , txq->id, -jiffies_to_msecs (txq->wd_timeout)); -iwl_trans_pcie_log_scd_error (trans, txq);iwl_force_nmi (trans);
Signature · 1 line
2.11.0
PATCH 9/25 iwlwifi: mvm: cleanup pending frames in DQA mode
In reply to Luca CoelhoFrom: Sara Sharon <[email protected]>
When a station is asleep, the fw will set it as "asleep". All queues that are used only by one station will be stopped by the fw.
In pre-DQA mode this was relevant for aggregation queues. However, in DQA mode a queue is owned by one station only, so all queues will be stopped.
As a result, we don't expect to get filtered frames back to mac80211 and don't have to maintain the entire pending_frames state logic, the same way as we do in aggregations.
The correct behavior is to align DQA behavior with the aggregation queue behaviour pre-DQA:
- Don't count pending frames.
- Let mac80211 know we have frames in these queues so that it can properly handle trigger frames.
When a trigger frame is received, mac80211 tells the driver to send frames from the queues using release_buffered_frames. The driver will tell the fw to let frames out even if the station is asleep. This is done by iwl_mvm_sta_modify_sleep_tx_count.
--- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 8 +++-- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 11 +++--- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 41 ++++++++++------------- 4 files changed, 31 insertions(+), 31 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +6 -2
@@ -2319,7 +2319,7 @@ iwl_mvm_mac_release_buffered_frames(struct ieee80211_hw *hw, {struct iwl_mvm *mvm =IWL_MAC80211_GET_MVM (hw); -/* Called when we need to transmit (a) frame(s) from agg queue */ +/* Called when we need to transmit (a) frame(s) from agg or dqa queue */ iwl_mvm_sta_modify_sleep_tx_count (mvm, sta, reason, num_frames, tids, more_data, true);
@@ -2338,10 +2338,14 @@ static void __iwl_mvm_mac_sta_notify(struct ieee80211_hw *hw,for (tid =0 ; tid <IWL_MAX_TID_COUNT ; tid++) {struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; -if (tid_data->state !=IWL_AGG_ON && +if (!iwl_mvm_is_dqa_supported (mvm) && + tid_data->state !=IWL_AGG_ON && tid_data->state !=IWL_EMPTYING_HW_QUEUE_DELBA )continue ; +if (tid_data->txq_id ==IEEE80211_INVAL_HW_QUEUE ) +continue ; +__set_bit (tid_data->txq_id, &txqs);if (iwl_mvm_tid_queued (tid_data) ==0 )
drivers/net/wireless/intel/iwlwifi/mvm/sta.c +6 -5
@@ -3135,7 +3135,7 @@ void iwl_mvm_sta_modify_sleep_tx_count(struct iwl_mvm *mvm,struct ieee80211_sta *sta, enum ieee80211_frame_release_type reason, u16 cnt, u16 tids, bool more_data, - bool agg) + bool single_sta_queue) { struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); struct iwl_mvm_add_sta_cmd cmd = {
@@ -3155,14 +3155,14 @@ void iwl_mvm_sta_modify_sleep_tx_count(struct iwl_mvm *mvm,for_each_set_bit (tid, &_tids,IWL_MAX_TID_COUNT ) cmd.awake_acs |=BIT (tid_to_ucode_ac[tid]); -/* If we're releasing frames from aggregation queues then check if the -* all queues combined that we're releasing frames from have +/* If we're releasing frames from aggregation or dqa queues then check +* if all the queues that we're releasing frames from, combined, have: * - more frames than the service period, in which case more_data * needs to be set * - fewer than 'cnt' frames, in which case we need to adjust the * firmware command (but do that unconditionally) */ -if (agg) { +if (single_sta_queue) {int remaining = cnt;int sleep_tx_count;
@@ -3172,7 +3172,8 @@ void iwl_mvm_sta_modify_sleep_tx_count(struct iwl_mvm *mvm,u16 n_queued; tid_data = &mvmsta->tid_data[tid]; -if (WARN (tid_data->state !=IWL_AGG_ON && +if (WARN (!iwl_mvm_is_dqa_supported (mvm) && + tid_data->state !=IWL_AGG_ON && tid_data->state !=IWL_EMPTYING_HW_QUEUE_DELBA ,"TID %d state is %d\n" , tid, tid_data->state)) {
drivers/net/wireless/intel/iwlwifi/mvm/sta.h +1 -1
@@ -547,7 +547,7 @@ void iwl_mvm_sta_modify_sleep_tx_count(struct iwl_mvm *mvm,struct ieee80211_sta *sta, enum ieee80211_frame_release_type reason, u16 cnt, u16 tids, bool more_data, - bool agg); + bool single_sta_queue);int iwl_mvm_drain_sta (struct iwl_mvm *mvm,struct iwl_mvm_sta *mvmsta,bool drain); void iwl_mvm_sta_modify_disable_tx(struct iwl_mvm *mvm,
drivers/net/wireless/intel/iwlwifi/mvm/tx.c +18 -23
101 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH 5/25 iwlwifi: mvm: bump max API to 30
In reply to Luca CoelhoFrom: Luca Coelho <[email protected]>
--- drivers/net/wireless/intel/iwlwifi/iwl-7000.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-a000.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-)
drivers/net/wireless/intel/iwlwifi/iwl-7000.c +2 -2
@@ -73,8 +73,8 @@/* Highest firmware API version supported */ #define IWL7260_UCODE_API_MAX 17#define IWL7265_UCODE_API_MAX 17 -#define IWL7265D_UCODE_API_MAX 28 -#define IWL3168_UCODE_API_MAX 28 +#define IWL7265D_UCODE_API_MAX 30 +#define IWL3168_UCODE_API_MAX 30/* Lowest firmware API version supported */ #define IWL7260_UCODE_API_MIN 17
drivers/net/wireless/intel/iwlwifi/iwl-8000.c +2 -2
@@ -70,8 +70,8 @@#include "iwl-agn-hw.h" /* Highest firmware API version supported */ -#define IWL8000_UCODE_API_MAX 28 -#define IWL8265_UCODE_API_MAX 28 +#define IWL8000_UCODE_API_MAX 30 +#define IWL8265_UCODE_API_MAX 30/* Lowest firmware API version supported */ #define IWL8000_UCODE_API_MIN 17
drivers/net/wireless/intel/iwlwifi/iwl-9000.c +1 -1
@@ -55,7 +55,7 @@#include "iwl-agn-hw.h" /* Highest firmware API version supported */ -#define IWL9000_UCODE_API_MAX 28 +#define IWL9000_UCODE_API_MAX 30/* Lowest firmware API version supported */ #define IWL9000_UCODE_API_MIN 17
drivers/net/wireless/intel/iwlwifi/iwl-a000.c +1 -1
@@ -55,7 +55,7 @@#include "iwl-agn-hw.h" /* Highest firmware API version supported */ -#define IWL_A000_UCODE_API_MAX 28 +#define IWL_A000_UCODE_API_MAX 30/* Lowest firmware API version supported */ #define IWL_A000_UCODE_API_MIN 24
Signature · 1 line
2.11.0
PATCH 14/25 iwlwifi: mvm: optimize reorder timeout frame releasing
In reply to Luca CoelhoFrom: Sara Sharon <[email protected]>
Currently we release up to the last expired frame. However, if there are consecutive frames after it - we can optimize it further and release them as well - until the next hole.
--- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +15 -5
@@ -7,7 +7,7 @@* * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH -* Copyright(c) 2015 - 2016 Intel Deutschland GmbH +* Copyright(c) 2015 - 2017 Intel Deutschland GmbH * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as
@@ -29,7 +29,7 @@* * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH -* Copyright(c) 2015 - 2016 Intel Deutschland GmbH +* Copyright(c) 2015 - 2017 Intel Deutschland GmbH * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -462,6 +462,7 @@ void iwl_mvm_reorder_timer_expired(unsigned long data)int i;u16 sn =0 , index =0 ;bool expired = false; +bool cont = false;spin_lock (&buf->lock);
@@ -473,12 +474,21 @@ void iwl_mvm_reorder_timer_expired(unsigned long data)for (i =0 ; i < buf->buf_size ; i++) { index = (buf->head_sn + i) % buf->buf_size; -if (skb_queue_empty (&buf->entries[index])) +if (skb_queue_empty (&buf->entries[index])) { +/* +* If there is a hole and the next frame didn't expire +* we want to break and not advance SN +*/ + cont = false;continue ; -if (!time_after (jiffies, buf->reorder_time[index] + -RX_REORDER_BUF_TIMEOUT_MQ )) + } +if (!cont && !time_after (jiffies, buf->reorder_time[index] + +RX_REORDER_BUF_TIMEOUT_MQ ))break ; + expired = true; +/* continue until next hole after this expired frames */ + cont = true; sn =ieee80211_sn_add (buf->head_sn, i +1 ); }
Signature · 1 line
2.11.0
PATCH 25/25 iwlwifi: mvm: separate queue mapping from queue enablement
In reply to Luca CoelhoFrom: Sara Sharon <[email protected]>
As preparation for a000 different queue management, separate mapping of queues from actual enablement.
--- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 34 ++++++++++++++++---------- 1 file changed, 21 insertions(+), 13 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/utils.c +21 -13
@@ -7,7 +7,7 @@* * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH -* Copyright (C) 2015 Intel Deutschland GmbH +* Copyright (C) 2015 - 2017 Intel Deutschland GmbH * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as
@@ -34,6 +34,7 @@* * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH +* Copyright (C) 2015 - 2017 Intel Deutschland GmbH * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -644,20 +645,19 @@ int iwl_mvm_reconfig_scd(struct iwl_mvm *mvm, int queue, int fifo, int sta_id,return ret; } -void iwl_mvm_enable_txq (struct iwl_mvm *mvm,int queue,int mac80211_queue, -u16 ssn,const struct iwl_trans_txq_scd_cfg *cfg, -unsigned int wdg_timeout) +static bool iwl_mvm_update_txq_mapping (struct iwl_mvm *mvm,int queue, +int mac80211_queue,u8 sta_id,u8 tid) {bool enable_queue = true;spin_lock_bh (&mvm->queue_info_lock);/* Make sure this TID isn't already enabled */ -if (mvm->queue_info[queue].tid_bitmap &BIT (cfg->tid)) { +if (mvm->queue_info[queue].tid_bitmap &BIT (tid)) {spin_unlock_bh (&mvm->queue_info_lock);IWL_ERR (mvm,"Trying to enable TXQ %d with existing TID %d\n" , - queue, cfg->tid); -return ; + queue, tid); +return false; }/* Update mappings and refcounts */
@@ -666,17 +666,17 @@ void iwl_mvm_enable_txq(struct iwl_mvm *mvm, int queue, int mac80211_queue, mvm->queue_info[queue].hw_queue_to_mac80211 |=BIT (mac80211_queue); mvm->queue_info[queue].hw_queue_refcount++; - mvm->queue_info[queue].tid_bitmap |=BIT (cfg->tid); - mvm->queue_info[queue].ra_sta_id = cfg->sta_id; + mvm->queue_info[queue].tid_bitmap |=BIT (tid); + mvm->queue_info[queue].ra_sta_id = sta_id;if (enable_queue) { -if (cfg->tid !=IWL_MAX_TID_COUNT ) +if (tid !=IWL_MAX_TID_COUNT ) mvm->queue_info[queue].mac80211_ac = - tid_to_mac80211_ac[cfg->tid]; + tid_to_mac80211_ac[tid];else mvm->queue_info[queue].mac80211_ac =IEEE80211_AC_VO ; - mvm->queue_info[queue].txq_tid = cfg->tid; + mvm->queue_info[queue].txq_tid = tid; } IWL_DEBUG_TX_QUEUES(mvm,
@@ -686,8 +686,16 @@ void iwl_mvm_enable_txq(struct iwl_mvm *mvm, int queue, int mac80211_queue,spin_unlock_bh (&mvm->queue_info_lock); +return enable_queue; +} + +void iwl_mvm_enable_txq (struct iwl_mvm *mvm,int queue,int mac80211_queue, +u16 ssn,const struct iwl_trans_txq_scd_cfg *cfg, +unsigned int wdg_timeout) +{/* Send the enabling command if we need to */ -if (enable_queue) { +if (iwl_mvm_update_txq_mapping (mvm, queue, mac80211_queue, + cfg->sta_id, cfg->tid)) {struct iwl_scd_txq_cfg_cmd cmd = { .scd_queue = queue, .action = SCD_CFG_ENABLE_QUEUE,
Signature · 1 line
2.11.0
PATCH 19/25 iwlwifi: pcie: use iwl_get_dma_hi_addr()
In reply to Luca CoelhoFrom: Johannes Berg <[email protected]>
Use iwl_get_dma_hi_addr() instead of open-coding it.
--- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/intel/iwlwifi/pcie/tx.c +1 -2
@@ -380,8 +380,7 @@ static inline void iwl_pcie_tfd_set_tb(struct iwl_trans *trans, void *tfd,u16 hi_n_len = len <<4 ;put_unaligned_le32 (addr, &tb->lo); -if (sizeof (dma_addr_t) >sizeof (u32)) - hi_n_len |= ((addr >>16 ) >>16 ) &0xF ; + hi_n_len |=iwl_get_dma_hi_addr (addr); tb->hi_n_len =cpu_to_le16 (hi_n_len);
Signature · 1 line
2.11.0
PATCH 18/25 iwlwifi: pcie: use WFPM_GP for debugging D3 flows
In reply to Luca CoelhoFrom: Sara Sharon <[email protected]>
This register is helpful for debugging D3 issues. Driver turns all bits on, and then on exit reads the updated value there.
--- drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 1 + drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 13 +++++++++++++ 2 files changed, 14 insertions(+)
drivers/net/wireless/intel/iwlwifi/iwl-prph.h +1 -0
@@ -378,6 +378,7 @@#define RADIO_REG_SYS_MANUAL_DFT_0 0xAD4078#define RFIC_REG_RD 0xAD0470#define WFPM_CTRL_REG 0xA03030 +#define WFPM_GP2 0xA030B4enum {ENABLE_WFPM =BIT (31 ),WFPM_AUX_CTL_AUX_IF_MAC_OWNER_MSK =0x80000000 ,
drivers/net/wireless/intel/iwlwifi/pcie/trans.c +13 -0
@@ -1047,6 +1047,16 @@ static int iwl_pcie_load_given_ucode_8000(struct iwl_trans *trans,if (ret)return ret; +IWL_DEBUG_POWER (trans,"Original WFPM value = 0x%08X\n" , +iwl_read_prph (trans,WFPM_GP2 )); + +/* +* Set default value. On resume reading the values that were +* zeored can provide debug data on the resume flow. +* This is for debugging only and has no functional impact. +*/ +iwl_write_prph (trans,WFPM_GP2 ,0x01010101 ); +/* configure the ucode to be ready to get the secured image */ /* release CPU reset */ iwl_write_prph (trans,RELEASE_CPU_RESET ,RELEASE_CPU_RESET_BIT );
@@ -1527,6 +1537,9 @@ static int iwl_trans_pcie_d3_resume(struct iwl_trans *trans, } } +IWL_DEBUG_POWER (trans,"WFPM value upon resume = 0x%08X\n" , +iwl_read_prph (trans,WFPM_GP2 )); + val =iwl_read32 (trans,CSR_RESET );if (val &CSR_RESET_REG_FLAG_NEVO_RESET ) *status =IWL_D3_STATUS_RESET ;
Signature · 1 line
2.11.0
PATCH 20/25 iwlwifi: mvm: support MFUART dump in case of MFUART assert
In reply to Luca CoelhoFrom: Golan Ben-Ami <[email protected]>
In case of a MFUART assert, get a notification from the fw that consists of the assert id and debug data.
The notification may be divided to multiple chunks, depending on the size of the debug data sent to the driver, which would be up to 1KB.
Get the notification, and if the debug info flag is enabled, print the debug data to the dmesg.
--- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 26 ++++++++++++++++++++++--- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 24 ++++++++++++++++++++++- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 9 +++++++++ 4 files changed, 57 insertions(+), 4 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h +23 -3
@@ -7,7 +7,7 @@* * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH -* Copyright(c) 2016 Intel Deutschland GmbH +* Copyright(c) 2016 - 2017 Intel Deutschland GmbH * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as
@@ -34,7 +34,7 @@* * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH -* Copyright(c) 2016 Intel Deutschland GmbH +* Copyright(c) 2016 - 2017 Intel Deutschland GmbH * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -345,9 +345,10 @@ enum iwl_regulatory_and_nvm_subcmd_ids { NVM_ACCESS_COMPLETE = 0x0, }; -enum iwl_fmac_debug_cmds { +enum iwl_debug_cmds {LMAC_RD_WR =0x0 ,UMAC_RD_WR =0x1 , +MFU_ASSERT_DUMP_NTF =0xFE , };/* command groups */
@@ -1239,6 +1240,25 @@ struct iwl_mfuart_load_notif { } __packed;/*MFU_LOADER_NTFY_API_S_VER_2*/ /** +* struct iwl_mfu_assert_dump_notif - mfuart dump logs +* ( MFU_ASSERT_DUMP_NTF = 0xfe ) +* @assert_id: mfuart assert id that cause the notif +* @curr_reset_num: number of asserts since uptime +* @index_num: current chunk id +* @parts_num: total number of chunks +* @data_size: number of data bytes sent +* @data: data buffer +*/ +struct iwl_mfu_assert_dump_notif { +__le32 assert_id; +__le32 curr_reset_num; +__le16 index_num; +__le16 parts_num; +__le32 data_size; +__le32 data[0 ]; +} __packed;/*MFU_DUMP_ASSERT_API_S_VER_1*/ + +/** * struct iwl_set_calib_default_cmd - set default value for calibration. * ( SET_CALIB_DEFAULT_CMD = 0x8e ) * @calib_index: the calibration to set value for
drivers/net/wireless/intel/iwlwifi/mvm/fw.c +23 -1
@@ -7,7 +7,7 @@* * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH -* Copyright(c) 2016 Intel Deutschland GmbH +* Copyright(c) 2016 - 2017 Intel Deutschland GmbH * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as
@@ -34,6 +34,7 @@* * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH +* Copyright(c) 2016 - 2017 Intel Deutschland GmbH * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -271,6 +272,27 @@ static int iwl_fill_paging_mem(struct iwl_mvm *mvm, const struct fw_img *image)return 0 ; } +void iwl_mvm_mfu_assert_dump_notif (struct iwl_mvm *mvm, +struct iwl_rx_cmd_buffer *rxb) +{ +struct iwl_rx_packet *pkt =rxb_addr (rxb); +struct iwl_mfu_assert_dump_notif *mfu_dump_notif = (void *)pkt->data; +__le32 *dump_data = mfu_dump_notif->data; +int n_words =le32_to_cpu (mfu_dump_notif->data_size) /sizeof (__le32); +int i; + +if (mfu_dump_notif->index_num ==0 ) +IWL_INFO (mvm,"MFUART assert id 0x%x occurred\n" , +le32_to_cpu (mfu_dump_notif->assert_id)); + +for (i =0 ; i < n_words; i++) +IWL_DEBUG_INFO (mvm, +"MFUART assert dump, dword %u: 0x%08x\n" , +le16_to_cpu (mfu_dump_notif->index_num) * + n_words + i, +le32_to_cpu (dump_data[i])); +} +static int iwl_alloc_fw_paging_mem (struct iwl_mvm *mvm,const struct fw_img *image) {
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +2 -0
@@ -1395,6 +1395,8 @@ int iwl_mvm_notify_rx_queue(struct iwl_mvm *mvm, u32 rxq_mask,void iwl_mvm_rx_queue_notif (struct iwl_mvm *mvm,struct iwl_rx_cmd_buffer *rxb,int queue);void iwl_mvm_rx_tx_cmd (struct iwl_mvm *mvm,struct iwl_rx_cmd_buffer *rxb); +void iwl_mvm_mfu_assert_dump_notif (struct iwl_mvm *mvm, +struct iwl_rx_cmd_buffer *rxb);void iwl_mvm_rx_ba_notif (struct iwl_mvm *mvm,struct iwl_rx_cmd_buffer *rxb);void iwl_mvm_rx_ant_coupling_notif (struct iwl_mvm *mvm,struct iwl_rx_cmd_buffer *rxb);
drivers/net/wireless/intel/iwlwifi/mvm/ops.c +9 -0
@@ -302,6 +302,8 @@ static const struct iwl_rx_handlers iwl_mvm_rx_handlers[] = { RX_HANDLER_SYNC),RX_HANDLER (TOF_NOTIFICATION , iwl_mvm_tof_resp_handler,RX_HANDLER_ASYNC_LOCKED ), +RX_HANDLER_GRP (DEBUG_GROUP ,MFU_ASSERT_DUMP_NTF , + iwl_mvm_mfu_assert_dump_notif,RX_HANDLER_SYNC ),RX_HANDLER_GRP (PROT_OFFLOAD_GROUP ,STORED_BEACON_NTF , iwl_mvm_rx_stored_beacon_notif,RX_HANDLER_SYNC ), RX_HANDLER_GRP(DATA_PATH_GROUP, MU_GROUP_MGMT_NOTIF,
@@ -463,6 +465,13 @@ static const struct iwl_hcmd_names iwl_mvm_data_path_names[] = {/* Please keep this array *SORTED* by hex value. * Access is done through binary search */ +static const struct iwl_hcmd_names iwl_mvm_debug_names[] = { +HCMD_NAME (MFU_ASSERT_DUMP_NTF ), +}; + +/* Please keep this array *SORTED* by hex value. +* Access is done through binary search +*/ static const struct iwl_hcmd_names iwl_mvm_prot_offload_names[] = {HCMD_NAME (STORED_BEACON_NTF ), };
Signature · 1 line
2.11.0
PATCH 11/25 iwlwifi: add support for 9000 HW B-step NICs
In reply to Luca CoelhoFrom: Liad Kaufman <[email protected]>
Once we remove support for A-step, we'll be able to clean the code back again.
--- drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 25 ++++++++++++++++--------- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 7 +++++-- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 19 +++++++++++++------ 3 files changed, 34 insertions(+), 17 deletions(-)
drivers/net/wireless/intel/iwlwifi/iwl-9000.c +16 -9
@@ -5,7 +5,7 @@* * GPL LICENSE SUMMARY * -* Copyright(c) 2015-2016 Intel Deutschland GmbH +* Copyright(c) 2015-2017 Intel Deutschland GmbH * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as
@@ -18,7 +18,7 @@* * BSD LICENSE * -* Copyright(c) 2015-2016 Intel Deutschland GmbH +* Copyright(c) 2015-2017 Intel Deutschland GmbH * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -73,11 +73,14 @@#define IWL9000_SMEM_LEN 0x68000#define IWL9000_FW_PRE "iwlwifi-9000-pu-a0-jf-a0-" -#define IWL9260_FW_PRE "iwlwifi-9260-th-a0-jf-a0-" +#define IWL9260A_FW_PRE "iwlwifi-9260-th-a0-jf-a0-" +#define IWL9260B_FW_PRE "iwlwifi-9260-th-b0-jf-b0-"#define IWL9000_MODULE_FIRMWARE (api) \ IWL9000_FW_PRE "-" __stringify(api) ".ucode" -#define IWL9260_MODULE_FIRMWARE (api) \ - IWL9260_FW_PRE "-" __stringify(api) ".ucode" +#define IWL9260A_MODULE_FIRMWARE (api) \ + IWL9260A_FW_PRE "-" __stringify(api) ".ucode" +#define IWL9260B_MODULE_FIRMWARE (api) \ + IWL9260B_FW_PRE "-" __stringify(api) ".ucode"#define NVM_HW_SECTION_NUM_FAMILY_9000 10
@@ -145,7 +148,8 @@ static const struct iwl_tt_params iwl9000_tt_params = {const struct iwl_cfg iwl9160_2ac_cfg = { .name ="Intel(R) Dual Band Wireless AC 9160" , - .fw_name_pre =IWL9260_FW_PRE , + .fw_name_pre =IWL9260A_FW_PRE , + .fw_name_pre_next_step =IWL9260B_FW_PRE ,IWL_DEVICE_9000 , .ht_params = &iwl9000_ht_params, .nvm_ver =IWL9000_NVM_VERSION ,
@@ -155,7 +159,8 @@ const struct iwl_cfg iwl9160_2ac_cfg = {const struct iwl_cfg iwl9260_2ac_cfg = { .name ="Intel(R) Dual Band Wireless AC 9260" , - .fw_name_pre =IWL9260_FW_PRE , + .fw_name_pre =IWL9260A_FW_PRE , + .fw_name_pre_next_step =IWL9260B_FW_PRE ,IWL_DEVICE_9000 , .ht_params = &iwl9000_ht_params, .nvm_ver =IWL9000_NVM_VERSION ,
@@ -165,7 +170,8 @@ const struct iwl_cfg iwl9260_2ac_cfg = {const struct iwl_cfg iwl9270_2ac_cfg = { .name ="Intel(R) Dual Band Wireless AC 9270" , - .fw_name_pre =IWL9260_FW_PRE , + .fw_name_pre =IWL9260A_FW_PRE , + .fw_name_pre_next_step =IWL9260B_FW_PRE ,IWL_DEVICE_9000 , .ht_params = &iwl9000_ht_params, .nvm_ver =IWL9000_NVM_VERSION ,
@@ -196,4 +202,5 @@ const struct iwl_cfg iwl9560_2ac_cfg = { };MODULE_FIRMWARE (IWL9000_MODULE_FIRMWARE (IWL9000_UCODE_API_MAX )); -MODULE_FIRMWARE (IWL9260_MODULE_FIRMWARE (IWL9000_UCODE_API_MAX )); +MODULE_FIRMWARE (IWL9260A_MODULE_FIRMWARE (IWL9000_UCODE_API_MAX )); +MODULE_FIRMWARE (IWL9260B_MODULE_FIRMWARE (IWL9000_UCODE_API_MAX ));
drivers/net/wireless/intel/iwlwifi/iwl-config.h +5 -2
@@ -6,7 +6,7 @@* GPL LICENSE SUMMARY * * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved. -* Copyright (C) 2016 Intel Deutschland GmbH +* Copyright (C) 2016 - 2017 Intel Deutschland GmbH * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as
@@ -32,7 +32,7 @@* BSD LICENSE * * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. -* Copyright (C) 2016 Intel Deutschland GmbH +* Copyright (C) 2016 - 2017 Intel Deutschland GmbH * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -283,6 +283,8 @@ struct iwl_pwr_tx_backoff {* @fw_name_pre: Firmware filename prefix. The api version and extension * (.ucode) will be added to filename before loading from disk. The * filename is constructed as fw_name_pre<api>.ucode. +* @fw_name_pre_next_step: same as @fw_name_pre, only for next step +* (if supported) * @ucode_api_max: Highest version of uCode API supported by driver. * @ucode_api_min: Lowest version of uCode API supported by driver. * @max_inst_size: The maximal length of the fw inst section
@@ -330,6 +332,7 @@ struct iwl_cfg {/* params specific to an individual device within a device family */ const char *name;const char *fw_name_pre; +const char *fw_name_pre_next_step;/* params not likely to change within a device family */ const struct iwl_base_params *base_params;/* params likely to change within a device family */
drivers/net/wireless/intel/iwlwifi/iwl-drv.c +13 -6
@@ -7,7 +7,7 @@* * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH -* Copyright(c) 2016 Intel Deutschland GmbH +* Copyright(c) 2016 - 2017 Intel Deutschland GmbH * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as
@@ -34,7 +34,7 @@* * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH -* Copyright(c) 2016 Intel Deutschland GmbH +* Copyright(c) 2016 - 2017 Intel Deutschland GmbH * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -213,6 +213,13 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first) {const struct iwl_cfg *cfg = drv->trans->cfg;char tag[8 ]; +const char *fw_pre_name; + +if (drv->trans->cfg->device_family ==IWL_DEVICE_FAMILY_8000 && +CSR_HW_REV_STEP (drv->trans->hw_rev) ==SILICON_B_STEP ) + fw_pre_name = cfg->fw_name_pre_next_step; +else + fw_pre_name = cfg->fw_name_pre;if (first) { drv->fw_index = cfg->ucode_api_max;
@@ -226,14 +233,14 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first)IWL_ERR (drv,"no suitable firmware found!\n" );if (cfg->ucode_api_min == cfg->ucode_api_max) { -IWL_ERR (drv,"%s%d is required\n" , cfg->fw_name_pre, +IWL_ERR (drv,"%s%d is required\n" , fw_pre_name, cfg->ucode_api_max); }else {IWL_ERR (drv,"minimum version required: %s%d\n" , - cfg->fw_name_pre, + fw_pre_name, cfg->ucode_api_min);IWL_ERR (drv,"maximum version supported: %s%d\n" , - cfg->fw_name_pre, + fw_pre_name, cfg->ucode_api_max); }
@@ -243,7 +250,7 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first) }snprintf (drv->firmware_name,sizeof (drv->firmware_name),"%s%s.ucode" , - cfg->fw_name_pre, tag); + fw_pre_name, tag);IWL_DEBUG_INFO (drv,"attempting to load firmware '%s'\n" , drv->firmware_name);
Signature · 1 line
2.11.0
PATCH 17/25 iwlwifi: pcie: remove the active field in struct iwl_txq
In reply to Luca CoelhoFrom: Sara Sharon <[email protected]>
We already have queue_used in the transport - we can use it instead.
--- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 2 -- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 7 +++---- 2 files changed, 3 insertions(+), 6 deletions(-)
drivers/net/wireless/intel/iwlwifi/pcie/internal.h +0 -2
@@ -237,7 +237,6 @@ struct iwl_pcie_first_tb_buf {* @stuck_timer: timer that fires if queue gets stuck * @trans_pcie: pointer back to transport (for timer) * @need_update: indicates need to update read/write index -* @active: stores if queue is active * @ampdu: true if this queue is an ampdu queue for an specific RA/TID * @wd_timeout: queue watchdog timeout (jiffies) - per queue * @frozen: tx stuck queue timer is frozen
@@ -277,7 +276,6 @@ struct iwl_txq {struct iwl_trans_pcie *trans_pcie;bool need_update;bool frozen; -u8 active;bool ampdu;int block;unsigned long wd_timeout;
drivers/net/wireless/intel/iwlwifi/pcie/tx.c +3 -4
@@ -701,7 +701,6 @@ static void iwl_pcie_txq_unmap(struct iwl_trans *trans, int txq_id)spin_unlock_irqrestore (&trans_pcie->reg_lock, flags); } } - txq->active = false;while (!skb_queue_empty (&txq->overflow_q)) {struct sk_buff *skb =__skb_dequeue (&txq->overflow_q);
@@ -932,6 +931,8 @@ void iwl_pcie_tx_free(struct iwl_trans *trans)int txq_id;struct iwl_trans_pcie *trans_pcie =IWL_TRANS_GET_PCIE_TRANS (trans); +memset (trans_pcie->queue_used,0 ,sizeof (trans_pcie->queue_used)); +/* Tx queues */ if (trans_pcie->txq) { for (txq_id = 0;
@@ -1107,7 +1108,7 @@ void iwl_trans_pcie_reclaim(struct iwl_trans *trans, int txq_id, int ssn,spin_lock_bh (&txq->lock); -if (!txq->active) { +if (!test_bit (txq_id, trans_pcie->queue_used)) {IWL_DEBUG_TX_QUEUES (trans,"Q %d inactive - ignoring idx %d\n" , txq_id, ssn); goto out;
@@ -1411,8 +1412,6 @@ void iwl_trans_pcie_txq_enable(struct iwl_trans *trans, int txq_id, u16 ssn,"Activate queue %d WrPtr: %d\n" , txq_id, ssn & 0xff); } - - txq->active = true; } void iwl_trans_pcie_txq_set_shared_mode(struct iwl_trans *trans, u32 txq_id,
Signature · 1 line
2.11.0
PATCH 15/25 iwlwifi: mvm: don't assume static queue numbers
In reply to Luca CoelhoFrom: Sara Sharon <[email protected]>
In a000 devices FW will assign the queue number. Prepare for that by getting rid of static defines and store them in variables. Enlarge to u16 since we may have up to 512 queues.
--- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 5 ++++- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 22 ++++++++-------------- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 8 ++++---- 4 files changed, 18 insertions(+), 19 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +4 -1
@@ -976,7 +976,10 @@ struct iwl_mvm {#endif /* Tx queues */ -u8 aux_queue; +u16 aux_queue; +u16 probe_queue; +u16 p2p_dev_queue; +u8 first_agg_queue;u8 last_agg_queue;
drivers/net/wireless/intel/iwlwifi/mvm/ops.c +2 -0
@@ -603,6 +603,8 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, } }else { mvm->aux_queue =IWL_MVM_DQA_AUX_QUEUE ; + mvm->probe_queue =IWL_MVM_DQA_AP_PROBE_RESP_QUEUE ; + mvm->p2p_dev_queue =IWL_MVM_DQA_P2P_DEVICE_QUEUE ; mvm->first_agg_queue =IWL_MVM_DQA_MIN_DATA_QUEUE ; mvm->last_agg_queue =IWL_MVM_DQA_MAX_DATA_QUEUE ; }
drivers/net/wireless/intel/iwlwifi/mvm/sta.c +8 -14
@@ -1806,9 +1806,9 @@ int iwl_mvm_send_add_bcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)int queue;if (vif->type ==NL80211_IFTYPE_AP ) - queue =IWL_MVM_DQA_AP_PROBE_RESP_QUEUE ; + queue = mvm->probe_queue;else if (vif->type ==NL80211_IFTYPE_P2P_DEVICE ) - queue =IWL_MVM_DQA_P2P_DEVICE_QUEUE ; + queue = mvm->p2p_dev_queue;else if (WARN (1 ,"Missing required TXQ for adding bcast STA\n" ))return -EINVAL ;
@@ -1836,24 +1836,18 @@ static void iwl_mvm_free_bcast_sta_queues(struct iwl_mvm *mvm,lockdep_assert_held (&mvm->mutex); -if (mvmvif->bcast_sta.tfd_queue_msk & -BIT (IWL_MVM_DQA_AP_PROBE_RESP_QUEUE )) { -iwl_mvm_disable_txq (mvm, -IWL_MVM_DQA_AP_PROBE_RESP_QUEUE , +if (mvmvif->bcast_sta.tfd_queue_msk &BIT (mvm->probe_queue)) { +iwl_mvm_disable_txq (mvm, mvm->probe_queue, vif->hw_queue[0 ],IWL_MAX_TID_COUNT ,0 ); - mvmvif->bcast_sta.tfd_queue_msk &= - ~BIT (IWL_MVM_DQA_AP_PROBE_RESP_QUEUE ); + mvmvif->bcast_sta.tfd_queue_msk &= ~BIT (mvm->probe_queue); } -if (mvmvif->bcast_sta.tfd_queue_msk & -BIT (IWL_MVM_DQA_P2P_DEVICE_QUEUE )) { -iwl_mvm_disable_txq (mvm, -IWL_MVM_DQA_P2P_DEVICE_QUEUE , +if (mvmvif->bcast_sta.tfd_queue_msk &BIT (mvm->p2p_dev_queue)) { +iwl_mvm_disable_txq (mvm, mvm->p2p_dev_queue, vif->hw_queue[0 ],IWL_MAX_TID_COUNT ,0 ); - mvmvif->bcast_sta.tfd_queue_msk &= - ~BIT (IWL_MVM_DQA_P2P_DEVICE_QUEUE ); + mvmvif->bcast_sta.tfd_queue_msk &= ~BIT (mvm->p2p_dev_queue); } }
drivers/net/wireless/intel/iwlwifi/mvm/tx.c +4 -4
@@ -513,20 +513,20 @@ static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm,*/ if (ieee80211_is_probe_resp (fc) ||ieee80211_is_auth (fc) ||ieee80211_is_deauth (fc)) -return IWL_MVM_DQA_AP_PROBE_RESP_QUEUE ; +return mvm->probe_queue;if (info->hw_queue == info->control.vif->cab_queue)return info->hw_queue;WARN_ONCE (1 ,"fc=0x%02x" ,le16_to_cpu (fc)); -return IWL_MVM_DQA_AP_PROBE_RESP_QUEUE ; +return mvm->probe_queue;case NL80211_IFTYPE_P2P_DEVICE :if (ieee80211_is_mgmt (fc)) -return IWL_MVM_DQA_P2P_DEVICE_QUEUE ; +return mvm->p2p_dev_queue;if (info->hw_queue == info->control.vif->cab_queue)return info->hw_queue;WARN_ON_ONCE (1 ); -return IWL_MVM_DQA_P2P_DEVICE_QUEUE ; +return mvm->p2p_dev_queue;default :WARN_ONCE (1 ,"Not a ctrl vif, no available queue\n" );return -1 ;
Signature · 1 line
2.11.0
PATCH 23/25 iwlwifi: pcie: add context information support
In reply to Luca CoelhoFrom: Sara Sharon <[email protected]>
Context information structure is going to be used in a000 devices for firmware self init.
The self init includes firmware self loading from DRAM by ROM.
This means the TFH relevant firmware loading can be cleaned up.
The firmware loading includes the paging memory as well, so op mode can stop initializing the paging and sending the DRAM_BLOCK_CMD.
Firmware is doing RFH, TFH and SCD configuration, while driver only fills the required configurations and addresses in the context information structure.
The only remaining access to RFH is the write pointer, which is updated upon alive interrupt after FW configured the RFH.
--- drivers/net/wireless/intel/iwlwifi/Makefile | 1 + .../net/wireless/intel/iwlwifi/iwl-context-info.h | 203 +++++++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-fh.h | 4 + drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 1 + .../net/wireless/intel/iwlwifi/pcie/ctxt-info.c | 274 +++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 50 +++- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 45 +++- .../net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 226 +++++++++++++++++ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 60 ++--- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 78 ++++-- 10 files changed, 867 insertions(+), 75 deletions(-) create mode 100644 drivers/net/wireless/intel/iwlwifi/iwl-context-info.h create mode 100644 drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c create mode 100644 drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
drivers/net/wireless/intel/iwlwifi/Makefile +1 -0
@@ -7,6 +7,7 @@ iwlwifi-objs += iwl-notif-wait.o iwlwifi-objs += iwl-eeprom-read.o iwl-eeprom-parse.o iwlwifi-objs += iwl-phy-db.o iwl-nvm-parse.o iwlwifi-objs += pcie/drv.o pcie/rx.o pcie/tx.o pcie/trans.o +iwlwifi-objs += pcie/ctxt-info.o pcie/trans-gen2.o iwlwifi-$(CONFIG_IWLDVM) += iwl-1000.o iwl-2000.o iwl-5000.o iwl-6000.o iwlwifi-$(CONFIG_IWLMVM) += iwl-7000.o iwl-8000.o iwl-9000.o iwl-a000.o iwlwifi-objs += iwl-trans.o
drivers/net/wireless/intel/iwlwifi/iwl-context-info.h new file +203 -0
203 lines not on this page · raw message
drivers/net/wireless/intel/iwlwifi/iwl-fh.h +4 -0
@@ -614,6 +614,8 @@ static inline unsigned int FH_MEM_CBBC_QUEUE(struct iwl_trans *trans,#define RX_POOL_SIZE (MQ_RX_NUM_RBDS + \ IWL_MAX_RX_HW_QUEUES * \ (RX_CLAIM_REQ_ALLOC - RX_POST_REQ_ALLOC)) +/* cb size is the exponent */ +#define RX_QUEUE_CB_SIZE (x) ilog2(x)#define RX_QUEUE_SIZE 256#define RX_QUEUE_MASK 255
@@ -639,6 +641,8 @@ struct iwl_rb_status {#define TFD_QUEUE_SIZE_MAX (256) +/* cb size is the exponent - 3 */ +#define TFD_QUEUE_CB_SIZE (x) (ilog2(x) - 3)#define TFD_QUEUE_SIZE_BC_DUP (64)#define TFD_QUEUE_BC_SIZE (TFD_QUEUE_SIZE_MAX + TFD_QUEUE_SIZE_BC_DUP)#define IWL_TX_DMA_MASK DMA_BIT_MASK(36)
drivers/net/wireless/intel/iwlwifi/iwl-prph.h +1 -0
@@ -309,6 +309,7 @@* Note this address is cleared after MAC reset. */ #define UREG_UCODE_LOAD_STATUS (0xa05c40) +#define UREG_CPU_INIT_RUN (0xa05c44)#define LMPM_SECURE_UCODE_LOAD_CPU1_HDR_ADDR (0x1E78)#define LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR (0x1E7C)
drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c new file +274 -0
274 lines not on this page · raw message
drivers/net/wireless/intel/iwlwifi/pcie/internal.h +49 -1
89 lines not on this page · raw message
drivers/net/wireless/intel/iwlwifi/pcie/rx.c +38 -7
84 lines not on this page · raw message
drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c new file +226 -0
226 lines not on this page · raw message
drivers/net/wireless/intel/iwlwifi/pcie/trans.c +16 -44
120 lines not on this page · raw message
drivers/net/wireless/intel/iwlwifi/pcie/tx.c +55 -23
115 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH 21/25 iwlwifi: remove unnecessary dev_cmd_headroom parameter
In reply to Luca CoelhoFrom: Luca Coelho <[email protected]>
We don't need this parameter anymore, since we always pass 0 anyway. Remove it from the structure and from all the relevant functions.
--- drivers/net/wireless/intel/iwlwifi/iwl-trans.c | 7 ++----- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 17 +++++------------ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 +- 3 files changed, 8 insertions(+), 18 deletions(-)
drivers/net/wireless/intel/iwlwifi/iwl-trans.c +2 -5
@@ -70,8 +70,7 @@struct iwl_trans *iwl_trans_alloc (unsigned int priv_size,struct device *dev,const struct iwl_cfg *cfg, -const struct iwl_trans_ops *ops, -size_t dev_cmd_headroom) +const struct iwl_trans_ops *ops) {struct iwl_trans *trans;#ifdef CONFIG_LOCKDEP
@@ -90,15 +89,13 @@ struct iwl_trans *iwl_trans_alloc(unsigned int priv_size, trans->dev = dev; trans->cfg = cfg; trans->ops = ops; - trans->dev_cmd_headroom = dev_cmd_headroom; trans->num_rx_queues =1 ;snprintf (trans->dev_cmd_pool_name,sizeof (trans->dev_cmd_pool_name),"iwl_cmd_pool:%s" ,dev_name (trans->dev)); trans->dev_cmd_pool =kmem_cache_create (trans->dev_cmd_pool_name, -sizeof (struct iwl_device_cmd ) - + trans->dev_cmd_headroom, +sizeof (struct iwl_device_cmd ),sizeof (void *),SLAB_HWCACHE_ALIGN ,NULL );
drivers/net/wireless/intel/iwlwifi/iwl-trans.h +5 -12
@@ -772,9 +772,6 @@ enum iwl_plat_pm_mode {* the transport must set this before calling iwl_drv_start() * @dev_cmd_pool: pool for Tx cmd allocation - for internal use only. * The user should use iwl_trans_{alloc,free}_tx_cmd. -* @dev_cmd_headroom: room needed for the transport's private use before the -* device_cmd for Tx - for internal use only -* The user should use iwl_trans_{alloc,free}_tx_cmd. * @rx_mpdu_cmd: MPDU RX command ID, must be assigned by opmode before * starting the firmware, used for tracing * @rx_mpdu_cmd_hdr_size: used for tracing, amount of data before the
@@ -825,7 +822,6 @@ struct iwl_trans {/* The following fields are internal only */ struct kmem_cache *dev_cmd_pool; -size_t dev_cmd_headroom;char dev_cmd_pool_name[50 ];struct dentry *dbgfs_dir;
@@ -998,13 +994,13 @@ iwl_trans_dump_data(struct iwl_trans *trans,static inline struct iwl_device_cmd *iwl_trans_alloc_tx_cmd (struct iwl_trans *trans) { -u8 *dev_cmd_ptr =kmem_cache_alloc (trans->dev_cmd_pool,GFP_ATOMIC ); +struct iwl_device_cmd *dev_cmd_ptr = +kmem_cache_alloc (trans->dev_cmd_pool,GFP_ATOMIC );if (unlikely (dev_cmd_ptr ==NULL ))return NULL ; -return (struct iwl_device_cmd *) - (dev_cmd_ptr + trans->dev_cmd_headroom); +return dev_cmd_ptr; }int iwl_trans_send_cmd (struct iwl_trans *trans,struct iwl_host_cmd *cmd);
@@ -1012,9 +1008,7 @@ int iwl_trans_send_cmd(struct iwl_trans *trans, struct iwl_host_cmd *cmd);static inline void iwl_trans_free_tx_cmd (struct iwl_trans *trans,struct iwl_device_cmd *dev_cmd) { -u8 *dev_cmd_ptr = (u8 *)dev_cmd - trans->dev_cmd_headroom; - -kmem_cache_free (trans->dev_cmd_pool, dev_cmd_ptr); +kmem_cache_free (trans->dev_cmd_pool, dev_cmd); } static inline int iwl_trans_tx(struct iwl_trans *trans, struct sk_buff *skb,
@@ -1237,8 +1231,7 @@ static inline void iwl_trans_fw_error(struct iwl_trans *trans)struct iwl_trans *iwl_trans_alloc (unsigned int priv_size,struct device *dev,const struct iwl_cfg *cfg, -const struct iwl_trans_ops *ops, -size_t dev_cmd_headroom); +const struct iwl_trans_ops *ops);void iwl_trans_free (struct iwl_trans *trans);/*****************************************************
drivers/net/wireless/intel/iwlwifi/pcie/trans.c +1 -1
@@ -2948,7 +2948,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,return ERR_PTR (ret); trans =iwl_trans_alloc (sizeof (struct iwl_trans_pcie ), - &pdev->dev, cfg, &trans_ops_pcie,0 ); + &pdev->dev, cfg, &trans_ops_pcie);if (!trans)return ERR_PTR (-ENOMEM );
Signature · 1 line
2.11.0
PATCH 24/25 iwlwifi: mvm: remove call for paging in new init flow
In reply to Luca CoelhoFrom: Sara Sharon <[email protected]>
Now that transport inits the paging in the context info - remove the call in mvm.
--- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 8 -------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 ++- 2 files changed, 2 insertions(+), 9 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/fw.c +0 -8
@@ -850,14 +850,6 @@ int iwl_run_unified_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm) goto error; } -/* TODO: remove when integrating context info */ - ret =iwl_mvm_init_paging (mvm); -if (ret) { -IWL_ERR (mvm,"Failed to init paging: %d\n" , - ret); - goto error; - } -/* Read the NVM only at driver load time, no need to do this twice */ if (read_nvm) {/* Read nvm */
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +2 -1
@@ -1709,7 +1709,8 @@ void iwl_mvm_enable_ac_txq(struct iwl_mvm *mvm, int queue, int mac80211_queue,static inline void iwl_mvm_stop_device (struct iwl_mvm *mvm) { -iwl_free_fw_paging (mvm); +if (!iwl_mvm_has_new_tx_api (mvm)) +iwl_free_fw_paging (mvm); mvm->ucode_loaded = false;iwl_trans_stop_device (mvm->trans); }
Signature · 1 line
2.11.0
PATCH 13/25 iwlwifi: mvm: support new ADD_MODIFY_STA_KEY command
In reply to Luca CoelhoFrom: Sara Sharon <[email protected]>
The command was changed to support PN offload and TKIP offload. The FW will do TKIP calculations in D0 only for a000 devices, but API is aligned anyway.
However, for all devices we can stop sending the wowlan tkip command.
Firmware will fetch the keys from the station key command.
--- drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 3 + drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 4 +- .../net/wireless/intel/iwlwifi/mvm/fw-api-sta.h | 34 ++++++-- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 96 +++++++++++++++------- 4 files changed, 102 insertions(+), 35 deletions(-)
drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h +3 -0
@@ -241,6 +241,8 @@ typedef unsigned int __bitwise iwl_ucode_tlv_api_t;* iteration complete notification, and the timestamp reported for RX * received during scan, are reported in TSF of the mac specified in the * scan request. +* @IWL_UCODE_TLV_API_TKIP_MIC_KEYS: This ucode supports version 2 of +* ADD_MODIFY_STA_KEY_API_S_VER_2. * * @NUM_IWL_UCODE_TLV_API: number of bits used */
@@ -250,6 +252,7 @@ enum iwl_ucode_tlv_api {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_SCAN_TSF_REPORT = (__force iwl_ucode_tlv_api_t )28 , +IWL_UCODE_TLV_API_TKIP_MIC_KEYS = (__force iwl_ucode_tlv_api_t )29 , NUM_IWL_UCODE_TLV_API#ifdef __CHECKER__
drivers/net/wireless/intel/iwlwifi/mvm/d3.c +3 -1
@@ -998,7 +998,9 @@ int iwl_mvm_wowlan_config_key_params(struct iwl_mvm *mvm, goto out; } -if (key_data.use_tkip) { +if (key_data.use_tkip && + !fw_has_api (&mvm->fw->ucode_capa, +IWL_UCODE_TLV_API_TKIP_MIC_KEYS )) { ret = iwl_mvm_send_cmd_pdu(mvm, WOWLAN_TKIP_PARAM, cmd_flags, sizeof(tkip_cmd),
drivers/net/wireless/intel/iwlwifi/mvm/fw-api-sta.h +28 -6
@@ -7,7 +7,7 @@* * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH -* Copyright(c) 2016 Intel Deutschland GmbH +* Copyright(c) 2016 - 2017 Intel Deutschland GmbH * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as
@@ -34,7 +34,7 @@* * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH -* Copyright(c) 2016 Intel Deutschland GmbH +* Copyright(c) 2016 - 2017 Intel Deutschland GmbH * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -389,28 +389,50 @@ struct iwl_mvm_add_sta_cmd { } __packed;/* ADD_STA_CMD_API_S_VER_8 */ /** -* struct iwl_mvm_add_sta_key_cmd - add/modify sta key +* struct iwl_mvm_add_sta_key_common - add/modify sta key common part * ( REPLY_ADD_STA_KEY = 0x17 ) * @sta_id: index of station in uCode's station table * @key_offset: key offset in key storage * @key_flags: type %iwl_sta_key_flag * @key: key material data * @rx_secur_seq_cnt: RX security sequence counter for the key -* @tkip_rx_tsc_byte2: TSC[2] for key mix ph1 detection -* @tkip_rx_ttak: 10-byte unicast TKIP TTAK for Rx */ -struct iwl_mvm_add_sta_key_cmd { +struct iwl_mvm_add_sta_key_common {u8 sta_id;u8 key_offset;__le16 key_flags;u8 key[32 ];u8 rx_secur_seq_cnt[16 ]; +} __packed; + +/** +* struct iwl_mvm_add_sta_key_cmd_v1 - add/modify sta key +* @common: see &struct iwl_mvm_add_sta_key_common +* @tkip_rx_tsc_byte2: TSC[2] for key mix ph1 detection +* @tkip_rx_ttak: 10-byte unicast TKIP TTAK for Rx +*/ +struct iwl_mvm_add_sta_key_cmd_v1 { +struct iwl_mvm_add_sta_key_common common;u8 tkip_rx_tsc_byte2;u8 reserved;__le16 tkip_rx_ttak[5 ]; } __packed;/* ADD_MODIFY_STA_KEY_API_S_VER_1 */ /** +* struct iwl_mvm_add_sta_key_cmd - add/modify sta key +* @common: see &struct iwl_mvm_add_sta_key_common +* @rx_mic_key: TKIP RX unicast or multicast key +* @tx_mic_key: TKIP TX key +* @transmit_seq_cnt: TSC, transmit packet number +*/ +struct iwl_mvm_add_sta_key_cmd { +struct iwl_mvm_add_sta_key_common common; +__le64 rx_mic_key; +__le64 tx_mic_key; +__le64 transmit_seq_cnt; +} __packed;/* ADD_MODIFY_STA_KEY_API_S_VER_2 */ + +/** * enum iwl_mvm_add_sta_rsp_status - status in the response to ADD_STA command * @ADD_STA_SUCCESS: operation was executed successfully * @ADD_STA_STATIONS_OVERLOAD: no room left in the fw's station table
drivers/net/wireless/intel/iwlwifi/mvm/sta.c +68 -28
158 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH 16/25 Revert "iwlwifi: introduce trans API to get byte count table"
In reply to Luca CoelhoFrom: Sara Sharon <[email protected]>
This reverts commit 8aacf4b73fe8 ("iwlwifi: introduce trans API to get byte count table").
The commit is not needed as a better approach will be taken.
--- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 11 ----------- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 1 - drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 -- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 8 -------- 4 files changed, 22 deletions(-)
drivers/net/wireless/intel/iwlwifi/iwl-trans.h +0 -11
@@ -644,8 +644,6 @@ struct iwl_trans_ops {void (*txq_set_shared_mode)(struct iwl_trans *trans,u32 txq_id,bool shared); -dma_addr_t (*get_txq_byte_table)(struct iwl_trans *trans,int txq_id); -int (*wait_tx_queue_empty)(struct iwl_trans *trans,u32 txq_bm);void (*freeze_txq_timer)(struct iwl_trans *trans,unsigned long txqs,bool freeze);
@@ -1072,15 +1070,6 @@ static inline void iwl_trans_txq_set_shared_mode(struct iwl_trans *trans, trans->ops->txq_set_shared_mode (trans, queue, shared_mode); } -static inline dma_addr_t iwl_trans_get_txq_byte_table (struct iwl_trans *trans, -int queue) -{ -/* we should never be called if the trans doesn't support it */ -BUG_ON (!trans->ops->get_txq_byte_table); - -return trans->ops->get_txq_byte_table (trans, queue); -} - static inline void iwl_trans_txq_enable(struct iwl_trans *trans, int queue, int fifo, int sta_id, int tid, int frame_limit, u16 ssn,
drivers/net/wireless/intel/iwlwifi/pcie/internal.h +0 -1
@@ -484,7 +484,6 @@ void iwl_trans_pcie_txq_disable(struct iwl_trans *trans, int queue, bool configure_scd);void iwl_trans_pcie_txq_set_shared_mode (struct iwl_trans *trans,u32 txq_id,bool shared_mode); -dma_addr_t iwl_trans_pcie_get_txq_byte_table (struct iwl_trans *trans,int txq);void iwl_trans_pcie_log_scd_error (struct iwl_trans *trans,struct iwl_txq *txq); int iwl_trans_pcie_tx(struct iwl_trans *trans, struct sk_buff *skb,
drivers/net/wireless/intel/iwlwifi/pcie/trans.c +0 -2
@@ -2897,8 +2897,6 @@ static const struct iwl_trans_ops trans_ops_pcie = { .txq_disable = iwl_trans_pcie_txq_disable, .txq_enable = iwl_trans_pcie_txq_enable, - .get_txq_byte_table = iwl_trans_pcie_get_txq_byte_table, - .txq_set_shared_mode = iwl_trans_pcie_txq_set_shared_mode, .wait_tx_queue_empty = iwl_trans_pcie_wait_txq_empty,
drivers/net/wireless/intel/iwlwifi/pcie/tx.c +0 -8
@@ -1424,14 +1424,6 @@ void iwl_trans_pcie_txq_set_shared_mode(struct iwl_trans *trans, u32 txq_id, txq->ampdu = !shared_mode; } -dma_addr_t iwl_trans_pcie_get_txq_byte_table (struct iwl_trans *trans,int txq) -{ -struct iwl_trans_pcie *trans_pcie =IWL_TRANS_GET_PCIE_TRANS (trans); - -return trans_pcie->scd_bc_tbls.dma + - txq *sizeof (struct iwlagn_scd_bc_tbl ); -} -void iwl_trans_pcie_txq_disable (struct iwl_trans *trans,int txq_id,bool configure_scd) {
Signature · 1 line
2.11.0
PATCH 12/25 iwlwifi: mvm: add multicast station
In reply to Luca CoelhoFrom: Sara Sharon <[email protected]>
Currently multicast queue is associated with the broadcast station.
This raises quite a few issues:
The multicast queue has a special treatment:
- It is sent in the MAC context command
- It is excluded from tfd_queue_mask
In DQA mode we end up enabling two queues - the probe response queue and the multicast queue - with the same station (broadcast) and TID while in DQA mode it should be unique RA-TID. Firmware will enforce it for a000 devices, so this allocation will fail.
In addition, in a000 devices the FW will set the FIFO and not the driver. So there is a need for FW to know when we enable the queue that it is multicast queue so it will be bound to the multicast FIFO. There is no such way in current design.
In order to simplify driver and firmware handling of this queue create a multicast station.
This solves the unique RA-TID issue in the short term and serves as preparation for the long term.
In the long term we will also add a flag marking this station for the FW as the multicast station.
Once we will do that the FW will know this is the multicast queue immediately when it is added and bind it to the correct FIFO. It will also enable removing the special treatment of the queue in the MAC context command.
--- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 26 ++++- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 112 +++++++++++++++------- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 3 + 5 files changed, 106 insertions(+), 37 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c +1 -0
@@ -472,6 +472,7 @@ static int iwl_mvm_mac_ctxt_allocate_resources(struct iwl_mvm *mvm, } mvmvif->bcast_sta.sta_id =IWL_MVM_STATION_COUNT ; + mvmvif->mcast_sta.sta_id =IWL_MVM_STATION_COUNT ; mvmvif->ap_sta_id =IWL_MVM_STATION_COUNT ;for (i =0 ; i <NUM_IWL_MVM_SMPS_REQ ; i++)
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +23 -3
@@ -6,8 +6,8 @@* GPL LICENSE SUMMARY * * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. -* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH -* Copyright(c) 2016 Intel Deutschland GmbH +* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH +* Copyright(c) 2016 - 2017 Intel Deutschland GmbH * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as
@@ -33,7 +33,8 @@* BSD LICENSE * * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. -* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH +* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH +* Copyright(c) 2016 - 2017 Intel Deutschland GmbH * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -1351,6 +1352,17 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw, goto out_release; } +if (iwl_mvm_is_dqa_supported (mvm)) { +/* +* Only queue for this station is the mcast queue, +* which shouldn't be in TFD mask anyway +*/ + ret =iwl_mvm_allocate_int_sta (mvm, &mvmvif->mcast_sta, +0 , vif->type); +if (ret) + goto out_release; + } +iwl_mvm_vif_dbgfs_register (mvm, vif); goto out_unlock; }
@@ -1516,6 +1528,7 @@ static void iwl_mvm_mac_remove_interface(struct ieee80211_hw *hw, mvm->noa_duration = 0; }#endif +iwl_mvm_dealloc_int_sta (mvm, &mvmvif->mcast_sta);iwl_mvm_dealloc_bcast_sta (mvm, vif); goto out_release; }
@@ -2104,6 +2117,10 @@ static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw,if (ret) goto out_unbind; + ret =iwl_mvm_add_mcast_sta (mvm, vif); +if (ret) + goto out_rm_bcast; +/* must be set before quota calculations */ mvmvif->ap_ibss_active = true;
@@ -2131,6 +2148,8 @@ static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw, out_quota_failed:iwl_mvm_power_update_mac (mvm); mvmvif->ap_ibss_active = false; +iwl_mvm_rm_mcast_sta (mvm, vif); +out_rm_bcast:iwl_mvm_send_rm_bcast_sta (mvm, vif); out_unbind:iwl_mvm_binding_remove_vif (mvm, vif);
@@ -2177,6 +2196,7 @@ static void iwl_mvm_stop_ap_ibss(struct ieee80211_hw *hw,iwl_mvm_mac_ctxt_changed (mvm, mvm->p2p_device_vif, false,NULL );iwl_mvm_update_quotas (mvm, false,NULL ); +iwl_mvm_rm_mcast_sta (mvm, vif);iwl_mvm_send_rm_bcast_sta (mvm, vif);iwl_mvm_binding_remove_vif (mvm, vif);
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +1 -0
@@ -407,6 +407,7 @@ struct iwl_mvm_vif {struct iwl_mvm_time_event_data hs_time_event_data;struct iwl_mvm_int_sta bcast_sta; +struct iwl_mvm_int_sta mcast_sta;/* * Assigned while mac80211 has the interface in a channel context,
drivers/net/wireless/intel/iwlwifi/mvm/sta.c +78 -34
149 lines not on this page · raw message
drivers/net/wireless/intel/iwlwifi/mvm/sta.h +3 -0
@@ -532,10 +532,13 @@ int iwl_mvm_send_add_bcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif);int iwl_mvm_add_bcast_sta (struct iwl_mvm *mvm,struct ieee80211_vif *vif);int iwl_mvm_send_rm_bcast_sta (struct iwl_mvm *mvm,struct ieee80211_vif *vif);int iwl_mvm_rm_bcast_sta (struct iwl_mvm *mvm,struct ieee80211_vif *vif); +int iwl_mvm_add_mcast_sta (struct iwl_mvm *mvm,struct ieee80211_vif *vif); +int iwl_mvm_rm_mcast_sta (struct iwl_mvm *mvm,struct ieee80211_vif *vif);int iwl_mvm_allocate_int_sta (struct iwl_mvm *mvm,struct iwl_mvm_int_sta *sta,u32 qmask,enum nl80211_iftype iftype);void iwl_mvm_dealloc_bcast_sta (struct iwl_mvm *mvm,struct ieee80211_vif *vif); +void iwl_mvm_dealloc_int_sta (struct iwl_mvm *mvm,struct iwl_mvm_int_sta *sta);int iwl_mvm_add_snif_sta (struct iwl_mvm *mvm,struct ieee80211_vif *vif);int iwl_mvm_rm_snif_sta (struct iwl_mvm *mvm,struct ieee80211_vif *vif);void iwl_mvm_dealloc_snif_sta (struct iwl_mvm *mvm);
Signature · 1 line
2.11.0
PATCH 22/25 iwlwifi: pcie: introduce split point to a000 devices
In reply to Luca CoelhoFrom: Sara Sharon <[email protected]>
a000 devices are going to have a lot of flows simplified and changed: init flow, RX, TX, and more.
This, combined with the fact that code is already very complicated due to backward compatibility - introduce a split that will enable to introduce simplified version of functions.
Shared ops are moved to a macro, while functions that will be updated in the next patches are defined twice for now.
--- drivers/net/wireless/intel/iwlwifi/iwl-a000.c | 3 +- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 4 +- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 85 +++++++++++++++++-------- 3 files changed, 62 insertions(+), 30 deletions(-)
drivers/net/wireless/intel/iwlwifi/iwl-a000.c +2 -1
@@ -121,7 +121,8 @@ static const struct iwl_ht_params iwl_a000_ht_params = { .vht_mu_mimo_supported = true, \ .mac_addr_from_csr = true, \ .use_tfh = true, \ - .rf_id = true + .rf_id = true, \ + .gen2 = true const struct iwl_cfg iwla000_2ac_cfg_hr = { .name ="Intel(R) Dual Band Wireless AC a000" ,
drivers/net/wireless/intel/iwlwifi/iwl-config.h +3 -1
@@ -323,6 +323,7 @@ struct iwl_pwr_tx_backoff {* @vht_mu_mimo_supported: VHT MU-MIMO support * @rf_id: need to read rf_id to determine the firmware image * @integrated: discrete or integrated +* @gen2: a000 and on transport operation * * We enable the driver to be backward compatible wrt. hardware features. * API differences in uCode shouldn't be handled here but through TLVs
@@ -368,7 +369,8 @@ struct iwl_cfg { vht_mu_mimo_supported:1, rf_id:1, integrated:1, - use_tfh:1; + use_tfh:1, + gen2:1;u8 valid_tx_ant;u8 valid_rx_ant;u8 non_shared_ant;
drivers/net/wireless/intel/iwlwifi/pcie/trans.c +57 -28
112 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH 10/25 iwlwifi: use upper_32_bits/lower_32_bits where appropriate
In reply to Luca CoelhoFrom: Johannes Berg <[email protected]>
That's a bit nicer than open-coding it.
--- drivers/net/wireless/intel/iwlwifi/iwl-fh.h | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-io.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/intel/iwlwifi/iwl-fh.h +1 -1
@@ -647,7 +647,7 @@ struct iwl_rb_status {static inline u8 iwl_get_dma_hi_addr (dma_addr_t addr) { -return (sizeof (addr) >sizeof (u32) ? (addr >>16 ) >>16 :0 ) &0xF ; +return (sizeof (addr) >sizeof (u32) ?upper_32_bits (addr) :0 ) &0xF ; }/** * struct iwl_tfd_tb transmit buffer descriptor within transmit frame descriptor
drivers/net/wireless/intel/iwlwifi/iwl-io.c +2 -2
@@ -54,8 +54,8 @@ IWL_EXPORT_SYMBOL(iwl_write32);void iwl_write64 (struct iwl_trans *trans,u64 ofs,u64 val) {trace_iwlwifi_dev_iowrite64 (trans->dev, ofs, val); -iwl_trans_write32 (trans, ofs, val &0xffffffff ); -iwl_trans_write32 (trans, ofs +4 , val >>32 ); +iwl_trans_write32 (trans, ofs,lower_32_bits (val)); +iwl_trans_write32 (trans, ofs +4 ,upper_32_bits (val)); }IWL_EXPORT_SYMBOL (iwl_write64);
Signature · 1 line
2.11.0