Sritej Velaga [Thu, 26 Aug 2010 14:03:05 +0000 (14:03 +0000)]
qlcnic: PCI ID addition
Added PCI ID to board info.
Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com> Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
If there is a FW hang when the driver loads, it can not determine the FW operational
mode. Fix it by checking the FW state first before issuing any FW commands to
determine its capabilities and thereby detecting driver operational mode.
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Sony Chacko [Thu, 26 Aug 2010 14:02:41 +0000 (14:02 +0000)]
qlcnic: Fix missing error codes
In the original code, the error codes returned from some of the functions
are not caught and sent up the caller chain. Fixed it here.
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Changli Gao [Tue, 24 Aug 2010 13:32:58 +0000 (13:32 +0000)]
net: use scnprintf() to avoid potential buffer overflow
strlcpy() returns the total length of the string they tried to create, so
we should not use its return value without any check. scnprintf() returns
the number of characters written into @buf not including the trailing '\0',
so use it instead here.
Signed-off-by: Changli Gao <xiaosuo@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Tue, 24 Aug 2010 13:21:08 +0000 (13:21 +0000)]
net/sctp: Use pr_fmt and pr_<level>
Change SCTP_DEBUG_PRINTK and SCTP_DEBUG_PRINTK_IPADDR to
use do { print } while (0) guards.
Add SCTP_DEBUG_PRINTK_CONT to fix errors in log when
lines were continued.
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Add a missing newline in "Failed bind hash alloc"
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Simon Horman [Thu, 26 Aug 2010 02:54:31 +0000 (02:54 +0000)]
ipvs: switch to GFP_KERNEL allocations
Switch from GFP_ATOMIC allocations to GFP_KERNEL ones in
ip_vs_add_service() and ip_vs_new_dest(), as we hold a mutex and are
allowed to sleep in this context.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Simon Horman [Thu, 26 Aug 2010 20:21:26 +0000 (13:21 -0700)]
IPVS: ICMPv6 checksum calculation
Cc: Xiaoyu Du <tingsrain@gmail.com> Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Rasesh Mody [Thu, 26 Aug 2010 06:00:27 +0000 (23:00 -0700)]
bna: Fixed build break for allyesconfig
This is the patch to fix the build break caused by multiple
definitions of symbols between Brocade's FC/FCOE driver(BFA)
and 10G Networking Driver(BNA).
Changes are:
1. locally used functions are made static
2. unused functions are removed
3. using unique namespaces for the function names that must be
globally visible
Signed-off-by: Debashis Dutt <ddutt@brocade.com> Signed-off-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Denis Kirjanov [Tue, 24 Aug 2010 23:57:55 +0000 (23:57 +0000)]
r6040: Free irq line on error path
Free irq line on error path.
Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Acked-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Amerigo Wang [Wed, 25 Aug 2010 00:23:39 +0000 (00:23 +0000)]
s2io: remove lro parameter
Remove "lro" parameter of s2io driver.
Signed-off-by: WANG Cong <amwang@redhat.com> Cc: jon.mason@exar.com Acked-by: Jon Mason <jon.mason@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Wed, 25 Aug 2010 00:32:33 +0000 (00:32 +0000)]
be2net: fix to dynamically generate MAC Address for VFs
The BE ASIC/firmware doesnot reserve and assign MAC address for VFs.
This results in the VF interfaces being created with MAC Address 0.
The code change proposed takes the MAC address of PF to generate a seed.
MAC Address for VFs are assigned incrementally starting from the seed.
These addresses are programmed in the ASIC by the PF and the VF driver
queries for the MAC address during its probe.
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Breno Leitao [Tue, 24 Aug 2010 12:50:40 +0000 (12:50 +0000)]
qlge: Fix a deadlock when the interface is going down
Currently qlge can deadlock when the interface is going
down, and the mpi_port_cfg_work() is executing on another
processor. It happens because unregister_netdev() holds
the rtnl lock, and the mpi_port_cfg_work() also request
this lock.
Since unregiter_netdev() may wait mpi_port_cfg_work(), who
also request the holding lock, it can cause an deadlock,
displaying the following error:
Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Julia Lawall [Tue, 24 Aug 2010 04:39:49 +0000 (04:39 +0000)]
net/netfilter/ipvs: Eliminate memory leak
__ip_vs_service_get and __ip_vs_svc_fwm_get increment a reference count, so
that reference count should be decremented before leaving the function in an
error case.
A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)
x = __ip_vs_service_get(...);
<... when != x
when != true (x == NULL || ...)
when != if (...) { <+...x...+> }
when != I (...) { <+...x...+> }
(
x == NULL
|
x == E
|
x->f1
)
...>
* return ...;
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
x = dev_alloc_skb(...);
<... when != x
when != true (x == NULL || ...)
when != if (...) { <+...x...+> }
when != I (...) { <+...x...+> }
(
x == NULL
|
x == E
|
x->f1
)
...>
* return ...;
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
stmmac: remove dead option in the driver's Kconfig
This patch removes the CPU_SUBTYPE_ST40 dependency in the
driver's Kconfig.
In fact, this option has been removed in the commit: f96691872439ab2071171d4531c4a95b5d493ae5
as reported by Christian Dietrich.
Note that the driver remains tested on STM platforms, only.
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Pawel Moll [Mon, 23 Aug 2010 20:40:40 +0000 (20:40 +0000)]
stmmac: fix_mac_speed is called during 10/100<->1000 speed changes
This patch modifies the stmmac_adjust_link() function so the
fix_mac_speed() is called not only when link speed is changing
between 10 and 100 Mbps (as required in RMII mode) but also
for 1000 Mbps.
Signed-off-by: Pawel Moll <pawel.moll@st.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
On NIC Partition capable adapter, Administrator can configure to
tag packet with particular vlan id. Packet will be tagged and strip with
that vlan id. Also if 'Tagging' flag is disable, other packet will be drop.
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Rajesh Borundia [Wed, 25 Aug 2010 04:03:02 +0000 (04:03 +0000)]
qlcnic: eswitch config fixes
o remove validation before deleting vlan id
o Add missing 'break' while deleting vlan id.
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Yevgeny Petrilin [Tue, 24 Aug 2010 03:46:38 +0000 (03:46 +0000)]
mlx4_en: reconfiguring mac address.
When Mac address is removed from one port of the CX2 device, the other device
should reconfigure its Mac.
This fixes an issue with failover, when both ports have the same Mac address,
and one of the ports, is closed, the second one stops receiving traffic.
(bugzilla #1965 at bugs.openfabrics.org)
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
Yevgeny Petrilin [Tue, 24 Aug 2010 03:46:18 +0000 (03:46 +0000)]
mlx4_en: Added self diagnostics test implementation
The selftest includes 5 features:
1. Interrupt test: Executing commands and receiving command completion
on all our interrupt vectors.
2. Link test: Verifying we are connected to valid link partner.
3. Speed test: Check that we negotiated link speed correctly.
4. Registers test: Activate HW health check command.
5. Loopback test: Send a packet on loopback interface and catch it on RX side.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
Yevgeny Petrilin [Tue, 24 Aug 2010 03:45:20 +0000 (03:45 +0000)]
mlx4_en: Setting actual RX ring size
When configuring HW resources, the RX ring size that is passed should be the actual
size that depends on number of buffers that we succeeded to allocate.
The mask for ring size should also be configured accordingly
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
Yevgeny Petrilin [Tue, 24 Aug 2010 03:45:05 +0000 (03:45 +0000)]
mlx4_en: Fixed incorrect unmapping on RX flow.
When allocating new fragments to replace the ones that would be passed to the stack,
The fragments that should be replaced, are the ones that were already used.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
Johannes Berg [Wed, 18 Aug 2010 16:35:22 +0000 (09:35 -0700)]
iwlwifi: do not spuriously call ieee80211_scan_completed
When a scan is aborted because the corresponding
virtual interface is removed, we may still later
attempt to tell mac80211 that the scan completed.
This is obviously wrong, since we already told it
that it was aborted, so don't do that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 18 Aug 2010 16:35:21 +0000 (09:35 -0700)]
iwlagn: do not check for AP mode for WEP keys
Even when we configure WEP keys in AP mode
ones without a station pointer are default
keys, so don't check for AP mode here.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 18 Aug 2010 13:01:23 +0000 (15:01 +0200)]
mac80211: fix docbook
Fix a small problem in the documentation for
ieee80211_request_smps, and a now erroneous
inclusion of enum ieee80211_key_alg, which no
longer exists after the change to ciphers.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Poll for join command completion instead of waiting blindly for 10
msecs. There is a timeout of 100 msecs, if the command doesn't complete
by then, we return an error code.
Jay Sternberg [Thu, 12 Aug 2010 19:15:55 +0000 (12:15 -0700)]
iwlwifi: move debug options into submenu
more debug options being added so it is useful to move them
into a submenu for ease of readability when using config commands
like make menuconfig and make xconfig
Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Jay Sternberg [Thu, 12 Aug 2010 17:24:07 +0000 (10:24 -0700)]
iwlwifi: enable experimental ucode support
ucode firmware may need to be released as experimental for testing or
debugging. released ucode filenames have the API version as the last
component. experimental ucode files will have that component be "exp"
and the fw_version string reported by ethtool will also contain the
string EXP to clearly identify this ucode from released ucode.
EXP is short for EXPERIMENTAL since fw_version has a max lenght on 32.
this capability is controlled by Kconfig and defaulted to not be used.
Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Wey-Yi Guy [Tue, 3 Aug 2010 15:23:32 +0000 (08:23 -0700)]
iwlagn: continue perform rate scale when error detected
If for some reason, the actual link command not matching neither
active nor search table; instead of return and not performing rate
scale, by-pass the data collection and continue the rate scale process.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg [Thu, 29 Jul 2010 14:07:51 +0000 (07:07 -0700)]
iwlwifi: refactor iwl_setup_rxon_timing
All callers of iwl_setup_rxon_timing() also send
the command right away, so rename the function
to iwl_send_rxon_timing() and move the sending
into it. Also, some callers clear the data, this
can be done always and thus moved in as well.
Finally, there's no reason for the function to
acquire the spinlock, but it should be called
with the mutex held, so assert that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Update outdated comments of iwl_set_rxon_channel() to reflect the
current signature. Also remove the unnecessary validation of the
channel. Those channel info are constructed in iwlwifi driver
and mac80211 will never modify the content of the struct. Also
everytime before this function is called the channel info has
been validated already (as a paranoid check).
Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
When iwl_mac_config() is called by mac80211, the channel pointer
hw->conf->channel can potentially change, resulting in mismatch
band and channel number when configuring RXON command. To avoid
this situation, save the channel pointer in local variables
and validate the channel before using it. Note that priv->mutex
is locked during the whole function so the local variables are safe.
Same change is applied to iwl_mac_channel_switch() since basically
it copies code from iwl_mac_config().
Also removed an outdated comment in the flow.
Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
iwlwifi: do not call ieee80211_frequency_to_channel
A few cases in iwlwifi driver function ieee80211_frequency_to_channel()
is called to get channel number from center frequency. This is not needed
since the channel number is already saved in hw_value field of struct
ieee80211_channel in function iwlcore_init_geos(). So replace those function
calls with hw_value field of struct ieee80211_channel.
Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Julian Calaby [Tue, 17 Aug 2010 18:52:41 +0000 (14:52 -0400)]
Hostap: Fix "'ret' set but not used" warning message from GCC in hostap
CC [M] drivers/net/wireless/hostap/hostap_ioctl.o
drivers/net/wireless/hostap/hostap_ioctl.c: In function 'prism2_request_scan':
drivers/net/wireless/hostap/hostap_ioctl.c:1666:6: warning: variable 'ret' set but not used
Signed-off-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 6 Aug 2010 19:39:14 +0000 (12:39 -0700)]
iwlwifi: fix thermal throttling related power management operation
The current approach is very broken because it adds an
often-used code path that will not initialise "cmd" at all.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Shanyu Zhao <shanyu.zhao.intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 17 Aug 2010 10:08:07 +0000 (12:08 +0200)]
mac80211-hwsim: allow configuring IBSS
It will not look standard-compliant in a sniffer
because because it doesn't
* sync TSF
* adjust the TSF in beacons
* send beacons at TBTT
* cancel beacons when another phy sends
However, it does allow testing the configuration
and parts of the mac80211 code for IBSS and as
such is still useful.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 17 Aug 2010 10:04:34 +0000 (12:04 +0200)]
wireless: move documentation books
This moves mac80211 documentation into a new
802.11 bookset and also adds a cfg80211 book
to the set. All of this is rather incomplete,
but it's easier to work with big code moving
as a separate patch.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Like other vendors, p54* devices have a checksum for
the EEPROM descriptor data. This patch enhances the
parser code to generate and verify the data fields,
before initializing the radio-chip on the card.
Note:
If you have to bootstrap an alternative EEPROM image
for your device and you don't know how to generate a
valid crc ccitt checksum, you should take a look at:
http://git.kernel.org/?p=linux/kernel/git/chr/p54tools.git
The "checksum" utility loads a binary p54 EEPROM blob
(use the -f switch, to skip the check) and applies
the correct crc automatically.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland [Sun, 15 Aug 2010 17:03:15 +0000 (13:03 -0400)]
ath5k: don't enable probe request rx for STAs
AR5K_RX_FILTER_PROBEREQ enables reception of probe requests,
but the filter flag FIF_BCN_PRBRESP_PROMISC is actually about
receiving beacons and probe _responses_, so we shouldn't
turn on the filter when scanning.
Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland [Sun, 15 Aug 2010 17:03:13 +0000 (13:03 -0400)]
ath5k: remove monitor check in receive_frame_ok filter
Monitor interfaces are never seen by the driver, so tests based on
that opmode don't make sense. Also, we already pass all mic
failure packets.
Consequently this code is actually accepting any frames with just
crypto errors and rejecting those with CRC, FIFO, and PHY errors for
all interface types. Adjust the code and comment accordingly.
Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 12 Aug 2010 13:38:38 +0000 (15:38 +0200)]
cfg80211/mac80211: extensible frame processing
Allow userspace to register for more than just
action frames by giving the frame subtype, and
make it possible to use this in various modes
as well.
With some tweaks and some added functionality
this will, in the future, also be usable in AP
mode and be able to replace the cooked monitor
interface currently used in that case.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 12 Aug 2010 13:37:29 +0000 (15:37 +0200)]
mac80211: remove unused don't-encrypt flag
When MFP is disabled, action frames will not
be encrypted since they are management frames
and the only management frames that can then
be encrypted are authentication frames.
Therefore, setting the don't-encrypt flag on
action frames is unnecessary.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 12 Aug 2010 12:49:58 +0000 (14:49 +0200)]
cfg80211: mark ieee80211_hdrlen const
This function analyses only its single, value-passed
argument, and has no side effects. Thus it can be
const, which makes mac80211 smaller, for example:
text data bss dec hex filename
362518 16720 884 380122 5ccda mac80211.ko (before)
362358 16720 884 379962 5cc3a mac80211.ko (after)
a 160 byte saving in text size, and an optimisation
because the function won't be called as often.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>