]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
11 years agoiwlwifi: mvm: don't request SMPS on non-STA iface
Eytan Lifshitz [Tue, 4 Jun 2013 09:28:51 +0000 (12:28 +0300)]
iwlwifi: mvm: don't request SMPS on non-STA iface

The Thermal Throttling code could do that, fix it.

Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: fix MCAST in AP mode
Emmanuel Grumbach [Sun, 2 Jun 2013 16:54:01 +0000 (19:54 +0300)]
iwlwifi: mvm: fix MCAST in AP mode

In multicast, there is no retries nor RTS since there is no
specific recipient that can ACK or send CTS. This means
that we must not use the rate scale table for multicast
frames.
This true for any frame that doesn't have a valid
ieee80211_sta pointer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: enable PM always in unassociated mode
Alexander Bondar [Mon, 27 May 2013 10:49:03 +0000 (13:49 +0300)]
iwlwifi: mvm: enable PM always in unassociated mode

In unassociated BSS STA mode FW verifies both power save and power
management flags to decide on switching power off. The driver currently
sets power management flag according to mac80211 decision. As result, in
unassociated mode power management flag is down and power consumption is
high. Change power management enablement. When unassociated in BPS and
LP power save modes enable power management regardless of mac80211
decision. Rely on mac80211 decision if associated. Add power management
state update during associated/disassociated modes transitions.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: Change location of vif_count verification for PM
Alexander Bondar [Wed, 29 May 2013 07:19:50 +0000 (10:19 +0300)]
iwlwifi: mvm: Change location of vif_count verification for PM

Currently vif_count verification for power management enablement appear
in different places. Move these verifications to one place in
iwl_mvm_update_power_mode().

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: correctly configure MCAST in AP mode
Emmanuel Grumbach [Sun, 26 May 2013 17:47:53 +0000 (20:47 +0300)]
iwlwifi: mvm: correctly configure MCAST in AP mode

The AP mode needs to use the MCAST fifo for the MCAST
frames sent after the DTIM. This fifo needs to be
configured with the same parameters as the VOICE FIFO.

A separate SCD queue is mapped to this fifo - the cab_queue
(cab stands for Content After Beacon). This queue isn't
connected to any station, but rather to the MAC context.
This queue should (and is already) be set as the MCAST
queue - this is part of the of MAC context command.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: reorder Rx handler for performance purposes
Emmanuel Grumbach [Sun, 2 Jun 2013 17:54:48 +0000 (20:54 +0300)]
iwlwifi: mvm: reorder Rx handler for performance purposes

Since SCAN related handlers are much less likely than
beacon related handlers, reorder between them.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: Fix quota command settings
Ilan Peer [Thu, 30 May 2013 04:31:01 +0000 (07:31 +0300)]
iwlwifi: mvm: Fix quota command settings

According to the FW implementation, the quota command should
have a valid entry for each active binding (where 'active' in
this context means that the binding is known to the FW). In case
the binding should not get any quota, the 'quota' should be set
to zero.

Not setting an 0 quota for an active binding when all the MACs
in the binding are idle, i.e., not associated in case of managed
interface, will result in preventing the FW scheduler from entering
IDLE state and the FW from transitioning to low PS.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: don't return -ERFKILL if SEND_IF_RFKILL is set
Eran Harary [Sun, 2 Jun 2013 09:40:34 +0000 (12:40 +0300)]
iwlwifi: don't return -ERFKILL if SEND_IF_RFKILL is set

When CMD_SEND_IN_RFKILL is set, it is perfectly legitimate
to send a host command while RFKILL is asserted. In this
case, the host command sending functions should return 0
even if RFKILL is asserted.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: don't enable MIMO when BT is active
Emmanuel Grumbach [Tue, 28 May 2013 20:12:47 +0000 (23:12 +0300)]
iwlwifi: mvm: don't enable MIMO when BT is active

Another step in the rate control / BT Coex integration

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: don't start BA agreement when BT is active
Emmanuel Grumbach [Tue, 28 May 2013 18:36:16 +0000 (21:36 +0300)]
iwlwifi: mvm: don't start BA agreement when BT is active

Otherwise WiFi would kill BT.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: limit the length of the AMPDU when BT is running
Emmanuel Grumbach [Tue, 28 May 2013 18:31:50 +0000 (21:31 +0300)]
iwlwifi: mvm: limit the length of the AMPDU when BT is running

This holds for existing BA agreements.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: fix the LUT for BT Coex
Emmanuel Grumbach [Wed, 29 May 2013 06:09:30 +0000 (09:09 +0300)]
iwlwifi: mvm: fix the LUT for BT Coex

There was a typo in the Loose LUT for BT Coex.
Fix that.

Reported-by: Roi Cohen <roi.cohen@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: implement D3 testing
Johannes Berg [Tue, 14 May 2013 11:53:45 +0000 (13:53 +0200)]
iwlwifi: mvm: implement D3 testing

For testing the D3 (WoWLAN) firmware, it is useful to be able
to run the firmware with instrumentation while the host isn't
sleeping and can poke at the firmware debug logging etc.

Implement this by a debugfs file. When the file is opened the
D3 firmware is loaded and all regular commands are blocked.
While the file is being read, poll the firmware's PME status
flag and report EOF once it changes to non-zero. When it is
closed, do (most of) the resume processing. This lets a user
just "cat" the file. Pressing Ctrl-C to kill the cat process
will resume the firwmare as though the platform resumed for
non-wireless reason and when the firmware wants to wake up
reading from the file automatically completes.

Unlike in real suspend, only disable interrupts and don't
reset the TX/RX hardware while in the test mode. This is a
workaround for some interrupt problems that happen only when
the PCIe link isn't fully reset (presumably by changing the
PCI config space registers which the core PCI code does.)

Note that while regular operations are blocked from sending
commands to the firmware, they could still be made and cause
strange mac80211 issues. Therefore, while using this testing
feature you need to be careful to not try to disconnect, roam
or similar, and will see warnings for such attempts.

Als note that this requires an upcoming firmware change to
tell the driver the location of the PME status flag in SRAM.
D3 test will fail if the firmware doesn't report the pointer.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoMerge remote-tracking branch 'wireless-next/master' into iwlwifi-next
Johannes Berg [Wed, 29 May 2013 19:56:46 +0000 (21:56 +0200)]
Merge remote-tracking branch 'wireless-next/master' into iwlwifi-next

11 years agocw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets
Solomon Peachy [Sat, 25 May 2013 00:04:38 +0000 (20:04 -0400)]
cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: dump small buffers with help of %*ph
Andy Shevchenko [Wed, 29 May 2013 10:04:20 +0000 (13:04 +0300)]
mwifiex: dump small buffers with help of %*ph

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agonet: wireless: p54spi: Fix commenting style
Sachin Kamat [Wed, 29 May 2013 10:01:41 +0000 (15:31 +0530)]
net: wireless: p54spi: Fix commenting style

Make the commenting style consistent with networking block comment
style as suggested by checkpatch.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agonet: wireless: p54spi: Use module_spi_driver macro
Sachin Kamat [Wed, 29 May 2013 10:01:40 +0000 (15:31 +0530)]
net: wireless: p54spi: Use module_spi_driver macro

module_spi_driver() eliminates some boiler plate and makes code
simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: fix PA predistortion miscalibration
Felix Fietkau [Tue, 28 May 2013 16:04:44 +0000 (18:04 +0200)]
ath9k_hw: fix PA predistortion miscalibration

If any bins from the training data are skipped (i != max_index), the
calculated compensation curve gets distorted, and the signal will be
wildly overamplified. This may be the cause of the reported hardware
damage that was caused by PA predistortion (because of which PAPRD was
disabled by default).

When calculating the x_est, Y, theta values, the use of max_index and i
was reversed. i points to the bin index whereas max_index refers to the
index of the calculated arrays.

Note that PA predistortion is still disabled, it will be re-enabled
after it has been properly validated.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: Don't use wdev->sme_state
Vladimir Kondratiev [Tue, 28 May 2013 12:17:53 +0000 (15:17 +0300)]
wil6210: Don't use wdev->sme_state

sme_state is private wdev's variable.
Track connection state internally

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: channel off by 1
Vladimir Kondratiev [Tue, 28 May 2013 12:17:52 +0000 (15:17 +0300)]
wil6210: channel off by 1

WMI commands wants channel index, that is channel - 1

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac802...
John W. Linville [Wed, 29 May 2013 18:51:50 +0000 (14:51 -0400)]
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next

11 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Wed, 29 May 2013 18:50:45 +0000 (14:50 -0400)]
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

11 years agoiwlwifi: mvm: add debugfs for powersave
Alexander Bondar [Tue, 21 May 2013 11:49:09 +0000 (14:49 +0300)]
iwlwifi: mvm: add debugfs for powersave

Add debugfs files to control powersave parameters for testing.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: Add support for connection monitor offload
Hila Gonen [Wed, 13 Mar 2013 16:00:03 +0000 (18:00 +0200)]
iwlwifi: mvm: Add support for connection monitor offload

The firmware supports periodic keep alive and beacon monitoring,
so advertise connection monitor offload capability by setting
IEEE80211_HW_CONNECTION_MONITOR flag. Implement missed beacons
notification handler. Call ieee80211_beacon_loss in case of
missed beacons, so AP probing by mac80211 can be triggered.

Signed-off-by: Hila Gonen <hila.gonen@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: take valid ant for HT caps from TLV
Emmanuel Grumbach [Wed, 22 May 2013 10:16:23 +0000 (13:16 +0300)]
iwlwifi: take valid ant for HT caps from TLV

I forgot to take them from TLV and took them from the NVM
instead.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: Change number of DTIMs to skip semantics
Alexander Bondar [Tue, 21 May 2013 11:49:09 +0000 (14:49 +0300)]
iwlwifi: mvm: Change number of DTIMs to skip semantics

If skip over DTIMs is enabled the driver can specify number of DTIMs
to skip. This parameter in host-device API implies number of DTIM
periods to skip. For example, to skip one DTIM means sleep over two
DTIM periods. Change semantics accordingly. Change this parameter's
default value.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: add thermal throttling and CT kill
Eytan Lifshitz [Sun, 19 May 2013 16:14:41 +0000 (19:14 +0300)]
iwlwifi: mvm: add thermal throttling and CT kill

In order to avoid NIC destruction due to high temperature,
CT kill will power down the NIC.

To avoid this, thermal throttling will decrease throughput
to prevent the NIC from reaching the temperature at which
CT kill is performed.

Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: make WoWLAN configuration available to drivers
Johannes Berg [Wed, 15 May 2013 07:30:07 +0000 (09:30 +0200)]
cfg80211: make WoWLAN configuration available to drivers

Make the current WoWLAN configuration available to drivers
at runtime. This isn't really useful for the normal WoWLAN
behaviour and accessing it can also be racy, but drivers
may use it for testing the WoWLAN device behaviour while
the host stays up & running to observe the device.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: use proper scan type for P2P
Emmanuel Grumbach [Mon, 20 May 2013 05:59:31 +0000 (08:59 +0300)]
iwlwifi: mvm: use proper scan type for P2P

It was set to be FORCED because of a firmware bug which
has been fixed.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoMerge remote-tracking branch 'iwlwifi-fixes/master' into HEAD
Johannes Berg [Mon, 27 May 2013 11:30:49 +0000 (13:30 +0200)]
Merge remote-tracking branch 'iwlwifi-fixes/master' into HEAD

Conflicts:
drivers/net/wireless/iwlwifi/mvm/ops.c

11 years agoiwlwifi: mvm: Add beacon abort enablement
Alexander Bondar [Mon, 6 May 2013 10:03:59 +0000 (13:03 +0300)]
iwlwifi: mvm: Add beacon abort enablement

Beacon abort is used by device to increase idle dwell time when system
is idle. This algorithm is on top of beacon filtering feature. Enable
beacon abort only if power management is enabled.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: dvm: constify configuration structs
Johannes Berg [Fri, 17 May 2013 08:38:21 +0000 (10:38 +0200)]
iwlwifi: dvm: constify configuration structs

The pointer that gets used is already const, so the
structs can obviously be const as well.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: move some configuration parameters into DVM
Johannes Berg [Fri, 17 May 2013 08:36:29 +0000 (10:36 +0200)]
iwlwifi: move some configuration parameters into DVM

There are a number of parameters that aren't really hardware
specific but rather define how the DVM firmware is used.
Move these into the DVM configuration.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: dvm: rename iwl_lib_ops to iwl_dvm_cfg
Johannes Berg [Fri, 17 May 2013 07:58:27 +0000 (09:58 +0200)]
iwlwifi: dvm: rename iwl_lib_ops to iwl_dvm_cfg

The next patches will move some more configuration
data that isn't needed by mvm into this struct, so
rename it now since it won't just be ops.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: move D3_CFG_COMPLETE handling into DVM
Johannes Berg [Fri, 17 May 2013 10:01:26 +0000 (12:01 +0200)]
iwlwifi: move D3_CFG_COMPLETE handling into DVM

The MVM firmware doesn't communicate this way, it instead
assumes D3 configuration is complete after a specific host
command (which must be last) has been sent. Handling this
bit thus belongs into the firmware API code, i.e. DVM.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
11 years agoiwlwifi: dvm: fix zero LQ CMD sending avoidance
Emmanuel Grumbach [Wed, 22 May 2013 07:48:10 +0000 (10:48 +0300)]
iwlwifi: dvm: fix zero LQ CMD sending avoidance

In 63b77bf489881747c5118476918cc8c29378ee63

iwlwifi: dvm: don't send zeroed LQ cmd

I tried to avoid to send zeroed LQ cmd, but I made a (very)
stupid mistake in the memcmp.
Since this patch has been ported to stable, the fix should
go to stable too.

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

Cc: stable@vger.kernel.org
Reported-by: Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: remove some locked wrappers from sme API
Johannes Berg [Wed, 15 May 2013 15:44:01 +0000 (17:44 +0200)]
cfg80211: remove some locked wrappers from sme API

By making all the API functions require wdev locking we
can clean up the API a bit, getting rid of the locking
version of each function. This also decreases the size
of cfg80211 by a small amount.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: remove some locked wrappers from mlme API
Johannes Berg [Wed, 15 May 2013 15:44:01 +0000 (17:44 +0200)]
cfg80211: remove some locked wrappers from mlme API

By making all the API functions require wdev locking we
can clean up the API a bit, getting rid of the locking
version of each function. This also decreases the size
of cfg80211 by a small amount.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoregulatory: remove reg_mutex
Johannes Berg [Fri, 10 May 2013 17:17:17 +0000 (19:17 +0200)]
regulatory: remove reg_mutex

The reg_mutex is similar to the ones I just removed in
cfg80211 but even less useful since it protects global
data, and we hold the RTNL in all places (except module
unload) already.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoregulatory: use RCU in regulatory_hint_11d()
Johannes Berg [Fri, 10 May 2013 17:07:52 +0000 (19:07 +0200)]
regulatory: use RCU in regulatory_hint_11d()

Since it just does a quick check of the last regulatory
request, the function doesn't have to hold the reg mutex
but can use RCU instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: simplify and correct P2P-Device scan check
Johannes Berg [Fri, 10 May 2013 16:58:00 +0000 (18:58 +0200)]
cfg80211: simplify and correct P2P-Device scan check

If the driver for some reason successfully finishes
scanning while in p2p_stop_device(), cfg80211 will
still set it to aborted. Simplify this code using the
new 'notified' value and only mark it aborted in case
the driver didn't notify cfg80211 at all (in which
case we also leak the request to not crash, this is
a driver bug.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211/mac80211: use cfg80211 wdev mutex in mac80211
Johannes Berg [Fri, 10 May 2013 10:32:47 +0000 (12:32 +0200)]
cfg80211/mac80211: use cfg80211 wdev mutex in mac80211

Using separate locks in cfg80211 and mac80211 has always
caused issues, for example having to unlock in places in
mac80211 to call cfg80211, which even needed a framework
to make cfg80211 calls after some functions returned etc.

Additionally, I suspect some issues people have reported
with the cfg80211 state getting confused could be due to
such issues, when cfg80211 is asking mac80211 to change
state but mac80211 is in the process of telling cfg80211
that the state changed (in another way.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: vastly simplify locking
Johannes Berg [Wed, 8 May 2013 19:45:15 +0000 (21:45 +0200)]
cfg80211: vastly simplify locking

Virtually all code paths in cfg80211 already (need to) hold
the RTNL. As such, there's little point in having another
four mutexes for various parts of the code, they just cause
lock ordering issues (and much of the time, the RTNL and a
few of the others need thus be held.)

Simplify all this by getting rid of the extra four mutexes
and just use the RTNL throughout. Only a few code changes
were needed to do this and we can get rid of a work struct
for bonus points.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: use atomic_t for wiphy counter
Johannes Berg [Wed, 8 May 2013 19:49:02 +0000 (21:49 +0200)]
cfg80211: use atomic_t for wiphy counter

There's no need to lock, we can just use an atomic_t.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: move cfg80211_get_dev_from_ifindex under wext
Johannes Berg [Wed, 8 May 2013 19:34:22 +0000 (21:34 +0200)]
cfg80211: move cfg80211_get_dev_from_ifindex under wext

The function is only used and needed by the wext code
for scanning, so move it there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoMerge remote-tracking branch 'mac80211/master' into mac80211-next
Johannes Berg [Fri, 24 May 2013 22:01:30 +0000 (00:01 +0200)]
Merge remote-tracking branch 'mac80211/master' into mac80211-next

11 years ago{cfg,mac}80211: move mandatory rates calculation to cfg80211
Ashok Nagarajan [Sat, 11 May 2013 00:50:51 +0000 (17:50 -0700)]
{cfg,mac}80211: move mandatory rates calculation to cfg80211

Move mandatory rates calculation to cfg80211, shared with non mac80211 drivers.

Signed-off-by: Ashok Nagarajan <ashok@cozybit.com>
[extend documentation]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: Move mesh estab_plinks outside mesh_stats debug group
Ashok Nagarajan [Tue, 14 May 2013 00:08:04 +0000 (17:08 -0700)]
mac80211: Move mesh estab_plinks outside mesh_stats debug group

As estab_plinks is not a statistics member, don't show its debug information
along with other mesh stat members

Signed-off-by: Ashok Nagarajan <ashok@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: Allow TDLS peer AID to be configured for VHT
Jouni Malinen [Thu, 16 May 2013 17:11:08 +0000 (20:11 +0300)]
cfg80211: Allow TDLS peer AID to be configured for VHT

VHT uses peer AID in the PARTIAL_AID field in TDLS frames. The current
design for TDLS is to first add a dummy STA entry before completing TDLS
Setup and then update information on this STA entry based on what was
received from the peer during the setup exchange.

In theory, this could use NL80211_ATTR_STA_AID to set the peer AID just
like this is used in AP mode to set the AID of an association station.
However, existing cfg80211 validation rules prevent this attribute from
being used with set_station operation. To avoid interoperability issues
between different kernel and user space version combinations, introduce
a new nl80211 attribute for the purpose of setting TDLS peer AID. This
attribute can be used in both the new_station and set_station
operations. It is not supposed to be allowed to change the AID value
during the lifetime of the STA entry, but that validation is left for
drivers to do in the change_station callback.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomwl8k: Fix the firmware hang issue for 8764
Nishant Sarmukadam [Fri, 24 May 2013 09:12:25 +0000 (14:42 +0530)]
mwl8k: Fix the firmware hang issue for 8764

The firmware hang issue is not seen very often,
though it is still seen sometimes (once in 12
hours in local tests). The changes in the driver
,to interrupt the firmware, are needed when we
detect that firmware is stuck and when the host
queues are full and we begin to drop packets.
This is to ensure that the firmware does not
miss any PPA_RDY interrupts to cause the firmware
restart dont miss PPA_READY interrupt for SC2

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: use kfree_skb() instead of kfree()
Wei Yongjun [Thu, 23 May 2013 09:10:43 +0000 (17:10 +0800)]
wil6210: use kfree_skb() instead of kfree()

Use kfree_skb() instead of kfree() to free sk_buff.

Introduced by commit e270045b569cc7030abd29857f3a4e7906524ec0
(wil6210: Sanity check for reported DMA length)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: move 53xx specific bbp initialization
Stanislaw Gruszka [Sat, 18 May 2013 12:03:55 +0000 (14:03 +0200)]
rt2800: move 53xx specific bbp initialization

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: move 3290 specific bbp initialization
Stanislaw Gruszka [Sat, 18 May 2013 12:03:54 +0000 (14:03 +0200)]
rt2800: move 3290 specific bbp initialization

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: move 3352 specific bbp initialization
Stanislaw Gruszka [Sat, 18 May 2013 12:03:53 +0000 (14:03 +0200)]
rt2800: move 3352 specific bbp initialization

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R108 on proper subroutines
Stanislaw Gruszka [Sat, 18 May 2013 12:03:52 +0000 (14:03 +0200)]
rt2800: initialize BBP_R108 on proper subroutines

Create helper function and move initialization to subroutines.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R104 on 3352 subroutine
Stanislaw Gruszka [Sat, 18 May 2013 12:03:51 +0000 (14:03 +0200)]
rt2800: initialize BBP_R104 on 3352 subroutine

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R134 & BBP_R135 on 53xx subroutine
Stanislaw Gruszka [Sat, 18 May 2013 12:03:50 +0000 (14:03 +0200)]
rt2800: initialize BBP_R134 & BBP_R135 on 53xx subroutine

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R128 on proper subroutines
Stanislaw Gruszka [Sat, 18 May 2013 12:03:49 +0000 (14:03 +0200)]
rt2800: initialize BBP_R128 on proper subroutines

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R120 on 3352 subroutine
Stanislaw Gruszka [Sat, 18 May 2013 12:03:48 +0000 (14:03 +0200)]
rt2800: initialize BBP_R120 on 3352 subroutine

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R106 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:47 +0000 (14:03 +0200)]
rt2800: initialize BBP_R106 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R105 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:46 +0000 (14:03 +0200)]
rt2800: initialize BBP_R105 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R104 on proper subroutines
Stanislaw Gruszka [Sat, 18 May 2013 12:03:45 +0000 (14:03 +0200)]
rt2800: initialize BBP_R104 on proper subroutines

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R103 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:44 +0000 (14:03 +0200)]
rt2800: initialize BBP_R103 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: move initialization of BBP_95 & BBP_98 to 53xx subroutine
Stanislaw Gruszka [Sat, 18 May 2013 12:03:43 +0000 (14:03 +0200)]
rt2800: move initialization of BBP_95 & BBP_98 to 53xx subroutine

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R92 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:42 +0000 (14:03 +0200)]
rt2800: initialize BBP_R92 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R91 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:41 +0000 (14:03 +0200)]
rt2800: initialize BBP_R91 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R88 on proper subroutines
Stanislaw Gruszka [Sat, 18 May 2013 12:03:40 +0000 (14:03 +0200)]
rt2800: initialize BBP_R88 on proper subroutines

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R86 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:39 +0000 (14:03 +0200)]
rt2800: initialize BBP_R86 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R84 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:38 +0000 (14:03 +0200)]
rt2800: initialize BBP_R84 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R83 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:37 +0000 (14:03 +0200)]
rt2800: initialize BBP_R83 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R82 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:36 +0000 (14:03 +0200)]
rt2800: initialize BBP_R82 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R74 - BBP_R80 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:35 +0000 (14:03 +0200)]
rt2800: initialize BBP_R74 - BBP_R80 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R70 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:34 +0000 (14:03 +0200)]
rt2800: initialize BBP_R70 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R69 - BBP_R77 on proper subroutines
Stanislaw Gruszka [Sat, 18 May 2013 12:03:33 +0000 (14:03 +0200)]
rt2800: initialize BBP_R69 - BBP_R77 on proper subroutines

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R68 on proper subroutines
Stanislaw Gruszka [Sat, 18 May 2013 12:03:32 +0000 (14:03 +0200)]
rt2800: initialize BBP_R68 on proper subroutines

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R65 & BBP_R66 on all subroutines (except 5592)
Stanislaw Gruszka [Sat, 18 May 2013 12:03:31 +0000 (14:03 +0200)]
rt2800: initialize BBP_R65 & BBP_R66 on all subroutines (except 5592)

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R47 on 3352 subroutine
Stanislaw Gruszka [Sat, 18 May 2013 12:03:30 +0000 (14:03 +0200)]
rt2800: initialize BBP_R47 on 3352 subroutine

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: initialize BBP_R31 on proper subroutines
Stanislaw Gruszka [Sat, 18 May 2013 12:03:29 +0000 (14:03 +0200)]
rt2800: initialize BBP_R31 on proper subroutines

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: move rt2800_bbp4_mac_if_ctrl to proper subroutines
Stanislaw Gruszka [Sat, 18 May 2013 12:03:28 +0000 (14:03 +0200)]
rt2800: move rt2800_bbp4_mac_if_ctrl to proper subroutines

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: move 3352 bbp specific code
Stanislaw Gruszka [Sat, 18 May 2013 12:03:27 +0000 (14:03 +0200)]
rt2800: move 3352 bbp specific code

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: add rt2800_init_bbp_305x_soc subroutine
Stanislaw Gruszka [Sat, 18 May 2013 12:03:26 +0000 (14:03 +0200)]
rt2800: add rt2800_init_bbp_305x_soc subroutine

New routine for SOC specific BBP initialization, empty for now.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: prepare for rt2800_init_bbp spit
Stanislaw Gruszka [Sat, 18 May 2013 12:03:25 +0000 (14:03 +0200)]
rt2800: prepare for rt2800_init_bbp spit

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: make rt2800_init_bbp return void
Stanislaw Gruszka [Sat, 18 May 2013 12:03:24 +0000 (14:03 +0200)]
rt2800: make rt2800_init_bbp return void

This function can not fail, we always return 0.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomac80211: add STBC flag for radiotap
Oleksij Rempel [Fri, 24 May 2013 10:05:45 +0000 (12:05 +0200)]
mac80211: add STBC flag for radiotap

Some chips can tell us if received frame was
encoded with STBC or not. To make this information available
in user space we can use updated radiotap specification:
http://www.radiotap.org/defined-fields/MCS

This patch will set number of STBC encoded spatial streams (Nss).
The HAVE_STBC flag should be provided by driver.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: close AP_VLAN interfaces before unregistering all
Johannes Berg [Thu, 23 May 2013 23:06:09 +0000 (01:06 +0200)]
mac80211: close AP_VLAN interfaces before unregistering all

Since Eric's commit efe117ab8 ("Speedup ieee80211_remove_interfaces")
there's a bug in mac80211 when it unregisters with AP_VLAN interfaces
up. If the AP_VLAN interface was registered after the AP it belongs
to (which is the typical case) and then we get into this code path,
unregister_netdevice_many() will crash because it isn't prepared to
deal with interfaces being closed in the middle of it. Exactly this
happens though, because we iterate the list, find the AP master this
AP_VLAN belongs to and dev_close() the dependent VLANs. After this,
unregister_netdevice_many() won't pick up the fact that the AP_VLAN
is already down and will do it again, causing a crash.

Cc: stable@vger.kernel.org [2.6.33+]
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: assign AP_VLAN hw queues correctly
Johannes Berg [Thu, 23 May 2013 21:09:56 +0000 (23:09 +0200)]
mac80211: assign AP_VLAN hw queues correctly

A lot of code in mac80211 assumes that the hw queues are
set up correctly for all interfaces (except for monitor)
but this isn't true for AP_VLAN interfaces. Fix this by
copying the AP master configuration when an AP VLAN is
brought up, after this the AP interface can't change its
configuration any more and needs to be brought down to
change it, which also forces AP_VLAN interfaces down, so
just copying in open() is sufficient.

Reported-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211_hwsim: remove P2P_DEVICE support
Johannes Berg [Thu, 23 May 2013 20:17:50 +0000 (22:17 +0200)]
mac80211_hwsim: remove P2P_DEVICE support

Unfortunately, advertising P2P_DEVICE support was a little
premature, a number of issues came up in testing and have
been fixed for 3.10. Rather than try to backport all the
different fixes, disable P2P_DEVICE support in the drivers
using it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: remove P2P_DEVICE support
Johannes Berg [Thu, 23 May 2013 20:17:50 +0000 (22:17 +0200)]
iwlwifi: mvm: remove P2P_DEVICE support

Unfortunately, advertising P2P_DEVICE support was a little
premature, a number of issues came up in testing and have
been fixed for 3.10. Rather than try to backport all the
different fixes, disable P2P_DEVICE support in the drivers
using it. For iwlmvm that implies disabling P2P completely
as it can't support P2P operation w/o P2P Device.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: fix reporting 64-bit station info tx bytes
Felix Fietkau [Thu, 23 May 2013 13:05:59 +0000 (15:05 +0200)]
cfg80211: fix reporting 64-bit station info tx bytes

Copy & paste mistake - STATION_INFO_TX_BYTES64 is the name of the flag,
not NL80211_STA_INFO_TX_BYTES64.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: fix queue handling crash
Johannes Berg [Thu, 23 May 2013 19:04:38 +0000 (21:04 +0200)]
mac80211: fix queue handling crash

The code I added in "mac80211: don't start new netdev queues
if driver stopped" crashes for monitor and AP VLAN interfaces
because while they have a netdev, they don't have queues set
up by the driver.

To fix the crash, exclude these from queue accounting here
and just start their netdev queues unconditionally.

For monitor, this is the best we can do, as we can redirect
frames there to any other interface and don't know which one
that will since it can be different for each frame.

For AP VLAN interfaces, we can do better later and actually
properly track the queue status. Not doing this is really a
separate bug though.

Reported-by: Ilan Peer <ilan.peer@intel.com>
Reported-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: check wdev->netdev in connection work
Johannes Berg [Thu, 23 May 2013 16:10:21 +0000 (18:10 +0200)]
cfg80211: check wdev->netdev in connection work

If a P2P-Device is present and another virtual interface triggers
the connection work, the system crash because it tries to check
if the P2P-Device's netdev (which doesn't exist) is up. Skip any
wdevs that have no netdev to fix this.

Cc: stable@vger.kernel.org
Reported-by: YanBo <dreamfly281@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agodrivers/net/wireless/brcm80211/brcmfmac: add missing platform_driver owner
Libo Chen [Tue, 21 May 2013 02:42:40 +0000 (10:42 +0800)]
drivers/net/wireless/brcm80211/brcmfmac: add missing platform_driver owner

set the owner of platform_driver, to ensure that the
caller of driver holds a module refernece

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: add support for Marvell SD8897 chipset
Yogesh Ashok Powar [Sat, 18 May 2013 00:54:58 +0000 (17:54 -0700)]
mwifiex: add support for Marvell SD8897 chipset

Some of the key differences between SD8897 and older chipsets
are as follows:

a) sdio mpa_rx and mpa_tx ports have been increased from 16 to 32
b) Same is the case with read/write bitmap that one receives from
   mpa_reg read
c) aggregation packet count doubled from 8 to 16
d) Most of key reg addresses are changed
e) There is a separate command or control port
f) Now command rx/tx_done have new interrupts

1. 'supports_sdio_new_mode' flag is added to handle (a) and (b).
2. (c) and (d) are taken care of by filling chip specific
   information in global structurei (mwifiex_sdio_sd8897).
3. For older chipsets, port 0 was cmd port and port 1->15 were
   data port. Therefore we had CTRL_PORT_MASK to differentiate
   port type. Now these changes are under 'has_control_mask' flag.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: code rearrangement in multiport aggregation path
Amitkumar Karwar [Sat, 18 May 2013 00:54:51 +0000 (17:54 -0700)]
mwifiex: code rearrangement in multiport aggregation path

There are some macros defined for multiport aggregation
calculations. As we may need to add some more code to
accomodate new chipsets, we will change them to inline
functions. Also, use dynamic allocation for Rx buffer array.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: remove unnecessary macros in sdio.h
Amitkumar Karwar [Sat, 18 May 2013 00:54:42 +0000 (17:54 -0700)]
mwifiex: remove unnecessary macros in sdio.h

They are not used in the code.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: define a macro for MPA base address
Amitkumar Karwar [Sat, 18 May 2013 00:54:34 +0000 (17:54 -0700)]
mwifiex: define a macro for MPA base address

As Multiple-Port Aggregation base address value is fixed, we can
have a macro for it.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: do port calculations separately
Amitkumar Karwar [Sat, 18 May 2013 00:54:23 +0000 (17:54 -0700)]
mwifiex: do port calculations separately

This patch rearranges the code for better readability

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: code rearrangement in mwifiex_get_rd_port()
Amitkumar Karwar [Sat, 18 May 2013 00:53:56 +0000 (17:53 -0700)]
mwifiex: code rearrangement in mwifiex_get_rd_port()

Get rid of 'if else' usage by returning in 'if' block.
This improves readability by removing indentations.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: replace unnecessary u32 variables with u8 in sdio.c
Amitkumar Karwar [Sat, 18 May 2013 00:53:42 +0000 (17:53 -0700)]
mwifiex: replace unnecessary u32 variables with u8 in sdio.c

Some u32 variables in sdio.c are used to store/pass u8 values.
Replace them with u8 variables.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>