Commit Graph

120228 Commits (5ddd4a60683f819982b7bd3d1aee972f931c11a3)

Author SHA1 Message Date
Marcel Holtmann 5ddd4a6068 Bluetooth: Allow SCO audio with Asus WL-BTD202 dongle
This patch allows the Asus WL-BTD202 dongle to be used with a mono
headset without having to specify "options btusb force_scofix=1".

Based on a patch from Guillaume Bedot <littletux@zarb.org>

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2008-11-30 12:17:27 +01:00
Marcel Holtmann 7a9d402053 Bluetooth: Send HCI Reset command by default on device initialization
The Bluetooth subsystem was not using the HCI Reset command when doing
device initialization. The Bluetooth 1.0b specification was ambiguous
on how the device firmware was suppose to handle it. Almost every device
was triggering a transport reset at the same time. In case of USB this
ended up in disconnects from the bus.

All modern Bluetooth dongles handle this perfectly fine and a lot of
them actually require that HCI Reset is sent. If not then they are
either stuck in their HID Proxy mode or their internal structures for
inquiry and paging are not correctly setup.

To handle old and new devices smoothly the Bluetooth subsystem contains
a quirk to force the HCI Reset on initialization. However maintaining
such a quirk becomes more and more complicated. This patch turns the
logic around and lets the old devices disable the HCI Reset command.

The only device where the HCI_QUIRK_NO_RESET is still needed are the
original Digianswer devices and dongles with an early CSR firmware.

CSR reported that they fixed this for version 12 firmware. The last
official release of version 11 firmware is build ID 115. The first
version 12 candidate was build ID 117.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2008-11-30 12:17:26 +01:00
Marcel Holtmann 12421b40b8 Bluetooth: Remove deprecated hci_usb driver
The old hci_usb driver has been fully replaced with the new btusb driver
and all major distributions switched to the new driver now. This removes
it since it should not be used at all anymore.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2008-11-30 12:17:21 +01:00
Nick Pelly 7b99d17f3e Bluetooth: Respect HCI_UART_DEBUG config in hci_ll.c
Following the pattern from hci_*.c, turn off BT_DBG messages unless
they have been requested via HCI_UART_DEBUG

Signed-off-by: Nick Pelly <npelly@google.com>
Acked-by: Brian Swetland <swetland@google.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2008-11-30 12:17:20 +01:00
Julia Lawall 51a6fbc855 Bluetooth: Change simple_strtol to simple_strtoul
Since size, addr, fcs, and tmp are unsigned, it would seem better to use
simple_strtoul that simple_strtol.

A simplified version of the semantic patch that makes this change is as
follows: (http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r2@
long e;
position p;
@@

e = simple_strtol@p(...)

@@
position p != r2.p;
type T;
T e;
@@

e =
- simple_strtol@p
+ simple_strtoul
  (...)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2008-11-30 12:17:20 +01:00
Marcel Holtmann db7aa1c203 Bluetooth: Fix warnings for bt_key_strings and bt_slock_key_strings
After adding proper lockdep annotations for Bluetooth protocols the case
when lockdep is disabled produced two compiler warnings:

net/bluetooth/af_bluetooth.c:60: warning: ‘bt_key_strings’ defined but not used
net/bluetooth/af_bluetooth.c:71: warning: ‘bt_slock_key_strings’ defined but not used

Fix both of them by adding a CONFIG_DEBUG_LOCK_ALLOC conditional around
them and re-arranging the code a little bit.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2008-11-30 12:17:19 +01:00
Vegard Nossum c6bf514c6e Bluetooth: Fix leak of uninitialized data to userspace
struct hci_dev_list_req {
            __u16  dev_num;
            struct hci_dev_req dev_req[0];  /* hci_dev_req structures */
    };

sizeof(struct hci_dev_list_req) == 4, so the two bytes immediately
following "dev_num" will never be initialized. When this structure
is copied to userspace, these uninitialized bytes are leaked.

Fix by using kzalloc() instead of kmalloc(). Found using kmemcheck.

Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2008-11-30 12:17:19 +01:00
Tomas Winkler 7644d63d13 Bluetooth: Fix TX error path in btsdio driver
This patch fixes accumulating of the header in case packet was requeued
in the error path.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2008-11-30 12:17:18 +01:00
Marcel Holtmann 6a88adf2ad Bluetooth: Add suspend/resume support to btusb driver
During suspend it is important that all URBs are cancelled and then on
resume re-submitted. This gives initial suspend/resume support.

Based on initial work from Oliver Neukum <oneukum@suse.de>

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2008-11-30 12:17:14 +01:00
Marcel Holtmann a780efa812 Bluetooth: Handle bulk URBs in btusb driver from notify callback
With the addition of usb_unlink_anchored_urbs() it is possible to fully
control the bulk URBs from the notify callback. There is no need to
schedule work and so only do this for the ISOC URBs.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2008-11-30 12:17:12 +01:00
Marcel Holtmann 2eda66f4a0 Bluetooth: Add fine grained mem_flags usage to btusb driver
The URB submission routines need more fine grained control for the
mem_flags used by kmalloc(), usb_alloc_urb() and usb_submit_urb() to
better support different caller situations. Add a mem_flags parameter
and give the caller full control.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2008-11-30 12:17:10 +01:00
Tilman Schmidt 25f13048bc gigaset: get rid of info() and warn() macros
Join the move away from the obsolete info() macro, opencoding the
remaining uses. While we're at it, also get rid of the warn() macro
by promoting the three remaining uses to err().

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-29 21:38:28 -08:00
Tilman Schmidt af4218c3a6 gigaset: remove unnecessary poll method
The N_GIGASET_M101 line discipline implemented by the ser_gigaset
driver does not transfer any data from/to userspace through the
tty interface. Therefore a poll method is not needed.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-29 21:38:04 -08:00
Roland Dreier c5419e6f05 cxgb3: Fix sparse warning and micro-optimize is_pure_response()
The function is_pure_response() does "ntohl(var) & const" and then
essentially just tests whether the result is 0 or not; this can be done
more efficiently by computing "var & htonl(const)" instead and doing the
byte swap at compile time instead of run time.

This change slightly shrinks the compiled code; eg on x86-64 we save a
couple of bswapl instructions:

add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-8 (-8)
function                                     old     new   delta
t3_sge_intr_msix_napi                        544     536      -8

and this also has the pleasant side effect of fixing a sparse warning:

    drivers/net/cxgb3/sge.c:2313:15: warning: restricted degrades to integer

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-28 21:55:42 -08:00
Giuseppe Cavallaro f95be1806f phy: add the ST ste10Xp PHYs
This patch adds the STMicroelectronics ste10xp PHY device driver.
It supports both the ste100p and the ste101p devices.

Suspend/resume alredy added.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-28 16:42:41 -08:00
David S. Miller 4621bf1298 phy: Add file missed in previous commit.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-28 16:40:26 -08:00
Giuseppe Cavallaro 0f0ca340e5 phy: power management support
This patch adds the power management support into the physical
abstraction layer.

Suspend and resume functions respectively turns on/off the bit 11
into the PHY Basic mode control register.
Generic PHY device starts supporting PM.

In order to support the wake-on LAN and avoid to put in power down
the PHY device, the MDIO is aware of what the Ethernet device wants to do.

Voluntary, no CONFIG_PM defines were added into the sources.
Also generic suspend/resume functions are exported to allow
other drivers use them (such as genphy_config_aneg etc.).

Within the phy_driver_register function, we need to remove the
memset. It overrides the device driver owner and it is not good.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-28 16:24:56 -08:00
Giuseppe Cavallaro 914804b95c phy: add natsemi PHY driver
This patch adds the PHY device driver for the National Semiconductor
DP83865 Gig PHYTER.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-28 16:14:12 -08:00
Ilpo Järvinen 65a467f553 ne2: silence static never defined warnings
These warning originate from 50014f1 (ne2: convert to
net_device_ops) which did drop those functions.

drivers/net/ne2.c:140: warning: 'ne_open' declared 'static' but never defined
drivers/net/ne2.c:141: warning: 'ne_close' declared 'static' but never defined

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-28 15:55:00 -08:00
Ilpo Järvinen d8e8034dcd bnx2: use net_device_stats nowadays available in net_device
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-28 15:52:43 -08:00
Ilpo Järvinen 9fd428761a niu: use net_device_stats nowadays available in net_device
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-28 15:52:00 -08:00
Hannes Eder 6113b748fb pkt_sched: fix sparse warning
Impact: make global function static

Fix the following sparse warning:

  net/sched/sch_api.c:192:14: warning: symbol 'qdisc_match_from_root' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-28 03:06:46 -08:00
Patrick McHardy ea5693ccc5 netlink: allow empty nested attributes
validate_nla() currently doesn't allow empty nested attributes. This
makes userspace code unnecessarily complicated when starting and ending
the nested attribute is done by generic upper level code and the inner
attributes are dumped by a module.

Add a special case to accept empty nested attributes. When the nested
attribute is non empty, the same checks as before are performed.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-28 03:05:19 -08:00
David S. Miller ed77a89c30 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
Conflicts:

	net/netfilter/nf_conntrack_netlink.c
2008-11-28 02:19:15 -08:00
Harvey Harrison 475ad8e217 decnet: compile fix for removal of byteorder wrapper
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-27 23:04:13 -08:00
Al Viro feea6a574d ixgbe: section fixes
ixgbe_init_interrupt_scheme() is called from ixgbe_resume().  Build that
with CONFIG_PM and without CONFIG_HOTPLUG and you've got a problem.
Several helpers called by it also are misannotated __devinit.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-27 15:34:07 -08:00
Randy Dunlap 157653ce79 sctp: fix missing label when PROC_FS=n
Fix missing label when CONFIG_PROC_FS=n:

net/sctp/protocol.c: In function 'sctp_proc_init':
net/sctp/protocol.c:106: error: label 'out_nomem' used but not defined
make[3]: *** [net/sctp/protocol.o] Error 1

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-27 15:30:53 -08:00
Alexander Duyck 40a914fa72 igb: Add support for pci-e Advanced Error Reporting
Add the calls necessary to enable advanced error reporting for igb on
systems with AER enabled.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-27 00:24:37 -08:00
Jeff Kirsher f4113030e7 e100: cleanup link up/down messages
The system log messages created on a link status change need to follow a
specific format to work with tools some customers use.  This also makes
the messages consistant with other Intel driver link messages.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-27 00:23:37 -08:00
Jeff Kirsher d276016cf9 ixgb: cleanup link up/down messages
The system log messages created on a link status change need to follow a
specific format to work with tools some customers use.  This also makes
the messages consistant with other Intel driver link messages.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-27 00:23:12 -08:00
Jeff Kirsher b30c4d8f82 e1000: cleanup link up/down messages
The system log messages created on a link status change need to follow a
specific format to work with tools some customers use.  This also makes
the messages consistant with other Intel driver link messages.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-27 00:22:45 -08:00
Jeff Kirsher a46e534bc7 ixgbe: cleanup link up/down messages
The system log messages created on a link status change need to follow a
specific format to work with tools some customers use.  This also makes
the messages consistant with other Intel driver link messages.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-27 00:22:21 -08:00
Alexander Duyck 527d47c111 igb: link up/down messages must follow a specific format
The system log messages created on a link status change need to follow a
specific format to work with tools some customers use.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-27 00:21:39 -08:00
Harvey Harrison c4106aa88a decnet: remove private wrappers of endian helpers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Reviewed-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-27 00:12:47 -08:00
David S. Miller 5b9ab2ec04 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/net/hp-plus.c
	drivers/net/wireless/ath5k/base.c
	drivers/net/wireless/ath9k/recv.c
	net/wireless/reg.c
2008-11-26 23:48:40 -08:00
Divy Le Ray 851fd7bd88 cxgb3: Update FW loading path.
Update FW loading path to accomodate in-kernel images location

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-26 15:38:36 -08:00
Divy Le Ray ad58633c83 cxgb3: integrate FW and protocol engines in the kernel
Include firmware and protocol images in the kernel image if requested

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-26 15:37:50 -08:00
Divy Le Ray 5256554489 cxgb3: avoid potential memory leak.
Add consistency in alloc_ring() parameter checking
to avoid potential memory leaks.
alloc_ring() callers are correct fo far.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-26 15:35:59 -08:00
Divy Le Ray 43a944f373 cxgb3: set hard_xmit in the netdev_ops
Fix t3_eth_xmit() missing into the netdev_ops structure.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-26 15:35:26 -08:00
David S. Miller b5ddedc9cc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2008-11-26 15:28:40 -08:00
Jarek Poplawski 244e6c2d07 pkt_sched: gen_estimator: Optimize gen_estimator_active()
Since all other gen_estimator functions use bstats and rate_est params
together, and searching for them is optimized now, let's use this also
in gen_estimator_active(). The return type of gen_estimator_active()
is changed to bool, and gen_find_node() parameters to const, btw.

In tcf_act_police_locate() a check for ACT_P_CREATED is added before
calling gen_estimator_active().

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-26 15:24:32 -08:00
John W. Linville b235507cc5 mac80211_hwsim: fix-up some print_mac merge damage
Some print_mac -> %pM conversions got lost in some merge or another...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:52 -05:00
Ivan Kuten 860c6e6a15 mac80211: fix unaligned access in ieee80211_wep_encrypt_data
Signed-off-by: Ivan Kuten <ivan.kuten@promwad.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:51 -05:00
Christian Lamparter b50563a685 p54: fix wmm queue settings
This patch fixes a regression (introduced by
"p54: more definitions form lmac_longbow.h and pda.h")

It turned out that the "ret" variable wasn't initialized and
this caused the following warnings/errors to appear:

wmaster1: failed to set TX queue parameters for queue 2
wmaster1: failed to set TX queue parameters for queue 3
wmaster1: failed to set TX queue parameters for queue 1
wmaster1: failed to set TX queue parameters for queue 0

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:50 -05:00
Sujith 99405f930f ath9k: Use proper TX channel width for setting channels
The TX channel width of the BSS can be obtained only after association.
In all cases, default to HT20 if HT is enabled, and set
chan width to HT40 only if the BSS supports it.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:49 -05:00
Sujith ff37e337be ath9k: Code scrub
Merge core.c and base.c
Remove Antenna Diversity (unused now).
Remove unused chainmask handling code.
Comment, indentation scrub.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:49 -05:00
Jouni Malinen bf8c1ac6d8 nl80211: Change max TX power to be in mBm instead of dBm
In order to be consistent with NL80211_ATTR_POWER_RULE_MAX_EIRP,
change NL80211_FREQUENCY_ATTR_MAX_TX_POWER to use mBm and U32 instead
of dBm and U8. This is a userspace interface change, but the previous
version had not yet been pushed upstream and there are no userspace
programs using this yet, so there is justification to get this change in
as long as it goes in before the previous version gets out.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:48 -05:00
David Kilroy 39d1ffee57 orinoco: Provide option to avoid unnecessary fw caching
Make firmware caching on startup optional, and make it default.

When the option is not selected and PM_SLEEP is configured, then
cache firmware in the suspend pm_notifier. This configuration saves
about 64k RAM in normal use, but can lead to a situation where the
driver is configured to use a different firmware.

Signed-off by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:47 -05:00
David Kilroy ac7cafd722 orinoco: Resume spectrum_cs in the same way as orinoco_cs
Retrieval of external firmware has been resolved, and should work with
the standard orinoco resume algorithm.

This fixes an issue where priv->hw_unavailable indicates the card is
ready when firmware has not been loaded.

Signed-off by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:46 -05:00
David Kilroy 2cea7b2619 orinoco: Cache Symbol firmware
Signed-off by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:46 -05:00