openwrt/staging/blogic.git
13 years agoiwlagn: move PCI power related functions to the PCI layer
Wey-Yi Guy [Fri, 10 Jun 2011 18:23:36 +0000 (11:23 -0700)]
iwlagn: move PCI power related functions to the PCI layer

Continue to popule the PCI layer and the iwl_bus_ops with the power related
stuff.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: don't use the PCI wrappers for DMA operation
Emmanuel Grumbach [Sat, 18 Jun 2011 15:12:57 +0000 (08:12 -0700)]
iwlagn: don't use the PCI wrappers for DMA operation

Get a pointer to the struct device during probe and get the rid of all the PCI
specific DMA wrappers.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: move PCI related operations from probe and remove to PCI layer
Emmanuel Grumbach [Tue, 31 May 2011 06:07:00 +0000 (09:07 +0300)]
iwlagn: move PCI related operations from probe and remove to PCI layer

Since we have now a PCI layer, all the init and deinit code that is PCI
related should move to there.

Also move the IO functions: read8/read32/write32. They need hw_base which
is killed from priv.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: add get_dev to iwl_bus_ops
Emmanuel Grumbach [Tue, 31 May 2011 05:52:10 +0000 (08:52 +0300)]
iwlagn: add get_dev to iwl_bus_ops

Bus specific layer must know how to return the struct device* of the device.
Implement that as a callback of iwl_bus_ops and use that callback instead of
using the priv->pdev pointer which is meant to disappear soon.

Since the struct device * is needed in hot path, iwl_bus holds a pointer to it
instead of calling get_dev all the time.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: introduce iwl_bus and iwl_bus_ops
Emmanuel Grumbach [Tue, 31 May 2011 05:22:30 +0000 (08:22 +0300)]
iwlagn: introduce iwl_bus and iwl_bus_ops

iwl_bus will represent a bus, and iwl_bus_ops all the operations that can be
done on this bus.
For the moment only set_prv_data is implemented. More to come...

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove uneeded include to pci.h and dma_mapping.h from a few files
Emmanuel Grumbach [Mon, 30 May 2011 04:36:49 +0000 (07:36 +0300)]
iwlagn: remove uneeded include to pci.h and dma_mapping.h from a few files

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: add a iwl_pci.[ch] files that will contain all PCI specific code
Emmanuel Grumbach [Tue, 24 May 2011 08:39:02 +0000 (11:39 +0300)]
iwlagn: add a iwl_pci.[ch] files that will contain all PCI specific code

Move some PCI functionality to the new iwl_pci.[ch] files:
* the PCI_DEVICE_TABLE
* the pci_driver struct definition
* the PCI probe / remove functions
* the PCI suspend / resume functions

All these functions are now split: the trigger comes from the PCI layer which
calls to the bus generic code located in the other files.

This is the beginning only. There are still a lot of PCI related code needs
to be gathered.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: don't disable interrupts after the NIC has been reset
Emmanuel Grumbach [Tue, 24 May 2011 07:44:47 +0000 (10:44 +0300)]
iwlagn: don't disable interrupts after the NIC has been reset

It is superfluous to disable the interrupts after we reset the NIC. The only
entity that could enable the interrupts after the NIC is reset is the driver.
So remove this pointless action.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: Support flush queues for specified interface
Wey-Yi Guy [Wed, 8 Jun 2011 16:57:26 +0000 (09:57 -0700)]
iwlagn: Support flush queues for specified interface

Flush command can target specified interface or all interfaces

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: add PAN to tx flush
Wey-Yi Guy [Wed, 8 Jun 2011 16:57:25 +0000 (09:57 -0700)]
iwlagn: add PAN to tx flush

When issue tx flush, also consider PAN

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: Remove un-necessary indirect call
Wey-Yi Guy [Sat, 18 Jun 2011 15:03:18 +0000 (08:03 -0700)]
iwlagn: Remove un-necessary indirect call

After driver split, no need to make indirect call to txfifo flush function

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agob43: HT-PHY: implement switching analog
Rafał Miłecki [Wed, 15 Jun 2011 23:59:20 +0000 (01:59 +0200)]
b43: HT-PHY: implement switching analog

Turning it on is always done between reading PHY version and radio
version, so it was easy to find it in MMIO dumps from ndiswrapper.
Turning off is done by writing different values to the same registers.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: HT-PHY: implement radio ops
Rafał Miłecki [Wed, 15 Jun 2011 23:59:19 +0000 (01:59 +0200)]
b43: HT-PHY: implement radio ops

Every PHY has some specific bit used for reading radio regs. Analyze of
MMIO dumps from BCM4331 and ndiswrapper has shown it is 0x200 for HT.
 radio_read(0x037f) -> 0x0073
radio_write(0x017f) <- 0x0072

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: annotate reg in ath5k_hw_nic_reset() as __iomem
Pavel Roskin [Wed, 15 Jun 2011 22:03:28 +0000 (18:03 -0400)]
ath5k: annotate reg in ath5k_hw_nic_reset() as __iomem

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: minor cleanup
Pavel Roskin [Wed, 15 Jun 2011 22:03:22 +0000 (18:03 -0400)]
ath5k: minor cleanup

Move an extern variable declaration to a header file.  Prefix all
functions with "ath5k_".  Make ath5k_intr() static.  Remove unneeded
forward declarations.  Remove pointless "extern" in a function
declaration.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: typo fix in a comment
Pavel Roskin [Wed, 15 Jun 2011 22:01:11 +0000 (18:01 -0400)]
ath9k: typo fix in a comment

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: use standard max(), remove A_MAX macro
Pavel Roskin [Wed, 15 Jun 2011 22:01:05 +0000 (18:01 -0400)]
ath9k: use standard max(), remove A_MAX macro

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove a redundant call to pcipowersave
Mohammed Shafi Shajakhan [Wed, 15 Jun 2011 15:52:16 +0000 (21:22 +0530)]
ath9k: remove a redundant call to pcipowersave

during suspend/resume ath9k_stop will always call ath_radio_disable
which will inturn call ath9k_hw_configpcipowersave, so no need to call
it explicitly in ath9k_stop

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: fix up brokenness caused by cleanup
Dan Carpenter [Wed, 15 Jun 2011 13:10:10 +0000 (16:10 +0300)]
iwlegacy: fix up brokenness caused by cleanup

Patch 7f1f9742514 "iwlegacy: refactor iwl4965_mac_channel_switch"
reversed a test and also it changed a spin_lock_irq() to
spin_lock().  I assume the spin_lock change was a mistake because
the unlock was left as spin_unlock_irq().

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Add debug messages to track PAPRD failures
Mohammed Shafi Shajakhan [Wed, 15 Jun 2011 12:55:31 +0000 (18:25 +0530)]
ath9k: Add debug messages to track PAPRD failures

Add few debug messages for some of the possible scenarios
where we can detect PAPRD failures. this will help us to be
sure that we had really enabled PAPRD

Cc: susinder@qca.qualcomm.com
Cc: senthilb@qca.qualcomm.com
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: add Kconfig option for compiling SSB driver
Rafał Miłecki [Tue, 14 Jun 2011 06:18:59 +0000 (08:18 +0200)]
b43: add Kconfig option for compiling SSB driver

It is always "y" for now, b43 will not compile without CONFIG_SSB yet.
This is just a first step of dropping SSB dependency.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoif_spi: Fix compilation warning - unused variable
Nikanth Karthikesan [Tue, 14 Jun 2011 05:53:46 +0000 (11:23 +0530)]
if_spi: Fix compilation warning - unused variable

if_spi: Fix compilation warning - unused variable 'spi'

drivers/net/wireless/libertas/if_spi.c: In function ‘if_spi_init_card’:
drivers/net/wireless/libertas/if_spi.c:1035: warning: unused variable ‘spi’

The variable is used only in a macro which uses the args only for DEBUG builds.
Remove the 'spi' variable completely.

Signed-off-by: Nikanth Karthikesan <nikanth@google.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: HT-PHY: add place for writing HT PHY support
Rafał Miłecki [Mon, 13 Jun 2011 14:20:06 +0000 (16:20 +0200)]
b43: HT-PHY: add place for writing HT PHY support

This is totally broken plus we do not have specs for HT PHY yet. Just
introduce place for writing driver if we discover anything.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: define new PHYs and radio regs for cores >= 24
Rafał Miłecki [Mon, 13 Jun 2011 14:20:05 +0000 (16:20 +0200)]
b43: define new PHYs and radio regs for cores >= 24

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: add cancel_hw_scan() callback
Eliad Peller [Mon, 13 Jun 2011 09:47:30 +0000 (12:47 +0300)]
mac80211: add cancel_hw_scan() callback

When suspending, __ieee80211_suspend() calls ieee80211_scan_cancel(),
which will only cancel sw scan. In order to cancel hw scan, the
low-level driver has to cancel it in the suspend() callback. however,
this is too late, as a new scan_work will be enqueued (while the driver
is going into suspend).

Add a new cancel_hw_scan() callback, asking the driver to cancel an
active hw scan, and call it in ieee80211_scan_cancel().

Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agodrivers/ssb/driver_chipcommon_pmu.c: uninitilized warning
Connor Hansen [Sat, 11 Jun 2011 18:59:30 +0000 (20:59 +0200)]
drivers/ssb/driver_chipcommon_pmu.c: uninitilized warning

warning message
drivers/ssb/driver_chipcommon_pmu.c: In function ssb_pmu_resources_init
drivers/ssb/driver_chipcommon_pmu.c:420:15: warning: updown_tab_size may
be used uninitilized in this function.

updown_tab_size and depend_tab_size may not be set in the bus->chip_id
switch statement, so set to 0 by default to avoid using uninitialized
stack space.

Signed-off-by: Connor Hansen <cmdkhh@gmail.com>
Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Start monitor work on restart
Paul Stewart [Fri, 10 Jun 2011 15:00:19 +0000 (07:00 -0800)]
mac80211: Start monitor work on restart

Trigger connection monitor on resume from suspend.  Since we
have been sleeping, there is reason to suspect that we might
not still be associated.  The speed of detecting loss of
{connection,authentication} is worth the cost of the small
additional traffic at resume.

Signed-off-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: Sanity check for valid context
Wey-Yi Guy [Tue, 7 Jun 2011 15:53:14 +0000 (08:53 -0700)]
iwlagn: Sanity check for valid context

Check EEPROM for multiple contexts support

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: Sanity check for 11n capability
Wey-Yi Guy [Mon, 6 Jun 2011 23:28:54 +0000 (16:28 -0700)]
iwlagn: Sanity check for 11n capability

Make sure when we say 11n enable, we really support it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: merge duplicated code into single place
Wey-Yi Guy [Mon, 6 Jun 2011 21:26:43 +0000 (14:26 -0700)]
iwlagn: merge duplicated code into single place

Multiple places have similar code to construct calib header. Merge into
single inline function.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: group similar defines together
Wey-Yi Guy [Mon, 6 Jun 2011 21:26:42 +0000 (14:26 -0700)]
iwlagn: group similar defines together

No functional changes, just group similar defines together

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: generic temperature location in EEPROM
Wey-Yi Guy [Mon, 6 Jun 2011 21:26:41 +0000 (14:26 -0700)]
iwlagn: generic temperature location in EEPROM

Temperature location in EEPROM is generic to all devices

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove unused debug flag
Wey-Yi Guy [Mon, 6 Jun 2011 21:26:40 +0000 (14:26 -0700)]
iwlagn: remove unused debug flag

Remove both IWL_DEBUG_TXPOWER and IWL_DEBUG_NOTIF, not used.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: use IWL_DEBUG_FW for firmware related debug msg
Wey-Yi Guy [Mon, 6 Jun 2011 21:26:38 +0000 (14:26 -0700)]
iwlagn: use IWL_DEBUG_FW for firmware related debug msg

Instead use generic IWL_DEBUG_INFO, use IWL_DEBUG_FW for uCode related stuffs.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: use IWL_DEBUG_TEMP for temperature related debug
Wey-Yi Guy [Mon, 6 Jun 2011 21:26:39 +0000 (14:26 -0700)]
iwlagn: use IWL_DEBUG_TEMP for temperature related debug

Instead of IWL_DEBUG_POWER, IWL_DEBUG_TEMP should be used for temperature
related debug messages

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: add debug message for coex related activities
Wey-Yi Guy [Mon, 6 Jun 2011 19:49:25 +0000 (12:49 -0700)]
iwlagn: add debug message for coex related activities

Adding dedicated debug message for coex related activities

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: add coex debug flag
Wey-Yi Guy [Mon, 6 Jun 2011 19:49:24 +0000 (12:49 -0700)]
iwlagn: add coex debug flag

Replace IWL_DEBUG_AP with IWL_DEBUG_COEX for debug COEX related stuffs

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: use sku capabilities information from EEPROM
Wey-Yi Guy [Mon, 6 Jun 2011 19:05:46 +0000 (12:05 -0700)]
iwlagn: use sku capabilities information from EEPROM

Instead of having the separated define, use the sku capabilities in EEPROM

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: Band capabilities in EEPROM
Wey-Yi Guy [Mon, 6 Jun 2011 19:05:45 +0000 (12:05 -0700)]
iwlagn: Band capabilities in EEPROM

Add define for band capabilities in EEPROM

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: don't check ucode subtype
Johannes Berg [Mon, 6 Jun 2011 16:41:15 +0000 (09:41 -0700)]
iwlagn: don't check ucode subtype

The ucode subtypes keep changing, and there's no
particular reason to be checking them (other than
a paranoid sanity check). Since the numbers are
also in conflict between different ucode images
now, simply don't check them any more and rely on
the images being built correctly.

Also, to indicate that, rename the constants and
the enum, moving it to a different file.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: move no_sleep_autoadjust as part of iwlagn_mod_params
Wey-Yi Guy [Fri, 3 Jun 2011 20:52:40 +0000 (13:52 -0700)]
iwlagn: move no_sleep_autoadjust as part of iwlagn_mod_params

Move no_sleep_autoadjust module parameter into iwlagn_mod_params structure
along with all the other iwlagn module parameters

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: move led_mode as part of iwlagn_mod_params
Wey-Yi Guy [Fri, 3 Jun 2011 20:52:39 +0000 (13:52 -0700)]
iwlagn: move led_mode as part of iwlagn_mod_params

Move led_mode module parameter into iwlagn_mod_params structure
along with all the other iwlagn module parameters

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: move bt_coex_active as part of iwlagn_mod_params
Wey-Yi Guy [Fri, 3 Jun 2011 20:52:38 +0000 (13:52 -0700)]
iwlagn: move bt_coex_active as part of iwlagn_mod_params

Move bt_coex_active module parameter into iwlagn_mod_params structure
along with all the other iwlagn module parameters

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: add dumpit support for testmode trace function
Wey-Yi Guy [Tue, 31 May 2011 15:03:02 +0000 (08:03 -0700)]
iwlagn: add dumpit support for testmode trace function

For testmode trace function, huge amout of data need to pass to userspace.
Use the build-in nl80211 dumpt it function

Require nl80211 testmode dumpit support patch.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: usersapce application decide the size of trace buffer
Wey-Yi Guy [Mon, 30 May 2011 17:29:37 +0000 (10:29 -0700)]
iwlagn: usersapce application decide the size of trace buffer

For testmode trace function, allow userspace application to request the
size of trace buffer.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agortlwifi: Fix warnings on parisc arch
Larry Finger [Fri, 10 Jun 2011 16:05:23 +0000 (11:05 -0500)]
rtlwifi: Fix warnings on parisc arch

In "Build regressions/improvements in v3.0-rc2", Geert Uytterhoeven
reports a number of warnings that occur for parisc builds of rtlwifi
and dependents.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agodrivers: bcma: export bcma_core_disable() function
Arend van Spriel [Thu, 9 Jun 2011 18:07:20 +0000 (20:07 +0200)]
drivers: bcma: export bcma_core_disable() function

In the brcm80211 driver we disable the 80211 core when the driver is
'down'. The bcma_core_disable() function exactly does the same as
our implementation so exporting this function makes sense.

Cc: linux-wireless@vger.kernel.org
Cc: Rafal Milecki <zajec5@gmail.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: check for allocation failures
Dan Carpenter [Thu, 9 Jun 2011 07:09:34 +0000 (10:09 +0300)]
b43: check for allocation failures

Add some error handling if the allocation fails.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: get rid of global adapter pointer
Amitkumar Karwar [Wed, 8 Jun 2011 15:09:20 +0000 (20:39 +0530)]
mwifiex: get rid of global adapter pointer

1) Avoid global adapter pointer usage
   a) in sdio.c by moving some code from mwifiex_cleanup_module() to
      mwifiex_sdio_remove().
   b) in main.c by passing an extra parameter to few functions.
2) Add new variable "user_rmmod" to identify if mwifiex_sdio_remove()
   callback function is called in card removal or rmmod context. These
   code changes are adapted from Libertas driver.
3) Remove unnecessary NULL pointer check for "func" pointer in
   mwifiex_sdio_remove().

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: refactor iwl4965_mac_channel_switch
Stanislaw Gruszka [Wed, 8 Jun 2011 13:28:29 +0000 (15:28 +0200)]
iwlegacy: refactor iwl4965_mac_channel_switch

Use less indentions and remove uneeded irq-save flags.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: remove unused agg_tids_count
Stanislaw Gruszka [Wed, 8 Jun 2011 13:28:28 +0000 (15:28 +0200)]
iwlegacy: remove unused agg_tids_count

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: remove firmware event log
Stanislaw Gruszka [Wed, 8 Jun 2011 13:28:27 +0000 (15:28 +0200)]
iwlegacy: remove firmware event log

Messages like that

iwl4965 0000:03:00.0: Start IWL Event Log Dump: display last 20 entries
iwl4965 0000:03:00.0: EVT_LOGT:1821445332:0x00000000:1352
iwl4965 0000:03:00.0: EVT_LOGT:1821445332:0x00000001:1353
iwl4965 0000:03:00.0: EVT_LOGT:1821445336:0x0000000c:0357
iwl4965 0000:03:00.0: EVT_LOGT:1821445533:0x00000107:0106
iwl4965 0000:03:00.0: EVT_LOGT:1821445534:0x00000000:0302
iwl4965 0000:03:00.0: EVT_LOGT:1821445574:0x000000d4:0321
iwl4965 0000:03:00.0: EVT_LOGT:1821445575:0x00000000:1350
iwl4965 0000:03:00.0: EVT_LOGT:1821445576:0x00000000:1351
iwl4965 0000:03:00.0: EVT_LOGT:1821445576:0x00000000:1352
iwl4965 0000:03:00.0: EVT_LOGT:1821445577:0x00000001:1353
iwl4965 0000:03:00.0: EVT_LOGT:1821445581:0x0000000d:0357
iwl4965 0000:03:00.0: EVT_LOGT:1821446327:0x00000107:0106
iwl4965 0000:03:00.0: EVT_LOGT:1821446328:0x00000000:0302
iwl4965 0000:03:00.0: EVT_LOGT:1821446368:0x000000d4:0321
iwl4965 0000:03:00.0: EVT_LOGT:1821446369:0x00000000:1350
iwl4965 0000:03:00.0: EVT_LOGT:1821446370:0x00000000:1351
iwl4965 0000:03:00.0: EVT_LOGT:1821446370:0x00000000:1352
iwl4965 0000:03:00.0: EVT_LOGT:1821446371:0x00000001:1353
iwl4965 0000:03:00.0: EVT_LOGT:1821446375:0x0000000e:0357
iwl4965 0000:03:00.0: EVT_LOGT:1821446383:0x00000000:0125

are completely useless for me. Remove bunch of code that generate them.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: remove reset rf infrastructure
Stanislaw Gruszka [Wed, 8 Jun 2011 13:28:26 +0000 (15:28 +0200)]
iwlegacy: remove reset rf infrastructure

We do not reset radio anymore, hence don't need that code too.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: remove recover from statistics
Stanislaw Gruszka [Wed, 8 Jun 2011 13:28:25 +0000 (15:28 +0200)]
iwlegacy: remove recover from statistics

Recover from statistics code was added during 6xxx devices development,
I don't think is needed on old devices. Also it is suspicious to cause
random, unreproducible microcode errors and hangs. So remove it.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: remove unused power commands defines
Stanislaw Gruszka [Wed, 8 Jun 2011 13:28:24 +0000 (15:28 +0200)]
iwlegacy: remove unused power commands defines

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agolibertas: add sd8686 reset_card support
Daniel Drake [Tue, 7 Jun 2011 17:15:57 +0000 (18:15 +0100)]
libertas: add sd8686 reset_card support

At http://dev.laptop.org/ticket/10748 we are seeing a case of the
libertas firmware randomly stopping responding to commands after
resume. Careful monitoring of communications indicates a firmware or
hardware bug, which has been reported to Marvell.

Work around this issue by adding a reset_card method; this is
automatically called when command timeouts are detected and provides an
instant recovery to this situation.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonetworking: fix warning about unused label wake_up
Vincent Zweije [Tue, 7 Jun 2011 14:37:09 +0000 (16:37 +0200)]
networking: fix warning about unused label wake_up

Function ieee80211_reconfig in net/mac80211/util.c contains label wake_up
which is defined unconditionally, but only used with CONFIG_PM. Gcc
warns about this when CONFIG_PM is not defined.

This patch makes the label's definition dependent on CONFIG_PM too,
eliminating the warning.

The issue was apparently introduced in git commit
eecc48000afe2ca6da22122d553b7cad294e42fc.

Signed-off-by: Vincent Zweije <vincent@zweije.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: Ignore downstream DEAUTH for authtry_bsses
Paul Stewart [Wed, 8 Jun 2011 12:52:52 +0000 (05:52 -0700)]
cfg80211: Ignore downstream DEAUTH for authtry_bsses

Downsteram DEAUTH messages do not refer to a current authentication
attempt -- AUTH responses do.  Therefore we should not allow DEAUTH
from an AP to void state for an AUTH attempt in progress.

Signed-off-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Factor out code to receive one packet
Mike McCormack [Mon, 6 Jun 2011 14:13:06 +0000 (23:13 +0900)]
rtlwifi: Factor out code to receive one packet

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Free skb in one place
Mike McCormack [Mon, 6 Jun 2011 14:12:53 +0000 (23:12 +0900)]
rtlwifi: Free skb in one place

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Resubmit skbs with bad CRC early
Mike McCormack [Mon, 6 Jun 2011 14:12:42 +0000 (23:12 +0900)]
rtlwifi: Resubmit skbs with bad CRC early

Once we realize a bad packet was received, don't
waste time unmapping it, freeing it, then allocation
a new skb and mapping it, just resubmit the existing
skb.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Remove unnecessary indent
Mike McCormack [Mon, 6 Jun 2011 14:12:08 +0000 (23:12 +0900)]
rtlwifi: Remove unnecessary indent

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: add ieee80211_get_operstate() function
Eliad Peller [Mon, 6 Jun 2011 09:59:29 +0000 (12:59 +0300)]
mac80211: add ieee80211_get_operstate() function

Add ieee80211_get_operstate() function to get the operstate
of the netdevice.

This is needed for drivers that need to know when the interface
is IF_OPER_UP (e.g. wl12xx), and block notifiers can't be used
(e.g. because the interface is already IF_OPER_UP, like after
resuming from suspend)

Signed-off-by: Eliad Peller <eliad@wizery.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/linville/wirel...
John W. Linville [Fri, 10 Jun 2011 18:26:12 +0000 (14:26 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

Conflicts:
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
drivers/net/wireless/rtlwifi/pci.c

13 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetooth-2.6
Gustavo F. Padovan [Thu, 9 Jun 2011 19:33:54 +0000 (16:33 -0300)]
Merge /linux/kernel/git/padovan/bluetooth-2.6

Conflicts:
net/bluetooth/rfcomm/sock.c

13 years agoBluetooth: Clean up some code style issues
Waldemar Rymarkiewicz [Tue, 7 Jun 2011 09:18:06 +0000 (11:18 +0200)]
Bluetooth: Clean up some code style issues

Fix lines longer than 80 chars in length.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Kill set but unused variable 'cmd' in cmtp_recv_capimsg()
David Miller [Thu, 19 May 2011 21:50:05 +0000 (17:50 -0400)]
Bluetooth: Kill set but unused variable 'cmd' in cmtp_recv_capimsg()

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Do not send SET_EVENT_MASK for 1.1 and earlier devices
Ville Tervo [Fri, 27 May 2011 08:16:21 +0000 (11:16 +0300)]
Bluetooth: Do not send SET_EVENT_MASK for 1.1 and earlier devices

Some old hci controllers do not accept any mask so leave the
default mask on for these devices.

< HCI Command: Set Event Mask (0x03|0x0001) plen 8
    Mask: 0xfffffbff00000000
> HCI Event: Command Complete (0x0e) plen 4
    Set Event Mask (0x03|0x0001) ncmd 1
    status 0x12
    Error: Invalid HCI Command Parameters

Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
Tested-by: Corey Boyle <corey@kansanian.com>
Tested-by: Ed Tomlinson <edt@aei.ca>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Do not ignore errors returned from strict_strtol()
David Miller [Thu, 19 May 2011 21:37:45 +0000 (17:37 -0400)]
Bluetooth: Do not ignore errors returned from strict_strtol()

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: fix shutdown on SCO sockets
Luiz Augusto von Dentz [Thu, 12 May 2011 08:13:15 +0000 (11:13 +0300)]
Bluetooth: fix shutdown on SCO sockets

shutdown should wait for SCO link to be properly disconnected before
detroying the socket, otherwise an application using the socket may
assume link is properly disconnected before it really happens which
can be a problem when e.g synchronizing profile switch.

Signed-off-by: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning
Stephen Boyd [Thu, 12 May 2011 23:50:09 +0000 (16:50 -0700)]
Bluetooth: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning

Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following
warning:

In function 'copy_from_user',
    inlined from 'rfcomm_sock_setsockopt' at
    net/bluetooth/rfcomm/sock.c:705:
arch/x86/include/asm/uaccess_64.h:65:
warning: call to 'copy_from_user_overflow' declared with
attribute warning: copy_from_user() buffer size is not provably
correct

presumably due to buf_size being signed causing GCC to fail to
see that buf_size can't become negative.

Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: l2cap and rfcomm: fix 1 byte infoleak to userspace.
Filip Palian [Thu, 12 May 2011 17:32:46 +0000 (19:32 +0200)]
Bluetooth: l2cap and rfcomm: fix 1 byte infoleak to userspace.

Structures "l2cap_conninfo" and "rfcomm_conninfo" have one padding
byte each. This byte in "cinfo" is copied to userspace uninitialized.

Signed-off-by: Filip Palian <filip.palian@pjwstk.edu.pl>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix check for the ERTM local busy state
Mat Martineau [Fri, 3 Jun 2011 23:21:10 +0000 (16:21 -0700)]
Bluetooth: Fix check for the ERTM local busy state

Local busy is encoded in a bitfield, but was not masked out correctly.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Restore accidentally-deleted line
Mat Martineau [Fri, 3 Jun 2011 23:21:07 +0000 (16:21 -0700)]
Bluetooth: Restore accidentally-deleted line

When code was moved from l2cap_core.c to l2cap_sock.c in commit
6de0702b5b93da0ef097aa092b4597fbc024ebba, one line was dropped
from the old __l2cap_sock_close() implementation. This sk_state
change should still be in l2cap_chan_close().

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Simplify hci_conn_accept_secure check
Waldemar Rymarkiewicz [Thu, 2 Jun 2011 12:24:52 +0000 (14:24 +0200)]
Bluetooth: Simplify hci_conn_accept_secure check

If the link key is secure (authenticated or combination 16 digit)
the sec_level will be always BT_SECURITY_HIGH. Therefore, instead
of checking the link key type simply check the sec_level on the link.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add BT_POWER L2CAP socket option.
Jaikumar Ganesh [Tue, 24 May 2011 01:06:04 +0000 (18:06 -0700)]
Bluetooth: Add BT_POWER L2CAP socket option.

Add BT_POWER socket option used to control the power
characteristics of the underlying ACL link. When the remote end
has put the link in sniff mode and the host stack wants to send
data we need need to explicitly exit sniff mode to work well with
certain devices (For example, A2DP on Plantronics Voyager 855).
However, this causes problems with HID devices.

Hence, moving into active mode when sending data, irrespective
of who set the sniff mode has been made as a socket option. By
default, we will move into active mode. HID devices can set the
L2CAP socket option to prevent this from happening.

Currently, this has been implemented for L2CAP sockets. This has been
tested with incoming and outgoing L2CAP sockets for HID and A2DP.

Based on discussions on linux-bluetooth and patches submitted by
Andrei Emeltchenko.

Signed-off-by: Jaikumar Ganesh <jaikumar@google.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Verify a pin code in pin_code_reply
Waldemar Rymarkiewicz [Wed, 1 Jun 2011 15:28:48 +0000 (17:28 +0200)]
Bluetooth: Verify a pin code in pin_code_reply

As we cannot relay on a userspace mgmt api implementation we should verify
if pin_code_reply in fact contains the secure pin code.

If userspace replied with unsecure pincode when secure was required we will
send pin_code_neg_reply to the controller.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Remove a magic number
Waldemar Rymarkiewicz [Wed, 1 Jun 2011 15:28:47 +0000 (17:28 +0200)]
Bluetooth: Remove a magic number

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: fix sparse & gcc warnings
Johannes Berg [Wed, 1 Jun 2011 06:54:45 +0000 (08:54 +0200)]
Bluetooth: fix sparse & gcc warnings

sparse complains about a few things that should
be static.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Set 'peer_addr_type' in hci_le_connect()
Andre Guedes [Tue, 31 May 2011 17:20:57 +0000 (14:20 -0300)]
Bluetooth: Set 'peer_addr_type' in hci_le_connect()

Set the 'peer_addr_type' field of the LE Create Connection command
sent in hci_le_connect().

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Ville Tervo <ville.tervo@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Check advertising cache in hci_connect()
Andre Guedes [Tue, 31 May 2011 17:20:56 +0000 (14:20 -0300)]
Bluetooth: Check advertising cache in hci_connect()

When connecting to a LE device, we need to check the advertising
cache in order to know the address type of that device.

If its advertising entry is not found, the connection is not
established and hci_connect() returns error.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Ville Tervo <ville.tervo@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Remove useless check in hci_connect()
Andre Guedes [Tue, 31 May 2011 17:20:55 +0000 (14:20 -0300)]
Bluetooth: Remove useless check in hci_connect()

There is no need to check the connection's state since hci_conn_add()
has just created a new connection and its state has been set properly.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Ville Tervo <ville.tervo@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add 'dst_type' field to struct hci_conn
Andre Guedes [Tue, 31 May 2011 17:20:54 +0000 (14:20 -0300)]
Bluetooth: Add 'dst_type' field to struct hci_conn

This patch adds a new field (dst_type) to the struct hci_conn which
holds the type of the destination address (bdaddr_t dst). This
approach is needed in order to use the struct hci_conn as an
abstraction of LE connections in HCI Layer. For non-LE this field
is ignored.

This patch also set properly the 'dst_type' field after initializing
LE hci_conn structures.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Refactor hci_auth_complete_evt function
Waldemar Rymarkiewicz [Tue, 31 May 2011 13:49:26 +0000 (15:49 +0200)]
Bluetooth: Refactor hci_auth_complete_evt function

Replace if(conn) with if(!conn) checking to avoid too many nested statements

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix auth_complete_evt for legacy units
Waldemar Rymarkiewicz [Tue, 31 May 2011 13:49:25 +0000 (15:49 +0200)]
Bluetooth: Fix auth_complete_evt for legacy units

Legacy devices don't re-authenticate the link properly if a link key
already exists.  Thus, don't update sec_level for this case even if
hci_auth_complete_evt indicates success. Otherwise the sec_level will
not reflect a real security on the link.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Advertising entries lifetime
Andre Guedes [Thu, 26 May 2011 19:23:53 +0000 (16:23 -0300)]
Bluetooth: Advertising entries lifetime

This patch adds a timer to clear 'adv_entries' after three minutes.

After some amount of time, the advertising entries cached during
the last LE scan should be considered expired and they should be
removed from the advertising cache.

It was chosen a three minutes timeout as an initial attempt. This
value might change in future.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Clear advertising cache before scanning
Andre Guedes [Thu, 26 May 2011 19:23:52 +0000 (16:23 -0300)]
Bluetooth: Clear advertising cache before scanning

The LE advertising cache should be cleared before performing a LE
scanning. This will force the cache to contain only fresh advertising
entries.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add Advertising Report Meta Event handler
Andre Guedes [Thu, 26 May 2011 19:23:51 +0000 (16:23 -0300)]
Bluetooth: Add Advertising Report Meta Event handler

This patch adds a function to handle LE Advertising Report Meta
Events.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: LE advertising cache
Andre Guedes [Thu, 26 May 2011 19:23:50 +0000 (16:23 -0300)]
Bluetooth: LE advertising cache

This patch implements the LE advertising cache. It stores sensitive
information (bdaddr and bdaddr_type so far) gathered from LE
advertising report events.

Only advertising entries from connectables devices are added to the
cache.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add advertising report meta event structs
Anderson Briglia [Thu, 26 May 2011 19:23:49 +0000 (16:23 -0300)]
Bluetooth: Add advertising report meta event structs

This patch adds definitions and a new struct for Advertising Report
Event from LE and Dual Mode controllers.

Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Rename __l2cap_chan_close() to l2cap_chan_close()
Gustavo F. Padovan [Wed, 4 May 2011 22:42:50 +0000 (19:42 -0300)]
Bluetooth: Rename __l2cap_chan_close() to l2cap_chan_close()

To make it consistent with the rest of the API.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Remove export of l2cap_chan_clear_timer()
Gustavo F. Padovan [Wed, 4 May 2011 22:35:27 +0000 (19:35 -0300)]
Bluetooth: Remove export of l2cap_chan_clear_timer()

The call to l2cap_chan_clear_timer() is not really needed in l2cap_sock.c.
This patch also adds a call to l2cap_chan_clear_timer() to the only place
in __l2cap_sock_close() that wasn't calling it. It's safe call it there
because l2cap_chan_clear_timer() check first for timer_peding().

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: create channel timer to replace sk_timer
Gustavo F. Padovan [Mon, 2 May 2011 21:25:01 +0000 (18:25 -0300)]
Bluetooth: create channel timer to replace sk_timer

The new timer does not belong to struct sock, tought it still touch some
sock things, but this will be sorted out soon.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add chan->chan_type struct member
Gustavo F. Padovan [Mon, 2 May 2011 20:13:55 +0000 (17:13 -0300)]
Bluetooth: Add chan->chan_type struct member

chan_type says if our chan is raw(direclty access to HCI),
connection less or connection oriented.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Create l2cap_chan_send()
Gustavo F. Padovan [Thu, 28 Apr 2011 21:50:17 +0000 (18:50 -0300)]
Bluetooth: Create l2cap_chan_send()

This move all the sending logic to l2cap_core.c, but we still have a
socket dependence there, struct msghdr. It will be removed in some of the
further commits.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Create __l2cap_chan_close()
Gustavo F. Padovan [Thu, 28 Apr 2011 20:55:53 +0000 (17:55 -0300)]
Bluetooth: Create __l2cap_chan_close()

This is actually __l2cap_sock_close() renamed to __l2cap_chan_close().
At a first look it may not make sense, but with the further cleanups that
will come it will.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Remove unnecessary use of hci_dev_list_lock
Johan Hedberg [Fri, 20 May 2011 18:50:41 +0000 (11:50 -0700)]
Bluetooth: Remove unnecessary use of hci_dev_list_lock

The get_connections function has no need to use hci_dev_list_lock. The
code was there probably because of a copy-paste mistake.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Kill set but not used variable 'l2cap_sk' in rfcomm_sock_getsockopt_old()
David Miller [Thu, 19 May 2011 22:09:00 +0000 (18:09 -0400)]
Bluetooth: Kill set but not used variable 'l2cap_sk' in rfcomm_sock_getsockopt_old()

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: fix set but not used warning
Gustavo F. Padovan [Wed, 18 May 2011 21:14:45 +0000 (18:14 -0300)]
Bluetooth: fix set but not used warning

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Allow unsegmented SDU retries on sock_queue_rcv_skb failure
Ruiyi Zhang [Fri, 13 May 2011 05:07:52 +0000 (13:07 +0800)]
Bluetooth: Allow unsegmented SDU retries on sock_queue_rcv_skb failure

In L2CAP_SDU_UNSEGMENTED case, if sock_queue_rcv_skb returns error,
l2cap_ertm_reassembly_sdu should not return 0 so as to insert the
skb into BUSY_QUEUE for later retries.

Signed-off-by: Ruiyi Zhang <Ruiyi.Zhang@Atheros.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>