platform/kernel/kernel-mfld-blackbay.git
13 years agoath9k_hw: Add a helper function to get spur channel pointer from cal data for AR9003...
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:46 +0000 (04:27 -0800)]
ath9k_hw: Add a helper function to get spur channel pointer from cal data for AR9003 family

This helper function would be used for AR9485.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Find chansel of AR_PHY_65NM_CH0_SYNTH7 for AR9485
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:45 +0000 (04:27 -0800)]
ath9k_hw: Find chansel of AR_PHY_65NM_CH0_SYNTH7 for AR9485

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Configure pll control for AR9485
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:44 +0000 (04:27 -0800)]
ath9k: Configure pll control for AR9485

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Find the maximum number of chains that hw supports
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:43 +0000 (04:27 -0800)]
ath9k_hw: Find the maximum number of chains that hw supports

Have it in ah->caps. This will be used during various
calibrations.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Enable extended synch for AR9485 to fix L0s recovery issue
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:42 +0000 (04:27 -0800)]
ath9k: Enable extended synch for AR9485 to fix L0s recovery issue

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Disable TX STBC for AR9485
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:41 +0000 (04:27 -0800)]
ath9k: Disable TX STBC for AR9485

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Disable LDPC for AR9485
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:40 +0000 (04:27 -0800)]
ath9k_hw: Disable LDPC for AR9485

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Eeeprom changes for AR9485
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:39 +0000 (04:27 -0800)]
ath9k_hw: Eeeprom changes for AR9485

Calibration data are stored at 4k address (0xfff). The cal data
for AR9485 is not compressed so its lengh can exceed 1024 limit,
take care of that.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Initialize tx/rx gain table from initvals.h for AR9485
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:38 +0000 (04:27 -0800)]
ath9k_hw: Initialize tx/rx gain table from initvals.h for AR9485

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Initialize mode registers for AR9485
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:37 +0000 (04:27 -0800)]
ath9k_hw: Initialize mode registers for AR9485

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Enable hw initialization for AR9485
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:36 +0000 (04:27 -0800)]
ath9k_hw: Enable hw initialization for AR9485

Also make it a supported mac

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Add initvals.h for AR9485
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:35 +0000 (04:27 -0800)]
ath9k_hw: Add initvals.h for AR9485

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Define hw version macros for AR9485
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:34 +0000 (04:27 -0800)]
ath9k_hw: Define hw version macros for AR9485

AR9485 is a single chain and single band (2.4 Ghz) chip.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: remove MODULE_VERSION
John W. Linville [Tue, 7 Dec 2010 19:13:49 +0000 (14:13 -0500)]
ath5k: remove MODULE_VERSION

Since this is updated manually and sporadically, it is fairly useless
anyway.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath: Fix ath_dbg access beyond array bound
Joe Perches [Fri, 3 Dec 2010 03:12:38 +0000 (19:12 -0800)]
ath: Fix ath_dbg access beyond array bound

ar9300RateSize is not necessarily a power of 4.

Change ar9003_hw_set_target_power_eeprom
to print the targetPowerValT2 array one per line.

ath9k_hw_ar9300_set_txpower repeated the output 4 times per line,
change it to print the targetPowerValT2 value one per line.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath: Convert ath_print to ath_dbg
Joe Perches [Fri, 3 Dec 2010 03:12:37 +0000 (19:12 -0800)]
ath: Convert ath_print to ath_dbg

Remove ath/debug.h and the includes of these files.
Coalesce long formats.
Correct a few misspellings and missing "\n"s from these logging messages.
Remove unnecessary trailing space before a newline.
Remove ARRAY_SIZE casts, use printf type %zu

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath: Convert ath_print(.., ATH_DBG_FATAL to ath_err
Joe Perches [Fri, 3 Dec 2010 03:12:36 +0000 (19:12 -0800)]
ath: Convert ath_print(.., ATH_DBG_FATAL to ath_err

So these errors are always emitted at KERN_ERR level.
Remove ARRAY_SIZE casts, use printf type %zu

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath: Add and use ath_printk and ath_<level>
Joe Perches [Fri, 3 Dec 2010 03:12:35 +0000 (19:12 -0800)]
ath: Add and use ath_printk and ath_<level>

Add ath_printk and ath_<level> similar to
dev_printk and dev_<level> from device.h

This allows a more gradual rename of ath_print
to to ath_dbg or perhaps ath_debug.

This basically removes debug.h leaving
only an #define ath_printk ath_dbg
there and moving all the ATH_DBG_<foo>
enums to ath.h

I do not think there's much purpose for struct
ath_common * being passed to the ath_printk
functions, but perhaps there might be.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix dynamic-ps/pm_qos magic numbers
Eliad Peller [Fri, 3 Dec 2010 00:16:23 +0000 (02:16 +0200)]
mac80211: fix dynamic-ps/pm_qos magic numbers

mac80211 uses pm_qos (/dev/network_latency) in order to determine the
dynamic ps timeout (or disable the dynamic-ps at all in some cases).

commit ff616381 added a comparison for the current network_latency
against one high value (1900ms), and against the default value
(2000sec, rather than the commented 2sec).

however, the representation of 1900ms was incorrect:
1900ms = 1900000us ( != 1900000000 )

fix it by using USEC_TO_MSEC/SEC consts.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoorinoco: allow IW_AUTH_MFP to pass through
David Kilroy [Thu, 2 Dec 2010 18:19:21 +0000 (18:19 +0000)]
orinoco: allow IW_AUTH_MFP to pass through

The card doesn't support MFP, so silently accept DISABLED and OPTIONAL
settings.

This avoids the following failure in wpa_supplicant logs:

State: SCANNING -> ASSOCIATING
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
wpa_driver_wext_associate
wpa_driver_wext_set_drop_unencrypted
wpa_driver_wext_set_psk
wpa_driver_wext_associate: assoc failed because set_auth_param(IW_AUTH_MFP) failed
Association request to the driver failed

Signed-off by: David Kilroy <kilroyd@googlemail.com>
Reported by: Giacomo Comes <comes@naic.edu>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211/mac80211: Report signal average
Bruno Randolf [Thu, 2 Dec 2010 10:12:43 +0000 (19:12 +0900)]
nl80211/mac80211: Report signal average

Extend nl80211 to report an exponential weighted moving average (EWMA) of the
signal value. Since the signal value usually fluctuates between different
packets, an average can be more useful than the value of the last packet.

This uses the recently added generic EWMA library function.

--
v2: fix ABI breakage and change factor to be a power of 2.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: jiffies based tx queues watchdog
Stanislaw Gruszka [Fri, 3 Dec 2010 14:41:48 +0000 (15:41 +0100)]
iwlwifi: jiffies based tx queues watchdog

This patch replace monitor/recover timer by watchdog based on time
stamp. New code allow to discover hangs more precisely.

Timeout values are currently doubled monitoring period values of
previous timer. This have to be tuned based of firmware timing
capabilities.

Tested on 3945, 4965, 5300, 6300.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwl3945: prevent too frequent firmware resets
Stanislaw Gruszka [Fri, 3 Dec 2010 14:41:47 +0000 (15:41 +0100)]
iwl3945: prevent too frequent firmware resets

Similarly like on iwlagn, initialize reset duration on iwl3945 to prevent
too frequent firmware resets.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211/mac80211: add mesh join/leave commands
Johannes Berg [Fri, 3 Dec 2010 08:20:44 +0000 (09:20 +0100)]
cfg80211/mac80211: add mesh join/leave commands

Instead of tying mesh activity to interface up,
add join and leave commands for mesh. Since we
must be backward compatible, let cfg80211 handle
joining a mesh if a mesh ID was pre-configured
when the device goes up.

Note that this therefore must modify mac80211 as
well since mac80211 needs to lose the logic to
start the mesh on interface up.

We now allow querying mesh parameters before the
mesh is connected, which simply returns defaults.
Setting them (internally renamed to "update") is
only allowed while connected. Specify them with
the new mesh join command instead where needed.

In mac80211, beaconing must now also follow the
mesh enabled/not enabled state, which is done
by testing the mesh ID.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211: refactor mesh parameter parsing
Johannes Berg [Fri, 3 Dec 2010 08:20:43 +0000 (09:20 +0100)]
nl80211: refactor mesh parameter parsing

I'm going to need this in a new place later.

Tested-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: require add_virtual_intf to return new dev
Johannes Berg [Fri, 3 Dec 2010 08:20:42 +0000 (09:20 +0100)]
cfg80211: require add_virtual_intf to return new dev

cfg80211 used to do all its bookkeeping in
the notifier, but some new stuff will have
to use local variables so make the callback
return the netdev pointer.

Tested-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: move mesh filter adjusting
Johannes Berg [Fri, 3 Dec 2010 08:20:41 +0000 (09:20 +0100)]
mac80211: move mesh filter adjusting

Logically, the filter adjusting belongs with
starting/stopping mesh, not interface up/down,
so move it there.

Tested-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211/mac80211: define and allow configuring mesh element TTL
Javier Cardona [Fri, 3 Dec 2010 08:20:40 +0000 (09:20 +0100)]
nl80211/mac80211: define and allow configuring mesh element TTL

The TTL in path selection information elements is different from
the mesh ttl used in mesh data frames.  Version 7.03 of the 11s
draft calls this ttl 'Element TTL'.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Include tx ack reporting on hw flags
Nick Kossifidis [Fri, 3 Dec 2010 04:12:39 +0000 (06:12 +0200)]
ath5k: Include tx ack reporting on hw flags

 * Since we report tx acks to the protocol stack, add the needed
 flag to hw_flags. This way we'll also use the new AP probing mechanism.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Fix reporting of RX dma stop failure
Nick Kossifidis [Fri, 3 Dec 2010 04:09:38 +0000 (06:09 +0200)]
ath5k: Fix reporting of RX dma stop failure

 * Correctly report failure to stop RX DMA

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Disable ANI during reset
Nick Kossifidis [Fri, 3 Dec 2010 04:07:13 +0000 (06:07 +0200)]
ath5k: Disable ANI during reset

 * Stop ANI durring reset to prevent false PHY error reports

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Always free tx buffers before reset
Nick Kossifidis [Fri, 3 Dec 2010 04:05:19 +0000 (06:05 +0200)]
ath5k: Always free tx buffers before reset

 * Always free tx buffers before reset, since we also empty hw queues.
 If we don't and a queue gets stuck, we'll never decrease txq_len and sw
 will keep thinking the queue is still stuck even after reset.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Always write tx powertable on hw
Nick Kossifidis [Fri, 3 Dec 2010 04:03:00 +0000 (06:03 +0200)]
ath5k: Always write tx powertable on hw

 * By skipping tx power table calibration we also skip setting
 tx power table on hw. Make sure we always write tx power table
 on hw since it gets cleared on reset.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: speed up AP probing using nullfunc frames
Felix Fietkau [Thu, 2 Dec 2010 20:01:08 +0000 (21:01 +0100)]
mac80211: speed up AP probing using nullfunc frames

If the nullfunc frame used to probe the AP was not acked, there is no point
in waiting for the probe timeout, so advance to the next try (or disconnect)
immediately.
If we do reach the probe timeout without having received a tx status, the
connection is probably really bad and worth disconnecting.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: remove a redundant check
Felix Fietkau [Thu, 2 Dec 2010 20:01:07 +0000 (21:01 +0100)]
mac80211: remove a redundant check

ieee80211_is_nullfunc() implies ieee80211_is_data()

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agolib: Improve EWMA efficiency by using bitshifts
Bruno Randolf [Thu, 2 Dec 2010 10:50:37 +0000 (19:50 +0900)]
lib: Improve EWMA efficiency by using bitshifts

Using bitshifts instead of division and multiplication should improve
performance. That requires weight and factor to be powers of two, but i think
this is something we can live with.

Thanks to Peter Zijlstra for the improved formula!

Signed-off-by: Bruno Randolf <br1@einfach.org>
--

v2: use log2.h functions
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Use EWMA factor of 1024 instead of 1000
Bruno Randolf [Thu, 2 Dec 2010 10:12:31 +0000 (19:12 +0900)]
ath5k: Use EWMA factor of 1024 instead of 1000

This prepares the only place which uses the EWMA library so far for the
performance improved implementation coming up, which requires factor and
weight to be a power of two.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMAINTAINERS: Add ATH GENERIC UTILITIES
Joe Perches [Wed, 1 Dec 2010 17:37:55 +0000 (09:37 -0800)]
MAINTAINERS: Add ATH GENERIC UTILITIES

This file pattern is not currently shown as maintained
by atheros.  Perhaps it should be?

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Update last_tx_rate only for data frames
Helmut Schaa [Wed, 1 Dec 2010 15:34:45 +0000 (16:34 +0100)]
mac80211: Update last_tx_rate only for data frames

The last_tx_rate field was also updated for non-data frames that are
often sent with a lower rate (for example management frames at 1 Mbps).
This is confusing when the data rate is actually much higher.

Hence, only update the last_tx_rate field with tx rate information
gathered from last data frames.

If the rate control algorithm filled in txrc.reported_rate we don't need
to verify this information.

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git...
John W. Linville [Mon, 6 Dec 2010 20:52:27 +0000 (15:52 -0500)]
Merge branch 'wireless-next-2.6' of git://git./linux/kernel/git/iwlwifi/iwlwifi-2.6

13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Thu, 2 Dec 2010 20:46:37 +0000 (15:46 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

Conflicts:
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c

13 years agoath5k: Fix reset and interrupts for AHB type of devices.
Felix Fietkau [Thu, 2 Dec 2010 09:27:21 +0000 (10:27 +0100)]
ath5k: Fix reset and interrupts for AHB type of devices.

On WiSoc we cannot access mac register before it is resetted.
It will crash hardware otherwise.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Add AHB bus support.
Felix Fietkau [Thu, 2 Dec 2010 09:27:16 +0000 (10:27 +0100)]
ath5k: Add AHB bus support.

AHB specific functions are now in ahb.c file. AHB bus is
compiled in when CONFIG_ATHEROS_AR231X is set in kernel.
All other platforms will use PCI bus.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Add initial registers values for radio RF2317 chip.
Felix Fietkau [Thu, 2 Dec 2010 09:27:11 +0000 (10:27 +0100)]
ath5k: Add initial registers values for radio RF2317 chip.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Add a function to read chipset's MAC revision
Felix Fietkau [Thu, 2 Dec 2010 09:27:06 +0000 (10:27 +0100)]
ath5k: Add a function to read chipset's MAC revision

Add bus dependent revision read function which is used to
determine chipset's MAC before hardware is initialized.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Check if pci pdev struct is initialized in common functions.
Felix Fietkau [Thu, 2 Dec 2010 09:27:06 +0000 (10:27 +0100)]
ath5k: Check if pci pdev struct is initialized in common functions.

To be able to support other busses than PCI check if pci device
structure is initialized.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Use generic eeprom read from common ath_bus_opts struct.
Felix Fietkau [Thu, 2 Dec 2010 09:27:01 +0000 (10:27 +0100)]
ath5k: Use generic eeprom read from common ath_bus_opts struct.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Move PCI bus functions to separate file.
Felix Fietkau [Thu, 2 Dec 2010 09:27:01 +0000 (10:27 +0100)]
ath5k: Move PCI bus functions to separate file.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Introduce ath5k_init_softc function as in ath9k
Felix Fietkau [Thu, 2 Dec 2010 09:26:56 +0000 (10:26 +0100)]
ath5k: Introduce ath5k_init_softc function as in ath9k

Split pci initialization into hardware specific
functions and softc structure initialization.
Make function naming similar to ones ath9k.
Introduce ath_bus_opts in ath5k for later
AHB bus integration.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Use Generic DMA for later support of AHB bus.
Felix Fietkau [Thu, 2 Dec 2010 09:26:51 +0000 (10:26 +0100)]
ath5k: Use Generic DMA for later support of AHB bus.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/blueto...
John W. Linville [Thu, 2 Dec 2010 20:17:46 +0000 (15:17 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/padovan/bluetooth-next-2.6

13 years agowireless: ray_cs: use '%pm' format option to print MAC
Andy Shevchenko [Thu, 2 Dec 2010 12:45:07 +0000 (14:45 +0200)]
wireless: ray_cs: use '%pm' format option to print MAC

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: Add documentation for antenna ops
Bruno Randolf [Thu, 2 Dec 2010 07:23:12 +0000 (16:23 +0900)]
cfg80211: Add documentation for antenna ops

The last patch with the same title was for mac80211 ops, accidentally.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: publish SMPS docs
Johannes Berg [Wed, 1 Dec 2010 08:43:35 +0000 (09:43 +0100)]
mac80211: publish SMPS docs

Create a new chapter about SMPS in the
driver API part of the mac80211 book and
populate it with the existing docs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: document station handling
Johannes Berg [Wed, 1 Dec 2010 08:43:34 +0000 (09:43 +0100)]
mac80211: document station handling

Add some existing documentation about station
handling to a new chapter about advanced APIs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: publish interface iteration docs
Johannes Berg [Wed, 1 Dec 2010 08:43:33 +0000 (09:43 +0100)]
mac80211: publish interface iteration docs

Publish the documentation for the interface
iteration functions in the right section of
the book.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: document aggregation
Johannes Berg [Wed, 1 Dec 2010 08:43:32 +0000 (09:43 +0100)]
mac80211: document aggregation

Include the aggregation documentation in the
docbook, split up by public and internal docs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: publish some rate control docs
Johannes Berg [Wed, 1 Dec 2010 08:43:31 +0000 (09:43 +0100)]
mac80211: publish some rate control docs

Add an API chapter to the rate control part of
the mac80211 book and populate it with some
existing documentation.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: publish some misc docs
Johannes Berg [Wed, 1 Dec 2010 08:43:30 +0000 (09:43 +0100)]
mac80211: publish some misc docs

There isn't a clear TX documentation yet, so
put these into the misc section for now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: publish docs for _ni functions
Johannes Berg [Wed, 1 Dec 2010 08:43:29 +0000 (09:43 +0100)]
mac80211: publish docs for _ni functions

Put them along with their "regular" versions for
now, we should write more docs in the future.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: document workqueue
Johannes Berg [Wed, 1 Dec 2010 08:43:28 +0000 (09:43 +0100)]
mac80211: document workqueue

Create a new chapter for the mac80211 workqueue
that contains the documentation written for it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: include CQM packet loss docs
Johannes Berg [Wed, 1 Dec 2010 08:43:27 +0000 (09:43 +0100)]
cfg80211: include CQM packet loss docs

Just include them in the list of functions,
there aren't any more detailed docs (yet).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Remove unused structures
Sujith Manoharan [Wed, 1 Dec 2010 07:00:09 +0000 (12:30 +0530)]
ath9k_htc: Remove unused structures

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowireless: Remove unnecessary casts of usb_get_intfdata
Joe Perches [Tue, 30 Nov 2010 21:42:08 +0000 (13:42 -0800)]
wireless: Remove unnecessary casts of usb_get_intfdata

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: fix code path on PHY init
Rafał Miłecki [Tue, 30 Nov 2010 21:33:16 +0000 (22:33 +0100)]
b43: N-PHY: fix code path on PHY init

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: use defines for RSSI types
Rafał Miłecki [Tue, 30 Nov 2010 21:33:15 +0000 (22:33 +0100)]
b43: N-PHY: use defines for RSSI types

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: fix RSSI selection
Rafał Miłecki [Tue, 30 Nov 2010 21:33:14 +0000 (22:33 +0100)]
b43: N-PHY: fix RSSI selection

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: hif_usb: Reduce indent 1 column
Joe Perches [Tue, 30 Nov 2010 20:19:11 +0000 (12:19 -0800)]
ath9k: hif_usb: Reduce indent 1 column

Invert test and return early.
Move variable declarations to local scope.
Don't initialize variables to 0 unnecessarily.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Move debugfs under ieee80211/[phyname]/ath9k/
Ben Greear [Mon, 29 Nov 2010 22:13:22 +0000 (14:13 -0800)]
ath9k: Move debugfs under ieee80211/[phyname]/ath9k/

This fixes debugfs problems when a phy is renamed,
and is able to remove a bit of code that is no longer
needed.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: fix RSSI calibration
Rafał Miłecki [Sun, 28 Nov 2010 11:59:45 +0000 (12:59 +0100)]
b43: N-PHY: fix RSSI calibration

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: initialize perical variable, add missing call to CCA reset
Rafał Miłecki [Sun, 28 Nov 2010 11:59:44 +0000 (12:59 +0100)]
b43: N-PHY: initialize perical variable, add missing call to CCA reset

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: implement very basic TX power control management
Rafał Miłecki [Sun, 28 Nov 2010 11:59:43 +0000 (12:59 +0100)]
b43: N-PHY: implement very basic TX power control management

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: swap values for radio registers 0x3b and 0x3c
Rafał Miłecki [Sun, 28 Nov 2010 11:59:42 +0000 (12:59 +0100)]
b43: N-PHY: swap values for radio registers 0x3b and 0x3c

Specs were updated plus we become wl compatible.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: Add sysfs attributes to ssb devices
Hauke Mehrtens [Sun, 28 Nov 2010 11:22:52 +0000 (12:22 +0100)]
ssb: Add sysfs attributes to ssb devices

Make it possible to read out the attributes, till now only show on
dmesg, through sysfs.

This patch was some time in OpenWrt.

Signed-off-by: Bernhard Loos <bernhardloos@googlemail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: extract indexes for power tables
Rafał Miłecki [Sun, 28 Nov 2010 09:39:35 +0000 (10:39 +0100)]
ssb: extract indexes for power tables

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoRevert "ath9k: Fix STA disconnect issue due to received MIC failed bcast frames"
John W. Linville [Thu, 2 Dec 2010 19:10:58 +0000 (14:10 -0500)]
Revert "ath9k: Fix STA disconnect issue due to received MIC failed bcast frames"

This reverts commit 916448e77f6bcaaa7f13c3de0c3851783ae2bfd0.

"As far as I can tell, either of these patches breaks multiple VIF
scenarios.  I'm not sure exactly why, but I had to revert this to
get any of my interfaces to associate."
  -- Ben Greear <greearb@candelatech.com>

http://marc.info/?l=linux-wireless&m=129123368719339&w=2

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: fix more bitfield related endian issues
Felix Fietkau [Wed, 1 Dec 2010 18:07:47 +0000 (19:07 +0100)]
ath9k_hw: fix more bitfield related endian issues

A few LNA control related flags were also specified as a bitfields, however
for some strange reason they were written in big-endian order this time.
Fix this by using flags instead.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: fix endian issues with CTLs on AR9003
Felix Fietkau [Wed, 1 Dec 2010 18:07:46 +0000 (19:07 +0100)]
ath9k_hw: fix endian issues with CTLs on AR9003

Parsing data using bitfields is messy, because it makes endian handling
much harder. AR9002 and earlier got it right, AR9003 got it wrong.
This might lead to either using too high or too low tx power values,
depending on frequency and eeprom settings.
Fix it by getting rid of the CTL related bitfields entirely and use
masks instead.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Fix bug in reading input gpio state for ar9003
Vasanthakumar Thiagarajan [Wed, 1 Dec 2010 07:24:09 +0000 (23:24 -0800)]
ath9k: Fix bug in reading input gpio state for ar9003

The register which gives input gpio state is 0x404c for ar9003,
currently 0x4048 is wrongly used. This will disable RF and make
it unusable on some of AR9003.

Cc:stable@kernel.org
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/blueto...
John W. Linville [Thu, 2 Dec 2010 19:00:51 +0000 (14:00 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/padovan/bluetooth-2.6

13 years agoiwlagn: name change for bt_ch_announce module parameter
Wey-Yi Guy [Fri, 26 Nov 2010 21:24:19 +0000 (13:24 -0800)]
iwlagn: name change for bt_ch_announce module parameter

Change the module parameter name to bt_ch_inhibition from
bt_ch_announce to better describe the functionality

In order to allow Bluetooth to activate a smart AFH mechanism
and to maximize its available bandwidth the WiFi will request
BT Core to inhibit its activity in channels that interfere
with WiFi activity (and vice versa) if bt_ch_inhibition is enabled

Set module parameter "bt_ch_inhibition=0" will disable the channel
inhibition function

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlwifi: check for STATUS_EXIT_PENDING when send RXON command
Wey-Yi Guy [Fri, 26 Nov 2010 19:09:42 +0000 (11:09 -0800)]
iwlwifi: check for STATUS_EXIT_PENDING when send RXON command

If driver is on the way down, there is no need to send
RXON to uCode, check the condition before continuous the process.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove structure name reference to gen2
Wey-Yi Guy [Thu, 18 Nov 2010 19:41:48 +0000 (11:41 -0800)]
iwlagn: remove structure name reference to gen2

Give the corresponding name for .cfg data structure

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: Enable PCI L1 ACTIVE state after uCode has been loaded
Grumbach, Emmanuel [Thu, 18 Nov 2010 11:47:38 +0000 (03:47 -0800)]
iwlagn: Enable PCI L1 ACTIVE state after uCode has been loaded

PCI L1 Active needs to be disabled while loading the uCode so that the bus
doesn't go to sleep. The enablement of L1 Active should be done after
the uCode has sent the ALIVE response. The enablement of L1 Active was
missing.
Enabling L1 Active allows to save power if the BIOS / bus driver allows
it.

I measured the power consumption while not associated and
idle/associated:
L1 Active disabled: 39 mA = 130mW
L1 Active enabled:   6 mA = 20 mW

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: fix race condition when reprogram sta
Wey-Yi Guy [Wed, 17 Nov 2010 22:17:53 +0000 (14:17 -0800)]
iwlagn: fix race condition when reprogram sta

During reprogram stations, do not send link quality command.
uCode will crash if receive link quality command for invalid station

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoBluetooth: clean up legal text
Andrei Emeltchenko [Wed, 1 Dec 2010 14:58:26 +0000 (16:58 +0200)]
Bluetooth: clean up legal text

Remove extra spaces from legal text so that legal stuff looks
the same for all bluetooth code.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: clean up hci code
Andrei Emeltchenko [Wed, 1 Dec 2010 14:58:25 +0000 (16:58 +0200)]
Bluetooth: clean up hci code

Do not use assignment in IF condition, remove extra spaces,
fixing typos, simplify code.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: clean up l2cap code
Andrei Emeltchenko [Wed, 1 Dec 2010 14:58:24 +0000 (16:58 +0200)]
Bluetooth: clean up l2cap code

Do not initialize static vars to zero, macros with complex values
shall be enclosed with (), remove unneeded braces.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: clean up rfcomm code
Andrei Emeltchenko [Wed, 1 Dec 2010 14:58:23 +0000 (16:58 +0200)]
Bluetooth: clean up rfcomm code

Remove extra spaces, assignments in if statement, zeroing static
variables, extra braces. Fix includes.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: clean up sco code
Andrei Emeltchenko [Wed, 1 Dec 2010 14:58:22 +0000 (16:58 +0200)]
Bluetooth: clean up sco code

Do not use assignments in IF condition, remove extra spaces

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix error handling for l2cap_init()
Anderson Lizardo [Mon, 29 Nov 2010 16:15:50 +0000 (12:15 -0400)]
Bluetooth: Fix error handling for l2cap_init()

create_singlethread_workqueue() may fail with errors such as -ENOMEM. If
this happens, the return value is not set to a negative value and the
module load will succeed. It will then crash on module unload because of
a destroy_workqueue() call on a NULL pointer.

Additionally, the _busy_wq workqueue is not being destroyed if any
errors happen on l2cap_init().

Signed-off-by: Anderson Lizardo <anderson.lizardo@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Get rid of __rfcomm_get_sock_by_channel()
Gustavo F. Padovan [Mon, 1 Nov 2010 18:43:53 +0000 (18:43 +0000)]
Bluetooth: Get rid of __rfcomm_get_sock_by_channel()

rfcomm_get_sock_by_channel() was the only user of this function, so I merged
both into rfcomm_get_sock_by_channel(). The socket lock now should be hold
outside of rfcomm_get_sock_by_channel() once we hold and release it inside the
same function now.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Get rid of __l2cap_get_sock_by_psm()
Gustavo F. Padovan [Mon, 1 Nov 2010 18:43:53 +0000 (18:43 +0000)]
Bluetooth: Get rid of __l2cap_get_sock_by_psm()

l2cap_get_sock_by_psm() was the only user of this function, so I merged
both into l2cap_get_sock_by_psm(). The socket lock now should be hold
outside of l2cap_get_sock_by_psm() once we hold and release it inside the
same function now.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: do not use assignment in if condition
Andrei Emeltchenko [Mon, 22 Nov 2010 11:21:37 +0000 (13:21 +0200)]
Bluetooth: do not use assignment in if condition

Fix checkpatch errors like:
"ERROR: do not use assignment in if condition"
Simplify code and fix one long line.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Acked-by: Ville Tervo <ville.tervo@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: timer check sk is not owned before freeing
Andrei Emeltchenko [Wed, 3 Nov 2010 10:32:45 +0000 (12:32 +0200)]
Bluetooth: timer check sk is not owned before freeing

In timer context we might delete l2cap channel used by krfcommd.
The check makes sure that sk is not owned. If sk is owned we
restart timer for HZ/5.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Check sk is not owned before freeing l2cap_conn
Andrei Emeltchenko [Wed, 3 Nov 2010 10:32:44 +0000 (12:32 +0200)]
Bluetooth: Check sk is not owned before freeing l2cap_conn

Check that socket sk is not locked in user process before removing
l2cap connection handler.

lock_sock and release_sock do not hold a normal spinlock directly but
instead hold the owner field. This means bh_lock_sock can still execute
even if the socket is "locked". More info can be found here:
http://www.linuxfoundation.org/collaborate/workgroups/networking/socketlocks

krfcommd kernel thread may be preempted with l2cap tasklet which remove
l2cap_conn structure. If krfcommd is in process of sending of RFCOMM reply
(like "RFCOMM UA" reply to "RFCOMM DISC") then kernel crash happens.

...
[  694.175933] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[  694.184936] pgd = c0004000
[  694.187683] [00000000] *pgd=00000000
[  694.191711] Internal error: Oops: 5 [#1] PREEMPT
[  694.196350] last sysfs file: /sys/devices/platform/hci_h4p/firmware/hci_h4p/loading
[  694.260375] CPU: 0    Not tainted  (2.6.32.10 #1)
[  694.265106] PC is at l2cap_sock_sendmsg+0x43c/0x73c [l2cap]
[  694.270721] LR is at 0xd7017303
...
[  694.525085] Backtrace:
[  694.527587] [<bf266be0>] (l2cap_sock_sendmsg+0x0/0x73c [l2cap]) from [<c02f2cc8>] (sock_sendmsg+0xb8/0xd8)
[  694.537292] [<c02f2c10>] (sock_sendmsg+0x0/0xd8) from [<c02f3044>] (kernel_sendmsg+0x48/0x80)

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: hidp: fix information leak to userland
Vasiliy Kulikov [Sat, 30 Oct 2010 14:26:31 +0000 (18:26 +0400)]
Bluetooth: hidp: fix information leak to userland

Structure hidp_conninfo is copied to userland with version, product,
vendor and name fields unitialized if both session->input and session->hid
are NULL.  It leads to leaking of contents of kernel stack memory.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: cmtp: fix information leak to userland
Vasiliy Kulikov [Sat, 30 Oct 2010 14:26:26 +0000 (18:26 +0400)]
Bluetooth: cmtp: fix information leak to userland

Structure cmtp_conninfo is copied to userland with some padding fields
unitialized.  It leads to leaking of contents of kernel stack memory.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: bnep: fix information leak to userland
Vasiliy Kulikov [Sat, 30 Oct 2010 14:26:21 +0000 (18:26 +0400)]
Bluetooth: bnep: fix information leak to userland

Structure bnep_conninfo is copied to userland with the field "device"
that has the last elements unitialized.  It leads to leaking of
contents of kernel stack memory.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Automate remote name requests
Johan Hedberg [Thu, 18 Nov 2010 20:22:29 +0000 (22:22 +0200)]
Bluetooth: Automate remote name requests

In Bluetooth there are no automatic updates of remote device names when
they get changed on the remote side. Instead, it is a good idea to do a
manual name request when a new connection gets created (for whatever
reason) since at this point it is very cheap (no costly baseband
connection creation needed just for the sake of the name request).

So far userspace has been responsible for this extra name request but
tighter control is needed in order not to flood Bluetooth controllers
with two many commands during connection creation. It has been shown
that some controllers simply fail to function correctly if they get too
many (almost) simultaneous commands during connection creation. The
simplest way to acheive better control of these commands is to move
their sending completely to the kernel side.

This patch inserts name requests into the sequence of events that the
kernel performs during connection creation. It does this after the
remote features have been successfully requested and before any pending
authentication requests are performed. The code will work sub-optimally
with userspace versions that still do the name requesting themselves (it
shouldn't break anything though) so it is recommended to combine this
with a userspace software version that doesn't have automated name
requests.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>