pull request: iwlwifi-next 2015-09-21
Hi Kalle,
This is our first pull request for 4.4. This is also my first pull -request for iwlwifi, so bear with me and let me know if there are any issues. And please don't come here to beat me up physically if I did something wrong (it's scary to send pull requests to maintainers that are just a couple of hours drive away). :)
Luca.
The following changes since commit 5865f3658ba37c54e346b0fdee08a1c7a152681b:
iwlwifi: mvm: bump firmware API to 17 (2015-08-23 12:54:16 +0300)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git tags/iwlwifi-next-for-kalle-2015-09-21
for you to fetch changes up to 7c014e35a018187462f2cd6c85259e080663ba2d:
iwlwifi: mvm: add debug print for d0i3 exit indication (2015-09-21 18:08:46 +0300)
----------------------------------------------------------------
* some debugfs improvements;
* fix signedness in beacon statistics;
* deinline some functions to reduce size when device tracing is enabled;
* filter beacons out in AP mode when no stations are associated;
* deprecate firmwares version -12;
* fix a runtime PM vs. legacy suspend race;
* one-liner fix for a ToF bug;
* clean-ups in the rx code;
* small debugging improvement;
* fix WoWLAN with new firmware versions;
----------------------------------------------------------------
Eliad Peller (2):
iwlwifi: mvm: configure wowlan configuration only if connected
iwlwifi: mvm: add debug print for d0i3 exit indication
Emmanuel Grumbach (8):
iwlwifi: mvm: add debugfs hook to send ECHO_CMD to the firmware
iwlwifi: Deinline iwl_{read,write}(8,32}
iwlwifi: mvm: don't load -12.ucode anymore
iwlwifi: mvm: remove IWL_UCODE_TLV_API_HDC_PHASE_0 TLV flag
iwlwifi: mvm: remove IWL_UCODE_TLV_API_TX_POWER_DEV TLV flag
iwlwifi: mvm: remove IWL_UCODE_TLV_API_SINGLE_SCAN_EBS TLV flag
iwlwifi: mvm: remove IWL_UCODE_TLV_API_ASYNC_DTM TLV flag
iwlwifi: mvm: remove IWL_UCODE_TLV_API_STATS_V10 TLV flag
Gregory Greenman (1):
iwlwifi: mvm: don't ask for beacons when AP vif and no assoc sta
Johannes Berg (6):
iwlwifi: mvm: don't NUL-terminate low-latency debugfs file
iwlwifi: mvm: make sure AP is operating for ToF
iwlwifi: mvm: remove useless debug message from RX
iwlwifi: mvm: remove pointless cfg_phy_cnt length check
iwlwifi: mvm: remove some unused defines from RX API
iwlwifi: mvm: move RX API into its own file
Liad Kaufman (1):
iwlwifi: mvm: remove SCD_QUEUE_CONFIG TLV flag
Luciano Coelho (2):
iwlwifi: mvm: remove netdetect debugfs entry
iwlwifi: mvm: make sure d0i3 exit work runs before suspending
Sara Sharon (1):
iwlwifi: mvm: fix statistics variables type
drivers/net/wireless/iwlwifi/iwl-7000.c | 6 +- drivers/net/wireless/iwlwifi/iwl-8000.c | 6 +- drivers/net/wireless/iwlwifi/iwl-fw-file.h | 13 ----- drivers/net/wireless/iwlwifi/iwl-io.c | 23 ++++++++ drivers/net/wireless/iwlwifi/iwl-io.h | 21 +------ drivers/net/wireless/iwlwifi/mvm/d3.c | 3 + drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c | 3 +- drivers/net/wireless/iwlwifi/mvm/debugfs.c | 129 +++++------------------------------------- drivers/net/wireless/iwlwifi/mvm/fw-api-rx.h | 238 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ drivers/net/wireless/iwlwifi/mvm/fw-api-stats.h | 41 ++------------ drivers/net/wireless/iwlwifi/mvm/fw-api.h | 186 +------------------------------------------------------------ drivers/net/wireless/iwlwifi/mvm/fw.c | 16 ------ drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 21 +++++-- drivers/net/wireless/iwlwifi/mvm/mac80211.c | 26 +++------ drivers/net/wireless/iwlwifi/mvm/mvm.h | 21 +++---- drivers/net/wireless/iwlwifi/mvm/ops.c | 23 +++++--- drivers/net/wireless/iwlwifi/mvm/rx.c | 63 ++++++--------------- drivers/net/wireless/iwlwifi/mvm/scan.c | 2 - drivers/net/wireless/iwlwifi/mvm/sta.c | 5 ++ drivers/net/wireless/iwlwifi/mvm/tof.c | 3 +- drivers/net/wireless/iwlwifi/mvm/utils.c | 11 ---- 21 files changed, 369 insertions(+), 491 deletions(-) create mode 100644 drivers/net/wireless/iwlwifi/mvm/fw-api-rx.h
PATCH 1/21 iwlwifi: mvm: remove netdetect debugfs entry
From: Luciano Coelho <[email protected]>
This debugfs entry was implemented just as a proof-of-concept before the full support for netdetect via cfg80211/mac80211 was implemented. Now that we have a proper way to enable netdetect from userspace, this entry is redundant and should be removed to avoid unnecessary maintenance work.
--- drivers/net/wireless/iwlwifi/mvm/debugfs.c | 114 ----------------------------- 1 file changed, 114 deletions(-)
drivers/net/wireless/iwlwifi/mvm/debugfs.c +0 -114
@@ -1214,118 +1214,6 @@ static ssize_t iwl_dbgfs_d3_sram_read(struct file *file, char __user *user_buf,return ret; } - -#define MAX_NUM_ND_MATCHSETS 10 - -static ssize_t iwl_dbgfs_netdetect_write (struct iwl_mvm *mvm,char *buf, -size_t count,loff_t *ppos) -{ -const char *seps =",\n" ; -char *buf_ptr = buf; -char *value_str =NULL ; -int ret, i; - -/* TODO: don't free if write is being called several times in one go */ -if (mvm->nd_config) { -kfree (mvm->nd_config->match_sets); -kfree (mvm->nd_config); - mvm->nd_config =NULL ; - } - - mvm->nd_config =kzalloc (sizeof (*mvm->nd_config) + - (11 *sizeof (struct ieee80211_channel *)), -GFP_KERNEL ); -if (!mvm->nd_config) { - ret = -ENOMEM ; - goto out_free; - } - - mvm->nd_config->n_channels =11 ; - mvm->nd_config->scan_width =NL80211_BSS_CHAN_WIDTH_20 ; - mvm->nd_config->interval =5 ; - mvm->nd_config->min_rssi_thold =-80 ; -for (i =0 ; i < mvm->nd_config->n_channels; i++) - mvm->nd_config->channels[i] = &mvm->nvm_data->channels[i]; - - mvm->nd_config->match_sets = -kcalloc (MAX_NUM_ND_MATCHSETS , -sizeof (*mvm->nd_config->match_sets), -GFP_KERNEL ); -if (!mvm->nd_config->match_sets) { - ret = -ENOMEM ; - goto out_free; - } - -while ((value_str =strsep (&buf_ptr, seps)) && -strlen (value_str)) { -struct cfg80211_match_set *set; - -if (mvm->nd_config->n_match_sets >=MAX_NUM_ND_MATCHSETS ) { - ret = -EINVAL ; - goto out_free; - } - - set = &mvm->nd_config->match_sets[mvm->nd_config->n_match_sets]; - set->ssid.ssid_len =strlen (value_str); - -if (set->ssid.ssid_len >IEEE80211_MAX_SSID_LEN ) { - ret = -EINVAL ; - goto out_free; - } - -memcpy (set->ssid.ssid, value_str, set->ssid.ssid_len); - - mvm->nd_config->n_match_sets++; - } - - ret = count; - -if (mvm->nd_config->n_match_sets) - goto out; - -out_free: -if (mvm->nd_config) -kfree (mvm->nd_config->match_sets); -kfree (mvm->nd_config); - mvm->nd_config =NULL ; -out: -return ret; -} - -static ssize_t -iwl_dbgfs_netdetect_read (struct file *file,char __user *user_buf, -size_t count,loff_t *ppos) -{ -struct iwl_mvm *mvm = file->private_data; -size_t bufsz, ret; -char *buf; -int i, n_match_sets, pos =0 ; - - n_match_sets = mvm->nd_config ? mvm->nd_config->n_match_sets :0 ; - - bufsz = n_match_sets * (IEEE80211_MAX_SSID_LEN +1 ) +1 ; - buf =kzalloc (bufsz,GFP_KERNEL ); -if (!buf) -return -ENOMEM ; - -for (i =0 ; i < n_match_sets; i++) { -if (pos + - mvm->nd_config->match_sets[i].ssid.ssid_len +2 > bufsz) { - ret = -EIO ; - goto out; - } - -memcpy (buf + pos, mvm->nd_config->match_sets[i].ssid.ssid, - mvm->nd_config->match_sets[i].ssid.ssid_len); - pos += mvm->nd_config->match_sets[i].ssid.ssid_len; - buf[pos++] ='\n' ; - } - - ret =simple_read_from_buffer (user_buf, count, ppos, buf, pos); -out: -kfree (buf); -return ret; -}#endif #define PRINT_MVM_REF (ref) do { \
@@ -1503,7 +1391,6 @@ MVM_DEBUGFS_READ_WRITE_FILE_OPS(bcast_filters_macs, 256);#ifdef CONFIG_PM_SLEEP MVM_DEBUGFS_READ_WRITE_FILE_OPS (d3_sram,8 ); -MVM_DEBUGFS_READ_WRITE_FILE_OPS (netdetect,384 );#endif int iwl_mvm_dbgfs_register (struct iwl_mvm *mvm,struct dentry *dbgfs_dir)
@@ -1572,7 +1459,6 @@ int iwl_mvm_dbgfs_register(struct iwl_mvm *mvm, struct dentry *dbgfs_dir)if (!debugfs_create_u32 ("last_netdetect_scans" ,S_IRUSR , mvm->debugfs_dir, &mvm->last_netdetect_scans)) goto err; -MVM_DEBUGFS_ADD_FILE (netdetect, mvm->debugfs_dir,S_IRUSR |S_IWUSR );#endif if (!debugfs_create_u8("low_latency_agg_frame_limit", S_IRUSR | S_IWUSR,
Signature · 1 line
2.5.1
PATCH 2/21 iwlwifi: mvm: fix statistics variables type
In reply to Luca CoelhoFrom: Sara Sharon <[email protected]>
When receiving statistics notification there is a field of average energy. This is defines as signed 8 bit, while FW refers to it as unsigned. when the energy is higher than 127 this causes in iwl_mvm_stat_iterator a wrong computation of the signal
int sig = -stats->general.beacon_filter_average_energy;
resulting in incorrect CQM event (change from low to high).
While at it - update the rest of the fields to the correct type.
--- drivers/net/wireless/iwlwifi/mvm/fw-api-stats.h | 16 ++++++++-------- drivers/net/wireless/iwlwifi/mvm/mvm.h | 10 +++++----- drivers/net/wireless/iwlwifi/mvm/rx.c | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-)
drivers/net/wireless/iwlwifi/mvm/fw-api-stats.h +8 -8
@@ -237,10 +237,10 @@ struct mvm_statistics_general_v5 {__le32 num_of_sos_states;__le32 beacon_filtered;__le32 missed_beacons; -__s8 beacon_filter_average_energy; -__s8 beacon_filter_reason; -__s8 beacon_filter_current_energy; -__s8 beacon_filter_reserved; +u8 beacon_filter_average_energy; +u8 beacon_filter_reason; +u8 beacon_filter_current_energy; +u8 beacon_filter_reserved;__le32 beacon_filter_delta_time;struct mvm_statistics_bt_activity bt_activity; } __packed;/* STATISTICS_GENERAL_API_S_VER_5 */
@@ -263,10 +263,10 @@ struct mvm_statistics_general_v8 {__le32 num_of_sos_states;__le32 beacon_filtered;__le32 missed_beacons; -__s8 beacon_filter_average_energy; -__s8 beacon_filter_reason; -__s8 beacon_filter_current_energy; -__s8 beacon_filter_reserved; +u8 beacon_filter_average_energy; +u8 beacon_filter_reason; +u8 beacon_filter_current_energy; +u8 beacon_filter_reserved;__le32 beacon_filter_delta_time;struct mvm_statistics_bt_activity bt_activity;__le64 rx_time;
drivers/net/wireless/iwlwifi/mvm/mvm.h +5 -5
@@ -323,11 +323,11 @@ enum iwl_bt_force_ant_mode {struct iwl_mvm_vif_bf_data {bool bf_enabled;bool ba_enabled; -s8 ave_beacon_signal; -s8 last_cqm_event; -s8 bt_coex_min_thold; -s8 bt_coex_max_thold; -s8 last_bt_coex_event; +int ave_beacon_signal; +int last_cqm_event; +int bt_coex_min_thold; +int bt_coex_max_thold; +int last_bt_coex_event; };/**
drivers/net/wireless/iwlwifi/mvm/rx.c +1 -1
@@ -459,7 +459,7 @@ static void iwl_mvm_update_rx_statistics(struct iwl_mvm *mvm,struct iwl_mvm_stat_data {struct iwl_mvm *mvm;__le32 mac_id; -__s8 beacon_filter_average_energy; +u8 beacon_filter_average_energy;struct mvm_statistics_general_v8 *general; };
Signature · 1 line
2.5.1
PATCH 3/21 iwlwifi: mvm: add debugfs hook to send ECHO_CMD to the firmware
In reply to Luca CoelhoFrom: Emmanuel Grumbach <[email protected]>
ECHO_CMD is a simple command that can be sent to the firmware just to check that it is alive.
This command is useful for debug purpose, provide a debugfs hook to send it.
--- drivers/net/wireless/iwlwifi/mvm/debugfs.c | 15 +++++++++++++++ drivers/net/wireless/iwlwifi/mvm/fw-api.h | 1 + drivers/net/wireless/iwlwifi/mvm/ops.c | 1 + 3 files changed, 17 insertions(+)
drivers/net/wireless/iwlwifi/mvm/debugfs.c +15 -0
@@ -1361,11 +1361,25 @@ out:return count; } +static ssize_t +iwl_dbgfs_send_echo_cmd_write (struct iwl_mvm *mvm,char *buf, +size_t count,loff_t *ppos) +{ +int ret; + +mutex_lock (&mvm->mutex); + ret =iwl_mvm_send_cmd_pdu (mvm,ECHO_CMD ,0 ,0 ,NULL ); +mutex_unlock (&mvm->mutex); + +return ret ?: count; +} +MVM_DEBUGFS_READ_WRITE_FILE_OPS (prph_reg,64 );/* Device wide debugfs entries */ MVM_DEBUGFS_WRITE_FILE_OPS (tx_flush,16 );MVM_DEBUGFS_WRITE_FILE_OPS (sta_drain,8 ); +MVM_DEBUGFS_WRITE_FILE_OPS (send_echo_cmd,8 );MVM_DEBUGFS_READ_WRITE_FILE_OPS (sram,64 );MVM_DEBUGFS_READ_WRITE_FILE_OPS (set_nic_temperature,64 );MVM_DEBUGFS_READ_FILE_OPS (nic_temp);
@@ -1425,6 +1439,7 @@ int iwl_mvm_dbgfs_register(struct iwl_mvm *mvm, struct dentry *dbgfs_dir)MVM_DEBUGFS_ADD_FILE (d0i3_refs, mvm->debugfs_dir,S_IRUSR |S_IWUSR );MVM_DEBUGFS_ADD_FILE (fw_dbg_conf, mvm->debugfs_dir,S_IRUSR |S_IWUSR );MVM_DEBUGFS_ADD_FILE (fw_dbg_collect, mvm->debugfs_dir,S_IWUSR ); +MVM_DEBUGFS_ADD_FILE (send_echo_cmd, mvm->debugfs_dir,S_IWUSR ); if (!debugfs_create_bool("enable_scan_iteration_notif", S_IRUSR | S_IWUSR, mvm->debugfs_dir,
drivers/net/wireless/iwlwifi/mvm/fw-api.h +1 -0
@@ -100,6 +100,7 @@ enum iwl_mvm_tx_fifo {enum {MVM_ALIVE =0x1 ,REPLY_ERROR =0x2 , +ECHO_CMD =0x3 ,INIT_COMPLETE_NOTIF =0x4 ,
drivers/net/wireless/iwlwifi/mvm/ops.c +1 -0
@@ -271,6 +271,7 @@ static const struct iwl_rx_handlers iwl_mvm_rx_handlers[] = {static const char *const iwl_mvm_cmd_strings[REPLY_MAX +1 ] = {CMD (MVM_ALIVE ),CMD (REPLY_ERROR ), +CMD (ECHO_CMD ),CMD (INIT_COMPLETE_NOTIF ),CMD (PHY_CONTEXT_CMD ),CMD (MGMT_MCAST_KEY ),
Signature · 1 line
2.5.1
PATCH 4/21 iwlwifi: Deinline iwl_{read,write}(8,32}
In reply to Luca CoelhoFrom: Emmanuel Grumbach <[email protected]>
With CONFIG_IWLWIFI_DEVICE_TRACING=y, these functions are rather large, too big for inlining.
With this .config: http://busybox.net/~vda/kernel_config,
after uninlining these functions have sizes and callsite counts as follows:
iwl_read32 475 bytes, 51 callsitesiwl_write32 477 bytes, 90 callsitesiwl_write8 493 bytes, 3 callsites
Reduction in size is about 74,000 bytes:
text data bss dec hex filename
90758147 17226024 36659200 144643371 89f152b vmlinux0 90687995 17221928 36659200 144569123 89df323 vmlinux.after
--- drivers/net/wireless/iwlwifi/iwl-io.c | 22 ++++++++++++++++++++++ drivers/net/wireless/iwlwifi/iwl-io.h | 21 +++------------------ 2 files changed, 25 insertions(+), 18 deletions(-)
drivers/net/wireless/iwlwifi/iwl-io.c +22 -0
@@ -36,6 +36,28 @@#include "iwl-prph.h" #include "iwl-fh.h" +void iwl_write8 (struct iwl_trans *trans,u32 ofs,u8 val) +{ +trace_iwlwifi_dev_iowrite8 (trans->dev, ofs, val); +iwl_trans_write8 (trans, ofs, val); +} +IWL_EXPORT_SYMBOL (iwl_write8); + +void iwl_write32 (struct iwl_trans *trans,u32 ofs,u32 val) +{ +trace_iwlwifi_dev_iowrite32 (trans->dev, ofs, val); +iwl_trans_write32 (trans, ofs, val); +} +IWL_EXPORT_SYMBOL (iwl_write32); + +u32 iwl_read32 (struct iwl_trans *trans,u32 ofs) +{ +u32 val =iwl_trans_read32 (trans, ofs); +trace_iwlwifi_dev_ioread32 (trans->dev, ofs, val); +return val; +} +IWL_EXPORT_SYMBOL (iwl_read32); +#define IWL_POLL_INTERVAL 10/* microseconds */ int iwl_poll_bit(struct iwl_trans *trans, u32 addr,
drivers/net/wireless/iwlwifi/iwl-io.h +3 -18
@@ -32,24 +32,9 @@#include "iwl-devtrace.h" #include "iwl-trans.h" -static inline void iwl_write8 (struct iwl_trans *trans,u32 ofs,u8 val) -{ -trace_iwlwifi_dev_iowrite8 (trans->dev, ofs, val); -iwl_trans_write8 (trans, ofs, val); -} - -static inline void iwl_write32 (struct iwl_trans *trans,u32 ofs,u32 val) -{ -trace_iwlwifi_dev_iowrite32 (trans->dev, ofs, val); -iwl_trans_write32 (trans, ofs, val); -} - -static inline u32 iwl_read32 (struct iwl_trans *trans,u32 ofs) -{ -u32 val =iwl_trans_read32 (trans, ofs); -trace_iwlwifi_dev_ioread32 (trans->dev, ofs, val); -return val; -} +void iwl_write8 (struct iwl_trans *trans,u32 ofs,u8 val); +void iwl_write32 (struct iwl_trans *trans,u32 ofs,u32 val); +u32 iwl_read32 (struct iwl_trans *trans,u32 ofs);static inline void iwl_set_bit (struct iwl_trans *trans,u32 reg,u32 mask) {
Signature · 1 line
2.5.1
PATCH 5/21 iwlwifi: mvm: don't ask for beacons when AP vif and no assoc sta
In reply to Luca CoelhoFrom: Gregory Greenman <[email protected]>
When in AP mode, we need beacons from other APs for HT protection. However, when there's no any associated station we will not do any Tx and thus don't really need beacons. On the other hand, these beacons will cause a lot of unnecessary wakeups which increase our power consumption. Handle this by asking FW to pass beacons only when there's at least one associated station.
--- drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 21 +++++++++++++++------ drivers/net/wireless/iwlwifi/mvm/mac80211.c | 9 +++++++++ drivers/net/wireless/iwlwifi/mvm/mvm.h | 6 ++++++ drivers/net/wireless/iwlwifi/mvm/sta.c | 5 +++++ 4 files changed, 35 insertions(+), 6 deletions(-)
drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c +15 -6
@@ -7,6 +7,7 @@* * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH +* Copyright(c) 2015 Intel Deutschland GmbH * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as
@@ -33,6 +34,7 @@* * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH +* Copyright(c) 2015 Intel Deutschland GmbH * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -1124,10 +1126,11 @@ static void iwl_mvm_mac_ctxt_cmd_fill_ap(struct iwl_mvm *mvm, ctxt_ap->beacon_template =cpu_to_le32 (mvmvif->id); } -static int iwl_mvm_mac_ctxt_cmd_ap (struct iwl_mvm *mvm, -struct ieee80211_vif *vif, -u32 action) +int iwl_mvm_mac_ctxt_cmd_ap (struct iwl_mvm *mvm, +struct ieee80211_vif *vif, +u32 action) { +struct iwl_mvm_vif *mvmvif =iwl_mvm_vif_from_mac80211 (vif);struct iwl_mac_ctx_cmd cmd = {};WARN_ON (vif->type !=NL80211_IFTYPE_AP || vif->p2p);
@@ -1137,10 +1140,16 @@ static int iwl_mvm_mac_ctxt_cmd_ap(struct iwl_mvm *mvm,/* * pass probe requests and beacons from other APs (needed -* for ht protection) +* for ht protection); when there're no any associated station +* don't ask FW to pass beacons to prevent unnecessary wake-ups. */ - cmd.filter_flags |=cpu_to_le32 (MAC_FILTER_IN_PROBE_REQUEST | -MAC_FILTER_IN_BEACON ); + cmd.filter_flags |=cpu_to_le32 (MAC_FILTER_IN_PROBE_REQUEST ); +if (mvmvif->ap_assoc_sta_count) { + cmd.filter_flags |=cpu_to_le32 (MAC_FILTER_IN_BEACON ); +IWL_DEBUG_HC (mvm,"Asking FW to pass beacons\n" ); + }else { +IWL_DEBUG_HC (mvm,"No need to receive beacons\n" ); + }/* Fill the data specific for ap mode */ iwl_mvm_mac_ctxt_cmd_fill_ap(mvm, vif, &cmd.ap,
drivers/net/wireless/iwlwifi/mvm/mac80211.c +9 -0
@@ -2319,6 +2319,8 @@ static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw,if (vif->type ==NL80211_IFTYPE_AP )iwl_mvm_mac_ctxt_recalc_tsf_id (mvm, vif); + mvmvif->ap_assoc_sta_count =0 ; +/* Add the mac context */ ret =iwl_mvm_mac_ctxt_add (mvm, vif);if (ret)
@@ -2613,6 +2615,7 @@ static void iwl_mvm_sta_pre_rcu_remove(struct ieee80211_hw *hw, struct ieee80211_sta *sta) {struct iwl_mvm *mvm =IWL_MAC80211_GET_MVM (hw); +struct iwl_mvm_vif *mvmvif =iwl_mvm_vif_from_mac80211 (vif);struct iwl_mvm_sta *mvm_sta =iwl_mvm_sta_from_mac80211 (sta);/*
@@ -2627,6 +2630,12 @@ static void iwl_mvm_sta_pre_rcu_remove(struct ieee80211_hw *hw,if (sta ==rcu_access_pointer (mvm->fw_id_to_mac_id[mvm_sta->sta_id]))rcu_assign_pointer (mvm->fw_id_to_mac_id[mvm_sta->sta_id],ERR_PTR (-ENOENT )); + +if (mvm_sta->vif->type ==NL80211_IFTYPE_AP ) { + mvmvif->ap_assoc_sta_count--; +iwl_mvm_mac_ctxt_cmd_ap (mvm, vif,FW_CTXT_ACTION_MODIFY ); + } +mutex_unlock (&mvm->mutex); }
drivers/net/wireless/iwlwifi/mvm/mvm.h +6 -0
@@ -338,6 +338,8 @@ struct iwl_mvm_vif_bf_data {* @bssid: BSSID for this (client) interface * @associated: indicates that we're currently associated, used only for * managing the firmware state in iwl_mvm_bss_info_changed_station() +* @ap_assoc_sta_count: count of stations associated to us - valid only +* if VIF type is AP * @uploaded: indicates the MAC context has been added to the device * @ap_ibss_active: indicates that AP/IBSS is configured and that the interface * should get quota etc.
@@ -367,6 +369,7 @@ struct iwl_mvm_vif {u8 bssid[ETH_ALEN ];bool associated; +u8 ap_assoc_sta_count;bool uploaded;bool ap_ibss_active;
@@ -1131,6 +1134,9 @@ 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); +int iwl_mvm_mac_ctxt_cmd_ap (struct iwl_mvm *mvm, +struct ieee80211_vif *vif, +u32 action);/* Bindings */ int iwl_mvm_binding_add_vif (struct iwl_mvm *mvm,struct ieee80211_vif *vif);
drivers/net/wireless/iwlwifi/mvm/sta.c +5 -0
@@ -275,6 +275,11 @@ int iwl_mvm_add_sta(struct iwl_mvm *mvm,if (sta_id ==IWL_MVM_STATION_COUNT )return -ENOSPC ; +if (vif->type ==NL80211_IFTYPE_AP ) { + mvmvif->ap_assoc_sta_count++; +iwl_mvm_mac_ctxt_cmd_ap (mvm, vif,FW_CTXT_ACTION_MODIFY ); + } +spin_lock_init (&mvm_sta->lock); mvm_sta->sta_id = sta_id;
Signature · 1 line
2.5.1
PATCH 6/21 iwlwifi: mvm: make sure d0i3 exit work runs before suspending
In reply to Luca CoelhoFrom: Luciano Coelho <[email protected]>
If we are in d0i3 when entering suspend, we leave d0i3 so that mac80211 can call us to remove connections or whatever before going to suspend. We do this by calling pm_runtime_resume() early in the slave transport flow and reactivating it later, when the wiphy suspend flow runs.
The problem is that we queue a work in order to leave d0i3. If this work hasn't run yet when the wiphy suspend flow is called, we have a race and entering d0i3 fails (because we're still holding the IWL_MVM_REF_EXIT_WORK reference).
To solve this, simply flush the d0i3_exit_work at the beginning of the iwl_mvm_suspend() function.
--- drivers/net/wireless/iwlwifi/mvm/d3.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/wireless/iwlwifi/mvm/d3.c +3 -0
@@ -1170,6 +1170,9 @@ int iwl_mvm_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)struct iwl_mvm *mvm =IWL_MAC80211_GET_MVM (hw);int ret; +/* make sure the d0i3 exit work is not pending */ +flush_work (&mvm->d0i3_exit_work); + ret =iwl_trans_suspend (mvm->trans);if (ret)return ret;
Signature · 1 line
2.5.1
PATCH 7/21 iwlwifi: mvm: don't NUL-terminate low-latency debugfs file
In reply to Luca CoelhoFrom: Johannes Berg <[email protected]>
There's obviously no reason to write a NUL-terminating byte into the debugfs file. Apparently nobody tried to use this from a tool that doesn't strip NUL bytes though, so we never noticed. Fix it.
--- drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c +1 -2
@@ -1250,11 +1250,10 @@ static ssize_t iwl_dbgfs_low_latency_read(struct file *file, {struct ieee80211_vif *vif = file->private_data;struct iwl_mvm_vif *mvmvif =iwl_mvm_vif_from_mac80211 (vif); -char buf[3 ]; +char buf[2 ]; buf[0 ] = mvmvif->low_latency ?'1' :'0' ; buf[1 ] ='\n' ; - buf[2 ] ='\0' ;return simple_read_from_buffer (user_buf, count, ppos, buf,sizeof (buf)); }
Signature · 1 line
2.5.1
PATCH 8/21 iwlwifi: mvm: don't load -12.ucode anymore
In reply to Luca CoelhoFrom: Emmanuel Grumbach <[email protected]>
-13.ucode has been published long ago. Deprecate old versions of the firmware.
--- drivers/net/wireless/iwlwifi/iwl-7000.c | 4 ++-- drivers/net/wireless/iwlwifi/iwl-8000.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/iwlwifi/iwl-7000.c +2 -2
@@ -72,11 +72,11 @@#define IWL7260_UCODE_API_MAX 17/* Oldest version we won't warn about */ -#define IWL7260_UCODE_API_OK 12 +#define IWL7260_UCODE_API_OK 13#define IWL3165_UCODE_API_OK 13/* Lowest firmware API version supported */ -#define IWL7260_UCODE_API_MIN 12 +#define IWL7260_UCODE_API_MIN 13#define IWL3165_UCODE_API_MIN 13/* NVM versions */
drivers/net/wireless/iwlwifi/iwl-8000.c +2 -2
@@ -72,10 +72,10 @@#define IWL8000_UCODE_API_MAX 17/* Oldest version we won't warn about */ -#define IWL8000_UCODE_API_OK 12 +#define IWL8000_UCODE_API_OK 13/* Lowest firmware API version supported */ -#define IWL8000_UCODE_API_MIN 12 +#define IWL8000_UCODE_API_MIN 13/* NVM versions */ #define IWL8000_NVM_VERSION 0x0a1d
Signature · 1 line
2.5.1
PATCH 9/21 iwlwifi: mvm: remove SCD_QUEUE_CONFIG TLV flag
In reply to Luca CoelhoFrom: Liad Kaufman <[email protected]>
We don't support firmwares that don't use the new API. This also allows to use all the SCD queues, so increase the reported number of queues to 31.
--- drivers/net/wireless/iwlwifi/iwl-7000.c | 2 +- drivers/net/wireless/iwlwifi/iwl-8000.c | 2 +- drivers/net/wireless/iwlwifi/iwl-fw-file.h | 3 --- drivers/net/wireless/iwlwifi/mvm/mvm.h | 5 ----- drivers/net/wireless/iwlwifi/mvm/utils.c | 11 ----------- 5 files changed, 2 insertions(+), 21 deletions(-)
drivers/net/wireless/iwlwifi/iwl-7000.c +1 -1
@@ -113,7 +113,7 @@static const struct iwl_base_params iwl7000_base_params = { .eeprom_size =OTP_LOW_IMAGE_SIZE_FAMILY_7000 , - .num_of_queues =IWLAGN_NUM_QUEUES , + .num_of_queues =31 , .pll_cfg_val =0 , .shadow_ram_support = true, .led_compensation =57 ,
drivers/net/wireless/iwlwifi/iwl-8000.c +1 -1
@@ -107,7 +107,7 @@static const struct iwl_base_params iwl8000_base_params = { .eeprom_size =OTP_LOW_IMAGE_SIZE_FAMILY_8000 , - .num_of_queues =IWLAGN_NUM_QUEUES , + .num_of_queues =31 , .pll_cfg_val =0 , .shadow_ram_support = true, .led_compensation =57 ,
drivers/net/wireless/iwlwifi/iwl-fw-file.h +0 -3
@@ -250,8 +250,6 @@ typedef unsigned int __bitwise__ iwl_ucode_tlv_api_t;* IWL_UCODE_TLV_API_HDC_PHASE_0: ucode supports finer configuration of LTR * @IWL_UCODE_TLV_API_TX_POWER_DEV: new API for tx power. * @IWL_UCODE_TLV_API_WIDE_CMD_HDR: ucode supports wide command header -* @IWL_UCODE_TLV_API_SCD_CFG: This firmware can configure the scheduler -* through the dedicated host command. * @IWL_UCODE_TLV_API_SINGLE_SCAN_EBS: EBS is supported for single scans too. * @IWL_UCODE_TLV_API_ASYNC_DTM: Async temperature notifications are supported. * @IWL_UCODE_TLV_API_LQ_SS_PARAMS: Configure STBC/BFER via LQ CMD ss_params
@@ -269,7 +267,6 @@ enum iwl_ucode_tlv_api {IWL_UCODE_TLV_API_HDC_PHASE_0 = (__force iwl_ucode_tlv_api_t )10 ,IWL_UCODE_TLV_API_TX_POWER_DEV = (__force iwl_ucode_tlv_api_t )11 ,IWL_UCODE_TLV_API_WIDE_CMD_HDR = (__force iwl_ucode_tlv_api_t )14 , -IWL_UCODE_TLV_API_SCD_CFG = (__force iwl_ucode_tlv_api_t )15 ,IWL_UCODE_TLV_API_SINGLE_SCAN_EBS = (__force iwl_ucode_tlv_api_t )16 ,IWL_UCODE_TLV_API_ASYNC_DTM = (__force iwl_ucode_tlv_api_t )17 , IWL_UCODE_TLV_API_LQ_SS_PARAMS = (__force iwl_ucode_tlv_api_t)18,
drivers/net/wireless/iwlwifi/mvm/mvm.h +0 -5
@@ -937,11 +937,6 @@ static inline bool iwl_mvm_is_wifi_mcc_supported(struct iwl_mvm *mvm) IWL_UCODE_TLV_CAPA_LAR_MULTI_MCC); } -static inline bool iwl_mvm_is_scd_cfg_supported (struct iwl_mvm *mvm) -{ -return fw_has_api (&mvm->fw->ucode_capa,IWL_UCODE_TLV_API_SCD_CFG ); -} -static inline bool iwl_mvm_bt_is_plcr_supported (struct iwl_mvm *mvm) { return fw_has_capa(&mvm->fw->ucode_capa,
drivers/net/wireless/iwlwifi/mvm/utils.c +0 -11
@@ -672,12 +672,6 @@ void iwl_mvm_enable_txq(struct iwl_mvm *mvm, int queue, u16 ssn, .tid = cfg->tid, }; -if (!iwl_mvm_is_scd_cfg_supported (mvm)) { -iwl_trans_txq_enable_cfg (mvm->trans, queue, ssn, cfg, - wdg_timeout); -return ; - } -iwl_trans_txq_enable_cfg (mvm->trans, queue, ssn,NULL , wdg_timeout);WARN (iwl_mvm_send_cmd_pdu (mvm,SCD_QUEUE_CFG ,0 ,sizeof (cmd), &cmd),"Failed to configure queue %d on FIFO %d\n" , queue, cfg->fifo);
@@ -691,11 +685,6 @@ void iwl_mvm_disable_txq(struct iwl_mvm *mvm, int queue, u8 flags) };int ret; -if (!iwl_mvm_is_scd_cfg_supported (mvm)) { -iwl_trans_txq_disable (mvm->trans, queue, true); -return ; - } -iwl_trans_txq_disable (mvm->trans, queue, false); ret =iwl_mvm_send_cmd_pdu (mvm,SCD_QUEUE_CFG , flags,sizeof (cmd), &cmd);
Signature · 1 line
2.5.1
PATCH 10/21 iwlwifi: mvm: remove IWL_UCODE_TLV_API_HDC_PHASE_0 TLV flag
In reply to Luca CoelhoFrom: Emmanuel Grumbach <[email protected]>
All the supported firwmares support the new API.
--- drivers/net/wireless/iwlwifi/iwl-fw-file.h | 2 -- drivers/net/wireless/iwlwifi/iwl-io.c | 1 + drivers/net/wireless/iwlwifi/mvm/fw.c | 16 ---------------- 3 files changed, 1 insertion(+), 18 deletions(-)
drivers/net/wireless/iwlwifi/iwl-fw-file.h +0 -2
@@ -247,7 +247,6 @@ typedef unsigned int __bitwise__ iwl_ucode_tlv_api_t;* @IWL_UCODE_TLV_API_FRAGMENTED_SCAN: This ucode supports active dwell time * longer than the passive one, which is essential for fragmented scan. * @IWL_UCODE_TLV_API_WIFI_MCC_UPDATE: ucode supports MCC updates with source. -* IWL_UCODE_TLV_API_HDC_PHASE_0: ucode supports finer configuration of LTR * @IWL_UCODE_TLV_API_TX_POWER_DEV: new API for tx power. * @IWL_UCODE_TLV_API_WIDE_CMD_HDR: ucode supports wide command header * @IWL_UCODE_TLV_API_SINGLE_SCAN_EBS: EBS is supported for single scans too.
@@ -264,7 +263,6 @@ enum iwl_ucode_tlv_api {IWL_UCODE_TLV_API_BT_COEX_SPLIT = (__force iwl_ucode_tlv_api_t )3 ,IWL_UCODE_TLV_API_FRAGMENTED_SCAN = (__force iwl_ucode_tlv_api_t )8 ,IWL_UCODE_TLV_API_WIFI_MCC_UPDATE = (__force iwl_ucode_tlv_api_t )9 , -IWL_UCODE_TLV_API_HDC_PHASE_0 = (__force iwl_ucode_tlv_api_t )10 ,IWL_UCODE_TLV_API_TX_POWER_DEV = (__force iwl_ucode_tlv_api_t )11 ,IWL_UCODE_TLV_API_WIDE_CMD_HDR = (__force iwl_ucode_tlv_api_t )14 , IWL_UCODE_TLV_API_SINGLE_SCAN_EBS = (__force iwl_ucode_tlv_api_t)16,
drivers/net/wireless/iwlwifi/iwl-io.c +1 -0
@@ -53,6 +53,7 @@ IWL_EXPORT_SYMBOL(iwl_write32);u32 iwl_read32 (struct iwl_trans *trans,u32 ofs) {u32 val =iwl_trans_read32 (trans, ofs); +trace_iwlwifi_dev_ioread32 (trans->dev, ofs, val);return val; }
drivers/net/wireless/iwlwifi/mvm/fw.c +0 -16
@@ -940,19 +940,6 @@ int iwl_mvm_start_fw_dbg_conf(struct iwl_mvm *mvm, u8 conf_id)return ret; } -static int iwl_mvm_config_ltr_v1 (struct iwl_mvm *mvm) -{ -struct iwl_ltr_config_cmd_v1 cmd_v1 = { - .flags =cpu_to_le32 (LTR_CFG_FLAG_FEATURE_ENABLE ), - }; - -if (!mvm->trans->ltr_enabled) -return 0 ; - -return iwl_mvm_send_cmd_pdu (mvm,LTR_CONFIG ,0 , -sizeof (cmd_v1), &cmd_v1); -} -static int iwl_mvm_config_ltr (struct iwl_mvm *mvm) {struct iwl_ltr_config_cmd cmd = {
@@ -962,9 +949,6 @@ static int iwl_mvm_config_ltr(struct iwl_mvm *mvm)if (!mvm->trans->ltr_enabled)return 0 ; -if (!fw_has_api (&mvm->fw->ucode_capa,IWL_UCODE_TLV_API_HDC_PHASE_0 )) -return iwl_mvm_config_ltr_v1 (mvm); -return iwl_mvm_send_cmd_pdu (mvm,LTR_CONFIG ,0 ,sizeof (cmd), &cmd); }
Signature · 1 line
2.5.1
PATCH 20/21 iwlwifi: mvm: configure wowlan configuration only if connected
In reply to Luca CoelhoFrom: Eliad Peller <[email protected]>
Recent fw version added assert to make sure wowlan configuration is configured only when a station is connected.
Change the driver behavior to pass this configuration only if we indeed have ap station id (i.e. connected).
--- drivers/net/wireless/iwlwifi/mvm/ops.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
drivers/net/wireless/iwlwifi/mvm/ops.c +11 -6
@@ -1146,12 +1146,17 @@ int iwl_mvm_enter_d0i3(struct iwl_op_mode *op_mode)/* make sure we have no running tx while configuring the seqno */ synchronize_net (); -iwl_mvm_set_wowlan_data (mvm, &wowlan_config_cmd, &d0i3_iter_data); - ret =iwl_mvm_send_cmd_pdu (mvm,WOWLAN_CONFIGURATION , flags, -sizeof (wowlan_config_cmd), - &wowlan_config_cmd); -if (ret) -return ret; +/* configure wowlan configuration only if needed */ +if (mvm->d0i3_ap_sta_id !=IWL_MVM_STATION_COUNT ) { +iwl_mvm_set_wowlan_data (mvm, &wowlan_config_cmd, + &d0i3_iter_data); + + ret =iwl_mvm_send_cmd_pdu (mvm,WOWLAN_CONFIGURATION , flags, +sizeof (wowlan_config_cmd), + &wowlan_config_cmd); +if (ret) +return ret; + } return iwl_mvm_send_cmd_pdu(mvm, D3_CONFIG_CMD, flags | CMD_MAKE_TRANS_IDLE,
Signature · 1 line
2.5.1
PATCH 18/21 iwlwifi: mvm: remove some unused defines from RX API
In reply to Luca CoelhoFrom: Johannes Berg <[email protected]>
Remove some unused values from the RX API; these were used with older firmware API that didn't have the RX energy API, support for which was removed a long time ago.
--- drivers/net/wireless/iwlwifi/mvm/fw-api.h | 17 ----------------- 1 file changed, 17 deletions(-)
drivers/net/wireless/iwlwifi/mvm/fw-api.h +0 -17
@@ -1080,23 +1080,6 @@ struct iwl_hs20_roc_res {#define IWL_RX_INFO_ENERGY_ANT_B_POS 8#define IWL_RX_INFO_ENERGY_ANT_C_POS 16 -#define IWL_RX_INFO_AGC_IDX 1 -#define IWL_RX_INFO_RSSI_AB_IDX 2 -#define IWL_OFDM_AGC_A_MSK 0x0000007f -#define IWL_OFDM_AGC_A_POS 0 -#define IWL_OFDM_AGC_B_MSK 0x00003f80 -#define IWL_OFDM_AGC_B_POS 7 -#define IWL_OFDM_AGC_CODE_MSK 0x3fe00000 -#define IWL_OFDM_AGC_CODE_POS 20 -#define IWL_OFDM_RSSI_INBAND_A_MSK 0x00ff -#define IWL_OFDM_RSSI_A_POS 0 -#define IWL_OFDM_RSSI_ALLBAND_A_MSK 0xff00 -#define IWL_OFDM_RSSI_ALLBAND_A_POS 8 -#define IWL_OFDM_RSSI_INBAND_B_MSK 0xff0000 -#define IWL_OFDM_RSSI_B_POS 16 -#define IWL_OFDM_RSSI_ALLBAND_B_MSK 0xff000000 -#define IWL_OFDM_RSSI_ALLBAND_B_POS 24 -/** * struct iwl_rx_phy_info - phy info * (REPLY_RX_PHY_CMD = 0xc0)
Signature · 1 line
2.5.1
PATCH 11/21 iwlwifi: mvm: remove IWL_UCODE_TLV_API_TX_POWER_DEV TLV flag
In reply to Luca CoelhoFrom: Emmanuel Grumbach <[email protected]>
All the supported firmwares use the new API.
--- drivers/net/wireless/iwlwifi/iwl-fw-file.h | 2 -- drivers/net/wireless/iwlwifi/mvm/mac80211.c | 17 ----------------- 2 files changed, 19 deletions(-)
drivers/net/wireless/iwlwifi/iwl-fw-file.h +0 -2
@@ -247,7 +247,6 @@ typedef unsigned int __bitwise__ iwl_ucode_tlv_api_t;* @IWL_UCODE_TLV_API_FRAGMENTED_SCAN: This ucode supports active dwell time * longer than the passive one, which is essential for fragmented scan. * @IWL_UCODE_TLV_API_WIFI_MCC_UPDATE: ucode supports MCC updates with source. -* @IWL_UCODE_TLV_API_TX_POWER_DEV: new API for tx power. * @IWL_UCODE_TLV_API_WIDE_CMD_HDR: ucode supports wide command header * @IWL_UCODE_TLV_API_SINGLE_SCAN_EBS: EBS is supported for single scans too. * @IWL_UCODE_TLV_API_ASYNC_DTM: Async temperature notifications are supported.
@@ -263,7 +262,6 @@ enum iwl_ucode_tlv_api {IWL_UCODE_TLV_API_BT_COEX_SPLIT = (__force iwl_ucode_tlv_api_t )3 ,IWL_UCODE_TLV_API_FRAGMENTED_SCAN = (__force iwl_ucode_tlv_api_t )8 ,IWL_UCODE_TLV_API_WIFI_MCC_UPDATE = (__force iwl_ucode_tlv_api_t )9 , -IWL_UCODE_TLV_API_TX_POWER_DEV = (__force iwl_ucode_tlv_api_t )11 ,IWL_UCODE_TLV_API_WIDE_CMD_HDR = (__force iwl_ucode_tlv_api_t )14 ,IWL_UCODE_TLV_API_SINGLE_SCAN_EBS = (__force iwl_ucode_tlv_api_t )16 , IWL_UCODE_TLV_API_ASYNC_DTM = (__force iwl_ucode_tlv_api_t)17,
drivers/net/wireless/iwlwifi/mvm/mac80211.c +0 -17
@@ -1577,20 +1577,6 @@ static struct iwl_mvm_phy_ctxt *iwl_mvm_get_free_phy_ctxt(struct iwl_mvm *mvm)return NULL ; } -static int iwl_mvm_set_tx_power_old (struct iwl_mvm *mvm, -struct ieee80211_vif *vif,s8 tx_power) -{ -/* FW is in charge of regulatory enforcement */ -struct iwl_reduce_tx_power_cmd reduce_txpwr_cmd = { - .mac_context_id =iwl_mvm_vif_from_mac80211 (vif)->id, - .pwr_restriction =cpu_to_le16 (tx_power), - }; - -return iwl_mvm_send_cmd_pdu (mvm,REDUCE_TX_POWER_CMD ,0 , -sizeof (reduce_txpwr_cmd), - &reduce_txpwr_cmd); -} -static int iwl_mvm_set_tx_power (struct iwl_mvm *mvm,struct ieee80211_vif *vif,s16 tx_power) {
@@ -1602,9 +1588,6 @@ static int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif, };int len =sizeof (cmd); -if (!fw_has_api (&mvm->fw->ucode_capa,IWL_UCODE_TLV_API_TX_POWER_DEV )) -return iwl_mvm_set_tx_power_old (mvm, vif, tx_power); -if (tx_power ==IWL_DEFAULT_MAX_TX_POWER ) cmd.v2.pwr_restriction =cpu_to_le16 (IWL_DEV_MAX_TX_POWER );
Signature · 1 line
2.5.1
PATCH 21/21 iwlwifi: mvm: add debug print for d0i3 exit indication
In reply to Luca CoelhoFrom: Eliad Peller <[email protected]>
In order to verify d0i3 flow, add debug print to indicate d0i3 exit was completed (right after tx was re-enabled), along with the wakeup reasons.
--- drivers/net/wireless/iwlwifi/mvm/ops.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/wireless/iwlwifi/mvm/ops.c +4 -1
@@ -1263,7 +1263,7 @@ static void iwl_mvm_d0i3_exit_work(struct work_struct *wk) };struct iwl_wowlan_status *status;int ret; -u32 handled_reasons, wakeup_reasons; +u32 handled_reasons, wakeup_reasons =0 ;__le16 *qos_seq =NULL ;mutex_lock (&mvm->mutex);
@@ -1295,6 +1295,9 @@ static void iwl_mvm_d0i3_exit_work(struct work_struct *wk) out:iwl_mvm_d0i3_enable_tx (mvm, qos_seq); +IWL_DEBUG_INFO (mvm,"d0i3 exit completed (wakeup reasons: 0x%x)\n" , + 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);
Signature · 1 line
2.5.1
PATCH 19/21 iwlwifi: mvm: move RX API into its own file
In reply to Luca CoelhoFrom: Johannes Berg <[email protected]>
The RX API is currently mixed up into the general fw-api.h file, but we're going to need to extend it significantly in the future, so move it to its own file.
--- drivers/net/wireless/iwlwifi/mvm/fw-api-rx.h | 238 +++++++++++++++++++++++++++ drivers/net/wireless/iwlwifi/mvm/fw-api.h | 168 +------------------ 2 files changed, 239 insertions(+), 167 deletions(-) create mode 100644 drivers/net/wireless/iwlwifi/mvm/fw-api-rx.h
drivers/net/wireless/iwlwifi/mvm/fw-api-rx.h new file +238 -0
@@ -0,0 +1,238 @@ +/****************************************************************************** +* +* This file is provided under a dual BSD/GPLv2 license. When using or +* redistributing this file, you may do so under either license. +* +* GPL LICENSE SUMMARY +* +* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. +* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH +* Copyright(c) 2015 Intel Deutschland GmbH +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* 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. +* +* Contact Information: +* Intel Linux Wireless <[email protected]> +* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 +* +* BSD LICENSE +* +* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. +* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH +* Copyright(c) 2015 Intel Deutschland GmbH +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name Intel Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*****************************************************************************/ + +#ifndef __fw_api_rx_h__ +#define __fw_api_rx_h__ + +#define IWL_RX_INFO_PHY_CNT 8 +#define IWL_RX_INFO_ENERGY_ANT_ABC_IDX 1 +#define IWL_RX_INFO_ENERGY_ANT_A_MSK 0x000000ff +#define IWL_RX_INFO_ENERGY_ANT_B_MSK 0x0000ff00 +#define IWL_RX_INFO_ENERGY_ANT_C_MSK 0x00ff0000 +#define IWL_RX_INFO_ENERGY_ANT_A_POS 0 +#define IWL_RX_INFO_ENERGY_ANT_B_POS 8 +#define IWL_RX_INFO_ENERGY_ANT_C_POS 16 + +/** +* struct iwl_rx_phy_info - phy info +* (REPLY_RX_PHY_CMD = 0xc0) +* @non_cfg_phy_cnt: non configurable DSP phy data byte count +* @cfg_phy_cnt: configurable DSP phy data byte count +* @stat_id: configurable DSP phy data set ID +* @reserved1: +* @system_timestamp: GP2 at on air rise +* @timestamp: TSF at on air rise +* @beacon_time_stamp: beacon at on-air rise +* @phy_flags: general phy flags: band, modulation, ... +* @channel: channel number +* @non_cfg_phy_buf: for various implementations of non_cfg_phy +* @rate_n_flags: RATE_MCS_* +* @byte_count: frame's byte-count +* @frame_time: frame's time on the air, based on byte count and frame rate +* calculation +* @mac_active_msk: what MACs were active when the frame was received +* +* Before each Rx, the device sends this data. It contains PHY information +* about the reception of the packet. +*/ +struct iwl_rx_phy_info { +u8 non_cfg_phy_cnt; +u8 cfg_phy_cnt; +u8 stat_id; +u8 reserved1; +__le32 system_timestamp; +__le64 timestamp; +__le32 beacon_time_stamp; +__le16 phy_flags; +__le16 channel; +__le32 non_cfg_phy[IWL_RX_INFO_PHY_CNT ]; +__le32 rate_n_flags; +__le32 byte_count; +__le16 mac_active_msk; +__le16 frame_time; +} __packed; + +/* +* TCP offload Rx assist info +* +* bits 0:3 - reserved +* bits 4:7 - MIC CRC length +* bits 8:12 - MAC header length +* bit 13 - Padding indication +* bit 14 - A-AMSDU indication +* bit 15 - Offload enabled +*/ +enum iwl_csum_rx_assist_info { +CSUM_RXA_RESERVED_MASK =0x000f , +CSUM_RXA_MICSIZE_MASK =0x00f0 , +CSUM_RXA_HEADERLEN_MASK =0x1f00 , +CSUM_RXA_PADD =BIT (13 ), +CSUM_RXA_AMSDU =BIT (14 ), +CSUM_RXA_ENA =BIT (15 ) +}; + +/** +* struct iwl_rx_mpdu_res_start - phy info +* @assist: see CSUM_RX_ASSIST_ above +*/ +struct iwl_rx_mpdu_res_start { +__le16 byte_count; +__le16 assist; +} __packed;/* _RX_MPDU_RES_START_API_S_VER_2 */ + +/** +* enum iwl_rx_phy_flags - to parse %iwl_rx_phy_info phy_flags +* @RX_RES_PHY_FLAGS_BAND_24: true if the packet was received on 2.4 band +* @RX_RES_PHY_FLAGS_MOD_CCK: +* @RX_RES_PHY_FLAGS_SHORT_PREAMBLE: true if packet's preamble was short +* @RX_RES_PHY_FLAGS_NARROW_BAND: +* @RX_RES_PHY_FLAGS_ANTENNA: antenna on which the packet was received +* @RX_RES_PHY_FLAGS_AGG: set if the packet was part of an A-MPDU +* @RX_RES_PHY_FLAGS_OFDM_HT: The frame was an HT frame +* @RX_RES_PHY_FLAGS_OFDM_GF: The frame used GF preamble +* @RX_RES_PHY_FLAGS_OFDM_VHT: The frame was a VHT frame +*/ +enum iwl_rx_phy_flags { +RX_RES_PHY_FLAGS_BAND_24 =BIT (0 ), +RX_RES_PHY_FLAGS_MOD_CCK =BIT (1 ), +RX_RES_PHY_FLAGS_SHORT_PREAMBLE =BIT (2 ), +RX_RES_PHY_FLAGS_NARROW_BAND =BIT (3 ), +RX_RES_PHY_FLAGS_ANTENNA = (0x7 <<4 ), +RX_RES_PHY_FLAGS_ANTENNA_POS =4 , +RX_RES_PHY_FLAGS_AGG =BIT (7 ), +RX_RES_PHY_FLAGS_OFDM_HT =BIT (8 ), +RX_RES_PHY_FLAGS_OFDM_GF =BIT (9 ), +RX_RES_PHY_FLAGS_OFDM_VHT =BIT (10 ), +}; + +/** +* enum iwl_mvm_rx_status - written by fw for each Rx packet +* @RX_MPDU_RES_STATUS_CRC_OK: CRC is fine +* @RX_MPDU_RES_STATUS_OVERRUN_OK: there was no RXE overflow +* @RX_MPDU_RES_STATUS_SRC_STA_FOUND: +* @RX_MPDU_RES_STATUS_KEY_VALID: +* @RX_MPDU_RES_STATUS_KEY_PARAM_OK: +* @RX_MPDU_RES_STATUS_ICV_OK: ICV is fine, if not, the packet is destroyed +* @RX_MPDU_RES_STATUS_MIC_OK: used for CCM alg only. TKIP MIC is checked +* in the driver. +* @RX_MPDU_RES_STATUS_TTAK_OK: TTAK is fine +* @RX_MPDU_RES_STATUS_MNG_FRAME_REPLAY_ERR: valid for alg = CCM_CMAC or +* alg = CCM only. Checks replay attack for 11w frames. Relevant only if +* %RX_MPDU_RES_STATUS_ROBUST_MNG_FRAME is set. +* @RX_MPDU_RES_STATUS_SEC_NO_ENC: this frame is not encrypted +* @RX_MPDU_RES_STATUS_SEC_WEP_ENC: this frame is encrypted using WEP +* @RX_MPDU_RES_STATUS_SEC_CCM_ENC: this frame is encrypted using CCM +* @RX_MPDU_RES_STATUS_SEC_TKIP_ENC: this frame is encrypted using TKIP +* @RX_MPDU_RES_STATUS_SEC_CCM_CMAC_ENC: this frame is encrypted using CCM_CMAC +* @RX_MPDU_RES_STATUS_SEC_ENC_ERR: this frame couldn't be decrypted +* @RX_MPDU_RES_STATUS_SEC_ENC_MSK: bitmask of the encryption algorithm +* @RX_MPDU_RES_STATUS_DEC_DONE: this frame has been successfully decrypted +* @RX_MPDU_RES_STATUS_PROTECT_FRAME_BIT_CMP: +* @RX_MPDU_RES_STATUS_EXT_IV_BIT_CMP: +* @RX_MPDU_RES_STATUS_KEY_ID_CMP_BIT: +* @RX_MPDU_RES_STATUS_ROBUST_MNG_FRAME: this frame is an 11w management frame +* @RX_MPDU_RES_STATUS_CSUM_DONE: checksum was done by the hw +* @RX_MPDU_RES_STATUS_CSUM_OK: checksum found no errors +* @RX_MPDU_RES_STATUS_HASH_INDEX_MSK: +* @RX_MPDU_RES_STATUS_STA_ID_MSK: +* @RX_MPDU_RES_STATUS_RRF_KILL: +* @RX_MPDU_RES_STATUS_FILTERING_MSK: +* @RX_MPDU_RES_STATUS2_FILTERING_MSK: +*/ +enum iwl_mvm_rx_status { +RX_MPDU_RES_STATUS_CRC_OK =BIT (0 ), +RX_MPDU_RES_STATUS_OVERRUN_OK =BIT (1 ), +RX_MPDU_RES_STATUS_SRC_STA_FOUND =BIT (2 ), +RX_MPDU_RES_STATUS_KEY_VALID =BIT (3 ), +RX_MPDU_RES_STATUS_KEY_PARAM_OK =BIT (4 ), +RX_MPDU_RES_STATUS_ICV_OK =BIT (5 ), +RX_MPDU_RES_STATUS_MIC_OK =BIT (6 ), +RX_MPDU_RES_STATUS_TTAK_OK =BIT (7 ), +RX_MPDU_RES_STATUS_MNG_FRAME_REPLAY_ERR =BIT (7 ), +RX_MPDU_RES_STATUS_SEC_NO_ENC = (0 <<8 ), +RX_MPDU_RES_STATUS_SEC_WEP_ENC = (1 <<8 ), +RX_MPDU_RES_STATUS_SEC_CCM_ENC = (2 <<8 ), +RX_MPDU_RES_STATUS_SEC_TKIP_ENC = (3 <<8 ), +RX_MPDU_RES_STATUS_SEC_EXT_ENC = (4 <<8 ), +RX_MPDU_RES_STATUS_SEC_CCM_CMAC_ENC = (6 <<8 ), +RX_MPDU_RES_STATUS_SEC_ENC_ERR = (7 <<8 ), +RX_MPDU_RES_STATUS_SEC_ENC_MSK = (7 <<8 ), +RX_MPDU_RES_STATUS_DEC_DONE =BIT (11 ), +RX_MPDU_RES_STATUS_PROTECT_FRAME_BIT_CMP =BIT (12 ), +RX_MPDU_RES_STATUS_EXT_IV_BIT_CMP =BIT (13 ), +RX_MPDU_RES_STATUS_KEY_ID_CMP_BIT =BIT (14 ), +RX_MPDU_RES_STATUS_ROBUST_MNG_FRAME =BIT (15 ), +RX_MPDU_RES_STATUS_CSUM_DONE =BIT (16 ), +RX_MPDU_RES_STATUS_CSUM_OK =BIT (17 ), +RX_MPDU_RES_STATUS_HASH_INDEX_MSK = (0x3F0000 ), +RX_MPDU_RES_STATUS_STA_ID_MSK = (0x1f000000 ), +RX_MPDU_RES_STATUS_RRF_KILL =BIT (29 ), +RX_MPDU_RES_STATUS_FILTERING_MSK = (0xc00000 ), +RX_MPDU_RES_STATUS2_FILTERING_MSK = (0xc0000000 ), +}; + +#endif /* __fw_api_rx_h__ */
drivers/net/wireless/iwlwifi/mvm/fw-api.h +1 -167
180 lines not on this page · raw message
Signature · 1 line
2.5.1
PATCH 13/21 iwlwifi: mvm: remove IWL_UCODE_TLV_API_ASYNC_DTM TLV flag
In reply to Luca CoelhoFrom: Emmanuel Grumbach <[email protected]>
This flag is set in all supported firmwares.
--- drivers/net/wireless/iwlwifi/iwl-fw-file.h | 2 -- drivers/net/wireless/iwlwifi/mvm/rx.c | 6 ------ 2 files changed, 8 deletions(-)
drivers/net/wireless/iwlwifi/iwl-fw-file.h +0 -2
@@ -248,7 +248,6 @@ typedef unsigned int __bitwise__ iwl_ucode_tlv_api_t;* longer than the passive one, which is essential for fragmented scan. * @IWL_UCODE_TLV_API_WIFI_MCC_UPDATE: ucode supports MCC updates with source. * @IWL_UCODE_TLV_API_WIDE_CMD_HDR: ucode supports wide command header -* @IWL_UCODE_TLV_API_ASYNC_DTM: Async temperature notifications are supported. * @IWL_UCODE_TLV_API_LQ_SS_PARAMS: Configure STBC/BFER via LQ CMD ss_params * @IWL_UCODE_TLV_API_STATS_V10: uCode supports/uses statistics API version 10 * @IWL_UCODE_TLV_API_NEW_VERSION: new versioning format
@@ -262,7 +261,6 @@ enum iwl_ucode_tlv_api {IWL_UCODE_TLV_API_FRAGMENTED_SCAN = (__force iwl_ucode_tlv_api_t )8 ,IWL_UCODE_TLV_API_WIFI_MCC_UPDATE = (__force iwl_ucode_tlv_api_t )9 ,IWL_UCODE_TLV_API_WIDE_CMD_HDR = (__force iwl_ucode_tlv_api_t )14 , -IWL_UCODE_TLV_API_ASYNC_DTM = (__force iwl_ucode_tlv_api_t )17 ,IWL_UCODE_TLV_API_LQ_SS_PARAMS = (__force iwl_ucode_tlv_api_t )18 ,IWL_UCODE_TLV_API_STATS_V10 = (__force iwl_ucode_tlv_api_t )19 , IWL_UCODE_TLV_API_NEW_VERSION = (__force iwl_ucode_tlv_api_t)20,
drivers/net/wireless/iwlwifi/mvm/rx.c +0 -6
@@ -621,12 +621,6 @@ void iwl_mvm_handle_rx_statistics(struct iwl_mvm *mvm,iwl_mvm_rx_stats_check_trigger (mvm, pkt); -/* Only handle rx statistics temperature changes if async temp -* notifications are not supported -*/ -if (!fw_has_api (&mvm->fw->ucode_capa,IWL_UCODE_TLV_API_ASYNC_DTM )) -iwl_mvm_tt_temp_changed (mvm, temperature); - ieee80211_iterate_active_interfaces(mvm->hw, IEEE80211_IFACE_ITER_NORMAL, iwl_mvm_stat_iterator,
Signature · 1 line
2.5.1
PATCH 12/21 iwlwifi: mvm: remove IWL_UCODE_TLV_API_SINGLE_SCAN_EBS TLV flag
In reply to Luca CoelhoFrom: Emmanuel Grumbach <[email protected]>
All the supported firmwares have this flag set.
--- drivers/net/wireless/iwlwifi/iwl-fw-file.h | 2 -- drivers/net/wireless/iwlwifi/mvm/scan.c | 2 -- 2 files changed, 4 deletions(-)
drivers/net/wireless/iwlwifi/iwl-fw-file.h +0 -2
@@ -248,7 +248,6 @@ typedef unsigned int __bitwise__ iwl_ucode_tlv_api_t;* longer than the passive one, which is essential for fragmented scan. * @IWL_UCODE_TLV_API_WIFI_MCC_UPDATE: ucode supports MCC updates with source. * @IWL_UCODE_TLV_API_WIDE_CMD_HDR: ucode supports wide command header -* @IWL_UCODE_TLV_API_SINGLE_SCAN_EBS: EBS is supported for single scans too. * @IWL_UCODE_TLV_API_ASYNC_DTM: Async temperature notifications are supported. * @IWL_UCODE_TLV_API_LQ_SS_PARAMS: Configure STBC/BFER via LQ CMD ss_params * @IWL_UCODE_TLV_API_STATS_V10: uCode supports/uses statistics API version 10
@@ -263,7 +262,6 @@ enum iwl_ucode_tlv_api {IWL_UCODE_TLV_API_FRAGMENTED_SCAN = (__force iwl_ucode_tlv_api_t )8 ,IWL_UCODE_TLV_API_WIFI_MCC_UPDATE = (__force iwl_ucode_tlv_api_t )9 ,IWL_UCODE_TLV_API_WIDE_CMD_HDR = (__force iwl_ucode_tlv_api_t )14 , -IWL_UCODE_TLV_API_SINGLE_SCAN_EBS = (__force iwl_ucode_tlv_api_t )16 ,IWL_UCODE_TLV_API_ASYNC_DTM = (__force iwl_ucode_tlv_api_t )17 ,IWL_UCODE_TLV_API_LQ_SS_PARAMS = (__force iwl_ucode_tlv_api_t )18 , IWL_UCODE_TLV_API_STATS_V10 = (__force iwl_ucode_tlv_api_t)19,
drivers/net/wireless/iwlwifi/mvm/scan.c +0 -2
@@ -750,8 +750,6 @@ static inline bool iwl_mvm_scan_use_ebs(struct iwl_mvm *mvm,*/ return ((capa->flags &IWL_UCODE_TLV_FLAGS_EBS_SUPPORT ) && mvm->last_ebs_successful && - (n_iterations >1 || -fw_has_api (capa,IWL_UCODE_TLV_API_SINGLE_SCAN_EBS )) && vif->type !=NL80211_IFTYPE_P2P_DEVICE ); }
Signature · 1 line
2.5.1
PATCH 14/21 iwlwifi: mvm: remove IWL_UCODE_TLV_API_STATS_V10 TLV flag
In reply to Luca CoelhoFrom: Emmanuel Grumbach <[email protected]>
This flag is set in all supported firmwares.
--- drivers/net/wireless/iwlwifi/iwl-fw-file.h | 2 -- drivers/net/wireless/iwlwifi/mvm/fw-api-stats.h | 33 ----------------- drivers/net/wireless/iwlwifi/mvm/rx.c | 47 ++++++++----------------- 3 files changed, 15 insertions(+), 67 deletions(-)
drivers/net/wireless/iwlwifi/iwl-fw-file.h +0 -2
@@ -249,7 +249,6 @@ typedef unsigned int __bitwise__ iwl_ucode_tlv_api_t;* @IWL_UCODE_TLV_API_WIFI_MCC_UPDATE: ucode supports MCC updates with source. * @IWL_UCODE_TLV_API_WIDE_CMD_HDR: ucode supports wide command header * @IWL_UCODE_TLV_API_LQ_SS_PARAMS: Configure STBC/BFER via LQ CMD ss_params -* @IWL_UCODE_TLV_API_STATS_V10: uCode supports/uses statistics API version 10 * @IWL_UCODE_TLV_API_NEW_VERSION: new versioning format * @IWL_UCODE_TLV_API_EXT_SCAN_PRIORITY: scan APIs use 8-level priority * instead of 3.
@@ -262,7 +261,6 @@ enum iwl_ucode_tlv_api {IWL_UCODE_TLV_API_WIFI_MCC_UPDATE = (__force iwl_ucode_tlv_api_t )9 ,IWL_UCODE_TLV_API_WIDE_CMD_HDR = (__force iwl_ucode_tlv_api_t )14 ,IWL_UCODE_TLV_API_LQ_SS_PARAMS = (__force iwl_ucode_tlv_api_t )18 , -IWL_UCODE_TLV_API_STATS_V10 = (__force iwl_ucode_tlv_api_t )19 ,IWL_UCODE_TLV_API_NEW_VERSION = (__force iwl_ucode_tlv_api_t )20 ,IWL_UCODE_TLV_API_EXT_SCAN_PRIORITY = (__force iwl_ucode_tlv_api_t )24 , IWL_UCODE_TLV_API_TX_POWER_CHAIN = (__force iwl_ucode_tlv_api_t)27,
drivers/net/wireless/iwlwifi/mvm/fw-api-stats.h +0 -33
@@ -219,32 +219,6 @@ struct mvm_statistics_bt_activity {__le32 lo_priority_rx_denied_cnt; } __packed;/* STATISTICS_BT_ACTIVITY_API_S_VER_1 */ -struct mvm_statistics_general_v5 { -__le32 radio_temperature; -__le32 radio_voltage; -struct mvm_statistics_dbg dbg; -__le32 sleep_time; -__le32 slots_out; -__le32 slots_idle; -__le32 ttl_timestamp; -struct mvm_statistics_div slow_div; -__le32 rx_enable_counter; -/* -* num_of_sos_states: -* count the number of times we have to re-tune -* in order to get out of bad PHY status -*/ -__le32 num_of_sos_states; -__le32 beacon_filtered; -__le32 missed_beacons; -u8 beacon_filter_average_energy; -u8 beacon_filter_reason; -u8 beacon_filter_current_energy; -u8 beacon_filter_reserved; -__le32 beacon_filter_delta_time; -struct mvm_statistics_bt_activity bt_activity; -} __packed;/* STATISTICS_GENERAL_API_S_VER_5 */ -struct mvm_statistics_general_v8 {__le32 radio_temperature;__le32 radio_voltage;
@@ -293,13 +267,6 @@ struct mvm_statistics_rx {* STATISTICS_CMD (0x9c), below. */ -struct iwl_notif_statistics_v8 { -__le32 flag; -struct mvm_statistics_rx rx; -struct mvm_statistics_tx tx; -struct mvm_statistics_general_v5 general; -} __packed;/* STATISTICS_NTFY_API_S_VER_8 */ -struct iwl_notif_statistics_v10 {__le32 flag;struct mvm_statistics_rx rx;
drivers/net/wireless/iwlwifi/mvm/rx.c +15 -32
62 lines not on this page · raw message
Signature · 1 line
2.5.1
PATCH 17/21 iwlwifi: mvm: remove pointless cfg_phy_cnt length check
In reply to Luca CoelhoFrom: Johannes Berg <[email protected]>
Since the driver can never configure the data here, this field will always be reported as 0 by the firmware. Even if this was not the case, however, it wouldn't matter since the extra data would be added beyond the end of the phy_info structure we use in the driver, so wouldn't harm anything in this code either.
--- drivers/net/wireless/iwlwifi/mvm/rx.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/net/wireless/iwlwifi/mvm/rx.c +0 -7
@@ -298,13 +298,6 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi,return ; } -if ((unlikely (phy_info->cfg_phy_cnt >20 ))) { -IWL_DEBUG_DROP (mvm,"dsp size out of range [0,20]: %d\n" , - phy_info->cfg_phy_cnt); -kfree_skb (skb); -return ; - } -/* * Keep packets with CRC errors (and with overrun) for monitor mode * (otherwise the firmware discards them) but mark them as bad.
Signature · 1 line
2.5.1
PATCH 16/21 iwlwifi: mvm: remove useless debug message from RX
In reply to Luca CoelhoFrom: Johannes Berg <[email protected]>
This message is useless - it's in the good case that always happens so enabling it doesn't really help. Just remove it. There are other ways to debug this (e.g. tracing) so there's no need to add a message in the bad case.
--- drivers/net/wireless/iwlwifi/mvm/rx.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/wireless/iwlwifi/mvm/rx.c +0 -1
@@ -202,7 +202,6 @@ static u32 iwl_mvm_set_mac80211_rx_flag(struct iwl_mvm *mvm,return -1 ; stats->flag |=RX_FLAG_DECRYPTED ; -IWL_DEBUG_WEP (mvm,"hw decrypted CCMP successfully\n" ); *crypt_len =IEEE80211_CCMP_HDR_LEN ;return 0 ;
Signature · 1 line
2.5.1
PATCH 15/21 iwlwifi: mvm: make sure AP is operating for ToF
In reply to Luca CoelhoFrom: Johannes Berg <[email protected]>
It's possible for an AP interface to be UP but not actually operating (i.e. not beaconing etc.) - in this case it can't actually do ToF, so check for it.
--- drivers/net/wireless/iwlwifi/mvm/tof.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/iwlwifi/mvm/tof.c +2 -1
@@ -178,7 +178,8 @@ int iwl_mvm_tof_responder_cmd(struct iwl_mvm *mvm,if (!fw_has_capa (&mvm->fw->ucode_capa,IWL_UCODE_TLV_CAPA_TOF_SUPPORT ))return -EINVAL ; -if (vif->p2p || vif->type !=NL80211_IFTYPE_AP ) { +if (vif->p2p || vif->type !=NL80211_IFTYPE_AP || + !mvmvif->ap_ibss_active) {IWL_ERR (mvm,"Cannot start responder, not in AP mode\n" );return -EIO ; }
Signature · 1 line
2.5.1
Quoted 5 lines · Luca Coelho
This is our first pull request for 4.4. This is also my first pull -request for iwlwifi, so bear with me and let me know if there are any issues. And please don't come here to beat me up physically if I did something wrong (it's scary to send pull requests to maintainers that are just a couple of hours drive away). :)
Hehe, don't worry everything was perfect :)
Quoted 24 lines
The following changes since commit
5865f3658ba37c54e346b0fdee08a1c7a152681b:iwlwifi: mvm: bump firmware API to 17 (2015-08-23 12:54:16 +0300)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.gittags/iwlwifi-next-for-kalle-2015-09-21for you to fetch changes up to
7c014e35a018187462f2cd6c85259e080663ba2d:iwlwifi: mvm: add debug print for d0i3 exit indication (2015-09-21 18:08:46 +0300)
----------------------------------------------------------------
* some debugfs improvements;
* fix signedness in beacon statistics;
* deinline some functions to reduce size when device tracing is enabled;
* filter beacons out in AP mode when no stations are associated;
* deprecate firmwares version -12;
* fix a runtime PM vs. legacy suspend race;
* one-liner fix for a ToF bug;
* clean-ups in the rx code;
* small debugging improvement;
* fix WoWLAN with new firmware versions;
Quoted 1 line
----------------------------------------------------------------
Thanks, pulled.
Signature · 1 line
Kalle Valo