platform/kernel/linux-stable.git
11 years agortl8723ae: fix build break from "mac80211: support RX_FLAG_MACTIME_END"
John W. Linville [Wed, 21 Nov 2012 19:59:46 +0000 (14:59 -0500)]
rtl8723ae: fix build break from "mac80211: support RX_FLAG_MACTIME_END"

  CC      drivers/net/wireless/rtlwifi/rtl8723ae/trx.o
drivers/net/wireless/rtlwifi/rtl8723ae/trx.c: In function ‘rtl8723ae_rx_query_desc’:
drivers/net/wireless/rtlwifi/rtl8723ae/trx.c:324:21: error: ‘RX_FLAG_MACTIME_MPDU’ undeclared (first use in this function)
drivers/net/wireless/rtlwifi/rtl8723ae/trx.c:324:21: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [drivers/net/wireless/rtlwifi/rtl8723ae/trx.o] Error 1

Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac802...
John W. Linville [Wed, 21 Nov 2012 19:43:51 +0000 (14:43 -0500)]
Merge branch 'for-john' of git://git./linux/kernel/git/jberg/mac80211-next

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

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

11 years agobrcmsmac: Remove stray argument from debug macro
Seth Forshee [Wed, 21 Nov 2012 15:24:31 +0000 (09:24 -0600)]
brcmsmac: Remove stray argument from debug macro

One of the debug macro invocations ended up with a stray 0 argument
where the format string should be. Remove it.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: Remove unused wlc_prio2prec_map and _BRCMS_PREC_* constants
Seth Forshee [Wed, 21 Nov 2012 15:24:30 +0000 (09:24 -0600)]
brcmsmac: Remove unused wlc_prio2prec_map and _BRCMS_PREC_* constants

Fixes sparse warning:
drivers/net/wireless/brcm80211/brcmsmac/main.c:308:10: sparse: symbol 'wlc_prio2prec_map' was not declared. Should it be static?

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Remove 'stations' debugfs file
Sujith Manoharan [Wed, 21 Nov 2012 12:43:15 +0000 (18:13 +0530)]
ath9k: Remove 'stations' debugfs file

The 'stations' debugfs file has multiple issues. It doesn't scale
to an arbitrary number of associated stations and allocating
64K is not elegant either. Now that changes have been made in
mac80211 to support dynamic creation/deletion of driver-specific
debugfs files on station addition/removal, remove this file and
make use of the mac80211 hooks (which will be done in a sebsequent
patch).

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Fix rate control debugging
Sujith Manoharan [Wed, 21 Nov 2012 12:43:14 +0000 (18:13 +0530)]
ath9k: Fix rate control debugging

Update the rate statistics only when debugfs has been enabled
in ath9k and mac80211 and move the stat() functions under proper
conditionals.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Fill remove_sta_debugfs() callback
Sujith Manoharan [Wed, 21 Nov 2012 12:43:13 +0000 (18:13 +0530)]
ath9k: Fill remove_sta_debugfs() callback

Remove the rate control statistics debugfs file properly
via remove_sta_debugfs(). Also, check for both MAC80211_DEBUGFS
and ATH9K_DEBUGFS config options.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Add a debugfs file to dump queue statistics
Sujith Manoharan [Wed, 21 Nov 2012 12:43:12 +0000 (18:13 +0530)]
ath9k: Add a debugfs file to dump queue statistics

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Fix the 'xmit' debugfs file
Sujith Manoharan [Wed, 21 Nov 2012 12:43:11 +0000 (18:13 +0530)]
ath9k: Fix the 'xmit' debugfs file

The 'xmit' debugfs file has become big and unwieldy, fix
multiple issues with its usage:

* Store TX counters/statistics only for the 4 Access Categories.
  Use IEEE80211_NUM_ACS instead of ATH9K_NUM_TX_QUEUES.

* Move various utility macros to debug.h, they can be reused
  elsewhere.

* Remove tx_complete_poll_work_seen.

* Remove code that accesses various internal queue-specific
  variables without any locking whatsoever. HW/SW queue details
  will be handled in a subsequent patch.

* Do not print internal values like txq_headidx and txq_headidx.
  They were mostly unused anyway, considering code like:
  PRX("txq_tailidx:     ", txq_headidx);

* Handle 'txprocdesc' for EDMA too.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k/ath9k_htc: Remove WME macros
Sujith Manoharan [Wed, 21 Nov 2012 12:43:10 +0000 (18:13 +0530)]
ath9k/ath9k_htc: Remove WME macros

Use the macros provided by mac80211 and remove redundant
declarations inside the drivers.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agonet/wireless: ipw2200: introduce ipw_set_geo function
Stanislav Yakovlev [Tue, 20 Nov 2012 23:54:20 +0000 (23:54 +0000)]
net/wireless: ipw2200: introduce ipw_set_geo function

Move regulatory domain initialization code to a separate function.

Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: stomp audio profiles on weak signal strength
Rajkumar Manoharan [Tue, 20 Nov 2012 13:00:01 +0000 (18:30 +0530)]
ath9k: stomp audio profiles on weak signal strength

On lower WLAN signal strength, WLAN downlink traffic might suffer
from retransmissions. At the mean time, playing SCO/A2DP profiles
is affecting WLAN stability. In such scenario, by stomping SCO/A2DP
BT traffic completely for a BTCOEX period, gives WLAN traffic an
oppertunity to recover PHY rate. It also improves WLAN stability at
lower RSSI without sacificing BT traffic.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Fix MCI reset in BT cal_req
Rajkumar Manoharan [Tue, 20 Nov 2012 13:00:00 +0000 (18:30 +0530)]
ath9k: Fix MCI reset in BT cal_req

This patch reverts the commit "ath9k_hw: Wait BT calibration to complete"
and bail out from MCI interrupt routine for chip reset. The above commit
stalls the WLAN TCP traffic while bringing up and down the BT interface
iteratively. Fixing this properly by queueing up chip reset and bailing
out properly from tasklet routine.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Process FATAL interrupts at first
Rajkumar Manoharan [Tue, 20 Nov 2012 12:59:59 +0000 (18:29 +0530)]
ath9k: Process FATAL interrupts at first

FATAL and WATCHDOG interrupts should be processed first followed
by others.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
John W. Linville [Wed, 21 Nov 2012 18:03:00 +0000 (13:03 -0500)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/bluetooth/bluetooth-next

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 agomac80211: Add debugfs callbacks for station addition/removal
Sujith Manoharan [Tue, 20 Nov 2012 03:16:02 +0000 (08:46 +0530)]
mac80211: Add debugfs callbacks for station addition/removal

Provide drivers with hooks to create debugfs files when
a new station is added. This would help drivers to take
advantage of mac80211's station list infrastructure and not maintain
tedious station management code internally.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
[ifdef inline wrapper functions]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: remove effectless assignment
Emmanuel Grumbach [Tue, 20 Nov 2012 11:49:24 +0000 (13:49 +0200)]
iwlwifi: remove effectless assignment

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
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 agoBluetooth: Remove OOB data if device was discovered in band
Szymon Janc [Tue, 20 Nov 2012 10:38:54 +0000 (11:38 +0100)]
Bluetooth: Remove OOB data if device was discovered in band

OOB authentication mechanism should be used only if pairing process
has been activated by previous OOB information exchange (Core Spec
4.0 , vol. 1, Part A, 5.1.4.3). Stored OOB data for specific device
should be removed if that device was discovered in band later on.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: AMP: Set no FCS for incoming L2CAP chan
Andrei Emeltchenko [Tue, 20 Nov 2012 15:16:22 +0000 (17:16 +0200)]
Bluetooth: AMP: Set no FCS for incoming L2CAP chan

When receiving L2CAP Create Channel Request set the channel as
L2CAP_FCS_NONE. Then in "L2CAP Config req" following field will
be set: "FCS Option 0x00 (No FCS)". So by default High Speed
channels have no FCS.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Improve error message printing
Andrei Emeltchenko [Tue, 20 Nov 2012 15:16:21 +0000 (17:16 +0200)]
Bluetooth: Improve error message printing

Instead of printing:
"[ 7763.082007] Bluetooth: 2"
print something like:
"[ 7763.082007] Bluetooth: Trailing bytes: 2 in sframe"

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Set local_amp_id after getting Phylink Completed evt
Andrei Emeltchenko [Tue, 20 Nov 2012 15:16:20 +0000 (17:16 +0200)]
Bluetooth: Set local_amp_id after getting Phylink Completed evt

local_amp_id is used in l2cap_physical_cfm and shall be set up
before calling it.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Fix sending L2CAP Create Chan Req
Andrei Emeltchenko [Tue, 20 Nov 2012 15:16:19 +0000 (17:16 +0200)]
Bluetooth: Fix sending L2CAP Create Chan Req

When receiving Physical Link Completed event we need to create L2CAP
channel with L2CAP Create Chan Request. Current code was sending
this command only if connection was pending (which is probably
needed in channel move case). If channel is not moved but created
Create Chan should be sent for outgoing channel which is checked
with BT_CONNECT flag.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agomac80211: fix channel context suspend/reconfig handling
Johannes Berg [Mon, 19 Nov 2012 21:19:08 +0000 (22:19 +0100)]
mac80211: fix channel context suspend/reconfig handling

Sujith reported warnings with suspend/resume due to
channel contexts. When I looked into it, I realised
that the code was completely broken as it unassigned
the channel contexts when suspending, which actually
means they are destroyed.

Eliad Peller then pointed out that we also need to
remove the channel contexts from the driver. When I
looked into this, I also noticed that the code isn't
handling the virtual monitor interface correctly (if
it exists.)

Fix this by calling just the driver methods (if they
are implemented) instead of using the channel context
management code. Also add reconfiguration for the
virtual monitor interface.

Reported-by: Sujith Manoharan <sujith@msujith.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.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 agoBluetooth: Increase HCI command tx timeout
Szymon Janc [Mon, 12 Nov 2012 10:01:05 +0000 (11:01 +0100)]
Bluetooth: Increase HCI command tx timeout

Read Local OOB Data command can take more than 1 second on some chips.
e.g. on CSR 0a12:0001 first call to Read Local OOB Data after reset
takes about 1300ms resulting in tx timeout error.

[27698.368655] Bluetooth: hci0 command 0x0c57 tx timeout

2012-10-31 15:53:36.178585 < HCI Command: Read Local OOB Data (0x03|0x0057) plen 0
2012-10-31 15:53:37.496996 > HCI Event: Command Complete (0x0e) plen 36
    Read Local OOB Data (0x03|0x0057) ncmd 1
    status 0x00
    hash 0x92219d9b447f2aa9dc12dda2ae7bae6a
    randomizer 0xb1948d0febe4ea38ce85c4e66313beba

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Add support for BCM20702A0 [0b05, 17b5]
Jeff Cook [Fri, 9 Nov 2012 23:39:48 +0000 (16:39 -0700)]
Bluetooth: Add support for BCM20702A0 [0b05, 17b5]

Vendor-specific ID for BCM20702A0.
Support for bluetooth over Asus Wi-Fi GO!, included with Asus P8Z77-V
Deluxe.

T:  Bus=07 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0b05 ProdID=17b5 Rev=01.12
S:  Manufacturer=Broadcom Corp
S:  Product=BCM20702A0
S:  SerialNumber=94DBC98AC113
C:  #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I:  If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)

Cc: stable@vger.kernel.org
Signed-off-by: Jeff Cook <jeff@deserettechnology.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: trivial: Use __constant for constants
Andrei Emeltchenko [Wed, 14 Nov 2012 15:39:32 +0000 (17:39 +0200)]
Bluetooth: trivial: Use __constant for constants

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Disable FCS only for new HS channels
Andrei Emeltchenko [Wed, 14 Nov 2012 15:39:31 +0000 (17:39 +0200)]
Bluetooth: Disable FCS only for new HS channels

Set chan->fcs to L2CAP_FCS_NONE only for new L2CAP channels
(not moved). Other side can still request to use FCS.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Refactor locking in amp_physical_cfm
Andrei Emeltchenko [Wed, 14 Nov 2012 15:39:30 +0000 (17:39 +0200)]
Bluetooth: Refactor locking in amp_physical_cfm

Remove locking from l2cap_physical_cfm and lock chan inside
amp_physical_cfm.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Remove unneeded local_amp_id initialization
Andrei Emeltchenko [Thu, 15 Nov 2012 16:14:55 +0000 (18:14 +0200)]
Bluetooth: Remove unneeded local_amp_id initialization

local_amp_id is already set in l2cap_connect() which is called several
lines above.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Use __l2cap_no_conn_pending helper
Andrei Emeltchenko [Thu, 15 Nov 2012 16:14:53 +0000 (18:14 +0200)]
Bluetooth: Use __l2cap_no_conn_pending helper

Use helper instead of test_bit. This is the only place left using
test CONF_CONNECT_PEND flag.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
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 agomac80211: make remain_on_channel() op pass vif param
Eliad Peller [Mon, 19 Nov 2012 15:05:09 +0000 (17:05 +0200)]
mac80211: make remain_on_channel() op pass vif param

Drivers (e.g. wl12xx) might need to know the vif
to roc on (mainly in order to configure the
rx filters correctly).

Add the vif to the op params, and update the current
users (iwlwifi) to use the new api.

Signed-off-by: Eliad Peller <eliad@wizery.com>
[fix hwsim]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: Add TDLS event to allow drivers to request operations
Jouni Malinen [Fri, 16 Nov 2012 20:49:57 +0000 (22:49 +0200)]
cfg80211: Add TDLS event to allow drivers to request operations

The NL80211_CMD_TDLS_OPER command was previously used only for userspace
request for the kernel code to perform TDLS operations. However, there
are also cases where the driver may need to request operations from
userspace, e.g., when using security on the AP path. Add a new cfg80211
function for generating a TDLS operation event for drivers to request a
new link to be set up (NL80211_TDLS_SETUP) or an existing link to be
torn down (NL80211_TDLS_TEARDOWN). Drivers can optionally use these
events, e.g., based on noticing data traffic being sent to a peer
station that is seen with good signal strength.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: support radiotap vendor namespace RX data
Johannes Berg [Fri, 16 Nov 2012 09:09:08 +0000 (10:09 +0100)]
mac80211: support radiotap vendor namespace RX data

In some cases, in particular for experimentation, it
can be useful to be able to add vendor namespace data
to received frames in addition to the normal radiotap
data.

Allow doing this through mac80211 by adding fields to
the RX status descriptor that describe the data while
the data itself is prepended to the frame.

Also add some example code to hwsim, but don't enable
it because it doesn't use a proper OUI identifier.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: introduce IEEE80211_NUM_TIDS and use it
Johannes Berg [Wed, 14 Nov 2012 22:22:21 +0000 (23:22 +0100)]
mac80211: introduce IEEE80211_NUM_TIDS and use it

Introduce IEEE80211_NUM_TIDS in the generic 802.11
header file and use it in place of STA_TID_NUM and
NUM_RX_DATA_QUEUES which are both really the number
of TIDs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: use CMAC_PN_LEN
Johannes Berg [Wed, 14 Nov 2012 22:15:11 +0000 (23:15 +0100)]
mac80211: use CMAC_PN_LEN

Instead of hardcoding its value (6), use the constant.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: Remove duplicate inclusion of iwl-trans.h in pcie/drv.c
Sachin Kamat [Mon, 19 Nov 2012 11:45:40 +0000 (17:15 +0530)]
iwlwifi: Remove duplicate inclusion of iwl-trans.h in pcie/drv.c

iwl-trans.h was included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: update the RB_TIMEOUT to 0x11
Emmanuel Grumbach [Sun, 18 Nov 2012 11:16:58 +0000 (13:16 +0200)]
iwlwifi: update the RB_TIMEOUT to 0x11

This will allow to reduce slightly the number of interrupts
without sacrificing too much the latency in the Rx path.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: make iwl_pcie_rxq_inc_wr_ptr static
Emmanuel Grumbach [Sun, 18 Nov 2012 11:16:14 +0000 (13:16 +0200)]
iwlwifi: make iwl_pcie_rxq_inc_wr_ptr static

It is not used outside pcie/rx.c.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: more cleanup in pcie/rx.c
Emmanuel Grumbach [Sun, 18 Nov 2012 11:14:51 +0000 (13:14 +0200)]
iwlwifi: more cleanup in pcie/rx.c

Really trivial clean up.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: make iwl_queue_used return bool
Emmanuel Grumbach [Wed, 14 Nov 2012 21:38:08 +0000 (23:38 +0200)]
iwlwifi: make iwl_queue_used return bool

Also, prefer the if(!X) notation over if(X == 0).

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: disallow MFP with software crypto
Johannes Berg [Thu, 15 Nov 2012 10:35:57 +0000 (11:35 +0100)]
iwlwifi: disallow MFP with software crypto

When software crypto is enabled, it isn't safe
to enable MFP since the firmware interprets some
management packets, and with MFP it would do so
without proper validation.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: merge 2 functions in reclaim flow
Emmanuel Grumbach [Wed, 14 Nov 2012 21:32:57 +0000 (23:32 +0200)]
iwlwifi: merge 2 functions in reclaim flow

One one just a wrapper of the second, squash them.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: continue clean up - pcie/tx.c
Emmanuel Grumbach [Wed, 14 Nov 2012 12:44:18 +0000 (14:44 +0200)]
iwlwifi: continue clean up - pcie/tx.c

Rename static functions. Function moved from trans.c to
tx.c. A few could be made static, others had to be exported.

Functions that implement the transport API are prefixed by
iwl_trans_pcie_, the others by iwl_pcie_.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: continue clean up - pcie/trans.c
Emmanuel Grumbach [Wed, 14 Nov 2012 12:44:18 +0000 (14:44 +0200)]
iwlwifi: continue clean up - pcie/trans.c

Functions that implement the transport API are prefixed by
iwl_trans_pcie_, the others by iwl_pcie_.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: continue clean up - pcie/rx.c
Emmanuel Grumbach [Wed, 14 Nov 2012 12:44:18 +0000 (14:44 +0200)]
iwlwifi: continue clean up - pcie/rx.c

Rename static functions. Function moved from trans.c to
rx.c. A few could be made static, others had to be exported.
Also, don't use rxb or rxbuf, but rb which stands for receive
buffer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: init the replenish work in rx_init
Emmanuel Grumbach [Wed, 14 Nov 2012 12:28:50 +0000 (14:28 +0200)]
iwlwifi: init the replenish work in rx_init

This is its natural place

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: rename functions in transport layer
Emmanuel Grumbach [Wed, 14 Nov 2012 10:39:52 +0000 (12:39 +0200)]
iwlwifi: rename functions in transport layer

1) s/tx_queue/txq
for the sake of consistency.

2) s/rx_queue/rxq
for the sake of consistency.

3) Make all functions begin with iwl_pcie_
iwl_queue_init and iwl_queue_space are an exception
since they are not PCIE specific although they are in
pcie subdir.

4) s/trans_pcie_get_cmd_string/get_cmd_string
it is much shorter and used in debug prints which
are long lines.

5) s/iwl_bg_rx_replenish/iwl_pcie_rx_replenish_work
this better emphasizes that it is a work

6) remove invalid kernelDOC markers

pcie/tx.c and pcie/trans.c still needs to be cleaned up.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: add comments for the PCIe transport statuses
Emmanuel Grumbach [Wed, 14 Nov 2012 10:32:50 +0000 (12:32 +0200)]
iwlwifi: add comments for the PCIe transport statuses

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: check add_chanctx callback before use in ieee80211_reconfig
Arend van Spriel [Mon, 19 Nov 2012 11:01:05 +0000 (12:01 +0100)]
mac80211: check add_chanctx callback before use in ieee80211_reconfig

During testing our mac80211 driver a fatal error occurred which was
signalled to mac80211. Upon performing the reconfiguration of the
device a WARN_ON was triggered. This warning checked the return value
of drv_add_chanctx(). However, this returns -EOPNOTSUPP when the
driver does not provide the callback. As the callback is optional
better check it is defined before calling drv_add_chanctx().

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoBluetooth: Fix updating advertising state flags and data
Johan Hedberg [Thu, 8 Nov 2012 00:23:01 +0000 (01:23 +0100)]
Bluetooth: Fix updating advertising state flags and data

This patch adds a callback for the HCI_LE_Set_Advertise_Enable command.
The callback is responsible for updating the HCI_LE_PERIPHERAL flag
updating as well as updating the advertising data flags field to
indicate undirected connectable advertising.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Add support for setting LE advertising data
Johan Hedberg [Thu, 8 Nov 2012 00:23:00 +0000 (01:23 +0100)]
Bluetooth: Add support for setting LE advertising data

This patch adds support for setting basing LE advertising data. The
three elements supported for now are the advertising flags, the TX power
and the friendly name.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Use proper invalid value for tx_power
Johan Hedberg [Thu, 8 Nov 2012 00:22:59 +0000 (01:22 +0100)]
Bluetooth: Use proper invalid value for tx_power

The core specification defines 127 as the "not available" value (well,
"reserved" for BR/EDR and "not available" for LE - but essentially the
same). Therefore, instead of testing for 0 (which is in fact a valid
value) we should be using this invalid value to test if the tx_power is
available.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>