Johan Hedberg [Mon, 13 Dec 2010 19:07:06 +0000 (21:07 +0200)]
Bluetooth: Add read_info management command
This patch implements the read_info command which is used to fetch basic
info about an adapter.
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Johan Hedberg [Mon, 13 Dec 2010 19:07:05 +0000 (21:07 +0200)]
Bluetooth: Add read_index_list management command
This patch implements the read_index_list command through which
userspace can get a list of current adapter indices.
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Johan Hedberg [Mon, 13 Dec 2010 19:07:04 +0000 (21:07 +0200)]
Bluetooth: Add read_version management command
This patch implements the initial read_version command that userspace
will use before any other management interface operations.
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Johan Hedberg [Mon, 13 Dec 2010 19:07:03 +0000 (21:07 +0200)]
Bluetooth: Add error handling for managment command handlers
The command handlers for bluetooth management messaging should be able
to report errors (such as memory allocation failures) to the higher
levels in the call stack.
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Johan Hedberg [Tue, 7 Dec 2010 22:21:07 +0000 (00:21 +0200)]
Bluetooth: Make hci_send_to_sock usable for management control sockets
In order to send data to management control sockets the function should:
- skip checks intended for raw HCI data and stack internal events
- make sure RAW HCI data or stack internal events don't go to
management control sockets
In order to accomplish this the patch adds a new member to the bluetooth
skb private data to flag skb's that are destined for management control
sockets.
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Johan Hedberg [Tue, 7 Dec 2010 22:21:06 +0000 (00:21 +0200)]
Bluetooth: Add initial Bluetooth Management interface callbacks
Add initial code for handling Bluetooth Management interface messages.
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Acked-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Johan Hedberg [Tue, 7 Dec 2010 22:21:05 +0000 (00:21 +0200)]
Bluetooth: Add Bluetooth Management interface definitions
Add initial definitions for the new Bluetooth Management interface to
the bluetooth headers.
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Tracey Dent [Sun, 21 Nov 2010 15:03:12 +0000 (15:03 +0000)]
Net: bluetooth: Makefile: Remove deprecated kbuild goal definitions
Changed Makefile to use <modules>-y instead of <modules>-objs
because -objs is deprecated and not mentioned in
Documentation/kbuild/makefiles.txt.
Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Gustavo F. Padovan [Mon, 14 Jun 2010 05:26:15 +0000 (02:26 -0300)]
Bluetooth: Don't accept ConfigReq if we aren't in the BT_CONFIG state
If such event happens we shall reply with a Command Reject, because we are
not expecting any configure request.
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
John W. Linville [Thu, 2 Dec 2010 20:46:37 +0000 (15:46 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6
Conflicts:
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
Felix Fietkau [Thu, 2 Dec 2010 09:27:21 +0000 (10:27 +0100)]
ath5k: Fix reset and interrupts for AHB type of devices.
On WiSoc we cannot access mac register before it is resetted.
It will crash hardware otherwise.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Thu, 2 Dec 2010 09:27:16 +0000 (10:27 +0100)]
ath5k: Add AHB bus support.
AHB specific functions are now in ahb.c file. AHB bus is
compiled in when CONFIG_ATHEROS_AR231X is set in kernel.
All other platforms will use PCI bus.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Thu, 2 Dec 2010 09:27:11 +0000 (10:27 +0100)]
ath5k: Add initial registers values for radio RF2317 chip.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Thu, 2 Dec 2010 09:27:06 +0000 (10:27 +0100)]
ath5k: Add a function to read chipset's MAC revision
Add bus dependent revision read function which is used to
determine chipset's MAC before hardware is initialized.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Thu, 2 Dec 2010 09:27:06 +0000 (10:27 +0100)]
ath5k: Check if pci pdev struct is initialized in common functions.
To be able to support other busses than PCI check if pci device
structure is initialized.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Thu, 2 Dec 2010 09:27:01 +0000 (10:27 +0100)]
ath5k: Use generic eeprom read from common ath_bus_opts struct.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Thu, 2 Dec 2010 09:27:01 +0000 (10:27 +0100)]
ath5k: Move PCI bus functions to separate file.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Thu, 2 Dec 2010 09:26:56 +0000 (10:26 +0100)]
ath5k: Introduce ath5k_init_softc function as in ath9k
Split pci initialization into hardware specific
functions and softc structure initialization.
Make function naming similar to ones ath9k.
Introduce ath_bus_opts in ath5k for later
AHB bus integration.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Thu, 2 Dec 2010 09:26:51 +0000 (10:26 +0100)]
ath5k: Use Generic DMA for later support of AHB bus.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Thu, 2 Dec 2010 20:17:46 +0000 (15:17 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/padovan/bluetooth-next-2.6
Andy Shevchenko [Thu, 2 Dec 2010 12:45:07 +0000 (14:45 +0200)]
wireless: ray_cs: use '%pm' format option to print MAC
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bruno Randolf [Thu, 2 Dec 2010 07:23:12 +0000 (16:23 +0900)]
cfg80211: Add documentation for antenna ops
The last patch with the same title was for mac80211 ops, accidentally.
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Dec 2010 08:43:35 +0000 (09:43 +0100)]
mac80211: publish SMPS docs
Create a new chapter about SMPS in the
driver API part of the mac80211 book and
populate it with the existing docs.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Dec 2010 08:43:34 +0000 (09:43 +0100)]
mac80211: document station handling
Add some existing documentation about station
handling to a new chapter about advanced APIs.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Dec 2010 08:43:33 +0000 (09:43 +0100)]
mac80211: publish interface iteration docs
Publish the documentation for the interface
iteration functions in the right section of
the book.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Dec 2010 08:43:32 +0000 (09:43 +0100)]
mac80211: document aggregation
Include the aggregation documentation in the
docbook, split up by public and internal docs.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Dec 2010 08:43:31 +0000 (09:43 +0100)]
mac80211: publish some rate control docs
Add an API chapter to the rate control part of
the mac80211 book and populate it with some
existing documentation.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Dec 2010 08:43:30 +0000 (09:43 +0100)]
mac80211: publish some misc docs
There isn't a clear TX documentation yet, so
put these into the misc section for now.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Dec 2010 08:43:29 +0000 (09:43 +0100)]
mac80211: publish docs for _ni functions
Put them along with their "regular" versions for
now, we should write more docs in the future.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Dec 2010 08:43:28 +0000 (09:43 +0100)]
mac80211: document workqueue
Create a new chapter for the mac80211 workqueue
that contains the documentation written for it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Dec 2010 08:43:27 +0000 (09:43 +0100)]
cfg80211: include CQM packet loss docs
Just include them in the list of functions,
there aren't any more detailed docs (yet).
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Wed, 1 Dec 2010 07:00:09 +0000 (12:30 +0530)]
ath9k_htc: Remove unused structures
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Joe Perches [Tue, 30 Nov 2010 21:42:08 +0000 (13:42 -0800)]
wireless: Remove unnecessary casts of usb_get_intfdata
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 30 Nov 2010 21:33:16 +0000 (22:33 +0100)]
b43: N-PHY: fix code path on PHY init
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 30 Nov 2010 21:33:15 +0000 (22:33 +0100)]
b43: N-PHY: use defines for RSSI types
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 30 Nov 2010 21:33:14 +0000 (22:33 +0100)]
b43: N-PHY: fix RSSI selection
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Joe Perches [Tue, 30 Nov 2010 20:19:11 +0000 (12:19 -0800)]
ath9k: hif_usb: Reduce indent 1 column
Invert test and return early.
Move variable declarations to local scope.
Don't initialize variables to 0 unnecessarily.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ben Greear [Mon, 29 Nov 2010 22:13:22 +0000 (14:13 -0800)]
ath9k: Move debugfs under ieee80211/[phyname]/ath9k/
This fixes debugfs problems when a phy is renamed,
and is able to remove a bit of code that is no longer
needed.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 28 Nov 2010 11:59:45 +0000 (12:59 +0100)]
b43: N-PHY: fix RSSI calibration
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 28 Nov 2010 11:59:44 +0000 (12:59 +0100)]
b43: N-PHY: initialize perical variable, add missing call to CCA reset
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 28 Nov 2010 11:59:43 +0000 (12:59 +0100)]
b43: N-PHY: implement very basic TX power control management
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 28 Nov 2010 11:59:42 +0000 (12:59 +0100)]
b43: N-PHY: swap values for radio registers 0x3b and 0x3c
Specs were updated plus we become wl compatible.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Sun, 28 Nov 2010 11:22:52 +0000 (12:22 +0100)]
ssb: Add sysfs attributes to ssb devices
Make it possible to read out the attributes, till now only show on
dmesg, through sysfs.
This patch was some time in OpenWrt.
Signed-off-by: Bernhard Loos <bernhardloos@googlemail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 28 Nov 2010 09:39:35 +0000 (10:39 +0100)]
ssb: extract indexes for power tables
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Thu, 2 Dec 2010 19:10:58 +0000 (14:10 -0500)]
Revert "ath9k: Fix STA disconnect issue due to received MIC failed bcast frames"
This reverts commit
916448e77f6bcaaa7f13c3de0c3851783ae2bfd0.
"As far as I can tell, either of these patches breaks multiple VIF
scenarios. I'm not sure exactly why, but I had to revert this to
get any of my interfaces to associate."
-- Ben Greear <greearb@candelatech.com>
http://marc.info/?l=linux-wireless&m=
129123368719339&w=2
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Wed, 1 Dec 2010 18:07:47 +0000 (19:07 +0100)]
ath9k_hw: fix more bitfield related endian issues
A few LNA control related flags were also specified as a bitfields, however
for some strange reason they were written in big-endian order this time.
Fix this by using flags instead.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Wed, 1 Dec 2010 18:07:46 +0000 (19:07 +0100)]
ath9k_hw: fix endian issues with CTLs on AR9003
Parsing data using bitfields is messy, because it makes endian handling
much harder. AR9002 and earlier got it right, AR9003 got it wrong.
This might lead to either using too high or too low tx power values,
depending on frequency and eeprom settings.
Fix it by getting rid of the CTL related bitfields entirely and use
masks instead.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Wed, 1 Dec 2010 07:24:09 +0000 (23:24 -0800)]
ath9k: Fix bug in reading input gpio state for ar9003
The register which gives input gpio state is 0x404c for ar9003,
currently 0x4048 is wrongly used. This will disable RF and make
it unusable on some of AR9003.
Cc:stable@kernel.org
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Thu, 2 Dec 2010 19:00:51 +0000 (14:00 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/padovan/bluetooth-2.6
Andrei Emeltchenko [Wed, 1 Dec 2010 14:58:26 +0000 (16:58 +0200)]
Bluetooth: clean up legal text
Remove extra spaces from legal text so that legal stuff looks
the same for all bluetooth code.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andrei Emeltchenko [Wed, 1 Dec 2010 14:58:25 +0000 (16:58 +0200)]
Bluetooth: clean up hci code
Do not use assignment in IF condition, remove extra spaces,
fixing typos, simplify code.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andrei Emeltchenko [Wed, 1 Dec 2010 14:58:24 +0000 (16:58 +0200)]
Bluetooth: clean up l2cap code
Do not initialize static vars to zero, macros with complex values
shall be enclosed with (), remove unneeded braces.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andrei Emeltchenko [Wed, 1 Dec 2010 14:58:23 +0000 (16:58 +0200)]
Bluetooth: clean up rfcomm code
Remove extra spaces, assignments in if statement, zeroing static
variables, extra braces. Fix includes.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andrei Emeltchenko [Wed, 1 Dec 2010 14:58:22 +0000 (16:58 +0200)]
Bluetooth: clean up sco code
Do not use assignments in IF condition, remove extra spaces
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Anderson Lizardo [Mon, 29 Nov 2010 16:15:50 +0000 (12:15 -0400)]
Bluetooth: Fix error handling for l2cap_init()
create_singlethread_workqueue() may fail with errors such as -ENOMEM. If
this happens, the return value is not set to a negative value and the
module load will succeed. It will then crash on module unload because of
a destroy_workqueue() call on a NULL pointer.
Additionally, the _busy_wq workqueue is not being destroyed if any
errors happen on l2cap_init().
Signed-off-by: Anderson Lizardo <anderson.lizardo@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo F. Padovan [Mon, 1 Nov 2010 18:43:53 +0000 (18:43 +0000)]
Bluetooth: Get rid of __rfcomm_get_sock_by_channel()
rfcomm_get_sock_by_channel() was the only user of this function, so I merged
both into rfcomm_get_sock_by_channel(). The socket lock now should be hold
outside of rfcomm_get_sock_by_channel() once we hold and release it inside the
same function now.
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo F. Padovan [Mon, 1 Nov 2010 18:43:53 +0000 (18:43 +0000)]
Bluetooth: Get rid of __l2cap_get_sock_by_psm()
l2cap_get_sock_by_psm() was the only user of this function, so I merged
both into l2cap_get_sock_by_psm(). The socket lock now should be hold
outside of l2cap_get_sock_by_psm() once we hold and release it inside the
same function now.
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andrei Emeltchenko [Mon, 22 Nov 2010 11:21:37 +0000 (13:21 +0200)]
Bluetooth: do not use assignment in if condition
Fix checkpatch errors like:
"ERROR: do not use assignment in if condition"
Simplify code and fix one long line.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Acked-by: Ville Tervo <ville.tervo@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andrei Emeltchenko [Wed, 3 Nov 2010 10:32:45 +0000 (12:32 +0200)]
Bluetooth: timer check sk is not owned before freeing
In timer context we might delete l2cap channel used by krfcommd.
The check makes sure that sk is not owned. If sk is owned we
restart timer for HZ/5.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andrei Emeltchenko [Wed, 3 Nov 2010 10:32:44 +0000 (12:32 +0200)]
Bluetooth: Check sk is not owned before freeing l2cap_conn
Check that socket sk is not locked in user process before removing
l2cap connection handler.
lock_sock and release_sock do not hold a normal spinlock directly but
instead hold the owner field. This means bh_lock_sock can still execute
even if the socket is "locked". More info can be found here:
http://www.linuxfoundation.org/collaborate/workgroups/networking/socketlocks
krfcommd kernel thread may be preempted with l2cap tasklet which remove
l2cap_conn structure. If krfcommd is in process of sending of RFCOMM reply
(like "RFCOMM UA" reply to "RFCOMM DISC") then kernel crash happens.
...
[ 694.175933] Unable to handle kernel NULL pointer dereference at virtual address
00000000
[ 694.184936] pgd =
c0004000
[ 694.187683] [
00000000] *pgd=
00000000
[ 694.191711] Internal error: Oops: 5 [#1] PREEMPT
[ 694.196350] last sysfs file: /sys/devices/platform/hci_h4p/firmware/hci_h4p/loading
[ 694.260375] CPU: 0 Not tainted (2.6.32.10 #1)
[ 694.265106] PC is at l2cap_sock_sendmsg+0x43c/0x73c [l2cap]
[ 694.270721] LR is at 0xd7017303
...
[ 694.525085] Backtrace:
[ 694.527587] [<
bf266be0>] (l2cap_sock_sendmsg+0x0/0x73c [l2cap]) from [<
c02f2cc8>] (sock_sendmsg+0xb8/0xd8)
[ 694.537292] [<
c02f2c10>] (sock_sendmsg+0x0/0xd8) from [<
c02f3044>] (kernel_sendmsg+0x48/0x80)
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vasiliy Kulikov [Sat, 30 Oct 2010 14:26:31 +0000 (18:26 +0400)]
Bluetooth: hidp: fix information leak to userland
Structure hidp_conninfo is copied to userland with version, product,
vendor and name fields unitialized if both session->input and session->hid
are NULL. It leads to leaking of contents of kernel stack memory.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vasiliy Kulikov [Sat, 30 Oct 2010 14:26:26 +0000 (18:26 +0400)]
Bluetooth: cmtp: fix information leak to userland
Structure cmtp_conninfo is copied to userland with some padding fields
unitialized. It leads to leaking of contents of kernel stack memory.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vasiliy Kulikov [Sat, 30 Oct 2010 14:26:21 +0000 (18:26 +0400)]
Bluetooth: bnep: fix information leak to userland
Structure bnep_conninfo is copied to userland with the field "device"
that has the last elements unitialized. It leads to leaking of
contents of kernel stack memory.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Johan Hedberg [Thu, 18 Nov 2010 20:22:29 +0000 (22:22 +0200)]
Bluetooth: Automate remote name requests
In Bluetooth there are no automatic updates of remote device names when
they get changed on the remote side. Instead, it is a good idea to do a
manual name request when a new connection gets created (for whatever
reason) since at this point it is very cheap (no costly baseband
connection creation needed just for the sake of the name request).
So far userspace has been responsible for this extra name request but
tighter control is needed in order not to flood Bluetooth controllers
with two many commands during connection creation. It has been shown
that some controllers simply fail to function correctly if they get too
many (almost) simultaneous commands during connection creation. The
simplest way to acheive better control of these commands is to move
their sending completely to the kernel side.
This patch inserts name requests into the sequence of events that the
kernel performs during connection creation. It does this after the
remote features have been successfully requested and before any pending
authentication requests are performed. The code will work sub-optimally
with userspace versions that still do the name requesting themselves (it
shouldn't break anything though) so it is recommended to combine this
with a userspace software version that doesn't have automated name
requests.
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Johan Hedberg [Thu, 18 Nov 2010 20:22:28 +0000 (22:22 +0200)]
Bluetooth: Create a unified authentication request function
This patch adds a single function that's responsible for requesting
authentication for outgoing connections. This is preparation for the
next patch which will add automated name requests and thereby move the
authentication requests to a different location.
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Johan Hedberg [Wed, 10 Nov 2010 15:11:51 +0000 (17:11 +0200)]
Bluetooth: Simplify remote features callback function logic
The current remote and remote extended features event callbacks logic
can be made simpler by using a label and goto statements instead of the
current multiple levels of nested if statements.
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo F. Padovan [Wed, 1 Dec 2010 23:04:09 +0000 (21:04 -0200)]
Merge git://git./linux/kernel/git/padovan/bluetooth-2.6 into test
Bala Shanmugam [Fri, 26 Nov 2010 12:05:46 +0000 (17:35 +0530)]
Bluetooth: Add new PID for Atheros 3011
Atheros 3011 has small sflash firmware and needs to be
blacklisted in transport driver to load actual firmware
in DFU driver.
Signed-off-by: Bala Shanmugam <sbalashanmugam@atheros.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Stefan Seyfried [Tue, 30 Nov 2010 20:49:08 +0000 (21:49 +0100)]
Bluetooth: Fix log spamming in btusb due to autosuspend
If a device is autosuspended an inability to resubmit URBs is
to be expected. Check the error code and only log real errors.
(Now that autosuspend is default enabled for btusb, those log
messages were happening all the time e.g. with a BT mouse)
Signed-off-by: Stefan Seyfried <seife+kernel@b1-systems.com>
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Stanislaw Gruszka [Tue, 30 Nov 2010 14:33:40 +0000 (15:33 +0100)]
iwlagn: fix microcode error on 4965
Commit
dbbf1755b09eef8ff6dd21c8dafe1606f051ce12 "iwlwifi: use
antenna information in EEPROM" caused 4965 device breakage with
"Microcode SW error detected. Restarting 0x82000000." message.
This patch reverts 4965 part of that commit.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Tue, 30 Nov 2010 11:19:34 +0000 (12:19 +0100)]
mac80211: Minor optimization in ieee80211_rx_h_data
Remove a superfluous ieee80211_is_data check as that was checked a few
lines before already and we wont't get here for non-data frames at all.
Second, the frame was already converted to 802.3 header format and
reading the fc and addr1 fields was only possible because the 802.3
header is short enough and didn't overwrite the relevant parts of the
802.11 header. Make the code more obvious by checking the ethernet
header's h_dest field.
Furthermore reorder the conditions to reduce the number of checks
when dynamic powersave is not needed (AP mode for example).
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Stezenbach [Tue, 30 Nov 2010 15:49:23 +0000 (16:49 +0100)]
mac80211/rt2x00: add ieee80211_tx_status_ni()
All rt2x00 drivers except rt2800pci call ieee80211_tx_status() from
a workqueue, which causes "NOHZ: local_softirq_pending 08" messages.
To fix it, add ieee80211_tx_status_ni() similar to ieee80211_rx_ni()
which can be called from process context, and call it from
rt2x00lib_txdone(). For the rt2800pci special case a driver
flag is introduced.
Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:53:28 +0000 (21:53 +0200)]
ath5k: Set turbo bit on rf bank 2
* A diff between rfbuffer settings of turbo and non-turbo
modes indicates there is a bit on bank 2 related to turbo operation
(it's set on turbo modes). This bit is present on all radios except
RF5413 that seems to have a completely different bank 2. Also
since 2317 has the same rf-registers locations with 2425 and
since the bit exists on 2317 I assume it also exists on 2425/2417).
So in case we use turbo mode (40MHz) enable it on bank modification.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:51:38 +0000 (21:51 +0200)]
ath5k: Clean up turbo mode initvals/rfregs
* Clean up what's left of turbo mode, since we handle all
register modifications (rfbuffer comes next) on code there
is no need to have duplicated arrays.
* Rename change_channel to skip_pcu on initvals.c as we did
on reset.c
Signed-off-by: Nick Kossifidis <micklfemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:49:53 +0000 (21:49 +0200)]
ath5k: Cleanup turbo channel flags
* Clean up CHANNEL_T(URBO), use AR5K_BWMODE_40MHZ instead
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:48:32 +0000 (21:48 +0200)]
ath5k: Use correct clock when setting ofdm timings
* Use correct clock value when setting OFDM timings on
non-default bwmodes.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:45:21 +0000 (21:45 +0200)]
ath5k: Skip tx power setting on AR5210 for now
* Don't return -EINVAL when trying to set tx power
on RF5110 because AR5210 reset will fail. We need to
add support for RF5110 and AR5210 eeprom in the future
but for now just skip it.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:44:02 +0000 (21:44 +0200)]
ath5k: Tweak phy activate to rx start delay based on bwmode
* Tweak phy activation -> rx delay for different bwmodes
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:42:22 +0000 (21:42 +0200)]
ath5k: No need to save/restore staid flags on reset
* Since we set antenna flags on phy init and ack bitrate
mode on pcu init, there is no need to save/restore sta_id
flags on ath5k_hw_reset. Also we don't need to re-set our
mac address because it's not affected by resets.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:39:28 +0000 (21:39 +0200)]
ath5k: Support synth-only channel change for AR2413/AR5413
* Add synth-only channel change for AR2413/5413. When we call
ath5k_reset with a channel ath5k_hw_reset will first try to
set channel on PHY while PHY is running instead of doing a normal
full reset. To do this phy_init has to change to implement this
functionality.
* Clean up change_channel flag, what it really did was skip PCU
registers when setting initvals. This is done because on reset
PCU registers are not affected (except the registers we set
in pcu init and -due to hw problems- TSF). Use a new skip_pcu
flag that's not misleading instead. In the future we might use
that to also skip PCU reset and save us the TSF etc problems
(needs testing because standard practice is to reset everything).
* Use fast channel change only when setting channel, and set skip_pcu
to false only on init. When we reset the card due to DMA or PHY
problems skip pcu but never do a fast channel change.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:37:30 +0000 (21:37 +0200)]
ath5k: Skip powertable setting when we are on the same channel
* Only set power table if we are changing channel/mode
there is no need to recalculate and reset the power table
all the time.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:33:22 +0000 (21:33 +0200)]
ath5k: Update PLL programming for turbo/half/quarter
* Set correct PLL settings for each bwmode
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:28:15 +0000 (21:28 +0200)]
ath5k: Update spur mitigation filter for turbo/half/quarter
* Add spur mitigation filter support for half/quarter and turbo.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:26:13 +0000 (21:26 +0200)]
ath5k: Tweak power detector delays on RF5111/RF5112
* Tweak power detector delays on AR5111/AR5112 when
using half/quarter modes.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:24:54 +0000 (21:24 +0200)]
ath5k: Always set IFS intervals on reset
* Make sure we always set IFS timings even if no
coverage class is set. If we don't we'll miss the
needed changes for different bwmodes.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:21:50 +0000 (21:21 +0200)]
ath5k: Use turbo flag on DCU
* Set AR5K_DCU_GBL_IFS_MISC_TURBO_MODE flag on DCU when operating
on 40MHz
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:19:45 +0000 (21:19 +0200)]
ath5k: Set all IFS intervals, not just slot time
* Replace set_slot_time with set_ifs_intervals that also sets
the various inter-frame space intervals based on current bwmode.
* Clean up AR5210 mess from reset_tx_queue, AR5210 only has one
data queue and we set IFS intervals for that queue on set_ifs_intervals
so there is nothing left to do for 5210 on reset_tx_queue.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:12:23 +0000 (21:12 +0200)]
ath5k: Extend rate_duration
* Extend ieee80211_generic_frame_duration to support the various
bwmodes.
* Better document what's going on with ack bitrates and update
write_rate_duration to support the standard ack bitrates (when
we don't set the high bit).
* Get rid of set_ack_bitrate_high and introduce a flag on ath5k_hw
for this (we only called the function on init anyway so there is no
difference).
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:09:11 +0000 (21:09 +0200)]
ath5k: Extend get_default_sifs/slot_time
* Extend get_default_sifs/slot_time to include timings for turbo
half and quarter rate modes.
* AR5210 code for now uses timings already on core clock units
instead of usecs so rename them (we 'll clean it up later).
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:07:04 +0000 (21:07 +0200)]
ath5k: Move tx retries setting outside reset_tx_queue
* Move setting of tx retry limits on a separate function
(we 'll clean up this AR5210 mess later)
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:04:43 +0000 (21:04 +0200)]
ath5k: Increase PHY settling parameters for turo mode
* On turbo mode increase PHY settling times, note that
we only increase switch settling time on AR5212 as indicated
by initvals.
* A few cleanups: Move frame control settings for AR5210 from
reset_tx_queue to tweak_initvals and remove phy_scal settings
from tweak_initvals (we tweak them alread on set_sleep_clock).
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:02:20 +0000 (21:02 +0200)]
ath5k: Small cleanup on tweak_initvals
* Now that we properly set rx/tx latencies for AR5311 remove
that old buggy part of code left inside ath5k_hw_tweak_initval_settings
that was never executed (you can't have an RF5112 radio on a mac older
than AR5212). Also use a magic value for 5311 PHY_SCAL value.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 19:00:37 +0000 (21:00 +0200)]
ath5k: Put core clock initialization on a new function
* Handle all usec parameters in one function. It's much cleaner
this way.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 18:58:34 +0000 (20:58 +0200)]
ath5k: Add new field on ath5k_hw to track bandwidth modes
* Prepare for half/quarter/turbo support, introduce a new
ah_bwmode parameter and get rid of ah_turbo. Bwmode stands
for "bandwidth mode" and can have 4 values, default (20MHz),
turbo (40MHz), half rate (10MHz), and quarter rate (5MHz).
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 18:55:17 +0000 (20:55 +0200)]
ath5k: Use new function to stop beacon queue
* Since we only use ath5k_hw_stop_tx_dma to stop the beacon
queue, introduce a new function ath5k_hw_stop_beacon_queue so
that we can use that instead and have better control. In the future
we can add more beacon queue specific stuff there (maybe tweak
beacon timers or something), for now just call ath5k_hw_stop_tx_dma.
* Also since we don't call ath5k_hw_stop_rx/tx_dma from outside
dma.c, make them static.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 18:52:24 +0000 (20:52 +0200)]
ath5k: Check RXE when setting RXDP
* Make sure we are not trying to set RXDP while RX is active,
for now ignore the return value.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 18:50:16 +0000 (20:50 +0200)]
ath5k: Use DCU early termination correctly
* DCU early termination should be used to quickly flush QCU
according to docs so don't enable it for all queues, enable
it only when stopping each queue and disable it when we are
done.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 18:47:31 +0000 (20:47 +0200)]
ath5k: Debug DMA timeouts
* Increase timeouts on ath5k_hw_stop_tx_dma and also wait for
tx queue to stop before checking for pending frames
* Add a new debug level to debug dma start/stop
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 18:45:38 +0000 (20:45 +0200)]
ath5k: Use new dma_stop function on base.c
* Since we stop rx/tx dma and pcu durring reset there is no need to
call ath5k_hw_stop_rx/tx_dma before, also there is no need to call
them durring stop_locked since we can use ath5k_hw_dma_stop for
both.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Tue, 23 Nov 2010 18:43:18 +0000 (20:43 +0200)]
ath5k: Stop PCU on reset
* Stop PCU receive logic (DRU) durring reset
We need to be sure pcu is not active when trying to stop rx dma
right now this is done on ath5k_reset (base.c) but later we are
going to clean it up.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>