Commit Graph

116323 Commits

Author SHA1 Message Date
stephen hemminger 1a7a10325d niu: support 64 bit stats interface
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-08 23:26:33 -07:00
stephen hemminger c5f7ef72fc myricom: update to 64 bit stats
Driver was already keeping 64 bit counters, just not using the new interface.

Ps: IMHO drivers should not be duplicating network device
stats into ethtool stats. It is useless duplication.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-08 23:26:33 -07:00
stephen hemminger f20530bc98 enic: update to support 64 bit stats
The device driver already uses 64 bit statistics, it just
doesn't use the 64 bit interface.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-08 23:26:32 -07:00
stephen hemminger 47fd428cd0 netxen: convert to 64 bit statistics
Change to 64 bit statistics interface, driver was already maintaining 64 bit
value.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-08 23:26:32 -07:00
stephen hemminger 6311cc44a2 veth: convert to 64 bit statistics
Not much change, device was already keeping per cpu statistics.
Use recent 64 statistics interface.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-08 23:26:32 -07:00
stephen hemminger 95305f6c3b vmxnet3: convert to 64 bit stats interface
Convert vmxnet3 driver to 64 bit statistics interface.
This driver was already counting packet per queue in a 64 bit value so not
a huge change. Eliminate unused old net_device_stats structure.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Scott J. Goldman <scottjg@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-08 23:26:32 -07:00
stephen hemminger 8ef207d63f iph: use default get_stats
This driver keeps stats in net_device stats therefore it
does not need to define it's own get_stats hook.

Also, use standard format for net_device_ops (without &).

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-08 17:05:29 -07:00
John W. Linville c0c33addcb Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2011-06-08 13:44:21 -04:00
Stephen Rothwell ffbc03bc75 net: add needed interrupt.h
Fixes these errors after the removal of interrupt.h from netdevice.h:

drivers/net/ll_temac_main.c: In function 'temac_open':
drivers/net/ll_temac_main.c:859:2: error: implicit declaration of function 'request_irq'
drivers/net/ll_temac_main.c:870:2: error: implicit declaration of function 'free_irq'
drivers/net/ll_temac_main.c: In function 'temac_poll_controller':
drivers/net/ll_temac_main.c:903:2: error: implicit declaration of function 'disable_irq'
drivers/net/ll_temac_main.c:909:2: error: implicit declaration of function 'enable_irq'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-08 00:15:34 -07:00
Mohammed Shafi Shajakhan 931749bf78 ath9k: make use of a helper to get paprd scale factor
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-07 14:46:13 -04:00
Yogesh Ashok Powar 36cb7cce23 mwifiex: disable transmission buffer aggregation for AMSDU packets
Padding per MSDU will affect the length of next packet and hence
the exact length of next packet is uncertain here.

Also, aggregation of transmission buffer, while downloading the
data to the card, wont gain much on the AMSDU packets as the AMSDU
packets utilizes the transmission buffer space to the maximum
(adapter->tx_buf_size).

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-07 14:44:03 -04:00
Yogesh Ashok Powar fb3c19bc96 mwifiex: adding check for enough space before padding
All MSDUs, except the last one in an AMSDU, should end up at 4
bytes boundary. There is need to check if enough skb_tailroom
space exists before padding the skb.

Also re-arranging code for better readablity.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-07 14:44:03 -04:00
Yogesh Ashok Powar a8fe32937e mwifiex: Remove redundant skb_queue_empty checks
The check of skb list empty before calling skb_peek and skb_dequeue is
redundant. These functions returns NULL if the list is empty.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-07 14:44:02 -04:00
Yogesh Ashok Powar fcf2176c87 mwifiex: remove list traversal in mwifiex_num_pkts_in_txq
Instead of counting the number of packets in txq
for particular RA list before AMSDU creation,
maintain a counter which will keep track of the
same.

This will reduce some MIPS while generating AMSDU
traffic as we only have to check the counter instead
of traversing through skb list.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-07 14:44:02 -04:00
Greg Dietsche 4858682661 iwlwifi: remove unecessary if statement
the code always returns ret regardless, so if(ret) check is unecessary.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-07 14:44:02 -04:00
Stanislaw Gruszka f973f87ec1 iwlagn: refactor iwlagn_mac_channel_switch
Use less indentions and remove uneeded irq-save flags.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-07 14:44:02 -04:00
Shahar Levi 70559a0665 wl12xx: Stop BA session event from device
Adding new event that close RX BA session in case of periodic BT activity
limiting WLAN activity.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-07 14:44:02 -04:00
John W. Linville 41bfce8ede Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2011-06-07 14:07:11 -04:00
David S. Miller cb2bad862e Merge branch 'can/at91-sam9x5' of git://git.pengutronix.de/git/mkl/linux-2.6 2011-06-07 01:03:56 -07:00
Alexey Dobriyan a6b7a40786 net: remove interrupt.h inclusion from netdevice.h
* remove interrupt.g inclusion from netdevice.h -- not needed
* fixup fallout, add interrupt.h and hardirq.h back where needed.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-06 22:55:11 -07:00
Selvin Xavier aedfebbaa7 be2net: Fix Rx pause counter for lancer
Fixed Rx pause counter for Lancer. Swapping hi and lo words.

Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-06 22:53:52 -07:00
Greg Dietsche 324dd96d2b qlge: remove unecessary if statement
the code always returns 'status' regardless, so if(status) check is unecessary.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-06 22:53:13 -07:00
Roopa Prabhu c97c894dc7 enic: Add support for MTU change via port profile on a dynamic vnic
enic driver gets MTU change notifications for MTU changes in the
port profile associated to a dynamic vnic. This patch adds support
in enic driver to set new MTU on the dynamic vnic and dynamically
adjust its buffers with new MTU size in response to such notifications.

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-06 22:48:47 -07:00
John Fastabend 8d13e670d3 macvlan: add VLAN filters to lowerdev
Stacking VLANs on top of the macvlan device does not
work if the lowerdev device is using vlan filters set
by NETIF_F_HW_VLAN_FILTER. Add ndo ops to pass vlan
calls to lowerdev.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-06 16:43:43 -07:00
Stanislaw Gruszka 51892dbbd5 iwl4965: set tx power after rxon_assoc
Setting tx power can be deferred during scan or changing channel.
If after that correct tx power settings will not be sent to device,
we can observe transmission problems and timeouts. Force to send
tx power settings also after partial rxon change, to assure device
always be configured with up-to-date settings.

Resolves:
https://bugzilla.kernel.org/show_bug.cgi?id=36492

Cc: stable@kernel.org # 2.6.39+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-06 15:24:18 -04:00
Stanislaw Gruszka 3bb42a6496 rt2x00: fix rmmod crash
Avoid queue and run autowakeup_work when device is not present anymore.
That prevent rmmod and device remove crash introduced by:

commit 1c0bcf89d8
Author: Ivo van Doorn <ivdoorn@gmail.com>
Date:   Sat Apr 30 17:18:18 2011 +0200

    rt2x00: Add autowake support for USB hardware

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-06 15:24:18 -04:00
Stanislaw Gruszka 42b70a5f6d iwlagn: use cts-to-self protection on 5000 adapters series
This patch fixes 802.11n stability and performance regression we have
since 2.6.35. It boost performance on my 5GHz N-only network from about
5MB/s to 8MB/s. Similar percentage boost can be observed on 2.4 GHz.

These are test results of 5x downloading of approximately 700MB iso
image:

vanilla: 5.27 5.22 4.94 4.47 5.31 ; avr 5.0420 std 0.35110
patched: 8.07 7.95 8.06 7.99 7.96 ; avr 8.0060 std 0.055946

This was achieved with NetworkManager configured to do not perform
periodical scans, by configuring constant BSSID. With periodical scans,
after some time, performance downgrade to unpatched driver level, like
in example below:

patched: 7.40 7.61 4.28 4.37 4.80 avr 5.6920 std 1.6683

However patch still make better here, since similar test on unpatched
driver make link disconnects with below messages after some time:

wlan1: authenticate with 00:23:69:35:d1:3f (try 1)
wlan1: authenticate with 00:23:69:35:d1:3f (try 2)
wlan1: authenticate with 00:23:69:35:d1:3f (try 3)
wlan1: authentication with 00:23:69:35:d1:3f timed out

On 2.6.35 kernel patch helps against connection hangs with messages:

iwlagn 0000:20:00.0: queue 10 stuck 3 time. Fw reload.
iwlagn 0000:20:00.0: On demand firmware reload
iwlagn 0000:20:00.0: Stopping AGG while state not ON or starting

Cc: stable@kernel.org # 2.6.35+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-06 15:24:17 -04:00
Uwe Kleine-König b9e379bccd net/can: allow CAN_AT91 on AT91SAM9X5
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2011-06-06 15:18:33 +02:00
Marc Kleine-Budde 6388b39614 can: at91_can: add support for the AT91SAM9X5 SOCs
The AT91SAM9X5 SOCs have a similar CAN core, but they only have 8 compared
to 16 mailboxes on the AT91SAM9263 SOC. Another difference is that the bits
defining the state of the CAN core are cleared on read, thus the driver
has to derive the state by looking at the error counters.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2011-06-06 14:50:57 +02:00
Marc Kleine-Budde 07a648e668 can: at91_can: register mb0 sysfs entry only on at91sam9263
This patch prepares the driver for the at91sam9X5 processors,
which don't have the mb0 bug.
(See commit 3a5655a5b5 for more details.)

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2011-06-06 14:20:55 +02:00
Marc Kleine-Budde d3d47264a3 can: at91_can: add id_table and convert prime mailbox constats to functions
This is the second of two patches converting the at91_can driver from a
compile time mailbox setup to a dynamic one.

This patch first adds a id_table to the platform driver. Depending on the
driver_data the constants for the mailbox setup is selected. Then all
remaining prime mailbox constants are converted to functions, using the
run time selected mailbox constants.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2011-06-06 14:20:54 +02:00
Marc Kleine-Budde 79008997e2 can: at91_can: convert derived mailbox constants into functions
This is the first of two patches converting the at91_can driver from a
compile time mailbox setup to a dynamic one.

This patch converts all derived mailbox constants to functions.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2011-06-06 11:02:17 +02:00
Marc Kleine-Budde b049994d0f can: at91_can: rename AT91_MB_RX_MASK to AT91_IRQ_MB_RX
... and use it for AT91_NEXT_MB_MASK,
AT91_IRQ_MB_RX and AT91_IRQ_MB_RX, too.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2011-06-06 11:02:16 +02:00
Marc Kleine-Budde 267cbe047c can: at91_can: directly define AT91_MB_RX_LAST
...instead of deriving it from AT91_MB_RX_FIRST and AT91_MB_RX_NUM.
This removes a level of computation, when switching the driver from
compile time constants to runtime values.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2011-06-06 11:01:32 +02:00
Marc Kleine-Budde 9c2e0a6d2f can: at91_can: let get_tx_* functions return unsigned int
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2011-06-06 11:00:10 +02:00
Marc Kleine-Budde e14ee40bec can: at91_can: don't copy data to rx'ed RTR frames
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
2011-06-06 11:00:10 +02:00
Marc Kleine-Budde 5613fff2dc can: at91_can: fix comment about priv->tx_next
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2011-06-06 11:00:10 +02:00
Marc Kleine-Budde 44d8566657 can: at91_can: don't align struct definitions
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2011-06-06 11:00:09 +02:00
Joe Perches 6403eab143 drivers/net: Remove unnecessary semicolons
Semicolons are not necessary after switch/while/for/if braces
so remove them.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-05 14:33:40 -07:00
David S. Miller e990b37b90 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-06-04 13:38:31 -07:00
Linus Torvalds 23c79d31a3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] Fix oops caused by queue refcounting failure
2011-06-04 23:19:51 +09:00
Linus Torvalds 0e833d8cfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (40 commits)
  tg3: Fix tg3_skb_error_unmap()
  net: tracepoint of net_dev_xmit sees freed skb and causes panic
  drivers/net/can/flexcan.c: add missing clk_put
  net: dm9000: Get the chip in a known good state before enabling interrupts
  drivers/net/davinci_emac.c: add missing clk_put
  af-packet: Add flag to distinguish VID 0 from no-vlan.
  caif: Fix race when conditionally taking rtnl lock
  usbnet/cdc_ncm: add missing .reset_resume hook
  vlan: fix typo in vlan_dev_hard_start_xmit()
  net/ipv4: Check for mistakenly passed in non-IPv4 address
  iwl4965: correctly validate temperature value
  bluetooth l2cap: fix locking in l2cap_global_chan_by_psm
  ath9k: fix two more bugs in tx power
  cfg80211: don't drop p2p probe responses
  Revert "net: fix section mismatches"
  drivers/net/usb/catc.c: Fix potential deadlock in catc_ctrl_run()
  sctp: stop pending timers and purge queues when peer restart asoc
  drivers/net: ks8842 Fix crash on received packet when in PIO mode.
  ip_options_compile: properly handle unaligned pointer
  iwlagn: fix incorrect PCI subsystem id for 6150 devices
  ...
2011-06-04 23:16:00 +09:00
Linus Torvalds 4f1ba49efa Merge branch 'for-linus' of git://git.kernel.dk/linux-block
* 'for-linus' of git://git.kernel.dk/linux-block:
  block: Use hlist_entry() for io_context.cic_list.first
  cfq-iosched: Remove bogus check in queue_fail path
  xen/blkback: potential null dereference in error handling
  xen/blkback: don't call vbd_size() if bd_disk is NULL
  block: blkdev_get() should access ->bd_disk only after success
  CFQ: Fix typo and remove unnecessary semicolon
  block: remove unwanted semicolons
  Revert "block: Remove extra discard_alignment from hd_struct."
  nbd: adjust 'max_part' according to part_shift
  nbd: limit module parameters to a sane value
  nbd: pass MSG_* flags to kernel_recvmsg()
  block: improve the bio_add_page() and bio_add_pc_page() descriptions
2011-06-04 08:11:26 +09:00
Linus Torvalds 1f3bd0f2ac Merge branch 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  dmaengine: shdma: fix a regression: initialise DMA channels for memcpy
  dmaengine: shdma: Fix up fallout from runtime PM changes.
  Revert "clocksource: sh_cmt: Runtime PM support"
  Revert "clocksource: sh_tmu: Runtime PM support"
  sh: Fix up asm-generic/ptrace.h fallout.
  sh64: Move from P1SEG to CAC_ADDR for consistent sync.
  sh64: asm/pgtable.h needs asm/mmu.h
  sh: asm/tlb.h needs linux/swap.h
  sh: mark DMA slave ID 0 as invalid
  sh: Update shmin to reflect PIO dependency.
  sh: arch/sh/kernel/process_32.c needs linux/prefetch.h.
  sh: add MMCIF runtime PM support on ecovec
  sh: switch ap325rxa to dynamically manage the platform camera
2011-06-04 07:04:25 +09:00
Linus Torvalds 55db4c64ed Revert "tty: make receive_buf() return the amout of bytes received"
This reverts commit b1c43f82c5.

It was broken in so many ways, and results in random odd pty issues.

It re-introduced the buggy schedule_work() in flush_to_ldisc() that can
cause endless work-loops (see commit a5660b41af6a: "tty: fix endless
work loop when the buffer fills up").

It also used an "unsigned int" return value fo the ->receive_buf()
function, but then made multiple functions return a negative error code,
and didn't actually check for the error in the caller.

And it didn't actually work at all.  BenH bisected down odd tty behavior
to it:
  "It looks like the patch is causing some major malfunctions of the X
   server for me, possibly related to PTYs.  For example, cat'ing a
   large file in a gnome terminal hangs the kernel for -minutes- in a
   loop of what looks like flush_to_ldisc/workqueue code, (some ftrace
   data in the quoted bits further down).

   ...

   Some more data: It -looks- like what happens is that the
   flush_to_ldisc work queue entry constantly re-queues itself (because
   the PTY is full ?) and the workqueue thread will basically loop
   forver calling it without ever scheduling, thus starving the consumer
   process that could have emptied the PTY."

which is pretty much exactly the problem we fixed in a5660b41af.

Milton Miller pointed out the 'unsigned int' issue.

Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reported-by: Milton Miller <miltonm@bga.com>
Cc: Stefan Bigler <stefan.bigler@keymile.com>
Cc: Toby Gray <toby.gray@realvnc.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-06-04 06:33:24 +09:00
Wey-Yi Guy 805a3b8107 iwlagn: call commit_rxon function directly
No need to go though multiple levels of indirect call to send RXON command.
Call it directly

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03 15:16:38 -04:00
Wey-Yi Guy e80d70e98b iwlagn: direct call to post_scan function
After driver split, no need to use function "ops" for post_scan.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03 15:16:37 -04:00
Wey-Yi Guy c2b821d7a5 iwlagn: move all post scan functions in one place
Both tx power and power save are being done after scan complete, move into
post_scan function

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03 15:16:37 -04:00
Wey-Yi Guy 15b3f3b006 iwlagn: set smps mode after assoc for 1000 device
For some timing reason, 1000 device having problem to kick-in to aggregation
without sending rxon assoc command. This is a W/A until find the real reason

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03 15:16:36 -04:00
Wey-Yi Guy 88e9ba76bf iwlagn: save the latest smps mode
When change smps mode due to bt coex, save it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03 15:16:36 -04:00