Commit Graph

859292 Commits

Author SHA1 Message Date
Shahar S Matityahu
a1af4c486a iwlwifi: dbg_ini: use function to check if ini dbg mode is on
use iwl_trans_dbg_ini_valid function instead of a boolean value check if
dbg_ini mode is on. It is needed for a future patch.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:20 +03:00
Luca Coelho
4a7bd3cf83 iwlwifi: remove duplicate FW string definitions
The string we define as IWL_22000_HR_B_F0_FW_PRE is duplicate with
IWL_22000_QU_B_HR_B_FW_PRE.  Remove the former to avoid confusion.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:20 +03:00
Luca Coelho
2196ea9c8d iwlwifi: bump FW API to 50 for 22000 series
Start supporting API version 50 for 22000 series.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:20 +03:00
Johannes Berg
94c4a2e4c0 iwlwifi: api: fix FTM struct documentation
The real name is struct iwl_tof_range_req_ext_cmd, fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:20 +03:00
Gil Adam
6ce1e5c0c2 iwlwifi: support per-platform antenna gain
TX power limits as defined in the OTP assume the worst case scenario
in terms of the platform's atenna gain, but most platforms are below
that value so they can use more TX power without passing the regulatory
limit. If the platform indicates in the BIOS that it indeed has lower
gain, and the geographic location allows it, higher TX power can be
used. The driver reads the PPAG (Per-Platform Antenna Gain) data from
BIOS (if it exists), validates it and sends the appropriate command to
the FW. This flow happens once at FW init, in case of suspend/resume
there is no need to read again from BIOS as we save those values during
init, so just send the PPAG command again to FW.

Signed-off-by: Gil Adam <gil.adam@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:20 +03:00
Luca Coelho
e533f74589 iwlwifi: mvm: remove check for lq_sta in __iwl_mvm_rs_tx_status()
The check is not necessary anymore, because now the struct is not
allocated separately, but is part of the mvmsta struct.  Remove the
check, since it's dead code.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:19 +03:00
Emmanuel Grumbach
0202bcf0e3 iwlwifi: mvm: simplify the channel switch flow for newer firmware
Any firmware that supports the new channel switch flow is
able to close / re-open the queues when needed. It takes
into account the channel switch mode etc...
Don't open / close the queues or enable / disable beacon
abort before and after the channel switch in case the
firmware is able to do this by itself.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:19 +03:00
Christoph Hellwig
2d46f7af5e iwlwifi: stop passing bogus gfp flags arguments to dma_alloc_coherent
dma_alloc_coherent is not just the page allocator.  The only valid
arguments to pass are either GFP_ATOMIC or GFP_ATOMIC with possible
modifiers of __GFP_NORETRY or __GFP_NOWARN.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:19 +03:00
Shahar S Matityahu
5b79c32352 iwlwifi: dbg_ini: remove periphery phy and aux regions handling
periphery phy and aux regions should not be collected like periphery mac
region. Remove their handling. The handling will be added in the future
once the FW will support it.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Fixes: 7a14c23dcd ("iwlwifi: dbg: dump data according to the new ini TLVs")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:18 +03:00
Shahar S Matityahu
40b7d22d1f iwlwifi: dbg_ini: use linked list to store debug TLVs
Use a linked list to maintain the debug TLVs instead of a single buffer.
This way, the driver does not need to iterate over the binary file twice
and allocates smaller chunks of memory. Also, in case one allocation
fails the driver will work with the partial configuration instead of
aborting the entire debug configuration.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:18 +03:00
Shahar S Matityahu
ccdc3d6d15 iwlwifi: dbg_ini: maintain buffer allocations from trans instead of TLVs buffer
Maintain DRAM debug buffer status in trans instead of keeping it as
part of the TLVs buffer to avoid allocating extra space for it.
Needed for future changes.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:18 +03:00
Shahar S Matityahu
15995b7593 iwlwifi: dbg: add debug periphery registers to 9000 device family
Add debug HW periphery registers to 9000 device family.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:18 +03:00
Haim Dreyfuss
1971c4f9d9 iwlwifi: remove unused regdb_ptrs allocation
regdb_ptrs is not in used anymore, remove it.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:18 +03:00
Shahar S Matityahu
41874d3a0b iwlwifi: dbg_ini: align dbg tlv functions names to a single format
align the naming to iwl_dbg_tlv_*

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:17 +03:00
Ayala Beker
b5baefdad2 iwlwifi: scan: don't pass large argument by value
Function iwl_mvm_scan_set_legacy_probe_req() second argument
size is too large to be passed by value.
Fix it to be passed by reference.

Signed-off-by: Ayala Beker <ayala.beker@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:17 +03:00
Emmanuel Grumbach
bab3cb9285 iwlwifi: remove pm_runtime completely
This means:
1) stop calling pm_runtime_resume when starting the hardware
2) removing the unneeded low_power parameter to start / stop hw / fw
   transport ops
3) squashing transport functions that are now the same
   _iwl_trans_pcie_start_hw / iwl_trans_pcie_start_hw

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:17 +03:00
Emmanuel Grumbach
75dfa6d58b iwlwifi: remove the d0i3 related module parameters
Those are now effectless.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:17 +03:00
Emmanuel Grumbach
043fa90173 iwlwifi: pcie: remove some more d0i3 code from the transport
CMD_SEND_IN_IDLE, CMD_MAKE_TRANS_IDLE and CMD_WAKE_UP_TRANS
are not used. Remove them.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:17 +03:00
Emmanuel Grumbach
0d52497ac8 iwlwifi: pcie: remove the refs / unrefs from the transport
This code is now stale

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:17 +03:00
Emmanuel Grumbach
ea74343aeb iwlwifi: remove the opmode's d0i3 handlers
Remove the now unneeded functions that called those from the
transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:16 +03:00
Emmanuel Grumbach
f60e275081 iwlwifi: remove runtime_pm_mode
This is always set to IWL_PLAT_PM_MODE_DISABLED

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:16 +03:00
Alex Malamud
ba7136f3f9 iwlwifi: Set w-pointer upon resume according to SN
During D3 state, FW may send packets.
As a result, "write" queue pointer will be incremented by FW.
Upon resume from D3, driver should adjust its shadows of "write" and "read"
pointers to the value reported by FW.

1. Keep TID used during wowlan configuration.
2. Upon resume, set driver's "write" and "read" queue pointers
	to the value reported by FW.

Signed-off-by: Alex Malamud <alex.malamud@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:16 +03:00
Johannes Berg
242d9c8b9a iwlwifi: mvm: use FW thermal monitoring regardless of CONFIG_THERMAL
It doesn't make sense to use the FW thermal monitoring only if we
have CONFIG_THERMAL, because then we use the default thresholds
etc. which may be different from what the firmware implements, as
we don't maintain them in the driver now. Only the CTDP code needs
to actually be under CONFIG_THERMAL.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:16 +03:00
Mordechay Goodstein
2e838c6f18 iwlwifi: mvm: name magic numbers with enum
It's hard to follow the numbers so rename it with enum

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:15 +03:00
Ayala Beker
de645c9346 iwlwifi: scan: add support for new scan request command version
Scan API was changed to support 6Ghz channels as well.
Support the new version.

Signed-off-by: Ayala Beker <ayala.beker@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:15 +03:00
Alex Malamud
aa43ae1216 iwlwifi: LTR updates
New FW versions introduces LTR feature enablement by default.
For such FW versions, driver (mvm/xvt) should not send
host command to enable LTR feature, also it should be possible to
override LTR configuration through the debugfs.

1. Send LTR feature enablement command only for FW versions
which does not advertises SET_LTR_GEN2 capability.
2. Implement ltr_config file in debugfs for LTR configuration override.

Signed-off-by: Alex Malamud <alex.malamud@intel.com>
2019-09-06 15:31:15 +03:00
Emmanuel Grumbach
24d2176d17 iwlwifi: remove the code under IWLWIFI_PCIE_RTPM
This flag should never be set unless integration work with the
platform is done.  We don't support any platforms officially and don't
plan to do so in the near future, so we can remove this option
entirely in order to avoid having it enabled by mistake.

This has been marked with "depends on EXPERT", so there shouldn't be
many systems running with it set.  And, if there are systems, they
should not be using this flag.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:15 +03:00
Emmanuel Grumbach
3596ad2b3e iwlwifi: trans: remove suspending flag
This is set but never read.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:15 +03:00
Emmanuel Grumbach
1877fa3d5f iwlwifi: remove CMD_HIGH_PRIO
This flag is never set on any host command. Remove it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:14 +03:00
Emmanuel Grumbach
66cdca01e0 iwlwifi: mvm: remove last leftovers of d0i3
We're now left with a status bit that is never set and a few
other leftovers.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:14 +03:00
Emmanuel Grumbach
632fa0eabc iwlwifi: mvm: remove iwl_mvm_update_d0i3_power_mode
Also change the signature of the power functions that won't
receive d0i3=true anymore.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:14 +03:00
Emmanuel Grumbach
99970e4afb iwlwifi: mvm: remove d0i3_ap_sta_id
This variable read, but never set. Remove it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:14 +03:00
Emmanuel Grumbach
0ea933880a iwlwifi: mvm: iwl_mvm_wowlan_config_key_params is for wowlan only
Now that d0i3 is dead, this function can't be called from d0i3
flows. Change its signature and make it static.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:13 +03:00
Emmanuel Grumbach
4574536333 iwlwifi: mvm: remove the d0i3 entry/exit flow
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:13 +03:00
Emmanuel Grumbach
4d4183c45e iwlwifi: mvm: remove the tx defer for d0i3
This is not needed anymore

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:13 +03:00
Emmanuel Grumbach
58d3bef416 iwlwifi: remove all the d0i3 references
As part of the d0i3 removal.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:13 +03:00
Emmanuel Grumbach
2b7f47539b iwlwifi: mvm: start to remove the code for d0i3
For runtime PM to work with d0i3 code, a lot of integration work needs
to be done with the platform (e.g. the out-of-band wake up interrupt)
and we currently don't have any platforms where this integration
happened.  So, this code has been pretty much stale for a while and
when someone enables it, it just breaks things.

Therefore, to simplify the code base and make sure no one enables this
by mistake, we will remove the whole code.

This is only the very start, much more work is needed.
Remove the places where we check iwl_mvm_is_d0i3_supported
but leave all the refs, those will be removed in a different
patch.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:13 +03:00
Shaul Triebitz
f38acea63a iwlwifi: mvm: add the skb length to a print
When printing a TX, add to the print the length of the frame.
That will help with BSEP (buffer status report poll) tests.

Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:12 +03:00
Beker Ayala
06eb547c4a iwlwifi: mvm: fix scan config command size
Use the actual length of channels array and not the max capable length.

Signed-off-by: Beker Ayala <ayala.beker@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:12 +03:00
Shahar S Matityahu
60ced7973f iwlwifi: add ldbg config cmd debug print
add support to print ldbg command in mvm and xvt mode

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:12 +03:00
Shahar S Matityahu
576058330f iwlwifi: dbg: support debug recording suspend resume command
Support the new DBGC_SUSPEND_RESUME command to change the recording state.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:12 +03:00
Shahar S Matityahu
203c83d3b2 iwlwifi: dbg: move debug recording stop from trans to op mode
The op mode should stop the debug recording and not the transport layer.
Rename iwl_fwrt_stop_device into iwl_fw_dbg_stop_sync and move the debug
stop recording to it.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:12 +03:00
Shahar S Matityahu
b721f5b1be iwlwifi: dbg: move monitor recording functionality from header file
The recording functions are quite big to be inline and the driver should
expose only the stop and restart functions that are allowed to be used
rather then the internal helper functions. Move the functions from the
header file.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:11 +03:00
Johannes Berg
5a28c2148b iwlwifi: mvm: remove unnecessary forward declarations
These static functions are only used after their definition,
so we don't need the forward declarations.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:11 +03:00
Ilan Peer
4f58121dc4 iwlwifi: mvm: Block 26-tone RU OFDMA transmissions
In case that there are OBSS that do not know how to properly
interpret 26-tone RU OFDMA transmissions, instruct the FW not
to use such transmissions.

The check is currently only performed upon association.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:11 +03:00
Emmanuel Grumbach
07c89a601b iwlwifi: mvm: remove redundant condition in iwl_mvm_set_hw_rfkill_state
If mvm->fwrt.cur_fw_img != IWL_UCODE_INIT, then
rfkill_safe_init_done must be true since
rfkill_safe_init_done is set to true before we start to load
the runtime image.
Remove the redundant condition.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:10 +03:00
Ilia Lin
79660869bf iwlwifi: Send DQA enable command only if TVL is on
The newer targets don't support the DQA enablement command
and will return error status, while older targets need it.
The feature is defined by the corresponding TLV.
Send the command only if the TLV is enabled.

Signed-off-by: Ilia Lin <ilia.lin@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:10 +03:00
Luca Coelho
9cb63bf664 iwlwifi: bump FW API to 49 for 22000 series
Start supporting API version 49 for 22000 series.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06 15:31:10 +03:00
Kalle Valo
a18da8f619 mt76 patches for 5.4
* beacon tx fix for mt76x02
 * sparse/checkpatch warning fixes
 * DFS pattern detector for mt7615 (DFS channels not enabled yet)
 * CSA support for mt7615
 * mt7615 cleanup/fixes
 * mt7615 rate control improvements
 * usb fixes
 * mt7615 powersave buffering fix
 * new device support for mt76x0
 * support for more ciphers in mt7615
 * watchdog time fixes
 * smart carrier sense on mt7615
 * survey support on mt7615
 * multiple interfaces on mt76x02u
 * calibration data fix for mt7615
 * fix for sending BAR after disassoc
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG/MacGPG2 v2
 Comment: GPGTools - http://gpgtools.org
 
 iEYEABECAAYFAl1xNGoACgkQ130UHQKnbvXSxgCfTd+g5fbvbPW31ETNPVITP+UF
 3EoAoNjSe0psgOAiNtys10V/YWy5RZak
 =hYbe
 -----END PGP SIGNATURE-----

Merge tag 'mt76-for-kvalo-2019-09-05' of https://github.com/nbd168/wireless

mt76 patches for 5.4

* beacon tx fix for mt76x02
* sparse/checkpatch warning fixes
* DFS pattern detector for mt7615 (DFS channels not enabled yet)
* CSA support for mt7615
* mt7615 cleanup/fixes
* mt7615 rate control improvements
* usb fixes
* mt7615 powersave buffering fix
* new device support for mt76x0
* support for more ciphers in mt7615
* watchdog time fixes
* smart carrier sense on mt7615
* survey support on mt7615
* multiple interfaces on mt76x02u
* calibration data fix for mt7615
* fix for sending BAR after disassoc
2019-09-06 11:59:32 +03:00
Aya Levin
1297d97f48 net/mlx5e: Add port buffer's congestion counters
Add 3 counters per priority to ethtool using PPCNT:
1) rx_prio[p]_buf_discard - the number of packets discarded by device
   due to lack of per host receive buffers
2) rx_prio[p]_cong_discard - the number of packets discarded by device
   due to per host congestion
3) rx_prio[p]_marked - the number of packets ECN marked by device due
   to per host congestion

Signed-off-by: Aya Levin <ayal@mellanox.com>
Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2019-09-05 14:44:43 -07:00