pandora-kernel.git
12 years agoe1000e: fix skb truesize underestimation
Eric Dumazet [Thu, 13 Oct 2011 08:03:36 +0000 (08:03 +0000)]
e1000e: fix skb truesize underestimation

e1000e allocates a page per skb fragment. We must account
PAGE_SIZE increments on skb->truesize, not the actual frag length.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoixgbe: fix skb truesize underestimation
Eric Dumazet [Thu, 13 Oct 2011 07:59:41 +0000 (07:59 +0000)]
ixgbe: fix skb truesize underestimation

ixgbe allocates half a page per skb fragment. We must account
PAGE_SIZE/2 increments on skb->truesize, not the actual frag length.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoigb: fix skb truesize underestimation
Eric Dumazet [Thu, 13 Oct 2011 07:56:41 +0000 (07:56 +0000)]
igb: fix skb truesize underestimation

e1000 allocates half a page per skb fragment. We must account
PAGE_SIZE/2 increments on skb->truesize, not the actual frag length.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoe1000: fix skb truesize underestimation
Eric Dumazet [Thu, 13 Oct 2011 07:53:42 +0000 (07:53 +0000)]
e1000: fix skb truesize underestimation

e1000 allocates a full page per skb fragment. We must account PAGE_SIZE
increments on skb->truesize, not the actual frag length.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2: fix skb truesize underestimation
Eric Dumazet [Thu, 13 Oct 2011 07:50:19 +0000 (07:50 +0000)]
bnx2: fix skb truesize underestimation

bnx2 allocates a full page per fragment. We must account PAGE_SIZE
increments on skb->truesize, not the actual frag length.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: fix truesize errors
Eric Dumazet [Thu, 13 Oct 2011 06:31:02 +0000 (06:31 +0000)]
be2net: fix truesize errors

Fix skb truesize underestimations of this driver.

Each frag truesize is exactly rx_frag_size bytes. (2048 bytes per
default)

A driver should not use "sizeof(struct sk_buff)" at all.

Signed-off-by: Eric Dumazet <eric.dumazet>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: more accurate skb truesize
Eric Dumazet [Thu, 13 Oct 2011 07:28:54 +0000 (07:28 +0000)]
net: more accurate skb truesize

skb truesize currently accounts for sk_buff struct and part of skb head.
kmalloc() roundings are also ignored.

Considering that skb_shared_info is larger than sk_buff, its time to
take it into account for better memory accounting.

This patch introduces SKB_TRUESIZE(X) macro to centralize various
assumptions into a single place.

At skb alloc phase, we put skb_shared_info struct at the exact end of
skb head, to allow a better use of memory (lowering number of
reallocations), since kmalloc() gives us power-of-two memory blocks.

Unless SLUB/SLUB debug is active, both skb->head and skb_shared_info are
aligned to cache lines, as before.

Note: This patch might trigger performance regressions because of
misconfigured protocol stacks, hitting per socket or global memory
limits that were previously not reached. But its a necessary step for a
more accurate memory accounting.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Andi Kleen <ak@linux.intel.com>
CC: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
David S. Miller [Thu, 13 Oct 2011 18:00:06 +0000 (14:00 -0400)]
Merge git://git./linux/kernel/git/jkirsher/net-next

12 years agoigb: Version bump.
Carolyn Wyborny [Fri, 7 Oct 2011 07:00:27 +0000 (07:00 +0000)]
igb: Version bump.

This change updates the driver version to 3.2.10.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Loopback functionality supports for i350 devices
Akeem G. Abodunrin [Thu, 8 Sep 2011 20:39:48 +0000 (20:39 +0000)]
igb: Loopback functionality supports for i350 devices

This patch adds VMDq loopback pf support for i350 devices. The patch
is necessary since the register that enabled loopback was moved and
renamed from DTXSWC to TXSWC.

Signed-off-by: "Akeem G. Abodunrin" <akeem.g.abodunrin@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: fix static function warnings reported by sparse
Emil Tantilov [Tue, 30 Aug 2011 06:35:04 +0000 (06:35 +0000)]
igb: fix static function warnings reported by sparse

igb_update/validate_nvm_checksum_with_offset() should be static.
Also removes unneeded prototypes for the above functions.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Add workaround for byte swapped VLAN on i350 local traffic
Alexander Duyck [Fri, 26 Aug 2011 07:47:11 +0000 (07:47 +0000)]
igb: Add workaround for byte swapped VLAN on i350 local traffic

On i350 when traffic is looped back from a VF to the PF the value is byte
swapped from the normal format.  In order to address this we need to add a
flag indicating that the ring will need to byte swap the loopback packets
prior to processing them.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Drop unnecessary write of E1000_IMS from igb_msix_other
Alexander Duyck [Fri, 26 Aug 2011 07:47:01 +0000 (07:47 +0000)]
igb: Drop unnecessary write of E1000_IMS from igb_msix_other

Since we mask interrupts in EIMS not in IMS there is no need to re-enable
mask bits in that register.  As such we can remove the write to IMS from
the end of igb_msix_other.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Fix features that are currently 82580 only and should also be i350
Alexander Duyck [Fri, 26 Aug 2011 07:46:55 +0000 (07:46 +0000)]
igb: Fix features that are currently 82580 only and should also be i350

This change allows support for per packet timesync and global device reset
on the i350 adapter.  These features were supported on both 82580 and i350
however it looks like several checks where not updated and as such the i350
support was not enabled.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Make certain one vector is always assigned in igb_request_irq
Alexander Duyck [Fri, 26 Aug 2011 07:46:45 +0000 (07:46 +0000)]
igb: Make certain one vector is always assigned in igb_request_irq

This change makes certain that one interrupt is always initialized in
igb_request_irq.  In addition we drop the use of adapter->pdev and
instead just call pdev since we made a local copy of the pointer earlier in
the function.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: avoid unnecessarily creating a local copy of the q_vector
Alexander Duyck [Fri, 26 Aug 2011 07:46:34 +0000 (07:46 +0000)]
igb: avoid unnecessarily creating a local copy of the q_vector

This is mostly a drop of unnecessary pointer defines for q_vector when we
don't have issues with line width and don't have multiple references to
the pointer.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Correct check for change in FCoE priority
Mark Rustad [Tue, 20 Sep 2011 03:00:22 +0000 (03:00 +0000)]
ixgbe: Correct check for change in FCoE priority

Correct a check for change in FCoE priority when IEEE mode DCB is in use.
In IEEE mode a different function has to be used to get the FCoE priority
mask. Also, the check for the mask assumed that only one priority was set.
In case there should be more than one, check just the bit.

These changes help avoid link flapping issues that can come up when IEEE
DCB is in use.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Add FCoE DDP allocation failure counters to ethtool stats.
Amir Hanania [Wed, 31 Aug 2011 02:07:55 +0000 (02:07 +0000)]
ixgbe: Add FCoE DDP allocation failure counters to ethtool stats.

Add 2 new counters to ethtool:
1. Count DDP allocation failure since we max the number of buffers
allowed in one DDP context.
2. Count DDP allocation failure since we max the number of buffers
allowed in one DDP context when we alloc an extra buffer.

Signed-off-by: Amir Hanania <amir.hanania@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Add protection from VF invalid target DMA
Greg Rose [Wed, 7 Sep 2011 05:59:35 +0000 (05:59 +0000)]
ixgbe: Add protection from VF invalid target DMA

It is possible for a VF to set an invalid target DMA address in its
Tx/Rx descriptor buffer pointers.  The workarounds in this patch
will guard against such an event and issue a VFLR to the VF in response.
The VFLR will shut down the VF until an administrator can take action
to investigate the event and correct the problem.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agonet-netlink: Add a new attribute to expose TOS values via netlink
Murali Raja [Wed, 12 Oct 2011 09:00:35 +0000 (09:00 +0000)]
net-netlink: Add a new attribute to expose TOS values via netlink

This patch exposes the tos value for the TCP sockets when the TOS flag
is requested in the ext_flags for the inet_diag request. This would mainly be
used to expose TOS values for both for TCP and UDP sockets. Currently it is
supported for TCP. When netlink support for UDP would be added the support
to expose the TOS values would alse be done. For IPV4 tos value is exposed
and for IPV6 tclass value is exposed.

Signed-off-by: Murali Raja <muralira@google.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: wireless: brcm80211: replace ndo_set_multicast_list with ndo_set_rx_mode
Stephen Rothwell [Wed, 12 Oct 2011 02:36:00 +0000 (13:36 +1100)]
net: wireless: brcm80211: replace ndo_set_multicast_list  with ndo_set_rx_mode

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: add support for Marvell pcie8766 chipset
Amitkumar Karwar [Wed, 12 Oct 2011 00:41:21 +0000 (17:41 -0700)]
mwifiex: add support for Marvell pcie8766 chipset

This patch supports 88W8766P chipset with a PCIe interface.

The corresponding firmware image file is located at:
"mrvl/pcie8766_uapsta.bin"

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Ramesh Radhakrishnan <rramesh@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocipso: remove an unneeded NULL check in cipso_v4_doi_add()
Dan Carpenter [Tue, 11 Oct 2011 22:43:53 +0000 (18:43 -0400)]
cipso: remove an unneeded NULL check in cipso_v4_doi_add()

We dereference doi_def on the line before the NULL check.  It has
been this way since 2008.  I checked all the callers and doi_def is
always non-NULL here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoath9k: only send FCS-fail packets to mac80211 if requested
Felix Fietkau [Sat, 8 Oct 2011 20:02:59 +0000 (22:02 +0200)]
ath9k: only send FCS-fail packets to mac80211 if requested

Prevents lots of broken frames from showing up on monitor interfaces
by default.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: fix a regression in key miss handling
Felix Fietkau [Sat, 8 Oct 2011 20:02:58 +0000 (22:02 +0200)]
ath9k_hw: fix a regression in key miss handling

The commit "ath9k_hw: Fix incorrect key_miss handling" changed the code
to only report key miss errors if a MIC error wasn't reported.
When checking the flags in that order in the MAC code, it might miss some
real events, because the value of the MIC error flag is undefined under
some conditions.

The primary issue addressed by the previous commit is making sure that
MIC errors are properly reported on the STA side. This can be fixed in
a better way by adding a separate rx status flag for key miss and
ignoring it for multicast frames.

This fix slightly improves stability in AP mode on some older hardware,
like AR9132.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove EEP_REG_1
Felix Fietkau [Sat, 8 Oct 2011 18:06:22 +0000 (20:06 +0200)]
ath9k_hw: remove EEP_REG_1

It was previously used for current_rd_ext

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath: remove ath_regulatory::current_rd_ext
Felix Fietkau [Sat, 8 Oct 2011 18:06:21 +0000 (20:06 +0200)]
ath: remove ath_regulatory::current_rd_ext

It is unused since the previous dead code that was using it had been
removed earlier.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: clean up tx power handling
Felix Fietkau [Sat, 8 Oct 2011 18:06:20 +0000 (20:06 +0200)]
ath9k_hw: clean up tx power handling

The code for handling various restrictions concerning regulatory limits,
antenna gain, etc. is very convoluted and duplicated across various
EEPROM parsing implementations, making it hard to review.

This patch partially cleans up the mess by unifying regulatory limit
handling in one function and simplifying handling of antenna gain.
It also removes unused transmit power scaling arrays from the EEPROM code,
which belonged to an unimplemented API that isn't supposed to be in
the driver anyway.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: make ath9k_hw_set_interrupts use ah->imask by default
Felix Fietkau [Sat, 8 Oct 2011 18:06:19 +0000 (20:06 +0200)]
ath9k_hw: make ath9k_hw_set_interrupts use ah->imask by default

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: disable unnecessary PHY error reporting
Felix Fietkau [Sat, 8 Oct 2011 13:49:57 +0000 (15:49 +0200)]
ath9k: disable unnecessary PHY error reporting

PHY errors relevant for ANI are always tracked by hardware counters, the
bits that allow them to pass through the rx filter are independent of that.
Enabling PHY errors in the rx filter often creates lots of useless DMA traffic
and might be responsible for some of the rx dma stop failure warnings.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: trivial: do not report any link quality instead of invalid one
Rafał Miłecki [Fri, 7 Oct 2011 20:39:35 +0000 (22:39 +0200)]
b43: trivial: do not report any link quality instead of invalid one

We don't want to report random quality info (new PHYs are affected).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: Change debug parameter to apply to individual drivers
Larry Finger [Fri, 7 Oct 2011 16:27:33 +0000 (11:27 -0500)]
rtlwifi: Change debug parameter to apply to individual drivers

The current debug parameter is applied to rtlwifi, which means that all
loaded drivers have the same level of debugging applied. In addition,
the previous method requires a two-step load process to enable debugging.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: dont orphan TX skb
Johannes Berg [Fri, 7 Oct 2011 12:55:40 +0000 (14:55 +0200)]
mac80211: dont orphan TX skb

This was another workaround for truesize "bugs".
The reason we did this was that when we orphaned
the SKB it wouldn't be truesize-checked later.
Now that the check is gone (and we just charge
the former smaller size to the socket) there's
no longer a reason to orphan the skb here.

Keep the skb charged to the socket until it is
really freed (or orphaned in TX status). This
helps flow control and allows us to get at the
socket later for other purposes.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: dont adjust truesize
Johannes Berg [Fri, 7 Oct 2011 12:55:39 +0000 (14:55 +0200)]
mac80211: dont adjust truesize

There's no need to adjust truesize.

The history of this was that we always ran into
skb_truesize_bug (via skb_truesize_check) which
has since been removed in commit 92a0acce186cd.
skb_truesize_check() checked that truesize  was
bigger or equal to the actual allocation, which
would trigger in mac80211 due to header adding.
The check no longer exists and we shouldn't be
messing with the truesize anwyay.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: parse radiotap header earlier
Johannes Berg [Fri, 7 Oct 2011 12:01:26 +0000 (14:01 +0200)]
mac80211: parse radiotap header earlier

We can now move the radiotap header parsing into
ieee80211_monitor_start_xmit(). This moves it out of
the hotpath, and also helps the code since now the
radiotap header will no longer be present in
ieee80211_xmit() etc. which is easier to understand.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: move fragment flag to info flag as dont-fragment
Johannes Berg [Fri, 7 Oct 2011 12:01:25 +0000 (14:01 +0200)]
mac80211: move fragment flag to info flag as dont-fragment

The purpose of this is two-fold:
 1) by moving it out of tx_data.flags, we can in
    another patch move the radiotap parsing so it
    no longer is in the hotpath
 2) if a device implements fragmentation but can
    optionally skip it, the radiotap request for
    not doing fragmentation may be honoured

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove tx_data ethertype
Johannes Berg [Fri, 7 Oct 2011 12:01:24 +0000 (14:01 +0200)]
mac80211: remove tx_data ethertype

It's set, but never used, so kill it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: optimise monitor xmit
Johannes Berg [Fri, 7 Oct 2011 12:01:23 +0000 (14:01 +0200)]
mac80211: optimise monitor xmit

Since the only way the interface can be a monitor
interface in ieee80211_xmit() is because the frame
came from ieee80211_monitor_start_xmit() we can
move all the code there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Update injection documentation
Helmut Schaa [Fri, 7 Oct 2011 09:53:41 +0000 (11:53 +0200)]
mac80211: Update injection documentation

Add documentation about NOACK tx flag usage.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fix retry counting / BAR handling during queue flush
Felix Fietkau [Fri, 7 Oct 2011 00:28:15 +0000 (02:28 +0200)]
ath9k: fix retry counting / BAR handling during queue flush

When tx is suspended temporarily and the queue is flushed, do not increase
the retry count or attempt to send out BAR frames. Instead simply retry
the affected subframes normally after the reset.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: improve PS filter clearing and retry counting for A-MPDU
Felix Fietkau [Fri, 7 Oct 2011 00:28:14 +0000 (02:28 +0200)]
ath9k: improve PS filter clearing and retry counting for A-MPDU

Do not increment the retry counter if packets to a sleeping station
were not sent because of tx failure, instead of only checking the filter
flag.
Clear the PS filter only after an A-MPDU was reported as filtered,
otherwise the hardware might do some unnecessary extra retransmissions.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: keep track of what's triggering hardware resets
Felix Fietkau [Fri, 7 Oct 2011 00:28:13 +0000 (02:28 +0200)]
ath9k: keep track of what's triggering hardware resets

Export how many times each of the reset triggers has fired through debugfs.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: indicate which queues are blocked when stopping tx fails
Felix Fietkau [Fri, 7 Oct 2011 00:28:12 +0000 (02:28 +0200)]
ath9k: indicate which queues are blocked when stopping tx fails

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Fix regression that allowed mpaths between non-peers.
Javier Cardona [Thu, 6 Oct 2011 21:54:22 +0000 (14:54 -0700)]
mac80211: Fix regression that allowed mpaths between non-peers.

Mesh paths should only exist over established peer links.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: fix smatch errors
Yogesh Ashok Powar [Wed, 5 Oct 2011 21:58:24 +0000 (14:58 -0700)]
mwifiex: fix smatch errors

drivers/net/wireless/mwifiex/main.c +828 mwifiex_remove_card(52)
  error: potential null derefence 'priv'.
drivers/net/wireless/mwifiex/main.c +828 mwifiex_remove_card(52)
  error: we previously assumed 'priv' could be null (see line 820)
drivers/net/wireless/mwifiex/txrx.c +90 mwifiex_process_tx(24)
  error: potential null derefence 'local_tx_pd'.
drivers/net/wireless/mwifiex/sta_ioctl.c +766
mwifiex_rate_ioctl_set_rate_value(30)
  error: buffer overflow 'rate' 14 <= 14

Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: remove some bogus error handling code
Dan Carpenter [Wed, 5 Oct 2011 05:48:20 +0000 (08:48 +0300)]
ath9k: remove some bogus error handling code

If "axq_qnum >= ARRAY_SIZE(sc->tx.txq)", then the call to
ath9k_hw_releasetxqueue() would read beyond the end of the ah->txq[]
array and possibly corrupt memory.  Fortunately,
ath9k_hw_setuptxqueue() doesn't return high values of "axq_qnum" and
this code can be removed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: remove some unneeded error handling code
Dan Carpenter [Wed, 5 Oct 2011 05:46:37 +0000 (08:46 +0300)]
ath5k: remove some unneeded error handling code

th5k_hw_setup_tx_queue() returns a valid offset into the ah->ah_txq[]
array.  The ah->ah_txq[] and the ah->txqs[] array are the same size.
Both have AR5K_NUM_TX_QUEUES elements.  So this error handling code
will never trigger.

Also it's wrong.  The call to ath5k_hw_release_tx_queue() with a qnum
of AR5K_NUM_TX_QUEUES or more will just trigger a WARN_ON() and
return.  Or if it missed the WARN_ON(), it would just corrupt some
memory and return.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix offchannel TX cookie matching
Johannes Berg [Tue, 4 Oct 2011 16:27:10 +0000 (18:27 +0200)]
mac80211: fix offchannel TX cookie matching

When I introduced in-kernel off-channel TX I
introduced a bug -- the work can't be canceled
again because the code clear the skb pointer.
Fix this by keeping track separately of whether
TX status has already been reported.

Cc: stable@kernel.org [2.6.38+]
Reported-by: Jouni Malinen <j@w1.fi>
Tested-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: separate init calib and rt calib
Wey-Yi Guy [Tue, 4 Oct 2011 14:10:19 +0000 (07:10 -0700)]
iwlagn: separate init calib and rt calib

My previous patch for init calib cfg disable a set of calibration for both
init and runtime which cause performance issue, Fix it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: pass no-CCK flag through to HW scan
Johannes Berg [Tue, 4 Oct 2011 13:07:33 +0000 (15:07 +0200)]
mac80211: pass no-CCK flag through to HW scan

This is needed so that offloaded scan can do the
right thing. Without this patch, the no_cck flag
contains random values from the kernel heap.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'for-linville' of git://github.com/lucacoelho/wl12xx
John W. Linville [Tue, 11 Oct 2011 19:56:29 +0000 (15:56 -0400)]
Merge branch 'for-linville' of git://github.com/lucacoelho/wl12xx

12 years agonet: wireless: add brcm80211 drivers
Arend van Spriel [Wed, 5 Oct 2011 11:19:03 +0000 (13:19 +0200)]
net: wireless: add brcm80211 drivers

Add the brcm80211 tree to drivers/net/wireless, and disable the version that's
in drivers/staging.  This version includes the sources currently in staging,
plus any changes that have been sent out for review.

Sources in staging will be deleted in a followup patch.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'for-davem' of git://git.infradead.org/users/linville/wireless-next
David S. Miller [Tue, 11 Oct 2011 19:39:21 +0000 (15:39 -0400)]
Merge branch 'for-davem' of git://git.infradead.org/users/linville/wireless-next

12 years agoMerge branch 'master' of git://git.infradead.org/users/linville/wireless-next into...
John W. Linville [Tue, 11 Oct 2011 19:35:42 +0000 (15:35 -0400)]
Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem

Conflicts:
Documentation/feature-removal-schedule.txt

12 years agoath6kl: fixup merge damage in ath6kl_mgmt_tx
John W. Linville [Tue, 11 Oct 2011 19:33:10 +0000 (15:33 -0400)]
ath6kl: fixup merge damage in ath6kl_mgmt_tx

  CC [M]  drivers/net/wireless/ath/ath6kl/cfg80211.o
drivers/net/wireless/ath/ath6kl/cfg80211.c:1838:2: warning: initialization from incompatible pointer type

Caused by commit e9f935e3e8dc0bddd0df6d148165d95925422502...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
David S. Miller [Tue, 11 Oct 2011 19:24:56 +0000 (15:24 -0400)]
Merge git://git./linux/kernel/git/jkirsher/net-next

12 years agoll_temac: convert to SKB paged frag API.
Ian Campbell [Mon, 10 Oct 2011 01:11:40 +0000 (01:11 +0000)]
ll_temac: convert to SKB paged frag API.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoemac: convert to SKB paged frag API.
Ian Campbell [Mon, 10 Oct 2011 01:11:39 +0000 (01:11 +0000)]
emac: convert to SKB paged frag API.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoehea: convert to SKB paged frag API
Ian Campbell [Mon, 10 Oct 2011 01:11:38 +0000 (01:11 +0000)]
ehea: convert to SKB paged frag API

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Breno Leitao <leitao@linux.vnet.ibm.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoaf_packet: remove unnecessary BUG_ON() in tpacket_destruct_skb
danborkmann@iogearbox.net [Mon, 10 Oct 2011 06:52:46 +0000 (06:52 +0000)]
af_packet: remove unnecessary BUG_ON() in tpacket_destruct_skb

If skb is NULL, then stack trace is thrown anyway on dereference.
Therefore, the stack trace triggered by BUG_ON is duplicate.

Signed-off-by: Daniel Borkmann <danborkmann@googlemail.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agor6040: bump version to 0.28 and date to 07Oct2011.
Florian Fainelli [Thu, 6 Oct 2011 23:36:28 +0000 (23:36 +0000)]
r6040: bump version to 0.28 and date to 07Oct2011.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agor6040: invoke phy_{start,stop} when appropriate
Florian Fainelli [Thu, 6 Oct 2011 23:36:22 +0000 (23:36 +0000)]
r6040: invoke phy_{start,stop} when appropriate

Joe reported to me that right after a bring up of a r6040 interface
the ethtool output had no consistent output with respect to link duplex
and speed. Fix this by adding a missing phy_start call in r6040_up and
conversely a phy_stop call in r6040_down to properly initialize phy states.

Reported-by: Joe Chou <Joe.Chou@rdc.com.tw>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4_en: Adding 40gb speed report for ethtool
Alexander Guller [Sun, 9 Oct 2011 05:29:42 +0000 (05:29 +0000)]
mlx4_en: Adding 40gb speed report for ethtool

Query port will now identify a 40G Ethernet speed.

Signed-off-by: Alexander Guller <alexg@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4_en: Fix crash upon device initialization error
Alexander Guller [Sun, 9 Oct 2011 05:29:35 +0000 (05:29 +0000)]
mlx4_en: Fix crash upon device initialization error

Netdevice was being freed without being unregistered first if
mlx4_SET_PORT_general or mlx4_INIT_PORT failed.

Signed-off-by: Alexander Guller <alexg@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4_en: Fix QP number calculation according to module param
Alexander Guller [Sun, 9 Oct 2011 05:29:26 +0000 (05:29 +0000)]
mlx4_en: Fix QP number calculation according to module param

Number of bits taken from mac table index in QP
calculation should be based on log_num_mac parameter.

Signed-off-by: Alexander Guller <alexg@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4_en: Added missing iounmap upon releasing a device
Alexander Guller [Sun, 9 Oct 2011 05:27:11 +0000 (05:27 +0000)]
mlx4_en: Added missing iounmap upon releasing a device

Fixed a memory leak caused by missing iounmap when device
is being released.

Signed-off-by: Alexander Guller <alexg@mellanox.co.il>
Signed-off-by: Sharon Cohen <sharonc@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4_en: Adjusting moderation per each ring
Alexander Guller [Sun, 9 Oct 2011 05:38:23 +0000 (05:38 +0000)]
mlx4_en: Adjusting moderation per each ring

Moderation is now done per ring and coalescing is enabled
by set_ring_param in ethtool.

Signed-off-by: Alexander Guller <alexg@mellanox.co.il>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4_en: Removing reserve vectors
Alexander Guller [Sun, 9 Oct 2011 05:26:46 +0000 (05:26 +0000)]
mlx4_en: Removing reserve vectors

Fixed a bug where ring size change caused insufficient memory
upon driver restart due to unreleased EQs.

Signed-off-by: Alexander Guller <alexg@mellanox.co.il>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4_en: Assigning TX irq per ring
Alexander Guller [Sun, 9 Oct 2011 05:26:31 +0000 (05:26 +0000)]
mlx4_en: Assigning TX irq per ring

Until now only RX rings used irq per ring
and TX used only one per port.
>From now on, both of them will use the
irq per ring while RX & TX ring[i] will
use the same irq.

Signed-off-by: Alexander Guller <alexg@mellanox.co.il>
Signed-off-by: Sharon Cohen <sharonc@mellanox.co.il>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoigb: add support for NETIF_F_RXHASH
Alexander Duyck [Fri, 26 Aug 2011 07:46:29 +0000 (07:46 +0000)]
igb: add support for NETIF_F_RXHASH

This patch adds support for Rx hashing.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: move TX hang check flag into ring->flags
Alexander Duyck [Fri, 26 Aug 2011 07:46:19 +0000 (07:46 +0000)]
igb: move TX hang check flag into ring->flags

This change moves the Tx hang check into the ring flags.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: fix recent VLAN changes that would leave VLANs disabled after reset
Alexander Duyck [Fri, 26 Aug 2011 07:46:08 +0000 (07:46 +0000)]
igb: fix recent VLAN changes that would leave VLANs disabled after reset

This patch cleans up several issues with VLANs on igb after the recent
changes that were meant to leave the VLANs enabled/disable via the
netdev->features flags.

Specifically the Rx VLAN settings were being dropped after reset due to the
fact that they were not being restored correctly.  In addition I removed
the IRQ disable/enable since those were in place to protect the setting of
vlgrp.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: leave staterr in place and instead us a helper function to check bits
Alexander Duyck [Fri, 26 Aug 2011 07:46:03 +0000 (07:46 +0000)]
igb: leave staterr in place and instead us a helper function to check bits

Instead of doing a byte swap on the staterr bits in the Rx descriptor we can
save ourselves a bit of space and some CPU time by instead just testing for
the various bits out of the Rx descriptor directly.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: retire the RX_CSUM flag and use the netdev flag instead
Alexander Duyck [Fri, 26 Aug 2011 07:45:57 +0000 (07:45 +0000)]
igb: retire the RX_CSUM flag and use the netdev flag instead

Since the netdev now has its' own checksum flag to indicate if Rx checksum
is enabled we might as well use that instead of using the ring flag.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: cleanup IVAR configuration
Alexander Duyck [Fri, 26 Aug 2011 07:45:52 +0000 (07:45 +0000)]
igb: cleanup IVAR configuration

This change is meant to cleanup some of the IVAR register configuration.
igb_assign_vector had become pretty large with multiple copies of the same
general code for setting the IVAR. This change consolidates most of that
code by adding the igb_write_ivar function which allows us just to compute
the index and offset and then use that information to setup the IVAR.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Move ITR related data into work container within the q_vector
Alexander Duyck [Fri, 26 Aug 2011 07:45:47 +0000 (07:45 +0000)]
igb: Move ITR related data into work container within the q_vector

This change moves information related to interrupt throttle rate
configuration into a separate q_vector sub-structure called a work
container. A similar change has already been made for ixgbe and this work
is based off of that.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Consolidate all of the ring feature flags into a single value
Alexander Duyck [Fri, 26 Aug 2011 07:45:36 +0000 (07:45 +0000)]
igb: Consolidate all of the ring feature flags into a single value

This change moves all of the ring flags into a single value.  The advantage
to this is that there is one central area for all of these flags and they
can all make use of the set/test bit operations.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: avoid unnecessary conversions from u16 to int
Alexander Duyck [Fri, 26 Aug 2011 07:45:26 +0000 (07:45 +0000)]
igb: avoid unnecessary conversions from u16 to int

There are a number of places where we have values that are stored as u16
but are being converted to int unnecessarily.  In order to avoid that we
should convert all variables that deal with the next_to_clean, next_to_use,
and count to u16 values.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Use node specific allocations for the q_vectors and rings
Alexander Duyck [Fri, 26 Aug 2011 07:45:20 +0000 (07:45 +0000)]
igb: Use node specific allocations for the q_vectors and rings

This change is meant to update the ring and vector allocations so that they
are per node instead of allocating everything on the node that
ifconfig/modprobe is called on.  By doing this we can cut down
significantly on cross node traffic.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: push data into first igb_tx_buffer sooner to reduce stack usage
Alexander Duyck [Fri, 26 Aug 2011 07:45:15 +0000 (07:45 +0000)]
igb: push data into first igb_tx_buffer sooner to reduce stack usage

Instead of storing most of the data for the TX hot path in the stack until
we are ready to write the descriptor we can save ourselves some time and
effort by pushing the SKB, tx_flags, gso_size, bytecount, and protocol into
the first igb_tx_buffer since that is where we will end up putting it
anyway.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agonet: Remove unnecessary driver assignments of ethtool_ringparam fields to zero
Rick Jones [Fri, 7 Oct 2011 23:13:28 +0000 (19:13 -0400)]
net: Remove unnecessary driver assignments of ethtool_ringparam fields to zero

Per comments from Ben Hutchings on a previous patch, sweep the floors
a little removing unnecessary assignments of zero to fields of struct
ethtool_ringparam in driver code supporting ethtool -g.

Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoAdd ethtool -g support to 8139cp
Rick Jones [Fri, 7 Oct 2011 06:42:21 +0000 (06:42 +0000)]
Add ethtool -g support to 8139cp

Add support for reporting ring sizes via ethtool -g to the 8139cp driver.

Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of github.com:davem330/net
David S. Miller [Fri, 7 Oct 2011 17:38:43 +0000 (13:38 -0400)]
Merge branch 'master' of github.com:davem330/net

Conflicts:
net/batman-adv/soft-interface.c

12 years agonet: use sock_valbool_flag to set/clear SOCK_RXQ_OVFL
Johannes Berg [Fri, 7 Oct 2011 03:30:20 +0000 (03:30 +0000)]
net: use sock_valbool_flag to set/clear SOCK_RXQ_OVFL

There's no point in open-coding sock_valbool_flag().

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge git://github.com/Jkirsher/net-next
David S. Miller [Fri, 7 Oct 2011 16:34:52 +0000 (12:34 -0400)]
Merge git://github.com/Jkirsher/net-next

12 years agoigb: consolidate creation of Tx buffer info and data descriptor
Alexander Duyck [Fri, 26 Aug 2011 07:45:09 +0000 (07:45 +0000)]
igb: consolidate creation of Tx buffer info and data descriptor

This change will combine the writes of tx_buffer_info and the Tx data
descriptors into a single function. The advantage of this is that we can
avoid needless memory reads from the buffer info struct and speed things up
by keeping the accesses to the local registers.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Combine all flag info fields into a single tx_flags structure
Alexander Duyck [Fri, 26 Aug 2011 07:44:59 +0000 (07:44 +0000)]
igb: Combine all flag info fields into a single tx_flags structure

This change is meant to combine all of the TX flags fields into one u32
flags field so that it can be stored into the tx_buffer_info structure.
This includes the time stamp flag as well as mapped_as_page flag info.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Cleanup protocol handling in transmit path
Alexander Duyck [Fri, 26 Aug 2011 07:44:53 +0000 (07:44 +0000)]
igb: Cleanup protocol handling in transmit path

This change is meant to cleanup the protocol handling in the transmit path
so that it correctly offloads software VLAN tagged frames.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Create separate functions for generating cmd_type and olinfo
Alexander Duyck [Fri, 26 Aug 2011 07:44:48 +0000 (07:44 +0000)]
igb: Create separate functions for generating cmd_type and olinfo

This change is meant to improve the readability of the driver by separating
out the cmd_type configuration and the olinfo configuration into their own
functions.  By doing this it is much easier to determine which ingredients
go into setting up these to portions of the descriptor.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Make first and tx_buffer_info->next_to_watch into pointers
Alexander Duyck [Fri, 26 Aug 2011 07:44:43 +0000 (07:44 +0000)]
igb: Make first and tx_buffer_info->next_to_watch into pointers

This change converts two tx_buffer_info index values into pointers.  The
advantage to this is that we reduce unnecessary computations and in the case
of next_to_watch we get an added bonus of the value being able to provide
additional information as a NULL value indicates it is unset versus a 0 not
having any meaning for the index value.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Consolidate creation of Tx context descriptors into a single function
Alexander Duyck [Fri, 26 Aug 2011 07:44:32 +0000 (07:44 +0000)]
igb: Consolidate creation of Tx context descriptors into a single function

This patch is meant to simplify the transmit path by reducing the overhead
for creating a transmit context descriptor.  The current implementation is
split with igb_tso and igb_tx_csum doing two separate implementations on
how to setup the tx_buffer_info structure and the tx_desc.  By combining
them it is possible to reduce code and simplify things since now only one
function will create context descriptors.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: split buffer_info into tx_buffer_info and rx_buffer_info
Alexander Duyck [Fri, 26 Aug 2011 07:44:22 +0000 (07:44 +0000)]
igb: split buffer_info into tx_buffer_info and rx_buffer_info

In order to be able to improve the performance of the TX path it has been
necessary to add addition info to the tx_buffer_info structure.  However a
side effect is that the structure has gotten larger and this in turn has
also increased the size of the RX buffer info structure.  In order to avoid
this in the future I am splitting the single buffer_info structure into two
separate ones and instead I will join them by making the buffer_info
pointer in the ring a union of the two.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Make Tx budget for NAPI user adjustable
Alexander Duyck [Wed, 5 Oct 2011 13:35:24 +0000 (13:35 +0000)]
igb: Make Tx budget for NAPI user adjustable

This change is to make the NAPI budget limits for transmit
adjustable.  Currently they are only set to 128, and when
the changes/improvements to NAPI occur to allow for adjustability,
it would be possible to tune the value for optimal
performance with applications such as routing.

v2: remove tie between NAPI and interrupt moderation
    fix work limit define name (s/IXGBE/IGB/)
    Update patch description to better reflect patch

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
12 years agoe1000e: bad short packets received when jumbos enabled on 82579
Bruce Allan [Fri, 30 Sep 2011 08:07:00 +0000 (08:07 +0000)]
e1000e: bad short packets received when jumbos enabled on 82579

When short packets are received with jumbos enabled on 82579, they can be
interpreted to have a receive address that does not match any configured
address.  This is due to a hardware bug that can be worked around by
reducing the number of IPG octets added when the packet is transferred from
the PHY to the MAC.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000: convert to private mutex from rtnl
Jesse Brandeburg [Wed, 5 Oct 2011 07:24:51 +0000 (07:24 +0000)]
e1000: convert to private mutex from rtnl

The e1000 driver when running with lockdep could run into
some possible deadlocks between the work items acquiring
rtnl and the rtnl lock being acquired before work items
were cancelled.

Use a private mutex to make sure lock ordering isn't violated.
The private mutex is only used to protect areas not generally
covered by the rtnl lock already.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Tushar Dave <tushar.n.dave@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000: convert mdelay to msleep
Jesse Brandeburg [Wed, 5 Oct 2011 07:24:46 +0000 (07:24 +0000)]
e1000: convert mdelay to msleep

With the previous commit, there are several functions
that are only ever called from thread context, and are
able to sleep with msleep instead of mdelay.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Tushar Dave <tushar.n.dave@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000: convert hardware management from timers to threads
Jesse Brandeburg [Wed, 5 Oct 2011 07:24:41 +0000 (07:24 +0000)]
e1000: convert hardware management from timers to threads

Thomas Gleixner (tglx) reported that e1000 was delaying for many milliseconds
(using mdelay) from inside timer/interrupt context.  None of these paths are
performance critical and can be moved into threads/work items.  This patch
implements the work items and the next patch changes the mdelays to msleeps.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Tushar Dave <tushar.n.dave@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: bump version number
Don Skidmore [Fri, 7 Oct 2011 03:53:51 +0000 (03:53 +0000)]
ixgbe: bump version number

Bump the version string to better match pair up with the out of tree
driver that contains the same functionality.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agowl12xx: disable AP-mode-specific quirks
Eliad Peller [Wed, 5 Oct 2011 09:55:38 +0000 (11:55 +0200)]
wl12xx: disable AP-mode-specific quirks

The current wl12xx fw (7.3.0.0.77) supports both STA and AP mode, and
we no longer use AP-mode-specific quirks.

WL12XX_QUIRK_END_OF_TRANSACTION is still used for certain HWs, while
WL12XX_QUIRK_LPD_MODE is not used anymore.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: Add support for HW channel switch
Shahar Levi [Thu, 8 Sep 2011 10:01:33 +0000 (13:01 +0300)]
wl12xx: Add support for HW channel switch

The wl12xx FW supports HW channel switch.  If we don't use it,
sometimes the firmware gets confused when recalibrating to the new
channel, causing RX problems.  This commit adds HW channel switch
support by implementing the channell_switch op.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
[added one comment, remove the tx_flush and rephrased the commit message]
Signed-off-by: Luciano Coelho <coelho@ti.com>