Change logging of failure to enable MSI/MSI-X to display device's PCI
address instead of eth%d. Rectify a typo.
Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com> Reviewed-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Paul Gortmaker [Mon, 27 Feb 2012 02:36:29 +0000 (02:36 +0000)]
ucc_geth: separate out rx/tx ring alloc and free operations
Factor out the the existing allocation and free operations
so that they can be used individually.
This is to improve code readability, and also to prepare for
possible future changes like better error recovery and more
dynamic configuration (e.g on-the-fly resizing of the rings).
This change represents a straight up relocation of the existing
code into separate routines without changing any of the contained
code itself. Local variables are relocated as necessary.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Paul Mackerras [Sun, 4 Mar 2012 12:56:55 +0000 (12:56 +0000)]
ppp: Replace uses of <linux/if_ppp.h> with <linux/ppp-ioctl.h>
Since all that include/linux/if_ppp.h does is #include <linux/ppp-ioctl.h>,
this replaces the occurrences of #include <linux/if_ppp.h> with
#include <linux/ppp-ioctl.h>.
It also corrects an error in Documentation/networking/l2tp.txt, where
it referenced include/linux/if_ppp.h as the source of some definitions
that are actually now defined in include/linux/if_pppol2tp.h.
Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Paul Mackerras [Sun, 4 Mar 2012 12:56:04 +0000 (12:56 +0000)]
ppp: Move ioctl definitions from if_ppp.h to new ppp-ioctl.h
This moves the definitions of the ioctls, constants and structures
relating to the ppp_generic interface to userspace out from if_ppp.h
to a new file, ppp-ioctl.h. The new file has my copyright since I
designed and implemented the ppp_generic interface in the late 1990s.
None of the contents of this file comes from the original if_ppp.h
published by Carnegie Mellon University.
Of the remainder of if_ppp.h, only the PPP_MTU definition was being
used, and this replaces the uses of it with PPP_MRU (which is identical).
Therefore, this replaces the entire file with the single line
#include <linux/ppp-ioctl.h>
which clearly doesn't contain any CMU code. Thus I have removed the
CMU copyright notice with its problematic advertising clause, and in
fact since it's only one trivial line I have not added any other
copyright notice.
Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Paul Mackerras [Sun, 4 Mar 2012 12:54:54 +0000 (12:54 +0000)]
ppp: Change copyright notices from ANU to me
This changes the copyright notices on the PPP code that I developed
in the late 1990s from being copyright The Australian National
University to copyright Paul Mackerras. I can do this as I have an
acknowledgement in writing from the Head of the Computer Science
Department at ANU (where I worked then) that ANU does not claim any
intellectual property in this code.
While I'm at it, change the copyright notice from BSD-style to
GNU GPL like the rest of the kernel.
Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Sun, 4 Mar 2012 14:48:15 +0000 (14:48 +0000)]
tg3: Fix poor tx performance on 57766 after MTU change
GRC reset causes the read DMA engine to go into a mode that breaks up
requests into 256 bytes. A PHY reset is required to bring it back to
the normal mode.
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Sun, 4 Mar 2012 14:48:14 +0000 (14:48 +0000)]
tg3: Add memory barriers to sync BD data
for weak memory model architectures to ensure that the chip will DMA
valid BD data.
Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Reviewed-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Sun, 4 Mar 2012 14:48:13 +0000 (14:48 +0000)]
tg3: Fix jumbo loopback test on 5719
Loopback on 9K packet fails because the chip has a DMA limit of 4K. The
loopback test logic uses a single BD for simplicity. Fix it by reducing
the jumbo packet size to the DMA limit.
Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Reviewed-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
can: usb: PEAK-System Technik PCAN-USB Pro specific part
This patch adds the specific part which handles the PCAN-USB Pro adapter
from PEAK-System Technik (http://www.peak-system.com). The PCAN-USB Pro
adapter is a dual-channel USB 2.0 adapter compliant with CAN specifications
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
can: usb: PEAK-System Technik PCAN-USB specific part
This patch adds the specific part which handles the PCAN-USB adapter from
PEAK-System Technik (http://www.peak-system.com). The PCAN-USB adapter is
a sja1000 based, mono-channel USB 1.1 adapter compliant with CAN
specifications 2.0A (11-bit ID) and 2.0B (29-bit ID).
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
can: usb: PEAK-System Technik USB adapters driver core
This patch adds the core of the peak_usb driver which handles PEAK-System
Technik PCAN USB adapters. It defines the parts which are common to the
PCAN-USB adapters: can network interfaces management, network-to/from-usb
data path interface, timestamps management...
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
can: sja1000: add support for PEAK-System PCMCIA card
This patch adds support to the PCAN-PC Card PCMCIA card from
PEAK-System Technik (www.peak-system.com). This card is a CAN interface
for the PC Card slot. It is available as a single or dual-channel version.
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net> Acked-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Samuel Jero [Mon, 27 Feb 2012 01:22:02 +0000 (18:22 -0700)]
dccp: fix bug in sequence number validation during connection setup
This fixes a bug in the sequence number validation during the initial handshake.
The code did not treat the initial sequence numbers ISS and ISR as read-only and
did not keep state for GSR and GSS as required by the specification. This causes
problems with retransmissions during the initial handshake, causing the
budding connection to be reset.
This patch now treats ISS/ISR as read-only and tracks GSS/GSR as required.
Signed-off-by: Samuel Jero <sj323707@ohio.edu> Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Gerrit Renker [Mon, 27 Feb 2012 19:29:44 +0000 (12:29 -0700)]
dccp ccid-3: replace incorrect BUG_ON
This replaces an unjustified BUG_ON(), which could get triggered under normal
conditions: X_calc can be 0 when p > 0. X would in this case be set to the
minimum, s/t_mbi. Its replacement avoids t_ipi = 0 (unbounded sending rate).
Thanks to Jordi, Victor and Xavier who reported this.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.uk>
John Fastabend [Fri, 10 Feb 2012 03:19:41 +0000 (03:19 +0000)]
net: dcb: getnumtcs()/setnumtcs() should return an int
{g|s}etnumtcs() today returns a u8 that is only used by the DCB code
to verify no error occurred. Today the driver implementations return
negative error codes which end up being non-zero so the logic works
out but triggers some sparse warnings.
To fix the sparse warnings convert the return value to an int.
CC: Eilon Greenstein <eilong@broadcom.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
John Fastabend [Fri, 10 Feb 2012 03:19:35 +0000 (03:19 +0000)]
ixgbe: dcb: check setup_tc return codes
dcb netlink code calls setup_tc to init hardware traffic classes
to use for DCB. At some call sites the return values are not
checked for errors and in one case may return -EINVAL back to
the net/dcbnl.c caller which is expecting a u8.
This fixes some smatch hits and although failures are never
seen in practive its best to check return codes.
Reported-by: Dan Carenter <dan.carpenter@oracle.com> Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Ben Greear [Fri, 17 Feb 2012 13:44:28 +0000 (13:44 +0000)]
e100: Show short v/s long rx length errors in ethtool stats.
Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Ben Greear [Fri, 17 Feb 2012 13:44:23 +0000 (13:44 +0000)]
e100: Fix rx-over-length statistics.
The old code would += the total errors every time
stats were gathered. Instead, keep a count of short-pkt
and long-pkt counters and then simply add them together
for the rx-over-length stat.
Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Conflicts in the statistics regression bug fix from 'net',
but happily Matt Carlson originally posted the fix against
'net-next' so I used that to resolve this.
Signed-off-by: David S. Miller <davem@davemloft.net>
Dan Carpenter [Wed, 29 Feb 2012 21:19:54 +0000 (21:19 +0000)]
enic: fix an endian bug in enic_probe()
"num_vfs" is a u32 but we only use the high 16 bits and the low 16bits
are left as zero. That isn't a problem for little endian systems but it
will break on big endian ones.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
pch_gbe_validate_option() modifies 32 bits of memory but we pass
&hw->phy.autoneg_advertised which only has 16 bits and &hw->mac.fc
which only has 8 bits.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Wed, 29 Feb 2012 14:23:27 +0000 (14:23 +0000)]
mdio: Export mdio.h to userland
The ID packing definitions are needed by userland and the register
definitions may also be useful there.
Do not export mdio_phy_id_{is_c45,prtad,devad}() as the use of bool is
problematic and it's not that useful to export only a subset of these.
Do not export MDIO_SUPPORTS_{C22,C45} directly; these flags are only
exposed to userland through struct ethtool_cmd so they should be
defined alongside that with appropriate names.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Greg Rose [Wed, 8 Feb 2012 00:45:00 +0000 (00:45 +0000)]
rtnetlink: Fix VF IFLA policy
Add VF spoof check to IFLA policy. The original patch I submitted to
add the spoof checking feature to rtnl failed to add the proper policy
rule that identifies the data type and len. This patch corrects that
oversight. No bugs have been reported against this but it may cause
some problem for the netlink message parsing that uses the policy
table.
CC: stable@vger.kernel.org Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Alexander Duyck [Fri, 10 Feb 2012 02:08:32 +0000 (02:08 +0000)]
ixgbe: Fix comments that are out of date or formatted incorrectly
This patch corrects several comments that are either incorrect or formatted
incorrectly for multiline comments.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Don Skidmore [Tue, 28 Feb 2012 06:35:54 +0000 (06:35 +0000)]
ixgbe: fix spelling errors
Correct spelling error caught with codespell.py.
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>
Alexander Duyck [Wed, 8 Feb 2012 07:49:33 +0000 (07:49 +0000)]
ixgbe: Minor formatting and comment corrections for ixgbe_xmit_frame_ring
This patch is meant to address several minor issues in
ixgbe_xmit_frame_ring. Specifically it adds a comment explaining the TXSW
flag, and correctly wraps a line over 80 characters.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Bruce Allan [Thu, 23 Feb 2012 03:31:29 +0000 (03:31 +0000)]
e1000e: use msleep instead of mdelay
The e1000_link_stall_workaround_lv() function is always called in non-
atomic context so it should use msleep instead of mdelay. Also, remove
unnecessary #include <linux/delay.h>.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Bruce Allan [Thu, 23 Feb 2012 03:13:18 +0000 (03:13 +0000)]
e1000e: cleanup whitespace and indentation
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Bruce Allan [Thu, 23 Feb 2012 03:13:13 +0000 (03:13 +0000)]
e1000e: cleanup incorrect filename in comment
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Ben Greear [Fri, 17 Feb 2012 13:43:44 +0000 (13:43 +0000)]
e100: Support RXALL feature flag.
This allows the NIC to receive packets with bad FCS
and other errors. Good for sniffing packets on flakey
networks.
v4: Only flax rx-over-length errors if pkt is beyond
maximum expected packet size, not just beyond the MTU.
This matches the existing logic for this counter.
Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Ben Greear [Sat, 11 Feb 2012 15:39:35 +0000 (15:39 +0000)]
e100: Support sending custom Ethernet CRC
This can aid with testing the RX logic for bad
CRCs.
Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Ben Greear [Fri, 17 Feb 2012 13:43:05 +0000 (13:43 +0000)]
e100: Support RXFCS feature flag.
This allows e100 to be configured to append the
Ethernet FCS to the skb.
Useful for sniffing networks.
Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
John W. Linville [Wed, 29 Feb 2012 20:08:33 +0000 (15:08 -0500)]
carl9170: fix breakage from "mac80211: handle non-bufferable MMPDUs correctly"
That commit intended for 3.4 renamed IEEE80211_TX_CTL_POLL_RESPONSE as
IEEE80211_TX_CTL_NO_PS_BUFFER. Meanwhile, "carl9170: fix frame delivery
if sta is in powersave mode" added a reference to
IEEE80211_TX_CTL_POLL_RESPONSE in the fixes stream for 3.3. This simple
patch fixes that merge boo-boo.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Zefir Kurtisi [Mon, 27 Feb 2012 11:52:06 +0000 (12:52 +0100)]
ath9k: decouple RX error checking for DFS
Previous RX error checking was done exclusive-or for different error
types and caused DFS pulse events to be dropped when other error
flags (e.g. CRC) were set simultaneously.
This patch decouples PHY error processing from other types and ensures
that all pulses detected by HW are accounted by the pattern detector.
Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Greg Dietsche [Mon, 27 Feb 2012 18:25:32 +0000 (12:25 -0600)]
iwlegacy: remove enum iw_calib and related code
Remove the enum il_calib. It defined one identifier: IL_CALIB_MAX.
Remove the function il4965_calib_free_results. It was doing nothing
because IL_CALIB_MAX is zero. Next, remove calib_results from the
il_priv structure and also remove the associated return
type/struct il_calib_result.
Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Greg Dietsche [Mon, 27 Feb 2012 18:25:31 +0000 (12:25 -0600)]
iwlegacy: Kconfig: Change Debug Option to be more clear
Since the menuconfig system doesn't indent the debug options
for the 3945 /4965, add some text to make it clear which
debug options are being configured.
Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 27 Feb 2012 11:18:30 +0000 (12:18 +0100)]
mac80211: handle non-bufferable MMPDUs correctly
This renames the IEEE80211_TX_CTL_POLL_RESPONSE
TX flag to IEEE80211_TX_CTL_NO_PS_BUFFER and also
uses it for non-bufferable MMPDUs (all MMPDUs but
deauth, disassoc and action frames.)
Previously, mac80211 would let the MMPDU through
but not set the flag so drivers supporting some
hardware aids for avoiding the PS races would
then reject the frame.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Instead of defining an 'enum', we can simply use 'u8' flag for WEP
status. Rename 'wep_status' to 'wep_enabled' to match with
'wpa_enabled' and 'wpa2_enabled'.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Sat, 25 Feb 2012 05:35:36 +0000 (21:35 -0800)]
mwifiex: remove redundant scan operation
It should have been removed by commit "mwifiex: use cfg80211 dynamic
scan..." (7c6fa2a843..) after adding code to avoid an extra scan
during association because scan entries are valid for 15 seconds in
cfg80211 stack.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 24 Feb 2012 12:50:54 +0000 (13:50 +0100)]
mac80211: make deauth/disassoc sequence more natural
The association sequence looks (roughly) like
this now:
* set BSSID
* set station to EXIST state
* send auth
* set station to AUTH state
* send assoc
* set station to ASSOC state
* set BSS info to associated
In contrast, the deauth/disassoc sequence is
the other way around:
* clear BSSID/BSS info state
* remove station
* send deauth/disassoc
(in some cases the last two steps are reversed.)
This patch encodes the entire sequence in the
ieee80211_set_disassoc() function and changes
it to be like this, for good measure with an
explicit flush:
* send deauth/disassoc
* flush
* remove station
* clear BSSID/BSS info state
At least iwlwifi gets confused with the other
sequence in P2P mode and complains that it
wasn't able to flush the queues.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
When ieee80211_set_disassoc() is called with the
tx argument set to true, it will send DelBA out
to the peer. This isn't useful or necessary in a
few cases where we do it today, those being when
we lost the connection or when the supplicant
explicitly asked us to not tell the AP.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 24 Feb 2012 12:50:52 +0000 (13:50 +0100)]
mac80211: dont call cfg80211 from ieee80211_send_deauth_disassoc
Instead of calling cfg80211 in ieee80211_send_deauth_disassoc()
pass out the frame and call it from the caller. That saves the
SKB allocation if we don't actually want to send the frame and
enables us to make the ordering smarter in the future.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 24 Feb 2012 12:50:51 +0000 (13:50 +0100)]
cfg80211: remove cookies from callbacks
In "cfg80211: no cookies in cfg80211_send_XXX()"
Holger Schurig removed the cookies in the calls
from mac80211 to cfg80211, but the ones in the
other direction were left in. Remove them now.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
A second ifconfig wlan0 up brings the interface up without problems.
After a bit more debugging, the call trace is the following:
[10241.028130] zd1211rw 1-3:1.0: zd_chip_lock_phy_regs: error
ioread32(CR_REG1): -110
[10241.028140] zd1211rw 1-3:1.0: zd_switch_radio_on: failed to lock PHY regs
[10241.028148] zd1211rw 1-3:1.0: zd_op_start: failed to set radio on
Adding a 10 milliseconds delay between the call to set_mc_hash() and
zd_chip_switch_radio_on() allows successful interface bringups in all
cases and matches what the vendor driver did.
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Matt Carlson [Tue, 28 Feb 2012 23:33:37 +0000 (23:33 +0000)]
tg3: Fix tg3_get_stats64 for 5700 / 5701 devs
tg3_get_stats64() takes tp->lock when dealing with non-serdes bcm5700
and bcm5701 devices. However, functions that call tg3_halt() have
already acquired tp->lock. When tg3_get_stats64() is called in
tg3_halt(), deadlock will occur.
This patch fixes the problem by separating the stat gathering code into
a new tg3_get_nstats() function. tg3_get_stats64() is recoded to call
this function and take tp->lock. The code that takes tp->lock in
tg3_calc_crc_errors() has been removed. Function signatures have been
cleaned up too.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Amitkumar Karwar [Sat, 25 Feb 2012 05:35:35 +0000 (21:35 -0800)]
mwifiex: reset encryption mode flag before association
Recent commit
"mwifiex: clear previous security setting during association"
fixes association failure problems observed in some corner cases
by clearing previous security setting before each association.
We should reset encryption mode flag as well. This patch takes care
of it.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
carl9170: fix frame delivery if sta is in powersave mode
Nicolas Cavallari discovered that carl9170 has some
serious problems delivering data to sleeping stations.
It turns out that the driver was not honoring two
important flags (IEEE80211_TX_CTL_POLL_RESPONSE and
IEEE80211_TX_CTL_CLEAR_PS_FILT) which are set on
frames that should be sent although the receiving
station is still in powersave mode.
Cc: stable <stable@vger.kernel.org> Reported-by: Nicolas Cavallari <Nicolas.Cavallari@lri.fr> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
carl9170: Fix memory accounting when sta is in power-save mode.
On Access Point mode, when transmitting a packet, if the destination
station is in powersave mode, we abort transmitting the packet to the
device queue, but we do not reclaim the allocated memory. Given enough
packets, we can go in a state where there is no packet on the device
queue, but we think the device has no memory left, so no packet gets
transmitted, connections breaks and the AP stops working.
This undo the allocation done in the TX path when the station is in
power-save mode.
Signed-off-by: Nicolas Cavallari <cavallar@lri.fr> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Allan Stephens [Wed, 9 Nov 2011 21:30:55 +0000 (16:30 -0500)]
tipc: Optimize setting of immutable payload message header fields
Optimizes routines that send payload messages so that they no longer
update the "originating node" and "originating port" fields of the
outgoing message header template, since these fields are initialized
when the sending port is created and never change thereafter. Also
optimizes the routine which updates the message header template when
a connection to a port is established, for the same reason.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Allan Stephens [Wed, 9 Nov 2011 22:38:20 +0000 (17:38 -0500)]
tipc: Eliminate obsolete code for re-sending a message
Removes code that updated the "previous node" field of an out-going
message over TIPC's links. Such updating is unnecessary since the
removal of the prototype multi-cluster capability means that all
outgoing messages are generated locally and already have this field
populated correctly.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Neal Cardwell [Sun, 26 Feb 2012 10:06:19 +0000 (10:06 +0000)]
tcp: fix false reordering signal in tcp_shifted_skb
When tcp_shifted_skb() shifts bytes from the skb that is currently
pointed to by 'highest_sack' then the increment of
TCP_SKB_CB(skb)->seq implicitly advances tcp_highest_sack_seq(). This
implicit advancement, combined with the recent fix to pass the correct
SACKed range into tcp_sacktag_one(), caused tcp_sacktag_one() to think
that the newly SACKed range was before the tcp_highest_sack_seq(),
leading to a call to tcp_update_reordering() with a degree of
reordering matching the size of the newly SACKed range (typically just
1 packet, which is a NOP, but potentially larger).
This commit fixes this by simply calling tcp_sacktag_one() before the
TCP_SKB_CB(skb)->seq advancement that can advance our notion of the
highest SACKed sequence.
Correspondingly, we can simplify the code a little now that
tcp_shifted_skb() should update the lost_cnt_hint in all cases where
skb == tp->lost_skb_hint.
Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Neal Cardwell [Mon, 27 Feb 2012 22:52:52 +0000 (17:52 -0500)]
tcp: fix comment for tp->highest_sack
There was an off-by-one error in the comments describing the
highest_sack field in struct tcp_sock. The comments previously claimed
that it was the "start sequence of the highest skb with SACKed
bit". This commit fixes the comments to note that it is the "start
sequence of the skb just *after* the highest skb with SACKed bit".
Signed-off-by: Neal Cardwell <ncardwell@google.com> Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
This handler allows the transport layer to free an skb from the
op_mode. This can happen when the driver is stopped while Tx
packets are pending in the transport layer.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Define the op_mode as an interface with its ops. All the functions
of the op_mode are "private", but its ops is made public in
iwl-op-mode.h.
The drv object starts the op_mode by using the start function in the
public ops.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
iwlwifi: rename iwl_remove to iwl_op_mode_dvm_stop
iwl_remove stops the wifi flows, so rename.
Moreover, we can possibly stop the wifi flows even if the driver
is statically compiled in the kernel, so remove the __devexit pragma.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Fetch the fw and spawn the op_mode. The op_mode that we need
to fetch is determined from the fw file.
Since the fw is fetched very early in the init flow, we can
determine what op_mode to spawn.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg [Tue, 21 Feb 2012 16:31:06 +0000 (18:31 +0200)]
iwlwifi: move uCode flags handling to op_mode
The uCode flags modification is op_mode dependent
since the P2P config is an op-mode config.
This also fixes P2P enabling: due to the uCode
loading code shuffle moving the SKU check before
the EEPROM was read it was always false and would
always disable PAN/P2P.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
iwlwifi: move content of iwl_probe to post fetch_fw
This will allow to have different behavior depending on the fw.
Different fw APIs require completely different implementation
of the mac80211 APIs. Each of these implementations is called an
op_mode.
The current op_mode is called DVM which states for dual virtual MAC.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
iwlwifi: parse_tlv functions set the fw_version string
struct iwl_fw contains a string that describe the fw. This string
is now set by the iwl_parse_*_firmware.
This string is later used to update the cfg80211 data.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Jakub Kicinski [Wed, 22 Feb 2012 20:58:58 +0000 (21:58 +0100)]
rt2800pci: Fix 'Error - MCU request failed' during initialization
Bring MCU operations during device initialization to sync
with legacy driver.
This should fix following error:
phy0 -> rt2800pci_mcu_status: Error - MCU request failed,
no response from hardware
Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jakub Kicinski [Wed, 22 Feb 2012 20:58:57 +0000 (21:58 +0100)]
rt2800: Add documentation on MCU requests
Add documentation on MCU communication, some of known commands and
their arguments. Supplement command ids.
Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>