Age | Commit message (Collapse) | Author |
|
Instead of re-building the power command upon debugfs read,
store the latest command sent to the firmware.
This reduces the code complexity by reducing the number of
entries in the power code.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
The firmware doesn't allow per-vif beacon filtering: we can
use beacon filtering for one vif only. So remember which
vif has beacon filtering enabled in the iterator, and send
the command outside the iterator.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Reduce indentation where it is possible.
Make a function static - it wasn't used outside its file
anyway.
Remove the unneeded pm_prevent state.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Remove the enum abuse (using an enum to store a set of values),
the unneeded ret variable and unnecessary if nesting.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
The Sync to SCO is a feature that allows to synchronize
between the WiFi traffic and the expectable BT traffic
when SCO profile is active.
We need to set the validity bit in the command in the init
flow, and set / clear the enablement bit if we want to
enabled / disable the feature.
While at it, clean up the flags that are not used in the
API.
This feature needs to be enabled / disabled easily, so
export its enablement to constants.h.
Reviewed-by: Eyal Zolotov <eyal.zolotov@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Some older versions of wpa_supplicant don't necessarily stop
scheduled scan before starting a regular scan, and there's
nothing in the API that requires it either. As a consequence
our driver's behaviour of not allowing scan while scheduled
scan was in progress broke userspace.
However, it is valid to unilaterally stop scheduled scan at
any point in time, so when a regular scan request comes just
abort the scheduled scan and run the regular scan.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Fix a potential buffer overrun when creating the fw name
in drv->firmware_name by setting a maximal length to the
char array copied to it.
The maximal length is also updated to 32 rather than 25 to
keep both 32bit and 64bit alignment without requiring
padding to the struct it is in.
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Newer devices have two embedded CPUs, and the firwmare for
both of them is include in the .ucode file requested upon
enumeration.
An empty section with address=0xFFFFCCCC separates between
the sections intended for cpu1 and the sections intended
for cpu2.
Update the driver to parse the .ucode file with this format
and act accordingly.
Signed-off-by: Eran Harary <eran.harary@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
In iwl_mvm_calc_rssi() some values are calculated but then
never used, remove the calculations.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Support taking an mvm ref (and preventing D0i3) by
writing '1' into the d0i3_refs debugfs file.
The reference can be unref by writing 0 to the same
file.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Schedule work to query the wakeup reasons, and
disconnect in some cases (e.g. beacon loss).
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
We need to ask the fw to wake up on incoming packets (that
pass the filters).
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Add d0i3_refs debugfs file that prints the currently taken
mvm D0i3 refs.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
We don't want to go into D0i3, when P2P_CLI, AP (including
GO) or IBSS interfaces are running, so take appropriate
references.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Take a reference when ROC command is started, and
unref it on completion.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Take a reference when starting to scan and release it on completion.
Note that if the scan is cancelled/aborted, a completion will still be
sent up.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Hold a bitmap of taken references, according to the
reference reason (e.g. down, scan).
This will allow us validate our state and add some debugfs
entries later on.
Unref the transport when the FW is fully initialized,
allowing it to go into a low power mode.
Disallow the transition to low-power while recovery is in
progress.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Upon D0i3 entry/exit, iterate over the active interfaces
and configure them appropriately.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Configure skip-over-dtim and beacon filtering on D0i3
enter/exit.
Since the D0i3 entry/exit commands require different
command flags (e.g. CMD_HIGH_PRIORITY), add a new parameter
to the functions being called, and make the current users
pass CMD_SYNC.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
When the bus is in D0i3, we can't send regular commands to
the firmware. This means that we need to add a state to
remember what is our d0i3 state and make sure that only
d0i3 exit commands can be sent.
Add flags to CMD_ flags and transport status for this
purpose.
Commands with CMD_HIGH_PRIO set are queued at the head of
the command queue, behind other high priority commands.
Commands with CMD_SEND_IN_IDLE set can be sent while the
transport is idle (without taking rpm reference).
Commands with CMD_MAKE_TRANS_IDLE set indicate that command
completion should mark the transport as idle (and release
the bus).
Commands with CMD_WAKE_UP_TRANS set instruct the transport
to exit from idle when this command is completed.
The transport is marked as idle (STATUS_TRANS_IDLE) when
the FW enters D0i3 state. This bit is cleared when it
enters D0 state again.
Process only commands with CMD_SEND_IN_IDLE flag while the
transport is idle. Other enqueued commands will be
processed only later, right after exiting D0i3.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Add new enter_d0i3 and exit_d0i3 ops that
will be called by the transport on D0i3 enter/exit.
Each one of these ops will include the host commands
mentionned in the previous patch.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
D0i3 is bus power saving feature. It involves the
firmware - the driver needs to send a list of commands
to the firmware before entering this state. Wake up from
d0i3 also requires a few commands to the firmware.
The trigger to enter D0i3 is an idle timeout that will be
implemented later and will most probably rely on RUNTIME_PM
infrastructure.
In order to prevent entrance to D0i3 in critical flows, we
implement here a reference infrastructure. When a ref is
taken, we can't enter D0i3.
PCIe does't support D0i3.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Signed-off-by: Ido Yariv <idox.yariv@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
The tx backoff settings used by the thermal throttling mechanism can
also be used for enforcing a limit on the power consumption of the module.
Handle the platform PCIe power limitation by translating the limit
(measured in mw) to its respective tx backoff value. The translation is
module specific.
The resulting tx backoff value is sent to the ucode, and also serves as the
minimal backoff value that can be set by the thermal throttling mechanism.
Signed-off-by: Ido Yariv <idox.yariv@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Some platforms may have power limitations on PCIe cards connected to
specific root ports.
This information is encoded as part of the ACPI tables, for instance:
<snip>
Name (SPLX, Package (0x02)
{
Zero,
Package (0x03)
{
0x07,
0x00000500,
0x80000000
}
})
Method (SPLC, 0, Serialized)
{
Return (SPLX)
}
</snip>
The structure returned contains the domain type, the default power
limitation and the default time window (reserved for future use).
Upon PCI probing, call the relevant ACPI method, parse the returned
structure, and save the power limitation.
Signed-off-by: Ido Yariv <idox.yariv@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Divide the maximal quota between all the data interfaces even in the
case of a single low latency binding without any other non low latency
interfaces, so that afterwards the quota allocation (which considers
the number of data interfaces) will be correct.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Currently the quota remainder was added to the first binding, although
it is possible that this was not a data binding (only the P2P_DEVICE
interface is part of the binding).
Fix this by adding the remainder to the first binding that was actually
allocated quota.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Add the vif type when we print the mac params.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
This makes the code a little bit longer as zero-extension
has to be done (mov vs. movzwl), but that's miniscule and
the space saving is significant, about 600 bytes in DVM
and 700 bytes in MVM, so the cache effect should be worth
the few bytes more code.
While at it, remove two spurious blank lines in variable
declaration blocks.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
This will be useful during tests done on the physical layer.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Allow reading and setting bcast filtering configuration
through debugfs.
By default, mvm->bcast_filters is used for setting
the bcast filtering configuration (these filters
will be configured for each associated station).
For testing purposes, allow overriding this configuration,
and setting the bcast filtering configuration manually.
The following debugfs keys can be used:
* bcast_filtering/override - use debugfs values instead
of default configuration
* bcast_filtering/filters - set filters (+ attributes)
* bcast_filtering/macs - per-mac bcast filtering
configuration (policy + attached filters)
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Add our ip as a new attribute to the bcast filtering
configuration (i.e. check the dest ip field of the
arp request).
Add bcast filter to pass incoming dhcp offer
broadcast frames as well (for sta vifs).
In order to support such dynamic configuration,
use the reserved1 field as a bitmap for driver internal
flags (which will indicate we want to configure the ip
in this attribute), and reconfigure the bcast
filtering on BSS_CHANGED_ARP_FILTER indication.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Configure arp request broadcast filter if this
option is enabled, in order to allow only arp
request broadcasts to pass-in.
(A following patch will make this filter even narrower
by limiting the arp request to our own ip)
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Broadcast filtering allows dropping broadcast
frames that don't match the configured patterns.
Use predefined filters, and configure them for
each associated station vif.
There is no need to optimize and attach the same
filter to multiple vifs, as a following patch
will configure each filter to have per-vif unique
values.
Configure the bcast filtering on assoc changes.
Add a new IWLWIFI_BCAST_FILTERING Kconfig option
in order to enable broadcast filtering.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
As a debug tool, we dump the SRAM from the device when an
error occurs. The main users of this want it in a different
format, so change the format to suit their needs.
Also - add a short delay between the prints to make sure
that the user space logger can catch up.
This happens only when the firmware asserts, and only when
fw_restart is set to 0 which is typically a testing
configuration.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Based on the Bluetooth activity grading, we can stop using
the shared antenna and ask the stations to honor the new
SMPS state.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
If a vif is in low latency mode, it should be in primary
channel.
Also tell BT Coex about the change when a vif enters or
exits low latency mode.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Limit the scheduling duration of bindings without a low-latency
interface in the firmware, this prevents those bindings from
occupying the medium for a period of time longer than what we
want for the other interfaces in low-latency mode.
As older firmware doesn't do anything with the max_duration field
and ignores it completely, there's no need for a firmware flag.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
If there is/are interface(s) in low-latency mode, reserve a
percentage (currently 64%) of the quota for that binding to
improve the quality of service for those interfaces. However,
if there's more than one binding that has low-latency, then
give up and don't reserve, we can't allocate more than 100%.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
While an interface is in low-latency mode, for now powersave
should be disabled for it, so take low-latency into account
in the powersave code and force powersave recalculation when
low-latency mode changes.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
For various traffic use cases, we want to be able to treat multi-
channel scenarios differently. Introduce a low-latency framework
that currently only has a debugfs file to enable low-latency mode,
but can later be extended.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Notify scan completed if fw_restart flow isn't going to be run.
Otherwise, the scan will stay stack forever and mac80211 will
not be able to remove the interface.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Don't stop scheduled scan before reporting HW restart;
mac80211 was changed to reschedule it after reconfigure.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
In iwl_pcie_int_cause_non_ict, trans_pcie is used for lockdep
purposes only. Since this might not be enabled, trans_pcie
finds itself without user leading to a complaint from gcc.
Avoid using trans_pcie by inlining IWL_TRANS_GET_PCIE_TRANS.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
Since we use IWL_MVM_STATION_COUNT all over the driver, we
need to make sure that it is the right constant to look at.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
We somtimes need to fetch the iwl_mvm_sta structure from a
station index - provide a helper to do that.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
The calib_version is 255 and this is perfectly fine - no
need to leave a TODO there.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|