deliverable/linux.git
9 years agoiwlwifi: mvm: move U-APSD decision to authentication
Johannes Berg [Thu, 13 Nov 2014 19:53:45 +0000 (20:53 +0100)] 
iwlwifi: mvm: move U-APSD decision to authentication

In order to change the usage of U-APSD on the fly later,
move the enabling condition into a new function that is
called when authenticated.

This allows the module parameter to become writable, it
won't take effect immediately but at least on the next
association the new value will be used.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoMerge tag 'tags/mac80211-next-for-davem-2015-01-19' into iwlwifi-next
Emmanuel Grumbach [Tue, 20 Jan 2015 07:11:39 +0000 (09:11 +0200)] 
Merge tag 'tags/mac80211-next-for-davem-2015-01-19' into iwlwifi-next

Some further updates for net-next:
 * fix network-manager which was broken by the previous changes
 * fix delete-station events, which were broken by me making the
   genlmsg_end() mistake
 * fix a timer left running during suspend in some race conditions
   that would cause an annoying (but harmless) warning
 * (less important, but in the tree already) remove 80+80 MHz rate
   reporting since the spec doesn't distinguish it from 160 MHz;
   as the bitrate they're both 160 MHz bandwidth

9 years agoiwlwifi: mvm: ignore temperature updates in the RX statistics notification
Luciano Coelho [Wed, 14 Jan 2015 19:39:34 +0000 (21:39 +0200)] 
iwlwifi: mvm: ignore temperature updates in the RX statistics notification

If the firmware sends spontaneous DTS notfications with the
temperature (indicated in a TLV), we can ignore the temperature we get
in the RX statistics notifications.  This prevents potentially
handling the same temperature change twice.  It also ignores
notifications with temperature equal to 0 that happens from time to
time.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: cleanup unuseful and overflowing traces
Eyal Shapira [Thu, 15 Jan 2015 16:34:14 +0000 (18:34 +0200)] 
iwlwifi: mvm: rs: cleanup unuseful and overflowing traces

These aren't useful and overflowing so drop them
and also fix a minor typo.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: generate statistics debugfs code
Johannes Berg [Thu, 15 Jan 2015 11:59:26 +0000 (12:59 +0100)] 
iwlwifi: mvm: generate statistics debugfs code

There's no need to duplicate the structure field name in the string,
just generate the string in the macro that's there anyway. To keep
the debugfs output the same, rename one (otherwise unused) field.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: move statistics API to new header file
Johannes Berg [Wed, 14 Jan 2015 14:54:18 +0000 (15:54 +0100)] 
iwlwifi: mvm: move statistics API to new header file

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: sync statistics firmware API
Johannes Berg [Wed, 14 Jan 2015 14:16:03 +0000 (15:16 +0100)] 
iwlwifi: mvm: sync statistics firmware API

The firmware API structs are split differently, synchronize
the struct splits with the current firmware definitions.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: correctly set the NMI register
Emmanuel Grumbach [Wed, 7 Jan 2015 14:44:06 +0000 (16:44 +0200)] 
iwlwifi: correctly set the NMI register

When we want to trigger an NMI in the device, we need to set
bit 7 and not bit 0. However, older firmwares don't register
to the interrupt issued by bit 7. Use bit 7 first so that
the correct interrupt will be issued hoping that the firmware
will react. To be on the safe side, set bit 0 in case the
firmware didn't register to the proper interrupt.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add rxf and txf to dump data
Liad Kaufman [Mon, 15 Dec 2014 15:54:16 +0000 (17:54 +0200)] 
iwlwifi: mvm: add rxf and txf to dump data

When the FW is in error status - try to read the RXF and
TXF (all of them) and add them to the dump data.

This shouldn't happen in non-error statuses, as we don't
want to stop the RXF/TXF while they are running.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add support for dumping a secondary SRAM
Ido Yariv [Wed, 10 Dec 2014 17:39:27 +0000 (12:39 -0500)] 
iwlwifi: mvm: add support for dumping a secondary SRAM

Some HW modules have two SRAMs. In such cases add the secondary SRAM to
the list of dumped segments.

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>
9 years agoiwlwifi: mvm: add debugfs file for misbehaving U-APSD AP
Johannes Berg [Fri, 9 Jan 2015 13:15:32 +0000 (14:15 +0100)] 
iwlwifi: mvm: add debugfs file for misbehaving U-APSD AP

As this functionality relies on getting a firmware notification
it is difficult to test. Allow accessing the data for it from
debugfs to be able to trigger all kinds of scenarios to test.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: let the firmware configure the scheduler
Emmanuel Grumbach [Mon, 5 Jan 2015 14:52:55 +0000 (16:52 +0200)] 
iwlwifi: mvm: let the firmware configure the scheduler

A new host command can be used to configure the scheduler
instead of accessing the scheduler's registers from the
driver. This is easier and less error prone since accessing
the hardware at certain moments can lead to races with the
firmware.
Prefer to use the host command whenever it is available.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: scan dwell time corrections
David Spinadel [Mon, 29 Dec 2014 13:43:48 +0000 (15:43 +0200)] 
iwlwifi: mvm: scan dwell time corrections

Use only basic dwell time (10 ms for active scan and 110 for passive),
regardless of the number of the probes and the band, if it is
supported by the FW. The FW will add 3 ms for each probe sent and 10
ms for low band channels.
Add a TLV flag to indicate such support in FW.

This fix is needed to fix few bugs regarding scans that take too much time.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: remove unused TLV capability flags
Emmanuel Grumbach [Tue, 6 Jan 2015 07:48:54 +0000 (09:48 +0200)] 
iwlwifi: remove unused TLV capability flags

The driver doesn't support the firmwares that don't have
these capabilities. The code that actually used these
flags has been removed already, but the flags were left
for an unclear reason. Remove them.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add print of he nvm version
Eran Harary [Mon, 29 Dec 2014 11:02:13 +0000 (13:02 +0200)] 
iwlwifi: mvm: add print of he nvm version

Print the nvm version in the log for debugging purposes.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: set max_out_time equal to frag_passive_dwell in fragmented scan
Haim Dreyfuss [Thu, 18 Dec 2014 10:34:01 +0000 (12:34 +0200)] 
iwlwifi: mvm: set max_out_time equal to frag_passive_dwell in fragmented scan

Fragmented scan should be applied for all channels, passive and active.
When scanning on passive channels the firmware uses frag_passive_dwell
to define the maximum continuous scan time before returning to the
operating channel. On active channels max_out_time is the parameter
used by the firmware to define the maximum time allowed out of the
operating channel. Since active channels' scan should also be fragmented
set max_out_time equal to frag_passive_dwell.
In addition:
- Set max_out_time and suspend_time if the firmware doesn't support
  fragmented scan to avoid unexpected behavior.
- Adjust max_out_time for second level of scan precedence.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Reviewed-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: allow to disable MIMO for P2P only
Emmanuel Grumbach [Mon, 5 Jan 2015 07:48:54 +0000 (09:48 +0200)] 
iwlwifi: mvm: rs: allow to disable MIMO for P2P only

This is to work around interoperability bugs with devices
that don't hanle MIMO properly.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: allow to collect debug data from non-sleepable context
Emmanuel Grumbach [Mon, 29 Dec 2014 07:42:37 +0000 (09:42 +0200)] 
iwlwifi: mvm: allow to collect debug data from non-sleepable context

iwl_mvm_fw_dbg_collect allows to collect debug data from
the firmware. Most of the firmware interaction is done in
non-sleepable context. It makes little sense to force the
caller of iwl_mvm_fw_dbg_collect to sleep.
Defer the actual collection to a worker so that this
function will be able to be called from any context.

Reviewed-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: make sure state isn't in d0i3 when stopping fw monitor
Liad Kaufman [Sun, 4 Jan 2015 09:03:13 +0000 (11:03 +0200)] 
iwlwifi: mvm: make sure state isn't in d0i3 when stopping fw monitor

In case platform is in d0i3 - make sure it is awake when
writing the registers to stop the monitor when collecting FW
debug data. Plus, remove unneeded mutex locking currently
done.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Add debugfs entry to enable scan offload notification
Alexander Bondar [Tue, 9 Dec 2014 17:15:49 +0000 (19:15 +0200)] 
iwlwifi: mvm: Add debugfs entry to enable scan offload notification

This option enables scan offload iteration complete notification from
firmware which includes the last iteration's status and the scanned
channels from the current iteration.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: add new config and PCI IDs for 4165 series
Oren Givon [Tue, 23 Dec 2014 08:39:48 +0000 (10:39 +0200)] 
iwlwifi: add new config and PCI IDs for 4165 series

Add a new config for 4165 series over PCI and insert support
for two new 4165 series PCI IDs.

Signed-off-by: Oren Givon <oren.givon@intel.com>
Reviewed-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: make sure state isn't in d0i3 when collecting fw dbg
Liad Kaufman [Thu, 1 Jan 2015 15:42:46 +0000 (17:42 +0200)] 
iwlwifi: mvm: make sure state isn't in d0i3 when collecting fw dbg

This makes sure that we're not trying to read/write any of
the FW debug data collected during d0i3.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: repeat initial legacy rates in LQ table
Eyal Shapira [Sun, 28 Dec 2014 20:12:38 +0000 (22:12 +0200)] 
iwlwifi: mvm: rs: repeat initial legacy rates in LQ table

Repeating the legacy rates avoids degrading quickly to
lower rates due to collisions which is common when doing
TCP Tx traffic in legacy.
This slightly improves TCP Tx throughput while working
in legacy in different scenarios.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: don't indicate no BA if STA was in powersave
Eyal Shapira [Wed, 31 Dec 2014 13:22:38 +0000 (15:22 +0200)] 
iwlwifi: mvm: don't indicate no BA if STA was in powersave

If Tx failed because the STA was in powersave there's no point
in sending a BAR so avoid indicating AMPDU_NO_BACK to mac80211.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agomac80211: delete the assoc/auth timer upon suspend
Emmanuel Grumbach [Mon, 19 Jan 2015 14:53:06 +0000 (16:53 +0200)] 
mac80211: delete the assoc/auth timer upon suspend

While suspending, we destroy the authentication /
association that might be taking place. While doing so, we
forgot to delete the timer which can be firing after
local->suspended is already set, producing the warning below.

Fix that by deleting the timer.

[66722.825487] WARNING: CPU: 2 PID: 5612 at net/mac80211/util.c:755 ieee80211_can_queue_work.isra.18+0x32/0x40 [mac80211]()
[66722.825487] queueing ieee80211 work while going to suspend
[66722.825529] CPU: 2 PID: 5612 Comm: kworker/u16:69 Tainted: G        W  O  3.16.1+ #24
[66722.825537] Workqueue: events_unbound async_run_entry_fn
[66722.825545] Call Trace:
[66722.825552]  <IRQ>  [<ffffffff817edbb2>] dump_stack+0x4d/0x66
[66722.825556]  [<ffffffff81075cad>] warn_slowpath_common+0x7d/0xa0
[66722.825572]  [<ffffffffa06b5b90>] ? ieee80211_sta_bcn_mon_timer+0x50/0x50 [mac80211]
[66722.825573]  [<ffffffff81075d1c>] warn_slowpath_fmt+0x4c/0x50
[66722.825586]  [<ffffffffa06977a2>] ieee80211_can_queue_work.isra.18+0x32/0x40 [mac80211]
[66722.825598]  [<ffffffffa06977d5>] ieee80211_queue_work+0x25/0x50 [mac80211]
[66722.825611]  [<ffffffffa06b5bac>] ieee80211_sta_timer+0x1c/0x20 [mac80211]
[66722.825614]  [<ffffffff8108655a>] call_timer_fn+0x8a/0x300

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoRevert "wireless: Support of IFLA_INFO_KIND rtnl attribute"
Johannes Berg [Mon, 19 Jan 2015 17:49:50 +0000 (18:49 +0100)] 
Revert "wireless: Support of IFLA_INFO_KIND rtnl attribute"

This reverts commit ba1debdfed974f25aa598c283567878657b292ee.

Oliver reported that it breaks network-manager, for some reason with
this patch NM decides that the device isn't wireless but "generic"
(ethernet), sees no carrier (as expected with wifi) and fails to do
anything else with it.

Revert this to unbreak userspace.

Reported-by: Oliver Hartkopp <socketcan@hartkopp.net>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agocfg80211: fix checking nl80211_send_station() return value
Johannes Berg [Fri, 16 Jan 2015 20:05:02 +0000 (21:05 +0100)] 
cfg80211: fix checking nl80211_send_station() return value

The return value from nl80211_send_station() is the length of the
skb, or a negative error, so abort sending the message only when
the return value was negative.

This fixes the ibss_rsn wpa_supplicant test case.

Reported-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: remove doubled semicolon
Johannes Berg [Fri, 16 Jan 2015 12:27:56 +0000 (13:27 +0100)] 
mac80211: remove doubled semicolon

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agocfg80211: change bandwidth reporting to explicit field
Johannes Berg [Thu, 15 Jan 2015 15:14:02 +0000 (16:14 +0100)] 
cfg80211: change bandwidth reporting to explicit field

For some reason, we made the bandwidth separate flags, which
is rather confusing - a single rate cannot have different
bandwidths at the same time.

Change this to no longer be flags but use a separate field
for the bandwidth ('bw') instead.

While at it, add support for 5 and 10 MHz rates - these are
reported as regular legacy rates with their real bitrate,
but tagged as 5/10 now to make it easier to distinguish them.

In the nl80211 API, the flags are preserved, but the code
now can also clearly only set a single one of the flags.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agocfg80211: remove 80+80 MHz rate reporting
Johannes Berg [Thu, 15 Jan 2015 15:05:21 +0000 (16:05 +0100)] 
cfg80211: remove 80+80 MHz rate reporting

These rates are treated the same as 160 MHz in the spec, so
it makes no sense to distinguish them. As no driver uses them
yet, this is also not a problem, just remove them.

In the userspace API the field remains reserved to preserve
API and ABI.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: remove 80+80 MHz rate reporting
Johannes Berg [Thu, 15 Jan 2015 15:02:46 +0000 (16:02 +0100)] 
mac80211: remove 80+80 MHz rate reporting

These rates are treated the same as 160 MHz in the spec,
so it makes no sense to distinguish them. As no driver
uses them yet, this is also not a problem, just remove
them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agocfg80211: docs: remove station_info_flags
Johannes Berg [Wed, 14 Jan 2015 12:57:36 +0000 (13:57 +0100)] 
cfg80211: docs: remove station_info_flags

I removed the enum earlier, but forgot to remove it from the
documentation - do that now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agonl80211: send netdetect configuration info in NL80211_CMD_GET_WOWLAN
Luciano Coelho [Fri, 9 Jan 2015 12:06:37 +0000 (14:06 +0200)] 
nl80211: send netdetect configuration info in NL80211_CMD_GET_WOWLAN

Send the netdetect configuration information in the response to
NL8021_CMD_GET_WOWLAN commands.  This includes the scan interval,
SSIDs to match and frequencies to scan.

Additionally, add the NL80211_WOWLAN_TRIG_NET_DETECT with
NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agocfg80211: avoid reg-hints in self-managed only systems
Arik Nemtsov [Wed, 7 Jan 2015 14:47:20 +0000 (16:47 +0200)] 
cfg80211: avoid reg-hints in self-managed only systems

When a system contains only self-managed regulatory devices all hints
from the regulatory core are ignored. Stop hint processing early in this
case. These systems usually don't have CRDA deployed, which results in
endless (irrelevent) logs of the form:
cfg80211: Calling CRDA to update world regulatory domain

Make sure there's at least one self-managed device before discarding a
hint, in order to prevent initial hints from disappearing on CRDA
managed systems.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agocfg80211: introduce sync regdom set API for self-managed
Arik Nemtsov [Wed, 7 Jan 2015 14:47:19 +0000 (16:47 +0200)] 
cfg80211: introduce sync regdom set API for self-managed

A self-managed device will sometimes need to set its regdomain synchronously.
Notably it should be set before usermode has a chance to query it. Expose
a new API to accomplish this which requires the RTNL.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: don't defer scans in case of radar detection
Eliad Peller [Wed, 7 Jan 2015 15:50:11 +0000 (17:50 +0200)] 
mac80211: don't defer scans in case of radar detection

Radar detection can last indefinite time. There is no
point in deferring a scan request in this case - simply
return -EBUSY.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: consider only relevant vifs for radar_required calculation
Eliad Peller [Wed, 7 Jan 2015 15:50:10 +0000 (17:50 +0200)] 
mac80211: consider only relevant vifs for radar_required calculation

ctx->conf.radar_enabled should reflect whether radar
detection is enabled for the channel context.

When calculating it, make it consider only the vifs
that have this context assigned (instead of all the
vifs).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: remove local->radar_detect_enabled
Eliad Peller [Wed, 7 Jan 2015 15:50:09 +0000 (17:50 +0200)] 
mac80211: remove local->radar_detect_enabled

local->radar_detect_enabled should tell whether
radar_detect is enabled on any interface belonging
to local.

However, it's not getting updated correctly
in many cases (actually, when testing with hwsim
it's never been set, even when the dfs master
is beaconing).

Instead of handling all the corner cases
(e.g. channel switch), simply check whether
radar detection is enabled only when needed,
instead of caching the result.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: add TDLS supported channels correctly
Arik Nemtsov [Wed, 7 Jan 2015 14:45:07 +0000 (16:45 +0200)] 
mac80211: add TDLS supported channels correctly

The function adding the supported channels IE during a TDLS connection had
several issues:
1. If the entire subband is usable, the function exitted the loop without
   adding it
2. The function only checked chandef_usable, ignoring flags like RADAR
   which would prevent TDLS off-channel communcation.
3. HT20 was explicitly required in the chandef, while not a requirement
   for TDLS off-channel.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: let flush() drop packets when possible
Emmanuel Grumbach [Wed, 7 Jan 2015 13:42:39 +0000 (15:42 +0200)] 
mac80211: let flush() drop packets when possible

When roaming / suspending, it makes no sense to wait until
the transmit queues of the device are empty. In extreme
condition they can be starved (VO saturating the air), but
even in regular cases, it is pointless to delay the roaming
because the low level driver is trying to send packets to
an AP which is far away. We'd rather drop these packets and
let TCP retransmit if needed. This will allow to speed up
the roaming.

For suspend, the explanation is even more trivial.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agorfkill: document rfkill module parameters
Andrew Clausen [Fri, 9 Jan 2015 20:24:55 +0000 (20:24 +0000)] 
rfkill: document rfkill module parameters

Document the rfkill module parameters default_state and
master_switch_mode.

Signed-off-by: Andrew Clausen <andrew.p.clausen@gmail.com>
[rewrite commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: fix handling TIM IE when stations disconnect
Johannes Berg [Fri, 9 Jan 2015 10:40:39 +0000 (11:40 +0100)] 
mac80211: fix handling TIM IE when stations disconnect

When a station disconnects with frames still pending, we clear
the TIM bit, but too late - it's only cleared when the station
is already removed from the driver, and thus the driver can get
confused (and hwsim will loudly complain.)

Fix this by clearing the TIM bit earlier, when the station has
been unlinked but not removed from the driver yet. To do this,
refactor the TIM recalculation to in that case ignore traffic
and simply assume no pending traffic - this is correct for the
disconnected station even though the frames haven't been freed
yet at that point.

This patch isn't needed for current drivers though as they don't
check the station argument to the set_tim() operation and thus
don't really run into the possible confusion.

Reported-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211_hwsim: fix PS debugfs file locking
Johannes Berg [Fri, 9 Jan 2015 10:29:50 +0000 (11:29 +0100)] 
mac80211_hwsim: fix PS debugfs file locking

The functions called within the iterators must be called with
tasklets disabled, so use atomic iteration like the rest of
the code and disable tasklets around the whole operation.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: provide per-TID RX/TX MSDU counters
Johannes Berg [Fri, 21 Nov 2014 13:26:31 +0000 (14:26 +0100)] 
mac80211: provide per-TID RX/TX MSDU counters

Implement the new counters cfg80211 can now advertise to userspace.
The TX code is in the sequence number handler, which is a bit odd,
but that place already knows the TID and frame type, so it was
easiest and least impact there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agonl80211: support per-TID station statistics
Johannes Berg [Fri, 19 Dec 2014 11:34:00 +0000 (12:34 +0100)] 
nl80211: support per-TID station statistics

The base for the current statistics is pretty mixed up, support
exporting RX/TX statistics for MSDUs per TID. This (currently)
covers received MSDUs, transmitted MSDUs and retries/failures
thereof.

Doing it per TID for MSDUs makes more sense than say only per AC
because it's symmetric - we could export per-AC statistics for all
frames (which AC we used for transmission can be determined also
for management frames) but per TID is better and usually data
frames are really the ones we care about. Also, on RX we can't
determine the AC - but we do know the TID for any QoS MPDU we
received.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agonl80211: clarify packet statistics descriptions
Johannes Berg [Fri, 21 Nov 2014 11:40:05 +0000 (12:40 +0100)] 
nl80211: clarify packet statistics descriptions

The current statistics we keep aren't very clear, some are on
MPDUs and some on MSDUs/MMPDUs. Clarify the descriptions based
on the counters mac80211 keeps.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agocfg80211: add nl80211 beacon-only statistics
Johannes Berg [Mon, 17 Nov 2014 13:12:22 +0000 (14:12 +0100)] 
cfg80211: add nl80211 beacon-only statistics

Add these two values:
 * BEACON_RX: number of beacons received from this peer
 * BEACON_SIGNAL_AVG: signal strength average for beacons only

These can then be used for Android Lollipop's statistics request.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agocfg80211: remove enum station_info_flags
Johannes Berg [Mon, 17 Nov 2014 13:08:11 +0000 (14:08 +0100)] 
cfg80211: remove enum station_info_flags

This is really just duplicating the list of information that's
already available in the nl80211 attribute, so remove the list.
Two small changes are needed:
 * remove STATION_INFO_ASSOC_REQ_IES complete, but the length
   (assoc_req_ies_len) can be used instead
 * add NL80211_STA_INFO_RX_DROP_MISC which exists internally
   but not in nl80211 yet

This gets rid of the duplicate maintenance of the two lists.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: allow drivers to provide most station statistics
Johannes Berg [Mon, 17 Nov 2014 10:35:23 +0000 (11:35 +0100)] 
mac80211: allow drivers to provide most station statistics

In many cases, drivers can filter things like beacons that will
skew statistics reported by mac80211. To get correct statistics
in these cases, call drivers to obtain statistics and let them
override all values, filling values from mac80211 if the driver
didn't provide them. Not all of them make sense for the driver
to fill, so some are still always done by mac80211.

Note that this doesn't currently allow a driver to say "I know
this value is wrong, don't report it at all", or to sum it up
with a mac80211 value (as could be useful for "dropped misc"),
that can be added if it turns out to be needed.

This also gets rid of the get_rssi() method as is can now be
implemented using sta_statistics().

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: send statistics with delete station event
Johannes Berg [Fri, 14 Nov 2014 19:32:57 +0000 (20:32 +0100)] 
mac80211: send statistics with delete station event

Use the new cfg80211_del_sta_sinfo() function to send the
statistics about the deleted station with the delete event.
This lets userspace see how much traffic etc. the deleted
station used.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agocfg80211: allow including station info in delete event
Johannes Berg [Fri, 14 Nov 2014 16:14:00 +0000 (17:14 +0100)] 
cfg80211: allow including station info in delete event

When a station is removed, its statistics may be interesting to
userspace, for example for further aggregation of statistics of
all stations that ever connected to an AP.

Introduce a new cfg80211_del_sta_sinfo() function (and make the
cfg80211_del_sta() a static inline calling it) to allow passing
a struct station_info along with this, and send the data in the
nl80211 event message.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agocfg80211: add scan time to survey data
Johannes Berg [Fri, 14 Nov 2014 15:44:11 +0000 (16:44 +0100)] 
cfg80211: add scan time to survey data

Add the time spent scanning to the survey data so it can be
reported by drivers that collect such information.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agocfg80211: allow survey data to return global data
Johannes Berg [Fri, 14 Nov 2014 15:43:50 +0000 (16:43 +0100)] 
cfg80211: allow survey data to return global data

Not all devices are able to report survey data (particularly
time spent for various operations) per channel. As all these
statistics already exist in survey data, allow such devices
to report them (if userspace requested it)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agocfg80211: remove "channel" from survey names
Johannes Berg [Fri, 14 Nov 2014 15:35:34 +0000 (16:35 +0100)] 
cfg80211: remove "channel" from survey names

All of the survey data is (currently) per channel anyway,
so having the word "channel" in the name does nothing. In
the next patch I'll introduce global data to the survey,
where the word "channel" is actually confusing.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: Re-fix accounting of the tailroom-needed counter
Ido Yariv [Tue, 6 Jan 2015 13:39:02 +0000 (08:39 -0500)] 
mac80211: Re-fix accounting of the tailroom-needed counter

When hw acceleration is enabled, the GENERATE_IV or PUT_IV_SPACE flags
only require headroom space. Therefore, the tailroom-needed counter can
safely be decremented for most drivers.

The older incarnation of this patch (ca34e3b5) assumed that the above
holds true for all drivers. As reported by Christopher Chavez and
researched by Christian Lamparter and Larry Finger, this isn't a valid
assumption for p54 and cw1200.

Drivers that still require tailroom for ICV/MIC even when HW encryption
is enabled can use IEEE80211_KEY_FLAG_RESERVE_TAILROOM to indicate it.

Signed-off-by: Ido Yariv <idox.yariv@intel.com>
Cc: Christopher Chavez <chrischavez@gmx.us>
Cc: Christian Lamparter <chunkeey@googlemail.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoMerge branch 'mac80211' into mac80211-next
Johannes Berg [Wed, 7 Jan 2015 13:39:02 +0000 (14:39 +0100)] 
Merge branch 'mac80211' into mac80211-next

Merge mac80211.git to get some changes that would otherwise
cause conflicts with new changes coming here.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: skip disabled channels in VHT check
Arik Nemtsov [Thu, 1 Jan 2015 11:43:17 +0000 (13:43 +0200)] 
mac80211: skip disabled channels in VHT check

The patch "40a11ca mac80211: check if channels allow 80 MHz for VHT
probe requests" considered disabled channels as VHT enabled, and
mistakenly sent out probe-requests with the VHT IE.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agonl80211: define multicast group names in header
Johannes Berg [Tue, 23 Dec 2014 16:17:38 +0000 (17:17 +0100)] 
nl80211: define multicast group names in header

Put the group names into the userspace API header file so that
userspace clients can use symbolic names from there instead of
hardcoding the actual names. This doesn't really change much,
but seems somewhat cleaner.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agocfg80211: add extensible feature flag attribute
Gautam Kumar Shukla [Tue, 23 Dec 2014 15:55:19 +0000 (16:55 +0100)] 
cfg80211: add extensible feature flag attribute

With the wiphy::features flag being used up this patch adds a
new field wiphy::ext_features. Considering extensibility this
new field is declared as a byte array. This extensible flag is
exposed to user-space by NL80211_ATTR_EXT_FEATURES.

Cc: Avinash Patil <patila@marvell.com>
Signed-off-by: Gautam (Gautam Kumar) Shukla <gautams@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agonl80211: document NL80211_BSS_STATUS_AUTHENTICATED isn't used
Johannes Berg [Mon, 5 Jan 2015 10:16:42 +0000 (11:16 +0100)] 
nl80211: document NL80211_BSS_STATUS_AUTHENTICATED isn't used

The flag is no longer used (and hasn't been for a long time)
since trying to track authentication (and make decisions based
on state) was just causing issues all over - see commit
95de817b9034d50860319f6033ec85d25024694c.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoRevert "mac80211: Fix accounting of the tailroom-needed counter"
Johannes Berg [Mon, 5 Jan 2015 09:28:49 +0000 (10:28 +0100)] 
Revert "mac80211: Fix accounting of the tailroom-needed counter"

This reverts commit ca34e3b5c808385b175650605faa29e71e91991b.

It turns out that the p54 and cw2100 drivers assume that there's
tailroom even when they don't say they really need it. However,
there's currently no way for them to explicitly say they do need
it, so for now revert this.

This fixes https://bugzilla.kernel.org/show_bug.cgi?id=90331.

Cc: stable@vger.kernel.org
Fixes: ca34e3b5c808 ("mac80211: Fix accounting of the tailroom-needed counter")
Reported-by: Christopher Chavez <chrischavez@gmx.us>
Bisected-by: Larry Finger <Larry.Finger@lwfinger.net>
Debugged-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiwlwifi: mvm: rs: organize and cleanup consts
Eyal Shapira [Wed, 17 Dec 2014 13:38:58 +0000 (15:38 +0200)] 
iwlwifi: mvm: rs: organize and cleanup consts

Organize and cleanup the consts used by rs.
This is part of making some of these configurable.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Alter passive scan fragmentation parameters in case of multi-MAC
Haim Dreyfuss [Tue, 2 Dec 2014 09:03:16 +0000 (11:03 +0200)] 
iwlwifi: mvm: Alter passive scan fragmentation parameters in case of multi-MAC

Make passive scan fragmentation depends on the number of active
interfaces. In case of single-MAC, make passive scan less fragmented.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Reviewed-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: call to pcie_apply_destination also on family 8000 B step
Eran Harary [Thu, 11 Dec 2014 11:23:01 +0000 (13:23 +0200)] 
iwlwifi: mvm: call to pcie_apply_destination also on family 8000 B step

In order to config the FW and to allocate monitor buffer driver should
run the function iwl_pcie_apply_destination immediately after FW sections
are loaded.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Reviewed-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Configure EBS scan ratio
Haim Dreyfuss [Mon, 1 Dec 2014 21:30:07 +0000 (23:30 +0200)] 
iwlwifi: mvm: Configure EBS scan ratio

This configuration defines the ratio between number of scan iterations
where EBS is involved to those where it is not.
This configuration was left unconfigured due to inaccurate documentation.
Fix documentation as well.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: ask the fw to wakeup (from d0i3) on sysassert
Eliad Peller [Tue, 23 Dec 2014 13:05:14 +0000 (15:05 +0200)] 
iwlwifi: mvm: ask the fw to wakeup (from d0i3) on sysassert

Set the wakeup flag (of the d3 command) to configure the fw
to wakeup when sysassert happens while in d0i3.

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>
9 years agoiwlwifi: tlv: add support for IWL_UCODE_TLV_SDIO_ADMA_ADDR TLV
Liad Kaufman [Sun, 19 Oct 2014 14:58:15 +0000 (16:58 +0200)] 
iwlwifi: tlv: add support for IWL_UCODE_TLV_SDIO_ADMA_ADDR TLV

A new TLV supplies the ADMA address for SDIO mode, allowing
the driver to configure the default base address to be this
(as given in the FW), rather than hardcoding the values to
use until the FW sends the ALIVE message.

Use the value given by the FW in the IWL_UCODE_TLV_SDIO_ADMA_ADDR
TLV for setting the default SDTM base address until the FW sends
the ALIVE message. If it isn't given in the FW - use the current
hardcoded values.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: use iwl_mvm_sta_from_mac80211() consistently
Johannes Berg [Tue, 23 Dec 2014 15:02:40 +0000 (16:02 +0100)] 
iwlwifi: mvm: use iwl_mvm_sta_from_mac80211() consistently

A number of places (still) use a direct operation, use
iwl_mvm_sta_from_mac80211() consistently. In one place
also move it into the variable initializer.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: use iwl_mvm_vif_from_mac80211() consistently
Johannes Berg [Tue, 23 Dec 2014 15:00:17 +0000 (16:00 +0100)] 
iwlwifi: mvm: use iwl_mvm_vif_from_mac80211() consistently

There are a few places not using it, use it at those places.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: remove useless extern definition of iwl4265_2ac_sdio_cfg
Emmanuel Grumbach [Thu, 18 Dec 2014 07:15:13 +0000 (09:15 +0200)] 
iwlwifi: remove useless extern definition of iwl4265_2ac_sdio_cfg

This device was renamed, but the external definition remained there.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: clean refs before stop_device()
Eliad Peller [Wed, 10 Dec 2014 16:44:13 +0000 (18:44 +0200)] 
iwlwifi: mvm: clean refs before stop_device()

Some implementations (i.e. mini_rpm) assume the references
are managed only while the device is started.

Move the stale reference cleanup before stopping the
device in order to make them happy.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: dvm: main: Use setup_timer
Julia Lawall [Fri, 26 Dec 2014 14:35:44 +0000 (15:35 +0100)] 
iwlwifi: dvm: main: Use setup_timer

Convert a call to init_timer and accompanying intializations of
the timer's data and function fields to a call to setup_timer.

A simplified version of the semantic match that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression t,f,d;
@@

-init_timer(&t);
+setup_timer(&t,f,d);
-t.data = d;
-t.function = f;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: dvm: tt: Use setup_timer
Julia Lawall [Fri, 26 Dec 2014 14:35:43 +0000 (15:35 +0100)] 
iwlwifi: dvm: tt: Use setup_timer

Convert a call to init_timer and accompanying intializations of
the timer's data and function fields to a call to setup_timer.

A simplified version of the semantic match that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression t,f,d;
@@

-init_timer(&t);
+setup_timer(&t,f,d);
-t.data = d;
-t.function = f;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: support 2 different channels
Emmanuel Grumbach [Tue, 16 Dec 2014 11:02:03 +0000 (13:02 +0200)] 
iwlwifi: mvm: support 2 different channels

The driver and the firmware now support 2 different channels
at the same time. Advertise this capability to the stack.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: wait for d0i3 exit on hw restart
Eliad Peller [Thu, 11 Dec 2014 08:48:18 +0000 (10:48 +0200)] 
iwlwifi: mvm: wait for d0i3 exit on hw restart

On hw restart, make sure to wait for d0i3 exit
(by checking the IN_D0I3 status bit).

This is needed in order to avoid the stale
d0i3_exit_work from doing harm (e.g. unref
cleared reference).

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: consider d0i3_disable in iwl_mvm_is_d0i3_supported()
Eliad Peller [Sun, 14 Dec 2014 15:49:28 +0000 (17:49 +0200)] 
iwlwifi: mvm: consider d0i3_disable in iwl_mvm_is_d0i3_supported()

Consider the iwlwifi module param d0i3_disable when
considering whether d0i3 is supported.

(There is currently no need to differentiate between
supported and enabled, so keep the function as-is)

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: support IWL_D0I3_MODE_ON_SUSPEND d0i3 mode
Eliad Peller [Tue, 9 Dec 2014 13:23:54 +0000 (15:23 +0200)] 
iwlwifi: mvm: support IWL_D0I3_MODE_ON_SUSPEND d0i3 mode

Enter d0i3 on suspend, and exit d0i3. Wait for the
command responses in both cases.

Use this mode in case of pcie trans.

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>
9 years agoiwlwifi: support multiple d0i3 modes
Eliad Peller [Tue, 9 Dec 2014 13:11:56 +0000 (15:11 +0200)] 
iwlwifi: support multiple d0i3 modes

Allow configuring additional d0i3 mode, in which the
fw will be configured to enter d0i3 only on suspend
(while keeping the wake_lock accounting as usual)

The d0i3 mode to use will be determined by the
underlying trans layer.

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>
9 years agoiwlwifi: mvm: allow both d0i3 and d3 wowlan configuration modes
Eliad Peller [Tue, 9 Dec 2014 13:54:46 +0000 (15:54 +0200)] 
iwlwifi: mvm: allow both d0i3 and d3 wowlan configuration modes

d3 and d0i3 shouldn't be mutually exclusive. Set supported
wowlan triggers by looking for each of them, and check
on suspend/resume which flow should be used ("any" trigger
is supported by d0i3, and all the others by d3)

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>
9 years agoiwlwifi: pcie: add basic reference accounting
Eliad Peller [Thu, 20 Nov 2014 15:33:43 +0000 (17:33 +0200)] 
iwlwifi: pcie: add basic reference accounting

Implement the ref/unref trans ops and track both tx and
host command queues (and hold references while they
are not empty).

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>
9 years agoiwlwifi: mvm: convert the SRAM dump to the generic memory dump
Emmanuel Grumbach [Tue, 9 Dec 2014 12:47:57 +0000 (14:47 +0200)] 
iwlwifi: mvm: convert the SRAM dump to the generic memory dump

This allows to add the offset. The type of the generic
memory dump will let the parser know that this is SRAM.

Reviewed-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: change SMEM dump to general purpose memory dump
Emmanuel Grumbach [Tue, 9 Dec 2014 12:36:41 +0000 (14:36 +0200)] 
iwlwifi: mvm: change SMEM dump to general purpose memory dump

Instead of adding a dump type for each type of memory, change
the SMEM type to be a general purpose memory dump. Add the
type of the memory and its offset in the device in the dump
itself. This will allow an external parser to know where
this memory came from.

Note that since this type isn't really in use yet, this is
not a real problem.

Reviewed-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add smem content to dump data
Liad Kaufman [Tue, 2 Dec 2014 09:16:04 +0000 (11:16 +0200)] 
iwlwifi: mvm: add smem content to dump data

In NICs that have SMEM - add its content to the dump data
for later debug.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: support additional nvm_file in family 8000 B step
Eran Harary [Tue, 2 Dec 2014 13:19:22 +0000 (15:19 +0200)] 
iwlwifi: mvm: support additional nvm_file in family 8000 B step

nvm_file in family 8000 B step and A step differ. This means
that the driver should support 2 file name as default.

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>
9 years agoiwlwifi: mvm: rs: fix max rate allowed if no rate is allowed
Eyal Shapira [Sun, 7 Dec 2014 16:18:27 +0000 (18:18 +0200)] 
iwlwifi: mvm: rs: fix max rate allowed if no rate is allowed

In case the rate mask for one of the modulations was zero the
max rate idx for that modulation was set to 32 (BITS_PER_LONG).
This is bad as it would later lead to an out of bounds access
to the expected tpt table. In most cases there was no real effect
as the expected tpt was set to 0 and this led to avoiding the
modulation effectively.
Fix the out of bounds access and explicitly skip the modulation
in case there's no rate allowed in it.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: clear tt values when entering CT-kill
Luciano Coelho [Mon, 15 Dec 2014 12:15:15 +0000 (14:15 +0200)] 
iwlwifi: mvm: clear tt values when entering CT-kill

Clear the thermal throttling values when entering CT-kill, since
everything will be reinitialized anyway when we exit CT-kill.

Additionally, clear the dynamic_smps value in the initialization
funciton, for consistency.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Set the HW step in the core dump
Ido Yariv [Thu, 11 Dec 2014 21:11:01 +0000 (16:11 -0500)] 
iwlwifi: mvm: Set the HW step in the core dump

The HW step member was left out of the core dump information. Fix this.

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>
9 years agoiwlwifi: mvm: allow RSSI compensation
Emmanuel Grumbach [Tue, 16 Dec 2014 10:31:13 +0000 (12:31 +0200)] 
iwlwifi: mvm: allow RSSI compensation

The firmware is able to compensate the rssi when we hear
the frame on a different channel.
This is true for an offset up to 3 channels.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add debugfs to trigger fw debug logs collection
Emmanuel Grumbach [Thu, 4 Dec 2014 08:07:47 +0000 (10:07 +0200)] 
iwlwifi: mvm: add debugfs to trigger fw debug logs collection

This allows to collect the logs even if the firmware hasn't
crashed. Of course, crashing the firmware is an option, but
this is easier and nicer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: pcie: let the Manageability Engine know when we leave
Emmanuel Grumbach [Sun, 7 Dec 2014 17:44:30 +0000 (19:44 +0200)] 
iwlwifi: pcie: let the Manageability Engine know when we leave

When the driver is unload, the Manageability Engine should
know about that - send an event to inform it about this
event.

Reviewed-by: Reuven Borok <reuven.borok@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: support LnP 1x1 antenna configuration
Moshe Harel [Mon, 8 Dec 2014 19:13:14 +0000 (21:13 +0200)] 
iwlwifi: mvm: support LnP 1x1 antenna configuration

The antenna configuration has to be read also from OTP
Currently read only from FW image
Guideline: An antenna exists only if appears both in FW image & NVM

Signed-off-by: Moshe Harel <moshe.harel@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoRevert "iwlwifi: use correct fw file in 8000 b-step"
Dor Shaish [Wed, 10 Dec 2014 10:44:57 +0000 (12:44 +0200)] 
Revert "iwlwifi: use correct fw file in 8000 b-step"

Signed-off-by: Dor Shaish <dor.shaish@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add fw runtime stack to dump data
Liad Kaufman [Mon, 1 Dec 2014 08:44:18 +0000 (10:44 +0200)] 
iwlwifi: mvm: add fw runtime stack to dump data

The allocation of the DCCM between the data and the stack
can theoretically change without notice to the driver, but
the total size is HW-fixed. Since the stack CCM (runtime
stack) has also data important to the FW - this patch allows
pulling the whole DCCM in one piece and adds it to the dump
data.

If the size isn't known - just use the data part of the
DCCM as it appears in the FW TLVs.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: remove MODULE_VERSION
Johannes Berg [Wed, 22 Oct 2014 09:22:56 +0000 (11:22 +0200)] 
iwlwifi: remove MODULE_VERSION

The module version "in-tree:" or "in-tree:d" is useless; there
should be better (functional) ways to detect whether debugging
is enabled and other than that the version says nothing.

Therefore remove the driver version completely.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agomac80211: fix dot11MulticastTransmittedFrameCount tested address
Eliad Peller [Sun, 21 Dec 2014 13:25:28 +0000 (15:25 +0200)] 
mac80211: fix dot11MulticastTransmittedFrameCount tested address

dot11MulticastTransmittedFrameCount should be updated according
to the DA, which might be different from A1. Checking A1 results
in the counter being 0 in case of station, as to-DS data frames
use A1 for the BSSID.

This behaviour is defined in state machines, specifically in the
sta_tx_dcf_3.1d(10) description of 802.11-2012.

Signed-off-by: Eliad Peller <eliad@wizery.com>
[rewrite commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211_hwsim: fix check for custom world regdom array size
Johannes Berg [Mon, 22 Dec 2014 11:51:25 +0000 (12:51 +0100)] 
mac80211_hwsim: fix check for custom world regdom array size

David Binderman reports that the conditions in the first loop
are the wrong way around - checking the array contents before
the size.

Instead of leaving the empty loop there and reordering the two
checks unify it into a single loop that skips over non-matches
and exits after the first match.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: minstrel: reduce size of struct minstrel_rate_stats
Felix Fietkau [Wed, 17 Dec 2014 12:38:34 +0000 (13:38 +0100)] 
mac80211: minstrel: reduce size of struct minstrel_rate_stats

On minstrel_ht, the size of the per-sta struct is almost 18k, making it
an order-3 allocation.
A few fields inside the per-rate statistics are bigger than they need to
be. This patch reduces the size enough to cut down the per-sta struct to
about 13k (order-2 allocation).

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agonl80211: increase the max number of rules in regdomain
Arik Nemtsov [Wed, 17 Dec 2014 16:00:44 +0000 (18:00 +0200)] 
nl80211: increase the max number of rules in regdomain

Some network cards (Intel) produce per-channel regdomains and rely on
cfg80211 to merge rules as needed. This hits the max rules limit and
fails.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agonl80211: Stop scheduled scan if netlink client disappears
Jukka Rissanen [Mon, 15 Dec 2014 11:25:39 +0000 (13:25 +0200)] 
nl80211: Stop scheduled scan if netlink client disappears

An attribute NL80211_ATTR_SOCKET_OWNER can be set by the scan initiator.
If present, the attribute will cause the scan to be stopped if the client
dies.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agonl80211: Convert sched_scan_req pointer to RCU pointer
Jukka Rissanen [Mon, 15 Dec 2014 11:25:38 +0000 (13:25 +0200)] 
nl80211: Convert sched_scan_req pointer to RCU pointer

Because of possible races when accessing sched_scan_req pointer in
rdev, the sched_scan_req is converted to RCU pointer.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This page took 0.046109 seconds and 5 git commands to generate.