mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 14:40:12 -04:00
Merge tag 'iwlwifi-next-for-kalle-2018-08-31' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
iwlwifi patches for 4.20 * One fix for channel-switch handling; * Some improvements in the HE code; * New FW API handling; * Improvements in the debugging code; * Some improvements in the PCI recovery mechanism; * Support for a few FW API changes; * Enable a new scanning feature; * Continued work on HE (mostly radiotap); * Some fixes in the FW rate-scaling implementation; * Other clean-ups and small fixes and improvements;
This commit is contained in:
@@ -12,10 +12,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -77,10 +77,13 @@
|
||||
#define IWL_22000_HR_FW_PRE "iwlwifi-Qu-a0-hr-a0-"
|
||||
#define IWL_22000_HR_CDB_FW_PRE "iwlwifi-QuIcp-z0-hrcdb-a0-"
|
||||
#define IWL_22000_HR_A_F0_FW_PRE "iwlwifi-QuQnj-f0-hr-a0-"
|
||||
#define IWL_22000_HR_B_FW_PRE "iwlwifi-Qu-b0-hr-b0-"
|
||||
#define IWL_22000_HR_B_F0_FW_PRE "iwlwifi-Qu-b0-hr-b0-"
|
||||
#define IWL_22000_QU_B_HR_B_FW_PRE "iwlwifi-Qu-b0-hr-b0-"
|
||||
#define IWL_22000_HR_B_FW_PRE "iwlwifi-QuQnj-b0-hr-b0-"
|
||||
#define IWL_22000_JF_B0_FW_PRE "iwlwifi-QuQnj-a0-jf-b0-"
|
||||
#define IWL_22000_HR_A0_FW_PRE "iwlwifi-QuQnj-a0-hr-a0-"
|
||||
#define IWL_22000_SU_Z0_FW_PRE "iwlwifi-su-z0-"
|
||||
#define IWL_QU_B_JF_B_FW_PRE "iwlwifi-Qu-b0-jf-b0-"
|
||||
|
||||
#define IWL_22000_HR_MODULE_FIRMWARE(api) \
|
||||
IWL_22000_HR_FW_PRE __stringify(api) ".ucode"
|
||||
@@ -88,7 +91,11 @@
|
||||
IWL_22000_JF_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_22000_HR_A_F0_QNJ_MODULE_FIRMWARE(api) \
|
||||
IWL_22000_HR_A_F0_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_22000_HR_B_QNJ_MODULE_FIRMWARE(api) \
|
||||
#define IWL_22000_HR_B_F0_QNJ_MODULE_FIRMWARE(api) \
|
||||
IWL_22000_HR_B_F0_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_22000_QU_B_HR_B_MODULE_FIRMWARE(api) \
|
||||
IWL_22000_QU_B_HR_B_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_22000_HR_B_QNJ_MODULE_FIRMWARE(api) \
|
||||
IWL_22000_HR_B_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_22000_JF_B0_QNJ_MODULE_FIRMWARE(api) \
|
||||
IWL_22000_JF_B0_FW_PRE __stringify(api) ".ucode"
|
||||
@@ -96,6 +103,8 @@
|
||||
IWL_22000_HR_A0_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_22000_SU_Z0_MODULE_FIRMWARE(api) \
|
||||
IWL_22000_SU_Z0_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_QU_B_JF_B_MODULE_FIRMWARE(api) \
|
||||
IWL_QU_B_JF_B_FW_PRE __stringify(api) ".ucode"
|
||||
|
||||
#define NVM_HW_SECTION_NUM_FAMILY_22000 10
|
||||
|
||||
@@ -155,7 +164,9 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
|
||||
.gen2 = true, \
|
||||
.nvm_type = IWL_NVM_EXT, \
|
||||
.dbgc_supported = true, \
|
||||
.min_umac_error_event_table = 0x400000
|
||||
.min_umac_error_event_table = 0x400000, \
|
||||
.d3_debug_data_base_addr = 0x401000, \
|
||||
.d3_debug_data_length = 60 * 1024
|
||||
|
||||
#define IWL_DEVICE_22500 \
|
||||
IWL_DEVICE_22000_COMMON, \
|
||||
@@ -190,7 +201,54 @@ const struct iwl_cfg iwl22000_2ac_cfg_jf = {
|
||||
|
||||
const struct iwl_cfg iwl22000_2ax_cfg_hr = {
|
||||
.name = "Intel(R) Dual Band Wireless AX 22000",
|
||||
.fw_name_pre = IWL_22000_HR_FW_PRE,
|
||||
.fw_name_pre = IWL_22000_QU_B_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
};
|
||||
|
||||
/*
|
||||
* All JF radio modules are part of the 9000 series, but the MAC part
|
||||
* looks more like 22000. That's why this device is here, but called
|
||||
* 9560 nevertheless.
|
||||
*/
|
||||
const struct iwl_cfg iwl9461_2ac_cfg_qu_b0_jf_b0 = {
|
||||
.name = "Intel(R) Wireless-AC 9461",
|
||||
.fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl9462_2ac_cfg_qu_b0_jf_b0 = {
|
||||
.name = "Intel(R) Wireless-AC 9462",
|
||||
.fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl9560_2ac_cfg_qu_b0_jf_b0 = {
|
||||
.name = "Intel(R) Wireless-AC 9560",
|
||||
.fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
};
|
||||
|
||||
const struct iwl_cfg killer1550i_2ac_cfg_qu_b0_jf_b0 = {
|
||||
.name = "Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW)",
|
||||
.fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
};
|
||||
|
||||
const struct iwl_cfg killer1550s_2ac_cfg_qu_b0_jf_b0 = {
|
||||
.name = "Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW)",
|
||||
.fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl22000_2ax_cfg_jf = {
|
||||
.name = "Intel(R) Dual Band Wireless AX 22000",
|
||||
.fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
@@ -264,7 +322,10 @@ const struct iwl_cfg iwl22560_2ax_cfg_su_cdb = {
|
||||
MODULE_FIRMWARE(IWL_22000_HR_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_22000_JF_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_22000_HR_A_F0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_22000_HR_B_F0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_22000_QU_B_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_22000_HR_B_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_22000_JF_B0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_22000_HR_A0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_22000_SU_Z0_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_QU_B_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -19,11 +19,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -19,11 +19,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -155,7 +155,9 @@ static const struct iwl_tt_params iwl9000_tt_params = {
|
||||
.nvm_type = IWL_NVM_EXT, \
|
||||
.dbgc_supported = true, \
|
||||
.min_umac_error_event_table = 0x800000, \
|
||||
.csr = &iwl_csr_v1
|
||||
.csr = &iwl_csr_v1, \
|
||||
.d3_debug_data_base_addr = 0x401000, \
|
||||
.d3_debug_data_length = 92 * 1024
|
||||
|
||||
const struct iwl_cfg iwl9160_2ac_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless AC 9160",
|
||||
|
||||
@@ -16,11 +16,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -16,11 +16,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -16,11 +16,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -16,11 +16,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -13,11 +13,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -13,11 +13,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -15,10 +15,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -15,10 +15,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -13,11 +13,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -13,11 +13,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -14,11 +14,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program;
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program;
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
* Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
|
||||
* Copyright(c) 2017 Intel Deutschland GmbH
|
||||
* Copyright(c) 2018 Intel Corporation
|
||||
*
|
||||
* 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
|
||||
@@ -30,6 +31,7 @@
|
||||
* Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
|
||||
* Copyright(c) 2017 Intel Deutschland GmbH
|
||||
* Copyright(c) 2018 Intel Corporation
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -203,6 +205,7 @@ enum iwl_bt_activity_grading {
|
||||
BT_ON_NO_CONNECTION = 1,
|
||||
BT_LOW_TRAFFIC = 2,
|
||||
BT_HIGH_TRAFFIC = 3,
|
||||
BT_VERY_HIGH_TRAFFIC = 4,
|
||||
|
||||
BT_MAX_AG,
|
||||
}; /* BT_COEX_BT_ACTIVITY_GRADING_API_E_VER_1 */
|
||||
|
||||
@@ -436,7 +436,8 @@ enum iwl_legacy_cmds {
|
||||
|
||||
/**
|
||||
* @REDUCE_TX_POWER_CMD:
|
||||
* &struct iwl_dev_tx_power_cmd_v3 or &struct iwl_dev_tx_power_cmd
|
||||
* &struct iwl_dev_tx_power_cmd_v3 or &struct iwl_dev_tx_power_cmd_v4
|
||||
* or &struct iwl_dev_tx_power_cmd
|
||||
*/
|
||||
REDUCE_TX_POWER_CMD = 0x9f,
|
||||
|
||||
|
||||
@@ -8,6 +8,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
|
||||
* Copyright(c) 2018 Intel Corporation
|
||||
*
|
||||
* 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
|
||||
@@ -30,6 +31,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
|
||||
* Copyright(c) 2018 Intel Corporation
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -374,7 +376,7 @@ enum iwl_wowlan_wakeup_reason {
|
||||
|
||||
}; /* WOWLAN_WAKE_UP_REASON_API_E_VER_2 */
|
||||
|
||||
struct iwl_wowlan_gtk_status {
|
||||
struct iwl_wowlan_gtk_status_v1 {
|
||||
u8 key_index;
|
||||
u8 reserved[3];
|
||||
u8 decrypt_key[16];
|
||||
@@ -382,8 +384,52 @@ struct iwl_wowlan_gtk_status {
|
||||
struct iwl_wowlan_rsc_tsc_params_cmd rsc;
|
||||
} __packed; /* WOWLAN_GTK_MATERIAL_VER_1 */
|
||||
|
||||
#define WOWLAN_KEY_MAX_SIZE 32
|
||||
#define WOWLAN_GTK_KEYS_NUM 2
|
||||
#define WOWLAN_IGTK_KEYS_NUM 2
|
||||
|
||||
/**
|
||||
* struct iwl_wowlan_status - WoWLAN status
|
||||
* struct iwl_wowlan_gtk_status - GTK status
|
||||
* @key: GTK material
|
||||
* @key_len: GTK legth, if set to 0, the key is not available
|
||||
* @key_flags: information about the key:
|
||||
* bits[0:1]: key index assigned by the AP
|
||||
* bits[2:6]: GTK index of the key in the internal DB
|
||||
* bit[7]: Set iff this is the currently used GTK
|
||||
* @reserved: padding
|
||||
* @tkip_mic_key: TKIP RX MIC key
|
||||
* @rsc: TSC RSC counters
|
||||
*/
|
||||
struct iwl_wowlan_gtk_status {
|
||||
u8 key[WOWLAN_KEY_MAX_SIZE];
|
||||
u8 key_len;
|
||||
u8 key_flags;
|
||||
u8 reserved[2];
|
||||
u8 tkip_mic_key[8];
|
||||
struct iwl_wowlan_rsc_tsc_params_cmd rsc;
|
||||
} __packed; /* WOWLAN_GTK_MATERIAL_VER_2 */
|
||||
|
||||
#define IWL_WOWLAN_GTK_IDX_MASK (BIT(0) | BIT(1))
|
||||
|
||||
/**
|
||||
* struct iwl_wowlan_igtk_status - IGTK status
|
||||
* @key: IGTK material
|
||||
* @ipn: the IGTK packet number (replay counter)
|
||||
* @key_len: IGTK length, if set to 0, the key is not available
|
||||
* @key_flags: information about the key:
|
||||
* bits[0]: key index assigned by the AP (0: index 4, 1: index 5)
|
||||
* bits[1:5]: IGTK index of the key in the internal DB
|
||||
* bit[6]: Set iff this is the currently used IGTK
|
||||
*/
|
||||
struct iwl_wowlan_igtk_status {
|
||||
u8 key[WOWLAN_KEY_MAX_SIZE];
|
||||
u8 ipn[6];
|
||||
u8 key_len;
|
||||
u8 key_flags;
|
||||
} __packed; /* WOWLAN_IGTK_MATERIAL_VER_1 */
|
||||
|
||||
/**
|
||||
* struct iwl_wowlan_status_v6 - WoWLAN status
|
||||
* @gtk: GTK data
|
||||
* @replay_ctr: GTK rekey replay counter
|
||||
* @pattern_number: number of the matched pattern
|
||||
@@ -397,8 +443,8 @@ struct iwl_wowlan_gtk_status {
|
||||
* @wake_packet_bufsize: wakeup packet buffer size
|
||||
* @wake_packet: wakeup packet
|
||||
*/
|
||||
struct iwl_wowlan_status {
|
||||
struct iwl_wowlan_gtk_status gtk;
|
||||
struct iwl_wowlan_status_v6 {
|
||||
struct iwl_wowlan_gtk_status_v1 gtk;
|
||||
__le64 replay_ctr;
|
||||
__le16 pattern_number;
|
||||
__le16 non_qos_seq_ctr;
|
||||
@@ -412,6 +458,43 @@ struct iwl_wowlan_status {
|
||||
u8 wake_packet[]; /* can be truncated from _length to _bufsize */
|
||||
} __packed; /* WOWLAN_STATUSES_API_S_VER_6 */
|
||||
|
||||
/**
|
||||
* struct iwl_wowlan_status - WoWLAN status
|
||||
* @gtk: GTK data
|
||||
* @igtk: IGTK data
|
||||
* @replay_ctr: GTK rekey replay counter
|
||||
* @pattern_number: number of the matched pattern
|
||||
* @non_qos_seq_ctr: non-QoS sequence counter to use next
|
||||
* @qos_seq_ctr: QoS sequence counters to use next
|
||||
* @wakeup_reasons: wakeup reasons, see &enum iwl_wowlan_wakeup_reason
|
||||
* @num_of_gtk_rekeys: number of GTK rekeys
|
||||
* @transmitted_ndps: number of transmitted neighbor discovery packets
|
||||
* @received_beacons: number of received beacons
|
||||
* @wake_packet_length: wakeup packet length
|
||||
* @wake_packet_bufsize: wakeup packet buffer size
|
||||
* @wake_packet: wakeup packet
|
||||
*/
|
||||
struct iwl_wowlan_status {
|
||||
struct iwl_wowlan_gtk_status gtk[WOWLAN_GTK_KEYS_NUM];
|
||||
struct iwl_wowlan_igtk_status igtk[WOWLAN_IGTK_KEYS_NUM];
|
||||
__le64 replay_ctr;
|
||||
__le16 pattern_number;
|
||||
__le16 non_qos_seq_ctr;
|
||||
__le16 qos_seq_ctr[8];
|
||||
__le32 wakeup_reasons;
|
||||
__le32 num_of_gtk_rekeys;
|
||||
__le32 transmitted_ndps;
|
||||
__le32 received_beacons;
|
||||
__le32 wake_packet_length;
|
||||
__le32 wake_packet_bufsize;
|
||||
u8 wake_packet[]; /* can be truncated from _length to _bufsize */
|
||||
} __packed; /* WOWLAN_STATUSES_API_S_VER_7 */
|
||||
|
||||
static inline u8 iwlmvm_wowlan_gtk_idx(struct iwl_wowlan_gtk_status *gtk)
|
||||
{
|
||||
return gtk->key_flags & IWL_WOWLAN_GTK_IDX_MASK;
|
||||
}
|
||||
|
||||
#define IWL_WOWLAN_TCP_MAX_PACKET_LEN 64
|
||||
#define IWL_WOWLAN_REMOTE_WAKE_MAX_PACKET_LEN 128
|
||||
#define IWL_WOWLAN_REMOTE_WAKE_MAX_TOKENS 2048
|
||||
|
||||
@@ -8,6 +8,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
|
||||
* Copyright(c) 2018 Intel Corporation
|
||||
*
|
||||
* 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
|
||||
@@ -30,6 +31,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
|
||||
* Copyright(c) 2018 Intel Corporation
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -71,12 +73,59 @@ enum iwl_mac_conf_subcmd_ids {
|
||||
* @LOW_LATENCY_CMD: &struct iwl_mac_low_latency_cmd
|
||||
*/
|
||||
LOW_LATENCY_CMD = 0x3,
|
||||
/**
|
||||
* @PROBE_RESPONSE_DATA_NOTIF: &struct iwl_probe_resp_data_notif
|
||||
*/
|
||||
PROBE_RESPONSE_DATA_NOTIF = 0xFC,
|
||||
|
||||
/**
|
||||
* @CHANNEL_SWITCH_NOA_NOTIF: &struct iwl_channel_switch_noa_notif
|
||||
*/
|
||||
CHANNEL_SWITCH_NOA_NOTIF = 0xFF,
|
||||
};
|
||||
|
||||
#define IWL_P2P_NOA_DESC_COUNT (2)
|
||||
|
||||
/**
|
||||
* struct iwl_p2p_noa_attr - NOA attr contained in probe resp FW notification
|
||||
*
|
||||
* @id: attribute id
|
||||
* @len_low: length low half
|
||||
* @len_high: length high half
|
||||
* @idx: instance of NoA timing
|
||||
* @ctwin: GO's ct window and pwer save capability
|
||||
* @desc: NoA descriptor
|
||||
* @reserved: reserved for alignment purposes
|
||||
*/
|
||||
struct iwl_p2p_noa_attr {
|
||||
u8 id;
|
||||
u8 len_low;
|
||||
u8 len_high;
|
||||
u8 idx;
|
||||
u8 ctwin;
|
||||
struct ieee80211_p2p_noa_desc desc[IWL_P2P_NOA_DESC_COUNT];
|
||||
u8 reserved;
|
||||
} __packed;
|
||||
|
||||
#define IWL_PROBE_RESP_DATA_NO_CSA (0xff)
|
||||
|
||||
/**
|
||||
* struct iwl_probe_resp_data_notif - notification with NOA and CSA counter
|
||||
*
|
||||
* @mac_id: the mac which should send the probe response
|
||||
* @noa_active: notifies if the noa attribute should be handled
|
||||
* @noa_attr: P2P NOA attribute
|
||||
* @csa_counter: current csa counter
|
||||
* @reserved: reserved for alignment purposes
|
||||
*/
|
||||
struct iwl_probe_resp_data_notif {
|
||||
__le32 mac_id;
|
||||
__le32 noa_active;
|
||||
struct iwl_p2p_noa_attr noa_attr;
|
||||
u8 csa_counter;
|
||||
u8 reserved[3];
|
||||
} __packed; /* PROBE_RESPONSE_DATA_NTFY_API_S_VER_1 */
|
||||
|
||||
/**
|
||||
* struct iwl_channel_switch_noa_notif - Channel switch NOA notification
|
||||
*
|
||||
|
||||
@@ -8,6 +8,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
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
*
|
||||
* 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
|
||||
@@ -30,6 +31,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
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -316,7 +318,9 @@ enum iwl_dev_tx_power_cmd_mode {
|
||||
IWL_TX_POWER_MODE_SET_DEVICE = 1,
|
||||
IWL_TX_POWER_MODE_SET_CHAINS = 2,
|
||||
IWL_TX_POWER_MODE_SET_ACK = 3,
|
||||
}; /* TX_POWER_REDUCED_FLAGS_TYPE_API_E_VER_4 */;
|
||||
IWL_TX_POWER_MODE_SET_SAR_TIMER = 4,
|
||||
IWL_TX_POWER_MODE_SET_SAR_TIMER_DEFAULT_TABLE = 5,
|
||||
}; /* TX_POWER_REDUCED_FLAGS_TYPE_API_E_VER_5 */;
|
||||
|
||||
#define IWL_NUM_CHAIN_LIMITS 2
|
||||
#define IWL_NUM_SUB_BANDS 5
|
||||
@@ -350,13 +354,35 @@ struct iwl_dev_tx_power_cmd_v3 {
|
||||
* reduction.
|
||||
* @reserved: reserved (padding)
|
||||
*/
|
||||
struct iwl_dev_tx_power_cmd {
|
||||
struct iwl_dev_tx_power_cmd_v4 {
|
||||
/* v4 is just an extension of v3 - keep this here */
|
||||
struct iwl_dev_tx_power_cmd_v3 v3;
|
||||
u8 enable_ack_reduction;
|
||||
u8 reserved[3];
|
||||
} __packed; /* TX_REDUCED_POWER_API_S_VER_4 */
|
||||
|
||||
/**
|
||||
* struct iwl_dev_tx_power_cmd - TX power reduction command
|
||||
* @v3: version 3 of the command, embedded here for easier software handling
|
||||
* @enable_ack_reduction: enable or disable close range ack TX power
|
||||
* reduction.
|
||||
* @per_chain_restriction_changed: is per_chain_restriction has changed
|
||||
* from last command. used if set_mode is
|
||||
* IWL_TX_POWER_MODE_SET_SAR_TIMER.
|
||||
* note: if not changed, the command is used for keep alive only.
|
||||
* @reserved: reserved (padding)
|
||||
* @timer_period: timer in milliseconds. if expires FW will change to default
|
||||
* BIOS values. relevant if setMode is IWL_TX_POWER_MODE_SET_SAR_TIMER
|
||||
*/
|
||||
struct iwl_dev_tx_power_cmd {
|
||||
/* v5 is just an extension of v3 - keep this here */
|
||||
struct iwl_dev_tx_power_cmd_v3 v3;
|
||||
u8 enable_ack_reduction;
|
||||
u8 per_chain_restriction_changed;
|
||||
u8 reserved[2];
|
||||
__le32 timer_period;
|
||||
} __packed; /* TX_REDUCED_POWER_API_S_VER_5 */
|
||||
|
||||
#define IWL_NUM_GEO_PROFILES 3
|
||||
|
||||
/**
|
||||
|
||||
@@ -66,12 +66,24 @@
|
||||
|
||||
/**
|
||||
* enum iwl_tlc_mng_cfg_flags_enum - options for TLC config flags
|
||||
* @IWL_TLC_MNG_CFG_FLAGS_STBC_MSK: enable STBC
|
||||
* @IWL_TLC_MNG_CFG_FLAGS_STBC_MSK: enable STBC. For HE this enables STBC for
|
||||
* bandwidths <= 80MHz
|
||||
* @IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK: enable LDPC
|
||||
* @IWL_TLC_MNG_CFG_FLAGS_HE_STBC_160MHZ_MSK: enable STBC in HE at 160MHz
|
||||
* bandwidth
|
||||
* @IWL_TLC_MNG_CFG_FLAGS_HE_DCM_NSS_1_MSK: enable HE Dual Carrier Modulation
|
||||
* for BPSK (MCS 0) with 1 spatial
|
||||
* stream
|
||||
* @IWL_TLC_MNG_CFG_FLAGS_HE_DCM_NSS_2_MSK: enable HE Dual Carrier Modulation
|
||||
* for BPSK (MCS 0) with 2 spatial
|
||||
* streams
|
||||
*/
|
||||
enum iwl_tlc_mng_cfg_flags {
|
||||
IWL_TLC_MNG_CFG_FLAGS_STBC_MSK = BIT(0),
|
||||
IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK = BIT(1),
|
||||
IWL_TLC_MNG_CFG_FLAGS_STBC_MSK = BIT(0),
|
||||
IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK = BIT(1),
|
||||
IWL_TLC_MNG_CFG_FLAGS_HE_STBC_160MHZ_MSK = BIT(2),
|
||||
IWL_TLC_MNG_CFG_FLAGS_HE_DCM_NSS_1_MSK = BIT(3),
|
||||
IWL_TLC_MNG_CFG_FLAGS_HE_DCM_NSS_2_MSK = BIT(4),
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -217,66 +229,6 @@ struct iwl_tlc_update_notif {
|
||||
__le32 amsdu_enabled;
|
||||
} __packed; /* TLC_MNG_UPDATE_NTFY_API_S_VER_2 */
|
||||
|
||||
/**
|
||||
* enum iwl_tlc_debug_flags - debug options
|
||||
* @IWL_TLC_DEBUG_FIXED_RATE: set fixed rate for rate scaling
|
||||
* @IWL_TLC_DEBUG_STATS_TH: threshold for sending statistics to the driver, in
|
||||
* frames
|
||||
* @IWL_TLC_DEBUG_STATS_TIME_TH: threshold for sending statistics to the
|
||||
* driver, in msec
|
||||
* @IWL_TLC_DEBUG_AGG_TIME_LIM: time limit for a BA session
|
||||
* @IWL_TLC_DEBUG_AGG_DIS_START_TH: frame with try-count greater than this
|
||||
* threshold should not start an aggregation session
|
||||
* @IWL_TLC_DEBUG_AGG_FRAME_CNT_LIM: set max number of frames in an aggregation
|
||||
* @IWL_TLC_DEBUG_RENEW_ADDBA_DELAY: delay between retries of ADD BA
|
||||
* @IWL_TLC_DEBUG_START_AC_RATE_IDX: frames per second to start a BA session
|
||||
* @IWL_TLC_DEBUG_NO_FAR_RANGE_TWEAK: disable BW scaling
|
||||
*/
|
||||
enum iwl_tlc_debug_flags {
|
||||
IWL_TLC_DEBUG_FIXED_RATE,
|
||||
IWL_TLC_DEBUG_STATS_TH,
|
||||
IWL_TLC_DEBUG_STATS_TIME_TH,
|
||||
IWL_TLC_DEBUG_AGG_TIME_LIM,
|
||||
IWL_TLC_DEBUG_AGG_DIS_START_TH,
|
||||
IWL_TLC_DEBUG_AGG_FRAME_CNT_LIM,
|
||||
IWL_TLC_DEBUG_RENEW_ADDBA_DELAY,
|
||||
IWL_TLC_DEBUG_START_AC_RATE_IDX,
|
||||
IWL_TLC_DEBUG_NO_FAR_RANGE_TWEAK,
|
||||
}; /* TLC_MNG_DEBUG_FLAGS_API_E_VER_1 */
|
||||
|
||||
/**
|
||||
* struct iwl_dhc_tlc_dbg - fixed debug config
|
||||
* @sta_id: bit 0 - enable/disable, bits 1 - 7 hold station id
|
||||
* @reserved1: reserved
|
||||
* @flags: bitmap of %IWL_TLC_DEBUG_\*
|
||||
* @fixed_rate: rate value
|
||||
* @stats_threshold: if number of tx-ed frames is greater, send statistics
|
||||
* @time_threshold: statistics threshold in usec
|
||||
* @agg_time_lim: max agg time
|
||||
* @agg_dis_start_threshold: frames with try-cont greater than this count will
|
||||
* not be aggregated
|
||||
* @agg_frame_count_lim: agg size
|
||||
* @addba_retry_delay: delay between retries of ADD BA
|
||||
* @start_ac_rate_idx: frames per second to start a BA session
|
||||
* @no_far_range_tweak: disable BW scaling
|
||||
* @reserved2: reserved
|
||||
*/
|
||||
struct iwl_dhc_tlc_cmd {
|
||||
u8 sta_id;
|
||||
u8 reserved1[3];
|
||||
__le32 flags;
|
||||
__le32 fixed_rate;
|
||||
__le16 stats_threshold;
|
||||
__le16 time_threshold;
|
||||
__le16 agg_time_lim;
|
||||
__le16 agg_dis_start_threshold;
|
||||
__le16 agg_frame_count_lim;
|
||||
__le16 addba_retry_delay;
|
||||
u8 start_ac_rate_idx[IEEE80211_NUM_ACS];
|
||||
u8 no_far_range_tweak;
|
||||
u8 reserved2[3];
|
||||
} __packed;
|
||||
|
||||
/*
|
||||
* These serve as indexes into
|
||||
* struct iwl_rate_info fw_rate_idx_to_plcp[IWL_RATE_COUNT];
|
||||
|
||||
@@ -362,18 +362,49 @@ enum iwl_rx_he_phy {
|
||||
/* 6 bits reserved */
|
||||
IWL_RX_HE_PHY_DELIM_EOF = BIT(31),
|
||||
|
||||
/* second dword - MU data */
|
||||
IWL_RX_HE_PHY_SIGB_COMPRESSION = BIT_ULL(32 + 0),
|
||||
IWL_RX_HE_PHY_SIBG_SYM_OR_USER_NUM_MASK = 0x1e00000000ULL,
|
||||
/* second dword - common data */
|
||||
IWL_RX_HE_PHY_HE_LTF_NUM_MASK = 0xe000000000ULL,
|
||||
IWL_RX_HE_PHY_RU_ALLOC_SEC80 = BIT_ULL(32 + 8),
|
||||
/* trigger encoded */
|
||||
IWL_RX_HE_PHY_RU_ALLOC_MASK = 0xfe0000000000ULL,
|
||||
IWL_RX_HE_PHY_SIGB_MCS_MASK = 0xf000000000000ULL,
|
||||
/* 1 bit reserved */
|
||||
IWL_RX_HE_PHY_SIGB_DCM = BIT_ULL(32 + 21),
|
||||
IWL_RX_HE_PHY_PREAMBLE_PUNC_TYPE_MASK = 0xc0000000000000ULL,
|
||||
/* 8 bits reserved */
|
||||
IWL_RX_HE_PHY_INFO_TYPE_MASK = 0xf000000000000000ULL,
|
||||
IWL_RX_HE_PHY_INFO_TYPE_SU = 0x0,
|
||||
IWL_RX_HE_PHY_INFO_TYPE_MU = 0x1,
|
||||
IWL_RX_HE_PHY_INFO_TYPE_MU_EXT_INFO = 0x2,
|
||||
IWL_RX_HE_PHY_INFO_TYPE_TB_EXT_INFO = 0x3,
|
||||
|
||||
/* second dword - MU data */
|
||||
IWL_RX_HE_PHY_MU_SIGB_COMPRESSION = BIT_ULL(32 + 0),
|
||||
IWL_RX_HE_PHY_MU_SIBG_SYM_OR_USER_NUM_MASK = 0x1e00000000ULL,
|
||||
IWL_RX_HE_PHY_MU_SIGB_MCS_MASK = 0xf000000000000ULL,
|
||||
IWL_RX_HE_PHY_MU_SIGB_DCM = BIT_ULL(32 + 21),
|
||||
IWL_RX_HE_PHY_MU_PREAMBLE_PUNC_TYPE_MASK = 0xc0000000000000ULL,
|
||||
|
||||
/* second dword - TB data */
|
||||
IWL_RX_HE_PHY_TB_PILOT_TYPE = BIT_ULL(32 + 0),
|
||||
IWL_RX_HE_PHY_TB_LOW_SS_MASK = 0xe00000000ULL
|
||||
};
|
||||
|
||||
enum iwl_rx_he_sigb_common0 {
|
||||
/* the a1/a2/... is what the PHY/firmware calls the values */
|
||||
IWL_RX_HE_SIGB_COMMON0_CH1_RU0 = 0x000000ff, /* a1 */
|
||||
IWL_RX_HE_SIGB_COMMON0_CH1_RU2 = 0x0000ff00, /* a2 */
|
||||
IWL_RX_HE_SIGB_COMMON0_CH2_RU0 = 0x00ff0000, /* b1 */
|
||||
IWL_RX_HE_SIGB_COMMON0_CH2_RU2 = 0xff000000, /* b2 */
|
||||
};
|
||||
|
||||
enum iwl_rx_he_sigb_common1 {
|
||||
IWL_RX_HE_SIGB_COMMON1_CH1_RU1 = 0x000000ff, /* c1 */
|
||||
IWL_RX_HE_SIGB_COMMON1_CH1_RU3 = 0x0000ff00, /* c2 */
|
||||
IWL_RX_HE_SIGB_COMMON1_CH2_RU1 = 0x00ff0000, /* d1 */
|
||||
IWL_RX_HE_SIGB_COMMON1_CH2_RU3 = 0xff000000, /* d2 */
|
||||
};
|
||||
|
||||
enum iwl_rx_he_sigb_common2 {
|
||||
IWL_RX_HE_SIGB_COMMON2_CH1_CTR_RU = 0x0001,
|
||||
IWL_RX_HE_SIGB_COMMON2_CH2_CTR_RU = 0x0002,
|
||||
IWL_RX_HE_SIGB_COMMON2_CH1_CRC_OK = 0x0004,
|
||||
IWL_RX_HE_SIGB_COMMON2_CH2_CRC_OK = 0x0008,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -381,15 +412,31 @@ enum iwl_rx_he_phy {
|
||||
*/
|
||||
struct iwl_rx_mpdu_desc_v1 {
|
||||
/* DW7 - carries rss_hash only when rpa_en == 1 */
|
||||
/**
|
||||
* @rss_hash: RSS hash value
|
||||
*/
|
||||
__le32 rss_hash;
|
||||
union {
|
||||
/**
|
||||
* @rss_hash: RSS hash value
|
||||
*/
|
||||
__le32 rss_hash;
|
||||
|
||||
/**
|
||||
* @sigb_common0: for HE sniffer, HE-SIG-B common part 0
|
||||
*/
|
||||
__le32 sigb_common0;
|
||||
};
|
||||
|
||||
/* DW8 - carries filter_match only when rpa_en == 1 */
|
||||
/**
|
||||
* @filter_match: filter match value
|
||||
*/
|
||||
__le32 filter_match;
|
||||
union {
|
||||
/**
|
||||
* @filter_match: filter match value
|
||||
*/
|
||||
__le32 filter_match;
|
||||
|
||||
/**
|
||||
* @sigb_common1: for HE sniffer, HE-SIG-B common part 1
|
||||
*/
|
||||
__le32 sigb_common1;
|
||||
};
|
||||
|
||||
/* DW9 */
|
||||
/**
|
||||
* @rate_n_flags: RX rate/flags encoding
|
||||
@@ -439,15 +486,30 @@ struct iwl_rx_mpdu_desc_v1 {
|
||||
*/
|
||||
struct iwl_rx_mpdu_desc_v3 {
|
||||
/* DW7 - carries filter_match only when rpa_en == 1 */
|
||||
/**
|
||||
* @filter_match: filter match value
|
||||
*/
|
||||
__le32 filter_match;
|
||||
union {
|
||||
/**
|
||||
* @filter_match: filter match value
|
||||
*/
|
||||
__le32 filter_match;
|
||||
|
||||
/**
|
||||
* @sigb_common0: for HE sniffer, HE-SIG-B common part 0
|
||||
*/
|
||||
__le32 sigb_common0;
|
||||
};
|
||||
|
||||
/* DW8 - carries rss_hash only when rpa_en == 1 */
|
||||
/**
|
||||
* @rss_hash: RSS hash value
|
||||
*/
|
||||
__le32 rss_hash;
|
||||
union {
|
||||
/**
|
||||
* @rss_hash: RSS hash value
|
||||
*/
|
||||
__le32 rss_hash;
|
||||
|
||||
/**
|
||||
* @sigb_common1: for HE sniffer, HE-SIG-B common part 1
|
||||
*/
|
||||
__le32 sigb_common1;
|
||||
};
|
||||
/* DW9 */
|
||||
/**
|
||||
* @partial_hash: 31:0 ip/tcp header hash
|
||||
@@ -539,14 +601,24 @@ struct iwl_rx_mpdu_desc {
|
||||
*/
|
||||
u8 mac_phy_idx;
|
||||
/* DW4 - carries csum data only when rpa_en == 1 */
|
||||
/**
|
||||
* @raw_csum: raw checksum (alledgedly unreliable)
|
||||
*/
|
||||
__le16 raw_csum;
|
||||
/**
|
||||
* @l3l4_flags: &enum iwl_rx_l3l4_flags
|
||||
*/
|
||||
__le16 l3l4_flags;
|
||||
struct {
|
||||
/**
|
||||
* @raw_csum: raw checksum (alledgedly unreliable)
|
||||
*/
|
||||
__le16 raw_csum;
|
||||
|
||||
union {
|
||||
/**
|
||||
* @l3l4_flags: &enum iwl_rx_l3l4_flags
|
||||
*/
|
||||
__le16 l3l4_flags;
|
||||
|
||||
/**
|
||||
* @sigb_common2: for HE sniffer, HE-SIG-B common part 2
|
||||
*/
|
||||
__le16 sigb_common2;
|
||||
};
|
||||
};
|
||||
/* DW5 */
|
||||
/**
|
||||
* @status: &enum iwl_rx_mpdu_status
|
||||
@@ -574,6 +646,69 @@ struct iwl_rx_mpdu_desc {
|
||||
|
||||
#define IWL_RX_DESC_SIZE_V1 offsetofend(struct iwl_rx_mpdu_desc, v1)
|
||||
|
||||
#define IWL_CD_STTS_OPTIMIZED_POS 0
|
||||
#define IWL_CD_STTS_OPTIMIZED_MSK 0x01
|
||||
#define IWL_CD_STTS_TRANSFER_STATUS_POS 1
|
||||
#define IWL_CD_STTS_TRANSFER_STATUS_MSK 0x0E
|
||||
#define IWL_CD_STTS_WIFI_STATUS_POS 4
|
||||
#define IWL_CD_STTS_WIFI_STATUS_MSK 0xF0
|
||||
|
||||
/**
|
||||
* enum iwl_completion_desc_transfer_status - transfer status (bits 1-3)
|
||||
* @IWL_CD_STTS_UNUSED: unused
|
||||
* @IWL_CD_STTS_UNUSED_2: unused
|
||||
* @IWL_CD_STTS_END_TRANSFER: successful transfer complete.
|
||||
* In sniffer mode, when split is used, set in last CD completion. (RX)
|
||||
* @IWL_CD_STTS_OVERFLOW: In sniffer mode, when using split - used for
|
||||
* all CD completion. (RX)
|
||||
* @IWL_CD_STTS_ABORTED: CR abort / close flow. (RX)
|
||||
* @IWL_CD_STTS_ERROR: general error (RX)
|
||||
*/
|
||||
enum iwl_completion_desc_transfer_status {
|
||||
IWL_CD_STTS_UNUSED,
|
||||
IWL_CD_STTS_UNUSED_2,
|
||||
IWL_CD_STTS_END_TRANSFER,
|
||||
IWL_CD_STTS_OVERFLOW,
|
||||
IWL_CD_STTS_ABORTED,
|
||||
IWL_CD_STTS_ERROR,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum iwl_completion_desc_wifi_status - wifi status (bits 4-7)
|
||||
* @IWL_CD_STTS_VALID: the packet is valid (RX)
|
||||
* @IWL_CD_STTS_FCS_ERR: frame check sequence error (RX)
|
||||
* @IWL_CD_STTS_SEC_KEY_ERR: error handling the security key of rx (RX)
|
||||
* @IWL_CD_STTS_DECRYPTION_ERR: error decrypting the frame (RX)
|
||||
* @IWL_CD_STTS_DUP: duplicate packet (RX)
|
||||
* @IWL_CD_STTS_ICV_MIC_ERR: MIC error (RX)
|
||||
* @IWL_CD_STTS_INTERNAL_SNAP_ERR: problems removing the snap (RX)
|
||||
* @IWL_CD_STTS_SEC_PORT_FAIL: security port fail (RX)
|
||||
* @IWL_CD_STTS_BA_OLD_SN: block ack received old SN (RX)
|
||||
* @IWL_CD_STTS_QOS_NULL: QoS null packet (RX)
|
||||
* @IWL_CD_STTS_MAC_HDR_ERR: MAC header conversion error (RX)
|
||||
* @IWL_CD_STTS_MAX_RETRANS: reached max number of retransmissions (TX)
|
||||
* @IWL_CD_STTS_EX_LIFETIME: exceeded lifetime (TX)
|
||||
* @IWL_CD_STTS_NOT_USED: completed but not used (RX)
|
||||
* @IWL_CD_STTS_REPLAY_ERR: pn check failed, replay error (RX)
|
||||
*/
|
||||
enum iwl_completion_desc_wifi_status {
|
||||
IWL_CD_STTS_VALID,
|
||||
IWL_CD_STTS_FCS_ERR,
|
||||
IWL_CD_STTS_SEC_KEY_ERR,
|
||||
IWL_CD_STTS_DECRYPTION_ERR,
|
||||
IWL_CD_STTS_DUP,
|
||||
IWL_CD_STTS_ICV_MIC_ERR,
|
||||
IWL_CD_STTS_INTERNAL_SNAP_ERR,
|
||||
IWL_CD_STTS_SEC_PORT_FAIL,
|
||||
IWL_CD_STTS_BA_OLD_SN,
|
||||
IWL_CD_STTS_QOS_NULL,
|
||||
IWL_CD_STTS_MAC_HDR_ERR,
|
||||
IWL_CD_STTS_MAX_RETRANS,
|
||||
IWL_CD_STTS_EX_LIFETIME,
|
||||
IWL_CD_STTS_NOT_USED,
|
||||
IWL_CD_STTS_REPLAY_ERR,
|
||||
};
|
||||
|
||||
struct iwl_frame_release {
|
||||
u8 baid;
|
||||
u8 reserved;
|
||||
|
||||
@@ -262,6 +262,7 @@ enum iwl_scan_channel_flags {
|
||||
IWL_SCAN_CHANNEL_FLAG_EBS = BIT(0),
|
||||
IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE = BIT(1),
|
||||
IWL_SCAN_CHANNEL_FLAG_CACHE_ADD = BIT(2),
|
||||
IWL_SCAN_CHANNEL_FLAG_EBS_FRAG = BIT(3),
|
||||
};
|
||||
|
||||
/* struct iwl_scan_channel_opt - CHANNEL_OPTIMIZATION_API_S
|
||||
|
||||
@@ -186,7 +186,7 @@ enum iwl_tx_cmd_sec_ctrl {
|
||||
/*
|
||||
* TID for non QoS frames - to be written in tid_tspec
|
||||
*/
|
||||
#define IWL_TID_NON_QOS IWL_MAX_TID_COUNT
|
||||
#define IWL_TID_NON_QOS 0
|
||||
|
||||
/*
|
||||
* Limits on the retransmissions - to be written in {data,rts}_retry_limit
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program;
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
@@ -458,8 +455,8 @@ static const struct iwl_prph_range iwl_prph_dump_addr_9000[] = {
|
||||
{ .start = 0x00a02400, .end = 0x00a02758 },
|
||||
};
|
||||
|
||||
static void _iwl_read_prph_block(struct iwl_trans *trans, u32 start,
|
||||
u32 len_bytes, __le32 *data)
|
||||
static void iwl_read_prph_block(struct iwl_trans *trans, u32 start,
|
||||
u32 len_bytes, __le32 *data)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
@@ -467,21 +464,6 @@ static void _iwl_read_prph_block(struct iwl_trans *trans, u32 start,
|
||||
*data++ = cpu_to_le32(iwl_read_prph_no_grab(trans, start + i));
|
||||
}
|
||||
|
||||
static bool iwl_read_prph_block(struct iwl_trans *trans, u32 start,
|
||||
u32 len_bytes, __le32 *data)
|
||||
{
|
||||
unsigned long flags;
|
||||
bool success = false;
|
||||
|
||||
if (iwl_trans_grab_nic_access(trans, &flags)) {
|
||||
success = true;
|
||||
_iwl_read_prph_block(trans, start, len_bytes, data);
|
||||
iwl_trans_release_nic_access(trans, &flags);
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
static void iwl_dump_prph(struct iwl_trans *trans,
|
||||
struct iwl_fw_error_dump_data **data,
|
||||
const struct iwl_prph_range *iwl_prph_dump_addr,
|
||||
@@ -507,11 +489,11 @@ static void iwl_dump_prph(struct iwl_trans *trans,
|
||||
prph = (void *)(*data)->data;
|
||||
prph->prph_start = cpu_to_le32(iwl_prph_dump_addr[i].start);
|
||||
|
||||
_iwl_read_prph_block(trans, iwl_prph_dump_addr[i].start,
|
||||
/* our range is inclusive, hence + 4 */
|
||||
iwl_prph_dump_addr[i].end -
|
||||
iwl_prph_dump_addr[i].start + 4,
|
||||
(void *)prph->data);
|
||||
iwl_read_prph_block(trans, iwl_prph_dump_addr[i].start,
|
||||
/* our range is inclusive, hence + 4 */
|
||||
iwl_prph_dump_addr[i].end -
|
||||
iwl_prph_dump_addr[i].start + 4,
|
||||
(void *)prph->data);
|
||||
|
||||
*data = iwl_fw_error_next_data(*data);
|
||||
}
|
||||
@@ -746,6 +728,11 @@ void iwl_fw_error_dump(struct iwl_fw_runtime *fwrt)
|
||||
sizeof(struct iwl_fw_error_dump_paging) +
|
||||
PAGING_BLOCK_SIZE);
|
||||
|
||||
if (iwl_fw_dbg_is_d3_debug_enabled(fwrt) && fwrt->dump.d3_debug_data) {
|
||||
file_len += sizeof(*dump_data) +
|
||||
fwrt->trans->cfg->d3_debug_data_length * 2;
|
||||
}
|
||||
|
||||
/* If we only want a monitor dump, reset the file length */
|
||||
if (monitor_dump_only) {
|
||||
file_len = sizeof(*dump_file) + sizeof(*dump_data) * 2 +
|
||||
@@ -858,10 +845,29 @@ void iwl_fw_error_dump(struct iwl_fw_runtime *fwrt)
|
||||
dump_data = iwl_fw_error_next_data(dump_data);
|
||||
}
|
||||
|
||||
if (iwl_fw_dbg_is_d3_debug_enabled(fwrt) && fwrt->dump.d3_debug_data) {
|
||||
u32 addr = fwrt->trans->cfg->d3_debug_data_base_addr;
|
||||
size_t data_size = fwrt->trans->cfg->d3_debug_data_length;
|
||||
|
||||
dump_data->type = cpu_to_le32(IWL_FW_ERROR_DUMP_D3_DEBUG_DATA);
|
||||
dump_data->len = cpu_to_le32(data_size * 2);
|
||||
|
||||
memcpy(dump_data->data, fwrt->dump.d3_debug_data,
|
||||
data_size);
|
||||
|
||||
kfree(fwrt->dump.d3_debug_data);
|
||||
fwrt->dump.d3_debug_data = NULL;
|
||||
|
||||
iwl_trans_read_mem_bytes(fwrt->trans, addr,
|
||||
dump_data->data + data_size,
|
||||
data_size);
|
||||
|
||||
dump_data = iwl_fw_error_next_data(dump_data);
|
||||
}
|
||||
|
||||
for (i = 0; i < fwrt->fw->n_dbg_mem_tlv; i++) {
|
||||
u32 len = le32_to_cpu(fw_dbg_mem[i].len);
|
||||
u32 ofs = le32_to_cpu(fw_dbg_mem[i].ofs);
|
||||
bool success;
|
||||
|
||||
if (!(fwrt->fw->dbg_dump_mask & BIT(IWL_FW_ERROR_DUMP_MEM)))
|
||||
break;
|
||||
@@ -875,28 +881,11 @@ void iwl_fw_error_dump(struct iwl_fw_runtime *fwrt)
|
||||
IWL_DEBUG_INFO(fwrt, "WRT memory dump. Type=%u\n",
|
||||
dump_mem->type);
|
||||
|
||||
switch (dump_mem->type & cpu_to_le32(FW_DBG_MEM_TYPE_MASK)) {
|
||||
case cpu_to_le32(FW_DBG_MEM_TYPE_REGULAR):
|
||||
iwl_trans_read_mem_bytes(fwrt->trans, ofs,
|
||||
dump_mem->data,
|
||||
len);
|
||||
success = true;
|
||||
break;
|
||||
case cpu_to_le32(FW_DBG_MEM_TYPE_PRPH):
|
||||
success = iwl_read_prph_block(fwrt->trans, ofs, len,
|
||||
(void *)dump_mem->data);
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
* shouldn't get here, we ignored this kind
|
||||
* of TLV earlier during the TLV parsing?!
|
||||
*/
|
||||
WARN_ON(1);
|
||||
success = false;
|
||||
}
|
||||
iwl_trans_read_mem_bytes(fwrt->trans, ofs,
|
||||
dump_mem->data,
|
||||
len);
|
||||
|
||||
if (success)
|
||||
dump_data = iwl_fw_error_next_data(dump_data);
|
||||
dump_data = iwl_fw_error_next_data(dump_data);
|
||||
}
|
||||
|
||||
if (smem_len && fwrt->fw->dbg_dump_mask & BIT(IWL_FW_ERROR_DUMP_MEM)) {
|
||||
@@ -1016,7 +1005,7 @@ int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt,
|
||||
* If the loading of the FW completed successfully, the next step is to
|
||||
* get the SMEM config data. Thus, if fwrt->smem_cfg.num_lmacs is non
|
||||
* zero, the FW was already loaded successully. If the state is "NO_FW"
|
||||
* in such a case - WARN and exit, since FW may be dead. Otherwise, we
|
||||
* in such a case - exit, since FW may be dead. Otherwise, we
|
||||
* can try to collect the data, since FW might just not be fully
|
||||
* loaded (no "ALIVE" yet), and the debug data is accessible.
|
||||
*
|
||||
@@ -1024,9 +1013,8 @@ int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt,
|
||||
* config. In such a case, due to HW access problems, we might
|
||||
* collect garbage.
|
||||
*/
|
||||
if (WARN((fwrt->trans->state == IWL_TRANS_NO_FW) &&
|
||||
fwrt->smem_cfg.num_lmacs,
|
||||
"Can't collect dbg data when FW isn't alive\n"))
|
||||
if (fwrt->trans->state == IWL_TRANS_NO_FW &&
|
||||
fwrt->smem_cfg.num_lmacs)
|
||||
return -EIO;
|
||||
|
||||
if (test_and_set_bit(IWL_FWRT_STATUS_DUMPING, &fwrt->status))
|
||||
@@ -1133,9 +1121,6 @@ int iwl_fw_start_dbg_conf(struct iwl_fw_runtime *fwrt, u8 conf_id)
|
||||
IWL_WARN(fwrt, "FW already configured (%d) - re-configuring\n",
|
||||
fwrt->dump.conf);
|
||||
|
||||
/* start default config marker cmd for syncing logs */
|
||||
iwl_fw_trigger_timestamp(fwrt, 1);
|
||||
|
||||
/* Send all HCMDs for configuring the FW debug */
|
||||
ptr = (void *)&fwrt->fw->dbg_conf_tlv[conf_id]->hcmd;
|
||||
for (i = 0; i < fwrt->fw->dbg_conf_tlv[conf_id]->num_of_hcmds; i++) {
|
||||
@@ -1179,7 +1164,7 @@ void iwl_fw_error_dump_wk(struct work_struct *work)
|
||||
|
||||
if (fwrt->trans->cfg->device_family == IWL_DEVICE_FAMILY_7000) {
|
||||
/* stop recording */
|
||||
iwl_fw_dbg_stop_recording(fwrt);
|
||||
iwl_fw_dbg_stop_recording(fwrt->trans);
|
||||
|
||||
iwl_fw_error_dump(fwrt);
|
||||
|
||||
@@ -1197,7 +1182,7 @@ void iwl_fw_error_dump_wk(struct work_struct *work)
|
||||
u32 in_sample = iwl_read_prph(fwrt->trans, DBGC_IN_SAMPLE);
|
||||
u32 out_ctrl = iwl_read_prph(fwrt->trans, DBGC_OUT_CTRL);
|
||||
|
||||
iwl_fw_dbg_stop_recording(fwrt);
|
||||
iwl_fw_dbg_stop_recording(fwrt->trans);
|
||||
/* wait before we collect the data till the DBGC stop */
|
||||
udelay(500);
|
||||
|
||||
@@ -1215,3 +1200,26 @@ void iwl_fw_error_dump_wk(struct work_struct *work)
|
||||
fwrt->ops->dump_end(fwrt->ops_ctx);
|
||||
}
|
||||
|
||||
void iwl_fw_dbg_read_d3_debug_data(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
const struct iwl_cfg *cfg = fwrt->trans->cfg;
|
||||
|
||||
if (!iwl_fw_dbg_is_d3_debug_enabled(fwrt))
|
||||
return;
|
||||
|
||||
if (!fwrt->dump.d3_debug_data) {
|
||||
fwrt->dump.d3_debug_data = kmalloc(cfg->d3_debug_data_length,
|
||||
GFP_KERNEL);
|
||||
if (!fwrt->dump.d3_debug_data) {
|
||||
IWL_ERR(fwrt,
|
||||
"failed to allocate memory for D3 debug data\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* if the buffer holds previous debug data it is overwritten */
|
||||
iwl_trans_read_mem_bytes(fwrt->trans, cfg->d3_debug_data_base_addr,
|
||||
fwrt->dump.d3_debug_data,
|
||||
cfg->d3_debug_data_length);
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_fw_dbg_read_d3_debug_data);
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program;
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
@@ -199,14 +196,14 @@ _iwl_fw_dbg_trigger_simple_stop(struct iwl_fw_runtime *fwrt,
|
||||
iwl_fw_dbg_get_trigger((fwrt)->fw,\
|
||||
(trig)))
|
||||
|
||||
static inline void iwl_fw_dbg_stop_recording(struct iwl_fw_runtime *fwrt)
|
||||
static inline void iwl_fw_dbg_stop_recording(struct iwl_trans *trans)
|
||||
{
|
||||
if (fwrt->trans->cfg->device_family == IWL_DEVICE_FAMILY_7000) {
|
||||
iwl_set_bits_prph(fwrt->trans, MON_BUFF_SAMPLE_CTL, 0x100);
|
||||
if (trans->cfg->device_family == IWL_DEVICE_FAMILY_7000) {
|
||||
iwl_set_bits_prph(trans, MON_BUFF_SAMPLE_CTL, 0x100);
|
||||
} else {
|
||||
iwl_write_prph(fwrt->trans, DBGC_IN_SAMPLE, 0);
|
||||
iwl_write_prph(trans, DBGC_IN_SAMPLE, 0);
|
||||
udelay(100);
|
||||
iwl_write_prph(fwrt->trans, DBGC_OUT_CTRL, 0);
|
||||
iwl_write_prph(trans, DBGC_OUT_CTRL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,6 +214,16 @@ static inline void iwl_fw_dump_conf_clear(struct iwl_fw_runtime *fwrt)
|
||||
|
||||
void iwl_fw_error_dump_wk(struct work_struct *work);
|
||||
|
||||
static inline bool iwl_fw_dbg_is_d3_debug_enabled(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
return fw_has_capa(&fwrt->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_D3_DEBUG) &&
|
||||
fwrt->trans->cfg->d3_debug_data_length &&
|
||||
fwrt->fw->dbg_dump_mask & BIT(IWL_FW_ERROR_DUMP_D3_DEBUG_DATA);
|
||||
}
|
||||
|
||||
void iwl_fw_dbg_read_d3_debug_data(struct iwl_fw_runtime *fwrt);
|
||||
|
||||
static inline void iwl_fw_flush_dump(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
flush_delayed_work(&fwrt->dump.wk);
|
||||
|
||||
@@ -8,6 +8,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
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
*
|
||||
* 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,9 +19,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program.
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
@@ -33,6 +31,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
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -66,55 +65,117 @@
|
||||
#include "debugfs.h"
|
||||
#include "dbg.h"
|
||||
|
||||
#define FWRT_DEBUGFS_READ_FILE_OPS(name) \
|
||||
static ssize_t iwl_dbgfs_##name##_read(struct iwl_fw_runtime *fwrt, \
|
||||
char *buf, size_t count, \
|
||||
loff_t *ppos); \
|
||||
static const struct file_operations iwl_dbgfs_##name##_ops = { \
|
||||
.read = iwl_dbgfs_##name##_read, \
|
||||
.open = simple_open, \
|
||||
.llseek = generic_file_llseek, \
|
||||
#define FWRT_DEBUGFS_OPEN_WRAPPER(name, buflen, argtype) \
|
||||
struct dbgfs_##name##_data { \
|
||||
argtype *arg; \
|
||||
bool read_done; \
|
||||
ssize_t rlen; \
|
||||
char rbuf[buflen]; \
|
||||
}; \
|
||||
static int _iwl_dbgfs_##name##_open(struct inode *inode, \
|
||||
struct file *file) \
|
||||
{ \
|
||||
struct dbgfs_##name##_data *data; \
|
||||
\
|
||||
data = kzalloc(sizeof(*data), GFP_KERNEL); \
|
||||
if (!data) \
|
||||
return -ENOMEM; \
|
||||
\
|
||||
data->read_done = false; \
|
||||
data->arg = inode->i_private; \
|
||||
file->private_data = data; \
|
||||
\
|
||||
return 0; \
|
||||
}
|
||||
|
||||
#define FWRT_DEBUGFS_WRITE_WRAPPER(name, buflen) \
|
||||
static ssize_t iwl_dbgfs_##name##_write(struct iwl_fw_runtime *fwrt, \
|
||||
char *buf, size_t count, \
|
||||
loff_t *ppos); \
|
||||
#define FWRT_DEBUGFS_READ_WRAPPER(name) \
|
||||
static ssize_t _iwl_dbgfs_##name##_read(struct file *file, \
|
||||
char __user *user_buf, \
|
||||
size_t count, loff_t *ppos) \
|
||||
{ \
|
||||
struct dbgfs_##name##_data *data = file->private_data; \
|
||||
\
|
||||
if (!data->read_done) { \
|
||||
data->read_done = true; \
|
||||
data->rlen = iwl_dbgfs_##name##_read(data->arg, \
|
||||
sizeof(data->rbuf),\
|
||||
data->rbuf); \
|
||||
} \
|
||||
\
|
||||
if (data->rlen < 0) \
|
||||
return data->rlen; \
|
||||
return simple_read_from_buffer(user_buf, count, ppos, \
|
||||
data->rbuf, data->rlen); \
|
||||
}
|
||||
|
||||
static int _iwl_dbgfs_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
kfree(file->private_data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define _FWRT_DEBUGFS_READ_FILE_OPS(name, buflen, argtype) \
|
||||
FWRT_DEBUGFS_OPEN_WRAPPER(name, buflen, argtype) \
|
||||
FWRT_DEBUGFS_READ_WRAPPER(name) \
|
||||
static const struct file_operations iwl_dbgfs_##name##_ops = { \
|
||||
.read = _iwl_dbgfs_##name##_read, \
|
||||
.open = _iwl_dbgfs_##name##_open, \
|
||||
.llseek = generic_file_llseek, \
|
||||
.release = _iwl_dbgfs_release, \
|
||||
}
|
||||
|
||||
#define FWRT_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \
|
||||
static ssize_t _iwl_dbgfs_##name##_write(struct file *file, \
|
||||
const char __user *user_buf, \
|
||||
size_t count, loff_t *ppos) \
|
||||
{ \
|
||||
struct iwl_fw_runtime *fwrt = file->private_data; \
|
||||
argtype *arg = \
|
||||
((struct dbgfs_##name##_data *)file->private_data)->arg;\
|
||||
char buf[buflen] = {}; \
|
||||
size_t buf_size = min(count, sizeof(buf) - 1); \
|
||||
\
|
||||
if (copy_from_user(buf, user_buf, buf_size)) \
|
||||
return -EFAULT; \
|
||||
\
|
||||
return iwl_dbgfs_##name##_write(fwrt, buf, buf_size, ppos); \
|
||||
return iwl_dbgfs_##name##_write(arg, buf, buf_size); \
|
||||
}
|
||||
|
||||
#define FWRT_DEBUGFS_READ_WRITE_FILE_OPS(name, buflen) \
|
||||
FWRT_DEBUGFS_WRITE_WRAPPER(name, buflen) \
|
||||
#define _FWRT_DEBUGFS_READ_WRITE_FILE_OPS(name, buflen, argtype) \
|
||||
FWRT_DEBUGFS_OPEN_WRAPPER(name, buflen, argtype) \
|
||||
FWRT_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \
|
||||
FWRT_DEBUGFS_READ_WRAPPER(name) \
|
||||
static const struct file_operations iwl_dbgfs_##name##_ops = { \
|
||||
.write = _iwl_dbgfs_##name##_write, \
|
||||
.read = iwl_dbgfs_##name##_read, \
|
||||
.open = simple_open, \
|
||||
.read = _iwl_dbgfs_##name##_read, \
|
||||
.open = _iwl_dbgfs_##name##_open, \
|
||||
.llseek = generic_file_llseek, \
|
||||
.release = _iwl_dbgfs_release, \
|
||||
}
|
||||
|
||||
#define FWRT_DEBUGFS_WRITE_FILE_OPS(name, buflen) \
|
||||
FWRT_DEBUGFS_WRITE_WRAPPER(name, buflen) \
|
||||
#define _FWRT_DEBUGFS_WRITE_FILE_OPS(name, buflen, argtype) \
|
||||
FWRT_DEBUGFS_OPEN_WRAPPER(name, buflen, argtype) \
|
||||
FWRT_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \
|
||||
static const struct file_operations iwl_dbgfs_##name##_ops = { \
|
||||
.write = _iwl_dbgfs_##name##_write, \
|
||||
.open = simple_open, \
|
||||
.open = _iwl_dbgfs_##name##_open, \
|
||||
.llseek = generic_file_llseek, \
|
||||
.release = _iwl_dbgfs_release, \
|
||||
}
|
||||
|
||||
#define FWRT_DEBUGFS_READ_FILE_OPS(name, bufsz) \
|
||||
_FWRT_DEBUGFS_READ_FILE_OPS(name, bufsz, struct iwl_fw_runtime)
|
||||
|
||||
#define FWRT_DEBUGFS_WRITE_FILE_OPS(name, bufsz) \
|
||||
_FWRT_DEBUGFS_WRITE_FILE_OPS(name, bufsz, struct iwl_fw_runtime)
|
||||
|
||||
#define FWRT_DEBUGFS_READ_WRITE_FILE_OPS(name, bufsz) \
|
||||
_FWRT_DEBUGFS_READ_WRITE_FILE_OPS(name, bufsz, struct iwl_fw_runtime)
|
||||
|
||||
#define FWRT_DEBUGFS_ADD_FILE_ALIAS(alias, name, parent, mode) do { \
|
||||
if (!debugfs_create_file(alias, mode, parent, fwrt, \
|
||||
&iwl_dbgfs_##name##_ops)) \
|
||||
goto err; \
|
||||
if (!debugfs_create_file(alias, mode, parent, fwrt, \
|
||||
&iwl_dbgfs_##name##_ops)) \
|
||||
goto err; \
|
||||
} while (0)
|
||||
#define FWRT_DEBUGFS_ADD_FILE(name, parent, mode) \
|
||||
FWRT_DEBUGFS_ADD_FILE_ALIAS(#name, name, parent, mode)
|
||||
@@ -173,8 +234,7 @@ void iwl_fw_trigger_timestamp(struct iwl_fw_runtime *fwrt, u32 delay)
|
||||
}
|
||||
|
||||
static ssize_t iwl_dbgfs_timestamp_marker_write(struct iwl_fw_runtime *fwrt,
|
||||
char *buf, size_t count,
|
||||
loff_t *ppos)
|
||||
char *buf, size_t count)
|
||||
{
|
||||
int ret;
|
||||
u32 delay;
|
||||
@@ -188,7 +248,15 @@ static ssize_t iwl_dbgfs_timestamp_marker_write(struct iwl_fw_runtime *fwrt,
|
||||
return count;
|
||||
}
|
||||
|
||||
FWRT_DEBUGFS_WRITE_FILE_OPS(timestamp_marker, 10);
|
||||
static ssize_t iwl_dbgfs_timestamp_marker_read(struct iwl_fw_runtime *fwrt,
|
||||
size_t size, char *buf)
|
||||
{
|
||||
u32 delay_secs = jiffies_to_msecs(fwrt->timestamp.delay) / 1000;
|
||||
|
||||
return scnprintf(buf, size, "%d\n", delay_secs);
|
||||
}
|
||||
|
||||
FWRT_DEBUGFS_READ_WRITE_FILE_OPS(timestamp_marker, 16);
|
||||
|
||||
int iwl_fwrt_dbgfs_register(struct iwl_fw_runtime *fwrt,
|
||||
struct dentry *dbgfs_dir)
|
||||
|
||||
@@ -18,9 +18,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program.
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
* Copyright(c) 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2014 - 2015 Intel Mobile Communications GmbH
|
||||
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
*
|
||||
* 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,11 +19,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
@@ -35,6 +31,7 @@
|
||||
* Copyright(c) 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2014 - 2015 Intel Mobile Communications GmbH
|
||||
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -116,6 +113,7 @@ enum iwl_fw_error_dump_type {
|
||||
IWL_FW_ERROR_DUMP_INTERNAL_TXF = 14,
|
||||
IWL_FW_ERROR_DUMP_EXTERNAL = 15, /* Do not move */
|
||||
IWL_FW_ERROR_DUMP_MEM_CFG = 16,
|
||||
IWL_FW_ERROR_DUMP_D3_DEBUG_DATA = 17,
|
||||
|
||||
IWL_FW_ERROR_DUMP_MAX,
|
||||
};
|
||||
|
||||
@@ -19,11 +19,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
@@ -258,6 +253,9 @@ typedef unsigned int __bitwise iwl_ucode_tlv_api_t;
|
||||
* deprecated.
|
||||
* @IWL_UCODE_TLV_API_ADAPTIVE_DWELL_V2: This ucode supports version 8
|
||||
* of scan request: SCAN_REQUEST_CMD_UMAC_API_S_VER_8
|
||||
* @IWL_UCODE_TLV_API_FRAG_EBS: This ucode supports fragmented EBS
|
||||
* @IWL_UCODE_TLV_API_REDUCE_TX_POWER: This ucode supports v5 of
|
||||
* the REDUCE_TX_POWER_CMD.
|
||||
*
|
||||
* @NUM_IWL_UCODE_TLV_API: number of bits used
|
||||
*/
|
||||
@@ -276,9 +274,12 @@ enum iwl_ucode_tlv_api {
|
||||
IWL_UCODE_TLV_API_OCE = (__force iwl_ucode_tlv_api_t)33,
|
||||
IWL_UCODE_TLV_API_NEW_BEACON_TEMPLATE = (__force iwl_ucode_tlv_api_t)34,
|
||||
IWL_UCODE_TLV_API_NEW_RX_STATS = (__force iwl_ucode_tlv_api_t)35,
|
||||
IWL_UCODE_TLV_API_WOWLAN_KEY_MATERIAL = (__force iwl_ucode_tlv_api_t)36,
|
||||
IWL_UCODE_TLV_API_QUOTA_LOW_LATENCY = (__force iwl_ucode_tlv_api_t)38,
|
||||
IWL_UCODE_TLV_API_DEPRECATE_TTAK = (__force iwl_ucode_tlv_api_t)41,
|
||||
IWL_UCODE_TLV_API_ADAPTIVE_DWELL_V2 = (__force iwl_ucode_tlv_api_t)42,
|
||||
IWL_UCODE_TLV_API_FRAG_EBS = (__force iwl_ucode_tlv_api_t)44,
|
||||
IWL_UCODE_TLV_API_REDUCE_TX_POWER = (__force iwl_ucode_tlv_api_t)45,
|
||||
|
||||
NUM_IWL_UCODE_TLV_API
|
||||
#ifdef __CHECKER__
|
||||
@@ -325,6 +326,7 @@ typedef unsigned int __bitwise iwl_ucode_tlv_capa_t;
|
||||
* @IWL_UCODE_TLV_CAPA_STA_PM_NOTIF: firmware will send STA PM notification
|
||||
* @IWL_UCODE_TLV_CAPA_TLC_OFFLOAD: firmware implements rate scaling algorithm
|
||||
* @IWL_UCODE_TLV_CAPA_DYNAMIC_QUOTA: firmware implements quota related
|
||||
* @IWL_UCODE_TLV_CAPA_COEX_SCHEMA_2: firmware implements Coex Schema 2
|
||||
* @IWL_UCODE_TLV_CAPA_EXTENDED_DTS_MEASURE: extended DTS measurement
|
||||
* @IWL_UCODE_TLV_CAPA_SHORT_PM_TIMEOUTS: supports short PM timeouts
|
||||
* @IWL_UCODE_TLV_CAPA_BT_MPLUT_SUPPORT: supports bt-coex Multi-priority LUT
|
||||
@@ -349,6 +351,7 @@ typedef unsigned int __bitwise iwl_ucode_tlv_capa_t;
|
||||
* command size (command version 4) that supports toggling ACK TX
|
||||
* power reduction.
|
||||
* @IWL_UCODE_TLV_CAPA_MLME_OFFLOAD: supports MLME offload
|
||||
* @IWL_UCODE_TLV_CAPA_D3_DEBUG: supports debug recording during D3
|
||||
*
|
||||
* @NUM_IWL_UCODE_TLV_CAPA: number of bits used
|
||||
*/
|
||||
@@ -381,6 +384,7 @@ enum iwl_ucode_tlv_capa {
|
||||
IWL_UCODE_TLV_CAPA_D0I3_END_FIRST = (__force iwl_ucode_tlv_capa_t)41,
|
||||
IWL_UCODE_TLV_CAPA_TLC_OFFLOAD = (__force iwl_ucode_tlv_capa_t)43,
|
||||
IWL_UCODE_TLV_CAPA_DYNAMIC_QUOTA = (__force iwl_ucode_tlv_capa_t)44,
|
||||
IWL_UCODE_TLV_CAPA_COEX_SCHEMA_2 = (__force iwl_ucode_tlv_capa_t)45,
|
||||
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,
|
||||
@@ -397,6 +401,7 @@ enum iwl_ucode_tlv_capa {
|
||||
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,
|
||||
IWL_UCODE_TLV_CAPA_LED_CMD_SUPPORT = (__force iwl_ucode_tlv_capa_t)86,
|
||||
IWL_UCODE_TLV_CAPA_D3_DEBUG = (__force iwl_ucode_tlv_capa_t)87,
|
||||
IWL_UCODE_TLV_CAPA_MLME_OFFLOAD = (__force iwl_ucode_tlv_capa_t)96,
|
||||
|
||||
NUM_IWL_UCODE_TLV_CAPA
|
||||
@@ -527,23 +532,10 @@ enum iwl_fw_dbg_monitor_mode {
|
||||
MIPI_MODE = 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum iwl_fw_mem_seg_type - memory segment type
|
||||
* @FW_DBG_MEM_TYPE_MASK: mask for the type indication
|
||||
* @FW_DBG_MEM_TYPE_REGULAR: regular memory
|
||||
* @FW_DBG_MEM_TYPE_PRPH: periphery memory (requires special reading)
|
||||
*/
|
||||
enum iwl_fw_mem_seg_type {
|
||||
FW_DBG_MEM_TYPE_MASK = 0xff000000,
|
||||
FW_DBG_MEM_TYPE_REGULAR = 0x00000000,
|
||||
FW_DBG_MEM_TYPE_PRPH = 0x01000000,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iwl_fw_dbg_mem_seg_tlv - configures the debug data memory segments
|
||||
*
|
||||
* @data_type: the memory segment type to record, see &enum iwl_fw_mem_seg_type
|
||||
* for what we care about
|
||||
* @data_type: the memory segment type to record
|
||||
* @ofs: the memory segment offset
|
||||
* @len: the memory segment length, in bytes
|
||||
*
|
||||
|
||||
@@ -19,11 +19,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -136,6 +136,7 @@ struct iwl_fw_runtime {
|
||||
|
||||
/* ts of the beginning of a non-collect fw dbg data period */
|
||||
unsigned long non_collect_ts_start[FW_DBG_TRIGGER_MAX - 1];
|
||||
u32 *d3_debug_data;
|
||||
} dump;
|
||||
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
||||
struct {
|
||||
|
||||
@@ -16,11 +16,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -18,11 +18,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
@@ -388,6 +383,8 @@ struct iwl_csr_params {
|
||||
* @gen2: 22000 and on transport operation
|
||||
* @cdb: CDB support
|
||||
* @nvm_type: see &enum iwl_nvm_type
|
||||
* @d3_debug_data_base_addr: base address where D3 debug data is stored
|
||||
* @d3_debug_data_length: length of the D3 debug data
|
||||
*
|
||||
* We enable the driver to be backward compatible wrt. hardware features.
|
||||
* API differences in uCode shouldn't be handled here but through TLVs
|
||||
@@ -452,6 +449,8 @@ struct iwl_cfg {
|
||||
u8 ucode_api_min;
|
||||
u32 min_umac_error_event_table;
|
||||
u32 extra_phy_cfg_flags;
|
||||
u32 d3_debug_data_base_addr;
|
||||
u32 d3_debug_data_length;
|
||||
};
|
||||
|
||||
static const struct iwl_csr_params iwl_csr_v1 = {
|
||||
@@ -574,11 +573,18 @@ extern const struct iwl_cfg iwl22000_2ac_cfg_hr;
|
||||
extern const struct iwl_cfg iwl22000_2ac_cfg_hr_cdb;
|
||||
extern const struct iwl_cfg iwl22000_2ac_cfg_jf;
|
||||
extern const struct iwl_cfg iwl22000_2ax_cfg_hr;
|
||||
extern const struct iwl_cfg iwl9461_2ac_cfg_qu_b0_jf_b0;
|
||||
extern const struct iwl_cfg iwl9462_2ac_cfg_qu_b0_jf_b0;
|
||||
extern const struct iwl_cfg iwl9560_2ac_cfg_qu_b0_jf_b0;
|
||||
extern const struct iwl_cfg killer1550i_2ac_cfg_qu_b0_jf_b0;
|
||||
extern const struct iwl_cfg killer1550s_2ac_cfg_qu_b0_jf_b0;
|
||||
extern const struct iwl_cfg iwl22000_2ax_cfg_jf;
|
||||
extern const struct iwl_cfg iwl22000_2ax_cfg_qnj_hr_a0_f0;
|
||||
extern const struct iwl_cfg iwl22000_2ax_cfg_qnj_hr_b0_f0;
|
||||
extern const struct iwl_cfg iwl22000_2ax_cfg_qnj_hr_b0;
|
||||
extern const struct iwl_cfg iwl22000_2ax_cfg_qnj_jf_b0;
|
||||
extern const struct iwl_cfg iwl22000_2ax_cfg_qnj_hr_a0;
|
||||
extern const struct iwl_cfg iwl22560_2ax_cfg_su_cdb;
|
||||
#endif /* CONFIG_IWLMVM */
|
||||
#endif /* CPTCFG_IWLMVM || CPTCFG_IWLFMAC */
|
||||
|
||||
#endif /* __IWL_CONFIG_H__ */
|
||||
|
||||
@@ -19,11 +19,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
@@ -188,6 +183,7 @@
|
||||
#define CSR_HW_IF_CONFIG_REG_MSK_BOARD_VER (0x000000C0)
|
||||
#define CSR_HW_IF_CONFIG_REG_BIT_MAC_SI (0x00000100)
|
||||
#define CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI (0x00000200)
|
||||
#define CSR_HW_IF_CONFIG_REG_D3_DEBUG (0x00000200)
|
||||
#define CSR_HW_IF_CONFIG_REG_MSK_PHY_TYPE (0x00000C00)
|
||||
#define CSR_HW_IF_CONFIG_REG_MSK_PHY_DASH (0x00003000)
|
||||
#define CSR_HW_IF_CONFIG_REG_MSK_PHY_STEP (0x0000C000)
|
||||
|
||||
@@ -16,11 +16,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
*
|
||||
* Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2015 Intel Deutschland GmbH
|
||||
* Copyright(c) 2018 Intel Corporation
|
||||
*
|
||||
* 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
|
||||
@@ -12,10 +13,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
@@ -76,12 +73,11 @@ TRACE_EVENT(iwlwifi_dev_rx_data,
|
||||
TP_ARGS(dev, trans, rxbuf, len),
|
||||
TP_STRUCT__entry(
|
||||
DEV_ENTRY
|
||||
|
||||
__dynamic_array(u8, data,
|
||||
len - iwl_rx_trace_len(trans, rxbuf, len))
|
||||
len - iwl_rx_trace_len(trans, rxbuf, len, NULL))
|
||||
),
|
||||
TP_fast_assign(
|
||||
size_t offs = iwl_rx_trace_len(trans, rxbuf, len);
|
||||
size_t offs = iwl_rx_trace_len(trans, rxbuf, len, NULL);
|
||||
DEV_ASSIGN;
|
||||
if (offs < len)
|
||||
memcpy(__get_dynamic_array(data),
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2015 Intel Mobile Communications GmbH
|
||||
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH
|
||||
* Copyright(c) 2018 Intel Corporation
|
||||
*
|
||||
* 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
|
||||
@@ -13,10 +14,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
@@ -75,13 +72,18 @@ TRACE_EVENT(iwlwifi_dev_rx,
|
||||
TP_STRUCT__entry(
|
||||
DEV_ENTRY
|
||||
__field(u16, cmd)
|
||||
__dynamic_array(u8, rxbuf, iwl_rx_trace_len(trans, pkt, len))
|
||||
__field(u8, hdr_offset)
|
||||
__dynamic_array(u8, rxbuf,
|
||||
iwl_rx_trace_len(trans, pkt, len, NULL))
|
||||
),
|
||||
TP_fast_assign(
|
||||
size_t hdr_offset = 0;
|
||||
|
||||
DEV_ASSIGN;
|
||||
__entry->cmd = WIDE_ID(pkt->hdr.group_id, pkt->hdr.cmd);
|
||||
memcpy(__get_dynamic_array(rxbuf), pkt,
|
||||
iwl_rx_trace_len(trans, pkt, len));
|
||||
iwl_rx_trace_len(trans, pkt, len, &hdr_offset));
|
||||
__entry->hdr_offset = hdr_offset;
|
||||
),
|
||||
TP_printk("[%s] RX cmd %#.2x",
|
||||
__get_str(dev), __entry->cmd)
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(C) 2016 Intel Deutschland GmbH
|
||||
* Copyright(C) 2016 Intel Deutschland GmbH
|
||||
* Copyright(c) 2018 Intel Corporation
|
||||
*
|
||||
* 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
|
||||
@@ -12,10 +13,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
@@ -60,16 +57,23 @@ static inline bool iwl_trace_data(struct sk_buff *skb)
|
||||
}
|
||||
|
||||
static inline size_t iwl_rx_trace_len(const struct iwl_trans *trans,
|
||||
void *rxbuf, size_t len)
|
||||
void *rxbuf, size_t len,
|
||||
size_t *out_hdr_offset)
|
||||
{
|
||||
struct iwl_cmd_header *cmd = (void *)((u8 *)rxbuf + sizeof(__le32));
|
||||
struct ieee80211_hdr *hdr;
|
||||
struct ieee80211_hdr *hdr = NULL;
|
||||
size_t hdr_offset;
|
||||
|
||||
if (cmd->cmd != trans->rx_mpdu_cmd)
|
||||
return len;
|
||||
|
||||
hdr = (void *)((u8 *)cmd + sizeof(struct iwl_cmd_header) +
|
||||
trans->rx_mpdu_cmd_hdr_size);
|
||||
hdr_offset = sizeof(struct iwl_cmd_header) +
|
||||
trans->rx_mpdu_cmd_hdr_size;
|
||||
|
||||
if (out_hdr_offset)
|
||||
*out_hdr_offset = hdr_offset;
|
||||
|
||||
hdr = (void *)((u8 *)cmd + hdr_offset);
|
||||
if (!ieee80211_is_data(hdr->frame_control))
|
||||
return len;
|
||||
/* maybe try to identify EAPOL frames? */
|
||||
|
||||
@@ -18,11 +18,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
@@ -1065,30 +1060,15 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
|
||||
case IWL_UCODE_TLV_FW_MEM_SEG: {
|
||||
struct iwl_fw_dbg_mem_seg_tlv *dbg_mem =
|
||||
(void *)tlv_data;
|
||||
u32 type;
|
||||
size_t size;
|
||||
struct iwl_fw_dbg_mem_seg_tlv *n;
|
||||
|
||||
if (tlv_len != (sizeof(*dbg_mem)))
|
||||
goto invalid_tlv_len;
|
||||
|
||||
type = le32_to_cpu(dbg_mem->data_type);
|
||||
|
||||
IWL_DEBUG_INFO(drv, "Found debug memory segment: %u\n",
|
||||
dbg_mem->data_type);
|
||||
|
||||
switch (type & FW_DBG_MEM_TYPE_MASK) {
|
||||
case FW_DBG_MEM_TYPE_REGULAR:
|
||||
case FW_DBG_MEM_TYPE_PRPH:
|
||||
/* we know how to handle these */
|
||||
break;
|
||||
default:
|
||||
IWL_ERR(drv,
|
||||
"Found debug memory segment with invalid type: 0x%x\n",
|
||||
type);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
size = sizeof(*pieces->dbg_mem_tlv) *
|
||||
(pieces->n_dbg_mem_tlv + 1);
|
||||
n = krealloc(pieces->dbg_mem_tlv, size, GFP_KERNEL);
|
||||
@@ -1275,8 +1255,8 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
|
||||
fw->ucode_capa.standard_phy_calibration_size =
|
||||
IWL_DEFAULT_STANDARD_PHY_CALIBRATE_TBL_SIZE;
|
||||
fw->ucode_capa.n_scan_channels = IWL_DEFAULT_SCAN_CHANNELS;
|
||||
/* dump all fw memory areas by default */
|
||||
fw->dbg_dump_mask = 0xffffffff;
|
||||
/* dump all fw memory areas by default except d3 debug data */
|
||||
fw->dbg_dump_mask = 0xfffdffff;
|
||||
|
||||
pieces = kzalloc(sizeof(*pieces), GFP_KERNEL);
|
||||
if (!pieces)
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -18,9 +18,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program;
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
@@ -745,7 +742,9 @@ void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg,
|
||||
else
|
||||
rx_chains = hweight8(rx_chains);
|
||||
|
||||
if (!(data->sku_cap_11n_enable) || !cfg->ht_params) {
|
||||
if (!(data->sku_cap_11n_enable) ||
|
||||
(iwlwifi_mod_params.disable_11n & IWL_DISABLE_HT_ALL) ||
|
||||
!cfg->ht_params) {
|
||||
ht_info->ht_supported = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -16,11 +16,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -18,9 +18,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program.
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
@@ -68,6 +65,8 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/bitfield.h>
|
||||
|
||||
#include "iwl-trans.h"
|
||||
|
||||
/****************************/
|
||||
/* Flow Handler Definitions */
|
||||
/****************************/
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
|
||||
@@ -17,9 +17,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program;
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -19,11 +19,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -18,11 +18,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
* Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
|
||||
* Copyright(c) 2015 Intel Deutschland GmbH
|
||||
* Copyright(c) 2018 Intel Corporation
|
||||
*
|
||||
* 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,11 +19,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
@@ -35,6 +31,7 @@
|
||||
* Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
|
||||
* Copyright(c) 2015 Intel Deutschland GmbH
|
||||
* Copyright(c) 2018 Intel Corporation
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -16,11 +16,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -18,11 +18,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -16,11 +16,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -18,11 +18,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
@@ -269,6 +264,7 @@ struct iwl_rx_cmd_buffer {
|
||||
bool _page_stolen;
|
||||
u32 _rx_page_order;
|
||||
unsigned int truesize;
|
||||
u8 status;
|
||||
};
|
||||
|
||||
static inline void *rxb_addr(struct iwl_rx_cmd_buffer *r)
|
||||
@@ -538,9 +534,6 @@ struct iwl_trans_rxq_dma_data {
|
||||
* @dump_data: return a vmalloc'ed buffer with debug data, maybe containing last
|
||||
* TX'ed commands and similar. The buffer will be vfree'd by the caller.
|
||||
* Note that the transport must fill in the proper file headers.
|
||||
* @dump_regs: dump using IWL_ERR configuration space and memory mapped
|
||||
* registers of the device to diagnose failure, e.g., when HW becomes
|
||||
* inaccessible.
|
||||
*/
|
||||
struct iwl_trans_ops {
|
||||
|
||||
@@ -569,7 +562,7 @@ struct iwl_trans_ops {
|
||||
bool configure_scd);
|
||||
/* 22000 functions */
|
||||
int (*txq_alloc)(struct iwl_trans *trans,
|
||||
struct iwl_tx_queue_cfg_cmd *cmd,
|
||||
__le16 flags, u8 sta_id, u8 tid,
|
||||
int cmd_id, int size,
|
||||
unsigned int queue_wdg_timeout);
|
||||
void (*txq_free)(struct iwl_trans *trans, int queue);
|
||||
@@ -611,8 +604,6 @@ struct iwl_trans_ops {
|
||||
struct iwl_trans_dump_data *(*dump_data)(struct iwl_trans *trans,
|
||||
const struct iwl_fw_dbg_trigger_tlv
|
||||
*trigger);
|
||||
|
||||
void (*dump_regs)(struct iwl_trans *trans);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -897,12 +888,6 @@ iwl_trans_dump_data(struct iwl_trans *trans,
|
||||
return trans->ops->dump_data(trans, trigger);
|
||||
}
|
||||
|
||||
static inline void iwl_trans_dump_regs(struct iwl_trans *trans)
|
||||
{
|
||||
if (trans->ops->dump_regs)
|
||||
trans->ops->dump_regs(trans);
|
||||
}
|
||||
|
||||
static inline struct iwl_device_cmd *
|
||||
iwl_trans_alloc_tx_cmd(struct iwl_trans *trans)
|
||||
{
|
||||
@@ -985,7 +970,7 @@ iwl_trans_txq_free(struct iwl_trans *trans, int queue)
|
||||
|
||||
static inline int
|
||||
iwl_trans_txq_alloc(struct iwl_trans *trans,
|
||||
struct iwl_tx_queue_cfg_cmd *cmd,
|
||||
__le16 flags, u8 sta_id, u8 tid,
|
||||
int cmd_id, int size,
|
||||
unsigned int wdg_timeout)
|
||||
{
|
||||
@@ -999,7 +984,8 @@ iwl_trans_txq_alloc(struct iwl_trans *trans,
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
return trans->ops->txq_alloc(trans, cmd, cmd_id, size, wdg_timeout);
|
||||
return trans->ops->txq_alloc(trans, flags, sta_id, tid,
|
||||
cmd_id, size, wdg_timeout);
|
||||
}
|
||||
|
||||
static inline void iwl_trans_txq_set_shared_mode(struct iwl_trans *trans,
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
@@ -331,7 +326,7 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
|
||||
struct ieee80211_chanctx_conf *chanctx_conf;
|
||||
/* default smps_mode is AUTOMATIC - only used for client modes */
|
||||
enum ieee80211_smps_mode smps_mode = IEEE80211_SMPS_AUTOMATIC;
|
||||
u32 bt_activity_grading;
|
||||
u32 bt_activity_grading, min_ag_for_static_smps;
|
||||
int ave_rssi;
|
||||
|
||||
lockdep_assert_held(&mvm->mutex);
|
||||
@@ -363,8 +358,13 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
|
||||
return;
|
||||
}
|
||||
|
||||
if (fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_COEX_SCHEMA_2))
|
||||
min_ag_for_static_smps = BT_VERY_HIGH_TRAFFIC;
|
||||
else
|
||||
min_ag_for_static_smps = BT_HIGH_TRAFFIC;
|
||||
|
||||
bt_activity_grading = le32_to_cpu(data->notif->bt_activity_grading);
|
||||
if (bt_activity_grading >= BT_HIGH_TRAFFIC)
|
||||
if (bt_activity_grading >= min_ag_for_static_smps)
|
||||
smps_mode = IEEE80211_SMPS_STATIC;
|
||||
else if (bt_activity_grading >= BT_LOW_TRAFFIC)
|
||||
smps_mode = IEEE80211_SMPS_DYNAMIC;
|
||||
|
||||
@@ -18,11 +18,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -1042,7 +1042,7 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
|
||||
* the recording automatically before entering D3. This can
|
||||
* be removed once the FW starts doing that.
|
||||
*/
|
||||
iwl_fw_dbg_stop_recording(&mvm->fwrt);
|
||||
iwl_fw_dbg_stop_recording(mvm->fwrt.trans);
|
||||
|
||||
/* must be last -- this switches firmware state */
|
||||
ret = iwl_mvm_send_cmd(mvm, &d3_cfg_cmd);
|
||||
@@ -1362,7 +1362,7 @@ static void iwl_mvm_set_key_rx_seq(struct iwl_mvm *mvm,
|
||||
struct ieee80211_key_conf *key,
|
||||
struct iwl_wowlan_status *status)
|
||||
{
|
||||
union iwl_all_tsc_rsc *rsc = &status->gtk.rsc.all_tsc_rsc;
|
||||
union iwl_all_tsc_rsc *rsc = &status->gtk[0].rsc.all_tsc_rsc;
|
||||
|
||||
switch (key->cipher) {
|
||||
case WLAN_CIPHER_SUITE_CCMP:
|
||||
@@ -1419,7 +1419,8 @@ static void iwl_mvm_d3_update_keys(struct ieee80211_hw *hw,
|
||||
*/
|
||||
if (sta) {
|
||||
struct ieee80211_key_seq seq = {};
|
||||
union iwl_all_tsc_rsc *sc = &data->status->gtk.rsc.all_tsc_rsc;
|
||||
union iwl_all_tsc_rsc *sc =
|
||||
&data->status->gtk[0].rsc.all_tsc_rsc;
|
||||
|
||||
if (data->find_phase)
|
||||
return;
|
||||
@@ -1501,22 +1502,24 @@ static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm,
|
||||
u8 key[32];
|
||||
} conf = {
|
||||
.conf.cipher = gtkdata.cipher,
|
||||
.conf.keyidx = status->gtk.key_index,
|
||||
.conf.keyidx =
|
||||
iwlmvm_wowlan_gtk_idx(&status->gtk[0]),
|
||||
};
|
||||
__be64 replay_ctr;
|
||||
|
||||
switch (gtkdata.cipher) {
|
||||
case WLAN_CIPHER_SUITE_CCMP:
|
||||
conf.conf.keylen = WLAN_KEY_LEN_CCMP;
|
||||
memcpy(conf.conf.key, status->gtk.decrypt_key,
|
||||
memcpy(conf.conf.key, status->gtk[0].key,
|
||||
WLAN_KEY_LEN_CCMP);
|
||||
break;
|
||||
case WLAN_CIPHER_SUITE_TKIP:
|
||||
conf.conf.keylen = WLAN_KEY_LEN_TKIP;
|
||||
memcpy(conf.conf.key, status->gtk.decrypt_key, 16);
|
||||
memcpy(conf.conf.key, status->gtk[0].key, 16);
|
||||
/* leave TX MIC key zeroed, we don't use it anyway */
|
||||
memcpy(conf.conf.key +
|
||||
NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY,
|
||||
status->gtk.tkip_mic_key, 8);
|
||||
status->gtk[0].tkip_mic_key, 8);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1524,11 +1527,10 @@ static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm,
|
||||
if (IS_ERR(key))
|
||||
return false;
|
||||
iwl_mvm_set_key_rx_seq(mvm, key, status);
|
||||
}
|
||||
|
||||
if (status->num_of_gtk_rekeys) {
|
||||
__be64 replay_ctr =
|
||||
replay_ctr =
|
||||
cpu_to_be64(le64_to_cpu(status->replay_ctr));
|
||||
|
||||
ieee80211_gtk_rekey_notify(vif, vif->bss_conf.bssid,
|
||||
(void *)&replay_ctr, GFP_KERNEL);
|
||||
}
|
||||
@@ -1541,6 +1543,107 @@ static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm,
|
||||
return true;
|
||||
}
|
||||
|
||||
struct iwl_wowlan_status *iwl_mvm_send_wowlan_get_status(struct iwl_mvm *mvm)
|
||||
{
|
||||
struct iwl_wowlan_status *v7, *status;
|
||||
struct iwl_host_cmd cmd = {
|
||||
.id = WOWLAN_GET_STATUSES,
|
||||
.flags = CMD_WANT_SKB,
|
||||
};
|
||||
int ret, len, status_size;
|
||||
|
||||
lockdep_assert_held(&mvm->mutex);
|
||||
|
||||
ret = iwl_mvm_send_cmd(mvm, &cmd);
|
||||
if (ret) {
|
||||
IWL_ERR(mvm, "failed to query wakeup status (%d)\n", ret);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
if (!fw_has_api(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_API_WOWLAN_KEY_MATERIAL)) {
|
||||
struct iwl_wowlan_status_v6 *v6 = (void *)cmd.resp_pkt->data;
|
||||
int data_size;
|
||||
|
||||
status_size = sizeof(*v6);
|
||||
len = iwl_rx_packet_payload_len(cmd.resp_pkt);
|
||||
|
||||
if (len < status_size) {
|
||||
IWL_ERR(mvm, "Invalid WoWLAN status response!\n");
|
||||
status = ERR_PTR(-EIO);
|
||||
goto out_free_resp;
|
||||
}
|
||||
|
||||
data_size = ALIGN(le32_to_cpu(v6->wake_packet_bufsize), 4);
|
||||
|
||||
if (len != (status_size + data_size)) {
|
||||
IWL_ERR(mvm, "Invalid WoWLAN status response!\n");
|
||||
status = ERR_PTR(-EIO);
|
||||
goto out_free_resp;
|
||||
}
|
||||
|
||||
status = kzalloc(sizeof(*status) + data_size, GFP_KERNEL);
|
||||
if (!status)
|
||||
goto out_free_resp;
|
||||
|
||||
BUILD_BUG_ON(sizeof(v6->gtk.decrypt_key) >
|
||||
sizeof(status->gtk[0].key));
|
||||
BUILD_BUG_ON(sizeof(v6->gtk.tkip_mic_key) >
|
||||
sizeof(status->gtk[0].tkip_mic_key));
|
||||
|
||||
/* copy GTK info to the right place */
|
||||
memcpy(status->gtk[0].key, v6->gtk.decrypt_key,
|
||||
sizeof(v6->gtk.decrypt_key));
|
||||
memcpy(status->gtk[0].tkip_mic_key, v6->gtk.tkip_mic_key,
|
||||
sizeof(v6->gtk.tkip_mic_key));
|
||||
memcpy(&status->gtk[0].rsc, &v6->gtk.rsc,
|
||||
sizeof(status->gtk[0].rsc));
|
||||
|
||||
/* hardcode the key length to 16 since v6 only supports 16 */
|
||||
status->gtk[0].key_len = 16;
|
||||
|
||||
/*
|
||||
* The key index only uses 2 bits (values 0 to 3) and
|
||||
* we always set bit 7 which means this is the
|
||||
* currently used key.
|
||||
*/
|
||||
status->gtk[0].key_flags = v6->gtk.key_index | BIT(7);
|
||||
|
||||
status->replay_ctr = v6->replay_ctr;
|
||||
|
||||
/* everything starting from pattern_number is identical */
|
||||
memcpy(&status->pattern_number, &v6->pattern_number,
|
||||
offsetof(struct iwl_wowlan_status, wake_packet) -
|
||||
offsetof(struct iwl_wowlan_status, pattern_number) +
|
||||
data_size);
|
||||
|
||||
goto out_free_resp;
|
||||
}
|
||||
|
||||
v7 = (void *)cmd.resp_pkt->data;
|
||||
status_size = sizeof(*v7);
|
||||
len = iwl_rx_packet_payload_len(cmd.resp_pkt);
|
||||
|
||||
if (len < status_size) {
|
||||
IWL_ERR(mvm, "Invalid WoWLAN status response!\n");
|
||||
status = ERR_PTR(-EIO);
|
||||
goto out_free_resp;
|
||||
}
|
||||
|
||||
if (len != (status_size +
|
||||
ALIGN(le32_to_cpu(v7->wake_packet_bufsize), 4))) {
|
||||
IWL_ERR(mvm, "Invalid WoWLAN status response!\n");
|
||||
status = ERR_PTR(-EIO);
|
||||
goto out_free_resp;
|
||||
}
|
||||
|
||||
status = kmemdup(v7, len, GFP_KERNEL);
|
||||
|
||||
out_free_resp:
|
||||
iwl_free_resp(&cmd);
|
||||
return status;
|
||||
}
|
||||
|
||||
static struct iwl_wowlan_status *
|
||||
iwl_mvm_get_wakeup_status(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||
{
|
||||
@@ -1550,12 +1653,7 @@ iwl_mvm_get_wakeup_status(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||
u32 valid;
|
||||
u32 error_id;
|
||||
} err_info;
|
||||
struct iwl_host_cmd cmd = {
|
||||
.id = WOWLAN_GET_STATUSES,
|
||||
.flags = CMD_WANT_SKB,
|
||||
};
|
||||
struct iwl_wowlan_status *status, *fw_status;
|
||||
int ret, len, status_size;
|
||||
int ret;
|
||||
|
||||
iwl_trans_read_mem_bytes(mvm->trans, base,
|
||||
&err_info, sizeof(err_info));
|
||||
@@ -1578,34 +1676,7 @@ iwl_mvm_get_wakeup_status(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||
if (ret)
|
||||
IWL_ERR(mvm, "failed to query offload statistics (%d)\n", ret);
|
||||
|
||||
ret = iwl_mvm_send_cmd(mvm, &cmd);
|
||||
if (ret) {
|
||||
IWL_ERR(mvm, "failed to query status (%d)\n", ret);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
status_size = sizeof(*fw_status);
|
||||
|
||||
len = iwl_rx_packet_payload_len(cmd.resp_pkt);
|
||||
if (len < status_size) {
|
||||
IWL_ERR(mvm, "Invalid WoWLAN status response!\n");
|
||||
fw_status = ERR_PTR(-EIO);
|
||||
goto out_free_resp;
|
||||
}
|
||||
|
||||
status = (void *)cmd.resp_pkt->data;
|
||||
if (len != (status_size +
|
||||
ALIGN(le32_to_cpu(status->wake_packet_bufsize), 4))) {
|
||||
IWL_ERR(mvm, "Invalid WoWLAN status response!\n");
|
||||
fw_status = ERR_PTR(-EIO);
|
||||
goto out_free_resp;
|
||||
}
|
||||
|
||||
fw_status = kmemdup(status, len, GFP_KERNEL);
|
||||
|
||||
out_free_resp:
|
||||
iwl_free_resp(&cmd);
|
||||
return fw_status;
|
||||
return iwl_mvm_send_wowlan_get_status(mvm);
|
||||
}
|
||||
|
||||
/* releases the MVM mutex */
|
||||
@@ -1883,6 +1954,7 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)
|
||||
goto err;
|
||||
}
|
||||
|
||||
iwl_fw_dbg_read_d3_debug_data(&mvm->fwrt);
|
||||
/* query SRAM first in case we want event logging */
|
||||
iwl_mvm_read_d3_sram(mvm);
|
||||
|
||||
@@ -2117,6 +2189,8 @@ static int iwl_mvm_d3_test_release(struct inode *inode, struct file *file)
|
||||
|
||||
mvm->d3_test_active = false;
|
||||
|
||||
iwl_fw_dbg_read_d3_debug_data(&mvm->fwrt);
|
||||
|
||||
rtnl_lock();
|
||||
__iwl_mvm_resume(mvm, true);
|
||||
rtnl_unlock();
|
||||
|
||||
@@ -18,11 +18,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -19,11 +19,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -18,11 +18,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -19,11 +19,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
@@ -773,19 +768,28 @@ static int iwl_mvm_sar_get_wgds_table(struct iwl_mvm *mvm)
|
||||
|
||||
int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b)
|
||||
{
|
||||
struct iwl_dev_tx_power_cmd cmd = {
|
||||
.v3.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_CHAINS),
|
||||
};
|
||||
union {
|
||||
struct iwl_dev_tx_power_cmd v5;
|
||||
struct iwl_dev_tx_power_cmd_v4 v4;
|
||||
} cmd;
|
||||
int i, j, idx;
|
||||
int profs[ACPI_SAR_NUM_CHAIN_LIMITS] = { prof_a, prof_b };
|
||||
int len = sizeof(cmd);
|
||||
int len;
|
||||
|
||||
BUILD_BUG_ON(ACPI_SAR_NUM_CHAIN_LIMITS < 2);
|
||||
BUILD_BUG_ON(ACPI_SAR_NUM_CHAIN_LIMITS * ACPI_SAR_NUM_SUB_BANDS !=
|
||||
ACPI_SAR_TABLE_SIZE);
|
||||
|
||||
if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_TX_POWER_ACK))
|
||||
len = sizeof(cmd.v3);
|
||||
cmd.v5.v3.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_CHAINS);
|
||||
|
||||
if (fw_has_api(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_API_REDUCE_TX_POWER))
|
||||
len = sizeof(cmd.v5);
|
||||
else if (fw_has_capa(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_TX_POWER_ACK))
|
||||
len = sizeof(cmd.v4);
|
||||
else
|
||||
len = sizeof(cmd.v4.v3);
|
||||
|
||||
for (i = 0; i < ACPI_SAR_NUM_CHAIN_LIMITS; i++) {
|
||||
struct iwl_mvm_sar_profile *prof;
|
||||
@@ -812,7 +816,7 @@ int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b)
|
||||
IWL_DEBUG_RADIO(mvm, " Chain[%d]:\n", i);
|
||||
for (j = 0; j < ACPI_SAR_NUM_SUB_BANDS; j++) {
|
||||
idx = (i * ACPI_SAR_NUM_SUB_BANDS) + j;
|
||||
cmd.v3.per_chain_restriction[i][j] =
|
||||
cmd.v5.v3.per_chain_restriction[i][j] =
|
||||
cpu_to_le16(prof->table[idx]);
|
||||
IWL_DEBUG_RADIO(mvm, " Band[%d] = %d * .125dBm\n",
|
||||
j, prof->table[idx]);
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -8,6 +8,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
|
||||
* Copyright(c) 2018 Intel Corporation
|
||||
*
|
||||
* 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,11 +19,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
@@ -35,6 +31,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
|
||||
* Copyright(c) 2018 Intel Corporation
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -1568,6 +1565,65 @@ void iwl_mvm_rx_stored_beacon_notif(struct iwl_mvm *mvm,
|
||||
ieee80211_rx_napi(mvm->hw, NULL, skb, NULL);
|
||||
}
|
||||
|
||||
static void iwl_mvm_probe_resp_data_iter(void *_data, u8 *mac,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct iwl_probe_resp_data_notif *notif = _data;
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
struct iwl_probe_resp_data *old_data, *new_data;
|
||||
|
||||
if (mvmvif->id != (u16)le32_to_cpu(notif->mac_id))
|
||||
return;
|
||||
|
||||
new_data = kzalloc(sizeof(*new_data), GFP_KERNEL);
|
||||
if (!new_data)
|
||||
return;
|
||||
|
||||
memcpy(&new_data->notif, notif, sizeof(new_data->notif));
|
||||
|
||||
/* noa_attr contains 1 reserved byte, need to substruct it */
|
||||
new_data->noa_len = sizeof(struct ieee80211_vendor_ie) +
|
||||
sizeof(new_data->notif.noa_attr) - 1;
|
||||
|
||||
/*
|
||||
* If it's a one time NoA, only one descriptor is needed,
|
||||
* adjust the length according to len_low.
|
||||
*/
|
||||
if (new_data->notif.noa_attr.len_low ==
|
||||
sizeof(struct ieee80211_p2p_noa_desc) + 2)
|
||||
new_data->noa_len -= sizeof(struct ieee80211_p2p_noa_desc);
|
||||
|
||||
old_data = rcu_dereference_protected(mvmvif->probe_resp_data,
|
||||
lockdep_is_held(&mvmvif->mvm->mutex));
|
||||
rcu_assign_pointer(mvmvif->probe_resp_data, new_data);
|
||||
|
||||
if (old_data)
|
||||
kfree_rcu(old_data, rcu_head);
|
||||
|
||||
if (notif->csa_counter != IWL_PROBE_RESP_DATA_NO_CSA &&
|
||||
notif->csa_counter >= 1)
|
||||
ieee80211_csa_set_counter(vif, notif->csa_counter);
|
||||
}
|
||||
|
||||
void iwl_mvm_probe_resp_data_notif(struct iwl_mvm *mvm,
|
||||
struct iwl_rx_cmd_buffer *rxb)
|
||||
{
|
||||
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
||||
struct iwl_probe_resp_data_notif *notif = (void *)pkt->data;
|
||||
int len = iwl_rx_packet_payload_len(pkt);
|
||||
|
||||
if (WARN_ON_ONCE(len < sizeof(*notif)))
|
||||
return;
|
||||
|
||||
IWL_DEBUG_INFO(mvm, "Probe response data notif: noa %d, csa %d\n",
|
||||
notif->noa_active, notif->csa_counter);
|
||||
|
||||
ieee80211_iterate_active_interfaces(mvm->hw,
|
||||
IEEE80211_IFACE_ITER_ACTIVE,
|
||||
iwl_mvm_probe_resp_data_iter,
|
||||
notif);
|
||||
}
|
||||
|
||||
void iwl_mvm_channel_switch_noa_notif(struct iwl_mvm *mvm,
|
||||
struct iwl_rx_cmd_buffer *rxb)
|
||||
{
|
||||
|
||||
@@ -19,11 +19,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
@@ -1035,6 +1030,7 @@ static void iwl_mvm_cleanup_iterator(void *data, u8 *mac,
|
||||
|
||||
mvmvif->phy_ctxt = NULL;
|
||||
memset(&mvmvif->bf_data, 0, sizeof(mvmvif->bf_data));
|
||||
memset(&mvmvif->probe_resp_data, 0, sizeof(mvmvif->probe_resp_data));
|
||||
}
|
||||
|
||||
static void iwl_mvm_restart_cleanup(struct iwl_mvm *mvm)
|
||||
@@ -1124,7 +1120,9 @@ int __iwl_mvm_mac_start(struct iwl_mvm *mvm)
|
||||
* would do.
|
||||
*/
|
||||
clear_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status);
|
||||
#ifdef CONFIG_PM
|
||||
iwl_mvm_d0i3_enable_tx(mvm, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -1162,7 +1160,9 @@ static void iwl_mvm_restart_complete(struct iwl_mvm *mvm)
|
||||
mutex_lock(&mvm->mutex);
|
||||
|
||||
clear_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status);
|
||||
#ifdef CONFIG_PM
|
||||
iwl_mvm_d0i3_enable_tx(mvm, NULL);
|
||||
#endif
|
||||
ret = iwl_mvm_update_quotas(mvm, true, NULL);
|
||||
if (ret)
|
||||
IWL_ERR(mvm, "Failed to update quotas after restart (%d)\n",
|
||||
@@ -1308,19 +1308,28 @@ static struct iwl_mvm_phy_ctxt *iwl_mvm_get_free_phy_ctxt(struct iwl_mvm *mvm)
|
||||
static int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
s16 tx_power)
|
||||
{
|
||||
struct iwl_dev_tx_power_cmd cmd = {
|
||||
.v3.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_MAC),
|
||||
.v3.mac_context_id =
|
||||
int len;
|
||||
union {
|
||||
struct iwl_dev_tx_power_cmd v5;
|
||||
struct iwl_dev_tx_power_cmd_v4 v4;
|
||||
} cmd = {
|
||||
.v5.v3.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_MAC),
|
||||
.v5.v3.mac_context_id =
|
||||
cpu_to_le32(iwl_mvm_vif_from_mac80211(vif)->id),
|
||||
.v3.pwr_restriction = cpu_to_le16(8 * tx_power),
|
||||
.v5.v3.pwr_restriction = cpu_to_le16(8 * tx_power),
|
||||
};
|
||||
int len = sizeof(cmd);
|
||||
|
||||
if (tx_power == IWL_DEFAULT_MAX_TX_POWER)
|
||||
cmd.v3.pwr_restriction = cpu_to_le16(IWL_DEV_MAX_TX_POWER);
|
||||
cmd.v5.v3.pwr_restriction = cpu_to_le16(IWL_DEV_MAX_TX_POWER);
|
||||
|
||||
if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_TX_POWER_ACK))
|
||||
len = sizeof(cmd.v3);
|
||||
if (fw_has_api(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_API_REDUCE_TX_POWER))
|
||||
len = sizeof(cmd.v5);
|
||||
else if (fw_has_capa(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_TX_POWER_ACK))
|
||||
len = sizeof(cmd.v4);
|
||||
else
|
||||
len = sizeof(cmd.v4.v3);
|
||||
|
||||
return iwl_mvm_send_cmd_pdu(mvm, REDUCE_TX_POWER_CMD, 0, len, &cmd);
|
||||
}
|
||||
@@ -1333,6 +1342,7 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
|
||||
int ret;
|
||||
|
||||
mvmvif->mvm = mvm;
|
||||
RCU_INIT_POINTER(mvmvif->probe_resp_data, NULL);
|
||||
|
||||
/*
|
||||
* make sure D0i3 exit is completed, otherwise a target access
|
||||
@@ -1497,6 +1507,7 @@ static void iwl_mvm_mac_remove_interface(struct ieee80211_hw *hw,
|
||||
{
|
||||
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
struct iwl_probe_resp_data *probe_data;
|
||||
|
||||
iwl_mvm_prepare_mac_removal(mvm, vif);
|
||||
|
||||
@@ -1506,6 +1517,12 @@ static void iwl_mvm_mac_remove_interface(struct ieee80211_hw *hw,
|
||||
|
||||
mutex_lock(&mvm->mutex);
|
||||
|
||||
probe_data = rcu_dereference_protected(mvmvif->probe_resp_data,
|
||||
lockdep_is_held(&mvm->mutex));
|
||||
RCU_INIT_POINTER(mvmvif->probe_resp_data, NULL);
|
||||
if (probe_data)
|
||||
kfree_rcu(probe_data, rcu_head);
|
||||
|
||||
if (mvm->bf_allowed_vif == mvmvif) {
|
||||
mvm->bf_allowed_vif = NULL;
|
||||
vif->driver_flags &= ~(IEEE80211_VIF_BEACON_FILTER |
|
||||
@@ -2931,7 +2948,8 @@ static int iwl_mvm_mac_sta_state(struct ieee80211_hw *hw,
|
||||
iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL);
|
||||
}
|
||||
|
||||
iwl_mvm_rs_rate_init(mvm, sta, mvmvif->phy_ctxt->channel->band);
|
||||
iwl_mvm_rs_rate_init(mvm, sta, mvmvif->phy_ctxt->channel->band,
|
||||
false);
|
||||
ret = iwl_mvm_update_sta(mvm, vif, sta);
|
||||
} else if (old_state == IEEE80211_STA_ASSOC &&
|
||||
new_state == IEEE80211_STA_AUTHORIZED) {
|
||||
@@ -2947,7 +2965,8 @@ static int iwl_mvm_mac_sta_state(struct ieee80211_hw *hw,
|
||||
/* enable beacon filtering */
|
||||
WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif, 0));
|
||||
|
||||
iwl_mvm_rs_rate_init(mvm, sta, mvmvif->phy_ctxt->channel->band);
|
||||
iwl_mvm_rs_rate_init(mvm, sta, mvmvif->phy_ctxt->channel->band,
|
||||
true);
|
||||
|
||||
ret = 0;
|
||||
} else if (old_state == IEEE80211_STA_AUTHORIZED &&
|
||||
|
||||
@@ -19,11 +19,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
@@ -335,6 +330,18 @@ struct iwl_mvm_vif_bf_data {
|
||||
int last_bt_coex_event;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iwl_probe_resp_data - data for NoA/CSA updates
|
||||
* @rcu_head: used for freeing the data on update
|
||||
* @notif: notification data
|
||||
* @noa_len: length of NoA attribute, calculated from the notification
|
||||
*/
|
||||
struct iwl_probe_resp_data {
|
||||
struct rcu_head rcu_head;
|
||||
struct iwl_probe_resp_data_notif notif;
|
||||
int noa_len;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iwl_mvm_vif - data per Virtual Interface, it is a MAC context
|
||||
* @id: between 0 and 3
|
||||
@@ -365,6 +372,8 @@ struct iwl_mvm_vif_bf_data {
|
||||
* average signal of beacons retrieved from the firmware
|
||||
* @csa_failed: CSA failed to schedule time event, report an error later
|
||||
* @features: hw features active for this vif
|
||||
* @probe_resp_data: data from FW notification to store NOA and CSA related
|
||||
* data to be inserted into probe response.
|
||||
*/
|
||||
struct iwl_mvm_vif {
|
||||
struct iwl_mvm *mvm;
|
||||
@@ -460,6 +469,8 @@ struct iwl_mvm_vif {
|
||||
|
||||
/* TCP Checksum Offload */
|
||||
netdev_features_t features;
|
||||
|
||||
struct iwl_probe_resp_data __rcu *probe_resp_data;
|
||||
};
|
||||
|
||||
static inline struct iwl_mvm_vif *
|
||||
@@ -1229,6 +1240,11 @@ static inline bool iwl_mvm_is_oce_supported(struct iwl_mvm *mvm)
|
||||
return fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_OCE);
|
||||
}
|
||||
|
||||
static inline bool iwl_mvm_is_frag_ebs_supported(struct iwl_mvm *mvm)
|
||||
{
|
||||
return fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_FRAG_EBS);
|
||||
}
|
||||
|
||||
static inline bool iwl_mvm_enter_d0i3_on_suspend(struct iwl_mvm *mvm)
|
||||
{
|
||||
/* For now we only use this mode to differentiate between
|
||||
@@ -1602,6 +1618,8 @@ void iwl_mvm_mac_ctxt_recalc_tsf_id(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif);
|
||||
unsigned long iwl_mvm_get_used_hw_queues(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *exclude_vif);
|
||||
void iwl_mvm_probe_resp_data_notif(struct iwl_mvm *mvm,
|
||||
struct iwl_rx_cmd_buffer *rxb);
|
||||
void iwl_mvm_channel_switch_noa_notif(struct iwl_mvm *mvm,
|
||||
struct iwl_rx_cmd_buffer *rxb);
|
||||
/* Bindings */
|
||||
@@ -1685,7 +1703,7 @@ iwl_mvm_vif_dbgfs_clean(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||
#endif /* CONFIG_IWLWIFI_DEBUGFS */
|
||||
|
||||
/* rate scaling */
|
||||
int iwl_mvm_send_lq_cmd(struct iwl_mvm *mvm, struct iwl_lq_cmd *lq, bool init);
|
||||
int iwl_mvm_send_lq_cmd(struct iwl_mvm *mvm, struct iwl_lq_cmd *lq, bool sync);
|
||||
void iwl_mvm_update_frame_stats(struct iwl_mvm *mvm, u32 rate, bool agg);
|
||||
int rs_pretty_print_rate(char *buf, int bufsz, const u32 rate);
|
||||
void rs_update_last_rssi(struct iwl_mvm *mvm,
|
||||
@@ -1733,6 +1751,7 @@ void iwl_mvm_ipv6_addr_change(struct ieee80211_hw *hw,
|
||||
void iwl_mvm_set_default_unicast_key(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif, int idx);
|
||||
extern const struct file_operations iwl_dbgfs_d3_test_ops;
|
||||
struct iwl_wowlan_status *iwl_mvm_send_wowlan_get_status(struct iwl_mvm *mvm);
|
||||
#ifdef CONFIG_PM
|
||||
int iwl_mvm_wowlan_config_key_params(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif,
|
||||
@@ -1776,10 +1795,13 @@ void iwl_mvm_ref(struct iwl_mvm *mvm, enum iwl_mvm_ref_type ref_type);
|
||||
void iwl_mvm_unref(struct iwl_mvm *mvm, enum iwl_mvm_ref_type ref_type);
|
||||
int iwl_mvm_ref_sync(struct iwl_mvm *mvm, enum iwl_mvm_ref_type ref_type);
|
||||
bool iwl_mvm_ref_taken(struct iwl_mvm *mvm);
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
void iwl_mvm_d0i3_enable_tx(struct iwl_mvm *mvm, __le16 *qos_seq);
|
||||
int iwl_mvm_enter_d0i3(struct iwl_op_mode *op_mode);
|
||||
int iwl_mvm_exit_d0i3(struct iwl_op_mode *op_mode);
|
||||
int _iwl_mvm_exit_d0i3(struct iwl_mvm *mvm);
|
||||
#endif
|
||||
|
||||
/* BT Coex */
|
||||
int iwl_mvm_send_bt_init_conf(struct iwl_mvm *mvm);
|
||||
|
||||
@@ -19,11 +19,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -18,11 +18,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
|
||||
@@ -19,11 +19,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
|
||||
* USA
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution
|
||||
* in the file called COPYING.
|
||||
*
|
||||
@@ -182,6 +177,9 @@ static void iwl_mvm_nic_config(struct iwl_op_mode *op_mode)
|
||||
if (mvm->trans->cfg->device_family < IWL_DEVICE_FAMILY_8000)
|
||||
reg_val |= CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI;
|
||||
|
||||
if (iwl_fw_dbg_is_d3_debug_enabled(&mvm->fwrt))
|
||||
reg_val |= CSR_HW_IF_CONFIG_REG_D3_DEBUG;
|
||||
|
||||
iwl_trans_set_bits_mask(mvm->trans, CSR_HW_IF_CONFIG_REG,
|
||||
CSR_HW_IF_CONFIG_REG_MSK_MAC_DASH |
|
||||
CSR_HW_IF_CONFIG_REG_MSK_MAC_STEP |
|
||||
@@ -189,7 +187,8 @@ static void iwl_mvm_nic_config(struct iwl_op_mode *op_mode)
|
||||
CSR_HW_IF_CONFIG_REG_MSK_PHY_STEP |
|
||||
CSR_HW_IF_CONFIG_REG_MSK_PHY_DASH |
|
||||
CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
|
||||
CSR_HW_IF_CONFIG_REG_BIT_MAC_SI,
|
||||
CSR_HW_IF_CONFIG_REG_BIT_MAC_SI |
|
||||
CSR_HW_IF_CONFIG_REG_D3_DEBUG,
|
||||
reg_val);
|
||||
|
||||
IWL_DEBUG_INFO(mvm, "Radio type=0x%x-0x%x-0x%x\n", radio_cfg_type,
|
||||
@@ -491,7 +490,9 @@ static const struct iwl_hcmd_arr iwl_mvm_groups[] = {
|
||||
|
||||
/* this forward declaration can avoid to export the function */
|
||||
static void iwl_mvm_async_handlers_wk(struct work_struct *wk);
|
||||
#ifdef CONFIG_PM
|
||||
static void iwl_mvm_d0i3_exit_work(struct work_struct *wk);
|
||||
#endif
|
||||
|
||||
static u32 iwl_mvm_min_backoff(struct iwl_mvm *mvm)
|
||||
{
|
||||
@@ -661,7 +662,9 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
|
||||
INIT_WORK(&mvm->async_handlers_wk, iwl_mvm_async_handlers_wk);
|
||||
INIT_WORK(&mvm->roc_done_wk, iwl_mvm_roc_done_wk);
|
||||
#ifdef CONFIG_PM
|
||||
INIT_WORK(&mvm->d0i3_exit_work, iwl_mvm_d0i3_exit_work);
|
||||
#endif
|
||||
INIT_DELAYED_WORK(&mvm->tdls_cs.dwork, iwl_mvm_tdls_ch_switch_work);
|
||||
INIT_DELAYED_WORK(&mvm->scan_timeout_dwork, iwl_mvm_scan_timeout_wk);
|
||||
INIT_WORK(&mvm->add_stream_wk, iwl_mvm_add_new_dqa_stream_wk);
|
||||
@@ -1246,7 +1249,8 @@ void iwl_mvm_nic_restart(struct iwl_mvm *mvm, bool fw_error)
|
||||
INIT_WORK(&reprobe->work, iwl_mvm_reprobe_wk);
|
||||
schedule_work(&reprobe->work);
|
||||
} else if (mvm->fwrt.cur_fw_img == IWL_UCODE_REGULAR &&
|
||||
mvm->hw_registered) {
|
||||
mvm->hw_registered &&
|
||||
!test_bit(STATUS_TRANS_DEAD, &mvm->trans->status)) {
|
||||
/* don't let the transport/FW power down */
|
||||
iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN);
|
||||
|
||||
@@ -1261,7 +1265,8 @@ static void iwl_mvm_nic_error(struct iwl_op_mode *op_mode)
|
||||
{
|
||||
struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
|
||||
|
||||
iwl_mvm_dump_nic_error_log(mvm);
|
||||
if (!test_bit(STATUS_TRANS_DEAD, &mvm->trans->status))
|
||||
iwl_mvm_dump_nic_error_log(mvm);
|
||||
|
||||
iwl_mvm_nic_restart(mvm, true);
|
||||
}
|
||||
@@ -1274,6 +1279,7 @@ static void iwl_mvm_cmd_queue_full(struct iwl_op_mode *op_mode)
|
||||
iwl_mvm_nic_restart(mvm, true);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
struct iwl_d0i3_iter_data {
|
||||
struct iwl_mvm *mvm;
|
||||
struct ieee80211_vif *connected_vif;
|
||||
@@ -1596,25 +1602,23 @@ void iwl_mvm_d0i3_enable_tx(struct iwl_mvm *mvm, __le16 *qos_seq)
|
||||
static void iwl_mvm_d0i3_exit_work(struct work_struct *wk)
|
||||
{
|
||||
struct iwl_mvm *mvm = container_of(wk, struct iwl_mvm, d0i3_exit_work);
|
||||
struct iwl_host_cmd get_status_cmd = {
|
||||
.id = WOWLAN_GET_STATUSES,
|
||||
.flags = CMD_HIGH_PRIO | CMD_WANT_SKB,
|
||||
};
|
||||
struct iwl_mvm_d0i3_exit_work_iter_data iter_data = {
|
||||
.mvm = mvm,
|
||||
};
|
||||
|
||||
struct iwl_wowlan_status *status;
|
||||
int ret;
|
||||
u32 wakeup_reasons = 0;
|
||||
__le16 *qos_seq = NULL;
|
||||
|
||||
mutex_lock(&mvm->mutex);
|
||||
ret = iwl_mvm_send_cmd(mvm, &get_status_cmd);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
status = (void *)get_status_cmd.resp_pkt->data;
|
||||
status = iwl_mvm_send_wowlan_get_status(mvm);
|
||||
if (IS_ERR_OR_NULL(status)) {
|
||||
/* set to NULL so we don't need to check before kfree'ing */
|
||||
status = NULL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
wakeup_reasons = le32_to_cpu(status->wakeup_reasons);
|
||||
qos_seq = status->qos_seq_ctr;
|
||||
|
||||
@@ -1633,8 +1637,7 @@ static void iwl_mvm_d0i3_exit_work(struct work_struct *wk)
|
||||
wakeup_reasons);
|
||||
|
||||
/* qos_seq might point inside resp_pkt, so free it only now */
|
||||
if (get_status_cmd.resp_pkt)
|
||||
iwl_free_resp(&get_status_cmd);
|
||||
kfree(status);
|
||||
|
||||
/* the FW might have updated the regdomain */
|
||||
iwl_mvm_update_changed_regdom(mvm);
|
||||
@@ -1685,6 +1688,13 @@ int iwl_mvm_exit_d0i3(struct iwl_op_mode *op_mode)
|
||||
return _iwl_mvm_exit_d0i3(mvm);
|
||||
}
|
||||
|
||||
#define IWL_MVM_D0I3_OPS \
|
||||
.enter_d0i3 = iwl_mvm_enter_d0i3, \
|
||||
.exit_d0i3 = iwl_mvm_exit_d0i3,
|
||||
#else /* CONFIG_PM */
|
||||
#define IWL_MVM_D0I3_OPS
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
#define IWL_MVM_COMMON_OPS \
|
||||
/* these could be differentiated */ \
|
||||
.async_cb = iwl_mvm_async_cb, \
|
||||
@@ -1695,8 +1705,7 @@ int iwl_mvm_exit_d0i3(struct iwl_op_mode *op_mode)
|
||||
.nic_error = iwl_mvm_nic_error, \
|
||||
.cmd_queue_full = iwl_mvm_cmd_queue_full, \
|
||||
.nic_config = iwl_mvm_nic_config, \
|
||||
.enter_d0i3 = iwl_mvm_enter_d0i3, \
|
||||
.exit_d0i3 = iwl_mvm_exit_d0i3, \
|
||||
IWL_MVM_D0I3_OPS \
|
||||
/* as we only register one, these MUST be common! */ \
|
||||
.start = iwl_op_mode_mvm_start, \
|
||||
.stop = iwl_op_mode_mvm_stop
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user