Archived
14
0
Fork 0
Commit graph

11071 commits

Author SHA1 Message Date
Stephen Hemminger
b9a9b4b042 etherh: build fix for net-next
Fix build of ARM etherh driver with new net_device_ops.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-02 14:52:25 -08:00
Mark McLoughlin
39da5814db virtio_net: large tx MTU support
We don't really have a max tx packet size limit, so allow configuring
the device with up to 64k tx MTU.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2008-12-02 22:12:49 +10:30
Linus Torvalds
4bc2a9bf8c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/mlx4: Fix MTT leakage in resize CQ
  IB/ehca: Fix problem with generated flush work completions
  IB/ehca: Change misleading error message on memory hotplug
  mlx4_core: Save/restore default port IB capability mask
2008-12-01 11:01:54 -08:00
Linus Torvalds
03cfdb86ac Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  powerpc: Fix system calls on Cell entered with XER.SO=1
  powerpc/cell: Fix GDB watchpoints, again
  powerpc/mpic: Don't reset affinity for secondary MPIC on boot
  powerpc/cell/axon-msi: Retry on missing interrupt
  powerpc: Fix boot freeze on machine with empty memory node
  powerpc: Fix IRQ assignment for some PCIe devices
  powerpc/spufs: Fix spinning in spufs_ps_fault on signal
  powerpc/mpc832x_rdb: fix swapped ethernet ids
  powerpc: Use generic PHY driver for Marvell 88E1111 PHY on GE Fanuc SBC610
  powerpc/85xx: L2 cache size wrong in 8572DS dts
  powerpc/virtex: Update defconfigs
  powerpc/52xx: update defconfigs
  xsysace: Fix driver to use resource_size_t instead of unsigned long
  powerpc/virtex: fix various format/casting printk mismatches
  powerpc/mpc5200: fix bestcomm Kconfig dependencies
  powerpc/44x: Fix 460EX/460GT machine check handling
  powerpc/40x: Limit allocable DRAM during early mapping
2008-11-30 16:44:18 -08:00
Al Viro
ffb78a2616 get xenbus_driver ->probe() "recognized" by modpost
... by giving the instances' names magic suffix recognized by modpost ;-/
Their ->probe() is __devinit

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-30 10:03:38 -08:00
Al Viro
f57628d76b section errors in smc911x/smc91x
a) ->probe() can be __devinit; no need to put it into .text
 b) calling __init stuff from it, OTOH, is wrong
 c) ->remove() is __devexit fodder

Acked-by: rmk+kernel@arm.linux.org.uk
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-30 10:03:37 -08:00
Al Viro
8814b5050d section misannotation in ibmtr_cs
ibmtr_resume() is calling ibmtr_probe(), which is devinit.  Whether
that's the right thing to do there is a separate question, but
since it's PCMCIA and thus will never compile without HOTPLUG...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-30 10:03:37 -08:00
Al Viro
43ced651d1 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: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-30 10:03:37 -08:00
Frédéric Moulins
e635813514 pppol2tp: Add missing sock_put() in pppol2tp_release()
pppol2tp_sock_to_session() do sock_hold() if the session to release is
not NULL.

Signed-off-by: Frédéric Moulins <frederic.moulins@alsatis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-28 22:12:02 -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
Jack Morgenstein
9a5aa622dd mlx4_core: Save/restore default port IB capability mask
Commit 7ff93f8b ("mlx4_core: Multiple port type support") introduced
support for different port types.  As part of that support, SET_PORT
is invoked to set the port type during driver startup.  However, as a
side-effect, for IB ports the invocation of this command also sets the
port's capability mask to zero (losing the default value set by FW).

To fix this, get the default ib port capabilities (via a MAD_IFC Port
Info query) during driver startup, and save them for use in the
mlx4_SET_PORT command when setting the port-type to Infiniband.

This patch fixes problems with subnet manager (SM) failover such as
<https://bugs.openfabrics.org/show_bug.cgi?id=1183>, which occurred
because the IsTrapSupported bit in the capability mask was zeroed.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-11-28 21:29:46 -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
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
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
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
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
efbbced361 macvlan: don't broadcast PAUSE frames to macvlan devices
PAUSE frames are only relevant for the real device, broadcasting them
to all macvlan devices can cause a significant load increase.

Reported-by: Ben Greear <greearb@candelatech.com>
Tested-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-26 15:30:48 -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
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
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
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
David Kilroy
7473431297 orinoco: Separate fw caching from download
This refactorring will make it easier to share logic with Symbol
firmware.

Signed-off by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:45 -05:00
Luis R. Rodriguez
cb71d9bafb ath9k: Handle -ENOMEM on RX gracefully
We would get an oops on RX on -ENOMEM by passing
NULL to the hardware on ath_rx_buf_link(). The oops
would look something like this:

ath_rx_tasklet+0x515/0x53b
ath9k_tasklet+0x48
tasklet_action
__do_softirq
irq_exit
do_IRQ

RIP: ath_rx_buf_link+0x3a

We correct this by handling the requeue directly on
the ath_rx_tasklet() and trying to allocate an skb
*prior* to sending up the last hardware processed
skb. If we run out of memory this gauranteees we have
skbs to work with while it simply drops new received
frames.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:44 -05:00
Felix Fietkau
1048643ea9 ath5k: Clean up eeprom parsing and add missing calibration data
This patch brings the ath5k eeprom parsing code in sync with the work
done on ath_info by Nick Kossifidis and integrates the missing parts
based on the code of the Atheros Legacy HAL release.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:41 -05:00
Vasanthakumar Thiagarajan
7ac47010a4 ath9k: Dont update rate control for every AMPDU
Update the rate control only with the tx status of first
AMPDU of an aggregation. This patch fixes frequent drops
in throughput.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:40 -05:00
Winkler, Tomas
40fc95d57c iwlwifi: TX update chicken bits
This instructs FH to increment the retry count of a packet when
it is brought from the memory to TX-FIFO to save transactions
during aggregation flow.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:39 -05:00
Winkler, Tomas
31a73fe4f3 iwlwifi: TX setup fix confusion between TX queue and TX DMA channel
This patch configures correctly TX DMA channel. It is not
the same as TX queue.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:39 -05:00
Winkler, Tomas
25e35a56d5 iwlwifi: 4965 define firmware file name once
Apply same idiom as in 5000 introduced by
'iwlwifi: define firmware file name once'

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:38 -05:00
Tomas Winkler
201706ac0b iwlwifi: enable base band calibration in 5000 HW
This patch adds base band calibration support.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:37 -05:00
Winkler, Tomas
83dde8c905 iwlwifi: move iwl_clear_stations_table to iwl-sta.c
This patch moves iwl_clear_stations_table into iwl-sta.c

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:37 -05:00
Abhijeet Kolekar
ce546fd2ea iwl3945 : Fix ad-hoc mode for 3945
Patch fixes the ad-hoc mode by
1) Removing redundant clear_stations_table which prevented generation of
beacons.
2) Setting assoc_id to 1. It was never set so preventing tx flow
in iwl3945_tx_skb.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:36 -05:00
Bob Copeland
0e149cf5a1 ath5k: set mac address in add_interface
Configure the mac address in add_interface and clear it in
remove_interface so that users can change the mac address
to something other than the one in the eeprom.  Also avoid
setting it at attach time so that we won't ack packets
until fully set up.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:35 -05:00
Sujith
8f93b8b337 ath9k: Use straightforward PCI routines to setup the TX buffer.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:34 -05:00
Sujith
daa9deb359 ath9k: Update TX trigger level on a FIFO underrun.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:34 -05:00
Sujith
788a3d6f3d ath9k: Fix bug in deciphering channel flags
CHANNEL_CCK flag is set for all 2 Ghz channels, so IS_CHAN_CCK() would
turn out to be true for all channles in that band.
Use IS_CHAN_B() now, which checks the channel mode and not the channel
flags.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:33 -05:00
Sujith
c428839008 ath9k: Move TX completion routine to xmit.c
Also, use a helper function to setup RC status data
when processing completed TX descriptors.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:32 -05:00
Sujith
2c5a744d43 ath9k: Use helpers
Break down huge functions, use helper functions or
macros instead.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:32 -05:00
Sujith
46d14a58ff ath9k: General code scrub
Replace TRUE/FALSE macros with VALID/INVALID macros.
Follow a consistent variable convention.
Remove unnecessary comments.
Add all RC phy macros into a single enum.
Merge functions into reasonably sized entities.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:31 -05:00
Sujith
e63835b0f4 ath9k: Remove ath9k_rate_table
Maintaining two sets of rate tables is redundant, remove one
and use struct ath_rate_table exclusively.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:30 -05:00
Sujith
a8efee4f47 ath9k: Use rate_driver_data
Remove the hack using vif, and use rate_driver_data within
skb->cb to hold driver specific rate information.
Setup the rate series in the skb's tx control area and remove
all references to ath9k specific rate series ( using struct ath_rc_series ).

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:29 -05:00
Sujith
fe7f4a7745 ath9k: Remove ath_rate_softc
Move the hw rate tables to ath_softc, and access them directly.
tx_triglevel_max is global, move it to ath_rate_node.
Now that ath_rate_softc is gone, rate control attach becomes simpler.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:28 -05:00
Sujith
5ddfac3b55 ath9k: Remove rate control reference in VAP
Rate control init is now confined to itself, using the
HT capabilites of the STA from rate_init().

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:27 -05:00
Sujith
ffd651c620 ath9k: We don't support non-HT devices, so remove superfluous code.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:26 -05:00
Sujith
be0418ada3 ath9k: Revamp RX handling
Remove a lot of old, crufty code and make
RX status reporting a bit sane and clean.

Do not do anything to the RX skb before unmapping.
So in ath_rx_tasklet(), move the skb_put() after PCI unmap.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:26 -05:00
Sujith
2b406f1e68 ath9k: Nuke fixed rate handling in driver
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:25 -05:00
Sujith
46494e6df8 ath9k: Remove half/quarter rate tables
Half/Quarter rate tables are needed only for legacy chipsets.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:24 -05:00
Sujith
4df8ec64fd ath9k: Remove ath_rate_newassoc()
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:24 -05:00
Sujith
7b4d27357a ath9k: Remove ath_setup_rates
Setup legacy rates in ath_rate_init() itself.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:23 -05:00
Sujith
fe60594a76 ath9k: Simplify RC alloc/free functions
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:22 -05:00
Sujith
256b77593f ath9k: Merge struct ath_tx_ratectrl with ath_rate_node
Avoid casting of ath_tx_ratctrl and access the elements directly.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:22 -05:00
Vasanthakumar Thiagarajan
3fcdfb4b94 ath9k: Fix panic while unregistering rfkill
[ 6133.670329] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
 [ 6133.672802] IP: [<ffffffffa030fcf6>] ieee80211_stop_queues+0x26/0x40 [mac80211]
 [ 6133.672802] PGD 759dc067 PUD 74f1d067 PMD 0
 [ 6133.672802] Oops: 0002 [#1] PREEMPT SMP
 [ 6133.672802] last sysfs file: /sys/class/backlight/acpi_video0/brightness
 [ 6133.672802] CPU 0
 [ 6133.672802] Modules linked in: ath9k(-) mac80211 pciehp pci_hotplug arc4 ecb joydev pcmcia ppdev lp ppp_generic psmouse sg pcspkr s]
 [ 6133.735830] Pid: 4445, comm: rmmod Tainted: G        W  2.6.28-rc5-wl #1
 [ 6133.735830] RIP: 0010:[<ffffffffa030fcf6>]  [<ffffffffa030fcf6>] ieee80211_stop_queues+0x26/0x40 [mac80211]
 [ 6133.735830] RSP: 0018:ffff88007d1efd10  EFLAGS: 00010246
 [ 6133.735830] RAX: 0000000000000000 RBX: ffff880074f41aa0 RCX: 0000000000000000
 [ 6133.735830] RDX: 0000000000000010 RSI: 0000000000000000 RDI: ffff880074f40340
 [ 6133.735830] RBP: ffff880074990000 R08: 0000000000000000 R09: 000000000000224d
 [ 6133.735830] R10: 0000000000000000 R11: ffffffff8031dc70 R12: 0000000000000000
 [ 6133.735830] R13: 0000000000000001 R14: ffff880074f46c9c R15: 0000000000000000
 [ 6133.735830] FS:  00007f1e2e0bc6f0(0000) GS:ffffffff805e0b80(0000) knlGS:0000000000000000
 [ 6133.735830] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
 [ 6133.735830] CR2: 0000000000000010 CR3: 0000000075593000 CR4: 00000000000006e0
 [ 6133.735830] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
 [ 6133.735830] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
 [ 6133.735830] Process rmmod (pid: 4445, threadinfo ffff88007d1ee000, task ffff88007c0c8000)
 [ 6133.735830] Stack:
 [ 6133.735830]  ffffffffa034d583 ffff88007c7d9410 ffff88007c7d9410 ffff88007c7d9410
 [ 6133.735830]  ffffffff80481dab ffff880074f41aa0 00000000fffffff0 0000000000000000
 [ 6133.735830]  0000000000000001 0000000000000001 ffffffffa034d8a5 ffff88007c7d9400
 [ 6133.735830] Call Trace:
 [ 6133.735830]  [<ffffffffa034d583>] ? ath_radio_disable+0x33/0x150 [ath9k]
 [ 6133.735830]  [<ffffffff80481dab>] ? __mutex_lock_slowpath+0x20b/0x2a0
 [ 6133.735830]  [<ffffffffa034d8a5>] ? ath_sw_toggle_radio+0x65/0xa0 [ath9k]
 [ 6133.735830]  [<ffffffffa019d1f4>] ? rfkill_toggle_radio+0x74/0x140 [rfkill]
 [ 6133.735830]  [<ffffffffa019d597>] ? rfkill_remove_switch+0x67/0x80 [rfkill]
 [ 6133.735830]  [<ffffffffa019d955>] ? rfkill_unregister+0x25/0x50 [rfkill]
 [ 6133.735830]  [<ffffffffa034bf75>] ? ath_detach+0xf5/0x140 [ath9k]
 [ 6133.735830]  [<ffffffffa034bfe9>] ? ath_pci_remove+0x29/0x80 [ath9k]
 [ 6133.735830]  [<ffffffff8035263c>] ? pci_device_remove+0x2c/0x60
 [ 6133.735830]  [<ffffffff803c3829>] ? __device_release_driver+0x99/0x100
 [ 6133.735830]  [<ffffffff803c3950>] ? driver_detach+0xc0/0xd0
 [ 6133.735830]  [<ffffffff803c296e>] ? bus_remove_driver+0x8e/0xd0
 [ 6133.735830]  [<ffffffff80352916>] ? pci_unregister_driver+0x36/0xa0
 [ 6133.735830]  [<ffffffffa0356ad4>] ? exit_ath_pci+0x10/0x29 [ath9k]
 [ 6133.735830]  [<ffffffff8026bb1b>] ? sys_delete_module+0x1cb/0x2d0
 [ 6133.735830]  [<ffffffff802960d9>] ? do_munmap+0x349/0x390
 [ 6133.735830]  [<ffffffff80342d01>] ? __up_write+0x21/0x150
 [ 6133.735830]  [<ffffffff8020c45b>] ? system_call_fastpath+0x16/0x1b
 [ 6133.735830] Code: c3 0f 1f 40 00 0f b7 57 5e 0f b7 47 5c 01 c2 74 30 31 c9 66 90 48 8b 57 78 0f b7 c1 48 c1 e0 07 48 03 82 00 03 00
 [ 6133.735830] RIP  [<ffffffffa030fcf6>] ieee80211_stop_queues+0x26/0x40 [mac80211]

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:21 -05:00
Larry Finger
1548c86ab1 rtl8187: Fix transmission count sent to mac80211
In the commit entitled "mac80211/drivers: rewrite the rate control
API", the meaning of the packet transmit count was changed from the
number of retries to the total number.  In driver rtl8187, this change
was missed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:20 -05:00
Ivo van Doorn
d507748ac6 rt2x00: Don't switch off LED on initialization
When we switch off the LEDS during initialization
we kill rt73usb from proper functioning. The immediate
result after the first LED command are MCU failures
and a complete breakdown of TX/RX.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:19 -05:00
Andrey Borzenkov
f941f8590c orinoco: indicate it is using dBm in wireless_stats and spy
Since WE7 /proc/net/wireless checks whether level and noise  are in dBm
and shows them accordingly. Indicate that we return signal and noice
levels in dBm.

Before:
Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
 face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22
  eth1: 0000   65.  219.  165.       0      0    148     41      0        0

After:
Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
 face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22
  eth1: 0000   65.  -37.  -91.       0      0      0      0      0        0

While at it, replace raw numbers with appropriate macro.

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-26 09:47:18 -05:00
David S. Miller
3d4cd60ed0 smc-mca: Fix build failure due to typo.
ultra_netdev_ops --> ultramca_netdev_ops

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-26 01:52:15 -08:00
David S. Miller
bd51126957 sungem: Fix PCS_MIICTRL register write in gem_init_phy().
Use writel not writeb.

Noticed by Hermann Lauer.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-26 01:17:01 -08:00
Randy Dunlap
1d71da164d net: hp-plus uses eip_poll
hp-plus uses 8390p.c, so it should use eip_poll(), not ei_poll().

drivers/built-in.o: In function `hpp_probe1':
hp-plus.c:(.init.text+0x9cbd): undefined reference to `ei_poll'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 21:05:51 -08:00
Stephen Hemminger
4ef8e76833 ne2000: convert to net_device_ops
Last driver for today.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 18:26:38 -08:00
Stephen Hemminger
53cdd28961 3c503: convert to net_device_ops
Another of the 8390p group.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 18:26:20 -08:00
Stephen Hemminger
e0b8cb0e0e stnic: convert to net_device_ops
Can just use common ei_netdev_ops definition.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 18:25:49 -08:00
Stephen Hemminger
7d359daafe apne: convert to net_device_ops
Yet another driver.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 18:25:32 -08:00
Stephen Hemminger
50014f1b93 ne2: convert to net_device_ops
Almost there.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 18:25:14 -08:00
Stephen Hemminger
4be7ef4eac hp: convert to net_device_ops
Another old EISA driver converted.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 18:24:57 -08:00
Stephen Hemminger
0ec4d4fe41 lne390: convert to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 18:24:38 -08:00
Stephen Hemminger
8284abea9b e2100: convert to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 18:24:20 -08:00
Stephen Hemminger
9a9aa14a74 es3210: convert to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 18:23:59 -08:00
Stephen Hemminger
d269941b5b ne3210: convert to net_device_ops
By having common code in 8390.o don't need net_dev_ops in
the driver.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 18:23:35 -08:00
Stephen Hemminger
d079841d79 smc: convert to net_device_ops
Convert both eisa and mca versions of this driver, though I doubt
anyone still has the hardware.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 18:23:06 -08:00
Stephen Hemminger
d4a97d425c hp-plus: convert to net_device_ops
Another driver converted to new infrastructure.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 18:22:42 -08:00
Stephen Hemminger
458228bc4c wd: use net_device_ops
Another driver converted to net_device_ops; Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 18:21:56 -08:00
Stephen Hemminger
8884c092e5 8390: add common net_device ops
Fix the defactoring of ei_XXX functions in 8390 and 8390p.
Remove the tx_timeout hack since no driver including the 3c503
overrides tx_timeout at this time, looks like a legacy thing.

Also, since several drivers all have same hooks, provide common
netdev_ops.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 18:12:49 -08:00
Ingo Molnar
46a8494a9d 3c523: fix warning in drivers/net/3c523.c
fix warning:

  drivers/net/3c523.c:582: warning: ‘cleanup_card’ defined but not used

No code changed:

md5:
   ebe4a1b27d3f21b0b12a78c58463b0d7  3c523.o.before.asm
   ebe4a1b27d3f21b0b12a78c58463b0d7  3c523.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 17:02:20 -08:00
Ingo Molnar
99da1a8a6d depca: fix warning in drivers/net/depca.c
fix warning:

  drivers/net/depca.c: In function ‘depca_eisa_probe’:
  drivers/net/depca.c:1564: warning: ‘mem_start’ may be used uninitialized in this function

this seems to be a real bug - depca_eisa_probe() does not check
for failure. Add it, symmetric to depca_isa_probe().

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 17:00:39 -08:00
Ingo Molnar
a098397d56 atlx: fix warning in drivers/net/atlx/atl2.c
fix this warning:

  drivers/net/atlx/atl2.c: In function ‘atl2_request_irq’:
  drivers/net/atlx/atl2.c:644: warning: unused variable ‘err’

'err' is unused in the !CONFIG_PCI_MSI case.

Instead of further increasing the #ifdeffery in this function,
restructure the code a bit and get rid of the #ifdef. This
relies on the fact that pci_enable_msi() will always fail in
the !CONFIG_PCI_MSI case.

There should be no change in driver behavior.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 17:00:05 -08:00
Ingo Molnar
e6a176228a mlx4: fix warning in drivers/net/mlx4/mcg.c
fix warning:

  drivers/net/mlx4/mcg.c: In function ‘mlx4_multicast_attach’:
  drivers/net/mlx4/mcg.c:217: warning: integer overflow in expression

there was no real danger of overflow here though.

md5:
   db8eb55620f886c03854a2abb2ce6c3f  mcg.o.before.asm
   db8eb55620f886c03854a2abb2ce6c3f  mcg.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:57:59 -08:00
Ingo Molnar
b71e839f9a cassini: fix warning in drivers/net/cassini.c
this warning:

  drivers/net/cassini.c: In function ‘cas_rx_ringN’:
  drivers/net/cassini.c:2350: warning: ‘skb’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between cas_rx_process_pkt() and 'skb'.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:57:05 -08:00
Ingo Molnar
b58515be97 mlx4: fix error path in drivers/net/mlx4/en_rx.c
this warning:

  drivers/net/mlx4/en_rx.c: In function ‘mlx4_en_activate_rx_rings’:
  drivers/net/mlx4/en_rx.c:412: warning: ‘err’ may be used uninitialized in this function

Triggers because 'err' is uninitialized in the following input
conditions: priv->rx_ring_num is zero and mlx4_en_fill_rx_buffers()
fails.

But even if ->rx_ring_num is nonzero, 'err' will be zero if
mlx4_en_fill_rx_buffers() fails and mlx4_en_activate_rx_rings() returns
success - incorrectly.

So it's best to keep the error code uptodate on mlx4_en_fill_rx_buffers()
calls as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:53:32 -08:00
Ingo Molnar
4174439ef5 z85230: fix warning in drivers/net/wan/z85230.c
this warning:

  drivers/net/wan/z85230.c: In function ‘z8530_interrupt’:
  drivers/net/wan/z85230.c:713: warning: ‘intr’ may be used uninitialized in this function

is clearly bogus - annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:53:08 -08:00
Ingo Molnar
ef0cd87ef6 sis900: fix warning in drivers/net/sis900.c
this warning:

  drivers/net/sis900.c: In function ‘sis900_timer’:
  drivers/net/sis900.c:1280: warning: ‘speed’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between sis900_read_mode(), 'speed' and 'duplex'.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:52:13 -08:00
Ingo Molnar
be5a3c62c8 qla3xxx: fix warning in drivers/net/qla3xxx.c
this warning:

  drivers/net/qla3xxx.c: In function ‘ql3xxx_probe’:
  drivers/net/qla3xxx.c:3912: warning: ‘pci_using_dac’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between 'pci_using_dac' and 'err'.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:49:07 -08:00
Ingo Molnar
f166400bd4 niu: fix another warning in drivers/net/niu.c
this warning:

  drivers/net/niu.c: In function ‘esr_reset’:
  drivers/net/niu.c:741: warning: ‘reset’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between:

 - esr_read_reset() and 'reset'

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:48:42 -08:00
Ingo Molnar
51e0f058c4 niu: fix warnings in drivers/net/niu.c
these warnings:

  drivers/net/niu.c: In function ‘serdes_init_niu_1g_serdes’:
  drivers/net/niu.c:451: warning: ‘sig’ may be used uninitialized in this function
  drivers/net/niu.c: In function ‘serdes_init_niu_10g_serdes’:
  drivers/net/niu.c:550: warning: ‘sig’ may be used uninitialized in this function

triggers because GCC does not recognize that the max_retry loop
always initializes 'sig', due to max_retry != 0.

Annotate them.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:48:12 -08:00
Ingo Molnar
2e6a684b84 s2io: fix warning in drivers/net/s2io.c
this warning:

  drivers/net/s2io.c: In function ‘rx_intr_handler’:
  drivers/net/s2io.c:7369: warning: ‘lro’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between:

 - s2io_club_tcp_session()and 'lro'

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:47:35 -08:00
Robert Olsson
cb13fc209f ixgbe: Naming interrupt vectors
Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:44:39 -08:00
Robert Olsson
70340d728f niu: Naming interrupt vectors.
A patch to put names on the niu interrupt vectors according the syntax below.
 This is needed to assign correct affinity.

 > So on a multiqueue card with 2 RX queues and 2 TX queues we'd
 > have names like:
 >
 > 	eth0-rx-0
 > 	eth0-rx-1
 > 	eth0-tx-0
 > 	eth0-tx-1

Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Tested-by: Jesper Dangaard Brouer <jdb@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:44:38 -08:00
David S. Miller
d7713ccc7b Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2008-11-25 14:27:58 -08:00
Vasanthakumar Thiagarajan
4d3601b234 ath9k: Configure AR_PHY_SWITCH_COM with apropriate antenna control
This fixes the poor wireless connection which happens even
if we are very well in the range.

Signed-off-by: Don.breslin@atheros.com
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:40 -05:00
Christian Lamparter
ced0957442 p54: honour bss_info_changed's basic_rates and other settings
As was pointed out in "p54: honour bss_info_changed's short slot time settings",
bss_info_changed provides more useful settings that can be used by the driver.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:39 -05:00
Christian Lamparter
40db0b2259 p54pci: cache firmware for suspend/resume
Johannes pointed out that the driver has cache the firmware for
suspend/resume cycles.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:38 -05:00
Christian Lamparter
ffed785898 p54: minor fixes
This patch contains only contains a one-liner fixes and enhancements

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:38 -05:00
Christian Lamparter
d131bb59c1 p54: enable Mesh Point support
This patch enables Mesh Point operation for any p54 device.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:37 -05:00
Luis R. Rodriguez
97b777db57 ath9k: make DMA memory consistent
Make the DMAable mameory consistent with pci_set_consistent_dma_mask().
The DMA-mapping.txt Documentation recommends this but for PCI-X
considerations and on strange architecture like SGI SN2, not sure
why it would fix an issue but lets see if it does, just in case.

Before this, this driver was tested with x86_64 with about
7 GB of RAM, not sure if this is really needed.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:35 -05:00
Luis R. Rodriguez
1d450cfc97 ath9k: Clarify we only want 32-bit DMA
Use DMA_32BIT_MASK to clarify we only want 32-bit DMA
memory. What was there before is also 32-bit but this makes it
clearer

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:35 -05:00
Ivo van Doorn
f1ca2167d8 rt2x00: Detect USB BULK in/out endpoints
Instead of hardcoding the used in/out endpoints
we should detect them by walking through all
available endpoints.

rt2800usb will gain the most out of this, because
the legacy drivers indicate that there are multiple
endpoints available.
However this code might benefit at least rt73usb as
well for the MIMO queues, and if we are really lucky
rt2500usb will benefit because for the TX and PRIO
queues.

Even if rt2500usb and rt73usb do not get better performance
after this patch, the endpoint detection still belongs to
rt2x00usb, and it shouldn't hurt to always try to detect
the available endpoints.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:34 -05:00
Larry Finger
c8f96974ee rtl8187: Remove module warning and dependence on CONFIG_EXPERIMENTAL
After considerable testing, the initial fears that the driver might damage
some flavors of RTL8187B hardware seem to be groundless. Accordingly, the
logged warning is removed. In addition, Kconfig is changed to remove the
dependence on EXPERIMENTAL.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger>
Acked-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:33 -05:00
Herton Ronaldo Krzesinski
3517afdefc rtl8187: feedback transmitted packets using tx close descriptor for 8187B
Realtek 8187B has a receive command queue to feedback beacon interrupt
and transmitted packet status. Use it to feedback mac80211 about status
of transmitted packets. Unfortunately in the course of testing I found
that the sequence number reported by hardware includes entire sequence
control in a 12 bit only field, so a workaround is done to check only
lowest bits.

Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:33 -05:00
Herton Ronaldo Krzesinski
b4572a9264 rtl8187: implement conf_tx callback to configure tx queues
Add conf_tx callback and use it to configure tx queues of 8187L/8187B.

Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:32 -05:00
Herton Ronaldo Krzesinski
54ac218ae6 rtl8187: fix 8187B throughput regression
Hin-Tak Leung reported that after the change "rtl8187: add short slot
handling for 8187B" his RTL8187B started to give low throughput on
network transfers. Turns out that the SIFS setting used isn't ok, it
doesn't look to be the real aSIFSTime, using the "magical" 0x22 value
like on other 818x variants as the vendor does too fixes the issue.

Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:31 -05:00
Senthil Balasubramanian
db93e7b5bf ath9k: Race condition in accessing TX and RX buffers.
Race condition causes RX buffers to be accessed even before it is
initialized. The RX and TX buffers are initialized immediately after
the hardware is registered with mac80211. The mac80211 start callback
is ready to be fired once the device is registered for a case when the
wpa_supplicant is also running at the same time.

The same race condition is also possible for RKFILL registration
as RFKILL init happens after the device registration with mac80211
and it is possible that rfkill_register would be called even before
it is initialized.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:31 -05:00
Senthil Balasubramanian
306efdd109 ath9k: IRQ should be disabled before calling free_irq()
ath9k frees irq even before IRQs are disabled and existing IRQs
are flushed when rfkill_register() fails.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:30 -05:00
Senthil Balasubramanian
e97275cb06 ath9k: Build RFKILL feature even when RFKILL subsystem is a MODULE
Currently, ath9k builds RFKILL feature only when the RFKILL subsystem
is built part of the kernel. Build RFKILL feature regardless of whether
RFKILL subsystem is built as a MODULE or part of the kernel.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:30 -05:00
Senthil Balasubramanian
f9bbf431be ath9k: incorrect noise floor threshold values.
This patch fixes incorrect noise floor threshold values.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:29 -05:00
Senthil Balasubramanian
9f80420217 ath9k: INI update for atheros chipets.
init values update for various atheros chipsets.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:28 -05:00
Luis R. Rodriguez
ea4a82dcee iwlwifi: enable custom fw regulatory solution
This enables the custom firmware regulatory solution option
on iwlwifi drivers. These devices are uncapable of mapping their
EEPROM regulatory domain to a specific ISO / IEC alpha2.
Although the new 11n devices (>= iwl 5000) have only
3 regultaory SKUs -- MOW, ABG (no N) and BG -- the older
devices (3945 and 4965) have a more complex SKU arrangement
and therefore its not practical to move this to the driver.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:27 -05:00
Tomas Winkler
e0737a77d6 iwlwifi: iwl-fh.h cleanup
This patch fix value of upper FH register bound plus
it reorders and groups registers in more readable way

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:20 -05:00
Zhu, Yi
34faf780cf iwlwifi: some fh document fix and cleanup
This patch cleans up some flow handler related document. It also
removes some blank lines.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:20 -05:00
Zhu, Yi
352bc8de19 iwlwifi: configure_filter rewrite
The patch rewrites the mac80211 configure_filter handler to better mapping
mac80211 filter flags to iwlwifi hardware filter flags. We now can support
5 mac80211 filter flags: FIF_OTHER_BSS, FIF_ALLMULTI, FIF_PROMISC_IN_BSS,
FIF_BCN_PRBRESP_PROMISC and FIF_CONTROL. This patch also avoids reconnecting
if the filter flags are changed when the STA is associated. Because rx_assoc
is used when full rxon is not necessary.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:19 -05:00
Abhijeet Kolekar
c305606540 iwlwifi : fix checkpatch.pl errors
Patch fixes checkpatch.pl errors for iwlwifi.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:18 -05:00
Chatre, Reinette
dbce56a456 iwlwifi: replace magic constants with define
use IWL_CCK_RATES_MASK and IWL_OFDM_RATES_MASK instead of
their values directly.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
cc: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:18 -05:00
Tomas Winkler
417f114bf2 iwlwifi: rs: remove fc variable and other cleanups
This patch
1. Removes use once use only fc variables, they are useless after refactoring
ieee80211 frame control handlers
2. Other trivial cleanups

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:17 -05:00
Tomas Winkler
9f58671e8d iwlwifi: consolidate station management code
This patch moves code around and group most of the station
management code into iwl-sta.c

No functional changes (yet)

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:41:06 -05:00
Kolekar, Abhijeet
cee53ddb46 iwl3945 : Simplify iwl3945_pci_probe
Patch aligns iwl3945_pci_probe with iwlwifi's iwl_pci_probe.
Added few comments and code simplified to make readable.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:35:20 -05:00
Ivo van Doorn
0e3de99846 rt2x00: Fix TX failure path
The callback function write_tx_data() can only fail
when our ENTRY_OWNER_DEVICE_DATA flag on a queue entry
failed to determine the entry was not available and
it is in fact still owned by the hardware.
This means that if that function fails the queue
must be stopped in mac80211.

When rt2x00queue_get_queue() returns NULL in the TX
path, it means mac80211 has passed us an invalid queue,
although this should be impossible, it shouldn't hurt
if we send mac80211 a signal to stop the queue either.

Both issues can simply be resolved by removing their
manual failure handler and making them use the failure path
provided in rt2x00mac_tx().

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:32:54 -05:00
Ivo van Doorn
0f829b1d6f rt2x00: Move rt73usb register access wrappers into rt2x00usb
rt2500usb and rt73usb have different register word sizes,
for that reason the register access wrappers were never
moved into rt2x00usb.
With rt2800usb on its way, we should favor the 32bit
register access and move those wrappers into rt2x00usb.
That saves duplicate code, since only rt2500usb will
need the special 16bit wrappers.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:32:53 -05:00
Ivo van Doorn
c9c3b1a5de rt2x00: Cleanup indirect register access
All code which accessed indirect registers was similar
in respect to the for-loop, the given timeout, etc.
Move it into a seperate function, which for PCI drivers
can be moved into rt2x00pci.

This allows us to cleanup the cleanup the code further
by removing the goto statementsand making the codepath
look a bit nicer.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:32:53 -05:00
Johannes Berg
9764f3f9c3 ath5k: name pci driver "ath5k" too
Call the ath5k pci driver struct "ath5k" too to be less
confusing in sysfs.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:32:53 -05:00
Martin Xu
02969b38e6 ath5k: disable beacon filter when station is not associated
Ath5k driver has too many interrupts per second at idle
http://bugzilla.kernel.org/show_bug.cgi?id=11749

Signed-off-by: Martin Xu <martin.xu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:13:08 -05:00
Cheng Renquan
33ab625f2a ath5k: fix Security issue in DebugFS part of ath5k
http://bugzilla.kernel.org/show_bug.cgi?id=12076

Remove any write access to groups and others, only keep write permission
to its owner, usually only root user.

Reported-by: Jérôme Poulin <jeromepoulin@gmail.com>
Signed-off-by: Cheng Renquan <crquan@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:13:08 -05:00
Luis R. Rodriguez
b4b6cda229 ath9k: correct expected max RX buffer size
We should only tell the hardware its capable of DMA'ing
to us only what we asked dev_alloc_skb(). Prior to this
it is possible a large RX'd frame could have corrupted
DMA data but for us but we were saved only because we
were previously also pci_map_single()'ing the same large
value. The issue prior to this though was we were unmapping
a smaller amount which the prior DMA patch fixed.

Signed-off-by: Bennyam Malavazi <Bennyam.Malavazi@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:13:08 -05:00
Luis R. Rodriguez
ca0c7e5101 ath9k: Fix SW-IOMMU bounce buffer starvation
This should fix the SW-IOMMU bounce buffer starvation
seen ok kernel.org bugzilla 11811:

http://bugzilla.kernel.org/show_bug.cgi?id=11811

Users on MacBook Pro 3.1/MacBook v2 would see something like:

DMA: Out of SW-IOMMU space for 4224 bytes at device 0000:0b:00.0

Unfortunately its only easy to trigger on MacBook Pro 3.1/MacBook v2
so far so its difficult to debug (even with swiotlb=force).

We were pci_unmap_single()'ing less bytes than what we called
for with pci_map_single() and as such we were starving
the swiotlb from its 64MB amount of bounce buffers. We remain
consistent and now always use sc->rxbufsize for RX. While at
it we update the beacon DMA maps as well to only use the data
portion of the skb, previous to this we were pci_map_single()'ing
more data for beaconing than what we tell the hardware it can use,
therefore pushing more iotlb abuse.

Still not sure why this is so easily triggerable on
MacBook Pro 3.1, it may be the hardware configuration
tends to use more memory > 3GB mark for DMA.

Signed-off-by: Maciej Zenczykowski <zenczykowski@gmail.com>
Signed-off-by: Bennyam Malavazi <Bennyam.Malavazi@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:13:08 -05:00
Johannes Berg
e91af0af86 iwlagn: fix DMA sync
For the RX DMA fix for iwlwifi ("iwlagn: fix RX skb alignment") Luis
pointed out:

> aligned_dma_addr can obviously be > real_dma_addr at this point, what
> guarantees we can use it on our own whim?

I asked around, and he's right, there may be platforms that do not allow
passing such such an address to the DMA API functions. This patch
changes it by using the proper dma_sync_single_range_for_cpu API
invented for this purpose.

Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-25 16:13:08 -05:00
David S. Miller
2f9889a20c Revert "hso: Fix crashes on close."
This reverts commit 4a3e818181.

On request from Alan Cox.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 03:53:09 -08:00
David S. Miller
ab153d84d9 Revert "hso: Fix free of mutexes still in use."
This reverts commit 52429eb216.

On request from Alan Cox.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 03:52:46 -08:00
David S. Miller
cd90ee1799 Revert "hso: Add TIOCM ioctl handling."
This reverts commit 7ea3a9ad9b.

On request from Alan Cox.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 03:52:17 -08:00
Alexander Duyck
69d728baf6 igb: loopback bits not correctly cleared from RCTL register
This change forces the bits to 0 by using an &= operation with an inverted
mask of all options instead of using an |= with a value of 0.

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-25 01:04:03 -08:00
Alexander Duyck
9b07f3d315 igb: remove unneeded bit refrence when enabling jumbo frames
There is a reference to a Buffer Size extention bit that is unneded by
82575/82576 hardware.  Since it is not needed it should be removed from the
code.

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-25 01:03:26 -08:00
Jeff Kirsher
7a6b6f515f DCB: fix kconfig option
Since the netlink option for DCB is necessary to actually be useful,
simplified the Kconfig option.  In addition, added useful help text for the
Kconfig option.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 01:02:08 -08:00
Trent Piepho
11c6dd2c72 phylib: Add Vitesse VSC8221 SGMII PHY
PHY is mostly compatible with the existing VSC8244 PHY.  The init sequence
is different and the interrupt mask lacks some bits present in the VSC8244.

Rather than making a copy of the existing VSC234x config_intr function and
change one constant, I modify it to select the interrupt mask based on
which driver is calling it.  This lets it be used by both drivers.

Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 01:00:47 -08:00
Denis Joseph Barrow
9c8f92aed1 hso: Hook up ->reset_resume
Made usb_drivers reset_resume function point to hso_resume this 
fixes problems a usb reset is done when the network interface
is left idle for a few minutes. Possibly reset_resume should
initialise hardware more but this works in the common case.

Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 00:36:10 -08:00
Denis Joseph Barrow
7ea3a9ad9b hso: Add TIOCM ioctl handling.
Makes TIOCM ioctls for Data Carrier Detect & related functions
work like /drivers/serial/serial-core.c potentially needed 
for pppd & similar user programs.   

Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 00:35:26 -08:00
Denis Joseph Barrow
52429eb216 hso: Fix free of mutexes still in use.
A new structure hso_mutex_table had to be declared statically
& used as as hso_device mutex_lock(&serial->parent->mutex) etc
is freed in hso_serial_open & hso_serial_close by kref_put while
the mutex is still in use.

This is a substantial change but should make the driver much stabler.

Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 00:33:13 -08:00
Denis Joseph Barrow
89930b7b5e hso: Fix URB submission -EINVAL.
Added check for IFF_UP in hso_resume, this should eliminate -EINVAL (-22)
errors caused from urb's being submitted twice, once by hso_resume
& once in hso_net_open, if suspend/resume USB power saving  mode is enabled

Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 00:30:48 -08:00
Denis Joseph Barrow
4a3e818181 hso: Fix crashes on close.
Moved serial_open_count in hso_serial_open to
prevent crashes owing to the serial structure being made NULL
when hso_serial_close is called even though hso_serial_open
returned -ENODEV, Alan Cox pointed out this happens,
also put in sanity check in hso_serial_close
to check for a valid serial structure which should prevent
the most reproducable crash in the driver when the hso device
is disconnected while in use.

Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 00:27:50 -08:00