GitHub/moto-9609/android_kernel_motorola_exynos9610.git
13 years agomwifiex: remove redundant encryption_mode mapping
Yogesh Ashok Powar [Sat, 2 Apr 2011 01:36:47 +0000 (18:36 -0700)]
mwifiex: remove redundant encryption_mode mapping

remove MWIFIEX_ENCRYPTION_MODE_ and use WLAN_CIPHER_SUITE_
macros directly

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: return success in set_default_key for WPA/WPA2
Amitkumar Karwar [Sat, 2 Apr 2011 01:36:46 +0000 (18:36 -0700)]
mwifiex: return success in set_default_key for WPA/WPA2

When testing wpa_supplicant with 'nl80211' driver to connect
to an AP with WPA/WPA2 security, we notice the followings:

1) add_key is called firstly with the key from cfg80211
2) set_defaut_key is called next

set_default_key() is specific to WEP keys and should not be
called in case of WPA/WPA2 security. The set_default_key()
won't be called if wpa_supplicant uses "-Dwext" option,
but it's been called if "-Dnl80211" option is specified.

We can fix this issue by adding a check to return from
set_default_key() if WEP key is not configured.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211: Add BSS parameters to station
Paul Stewart [Thu, 31 Mar 2011 16:25:41 +0000 (09:25 -0700)]
nl80211: Add BSS parameters to station

This allows user-space monitoring of BSS parameters for the associated
station.  This is useful for debugging and verifying that the paramaters
are as expected.

[Exactly the same as before but bundled into a single message]

Signed-off-by: Paul Stewart <pstew@chromium.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: remove sync_cmd_mutex
Stanislaw Gruszka [Thu, 31 Mar 2011 15:36:28 +0000 (17:36 +0200)]
iwlwifi: remove sync_cmd_mutex

We now use priv->mutex to serialize sync command, remove old
priv->sync_cmd_mutex and add assertion that priv->mutex must be locked.

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 agoiwlwifi: more priv->mutex serialization
Stanislaw Gruszka [Thu, 31 Mar 2011 15:36:27 +0000 (17:36 +0200)]
iwlwifi: more priv->mutex serialization

Check status bits with mutex taken, because when we wait for mutex
unlock, status can change. Patch should also make remaining sync
commands be send with priv->mutex taken. That will prevent execute
these commands when we are currently reset firmware, what could
possibly cause troubles.

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 agoiwlwifi: fix enqueue hcmd race conditions
Stanislaw Gruszka [Thu, 31 Mar 2011 15:36:26 +0000 (17:36 +0200)]
iwlwifi: fix enqueue hcmd race conditions

We mark command as huge by using meta->flags from other (non huge) command,
but flags can be possibly overridden, when non huge command is enqueued,
what can lead to:

WARNING: at lib/dma-debug.c:696 dma_debug_device_change+0x1a3/0x1f0()
DMA-API: device driver has pending DMA allocations while released from device [count=1]

To fix introduce additional CMD_MAPPED to mark command as mapped and
serialize iwl_enqueue_hcmd() with iwl_tx_cmd_complete() using
hcmd_lock. Serialization will also fix possible race conditions,
because q->read_ptr, q->write_ptr are modified/used in parallel.

On the way fix whitespace.

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 agowireless: rt2x00: rt{2500,73}usb.c fix duplicate ids
Xose Vazquez Perez [Sun, 27 Mar 2011 00:15:53 +0000 (01:15 +0100)]
wireless: rt2x00: rt{2500,73}usb.c fix duplicate ids

based on the Ralink drivers:

W = Windows_ralink_driver
L = Linux_ralink_driver

USB_IDs         W_73  W_2500 L_73  L_2500
=============   ====  ====== ====  ======
0x050d,0x7050   -     -      -     YES
0x050d,0x705a   -     -      YES   -
0x1371,0x9022   -     YES    YES   -
0x148f,0x2573   YES   -      YES   -

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.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, 7 Apr 2011 19:30:53 +0000 (15:30 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/padovan/bluetooth-next-2.6

13 years agoar9170usb: purge obsolete driver
Christian Lamparter [Fri, 25 Mar 2011 19:21:55 +0000 (20:21 +0100)]
ar9170usb: purge obsolete driver

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoBluetooth: convert net/bluetooth/ to kstrtox
Alexey Dobriyan [Sat, 2 Apr 2011 11:19:41 +0000 (14:19 +0300)]
Bluetooth: convert net/bluetooth/ to kstrtox

Convert from strict_strto*() interfaces to kstrto*() interfaces.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Use GFP_KERNEL in user context
Gustavo F. Padovan [Mon, 4 Apr 2011 21:56:53 +0000 (18:56 -0300)]
Bluetooth: Use GFP_KERNEL in user context

The allocation in mgmt_control() code are in user context and not locked
by any spinlock, so it's not recommended the use of GFP_ATOMIC there.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Don't use spin_lock_bh in user context
Gustavo F. Padovan [Mon, 4 Apr 2011 22:06:05 +0000 (19:06 -0300)]
Bluetooth: Don't use spin_lock_bh in user context

spin_lock() and spin_unlock() are more apropiated for user context.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Use kthread API in cmtp
Szymon Janc [Mon, 21 Mar 2011 13:20:06 +0000 (14:20 +0100)]
Bluetooth: Use kthread API in cmtp

kernel_thread() is a low-level implementation detail and
EXPORT_SYMBOL(kernel_thread) is scheduled for removal.
Use the <linux/kthread.h> API instead.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Use kthread API in bnep
Szymon Janc [Mon, 21 Mar 2011 13:20:00 +0000 (14:20 +0100)]
Bluetooth: Use kthread API in bnep

kernel_thread() is a low-level implementation detail and
EXPORT_SYMBOL(kernel_thread) is scheduled for removal.
Use the <linux/kthread.h> API instead.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Use kthread API in hidp
Szymon Janc [Tue, 5 Apr 2011 13:37:45 +0000 (15:37 +0200)]
Bluetooth: Use kthread API in hidp

kernel_thread() is a low-level implementation detail and
EXPORT_SYMBOL(kernel_thread) is scheduled for removal.
Use the <linux/kthread.h> API instead.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add mgmt_remote_name event
Johan Hedberg [Wed, 30 Mar 2011 10:18:12 +0000 (13:18 +0300)]
Bluetooth: Add mgmt_remote_name event

This patch adds a new remote_name event to the Management interface
which is sent every time the name of a remote device is resolved (over
BR/EDR).

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add mgmt_device_found event
Johan Hedberg [Wed, 30 Mar 2011 20:57:16 +0000 (23:57 +0300)]
Bluetooth: Add mgmt_device_found event

This patch adds a device_found event to the Management interface. For
now the event only maps to BR/EDR inquiry result HCI events, but in the
future the plan is to also use it for the LE device discovery process.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Remove gfp_mask param from hci_reassembly()
Gustavo F. Padovan [Mon, 4 Apr 2011 21:25:14 +0000 (18:25 -0300)]
Bluetooth: Remove gfp_mask param from hci_reassembly()

It is unnecessary, once we are always in interrupt context.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agomac80211: clean up station cleanup timer
Johannes Berg [Fri, 1 Apr 2011 11:52:48 +0000 (13:52 +0200)]
mac80211: clean up station cleanup timer

We currently run this timer exactly once when
a new mac80211 device is registered, but that
is completely pointless since it will have no
work to do at all. Therefore, remove that and
also simplify some code using the timer.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: pci: implement serdes workaround
Rafał Miłecki [Fri, 1 Apr 2011 11:26:52 +0000 (13:26 +0200)]
ssb: pci: implement serdes workaround

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: pci: implement mdio reading
Rafał Miłecki [Fri, 1 Apr 2011 10:07:34 +0000 (12:07 +0200)]
ssb: pci: implement mdio reading

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: pci: fix mdio writes on newer cores (rev 10+)
Rafał Miłecki [Fri, 1 Apr 2011 10:07:33 +0000 (12:07 +0200)]
ssb: pci: fix mdio writes on newer cores (rev 10+)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: pci: trivial: drop useless pointer
Rafał Miłecki [Fri, 1 Apr 2011 10:07:32 +0000 (12:07 +0200)]
ssb: pci: trivial: drop useless pointer

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: trivial: use u8 for chip_rev (it's mask is 0xF)
Rafał Miłecki [Fri, 1 Apr 2011 10:06:48 +0000 (12:06 +0200)]
ssb: trivial: use u8 for chip_rev (it's mask is 0xF)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Use appropriate rx gain table for AR9485
Vasanthakumar Thiagarajan [Fri, 1 Apr 2011 10:02:16 +0000 (15:32 +0530)]
ath9k_hw: Use appropriate rx gain table for AR9485

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove unused macros in decl.h and main.h
Bing Zhao [Fri, 1 Apr 2011 02:50:14 +0000 (19:50 -0700)]
mwifiex: remove unused macros in decl.h and main.h

These macros are leftover of previous cleanup patches.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove struct mwifiex_802_11_fixed_ies
Bing Zhao [Thu, 31 Mar 2011 01:12:45 +0000 (18:12 -0700)]
mwifiex: remove struct mwifiex_802_11_fixed_ies

struct mwifiex_802_11_fixed_ies is not necessary.
struct mwifiex_event_wep_icv_err is not used any more.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: cleanup power save related struct and macros
Marc Yang [Thu, 31 Mar 2011 01:12:44 +0000 (18:12 -0700)]
mwifiex: cleanup power save related struct and macros

remove redundant structures and unused macros

Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoieee80211: add HT extended capabilities masks
Bing Zhao [Thu, 31 Mar 2011 01:01:15 +0000 (18:01 -0700)]
ieee80211: add HT extended capabilities masks

IEEE Std 802.11n, Oct. 29, 2009:
7.3.2.56.5 HT Extended Capabilities field

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove unused macros in fw.h
Marc Yang [Tue, 29 Mar 2011 00:55:44 +0000 (17:55 -0700)]
mwifiex: remove unused macros in fw.h

These definitions are no longer used after previous cleanups.

Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove unused radio_on variable and macros
Marc Yang [Tue, 29 Mar 2011 00:55:43 +0000 (17:55 -0700)]
mwifiex: remove unused radio_on variable and macros

The radio_on variable is defined but never used.

Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove MWIFIEX_AUTH_MODE_ macros
Marc Yang [Tue, 29 Mar 2011 00:55:42 +0000 (17:55 -0700)]
mwifiex: remove MWIFIEX_AUTH_MODE_ macros

replace them with NL80211_AUTHTYPE_ macros

Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove MWIFIEX_BSS_MODE_ macros
Bing Zhao [Tue, 29 Mar 2011 00:55:41 +0000 (17:55 -0700)]
mwifiex: remove MWIFIEX_BSS_MODE_ macros

replace them with NL80211_IFTYPE_ macros

Also remove redundant functions mwifiex_drv_get_mode()
and mwifiex_bss_ioctl_mode().

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Add an error message when trying to send on a full queue
Helmut Schaa [Mon, 28 Mar 2011 11:35:51 +0000 (13:35 +0200)]
rt2x00: Add an error message when trying to send on a full queue

We already tell mac80211 to stop the queue when we hit a certain
threshold. Hence, it shouldn't happen at all that a frame gets queued
for tx on a full queue. Add an error message for this case.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Fix tx aggregation problems with some clients
Helmut Schaa [Mon, 28 Mar 2011 11:35:21 +0000 (13:35 +0200)]
rt2x00: Fix tx aggregation problems with some clients

Some clients seem to rely upon the reception of BlockAckReqs to flush
their rx reorder buffer. In order to fix aggregation for these clients
rt2x00 should send a BlockAckReq if the transmission of an AMPDU
subframe fails.

Introduce a new flag TXDONE_AMPDU to indicate that this is an AMPDU
subframe and pass IEEE80211_TX_STAT_AMPDU_NO_BACK to mac80211 if an
AMPDU subframe failed during transmission.

This fixes aggregation problems with Intel 5100 Windows STAs (and maybe
others as well).

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Add support for the ZyXEL NWD-211AN USB
Ivo van Doorn [Mon, 28 Mar 2011 11:34:50 +0000 (13:34 +0200)]
rt2x00: Add support for the ZyXEL NWD-211AN USB

Add new USB ID

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Fix STBC transmissions to STAs with Rx STBC > 1
Helmut Schaa [Mon, 28 Mar 2011 11:34:15 +0000 (13:34 +0200)]
rt2x00: Fix STBC transmissions to STAs with Rx STBC > 1

For STBC transmissions rt2x00 used the number of RxSTBC streams the
destination STA indicates in its HT capabilities as STBC value in
the TXWI.

However, the legacy drivers and our own comment in rt2800.h suggest
that the STBC field in the TXWI only allows a value of 0 or 1.
The values 2 and 3 are reserved (probably for future devices).

And indeed, STBC transmissions to STAs indicating more then 1
RxSTBC stream fail when the STBC field is set to something >1.

Fix this by only setting the STBC field to 1 when STBC should be
used.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Implement tx power temperature compensation
Helmut Schaa [Mon, 28 Mar 2011 11:33:40 +0000 (13:33 +0200)]
rt2x00: Implement tx power temperature compensation

rt2800 devices should adjust their tx power in accordance with the
eeproms temperature calibration values. Add a new driver callback
gain_calibration that is called every 4 seconds.

The rt2800 gain calibration routine simply runs the tx power
configuration that takes care of calculating the temperature
compensation delta.

We don't need to synchronize the calls to rt2800_config_txpower
as they should all happen from mac80211's single threaded workqueue.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Remove obsolete rt2x00queue_align_payload
Helmut Schaa [Mon, 28 Mar 2011 11:33:04 +0000 (13:33 +0200)]
rt2x00: Remove obsolete rt2x00queue_align_payload

Since commit d1c3a37ceeb1a5ea02991a0476355f1a1d3b3e83 ("mac80211:
clarify alignment docs, fix up alignment") removed the requirement
for a 4-byte aligned payload rt2x00queue_align_payload is obsolete
as mac80211 will align the payload when it passes the frame to the
net stack.

As a result we can remove the call to rt2x00queue_align_payload in the
rx path and since that's the last user we can remove
rt2x00queue_align_payload altogether.

One advantage is that we save some alignment operations for frames
that don't need to be aligned (for example beause they are not passed
to the net stack).

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Indention cleanup in rt2800lib
Helmut Schaa [Mon, 28 Mar 2011 11:32:32 +0000 (13:32 +0200)]
rt2x00: Indention cleanup in rt2800lib

Fix the indention in rt2800_compesate_txpower and also fix a typo in
the function name rt2800_compesate_txpower -> rt2800_compensate_txpower.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Don't recalculate HT40 compensation for each rate
Helmut Schaa [Mon, 28 Mar 2011 11:32:01 +0000 (13:32 +0200)]
rt2x00: Don't recalculate HT40 compensation for each rate

Previously the HT40 tx power compensation value was calculated for each
rate. However, the calculation is independent of the tx rate and as such
can be precalculated and just passed in for each rate.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Restructure bw_comp calculation
Helmut Schaa [Mon, 28 Mar 2011 11:31:30 +0000 (13:31 +0200)]
rt2x00: Restructure bw_comp calculation

Move the HT40 check inside the calculation function to make it easier
for a later cleanup.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Remove DRIVER_SUPPORT_WATCHDOG flag
Helmut Schaa [Mon, 28 Mar 2011 11:30:59 +0000 (13:30 +0200)]
rt2x00: Remove DRIVER_SUPPORT_WATCHDOG flag

We can simply check if the driver registered the watchdog callback.
There's no need to have an additional flag for that.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Calculate tx status fifo size instead of hardcoding it
Helmut Schaa [Mon, 28 Mar 2011 11:30:36 +0000 (13:30 +0200)]
rt2x00: Calculate tx status fifo size instead of hardcoding it

Instead of hardcoding the tx status fifo size as 512 calculate it based
on the number of tx queues and the number of entries per queue. Also
round the size up to a power of 2 as kfifo would otherwise round it
down.

On rt2800pci this will increase the kfifo size from 512 bytes to 1024
bytes which is then able to hold the tx status for all entries in all
tx queues.

Furthermore, if the number of tx queues or tx entries changes in the
future (use of the MGMT queue for example) the kfifo size doesn't need
to be updated.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Limit rt2800pci txdone processing to 16 entries at once
Helmut Schaa [Mon, 28 Mar 2011 11:30:09 +0000 (13:30 +0200)]
rt2x00: Limit rt2800pci txdone processing to 16 entries at once

Instead of reporting an unlimited number of tx status reports to
mac80211 stop after 16 frames and reschedule the tx status tasklet.
This allows other tasklets to be run inbetween.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Limit rt2x00pci rxdone processing to 16 entries at once
Helmut Schaa [Mon, 28 Mar 2011 11:29:44 +0000 (13:29 +0200)]
rt2x00: Limit rt2x00pci rxdone processing to 16 entries at once

Instead of receiving an unlimited number of frames, stop after 16
entries and reschedule the rxdone tasklet. This allows other tasklets
to be run inbetween.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Remove unused/unneeded variables
Larry Finger [Sun, 27 Mar 2011 21:19:57 +0000 (16:19 -0500)]
rtlwifi: Remove unused/unneeded variables

Remove some unused variables and correct spelling errors.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: use IEEE80211_HT_CAP_ macros for 11n cap_info
Marc Yang [Sat, 26 Mar 2011 02:47:02 +0000 (19:47 -0700)]
mwifiex: use IEEE80211_HT_CAP_ macros for 11n cap_info

The hw_dot_11n_dev_cap reported by firmware hw_spec
has different format than the 11n capabilities.
Hence a lot of SET_ and RESET_ bit operation macros
were used to convert the dev_cap format to 11n
capability format. However the locally defined 11n
ht_cap macros are not necessary as we can use
IEEE80211_HT_CAP_ macros directly.

The 32-bit dev_cap bitmap is added as comment to
explain the mapping between firmware and 11n spec.

Some unused macros and unnecessary adapter variables
are also removed.

Signed-off-by: Marc Yang <yangyang@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 agomwifiex: remove macro SHORT_SLOT_TIME_DISABLED
Bing Zhao [Sat, 26 Mar 2011 02:47:01 +0000 (19:47 -0700)]
mwifiex: remove macro SHORT_SLOT_TIME_DISABLED

and SHORT_SLOT_TIME_ENABLED.
Use WLAN_CAPABILITY_SHORT_SLOT_TIME instead.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: remove the dependency on crypto_blkcipher
Felix Fietkau [Fri, 25 Mar 2011 20:39:19 +0000 (21:39 +0100)]
mac80211: remove the dependency on crypto_blkcipher

The only thing that using crypto_blkcipher with ecb does over just using
arc4 directly is wrapping the encrypt/decrypt function into a for loop,
looping over each individual character.
To be able to do this, it pulls in around 40 kb worth of unnecessary
kernel modules (at least on a MIPS embedded device).
Using arc4 directly not only eliminates those dependencies, it also makes
the code smaller.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove unnecessary _set_auth functions
Marc Yang [Fri, 25 Mar 2011 03:49:39 +0000 (20:49 -0700)]
mwifiex: remove unnecessary _set_auth functions

mwifiex_set_encrypt_mode()
mwifiex_set_auth_mode()
mwifiex_set_auth()
These functions are confusing and misleading.
And they are really not needed at all.

Some unused definitions are also removed.

Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove helper functions for displaying 11n capabilities
Yogesh Ashok Powar [Fri, 25 Mar 2011 03:49:38 +0000 (20:49 -0700)]
mwifiex: remove helper functions for displaying 11n capabilities

'iw list' is sufficient to retrieve the information which
was displayed by these functions.

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 agomac80211: fix suppressing probe responses in ad-hoc mode
Felix Fietkau [Thu, 24 Mar 2011 18:46:18 +0000 (19:46 +0100)]
mac80211: fix suppressing probe responses in ad-hoc mode

The commit "mac80211: reply to directed probes in IBSS" changed ad-hoc
specific code to respond to unicast probe requests, even if
drv_tx_last_beacon returns false, however due to confusion over the
meaning of the IEEE80211_RX_RA_MATCH flag, it also unconditionally
enabled responding to multicast probe requests.
Fix this by explicitly checking for a multicast destination address
instead.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: remove ath9k_get_channel_edges
Mohammed Shafi Shajakhan [Thu, 24 Mar 2011 13:36:40 +0000 (19:06 +0530)]
ath9k_hw: remove ath9k_get_channel_edges

This function is nowhere used.

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove set11n_virtualmorefrag
Mohammed Shafi Shajakhan [Thu, 24 Mar 2011 10:19:54 +0000 (15:49 +0530)]
ath9k: remove set11n_virtualmorefrag

This does not seems to be used anywhere so remove it.

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: cleanup few redundant macros
Mohammed Shafi Shajakhan [Thu, 24 Mar 2011 09:06:16 +0000 (14:36 +0530)]
ath9k: cleanup few redundant macros

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowifi: Add hwflags to debugfs.
Ben Greear [Wed, 23 Mar 2011 21:04:31 +0000 (14:04 -0700)]
wifi: Add hwflags to debugfs.

Aids debugging wifi behaviour.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: MAINTAINERS
Stanislaw Gruszka [Fri, 25 Mar 2011 16:59:39 +0000 (17:59 +0100)]
iwlegacy: MAINTAINERS

Add iwlegacy driver to MAINTAINERS.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.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, 4 Apr 2011 20:10:36 +0000 (16:10 -0400)]
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/padovan/blueto...
Gustavo F. Padovan [Thu, 31 Mar 2011 19:26:01 +0000 (16:26 -0300)]
Merge branch 'master' of git://git./linux/kernel/git/padovan/bluetooth-2.6

13 years agoBluetooth: Fix warning with hci_cmd_timer
Thomas Gleixner [Thu, 24 Mar 2011 19:16:42 +0000 (20:16 +0100)]
Bluetooth: Fix warning with hci_cmd_timer

After we made debugobjects working again, we got the following:

WARNING: at lib/debugobjects.c:262 debug_print_object+0x8e/0xb0()
Hardware name: System Product Name
ODEBUG: free active (active state 0) object type: timer_list hint: hci_cmd_timer+0x0/0x60
Pid: 2125, comm: dmsetup Tainted: G        W   2.6.38-06707-gc62b389 #110375
Call Trace:
 [<ffffffff8104700a>] warn_slowpath_common+0x7a/0xb0
 [<ffffffff810470b6>] warn_slowpath_fmt+0x46/0x50
 [<ffffffff812d3a5e>] debug_print_object+0x8e/0xb0
 [<ffffffff81bd8810>] ? hci_cmd_timer+0x0/0x60
 [<ffffffff812d4685>] debug_check_no_obj_freed+0x125/0x230
 [<ffffffff810f1063>] ? check_object+0xb3/0x2b0
 [<ffffffff810f3630>] kfree+0x150/0x190
 [<ffffffff81be4d06>] ? bt_host_release+0x16/0x20
 [<ffffffff81be4d06>] bt_host_release+0x16/0x20
 [<ffffffff813a1907>] device_release+0x27/0xa0
 [<ffffffff812c519c>] kobject_release+0x4c/0xa0
 [<ffffffff812c5150>] ? kobject_release+0x0/0xa0
 [<ffffffff812c61f6>] kref_put+0x36/0x70
 [<ffffffff812c4d37>] kobject_put+0x27/0x60
 [<ffffffff813a21f7>] put_device+0x17/0x20
 [<ffffffff81bda4f9>] hci_free_dev+0x29/0x30
 [<ffffffff81928be6>] vhci_release+0x36/0x70
 [<ffffffff810fb366>] fput+0xd6/0x1f0
 [<ffffffff810f8fe6>] filp_close+0x66/0x90
 [<ffffffff810f90a9>] sys_close+0x99/0xf0
 [<ffffffff81d4c96b>] system_call_fastpath+0x16/0x1b

That timer was introduced with commit 6bd32326cda(Bluetooth: Use
proper timer for hci command timout)

Timer seems to be running when the thing is closed. Removing the timer
unconditionally fixes the problem. And yes, it needs to be fixed
before the HCI_UP check.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: delete hanging L2CAP channel
Andrei Emeltchenko [Thu, 24 Mar 2011 15:16:08 +0000 (17:16 +0200)]
Bluetooth: delete hanging L2CAP channel

Sometimes L2CAP connection remains hanging. Make sure that
L2CAP channel is deleted.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix missing hci_dev_lock_bh in user_confirm_reply
Johan Hedberg [Wed, 16 Mar 2011 12:29:34 +0000 (14:29 +0200)]
Bluetooth: Fix missing hci_dev_lock_bh in user_confirm_reply

The code was correctly calling _unlock at the end of the function but
there was no actual _lock call anywhere.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix sending LE data over USB
Vinicius Costa Gomes [Mon, 14 Mar 2011 21:20:33 +0000 (18:20 -0300)]
Bluetooth: Fix sending LE data over USB

Now that we have support for LE connections, before discarding a
frame we must check if there's a LE connection over that transport.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Acked-by: Ville Tervo <ville.tervo@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix HCI_RESET command synchronization
Gustavo F. Padovan [Wed, 16 Mar 2011 18:36:29 +0000 (15:36 -0300)]
Bluetooth: Fix HCI_RESET command synchronization

We can't send new commands before a cmd_complete for the HCI_RESET command
shows up.

Reported-by: Mikko Vinni <mmvinni@yahoo.com>
Reported-by: Justin P. Mattock <justinmattock@gmail.com>
Reported-by: Ed Tomlinson <edt@aei.ca>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Tested-by: Justin P. Mattock <justinmattock@gmail.com>
Tested-by: Mikko Vinni <mmvinni@yahoo.com>
Tested-by: Ed Tomlinson <edt@aei.ca>
13 years agoBluetooth: Increment unacked_frames count only the first transmit
Suraj Sumangala [Wed, 9 Mar 2011 09:14:05 +0000 (14:44 +0530)]
Bluetooth: Increment unacked_frames count only the first transmit

This patch lets 'l2cap_pinfo.unacked_frames' be incremented only
the first time a frame is transmitted.

Previously it was being incremented for retransmitted packets
too resulting the value to cross the transmit window size.

Signed-off-by: Suraj Sumangala <suraj@atheros.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: add support for Apple MacBook Pro 8,2
Marc-Antoine Perennou [Thu, 24 Mar 2011 17:51:21 +0000 (14:51 -0300)]
Bluetooth: add support for Apple MacBook Pro 8,2

Just adding the vendor details makes it work fine.

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add local Extended Inquiry Response (EIR) support
Johan Hedberg [Mon, 28 Mar 2011 11:07:23 +0000 (14:07 +0300)]
Bluetooth: Add local Extended Inquiry Response (EIR) support

This patch adds automated creation of the local EIR data based on what
16-bit UUIDs are registered and what the device name is. This should
cover the majority use cases, however things like 32/128-bit UUIDs, TX
power and Device ID will need to be added later to be on par with what
bluetoothd is capable of doing (without the Management interface).

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: check L2CAP info_rsp ident and state
Andrei Emeltchenko [Fri, 25 Mar 2011 09:31:41 +0000 (11:31 +0200)]
Bluetooth: check L2CAP info_rsp ident and state

Information requests/responses are unbound to L2CAP channel. Patch
fixes issue arising when two devices connects at the same time to
each other. This way we do not process out of the context messages.
We are safe dropping info_rsp since info_timer is left running.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Move bt_accept_enqueue() to outside __l2cap_chan_add
Gustavo F. Padovan [Fri, 25 Mar 2011 03:39:48 +0000 (00:39 -0300)]
Bluetooth: Move bt_accept_enqueue() to outside __l2cap_chan_add

bt_accept_enqueue() is not really a channel action, so do it outside.
This patch is part of a set of patches to create an struct l2cap_chan to
have a clear separation between the struct sock and the L2CAP channel
stuff.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Remove unused struct l2cap_conn item
Gustavo F. Padovan [Thu, 24 Mar 2011 23:14:16 +0000 (20:14 -0300)]
Bluetooth: Remove unused struct l2cap_conn item

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Enable support for out of band association model
Szymon Janc [Tue, 22 Mar 2011 12:12:23 +0000 (13:12 +0100)]
Bluetooth: Enable support for out of band association model

If remote side reports oob availability or we are pairing initiator
use oob data for pairing if available.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add add/remove_remote_oob_data management commands
Szymon Janc [Tue, 22 Mar 2011 12:12:22 +0000 (13:12 +0100)]
Bluetooth: Add add/remove_remote_oob_data management commands

This patch adds commands to add and remove remote OOB data to the managment
interface. Remote data is stored in kernel and can be used by corresponding
HCI commands and events when needed.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add read_local_oob_data management command
Szymon Janc [Tue, 22 Mar 2011 12:12:21 +0000 (13:12 +0100)]
Bluetooth: Add read_local_oob_data management command

This patch adds a command to read local OOB data to the managment interface.
The command maps directly to the Read Local OOB Data HCI command.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Allow for NULL data in mgmt_pending_add
Szymon Janc [Tue, 22 Mar 2011 12:12:20 +0000 (13:12 +0100)]
Bluetooth: Allow for NULL data in mgmt_pending_add

Since index is in mgmt_hdr it is possible to have mgmt command with
no parameters that still needs to add itself to pending list.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Rename cmd to param in pending_cmd
Szymon Janc [Tue, 22 Mar 2011 12:12:19 +0000 (13:12 +0100)]
Bluetooth: Rename cmd to param in pending_cmd

This field holds not whole command but only command specific
parameters.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix checkpatch error in cmtp.h
Szymon Janc [Mon, 21 Mar 2011 13:20:05 +0000 (14:20 +0100)]
Bluetooth: Fix checkpatch error in cmtp.h

Do not use C99 // comments.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
Szymon Janc [Mon, 21 Mar 2011 13:20:04 +0000 (14:20 +0100)]
Bluetooth: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>

As warned by checkpatch.pl, use #include <linux/uaccess.h> instead of
<asm/uaccess.h>

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Do not use assignments in IF conditions
Szymon Janc [Mon, 21 Mar 2011 13:20:03 +0000 (14:20 +0100)]
Bluetooth: Do not use assignments in IF conditions

Fix checkpatch warnings concerning assignments in if conditions.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix checkpatch errors, code style issues and typos in hidp
Szymon Janc [Mon, 21 Mar 2011 13:20:01 +0000 (14:20 +0100)]
Bluetooth: Fix checkpatch errors, code style issues and typos in hidp

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
Szymon Janc [Mon, 21 Mar 2011 13:19:59 +0000 (14:19 +0100)]
Bluetooth: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>

As warned by checkpatch.pl, use #include <linux/uaccess.h> instead of
<asm/uaccess.h>

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix checkpatch errors and some code style issues in bnep
Szymon Janc [Mon, 21 Mar 2011 13:19:58 +0000 (14:19 +0100)]
Bluetooth: Fix checkpatch errors and some code style issues in bnep

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Opencode macros in bnep/core.c
Szymon Janc [Mon, 21 Mar 2011 13:19:57 +0000 (14:19 +0100)]
Bluetooth: Opencode macros in bnep/core.c

BNEP_RX_TYPES and INCA macros have only one user each and don't provide
any benefits compared to opencoding them.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Improve error message on wrong link type
Gustavo F. Padovan [Wed, 23 Mar 2011 17:38:32 +0000 (14:38 -0300)]
Bluetooth: Improve error message on wrong link type

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Remove unused struct item
Gustavo F. Padovan [Tue, 22 Mar 2011 21:06:49 +0000 (18:06 -0300)]
Bluetooth: Remove unused struct item

num in struct l2cap_chan_list isn't used anywhere.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: mgmt: Add support for setting the local name
Johan Hedberg [Wed, 16 Mar 2011 12:29:37 +0000 (14:29 +0200)]
Bluetooth: mgmt: Add support for setting the local name

This patch adds a new set_local_name management command as well as a
local_name_changed management event. With these user space can both
change the local name as well as monitor changes to it by others.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: mgmt: Add local name information to read_info reply
Johan Hedberg [Wed, 16 Mar 2011 12:29:36 +0000 (14:29 +0200)]
Bluetooth: mgmt: Add local name information to read_info reply

This patch adds the name of the adapter to the reply of the read_info
management command.

The management messages reserve 249 bytes for the name instead of 248
(like in the HCI spec) so that there is always a guarantee that it is
nul-terminated. That way it can safely be passed onto string
manipulation functions.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add define for the maximum name length on HCI level
Johan Hedberg [Wed, 16 Mar 2011 12:29:35 +0000 (14:29 +0200)]
Bluetooth: Add define for the maximum name length on HCI level

This patch adds a clear define for the maximum device name length in HCI
messages and thereby avoids magic numbers in the code.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: remove unnecessary function declaration
Gustavo F. Padovan [Thu, 17 Mar 2011 00:06:52 +0000 (21:06 -0300)]
Bluetooth: remove unnecessary function declaration

hci_notify() doesn't need declaration first.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoath9k_hw: remove pCap->tx_triglevel_max
Felix Fietkau [Wed, 23 Mar 2011 19:57:33 +0000 (20:57 +0100)]
ath9k_hw: remove pCap->tx_triglevel_max

It has the same purpose (and value) as ah->config.max_txtrig_level

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: remove ATH9K_HW_CAP_ENHANCEDPM
Felix Fietkau [Wed, 23 Mar 2011 19:57:32 +0000 (20:57 +0100)]
ath9k_hw: remove ATH9K_HW_CAP_ENHANCEDPM

It is not used anywhere

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: remove pCap->keycache_size
Felix Fietkau [Wed, 23 Mar 2011 19:57:31 +0000 (20:57 +0100)]
ath9k_hw: remove pCap->keycache_size

Similar to the number of tx queue, the number of keycache entries depends
on the chip and shouldn't be messed with based on EEPROM data.
Remove this field and stick to using AR_KEYTABLE_SIZE

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: remove pCap->reg_cap
Felix Fietkau [Wed, 23 Mar 2011 19:57:30 +0000 (20:57 +0100)]
ath9k_hw: remove pCap->reg_cap

It is not used anywhere and seems pointless

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: remove ah->config.ht_enable
Felix Fietkau [Wed, 23 Mar 2011 19:57:29 +0000 (20:57 +0100)]
ath9k_hw: remove ah->config.ht_enable

It is only used in one place, and the device id check that it's based on
can be moved there as well.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: remove pCap->total_queues
Felix Fietkau [Wed, 23 Mar 2011 19:57:28 +0000 (20:57 +0100)]
ath9k_hw: remove pCap->total_queues

The EEPROM contains a field that can restrict the number of hardware queues,
however this is not only useless (all the known chips contain the same
number of hardware queues), but also potentially dangerous in case of a
misprogrammed EEPROM (could trigger driver crashes), so let's just ignore
it completely.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: turn a few big macros into functions
Felix Fietkau [Wed, 23 Mar 2011 19:57:27 +0000 (20:57 +0100)]
ath9k_hw: turn a few big macros into functions

RF_BANK_SETUP, REG_WRITE_RF_ARRAY and REG_WRITE_ARRAY are way too big,
so they shouldn't be inlined at every single callsite, especially since they
can easily be turned into real functions.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: replace REG_READ+REG_WRITE with REG_RMW
Felix Fietkau [Wed, 23 Mar 2011 19:57:26 +0000 (20:57 +0100)]
ath9k_hw: replace REG_READ+REG_WRITE with REG_RMW

It's easier to read and it slightly decreases code size

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: add a new register op for read-mask-write
Felix Fietkau [Wed, 23 Mar 2011 19:57:25 +0000 (20:57 +0100)]
ath9k_hw: add a new register op for read-mask-write

Reduces the number of calls to register ops. On MIPS this reduces the
ath9k_hw binary size from 321k down to 310k

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: embed the ath_ops callbacks in the ath_hw struct
Felix Fietkau [Wed, 23 Mar 2011 19:57:24 +0000 (20:57 +0100)]
ath9k_hw: embed the ath_ops callbacks in the ath_hw struct

With this change, loading the address to a register read/write function
costs only one pointer dereference instead of two. On MIPS this reduces
ath9k_hw binary size from 326k down to 321k.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: Add nl80211 event for deletion of a station entry
Jouni Malinen [Wed, 23 Mar 2011 13:29:52 +0000 (15:29 +0200)]
cfg80211: Add nl80211 event for deletion of a station entry

Indicate an NL80211_CMD_DEL_STATION event when a station entry in
mac80211 is deleted to match with the NL80211_CMD_NEW_STATION event
that is used when the entry was added. This is needed, e.g., to allow
user space to remove a peer from RSN IBSS Authenticator state machine
to avoid re-authentication and re-keying delays when the peer is not
reachable anymore.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>