Ilan Peer [Mon, 10 Jun 2013 07:34:14 +0000 (10:34 +0300)]
mac80211: Fix VHT bandwidth change event
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Alexander Bondar [Sun, 19 May 2013 11:23:57 +0000 (14:23 +0300)]
mac80211: track AP's beacon rate and give it to the driver
Track the AP's beacon rate in the scan BSS data and in the
interface configuration to let the drivers know which rate
the AP is using. This information may be used by drivers,
in our case to let the firmware optimise beacon RX.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Ben Greear [Wed, 12 Jun 2013 21:08:44 +0000 (14:08 -0700)]
mac80211: Ensure tid_start_tx is protected by sta->lock
All accesses of the tid_start_tx lock should be protected
by sta->lock if there is any chance that another thread
could still be accessing the sta object.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 12 Jun 2013 20:47:56 +0000 (22:47 +0200)]
mac80211: fix TX aggregation TID struct leak
Ben reports that kmemleak is saying TX aggregation TID
structs are leaked. Given his workload, I suspect that
they're leaked because stations are destroyed before
their aggregation sessions get a chance to start. Fix
this by simply freeing structs that are not used yet.
Reported-by: Ben Greear <greearb@candelatech.com>
Tested-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 11 Jun 2013 14:51:03 +0000 (16:51 +0200)]
cfg80211: fix rtnl leak in wiphy dump error cases
In two wiphy dump error cases, most often when the dump allocation
must be increased, the RTNL is leaked. This quickly results in a
complete system lockup. Release the RTNL correctly.
Reported-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Antonio Quartulli [Tue, 11 Jun 2013 12:20:03 +0000 (14:20 +0200)]
nl80211: allow sending CMD_FRAME without specifying any frequency
Users may want to send a frame on the current channel
without specifying it.
This is particularly useful for the correct implementation
of the IBSS/RSN support in wpa_supplicant which requires to
receive and send AUTH frames.
Make mgmt_tx pass a NULL channel to the driver if none has
been specified by the user.
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Antonio Quartulli [Tue, 11 Jun 2013 12:20:02 +0000 (14:20 +0200)]
ath6kl: make mgmt_tx accept a NULL channel
cfg80211 passes a NULL channel to mgmt_tx if the frame has
to be sent on the one currently in use by the device.
Make the implementation of mgmt_tx correctly handle this
case
Cc: Nicolas Cavallari <Nicolas.Cavallari@lri.fr>
Acked-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Antonio Quartulli [Tue, 11 Jun 2013 12:20:01 +0000 (14:20 +0200)]
brcm80211: make mgmt_tx in brcmfmac accept a NULL channel
cfg80211 passes a NULL channel to mgmt_tx if the frame has
to be sent on the one currently in use by the device.
Make the implementation of mgmt_tx correctly handle this
case
Cc: brcm80211-dev-list@broadcom.com
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Antonio Quartulli [Tue, 11 Jun 2013 12:20:00 +0000 (14:20 +0200)]
mac80211: make mgmt_tx accept a NULL channel
cfg80211 passes a NULL channel to mgmt_tx if the frame has
to be sent on the one currently in use by the device.
Make the implementation of mgmt_tx correctly handle this
case. Fail if offchan is required.
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
[fix RCU locking]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Jouni Malinen [Mon, 27 May 2013 15:24:02 +0000 (18:24 +0300)]
cfg80211: fix VHT TDLS peer AID verification
I (Johannes) accidentally applied the first version of the patch
("Allow TDLS peer AID to be configured for VHT"). Now apply just
the changes between v1 and v2 to get the AID verification and
prefer the new attribute over the old one.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Ashok Nagarajan [Mon, 3 Jun 2013 17:33:36 +0000 (10:33 -0700)]
{nl,mac,cfg}80211: Allow user to configure basic rates for mesh
Currently mesh uses mandatory rates as the default basic rates. Allow basic
rates to be configured during mesh join. Basic rates are applied only if
channel is also provided with mesh join command.
Signed-off-by: Ashok Nagarajan <ashok@cozybit.com>
[some whitespace fixes, refuse basic rates w/o channel]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Colleen Twitty [Mon, 3 Jun 2013 16:53:40 +0000 (09:53 -0700)]
mac80211: expire mesh peers based on mesh configuration
The time it takes to see the peer link expire may differ
by a minute since sta_expire() is run once a minute as a
mesh housekeeping task.
Signed-off-by: Colleen Twitty <colleen@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Colleen Twitty [Mon, 3 Jun 2013 16:53:39 +0000 (09:53 -0700)]
{nl,cfg}80211: make peer link expiration time configurable
If a STA has a peer that it hasn't seen any tx activity
from for a certain length of time, the peer link is
expired. This means the inactive STA is removed from the
list of peers and that STA is not considered a peer again
unless it re-peers. Previously, this inactivity time was
always 30 minutes. Now, add it to the mesh configuration
and allow it to be configured. Retain 30 minutes as a
default value.
Signed-off-by: Colleen Twitty <colleen@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Felix Fietkau [Mon, 3 Jun 2013 16:10:45 +0000 (18:10 +0200)]
nl80211: add kernel-doc for NL80211_FEATURE_ACTIVE_MONITOR
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Thomas Pedersen [Mon, 10 Jun 2013 20:17:21 +0000 (13:17 -0700)]
mac80211: fix mesh deadlock
The patch "cfg80211/mac80211: use cfg80211 wdev mutex in
mac80211" introduced several deadlocks by converting the
ifmsh->mtx to wdev->mtx. Solve these by:
1. drop the cancel_work_sync() in ieee80211_stop_mesh().
Instead make the mesh work conditional on whether the mesh
is running or not.
2. lock the mesh work with sdata_lock() to protect beacon
updates and prevent races with wdev->mesh_id_len or
cfg80211.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 5 Jun 2013 07:32:50 +0000 (09:32 +0200)]
wireless: fix kernel-doc
Some kernel-doc fixes for forgotten fields and renamed things.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Alexander Bondar [Thu, 16 May 2013 14:34:17 +0000 (17:34 +0300)]
mac80211: Use suitable semantics for beacon availability indication
Currently beacon availability upon association is marked by have_beacon
flag of assoc_data structure that becomes unavailable when association
completes. However beacon availability indication is required also after
association to inform a driver. Currently dtim_period parameter is used
for this purpose. Move have_beacon flag to another structure, persistant
throughout a interface's life cycle. Use suitable sematics for beacon
availability indication.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
[fix another instance of BSS_CHANGED_DTIM_PERIOD in docs]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Alexander Bondar [Mon, 3 Jun 2013 14:29:33 +0000 (17:29 +0300)]
mac80211: fix powersave bug and clean up ieee80211_rx_bss_info
ieee80211_rx_bss_info() deals with dtim_period setting and PS update
when associated. Move all these to another locations cleaning this
function. Also, the current implementation is buggy because when it
calls ieee80211_recalc_ps() bss_conf->dtim_period is notset properly
yet and thus nothing will happen.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 4 Jun 2013 20:23:36 +0000 (22:23 +0200)]
cfg80211: make wiphy index start at 0 again
The change to use atomic_inc_return() for assigning the wiphy
index made the first wiphy index 1 instead of 0. This is fine,
but we all habitually type "phy0" when we're testing, so make
it go back to 0 instead of 1 by subtracting 1 from the index.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 4 Jun 2013 17:21:08 +0000 (19:21 +0200)]
cfg80211: fix potential deadlock regression
My big locking cleanups caused a problem by registering the
rfkill instance with the RTNL held, while the callback also
acquires the RTNL. This potentially causes a deadlock since
the two locks used (rfkill mutex and RTNL) can be acquired
in two different orders. Fix this by (un)registering rfkill
without holding the RTNL. This needs to be done after the
device struct is registered, but that can also be done w/o
holding the RTNL.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 4 Jun 2013 12:35:07 +0000 (14:35 +0200)]
regulatory: use proper enum return value
get_reg_request_treatment() returns 0 in one case but is
defined to return an enum, use the proper value REG_REQ_OK.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 15 May 2013 22:55:45 +0000 (00:55 +0200)]
cfg80211: separate internal SME implementation
The current internal SME implementation in cfg80211 is
very mixed up with the MLME handling, which has been
causing issues for a long time. There are three things
that the implementation has to provide:
* a basic SME implementation for nl80211's connect()
call (for drivers implementing auth/assoc, which is
really just mac80211) and wireless extensions
* MLME events for the userspace SME
* SME events (connected, disconnected etc.) for all
different SME implementation possibilities (driver,
cfg80211 and userspace)
To achieve these goals it isn't necessary to track the
software SME's connection status outside of it's state
(which is the part that caused many issues.) Instead,
track it only in the SME data (wdev->conn) and in the
general case only track whether the wdev is connected
or not (via wdev->current_bss.)
Also separate the internal implementation to not have
callbacks from the SME events, but rather call it from
the API functions that the driver (or rather mac80211)
calls. This separates the code better.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 15 May 2013 22:55:00 +0000 (00:55 +0200)]
cfg80211/mac80211: clean up cfg80211 SME APIs
Do some cleanups in the cfg80211 SME APIs, which are
only used by mac80211.
Most of these functions get a frame passed, and there
isn't really any reason to export multiple functions
as cfg80211 can check the frame type instead, do that.
Additionally, the API functions have confusing names
like cfg80211_send_...() which was meant to indicate
that it sends an event to userspace, but gets a bit
confusing when there's both TX and RX and they're not
all clearly labeled.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 4 Jun 2013 10:56:01 +0000 (12:56 +0200)]
Merge remote-tracking branch 'wireless-next/master' into HEAD
Merge to get the wil6210 changes that a cfg80211 change needs.
A conflict in drivers/net/wireless/ath/ath9k/init.c was just
whitespace changes.
Also fix a semantic conflict due to cw1200 using WoWLAN which
I had modified in my tree.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Pontus Fuchs [Tue, 4 Jun 2013 10:44:52 +0000 (12:44 +0200)]
mac80211: set IEEE80211_TX_CTL_REQ_TX_STATUS on nullframes
The connection monitor needs to know the tx status of
nullframes to work properly.
Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 4 Jun 2013 10:46:03 +0000 (12:46 +0200)]
nl80211: remove bogus genlmsg_end() error checking
genlmsg_end() can't return an error since it returns the
skb length so remove checks treating the return value as
an error code.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Felix Fietkau [Tue, 4 Jun 2013 10:15:42 +0000 (12:15 +0200)]
mac80211: add a tx control flag to indicate PS-Poll/uAPSD response
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
John Greene [Mon, 3 Jun 2013 13:47:39 +0000 (09:47 -0400)]
brcmsmac: Reduce log spam in heavy tx, make err print in debug
Move message to debug mode to reduce log spam under heavy tx (iperf) load.
This message prints in ht debug mode only:
brcms_c_ampdu_dotxstatus_complete: Pkt tx suppressed, illegal channel
possibly 153
Signed-off-by: John Greene <jogreene@redhat.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 3 Jun 2013 03:49:29 +0000 (09:19 +0530)]
ath9k: Do not maintain ANI state per-channel
ANI state can be maintained globally instead of per-channel.
This reduces memory usage and since default values are used
during a scan run, per-channel state is not required.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 3 Jun 2013 03:49:28 +0000 (09:19 +0530)]
ath9k: Print ANI statistics in debugfs
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 3 Jun 2013 03:49:27 +0000 (09:19 +0530)]
ath9k: Set ofdmWeakSigDetect directly
The macros ATH9K_ANI_USE_OFDM_WEAK_SIG can be removed.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 3 Jun 2013 03:49:26 +0000 (09:19 +0530)]
ath9k: Simplify ANI initialization
The check "enable_ani" is not required since it is always
set to true and the logic for disabling/enabling ANI via
debugfs is done at a higher layer.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 3 Jun 2013 03:49:25 +0000 (09:19 +0530)]
ath9k: Remove unused structure ath_dbg_bb_mac_samp
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 3 Jun 2013 03:49:24 +0000 (09:19 +0530)]
ath9k: Enable WoW only for AR9462
The only card with which WoW has been tested and verified is
AR9462. Do not enable it for all cards since WoW is really quirky
and needs to be tested properly with each chip.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 3 Jun 2013 03:49:23 +0000 (09:19 +0530)]
ath9k: Return early for invalid rates
Process and update the internal RSSI average, which
is used by ANI, after verifying that the received
frame has valid rate information.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Yijing Wang [Thu, 30 May 2013 10:21:29 +0000 (18:21 +0800)]
net, ipw2x00: remove redundant D0 power state set
Pci_enable_device() will set device power state to D0,
so it's no need to do it again in ipw2100_pci_init_one().
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Tue, 28 May 2013 11:01:54 +0000 (13:01 +0200)]
ath9k: advertise support for active monitor interfaces
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Mon, 3 Jun 2013 19:55:37 +0000 (15:55 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/jberg/mac80211-next
Solomon Peachy [Sun, 2 Jun 2013 15:35:32 +0000 (11:35 -0400)]
cw1200: rename the cw1200 platform definition header
My previous patch just moved the file, but it also needed to be renamed
to conform to proper conventions.
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Solomon Peachy [Sun, 2 Jun 2013 15:35:31 +0000 (11:35 -0400)]
cw1200: Rework SDIO platform support to prevent build problems.
Based on discussions with And Bergmann, this patch changes the SDIO
platform code to default to supporting the Sagrad devices, allowing for
it to be overridden in board setup code. This renders the cw1200_sagrad
module suplerflous, so it is now removed.
It also moves the documentation that was in the cw1200_sagrad source to
the platform header.
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Solomon Peachy [Sun, 2 Jun 2013 13:53:03 +0000 (09:53 -0400)]
cw1200: Replace use of 'struct resource' with 'int' for GPIO fields.
The only advantage of 'struct resource' is that it lets us assign names
as part of the platform data. Unfortunately since we are using platform
data, we are already limited to a single instance of each driver,
rendering this moot.
So, replace the struct resources with ints, resulting in cleaner code.
This was based on a suggestion from Arnd Bergmann.
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Solomon Peachy [Sun, 2 Jun 2013 13:53:02 +0000 (09:53 -0400)]
cw1200: Reference correct 'powerup' GPIO signal.
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Solomon Peachy [Sun, 2 Jun 2013 13:53:01 +0000 (09:53 -0400)]
cw1200: move platform_data header to correct location.
(As suggested by Arnd Bergmann)
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Solomon Peachy [Sat, 1 Jun 2013 12:08:42 +0000 (08:08 -0400)]
cw1200: Rename 'sbus' to 'hwbus'
This avoids problems when building on SPARC targets due to the driver
calling the bus abstraction layer 'sbus'. Not that any SBUS-sporting
SPARC targets are likely to have an SDIO controller, but this is the
correct thing to do.
See http://kisskb.ellerman.id.au/kisskb/buildresult/8846508/
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 3 Jun 2013 15:25:34 +0000 (17:25 +0200)]
cfg80211: take WoWLAN support information out of wiphy struct
There's no need to take up the space for devices that don't
support WoWLAN, and most drivers can even make the support
data static const (except where it's modified at runtime.)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Jacob Minshall [Wed, 29 May 2013 21:32:36 +0000 (14:32 -0700)]
mac80211: set mesh formation field properly
Cap max peerings at 63 in accordance with IEEE-2012 8.4.2.100.7.
Triggers a beacon regeneration every time the number of peerings changes.
Previously this would only happen if the "accepting peerings" bit changed.
Signed-off-by: Jacob Minshall <jacob@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Thomas Pedersen [Sat, 1 Jun 2013 00:41:47 +0000 (17:41 -0700)]
mac80211: don't check local mesh TTL on TX
nl80211 has already verified the mesh TTL on setting the
mesh config, so no need to check it again in mac80211.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 3 Jun 2013 11:51:59 +0000 (13:51 +0200)]
mac80211: fix sdata locking around __ieee80211_request_smps
My cfg80211/mac80211 locking unification broke the sdata
locking in ieee80211_set_power_mgmt, it needs to acquire
the lock for __ieee80211_request_smps(). Add the locking.
Reported-by: Jakub Kicinski <kubakici@wp.pl>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 31 May 2013 08:17:49 +0000 (10:17 +0200)]
Revert "mac80211_hwsim: remove P2P_DEVICE support"
This reverts commit
e3ee68b7b049c5bbfcb78a179c00c373a38ed58c.
This wasn't intended to be included here, my mistake. I
accidentally merged a mac80211 fixes tree here that had
this change, when it wasn't even intended to be there.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 31 May 2013 08:17:19 +0000 (10:17 +0200)]
Revert "iwlwifi: mvm: remove P2P_DEVICE support"
This reverts commit
eebfc9394ee31b3ef162692c0cd483c1318a4395.
This wasn't intended to be included here, my mistake. I
accidentally merged a mac80211 fixes tree here that had
this change, when it wasn't even intended to be there.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Wei Yongjun [Thu, 30 May 2013 11:43:13 +0000 (19:43 +0800)]
cw1200: remove unused including <linux/version.h>
Remove including <linux/version.h> that don't need it.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wei Yongjun [Thu, 30 May 2013 11:42:54 +0000 (19:42 +0800)]
cw1200: use module_spi_driver to simplify the code
module_spi_driver() makes the code simpler by eliminating
boilerplate code.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wei Yongjun [Thu, 30 May 2013 11:42:35 +0000 (19:42 +0800)]
cw1200: convert to use simple_open()
This removes an open coded simple_open() function and
replaces file operations references to the function
with simple_open() instead.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wei Yongjun [Thu, 30 May 2013 11:41:11 +0000 (19:41 +0800)]
cw1200: remove duplicated include from wsm.c
Remove duplicated include.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Solomon Peachy [Thu, 30 May 2013 02:22:05 +0000 (22:22 -0400)]
cw1200: Fix compile with CONFIG_PM=n
Intel's 0-day kernel build tester caught this build failure. This patch
properly wraps everything that depends on CONFIG_PM.
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Oleksij Rempel [Fri, 24 May 2013 18:30:59 +0000 (20:30 +0200)]
ath9k: check for Rx-STBC flag and pass it to ieee80211
This patch make use of STBC flag in DMA RX descriptor.
Only devices after ar9280 can provide this information.
If card support it we will set HAVE_STBC flag, to show
clint programm thet STBC is supported but not received.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Oleksij Rempel [Fri, 24 May 2013 10:18:30 +0000 (12:18 +0200)]
ath9k: remove useless flag conversation.
some flags used only outside of ath9k - In this case we can use
"enum mac80211_rx_flags" and pass it upstream without extra
conversation.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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>
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>
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>
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>
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>
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>
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>
John W. Linville [Wed, 29 May 2013 18:51:50 +0000 (14:51 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/jberg/mac80211-next
John W. Linville [Wed, 29 May 2013 18:50:45 +0000 (14:50 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next
Johannes Berg [Tue, 28 May 2013 15:24:15 +0000 (17:24 +0200)]
mac80211: always send multicast on CAB queue
If the driver advertised support for a CAB queue, then we
should put all multicast frames there, otherwise sending
them can be racy with clients going to sleep while we TX
a frame. To avoid this, always TX multicast frames on the
multicast queue.
It seems like even drivers not using the queue framework
might want to do this which would mean also moving the
IEEE80211_TX_CTL_SEND_AFTER_DTIM flag assignment, but it
also seems that drivers behave differently here so that
just moving it wouldn't be a good idea. It'd be better to
modify those drivers to use the queue framework.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 29 May 2013 07:08:05 +0000 (09:08 +0200)]
cfg80211: remove cleanup_work kernel-doc
I evidently forgot this when removing the work itself.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Felix Fietkau [Tue, 28 May 2013 11:01:53 +0000 (13:01 +0200)]
mac80211: support active monitor interfaces
Support them only if the driver advertises support for them via
IEEE80211_HW_SUPPORTS_ACTIVE_MONITOR. Unlike normal monitor interfaces,
they are added to the driver, along with their MAC address.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Felix Fietkau [Tue, 28 May 2013 11:01:52 +0000 (13:01 +0200)]
cfg80211: support an active monitor interface flag
An active monitor interface is one that is used for communication (via
injection). It is expected to ACK incoming unicast packets. This is
useful for running various 802.11 testing utilities that associate to an
AP via injection and manage the state in user space.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Johannes Berg [Fri, 24 May 2013 22:01:30 +0000 (00:01 +0200)]
Merge remote-tracking branch 'mac80211/master' into mac80211-next
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>
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>
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>
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>
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>
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>