profile/ivi/kernel-x86-ivi.git
11 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Wed, 21 Nov 2012 17:57:56 +0000 (12:57 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless

Conflicts:
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
drivers/net/wireless/iwlwifi/pcie/tx.c

11 years agobrcmfmac: include linux/vmalloc.h from usb.c
John W. Linville [Mon, 19 Nov 2012 16:04:28 +0000 (11:04 -0500)]
brcmfmac: include linux/vmalloc.h from usb.c

This avoids build failures on some architectures...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
11 years agobrcmfmac: check return from kzalloc in brcmf_fweh_process_event
John W. Linville [Mon, 19 Nov 2012 15:53:32 +0000 (10:53 -0500)]
brcmfmac: check return from kzalloc in brcmf_fweh_process_event

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
11 years agobrcmsmac: Remove some noisy and uninformative debug messages
Seth Forshee [Thu, 15 Nov 2012 14:08:12 +0000 (08:08 -0600)]
brcmsmac: Remove some noisy and uninformative debug messages

These messages clutter up the trace buffer without adding any useful
information.

Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Add tracepoint for AMPDU session information
Seth Forshee [Thu, 15 Nov 2012 14:08:11 +0000 (08:08 -0600)]
brcmsmac: Add tracepoint for AMPDU session information

Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Add tracepoint for macintstatus
Seth Forshee [Thu, 15 Nov 2012 14:08:10 +0000 (08:08 -0600)]
brcmsmac: Add tracepoint for macintstatus

Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Improve tx trace and debug support
Seth Forshee [Thu, 15 Nov 2012 14:08:09 +0000 (08:08 -0600)]
brcmsmac: Improve tx trace and debug support

Add the brcmsmac_tx trace system for tx debugging. Existing code to dump
tx status and descriptors are converted to using tracepoints, allowing
for more efficient collection and post-processing of this data. These
tracepoints are placed to collect data for all tx frames instead of only
on errors. Logging of tx errors is also improved.

Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Add brcms_dbg_ht() debug macro
Seth Forshee [Thu, 15 Nov 2012 14:08:08 +0000 (08:08 -0600)]
brcmsmac: Add brcms_dbg_ht() debug macro

Also convert relevant messages to use this macro.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Add brcms_dbg_dma() debug macro
Seth Forshee [Thu, 15 Nov 2012 14:08:07 +0000 (08:08 -0600)]
brcmsmac: Add brcms_dbg_dma() debug macro

Also convert relevant messages to use this macro.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Add brcms_dbg_int() debug macro
Seth Forshee [Thu, 15 Nov 2012 14:08:06 +0000 (08:08 -0600)]
brcmsmac: Add brcms_dbg_int() debug macro

Also convert relevant message to use this macro.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Add rx and tx debug macros
Seth Forshee [Thu, 15 Nov 2012 14:08:05 +0000 (08:08 -0600)]
brcmsmac: Add rx and tx debug macros

Also convert relevant messages over to use thses macros.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Add brcms_dbg_mac80211() debug macro
Seth Forshee [Thu, 15 Nov 2012 14:08:04 +0000 (08:08 -0600)]
brcmsmac: Add brcms_dbg_mac80211() debug macro

This macro is used for messages related to the 802.11 MAC layer.
Relevant messages are also converted to use this macro.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Use debug macros for general error and debug statements
Seth Forshee [Thu, 15 Nov 2012 14:08:03 +0000 (08:08 -0600)]
brcmsmac: Use debug macros for general error and debug statements

Convert most uses of wiphy_* and pr_* for general error and debug
messages to use the internal debug macros instead. Most code used only
for initialization still use wiphy_err(), as well as some locations
which are executed too early to use the debug macros. Some debug
messages which are redundant or not useful are removed.

Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Add support for writing debug messages to the trace buffer
Seth Forshee [Thu, 15 Nov 2012 14:08:02 +0000 (08:08 -0600)]
brcmsmac: Add support for writing debug messages to the trace buffer

Add a new brcmsmac_msg trace system to enable writing of debug messages
to the trace buffer, and add brcms_* macros for storing device debug
messages in the trace buffer in addition to the printk log buffer.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Add module parameter for setting the debug level
Seth Forshee [Thu, 15 Nov 2012 14:08:01 +0000 (08:08 -0600)]
brcmsmac: Add module parameter for setting the debug level

The debug level can be set by passing debug=... to brcmsmac whenever
CONFIG_BRCMDBG is enabled.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcm80211: Convert log message levels to debug levels
Seth Forshee [Thu, 15 Nov 2012 14:08:00 +0000 (08:08 -0600)]
brcm80211: Convert log message levels to debug levels

In preparation for enhancements to debug and trace support, convert the
message levels to debug levels which will be used for enabling
categories of debug messages. The two message levels are little-used
anyway and are combined into the BRCM_DL_INFO debug level.

Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcm80211: Allow trace support to be enabled separately from debug
Seth Forshee [Thu, 15 Nov 2012 14:07:59 +0000 (08:07 -0600)]
brcm80211: Allow trace support to be enabled separately from debug

Since the runtime overhead of trace support is small when tracing is
disabled, users may be interested in turning on trace support while
leaving other debug features off. Add a new config option named
CONFIG_BRCM_TRACING for this purpose.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Reduce number of entries in tx DMA rings
Seth Forshee [Thu, 15 Nov 2012 14:07:58 +0000 (08:07 -0600)]
brcmsmac: Reduce number of entries in tx DMA rings

Currently up to 256 frames can be queued for each DMA ring. This is
excessive, and now that we have better flow control we can get by with
less. Experimentation has shown 64 to work well.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Use correct descriptor count when calculating next rx descriptor
Seth Forshee [Thu, 15 Nov 2012 14:07:57 +0000 (08:07 -0600)]
brcmsmac: Use correct descriptor count when calculating next rx descriptor

nextrxd() is calling txd(), which means that the tx descriptor count is
used to determine when to wrap for determining the next ring buffer
entry. This has worked so far since the driver has been using the same
number of rx and tx descriptors, but it's obviously going to be a
problem if different numbers of descriptors are used.

Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Remove internal tx queue
Seth Forshee [Thu, 15 Nov 2012 14:07:56 +0000 (08:07 -0600)]
brcmsmac: Remove internal tx queue

The brcmsmac internal tx buffering is problematic. The amount of
buffering is excessive (228 packets in addition to the 256 slots in each
DMA ring), and frames may be dropped due to a lack of flow control.

This patch reworks the transmit code path to remove the internal
buffering. Frames are immediately handed off to the DMA support rather
than passing through an intermediate queue. Non-aggregate frames are
queued immediately into the tx rings, and aggregate frames are queued
temporarily in an AMPDU session until ready for transmit.

Transmit flow control is also added to avoid dropping packets when the
tx rings are full. Conceptually this is a separate change, but it's
included in this commit because removing the tx queue without adding
flow control could cause significant problems.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Use IEEE 802.11 AC levels for pktq precedence levels
Seth Forshee [Thu, 15 Nov 2012 14:07:55 +0000 (08:07 -0600)]
brcmsmac: Use IEEE 802.11 AC levels for pktq precedence levels

The mac80211 tx queues and brcmsmac DMA fifos both map directly to AC
levels. Therefore it's much more straightforward to queue tx frames and
choose the tx fifo based on the mac80211 queue instead of mapping 802.1D
priority tags to precedence levels then back to AC levels. mac80211
already maps the 802.1D levels to the appropriate AC levels and queues
management frames at the maximum priority, so the results should be
identical.

One functional change resulting from this patch is that AMPDU retries no
longer get a priority boost to queue them ahead of packets with the same
priority already in the tx queue. This behavior will be restored (in
effect at least) in a later patch when the tx queue is removed.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Remove unimplemented flow control functions
Seth Forshee [Thu, 15 Nov 2012 14:07:54 +0000 (08:07 -0600)]
brcmsmac: Remove unimplemented flow control functions

Functions for flow control exist but remain unimplemented. Remove these
in advance of adding real flow control.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Add helper function for updating txavail count
Seth Forshee [Thu, 15 Nov 2012 14:07:53 +0000 (08:07 -0600)]
brcmsmac: Add helper function for updating txavail count

Use this helper function rather than open-coding the same calculation in
multiple places.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Don't weight AMPDU packets in txfifo
Seth Forshee [Thu, 15 Nov 2012 14:07:52 +0000 (08:07 -0600)]
brcmsmac: Don't weight AMPDU packets in txfifo

According to the comments this "reduces rate lag," but in reality the
only way this value is used is for determining whether or not any frames
remain to be transmitted. Therefore there's no reason for AMPDU packets
to receive any weighting.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Introduce AMPDU sessions for assembling AMPDUs
Seth Forshee [Thu, 15 Nov 2012 14:07:51 +0000 (08:07 -0600)]
brcmsmac: Introduce AMPDU sessions for assembling AMPDUs

AMPDU session allows MPDUs to be temporarily queued until either a full
AMPDU has been collected or circumstances dictate that transmission
should start with a partial AMPDU. Packets are added to the session by
calling brcms_c_ampdu_add_frame(). brcms_c_ampdu_finalize() should be
called to fix up the tx headers in the first and last packet before
adding the packets to the DMA ring. brmcs_c_sendampdu() is converted to
using AMPDU sessions.

This patch has no real value on it's own, but is needed in preparation
for elimination of the tx packet queue from brcmsmac.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge tag 'nfc-next-3.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo...
John W. Linville [Tue, 20 Nov 2012 18:22:03 +0000 (13:22 -0500)]
Merge tag 'nfc-next-3.8-2' of git://git./linux/kernel/git/sameo/nfc-3.0

Samuel says:

"This is the 2nd NFC pull request for 3.8.

With this one we have:

- A few HCI improvements in preparation for an upcoming HCI chipset support.
- A pn544 code cleanup after the old driver was removed.
- An LLCP improvement for notifying user space when one peer stops ACKing I
  frames."

Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge tag 'nfc-fixes-3.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo...
John W. Linville [Tue, 20 Nov 2012 18:08:14 +0000 (13:08 -0500)]
Merge tag 'nfc-fixes-3.7-1' of git://git./linux/kernel/git/sameo/nfc-3.0

Samuel says:

"This is the first pull request for 3.7 NFC fixes.

We mostly have pn533 fixes here, 2 memory leaks and an early unlocking fix.
Moreover, we also have an LLCP adapter linked list insertion fix."

Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoNFC: Fix pn533 target mode memory leak
Thierry Escande [Thu, 15 Nov 2012 17:24:28 +0000 (18:24 +0100)]
NFC: Fix pn533 target mode memory leak

In target mode, sent sk_buff were not freed in pn533_tm_send_complete

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Fix mem leak in pn533_in_dep_link_up
Waldemar Rymarkiewicz [Thu, 11 Oct 2012 12:04:00 +0000 (14:04 +0200)]
NFC: pn533: Fix mem leak in pn533_in_dep_link_up

cmd is allocated in pn533_dep_link_up and passed as an arg to
pn533_send_cmd_frame_async together with a complete cb.

arg is passed to the cb and must be kfreed there.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Fix use after free
Szymon Janc [Mon, 29 Oct 2012 13:04:43 +0000 (14:04 +0100)]
NFC: pn533: Fix use after free

cmd was freed in pn533_dep_link_up regardless of
pn533_send_cmd_frame_async return code. Cmd is passed as argument to
pn533_in_dep_link_up_complete callback and should be freed there.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: pn533: Fix missing lock while operating on commands list
Szymon Janc [Thu, 25 Oct 2012 15:29:45 +0000 (17:29 +0200)]
NFC: pn533: Fix missing lock while operating on commands list

In pn533_wq_cmd command was removed from list without cmd_lock held
(race with pn533_send_cmd_frame_async) which could lead to list
corruption. Delete command from list before releasing lock.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Fix nfc_llcp_local chained list insertion
Thierry Escande [Fri, 12 Oct 2012 13:25:43 +0000 (15:25 +0200)]
NFC: Fix nfc_llcp_local chained list insertion

list_add was called with swapped parameters

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Queue a copy of the transmitted LLCP skb
Samuel Ortiz [Thu, 1 Nov 2012 22:36:07 +0000 (23:36 +0100)]
NFC: Queue a copy of the transmitted LLCP skb

Drivers are allowed to modify the sent skb and thus we need to make a copy
of it before passing it to the driver. Without this fix, LLCP Tx skbs were
not queued properly as the ptype check was failing due to e.g. the pn533
driver skb_pushing the Tx skb.

Reported-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Stop sending LLCP frames when tx queues are getting too deep
Samuel Ortiz [Thu, 1 Nov 2012 22:33:00 +0000 (23:33 +0100)]
NFC: Stop sending LLCP frames when tx queues are getting too deep

When the tx pending queues and/or the socket tx queue is getting too deep,
we have to let userspace know. We won't be queueing any more frames until
the congestion is fixed.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Copy user space buffer when sending UI frames
Samuel Ortiz [Mon, 29 Oct 2012 13:02:17 +0000 (14:02 +0100)]
NFC: Copy user space buffer when sending UI frames

Using the userspace IO vector directly is wrong, we should copy it from
user space first.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoMAINTAINERS: Add reference to pn544.h platform data header
Marcel Holtmann [Wed, 24 Oct 2012 18:45:38 +0000 (11:45 -0700)]
MAINTAINERS: Add reference to pn544.h platform data header

The platform data header for PN544 based NFC devices should
also be mentioned here.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Move pn544.h to linux/platform_data/
Marcel Holtmann [Wed, 24 Oct 2012 18:45:26 +0000 (11:45 -0700)]
NFC: Move pn544.h to linux/platform_data/

The pn544.h just provides the platform data struct and defines and
nothing else. So move it to to linux/platform_data/ now.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Remove unused details from pn544.h header file
Marcel Holtmann [Wed, 24 Oct 2012 18:45:12 +0000 (11:45 -0700)]
NFC: Remove unused details from pn544.h header file

The majority of the defines and structures from pn544.h are no
longer in use. So just remove them.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Export nfc_hci_sak_to_protocol()
Eric Lapuyade [Tue, 23 Oct 2012 09:37:43 +0000 (11:37 +0200)]
NFC: Export nfc_hci_sak_to_protocol()

Some HCI drivers will need it.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Export nfc_hci_result_to_errno as it can be needed by HCI drivers
Eric Lapuyade [Wed, 17 Oct 2012 14:50:10 +0000 (16:50 +0200)]
NFC: Export nfc_hci_result_to_errno as it can be needed by HCI drivers

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Dot not dispatch HCI event received on unopened pipe
Eric Lapuyade [Wed, 17 Oct 2012 14:49:12 +0000 (16:49 +0200)]
NFC: Dot not dispatch HCI event received on unopened pipe

A chip with pre-opened gates may send events on a gate that nobody
has opened in the handset host. Discard those events.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Ignore err when chip doesn't implement HW/SW info registers
Eric Lapuyade [Wed, 17 Oct 2012 14:48:21 +0000 (16:48 +0200)]
NFC: Ignore err when chip doesn't implement HW/SW info registers

NFC_HCI_ID_MGMT_VERSION_SW and NFC_HCI_ID_MGMT_VERSION_HW are optional
registers for gate NFC_HCI_ID_MGMT_GATE in standard HCI. When chip
doesn't implement, just leave all the information as zeros.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Fix hci_connect_gate() when a pre-opened pipe is passed
Eric Lapuyade [Wed, 17 Oct 2012 14:47:13 +0000 (16:47 +0200)]
NFC: Fix hci_connect_gate() when a pre-opened pipe is passed

In some cases, pre-opened pipes don't stay open when a clear all pipes
command is sent. They stay created however. Therefore, one can never
assume that such a pipe is already open. As re-opening a pipe seems not
to be a problem, we do that now.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Mon, 19 Nov 2012 19:38:12 +0000 (14:38 -0500)]
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-fixes

11 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
John W. Linville [Mon, 19 Nov 2012 19:37:43 +0000 (14:37 -0500)]
Merge branch 'for-john' of git://git./linux/kernel/git/jberg/mac80211

11 years agoath9k: Fix BTCOEX debugfs file usage
Sujith Manoharan [Mon, 19 Nov 2012 08:54:46 +0000 (14:24 +0530)]
ath9k: Fix BTCOEX debugfs file usage

The debugfs file for dumping btcoex parameters unconditionally
assumes a MCI-based device. This will not work for older btcoex
chips. Fix this by branching out the routine into separate
functions.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Fix regression in device reset
Sujith Manoharan [Sat, 17 Nov 2012 15:50:50 +0000 (21:20 +0530)]
ath9k_hw: Fix regression in device reset

Commit "ath9k: improve suspend/resume reliability" broke ath9k_htc
and bringing up the device would hang indefinitely. Fix this.

Cc: stable@vger.kernel.org
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoiwlwifi: don't WARN when a non empty queue is disabled
Emmanuel Grumbach [Mon, 15 Oct 2012 15:57:36 +0000 (17:57 +0200)]
iwlwifi: don't WARN when a non empty queue is disabled

This can happen when we shut down suddenly an interface.

Cc: stable@vger.kernel.org
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agowireless: add back sysfs directory
Johannes Berg [Fri, 16 Nov 2012 19:46:19 +0000 (20:46 +0100)]
wireless: add back sysfs directory

commit 35b2a113cb0298d4f9a1263338b456094a414057 broke (at least)
Fedora's networking scripts, they check for the existence of the
wireless directory. As the files aren't used, add the directory
back and not the files. Also do it for both drivers based on the
old wireless extensions and cfg80211, regardless of whether the
compat code for wext is built into cfg80211 or not.

Cc: stable@vger.kernel.org [3.6]
Reported-by: Dave Airlie <airlied@gmail.com>
Reported-by: Bill Nottingham <notting@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomwifiex: report error to MMC core if we cannot suspend
Bing Zhao [Thu, 15 Nov 2012 23:58:48 +0000 (15:58 -0800)]
mwifiex: report error to MMC core if we cannot suspend

When host_sleep_config command fails we should return error to
MMC core to indicate the failure for our device.

The misspelled variable is also removed as it's redundant.

Cc: "3.0+" <stable@vger.kernel.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: fix system hang issue in cmd timeout error case
Bing Zhao [Thu, 15 Nov 2012 23:58:47 +0000 (15:58 -0800)]
mwifiex: fix system hang issue in cmd timeout error case

Reported by Tim Shepard:
I was seeing sporadic failures (wedgeups), and the majority of those
failures I saw printed the printouts in mwifiex_cmd_timeout_func with
cmd = 0xe5 which is CMD_802_11_HS_CFG_ENH.  When this happens, two
minutes later I get notified that the rtcwake thread is blocked, like
this:
      INFO: task rtcwake:3495 blocked for more than 120 seconds.

To get the hung thread unblocked we wake up the cmd wait queue and
cancel the ioctl.

Cc: "3.4+" <stable@vger.kernel.org>
Reported-by: Tim Shepard <shep@laptop.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agortlwifi: rtl8192cu: Add new USB ID
Albert Pool [Tue, 30 Oct 2012 19:58:06 +0000 (20:58 +0100)]
rtlwifi: rtl8192cu: Add new USB ID

This is an ISY IWL 2000. Probably a clone of Belkin F7D1102 050d:1102.
Its FCC ID is the same.

Signed-off-by: Albert Pool <albertpool@solcon.nl>
Cc: stable@vger.kernel.org
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Program filter coefficients correctly
Sujith Manoharan [Tue, 13 Nov 2012 06:03:53 +0000 (11:33 +0530)]
ath9k_hw: Program filter coefficients correctly

2484 Mhz (Japan) usage requires filter coefficients to
be programmed in the CCK TX FIR registers. This is required
for AR9331, AR9485 and AR9462. Fix this and also remove
a few useless macros and a duplicate variable.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agolib80211: hide Kconfig symbol
Johannes Berg [Thu, 15 Nov 2012 23:06:20 +0000 (00:06 +0100)]
lib80211: hide Kconfig symbol

There's no need to ask the user about lib80211
since it will be selected by drivers requiring
it, hide it from Kconfig.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: don't select lib80211
Johannes Berg [Thu, 15 Nov 2012 23:05:20 +0000 (00:05 +0100)]
mwifiex: don't select lib80211

The driver doesn't use any lib80211 symbols
so it shouldn't select it in Kconfig.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agortlwifi: use eth_zero_addr() to assign zero address
Wei Yongjun [Thu, 15 Nov 2012 13:24:57 +0000 (21:24 +0800)]
rtlwifi: use eth_zero_addr() to assign zero address

Using eth_zero_addr() to assign zero address insetad of
memset() or an inefficient copy from a static array.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agonet/wireless: ipw2x00: remove unreachable code
Stanislav Yakovlev [Thu, 15 Nov 2012 03:07:47 +0000 (03:07 +0000)]
net/wireless: ipw2x00: remove unreachable code

Remove unnecessary if statements because libipw_set_geo always
returns success.  Also change function's return value from int
to void.

Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: code cleanup
Hante Meuleman [Thu, 15 Nov 2012 02:46:23 +0000 (18:46 -0800)]
brcmfmac: code cleanup

Removing obsolete functions and prototypes. Moving (and renaming)
defines to place with similar definitions. Removing unnecessary
includes.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: limit hex dump on fwil.
Hante Meuleman [Thu, 15 Nov 2012 02:46:22 +0000 (18:46 -0800)]
brcmfmac: limit hex dump on fwil.

When debug is turned on for fwil then the whole data buffer is
dumped. In some cases this gives excessive amount of debug. With
this patch the dumps are limited to 64 bytes.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: sdio module load fix.
Hante Meuleman [Thu, 15 Nov 2012 02:46:21 +0000 (18:46 -0800)]
brcmfmac: sdio module load fix.

On sdio module unload followed by load (without removing the
device) the access window should be moved back to enumeration
space. Force this by removing initialisation of sbwad during
probe.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: avoid usage of func->card->dev in sdio probe.
Hante Meuleman [Thu, 15 Nov 2012 02:46:20 +0000 (18:46 -0800)]
brcmfmac: avoid usage of func->card->dev in sdio probe.

brcmf_ops_sdio_probe used the private_date func->card->dev to
store device data of brcmfmac sdio. This is not a good place to
store the data. Use dev of func and use func->card->sdio_func
to group the functions the driver is using.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: sdio unload fix.
Hante Meuleman [Thu, 15 Nov 2012 02:46:19 +0000 (18:46 -0800)]
brcmfmac: sdio unload fix.

on sdio remove the bus_if should be configured for close, so
new data from higher layers will be blocked. Also the access
to bus_if in the watchdog should be checked for null pointer
access on sdio remove.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: Handle mmc exceptions during init correct.
Hante Meuleman [Thu, 15 Nov 2012 02:46:18 +0000 (18:46 -0800)]
brcmfmac: Handle mmc exceptions during init correct.

when brcmf_sdbrcm_probe_attach results in error then cleanup
will result in null pointer access. In brcmf_sdbrcm_release and
in brcmf_ops_sdio_remove. This patch fixes order of init and
de-init.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: Any error should result in failure of probe.
Hante Meuleman [Thu, 15 Nov 2012 02:46:17 +0000 (18:46 -0800)]
brcmfmac: Any error should result in failure of probe.

In brcmf_sdbrcm_probe only error ELINK is seen as error. However
brcmf_bus_start can return many more error codes and all should
result in failed init of driver.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: restructure handling of IF event
Arend van Spriel [Thu, 15 Nov 2012 02:46:16 +0000 (18:46 -0800)]
brcmfmac: restructure handling of IF event

The IF event need special care. It can be either an ADD, DEL, or
CHANGE. For an ADD we need to call brcmf_add_if() before the
event handler call. Upon a DEL we need to call brcmf_del_if()
after the event handler call. CHANGE does not require special
attention.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: ignore IF event if it is a add for ifidx 0
Arend van Spriel [Thu, 15 Nov 2012 02:46:15 +0000 (18:46 -0800)]
brcmfmac: ignore IF event if it is a add for ifidx 0

Firmware fires IF event to add the primary interface but that
is already created in the driver.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: fix wrong usage of unaligned include file
Arend van Spriel [Thu, 15 Nov 2012 02:46:14 +0000 (18:46 -0800)]
brcmfmac: fix wrong usage of unaligned include file

Replaced <linux/unaligned/access_ok.h> by <asm/unaligned.h>
to make it work on ARM and other architectures.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: fix NULL pointer access in brcmf_fweh_detach()
Hante Meuleman [Thu, 15 Nov 2012 02:46:13 +0000 (18:46 -0800)]
brcmfmac: fix NULL pointer access in brcmf_fweh_detach()

brcmf_fweh_detach can be called while ifp is already NULL, due to
init error. Fix NULL pointer access by checking ifp.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: remove mac address validation from brcmf_net_attach()
Arend van Spriel [Thu, 15 Nov 2012 02:46:12 +0000 (18:46 -0800)]
brcmfmac: remove mac address validation from brcmf_net_attach()

The mac_addr field in ifp object is always valid so no need to
validate.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: change mac address parameter in brcmf_add_if()
Arend van Spriel [Thu, 15 Nov 2012 02:46:11 +0000 (18:46 -0800)]
brcmfmac: change mac address parameter in brcmf_add_if()

The function brcmf_add_if() is called with mac address set to NULL
for the primary interface. When handling IF ADD events the firmware
provides a address mask in the event to derive its mac address from
the primary mac address. Rename the parameter and use it as a mask.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: correct handling IF firmware event
Arend van Spriel [Thu, 15 Nov 2012 02:46:10 +0000 (18:46 -0800)]
brcmfmac: correct handling IF firmware event

Testing revealed the IF ADD event contains the interface
index of the new interface. This would result in a NULL
pointer access when handling the event.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: fix for multiple netdevice interface support
Arend van Spriel [Thu, 15 Nov 2012 02:46:09 +0000 (18:46 -0800)]
brcmfmac: fix for multiple netdevice interface support

virtual netdevice interface like P2P client and GO need
different callbacks for .open and .down. This patch adds
those.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: change parameter in brcmf_add_if() function
Arend van Spriel [Thu, 15 Nov 2012 02:46:08 +0000 (18:46 -0800)]
brcmfmac: change parameter in brcmf_add_if() function

The brcmf_add_if() function had a struct device as parameter
to accomodate the bus specific code to use this function. The
driver has been reworked so the bus specific code does not need
this function. Better replace the parameter with a more specific
driver object, ie. struct brcmf_pub.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: usb suspend/resume.
Hante Meuleman [Thu, 15 Nov 2012 02:46:07 +0000 (18:46 -0800)]
brcmfmac: usb suspend/resume.

Add support for usb suspend/resume.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: cleanup of usb firmware download routines
Hante Meuleman [Thu, 15 Nov 2012 02:46:06 +0000 (18:46 -0800)]
brcmfmac: cleanup of usb firmware download routines

Clean code related to firmware download routines. Remove obsolete
delay and increase delay after reset command.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: rework firmware event handling code
Arend van Spriel [Thu, 15 Nov 2012 02:46:05 +0000 (18:46 -0800)]
brcmfmac: rework firmware event handling code

Handling of firmware event has been reworked into a seperate
code file. The change is needed as firmware event can be received
in interrupt context. Decoupling of the event handling has been
lowered to allow event processing to sleep.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath5k: precedence error in ath5k_hw_nic_wakeup()
Dan Carpenter [Wed, 14 Nov 2012 08:23:07 +0000 (11:23 +0300)]
ath5k: precedence error in ath5k_hw_nic_wakeup()

'|' has higher precedence than ?:.  Since AR5K_PHY_TURBO_MODE is 0x1 and
"AR5K_PHY_TURBO_MODE | (ah->ah_radio == AR5K_RF2425)" is true then we
always set turbo to zero.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath5k: Use module_platform_driver macro for ahb.c
Syam Sidhardhan [Tue, 13 Nov 2012 15:39:50 +0000 (21:09 +0530)]
ath5k: Use module_platform_driver macro for ahb.c

Simplify the code by make use of module_platform_driver macro.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Remove unused workaround
Sujith Manoharan [Mon, 12 Nov 2012 05:26:44 +0000 (10:56 +0530)]
ath9k: Remove unused workaround

The workaround for ASPM/L0s is needed only for AR9485 1.0,
which was never sold and is not supported by ath9k.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Update AR9485 initvals
Sujith Manoharan [Mon, 12 Nov 2012 05:26:43 +0000 (10:56 +0530)]
ath9k_hw: Update AR9485 initvals

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Fix wrong peak detector DC offset
Rajkumar Manoharan [Fri, 9 Nov 2012 09:21:30 +0000 (14:51 +0530)]
ath9k_hw: Fix wrong peak detector DC offset

An issue is reported in AR9462 & AR9565 that NF_cal_not_done is
not observed when HW peak detector calibration is disabled. At that
state, the HW is stuck at NF calibration which prevents tx output.
The root cause is wrong peak detector offset calibrated by HW. To
resolve this issue, peak detector calibration is done manually by SW
for AR9462 and AR9565.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: Send BASTREAM firmware commands per vif
Yogesh Ashok Powar [Thu, 8 Nov 2012 13:40:44 +0000 (19:10 +0530)]
mwl8k: Send BASTREAM firmware commands per vif

The firmware supports 8 macid's corresponding to 8 BSS that can be
created in an MBSS environment. Currently, BASTREAM commands were always
sent with macid 0. This macid is used to configure the hardware ampdu
registers with appropriate BSS address in an MBSS environment.
This mac address is used by the hardware for various ampdu related requirements
e.g. source address in BAR generation, BA interpretation e.t.c.
Using invalid macid results in this mac address not getting appropriately
configured in the hardware which results in issues during ampdu traffic.

Fix this by sending the BASTREAM commands with appropriate macid.

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 agossb: fix SPROM offset
Piotr Haber [Thu, 8 Nov 2012 08:47:27 +0000 (09:47 +0100)]
ssb: fix SPROM offset

Offset for temperature compensation
values is wrong in ssb SPROMv8 map.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: [DFS] add pulse width tolerance for ETSI
Zefir Kurtisi [Wed, 31 Oct 2012 11:23:01 +0000 (12:23 +0100)]
ath9k: [DFS] add pulse width tolerance for ETSI

Add 5% width tolerance for radar patterns defined by ETSI.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge branch 'for-linville' of git://github.com/kvalo/ath6kl
John W. Linville [Fri, 16 Nov 2012 19:08:14 +0000 (14:08 -0500)]
Merge branch 'for-linville' of git://github.com/kvalo/ath6kl

11 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Fri, 16 Nov 2012 19:07:54 +0000 (14:07 -0500)]
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

Conflicts:
drivers/net/wireless/iwlwifi/pcie/trans.c

11 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac802...
John W. Linville [Fri, 16 Nov 2012 18:59:51 +0000 (13:59 -0500)]
Merge branch 'for-john' of git://git./linux/kernel/git/jberg/mac80211-next

11 years agoath6kl: support NL80211_USER_REG_HINT_CELL_BASE events
Kalle Valo [Thu, 15 Nov 2012 14:34:56 +0000 (16:34 +0200)]
ath6kl: support NL80211_USER_REG_HINT_CELL_BASE events

As ath6kl firmware can't do intersections the driver should only listen
to regdom changes from cellular base stations, all other requests need to
be refused.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agomwl8k: Set packet timestamp to 0 when life time expiry is not used
Nishant Sarmukadam [Tue, 6 Nov 2012 13:53:15 +0000 (19:23 +0530)]
mwl8k: Set packet timestamp to 0 when life time expiry is not used

Set tx packet timestamp to 0 in following scenarios:-
- All packets in STA mode
- Mgmt packets in AP mode
- Eapol packets in AP mode

In STA mode, this field is unused in the firmware. In AP
mode, we should not be expiring mgmt and eapol frames.
Setting timestamp to 0 will ensure that.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: Do not expire eapol frames
Nishant Sarmukadam [Tue, 6 Nov 2012 13:53:01 +0000 (19:23 +0530)]
mwl8k: Do not expire eapol frames

This can cause issues when clients try to connect when the
traffic is heavy

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: Unmap the pci DMA address in xmit error path
Nishant Sarmukadam [Tue, 6 Nov 2012 13:52:48 +0000 (19:22 +0530)]
mwl8k: Unmap the pci DMA address in xmit error path

We should unmap the DMA address in the error path, else it
causes resource leaks. Fix this.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: recheck if station still has valid rates
Yogesh Ashok Powar [Tue, 6 Nov 2012 13:52:35 +0000 (19:22 +0530)]
mwl8k: recheck if station still has valid rates

We have 6.5 Mbps is minimum rate of the link
as the criterion for creation of BA.

Although we check this before creating the BA
stream, by the time amdpu_action is called from
the workqueue, the link can get affected in the
meantime.
Hence, add an additional check in amdpu_action.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: defining interface combinations
Yogesh Ashok Powar [Tue, 6 Nov 2012 13:52:16 +0000 (19:22 +0530)]
mwl8k: defining interface combinations

AP mode support upto 8 interfaces.
Defining it using iface_combinations

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: process RX packets in SDIO IRQ thread directly
Bing Zhao [Tue, 6 Nov 2012 00:59:15 +0000 (16:59 -0800)]
mwifiex: process RX packets in SDIO IRQ thread directly

ksdioirqd has higher priority than kworker. Process RX packets
in SDIO IRQ thread (ksdioirqd/mmcX) directly instead of deferring
the work to kworker to avoid the extra latency.
This improves TCP throughput 15~20% on an ARM platform with SDIO
2.0 controller.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: use struct brcmf_if parameter in firmware event callbacks
Arend van Spriel [Tue, 6 Nov 2012 00:22:32 +0000 (16:22 -0800)]
brcmfmac: use struct brcmf_if parameter in firmware event callbacks

Firmware events are passed to wl_cfg80211 module associated with
the primary net device. With virtual interface support events can
be received for different interfaces, ie. struct brcmf_if instances.
Pass it in the event to determine appropriate net device associated
with the event.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: add dedicated USB log level.
Hante Meuleman [Tue, 6 Nov 2012 00:22:31 +0000 (16:22 -0800)]
brcmfmac: add dedicated USB log level.

Add USB log level and update and add log messages in usb module.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: on halting driver check before release or free.
Hante Meuleman [Tue, 6 Nov 2012 00:22:30 +0000 (16:22 -0800)]
brcmfmac: on halting driver check before release or free.

brcmf_netdev_stop shall first check bus_if status before bringing
down cfg80211. brcmf_detach shall first check if driver is
allocated.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: check bus state to be data before sending data.
Hante Meuleman [Tue, 6 Nov 2012 00:22:29 +0000 (16:22 -0800)]
brcmfmac: check bus state to be data before sending data.

brcmf_netdev_start_xmit and brcmf_fil_cmd_data are checking
bus state for down. These functions should check for data
state.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: return immediately error for out of range key_idx.
Hante Meuleman [Tue, 6 Nov 2012 00:22:28 +0000 (16:22 -0800)]
brcmfmac: return immediately error for out of range key_idx.

when brcmf_cfg80211_del_key was called with out of range key index
then firmware would return error. Checking was added to
brcmf_cfg80211_del_key to immediately return error.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: fix build regression
Arend van Spriel [Tue, 6 Nov 2012 00:22:27 +0000 (16:22 -0800)]
brcmfmac: fix build regression

This fixes a build regression for x86_64 target that showed up
in 3.7-rc1 due to:

commit 1a87334239757b69eb9885979c32bbf871b3ec88
Author: Hante Meuleman <meuleman@broadcom.com>
Date:   Thu Sep 27 14:17:54 2012 +0200

    brcmfmac: add hostap supoort.

Reported-by: Yuanhan Liu <yuanhan.liu@intel.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>