]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/log
mirror_ubuntu-disco-kernel.git
13 years agoath9k: assign keycache slots to unencrypted stations
Felix Fietkau [Sun, 17 Apr 2011 21:28:10 +0000 (23:28 +0200)]
ath9k: assign keycache slots to unencrypted stations

Frame filtering relies on having a valid destination index (keycache slot),
to keep track of the destination. Assigning a keycache slot (configured
to unencrypted, with no key data attached) improves powersave handling in
AP mode with no encryption.
The dummy keycache entry for a station is cleared, when a real key gets
added.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix powersave frame filtering/buffering in AP mode
Felix Fietkau [Sun, 17 Apr 2011 21:28:09 +0000 (23:28 +0200)]
ath9k: fix powersave frame filtering/buffering in AP mode

This patch fixes a long standing issue of pending packets in the queue being
sent (and retransmitted many times) to sleeping stations.
This was made worse by aggregation through driver-internal retransmitting
of A-MDPU subframes.
Previously the hardware tx filter was cleared unconditionally for every
single packet - with this patch it uses the IEEE80211_TX_CTL_CLEAR_PS_FILT
for unaggregated frames.
A sta_notify driver op is added to stop aggregation for stations when they
enter powersave mode. Subframes stay buffered inside the driver, to ensure
that the BlockAck window keeps a sane state.
Since the driver uses software aggregation, the clearing of the tx filter
needs to be handled by the driver instead of mac80211 for aggregated frames.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Fix beacon generation on foreign channel
Rajkumar Manoharan [Sun, 17 Apr 2011 16:08:10 +0000 (21:38 +0530)]
ath9k: Fix beacon generation on foreign channel

While leaving the oper channel, beacon generation is stopped
by mac80211 and beacon slots are marked as inactive.
During the scan, ath9k configures beacon timers
based on IEEE80211_CONF_OFFCHANNEL which inturn generates
beacon alert even though bslot is inactive.

ath9k fails to disable beacon alert while moving to offchannel
if none of the beacon slot is active. This is causing beacon
transmission on foreign channel. This patch enables swba
based on active bslots.

This issue was reported with two vifs (AP+STA) and triggered
scan in STA vif in unassociated state.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: add a function for setting the TIM bit for a specific station
Felix Fietkau [Sun, 17 Apr 2011 15:45:00 +0000 (17:45 +0200)]
mac80211: add a function for setting the TIM bit for a specific station

This allows a driver to buffer frames for a PS station and tell mac80211
to wake it up even though mac80211 does not have any buffered frames for
it.
This is necessary for properly handling aggregation related buffering,
in ath9k, because the driver needs to keep its frames in order to keep
track of the Block-ACK window.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Fix free slot value for cab queue
Rajkumar Manoharan [Sat, 16 Apr 2011 08:47:39 +0000 (14:17 +0530)]
ath9k_htc: Fix free slot value for cab queue

ath9k_htc_tx_get_slot can return zero as valid index.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Acked-by: Sujith Manoharan <Sujith.Manoharan@Atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: optimize driver initialization code
Amitkumar Karwar [Sat, 16 Apr 2011 03:50:42 +0000 (20:50 -0700)]
mwifiex: optimize driver initialization code

1) removal of unnecessary mwifiex_device structure
2) avoid passing adapter pointer to mwifiex_init_sw()
3) remove local variable drv_mode_info in mwifiex_add_card()
4) type change in mwifiex_bss_attr to match mwifiex_private
5) removal of more wordy comments

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove some macro definitions
Amitkumar Karwar [Sat, 16 Apr 2011 03:50:41 +0000 (20:50 -0700)]
mwifiex: remove some macro definitions

use corresponding macros defined in include/linux/ieee80211.h

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove redundant local variables and comments
Yogesh Ashok Powar [Sat, 16 Apr 2011 03:50:40 +0000 (20:50 -0700)]
mwifiex: remove redundant local variables and comments

Remove some local variables (mainly function return values)
that are used only once. Also, one dummy function and some
wordy comments are removed.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix debugfs printk format warning
Randy Dunlap [Fri, 15 Apr 2011 23:20:05 +0000 (16:20 -0700)]
mac80211: fix debugfs printk format warning

Fix printf() format warning (tm_year is long int):

net/mac80211/debugfs_sta.c:113: warning: format '%d' expects type 'int', but argument 4 has type 'long int'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: use pci_dev->revision
Sergei Shtylyov [Fri, 15 Apr 2011 15:23:11 +0000 (19:23 +0400)]
iwlegacy: use pci_dev->revision

Commit be663ab67077fac8e23eb8e231a8c1c94cb32e54 (iwlwifi: split the drivers for
agn and legacy devices 3945/4965) added code to read the 4965's revision ID from
the PCI configuration register while it's already stored by PCI subsystem in the
'revision' field of 'struct pci_dev'...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Cleanup HTC debugfs
Rajkumar Manoharan [Fri, 15 Apr 2011 10:12:24 +0000 (15:42 +0530)]
ath9k_htc: Cleanup HTC debugfs

Move the ath9k_htc debugfs under ieee80211 to be inline
with ath9k driver and it also helps to simplify debug code.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Acked-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add debugfs support to change debug mask
Rajkumar Manoharan [Fri, 15 Apr 2011 06:58:52 +0000 (12:28 +0530)]
ath9k_htc: Add debugfs support to change debug mask

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Acked-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath: fix 0x6C for beaconing/passive scan flags based on country IE
Luis R. Rodriguez [Thu, 14 Apr 2011 21:55:36 +0000 (14:55 -0700)]
ath: fix 0x6C for beaconing/passive scan flags based on country IE

The 0x6C regulatory domain is just like the 0x6A regulatory
domain but differs in that 0x6C will allow adhoc and active
scan on its channels only if we are associated to an AP
with a country IE that allows those channels. The
ath_reg_apply_beaconing_flags() does just this -- we respect
the manufacturer's intent on only enabling beaconing modes
of operation if and only if blessed by the country IE.

Cc: David Quan <david.quan@atheros.com>
Cc: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agorfkill: Regulator consumer driver for rfkill
Antonio Ospite [Wed, 13 Apr 2011 19:40:45 +0000 (21:40 +0200)]
rfkill: Regulator consumer driver for rfkill

Add a regulator consumer driver for rfkill to enable controlling radio
transmitters connected to voltage regulators using the regulator
framework.

A new "vrfkill" virtual supply is provided to use in platform code.

Signed-off-by: Guiming Zhuo <gmzhuo@gmail.com>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
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 [Tue, 19 Apr 2011 19:34:48 +0000 (15:34 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-next-2.6

13 years agoMerge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git...
John W. Linville [Tue, 19 Apr 2011 19:33:54 +0000 (15:33 -0400)]
Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6

13 years agoiwlagn: remove led_ops
Wey-Yi Guy [Mon, 18 Apr 2011 16:36:30 +0000 (09:36 -0700)]
iwlagn: remove led_ops

No longer use, remove it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove legacy ops
Wey-Yi Guy [Fri, 8 Apr 2011 17:21:52 +0000 (10:21 -0700)]
iwlagn: remove legacy ops

No longer used by _agn devices, remove it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove un-necessary ieee80211_ops
Wey-Yi Guy [Mon, 18 Apr 2011 16:34:06 +0000 (09:34 -0700)]
iwlagn: remove un-necessary ieee80211_ops

After driver split, no need to use ieee80211_ops, remove it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: no 5.2GHz/HT40 support for bgn devices
Wey-Yi Guy [Wed, 6 Apr 2011 22:55:27 +0000 (15:55 -0700)]
iwlagn: no 5.2GHz/HT40 support for bgn devices

For bgn devices, there were no HT40 channels value in EEPROM

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: temperature should be measure for all _agn devices
Wey-Yi Guy [Mon, 18 Apr 2011 16:30:09 +0000 (09:30 -0700)]
iwlagn: temperature should be measure for all _agn devices

Thermal throttling functions are available for all _agn devices, call the
functions directly.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: always support uCode trace
Wey-Yi Guy [Wed, 6 Apr 2011 22:55:25 +0000 (15:55 -0700)]
iwlagn: always support uCode trace

All _agn devices support continuous uCode trace, remove checking

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: use huge command for beacon
Johannes Berg [Wed, 6 Apr 2011 19:28:56 +0000 (12:28 -0700)]
iwlagn: use huge command for beacon

When testing some new P2P code, Angie found that the
driver might crash because the beacon command ended
up being bigger than a regular command. This is quite
obvious -- a normal command is limited to roughly 360
bytes but a beacon may be much larger of course.

To fix this, use the huge command buffer.

Reported-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: verify that huge commands are synchronous
Johannes Berg [Mon, 18 Apr 2011 16:22:10 +0000 (09:22 -0700)]
iwlagn: verify that huge commands are synchronous

Since huge commands all share a single buffer,
there can only be a single one in flight at a
time since otherwise they'd overwrite each
other. This is true in the driver now, but it
seems like a possible source of bugs, so add
a test to verify that huge commands are always
sent synchronously.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove most BUG_ON instances
Johannes Berg [Mon, 18 Apr 2011 16:12:37 +0000 (09:12 -0700)]
iwlagn: remove most BUG_ON instances

There are a number of things in the driver that
may result in a BUG(), which is suboptimal since
it's hard to get debugging information out of
the driver in that case and the user experience
is also not good :-)

Almost all BUG_ON instances can be converted to
WARN_ON with a few lines of appropriate error
handling, so do that instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: use direct call for led functions
Wey-Yi Guy [Tue, 5 Apr 2011 15:30:43 +0000 (08:30 -0700)]
iwlagn: use direct call for led functions

After driver split, no need to call led functions through callback

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoBluetooth: Fix lockdep warning in L2CAP
Gustavo F. Padovan [Thu, 14 Apr 2011 20:57:26 +0000 (17:57 -0300)]
Bluetooth: Fix lockdep warning in L2CAP

Fix a regression from the L2CAP "rewrite" patches.
Purge the tx_q already happens on l2cap_chan_del() so we don't need it at
l2cap_disconnect_req().

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix another locking unbalance
Gustavo F. Padovan [Thu, 14 Apr 2011 21:34:34 +0000 (18:34 -0300)]
Bluetooth: Fix another locking unbalance

l2cap_get_sock_by_scid was changed to not lock the socket anymore, but I
forgot to change all the users of this function.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoath: Add a missing world regulatory domain 0x6C
Senthil Balasubramanian [Thu, 14 Apr 2011 11:11:30 +0000 (16:41 +0530)]
ath: Add a missing world regulatory domain 0x6C

Some customers use 0x6C world regulatory domain and this patch
adds the support.

Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Fix unitialized variable warnings
Larry Finger [Thu, 14 Apr 2011 02:00:02 +0000 (21:00 -0500)]
rtlwifi: Fix unitialized variable warnings

In http://lkml.indiana.edu/hypermail/linux/kernel/1104.1/01955.html, Geerti
Uytterhoeven reports the following warnings for the rtlwifi drivers.

src/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c: warning:
 'cck_index' may be used uninitialized in this function: => 637
src/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c: warning:
 'cck_index_old' may be used uninitialized in this function: => 637
src/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c: warning:
 'box_extreg' may be used uninitialized in this function: => 303
src/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c: warning:
 'box_reg' may be used uninitialized in this function: => 303
src/drivers/net/wireless/rtlwifi/rtl8192ce/rf.c: warning:
 'chnlgroup' may be used uninitialized in this function: => 205
src/drivers/net/wireless/rtlwifi/rtl8192ce/rf.c: warning:
 'u4_regvalue' may be used uninitialized in this function: => 450
src/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c: warning:
 'hq_sele' may be used uninitialized in this function: => 924

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: rename function mwifiex_is_ba_stream_avail
Bing Zhao [Thu, 14 Apr 2011 00:27:09 +0000 (17:27 -0700)]
mwifiex: rename function mwifiex_is_ba_stream_avail

The old function name sounds like checking for existing BA
stream. The function actually checks if we have room for
creating new BA stream or not.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove unused function parameters
Amitkumar Karwar [Thu, 14 Apr 2011 00:27:08 +0000 (17:27 -0700)]
mwifiex: remove unused function parameters

Some function parameters become useless after previous
cleanup changes.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove redundant "return" at end of void function
Yogesh Ashok Powar [Thu, 14 Apr 2011 00:27:07 +0000 (17:27 -0700)]
mwifiex: remove redundant "return" at end of void function

The return statement at the last line of a void function
is not necessary.

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 agomwifiex: cleanup ioctl wait queue and abstraction layer
Amitkumar Karwar [Thu, 14 Apr 2011 00:27:06 +0000 (17:27 -0700)]
mwifiex: cleanup ioctl wait queue and abstraction layer

1) remove mwifiex_alloc_fill_wait_queue() and
mwifiex_request_ioctl()
2) avoid dynamic allocation of wait queue
3) remove unnecessary mwifiex_error_code macros that
were used mainly by the wait queue status code
4) remove some abstraction functions
5) split mwifiex_prepare_cmd() to mwifiex_send_cmd_async()
and mwifiex_send_sync() to handle asynchronous and
synchronous commands respectively

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: disable 5 GHz support for the dualband PHY chip on dual-radio AR5312
Felix Fietkau [Wed, 13 Apr 2011 19:56:46 +0000 (21:56 +0200)]
ath5k: disable 5 GHz support for the dualband PHY chip on dual-radio AR5312

There are two variants of AR5312 dual-band devices, one single-radio
and the other one dual-radio. On the dual-radio board, the first MAC
only supports 5 GHz, even though it has a dual-band PHY. The 2.4 GHz
part of this phy is used in pass-through mode, connecting the second
MAC with the second PHY.
Disable 2.4 GHz for the first MAC on an AR5312, but only if the board
configuration indicates a dual-radio device.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: fix the EEPROM check for hw AES crypto support
Felix Fietkau [Wed, 13 Apr 2011 19:56:45 +0000 (21:56 +0200)]
ath5k: fix the EEPROM check for hw AES crypto support

EEPROM version 5.0 adds a new field for disabling AES support, having
an older version means that AES is present. This patch fixes hw AES
crypto support on AR5312 boards, which have an older EEPROM version.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: add a new bus op for reading the mac address
Felix Fietkau [Wed, 13 Apr 2011 19:56:44 +0000 (21:56 +0200)]
ath5k: add a new bus op for reading the mac address

On AHB, the calibration data usually does not contain a valid MAC address,
the correct MAC address is stored in the board config.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath: unshare struct ath_bus_ops between ath5k and ath9k
Felix Fietkau [Wed, 13 Apr 2011 19:56:43 +0000 (21:56 +0200)]
ath: unshare struct ath_bus_ops between ath5k and ath9k

This struct is not used in any common code, and moving it out of
the ath header makes it easier to add more driver specific ops.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: disable 5 GHz support if a 2.4 GHz radio is detected
Felix Fietkau [Wed, 13 Apr 2011 19:56:42 +0000 (21:56 +0200)]
ath5k: disable 5 GHz support if a 2.4 GHz radio is detected

On a dual-radio dual-band AR5312 device, the calibration data is shared
between the 5 GHz and the 2.4 GHz radio/MAC.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Fix improper beacon slot selection in IBSS
Rajkumar Manoharan [Tue, 12 Apr 2011 11:59:29 +0000 (17:29 +0530)]
ath9k: Fix improper beacon slot selection in IBSS

Request a re-configuration of Beacon related timers
on the receipt of the first Beacon frame has to be set only
for station mode. Setting beacon sync for IBSS is causing
wrong beacon slot selection on beacon generation.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: avoid using trinary operator w/ TX_STAT_INC
John W. Linville [Thu, 14 Apr 2011 14:38:22 +0000 (10:38 -0400)]
ath9k: avoid using trinary operator w/ TX_STAT_INC

Otherwise, you get this:

  CC [M]  drivers/net/wireless/ath/ath9k/hif_usb.o
drivers/net/wireless/ath/ath9k/hif_usb.c: In function â€˜ath9k_skb_queue_complete’:
drivers/net/wireless/ath/ath9k/hif_usb.c:230:12: error: expected expression before â€˜do’
make[2]: *** [drivers/net/wireless/ath/ath9k/hif_usb.o] Error 1
make[1]: *** [drivers/net/wireless/ath/ath9k] Error 2
make: *** [drivers/net/wireless/ath/] Error 2

The TX_STAT_INC macro should probably be changed to accomodate such
usage, although using a trinary operator in place of an if-else seems
questionable to me anyway.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Sujith Manoharan <Sujith.Manoharan@Atheros.com>
13 years agoBluetooth: Don't lock sock inside l2cap_get_sock_by_scid()
Gustavo F. Padovan [Wed, 13 Apr 2011 22:01:22 +0000 (19:01 -0300)]
Bluetooth: Don't lock sock inside l2cap_get_sock_by_scid()

Fix an locking issue with the new l2cap_att_channel(). l2cap_att_channel()
was trying to lock a locked socket.

Reported-by: Anderson Lizardo <anderson.lizardo@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agomac80211: Allocate new mesh path and portal tables before taking locks
cozybit Inc [Wed, 13 Apr 2011 18:10:28 +0000 (11:10 -0700)]
mac80211: Allocate new mesh path and portal tables before taking locks

It is unnecessary to hold the path table resize lock while allocating a
new table.  Allocate first and take lock later.  This resolves a
soft-lockup:

[  293.385799] BUG: soft lockup - CPU#0 stuck for 61s! [kworker/u:3:744]
(...)
[  293.386049] Call Trace:
[  293.386049]  [<c119fd04>] do_raw_read_lock+0x26/0x29
[  293.386049]  [<c14b2982>] _raw_read_lock+0x8/0xa
[  293.386049]  [<c148c178>] mesh_path_add+0xb7/0x24e
[  293.386049]  [<c148b98d>] ? mesh_path_lookup+0x1b/0xa6
[  293.386049]  [<c148ded5>] hwmp_route_info_get+0x276/0x2fd
[  293.386049]  [<c148dfb6>] mesh_rx_path_sel_frame+0x5a/0x5d9
[  293.386049]  [<c102667d>] ? update_curr+0x1cf/0x1d7
[  293.386049]  [<c148b45a>] ieee80211_mesh_rx_queued_mgmt+0x60/0x67
[  293.386049]  [<c147c374>] ieee80211_iface_work+0x1f0/0x258
(...)

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Enable AP and P2P modes
Sujith Manoharan [Wed, 13 Apr 2011 05:57:06 +0000 (11:27 +0530)]
ath9k_htc: Enable AP and P2P modes

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add detailed firmware statistics
Sujith Manoharan [Wed, 13 Apr 2011 05:56:58 +0000 (11:26 +0530)]
ath9k_htc: Add detailed firmware statistics

New debugfs files:

<debugfs_root>/ath9k_htc/<phy#>/tgt_int_stats
<debugfs_root>/ath9k_htc/<phy#>/tgt_tx_stats
<debugfs_root>/ath9k_htc/<phy#>/tgt_rx_stats

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Use helper routines for transmission
Sujith Manoharan [Wed, 13 Apr 2011 05:56:52 +0000 (11:26 +0530)]
ath9k_htc: Use helper routines for transmission

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Use separate URB pool for management frames
Sujith Manoharan [Wed, 13 Apr 2011 05:56:46 +0000 (11:26 +0530)]
ath9k_htc: Use separate URB pool for management frames

Beacon transmission needs to involve as little latency
as possible after receiving a SWBA event from the target.
Since packets are buffered to use TX stream mode, beacon
frames sometimes gets queued up and are not sent out immediately.
Fix this by decoupling management frame transmission from the
normal data path and send them out immediately.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add a timer to cleanup WMI events
Sujith Manoharan [Wed, 13 Apr 2011 05:56:39 +0000 (11:26 +0530)]
ath9k_htc: Add a timer to cleanup WMI events

Occasionally, a WMI event would arrive ahead of the TX
URB completion handler. Discarding these events would exhaust
the available TX slots, so handle them by running a timer
cleaning up such events. Also, timeout packets for which TX
completion events have not arrived.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add a debugfs file showing endpoint status
Sujith Manoharan [Wed, 13 Apr 2011 05:56:31 +0000 (11:26 +0530)]
ath9k_htc: Add a debugfs file showing endpoint status

Location: ath9k_htc/phy#/queue

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add a debugfs file to dump TX slot information
Sujith Manoharan [Wed, 13 Apr 2011 05:56:26 +0000 (11:26 +0530)]
ath9k_htc: Add a debugfs file to dump TX slot information

Location: ath9k_htc/phy#/slot

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add support for TX completion
Sujith Manoharan [Wed, 13 Apr 2011 05:56:18 +0000 (11:26 +0530)]
ath9k_htc: Add support for TX completion

Now that the infrastructure is in place, process WMI
TX status events and complete packets.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Drain packets on station removal
Sujith Manoharan [Wed, 13 Apr 2011 05:56:11 +0000 (11:26 +0530)]
ath9k_htc: Drain packets on station removal

When a station entry is removed, there could still be
pending packets destined for that station in the HIF layer.
Sending these to the target is not necessary, so drain them
in the driver itself.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Optimize HTC start/stop API
Sujith Manoharan [Wed, 13 Apr 2011 05:56:06 +0000 (11:26 +0530)]
ath9k_htc: Optimize HTC start/stop API

There is no point in looping over all the endpoints,
since the HIF layer uses the start/stop APIs only
for the TX pipe. Simplify the API accordingly.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Drain pending TX frames properly
Sujith Manoharan [Wed, 13 Apr 2011 05:55:59 +0000 (11:25 +0530)]
ath9k_htc: Drain pending TX frames properly

When doing a channel set or a reset operation the pending
frames queued up for transmission have to be flushed and
sent to mac80211. Fixing this has to be done in two separate
steps:

  * Flush queued frames and kill the URB TX completion handler.
  * Complete all the frames that in the TX pending queue.

This patch adds proper support for draining and all the callsites
namely, channel change/reset/idle/stop are fixed. A separate queue
is used for handling failed frames.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Use helper functions for TX processing
Sujith Manoharan [Wed, 13 Apr 2011 05:55:54 +0000 (11:25 +0530)]
ath9k_htc: Use helper functions for TX processing

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add TX slots
Sujith Manoharan [Wed, 13 Apr 2011 05:55:47 +0000 (11:25 +0530)]
ath9k_htc: Add TX slots

Maintain a bitmap of slots for transmission and update
the cookie field for every packet with the slot value.
This value would be used for matching packets when TX
completion processing is added.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Move endpoint header parsing to TX tasklet
Sujith Manoharan [Wed, 13 Apr 2011 05:55:41 +0000 (11:25 +0530)]
ath9k_htc: Move endpoint header parsing to TX tasklet

There is no need to do endpoint header removal in the ISR.
Also, this is needed when TX slot management is added later on.
Use a helper function to strip the driver header.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Introduce new HTC API
Sujith Manoharan [Wed, 13 Apr 2011 05:55:35 +0000 (11:25 +0530)]
ath9k_htc: Introduce new HTC API

A new routine that takes an endpoint explicitly is
introduced. The normal htc_send() now retrieves the endpoint
from the packet's private data. This would be useful
in TX completion when the endpoint ID would be required.
While at it, use a helper function to map the queue to endpoint.

Data/mgmt/beacon packets use htc_send(), while WMI comamnds
pass the endpoint to HTC.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Fix TX queue management
Sujith Manoharan [Wed, 13 Apr 2011 05:55:29 +0000 (11:25 +0530)]
ath9k_htc: Fix TX queue management

Handle queue start/stop properly by maintaining
a counter to check if the pending frame count has
exceeded the threshold. Otherwise, packets would be
dropped needlessly. While at it, use a simple flag
to track queue status and use helper functions too.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Increase URB count for REG_IN pipe
Sujith Manoharan [Wed, 13 Apr 2011 05:55:23 +0000 (11:25 +0530)]
ath9k_htc: Increase URB count for REG_IN pipe

Using a single URB for receiving WMI events is
insufficient, increase it to 64 to not lose
WMI events in high throughput situations.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add a new WMI event WMI_TXSTATUS_EVENTID
Sujith Manoharan [Wed, 13 Apr 2011 05:55:18 +0000 (11:25 +0530)]
ath9k_htc: Add a new WMI event WMI_TXSTATUS_EVENTID

This event will be generated by the target for packet completions.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Sync MGMT/DATA packet headers with firmware
Sujith Manoharan [Wed, 13 Apr 2011 05:55:12 +0000 (11:25 +0530)]
ath9k_htc: Sync MGMT/DATA packet headers with firmware

Add a new cookie field that would be filled by the host.
This can be used to match the TX status WMI event with
the appropriate packet.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Reduce TX queue size
Sujith Manoharan [Wed, 13 Apr 2011 05:55:06 +0000 (11:25 +0530)]
ath9k_htc: Reduce TX queue size

The current max queue length of 1024 is quite large
and unnecessary. 256 suffices well enough even for high
throughput situations.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Move TX specific stuff to a separate structure
Sujith Manoharan [Wed, 13 Apr 2011 05:55:00 +0000 (11:25 +0530)]
ath9k_htc: Move TX specific stuff to a separate structure

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Remove unused WMI_WLAN_TXCOMP_EVENTID
Sujith Manoharan [Wed, 13 Apr 2011 05:54:55 +0000 (11:24 +0530)]
ath9k_htc: Remove unused WMI_WLAN_TXCOMP_EVENTID

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Sync struct ath9k_htc_cap_target with FW
Sujith Manoharan [Wed, 13 Apr 2011 05:54:49 +0000 (11:24 +0530)]
ath9k_htc: Sync struct ath9k_htc_cap_target with FW

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Sync struct ath9k_htc_target_vif with FW
Sujith Manoharan [Wed, 13 Apr 2011 05:54:43 +0000 (11:24 +0530)]
ath9k_htc: Sync struct ath9k_htc_target_vif with FW

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Sync struct ath9k_htc_target_sta with FW
Sujith Manoharan [Wed, 13 Apr 2011 05:54:37 +0000 (11:24 +0530)]
ath9k_htc: Sync struct ath9k_htc_target_sta with FW

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Use SKB's private area for TX parameters
Sujith Manoharan [Wed, 13 Apr 2011 05:54:31 +0000 (11:24 +0530)]
ath9k_htc: Use SKB's private area for TX parameters

For all packets sent through the USB_WLAN_TX_PIPE endpoint,
the private area of the SKB's tx_info can be used to store
driver-specific information. For packets sent through USB_REG_OUT_PIPE,
this will not make a difference since they are routed through a
separate routine that doesn't access the private region.

This would help in situations where TX information is required
in the URB callback.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Remove unused WMI commands
Sujith Manoharan [Wed, 13 Apr 2011 05:54:25 +0000 (11:24 +0530)]
ath9k_htc: Remove unused WMI commands

WMI_TGT_TXQ_ENABLE_CMDID
WMI_HOST_ATTACH
WMI_DEBUG_INFO_CMDID
WMI_BEACON_UPDATE_CMDID
WMI_RESET_CMDID
WMI_RX_LINK_CMDID
WMI_STOP_DMA_RECV_CMDID

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Fix RX length check
Sujith Manoharan [Wed, 13 Apr 2011 05:54:19 +0000 (11:24 +0530)]
ath9k_htc: Fix RX length check

The length of the received SKB could be equal to
HTC_RX_FRAME_HEADER_SIZE in case of packets with phy/crc errors,
in which case they are dropped without being processed.
Fix this check so that the error counters are updated correctly.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add RX error statistics
Sujith Manoharan [Wed, 13 Apr 2011 05:54:10 +0000 (11:24 +0530)]
ath9k_htc: Add RX error statistics

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Move debug code to a separate file
Sujith Manoharan [Wed, 13 Apr 2011 05:54:00 +0000 (11:24 +0530)]
ath9k_htc: Move debug code to a separate file

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Queue WMI events
Sujith Manoharan [Wed, 13 Apr 2011 05:53:52 +0000 (11:23 +0530)]
ath9k_htc: Queue WMI events

Use a queue to handle WMI events and schedule a tasklet
to process the events. This fixes the race between the
WMI event ISR and the SWBA tasklet when the arrival of
WMI events in quick succession could overwrite the SWBA
data before the tasklet from a previous iteration could
have been scheduled. Also, drain the WMI queue properly.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Fix beacon miss under heavy load
Sujith Manoharan [Wed, 13 Apr 2011 05:53:44 +0000 (11:23 +0530)]
ath9k_htc: Fix beacon miss under heavy load

Transmission of beacons becomes erratic when TX load
is high, since the latency involved in the generation
of a SWBA interrupt on the target to the actual sending
of a beacon is quite high for USB devices.

Fix this by adjusting the beacon response time.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Handle buffered frames in AP mode
Sujith Manoharan [Wed, 13 Apr 2011 05:53:34 +0000 (11:23 +0530)]
ath9k_htc: Handle buffered frames in AP mode

Use the CAB endpoint to send buffered multicast or
broadcast frames after each SWBA event.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Configure the beacon queue
Sujith Manoharan [Wed, 13 Apr 2011 05:53:26 +0000 (11:23 +0530)]
ath9k_htc: Configure the beacon queue

Set operating parameters (cwmin, cwmax) for the beacon queue
in AP mode.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add TSF adjust capability
Sujith Manoharan [Wed, 13 Apr 2011 05:53:17 +0000 (11:23 +0530)]
ath9k_htc: Add TSF adjust capability

In multi-interface mode, beacons/probe responses that are
sent out must have their timestamp field updated. Calculate
the TSF adjustment value for each beaconing interface and set it
in the frame properly.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add beacon slots
Sujith Manoharan [Wed, 13 Apr 2011 05:53:08 +0000 (11:23 +0530)]
ath9k_htc: Add beacon slots

Beacon transmission is now handled through a slot mechanism.
This allows multiple beaconing interfaces to be be present.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Fix WMI and beacon header
Sujith Manoharan [Wed, 13 Apr 2011 05:52:59 +0000 (11:22 +0530)]
ath9k_htc: Fix WMI and beacon header

Match the beacon header with that of the firmware.
Also, the firmware reports the TSF for an SWBA, so
store it.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add a WMI command to get the firmware version
Sujith Manoharan [Wed, 13 Apr 2011 05:52:51 +0000 (11:22 +0530)]
ath9k_htc: Add a WMI command to get the firmware version

Also, update the wiphy information and use the correct
device pointer when registering. This would fix ethtool.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Rename firmware
Sujith Manoharan [Wed, 13 Apr 2011 05:52:42 +0000 (11:22 +0530)]
ath9k_htc: Rename firmware

Since the new FW requires backward incompatible host driver changes,
rename the FW to allow older driver versions to work with the
older FW.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Remove AR7010 v1.0 support
Sujith Manoharan [Wed, 13 Apr 2011 05:52:33 +0000 (11:22 +0530)]
ath9k_htc: Remove AR7010 v1.0 support

All the AR7010 devices supoprted by ath9k_htc are based
on version v1.1, so remove support for v1.0.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: use traffic threshold to decide when to start ampdu
Brian Cavagnolo [Tue, 12 Apr 2011 18:06:28 +0000 (11:06 -0700)]
mwl8k: use traffic threshold to decide when to start ampdu

Currently, ampdu stream is created on the first qos packet to an
HT sta. The overhead of setting up the BA session may not be
justified if the outgoing packet rate is minimal (e.g., ping). So
we only allow ampdu streams after seeing a critical number of
packets in an arbitrary one-second interval.

Based on work by Nishant Sarmukadam <nishants@marvell.com>

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: receive EAP frames from a station in an AP VLAN on the main AP
Felix Fietkau [Tue, 12 Apr 2011 17:15:22 +0000 (19:15 +0200)]
mac80211: receive EAP frames from a station in an AP VLAN on the main AP

This makes it easier to handle moving stations to VLAN interfaces that are
part of a different bridge.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: introduce ATH9K_{PCI,AHB} config options
Gabor Juhos [Tue, 12 Apr 2011 16:23:16 +0000 (18:23 +0200)]
ath9k: introduce ATH9K_{PCI,AHB} config options

Currently ath9k only available in menuconfig if PCI bus
support is enabled. However the driver is required for
the built-in wireless MACs of the Atheros AR9130/AR9132
SoCs. These SoCs have no PCI controller, the wireless
MAC is connected to the AHB bus on them.

Introduce separated config options for the supported
buses, in order to allow building of ath9h without PCI
bus support.

As a bonus, this patch removes the cross-reference of
the ATHEROS_AR71XX option which is not present in the
kernel.

Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: interrupt handling changes
Nishant Sarmukadam [Fri, 8 Apr 2011 09:08:27 +0000 (14:38 +0530)]
mwl8k: interrupt handling changes

We do not need to enable all the interrupts in mwl8k_probe_hw.
We need to enable only MWL8K_A2H_INT_OPC_DONE interrupt for sending
commands to the firmware. Keep the other interrupts masked in
mwl8k_probe_hw. Also, in mwl8k_start, where we expect other interrupts,
enable only those interrupts we are interested in.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoBluetooth: btmrvl: support Marvell Bluetooth device SD8787
Kevin Gan [Sat, 9 Apr 2011 01:19:33 +0000 (18:19 -0700)]
Bluetooth: btmrvl: support Marvell Bluetooth device SD8787

The SD8787 firmware image is shared with mwifiex driver.
Whoever gets loaded first will be responsible for firmware
downloading.

Signed-off-by: Kevin Gan <ganhy@marvell.com>
Signed-off-by: Tristan Xu <xurf@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Check return value of hci_recv_stream_fragment()
Gustavo F. Padovan [Thu, 7 Apr 2011 21:53:45 +0000 (18:53 -0300)]
Bluetooth: Check return value of hci_recv_stream_fragment()

It may return error and in this case we do add to the stats.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: hci_uart: check the return value of recv()
Jiejing Zhang [Thu, 7 Apr 2011 12:37:06 +0000 (20:37 +0800)]
Bluetooth: hci_uart: check the return value of recv()

Check the return value of hu->proto->recv() in hci_uart_tty_receive()
the recv() may return error, check it, not add this to statistics.

Signed-off-by: Jiejing Zhang <jiejing.zhang@freescale.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix Out Of Band pairing when mgmt interface is disabled
Szymon Janc [Wed, 6 Apr 2011 11:01:59 +0000 (13:01 +0200)]
Bluetooth: Fix Out Of Band pairing when mgmt interface is disabled

Use kernel stored remote Out Of Band data only if management interface
is enabled. Otherwise HCI_OP_REMOTE_OOB_DATA_NEG_REPLY was sent to
controller even if remote Out Of Band data was present in bluetoothd.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add proper handling of received LE data
Gustavo F. Padovan [Thu, 7 Apr 2011 19:40:25 +0000 (16:40 -0300)]
Bluetooth: Add proper handling of received LE data

Despite it works, handling through l2cap_data_channel() is wrongs.
That function should handle only connection oriented data.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Clean up ath3k_load_firmware()
Gustavo F. Padovan [Wed, 6 Apr 2011 01:29:31 +0000 (22:29 -0300)]
Bluetooth: Clean up ath3k_load_firmware()

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix wrong comparison in listen()
Gustavo F. Padovan [Tue, 5 Apr 2011 18:24:40 +0000 (15:24 -0300)]
Bluetooth: Fix wrong comparison in listen()

We should check for the pi->scid there.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Move tx queue to struct l2cap_chan
Gustavo F. Padovan [Mon, 4 Apr 2011 19:16:44 +0000 (16:16 -0300)]
Bluetooth: Move tx queue to struct l2cap_chan

tx_q is the queue used by ERTM mode.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Remove unneeded uninitialized_vars()
Gustavo F. Padovan [Mon, 4 Apr 2011 19:00:55 +0000 (16:00 -0300)]
Bluetooth: Remove unneeded uninitialized_vars()

That was unnecessary use of it.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Remove some sk references from l2cap_core.c
Gustavo F. Padovan [Mon, 4 Apr 2011 18:59:54 +0000 (15:59 -0300)]
Bluetooth: Remove some sk references from l2cap_core.c

Change some BT_DBG messages and consequently remove some struct sock
declarations.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Move SREJ list to struct l2cap_chan
Gustavo F. Padovan [Mon, 4 Apr 2011 18:40:12 +0000 (15:40 -0300)]
Bluetooth: Move SREJ list to struct l2cap_chan

As part of moving all the Channel related operation to struct l2cap_chan.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoath5k: improve comments for optimized tx descriptor setup
John W. Linville [Wed, 13 Apr 2011 12:47:32 +0000 (08:47 -0400)]
ath5k: improve comments for optimized tx descriptor setup

Comment the use of local variables to reduce the number of load/store
operations on uncached memory, in hopes of not losing this optimization
accidentally in the future.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Register id table for platform device
Vasanthakumar Thiagarajan [Tue, 12 Apr 2011 07:12:22 +0000 (12:42 +0530)]
ath9k: Register id table for platform device

Currently the device id in the platform driver is hardcoded to an id
which is specific to AR9130/AR9132 SOCs as it supports only wmac (wireless mac)
of these SOCs. But this needs to be dynamic when we want to support different
wmac of SOCs. So add id_table to driver to make it extendable to more SOCs.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Acked-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>