Sara Sharon [Thu, 19 Nov 2015 09:53:49 +0000 (11:53 +0200)]
iwlwifi: mvm: change protocol offload flows
RFC4862 states that "In all cases, a node MUST NOT respond to
a Neighbor Solicitation for a tentative address".
Currently the driver configures the NS offload and does not wait
for address to become permanent, thus violating the RFC.
Just removing the address from the address list is not good enough
for all cases, since the NS messages are needed for the duplicate
address detection and should not be discarded.
For d0i3 disable NS offload. Put tentative address in the address
list so the NS packet will not be filtered out by ucode.
For D3 the platform will not wake from NS packets - so enable
NS offload while removing the tentative address from the list.
Given that now NS offload might be disabled, and that the ucode
uses the IP data for other puroposes (L3 filtering) add two
independent flags indicating if IPv4\IPv6 data is valid.
Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Golan Ben-Ami [Sun, 30 Aug 2015 14:41:36 +0000 (17:41 +0300)]
iwlwifi: expose fw usniffer mode to more utilities
Today, in order to configure fw in usniffer mode, the ucode
must have the corresponding tlv, which is revealed to the driver
while parsing the ucode.
Expose the mode of the usniffer to other utilities in the driver
(other than the ucode parser) by passing back a pointer to the value.
This can be very useful for allowing configuring the fw dbg data
using an external configuration file, because this configuration
depends on the fw usniffer mode.
iwlwifi: replace d0i3_mode and wowlan_d0i3 with more generic variables
The d0i3_mode variable is used to distinguish between transports that
handle d0i3 entry during suspend by themselves (i.e. the slave
transports) and those which rely on the op_mode layer to do it. The
reason why the former do it by themselves is that they need to
transition from d0i3 in runtime_suspend into d0i3 in system-wide
suspend and this transition needs to happen before the op_mode's
suspend flow is called.
The wowlan_d0i3 element is also a bit confusing, because it just
reflects the wowlan->any value for the trans to understand. This is a
bit unclear in the code and not generic enough for future use.
To make it clearer and to generalize the platform power mode settings,
introduce two variables to indicate the platform power management
modes used by the transport.
Additionally, in order not to take too big a step in one patch, treat
this new variables semantically in the same way as the old d0i3_mode
element, introducing a iwl_mvm_enter_d0i3_on_suspend() function to
help with that.
This commit also adds the foundation for a new concept where the
firmware configuration state (i.e. D0, D3 or D0i3) is abstracted from
the platform PM mode we are in (i.e. runtime suspend or system-wide
suspend).
Eliad Peller [Thu, 10 Dec 2015 13:47:11 +0000 (15:47 +0200)]
iwlwifi: avoid d0i3 commands when no/init ucode is loaded
d0i3 commands are not supported in the init image, so take
a reference to ensure we don't enter d0i3 during init image,
and additional checks to prevent d0i3 commands when no
fw image is loaded.
Add a few WARN_ON_ONCE to the d0i3 enter/exit commands
to ensure we send d0i3 commands only when the normal
ucode is loaded.
iwlwifi: mvm: close the SP if we send fewer frames than expected in SP
When we have holes in the BA window, there might be frames
that have been ACKed between the read and the right
pointers. This means that these frames won't be scheduled
again by the SCD and the firwmare won't see them.
This invalidates the number of frames we tell the firmware
to send. When we detect this case, tell mac80211 to close
the SP and to send an EOSP so that the firmware can be in
sync.
Merge tag 'mac80211-next-for-davem-2015-12-07' into next
This pull request got a bit bigger than I wanted, due to
needing to reshuffle and fix some bugs. I merged mac80211
to get the right base for some of these changes.
* new mac80211 API for upcoming driver changes: EOSP handling,
key iteration
* scan abort changes allowing to cancel an ongoing scan
* VHT IBSS 80+80 MHz support
* re-enable full AP client state tracking after fixes
* various small fixes (that weren't relevant for mac80211)
* various cleanups
iwlwifi: block the queues when we send ADD_STA for uAPSD
We send an ADD_STA to instruct the firmware to release
frames despite the peer being in PS.
Since the ADD_STA command and the Tx frame that comes
immediately afterwards can be reordered by the DMA engine,
we need to block the Tx queues until the firmware replies
with the ADD_STA response.
iwlwifi: trans: support a callback for ASYNC commands
This allows the op_mode to request from the transport to
call a callback when an ASYNC commands is completed by
the firmware. The same callback will be called for all the
commands. Pass the command whose response triggers the
callback as a parameter to the callback itself.
iwlwifi: pcie: allow the op_mode to block the tx queues
In certain flows (see next patches), the op_mode may need to
block the Tx queues for a short period. Provide an API for
that. The transport is in charge of counting the number of
times the queues are blocked since the op_mode may block the
queues several times in a row before unblocking them.
Eliad Peller [Sun, 15 Nov 2015 13:44:17 +0000 (15:44 +0200)]
iwlwifi: mvm: check iwl_mvm_wowlan_config_key_params() return value
commit 9a4c830007817e ("iwlwifi: mvm: refactor d3 key
update functions") refactored some code into
iwl_mvm_wowlan_config_key_params() function, but the
return value was never checked, and not all the function
flows returned valid values. fix it.
Eliad Peller [Wed, 9 Dec 2015 14:33:20 +0000 (16:33 +0200)]
iwlwifi: mvm: cleanup roc te on restart cleanup
iwl_mvm_restart_cleanup() calls ieee80211_remain_on_channel_expired()
on cleanup, but it doesn't clean the actual roc time
events, resulting in failure of further ROC attempts.
Refactor iwl_mvm_stop_roc() a bit, and add a new function
to only cleanup the roc time events (without sending further
commands).
Curly braces are NOT intended, the extra tab was added by mistake in
commit 1a616dd2f171 ('iwlwifi: dump prph registers in a common place
for all transports').
type=cleanup
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Fri, 17 Apr 2015 14:39:12 +0000 (16:39 +0200)]
iwlwifi: dvm: advertise NETIF_F_SG
If the transport supports it, advertise NETIF_F_SG to mac80211 to
be able to use frag SKBs. This will already improve performance by
allowing software GSO to be used.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Fri, 17 Apr 2015 14:39:12 +0000 (16:39 +0200)]
iwlwifi: mvm: advertise NETIF_F_SG
If the transport supports it, advertise NETIF_F_SG to mac80211 to
be able to use frag SKBs. This will already improve performance by
allowing software GSO to be used.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Thu, 19 Nov 2015 16:37:31 +0000 (18:37 +0200)]
iwlwifi: mvm: rs: fix a potential out of bounds access
Klocwork pointed these out. There is a theoretical possibility
that rate->index might be set to IWL_RATE_INVALID (15).
This could trigger an out of bounds access on ht_vht_rates or
legacy_rates arrays. Fix it by adding some checks.
Avraham Stern [Thu, 26 Nov 2015 09:22:33 +0000 (11:22 +0200)]
iwlwifi: mvm: configure scheduled scan according to traffic conditions
Change scan configuration (dwell time, suspend time etc.) according
to traffic conditions. This is useful for scans that are managed by
the FW (e.g. scheduled scan).
iwlwifi: mvm: set default new STA as non-aggregated
When sending the first ADD_STA HCMD for a STA, the %add_modify
field indicates an addition of a STA and not a modification
of one. In such a case, all fields of the HCMD are used to
initialize the corresponding fields in the FW, regardless of
what bits are set in %modify_mask.
Set the %tid_disable_tx field to mvm_sta->tid_disable_agg in
iwl_mvm_sta_send_to_fw(). If the STA is only updated this will
have no effect, but if it is added - it will make sure the
STA starts with the correct queues - if any - configured as
non-aggregated by default (until told otherwise).
Gregory Greenman [Tue, 24 Nov 2015 17:13:27 +0000 (19:13 +0200)]
iwlwifi: mvm: add an option to start rs from HT/VHT rates
Extend the configurable option of setting initial rate to RSSI based.
Make the initial rate to be set to VHT/HT SISO or legacy depending on
the AP capabilities.
Ilan Peer [Sun, 6 Dec 2015 19:19:15 +0000 (21:19 +0200)]
mac80211: handle HW ROC expired properly
In case of HW ROC, when the driver reports that the ROC expired,
it is not sufficient to purge the ROCs based on the remaining
time, as it possible that the device finished the ROC session
before the actual requested duration.
To handle such cases, in case of ROC expired notification from
the driver, complete all the ROCs which are marked with hw_begun,
regardless of the remaining duration.
Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Luca Coelho [Wed, 25 Nov 2015 20:15:32 +0000 (22:15 +0200)]
iwlwifi: mvm: don't keep an mvm ref when the interface is down
There is no reason to keep a reference when the interface is down,
since we are not really doing anything. The reference is only needed
when the mac80211 start op (or a hw restart) is running, to prevent
going into runtime or system supend in the meantime. This will allow
us to support runtime PM when the interface is down (in another
patch).
Adam Welle [Tue, 1 Dec 2015 22:13:52 +0000 (17:13 -0500)]
mac80211_hwsim: check ATTR_FREQ for wmediumd (netlink) packets
If a packet is received from netlink with the frequency value set it is
checked against the current radio's frequency and discarded if different.
The frequency is also checked against data2->tmp_chan to support the "hw"
off-channel/scan case.
Signed-off-by: Adam Welle <arwelle@cert.org>
[allow both simultaneously, add locking] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 1 Dec 2015 22:15:26 +0000 (23:15 +0100)]
mac80211: reject zero cookie in mgmt-tx/roc cancel
When cancelling, you can cancel "any" (first in list) mgmt-tx
or remain-on-channel operation by using the value 0 for the
cookie along with the *opposite* operation, i.e.
* cancel the first mgmt-tx by cancelling roc with 0 cookie
* cancel the first roc by cancelling mgmt-tx with 0 cookie
This isn't really that bad since userspace should only pass
cookies that we gave it, but could lead to hard-to-debug
issues so better prevent it and reject zero values since we
never hand those out.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 6 Nov 2015 10:57:23 +0000 (11:57 +0100)]
mac80211_hwsim: stop using pointers as cookies
Instead of using pointers, use sequentially assigned cookies.
This is easier to understand while debugging and also avoids
problems when the pointer is reused for the next allocation.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Jouni Malinen [Thu, 26 Nov 2015 18:50:12 +0000 (20:50 +0200)]
mac80211_hwsim: Update timestamp in Probe Response frames
Previously, this was done only for Beacon frames, but similar timestamp
update is needed for Probe Response frames to make these more accurately
match the real IEEE 802.11 behavior. Previously, all zeros timestamp was
sent in Probe Response frames.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Jouni Malinen [Thu, 26 Nov 2015 18:49:38 +0000 (20:49 +0200)]
mac80211: Allow a STA to join an IBSS with 80+80 MHz channel
While it was possible to create an IBSS with 80+80 MHz channel, joining
such an IBSS resulted in falling back to 20 MHz channel with VHT
disabled due to a missing switch case for 80+80.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 23 Nov 2015 22:53:51 +0000 (23:53 +0100)]
mac80211: rewrite remain-on-channel logic
Jouni found a bug in the remain-on-channel logic: when a short item
is queued, a long item is combined with it extending the original
one, and then the long item is deleted, the timeout doesn't go back
to the short one, and the short item ends up taking a long time. In
this case, this showed as blocking scan when running two test cases
back to back - the scan from the second was delayed even though all
the remain-on-channel items should long have been gone.
Fixing this with the current data structures turns out to be a bit
complicated, we just remove the long item from the dependents list
right now and don't recalculate the timeouts.
There's a somewhat similar bug where we delete the short item and
all the dependents go with it; to fix this we'd have to move them
from the dependents to the real list.
Instead of trying to do that, rewrite the code to not have all this
complexity in the data structures: use a single list and allow more
than one entry in it being marked as started. This makes the code a
bit more complex, the worker needs to understand that it might need
to just remove one of the started items, while keeping the device
off-channel, but that's not more complicated than the nested data
structures.
This then fixes both issues described, and makes it easier to also
limit the overall off-channel time when combining.
TODO: as before, with hardware remain-on-channel, deleting an item
after combining results in cancelling them all - we can keep track
of the time elapsed and only cancel after that to fix this.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Typically drivers that implement hardware remain-on-channel will
have to wait for scheduling constraints, so make hwsim also wait
a little bit (only 20ms) before actually starting the operation.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 24 Nov 2015 13:25:49 +0000 (14:25 +0100)]
mac80211: simplify ack_skb handling
Since the cookie is assigned inside ieee80211_make_ack_skb()
now, we no longer need to return the ack_skb as the cookie
and can simplify the function's return and the callers. Also
rename it to ieee80211_attach_ack_skb() to more accurately
reflect its purpose.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 24 Nov 2015 19:28:27 +0000 (20:28 +0100)]
mac80211: fix mgmt-tx abort cookie and leak
If a mgmt-tx operation is aborted before it runs, the wrong
cookie is reported back to userspace, and the ack_skb gets
leaked since the frame is freed directly instead of freeing
it using ieee80211_free_txskb(). Fix that.
Fixes: 3b79af973cf4 ("mac80211: stop using pointers as userspace cookies") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 24 Nov 2015 14:29:53 +0000 (15:29 +0100)]
mac80211: catch queue stop underflow
If some code stops the queues more times than having started
(for when refcounting is used), warn on and reset the counter
to 0 to avoid blocking forever.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 26 Nov 2015 15:26:13 +0000 (16:26 +0100)]
cfg80211: handle add_station auth/assoc flag quirks
When a new station is added to AP/GO interfaces the default behaviour
is for it to be added authenticated and associated, due to backwards
compatibility. To prevent that, the driver must be able to do that
(setting the NL80211_FEATURE_FULL_AP_CLIENT_STATE feature flag) and
userspace must set the flag mask to auth|assoc and clear the set.
Handle this quirk in the API entirely in nl80211, and always push the
full flags to the drivers. NL80211_FEATURE_FULL_AP_CLIENT_STATE is
still required for userspace to be allowed to set the mask including
those bits, but after checking that add both flags to the mask and
set in case userspace didn't set them otherwise.
This obsoletes the mac80211 code handling this difference, no other
driver is currently using these flags.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
mac80211: Add support for aborting an ongoing scan
This commit adds implementation for abort scan in mac80211.
Reviewed-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Vidyullatha Kanchanapally <vkanchan@qti.qualcomm.com> Signed-off-by: Sunil Dutt <usdutt@qti.qualcomm.com>
[adjust to wdev change in previous patch and clean up code a bit] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
cfg80211: Add support for aborting an ongoing scan
Implement new functionality for aborting an ongoing scan.
Add NL80211_CMD_ABORT_SCAN to the nl80211 interface. After
aborting the scan, driver shall provide the scan status by
calling cfg80211_scan_done().
Reviewed-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Vidyullatha Kanchanapally <vkanchan@qti.qualcomm.com> Signed-off-by: Sunil Dutt <usdutt@qti.qualcomm.com>
[change command to take wdev instead of netdev so that it
can be used on p2p-device scans] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 26 Nov 2015 16:59:27 +0000 (17:59 +0100)]
mac80211_hwsim: do not actively scan DFS channels
We had another change to fix this in mac80211, but the hwsim
"hardware" scan should also be fixed. Obviously this one isn't
important since it's not real hardware, but we'd better be
consistent.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Eliad Peller [Tue, 17 Nov 2015 08:24:37 +0000 (10:24 +0200)]
mac80211: add atomic uploaded keys iterator
add ieee80211_iter_keys_rcu() to iterate over uploaded
keys in atomic context (when rcu is locked)
The station removal code removes the keys only after
calling synchronize_net(), so it's not safe to iterate
the keys at this point (and postponing the actual key
deletion with call_rcu() might result in some
badly-ordered ops calls).
Add a flag to indicate a station is being removed,
and skip the configured keys if it's set.
mac80211: allow the driver to send EOSP when needed
This can happen when the driver needs to send less frames
than expected and then needs to close the SP.
Mac80211 still needs to set the more_data properly based
on its buffer state (ps_tx_buffer and buffered frames on
other TIDs).
To that end, refactor the code that delivers frames upon
uAPSD trigger frames to be able to get only the more_data
bit without actually delivering those frames in case the
driver is just asking to set a NDP with EOSP and MORE_DATA
bit properly set.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Luca Coelho [Mon, 9 Nov 2015 10:17:37 +0000 (12:17 +0200)]
nl80211: clarify NL80211_ATTR_SCHED_SCAN_DELAY usage with net-detect
In this attribute's documentation, it was not clear whether the delay
started counting when WoWLAN net-detect was enabled or when the system
was suspended. The correct answer is that it starts when the system
suspends (which is when, in practice, the scan is scheduled). Clarify
that in the nl80211.h documentation.
Suggested-by: Samuel Tan <samueltan@google.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 6 Nov 2015 11:34:24 +0000 (12:34 +0100)]
mac80211: remove string from unaligned packet warning
This really should never happen except very early in the process
of bringing up a new driver, at which point you'll have to add
more debugging in the driver and this string isn't useful. Remove
it and save some size (when it's even compiled in.)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 6 Nov 2015 11:02:31 +0000 (12:02 +0100)]
lib80211: ratelimit key index mismatch
This indicates a driver key selection issue, but even then there's
no point in printing it all the time, so ratelimit it. Also remove
the priv pointer from it -- people debugging will only have a single
device anyway and it's useless as anything but a cookie.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 6 Nov 2015 10:30:46 +0000 (11:30 +0100)]
mac80211: mesh: print MAC address instead of pointer
There's no point in printing the mpath pointer since it can't
be used for anything - print the MAC address instead (like in
the forwarding case.)
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 23 Oct 2015 07:50:03 +0000 (09:50 +0200)]
cfg80211: replace ieee80211_ie_split() with an inline
The function is a very simple wrapper around another one,
just adds a few default parameters, so replace it with a
static inline instead of using EXPORT_SYMBOL, reducing
the module size slightly.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 22 Oct 2015 19:27:47 +0000 (22:27 +0300)]
cfg80211: add complete data to station add/change tracing
Complete the tracepoint with the missing data - it's not printed
by default (a lot of it is dynamic arrays) but will be recorded
and be available during post-processing.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 22 Oct 2015 15:35:19 +0000 (17:35 +0200)]
mac80211: allow driver to prevent two stations w/ same address
Some devices or drivers cannot deal with having the same station
address for different virtual interfaces, say as a client to two
virtual AP interfaces. Rather than requiring each driver with a
limitation like that to enforce it, add a hardware flag for it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
In the last change here, I neglected to update the cookie in one code
path: when a mgmt-tx has no real cookie sent to userspace as it doesn't
wait for a response, but is off-channel. The original code used the SKB
pointer as the cookie and always assigned the cookie to the TX SKB in
ieee80211_start_roc_work(), but my change turned this around and made
the code rely on a valid cookie being passed in.
Unfortunately, the off-channel no-wait TX path wasn't assigning one at
all, resulting in an uninitialized stack value being used. This wasn't
handed back to userspace as a cookie (since in the no-wait case there
isn't a cookie), but it was tested for non-zero to distinguish between
mgmt-tx and off-channel.
Fix this by assigning a dummy non-zero cookie unconditionally, and get
rid of a misleading comment and some dead code while at it. I'll clean
up the ACK SKB handling separately later.
Fixes: 3b79af973cf4 ("mac80211: stop using pointers as userspace cookies") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
DFS channels should not be actively scanned as we can't be sure
if we are allowed or not.
If the current channel is in the DFS band, active scan might be
performed after CSA, but we have no guarantee about other channels,
therefore it is safer to prevent active scanning at all.
Cc: stable@vger.kernel.org Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Eliad Peller [Tue, 17 Nov 2015 08:24:40 +0000 (10:24 +0200)]
mac80211: don't teardown sdata on sdata stop
Interfaces are being initialized (setup) on addition,
and torn down on removal.
However, p2p device is being torn down when stopped,
resulting in the next p2p start operation being done
on uninitialized interface.
Solve it by calling ieee80211_teardown_sdata() only
on interface removal (for the non-netdev case).
Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
[squashed in fix to call teardown after unregister] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Matti Gottlieb [Sun, 22 Nov 2015 08:08:56 +0000 (10:08 +0200)]
iwlwifi: mvm: ROC: Extend the ROC max delay duration & limit ROC duration
When associated to an AP and a ROC event with a long duration is scheduled
the FW may have a hard time scheduling a consecutive time event, since it
has to remain on the connection channel to hear the AP's DTIM.
In addition, when associated and a ROC is requested with a duration
greater than the DTIM interval, the FW will not be able to schedule
the ROC event, since it needs to wake up for the DTIM.
Increasing the "max delay" duration to the DTIM period will allow the FW to
wait until after the DTIM and then schedule the ROC time event.
Limiting the ROC to be less than the DTIM interval will assure that the
time event will be scheduled for at least part of the time (instead of
automatically failing)
Extend the ROC max delay duration to min(dtim_interval * 3, 600TU),
and limit the duration to be less than the DTIM interval.
Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Derek Basehore [Thu, 5 Nov 2015 01:37:52 +0000 (17:37 -0800)]
iwlwifi: mvm: report wakeup for wowlan
When the wifi wakes up the system, we need to report it via calling
pm_wakeup_event for lucid sleep. This is so userspace knowns that the
wifi woke up the system via the /sys/power/wakeup_type sysfs interface.
Johannes Berg [Sat, 21 Nov 2015 20:57:52 +0000 (21:57 +0100)]
iwlwifi: print index in api/capa flags parsing message
If the API or capabilities index is bigger than the driver expects,
an error message is printed. Make that message print the index and
distinguish between API and capabilities.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Dreyfuss, Haim [Mon, 1 Jun 2015 05:27:17 +0000 (08:27 +0300)]
iwlwifi: Add new PCI IDs for 9260 and 5165 series
Add 9000-family configuration to iwl_cfg struct
Add a new struct to define the 5165 series.
Rename the struct that defines the 9000 series to 9260.
Add some new sub-system IDs for the 9260 and 5165 series.
For 9260:
0x0A10, 0x0000, 0x0510, 0x0710, 0x0410, 0x0610.
For 5165:
0x2A10, 0x2010, 0x0310, 0x0210.
Eliad Peller [Thu, 12 Nov 2015 08:49:38 +0000 (10:49 +0200)]
iwlwifi: mvm: refactor d3 key update functions
We need to reuse the key update logic for d0i3
as well.
Add some parameters to deal with the constraints
implied by the d0i3 flow (specifically, support
non-SYNC commands, and don't take mutexes that
might deadlock).
Change some commands to be ASYNC, in order
to simplify locking a bit.
Johannes Berg [Thu, 24 Sep 2015 16:29:00 +0000 (18:29 +0200)]
iwlwifi: mvm: use firmware station lookup, combine code
In most cases, the firmware will already match the station that
we received a given frame from and tell us the station ID in the
RX status, so we can look up the station from that. This lets us
skip the (more expensive) hash table lookup in mac80211.
Also change the fallback case (no station info from the firmware)
to not attempt to look up a multicast source address.
While at it, also combine all the code using the station into a
single if block.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Nicholas Krause [Wed, 23 Sep 2015 00:24:19 +0000 (20:24 -0400)]
iwlwifi: mvm: fix incorrect fallthrough in iwl_mvm_check_running_scans()
In the iwl_mvm_check_running_scans() we were mistakenly ignoring the
value returned by iwl_mvm_scan_stop() for scheduled scans and falling
thorugh to the next case, which caused us to always return zero.
Signed-off-by: Nicholas Krause <xerofoify@gmail.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Wed, 11 Nov 2015 10:53:32 +0000 (11:53 +0100)]
iwlwifi: clean up transport debugfs handling
Transport code currently calls itself through the transport ops,
which is quite pointless. Clean up all of this. While at it,
remove the unnecessary dir argument and the redundant IDI code.
In slave transports, call both the common slave debugfs and the
transport's own. SDIO has no files, so remove it all there.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Golan Ben Ami [Mon, 27 Jul 2015 14:02:35 +0000 (17:02 +0300)]
iwlwifi: mvm: Support setting continuous recording debug mode
Add ability to set the continuous recording mode of the FW, while
the FW debug data is configured to be stored on the NIC.
This could be useful for storing large segments of FW usniffer
debug data on the host, while having small store space on the NIC.
The host receives the usniffer data through the regular RX path, and
the data can get extracted using trace-cmd.
Luca Coelho [Fri, 2 Oct 2015 15:13:10 +0000 (18:13 +0300)]
iwlwifi: mvm: flush all used TX queues before suspending
There is a potential race condition when entering suspend with d0i3 in
PCIe. If there is a frame queued just before we suspend, it won't
complete and we will never clear the queue stuck timer. To solve
this, call TX_PATH_FLUSH to flush all queues (except the command
queue) as part of the d0i3 entry process. Add a new function that
returns all the flushable queues.
Golan Ben-Ami [Wed, 21 Oct 2015 13:15:38 +0000 (16:15 +0300)]
iwlwifi: dump prph registers in a common place for all transports
Currently the prph registers dump is in the transport layer,
and each bus needs an additional dump implementation.
Move the prph dump outside transport, and allow a common
implementation for all of the buses.
This is possible because prph base addresses are similar for
all buses.
Golan Ben-Ami [Wed, 21 Oct 2015 12:16:58 +0000 (15:16 +0300)]
iwlwifi: export the _no_grab version of PRPH IO functions
Expose _no_grab prph i/o functions that allow performing i/o
outside the transport, without requiring grab and release NIC access
for each operation. In addition, rename the functions so they reflect
their non-grabbing behavior.
This can be very useful for consecutive prph i/o operation that occur
outside trans, such as fw dumps.
Eyal Shapira [Thu, 22 Oct 2015 10:10:36 +0000 (13:10 +0300)]
iwlwifi: mvm: drop low_latency_agg_frame_cnt_limit
This was an old workaround for solving latency issues with
certain Miracast adapters like ActionTec. However this isn't
needed anymore and furthermore it hurts throughput in other
use cases.
iwlwifi: mvm: remove redundant d0i3 flag from the config struct
The d0i3 flag in the device configuration structure is redundant,
because the same information can be determined by checking the
firmware capability flag.
Golan Ben-Ami [Sun, 23 Aug 2015 14:57:33 +0000 (17:57 +0300)]
iwlwifi: mvm: add trigger for firmware dump upon TDLS events
This will allow to catch different TDLS events and get the
firmware data when they occur.
Add empty TX_LATENCY trigger on the way to avoid mismatch
with trees in which this trigger is implemented.
The PCIe transport will also need a d0i3_entry_timeout_ms parameter,
so move the existing one from the slave transports to iwlwifi, so it
can be reused. While at it, rename the parameter to something
shorter, namely d0i3_entry_delay.
Matti Gottlieb [Mon, 2 Nov 2015 11:01:54 +0000 (13:01 +0200)]
iwlwifi: mvm: check FW's response for nvm access write cmd
In case of using an external NVM file, the driver sends to the
FW the different nvm sections. In the response of the cmd, the
FW states the status of the writing of the chunk.
Currently the value is not checked by the driver.
Check FW's response for writing the nvm chunk in the NVM_ACCESS_CMD.
Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Avri Altman [Thu, 29 Oct 2015 14:50:57 +0000 (16:50 +0200)]
iwlwifi: mvm: Enable MPLUT only on supported hw
When there's a bt-wifi contention that requires arbitration,
we use a priority-based mechanism to decide which comm wins.
Over time, use cases become more and more complex, with multiple
concurrent active links with different traffic types and different QoS
requirements, on both WiFi and BT sides.
This, in turn, requires us to elaborate our prioritization mechanism.
However, our legacy products included hw that does not supports this,
so selectively enable this on specific hw - as signaled by the firmware.