John W. Linville [Fri, 15 Oct 2010 20:11:56 +0000 (16:11 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6 into for-davem
John W. Linville [Fri, 15 Oct 2010 20:00:02 +0000 (16:00 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/padovan/bluetooth-next-2.6 into for-davem
Julia Lawall [Fri, 15 Oct 2010 13:00:06 +0000 (15:00 +0200)]
drivers/net/wireless/p54/eeprom.c: Return -ENOMEM on memory allocation failure
In this code, 0 is returned on memory allocation failure, even though other
failures return -ENOMEM or other similar values.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression ret;
expression x,e1,e2,e3;
@@
ret = 0
... when != ret = e1
*x = \(kmalloc\|kcalloc\|kzalloc\)(...)
... when != ret = e2
if (x == NULL) { ... when != ret = e3
return ret;
}
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: <stable@kernel.org>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ben Greear [Thu, 14 Oct 2010 19:45:30 +0000 (12:45 -0700)]
ath9k: Null out references to stale pointers.
This doesn't fix any problem that I'm aware of, but should
make it harder to add use-after-free type bugs in the
future.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ben Greear [Thu, 14 Oct 2010 19:45:29 +0000 (12:45 -0700)]
ath9k: Remove bf_dmacontext.
The bf_dmacontext seems to be totally useless and duplicated
by bf_buf_addr. Remove it entirely, use bf_buf_addr in its
place.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 14 Oct 2010 19:16:33 +0000 (21:16 +0200)]
b43: N-PHY: put 2056-radio's specific code in separated file
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 14 Oct 2010 18:44:27 +0000 (11:44 -0700)]
ath9k_hw: remove AR9003 2.0 support
These chipsets will not hit the market, all customers will be
on >= AR9003 2.2. This shaves down the ath9k_hw size by
24161 bytes (24 KB) on my system.
Before:
$ size drivers/net/wireless/ath/ath9k/ath9k_hw.ko
text data bss dec hex filename
292328 616 1824 294768 47f70 drivers/net/wireless/ath/ath9k/ath9k_hw.ko
$ du -b drivers/net/wireless/ath/ath9k/ath9k_hw.ko
5987825 drivers/net/wireless/ath/ath9k/ath9k_hw.ko
After:
$ size drivers/net/wireless/ath/ath9k/ath9k_hw.ko
text data bss dec hex filename
277192 616 1824 279632 44450 drivers/net/wireless/ath/ath9k/ath9k_hw.ko
$ du -b drivers/net/wireless/ath/ath9k/ath9k_hw.ko
5963664 drivers/net/wireless/ath/ath9k/ath9k_hw.ko
Cc: Yixiang Li <yixiang.li@atheros.com>
Cc: Don Breslin <don.breslin@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 14 Oct 2010 17:33:36 +0000 (19:33 +0200)]
b43: N-PHY: put radio-specific code in separated file
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 14 Oct 2010 17:33:35 +0000 (19:33 +0200)]
b43: N-PHY: fix typo: read table when caching IQ LO calibration (do not write)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 14 Oct 2010 17:33:34 +0000 (19:33 +0200)]
b43: N-PHY: replace N-specific radio_chanspec with common code
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 14 Oct 2010 11:41:35 +0000 (13:41 +0200)]
radiotap: fix vendor namespace parsing
There's a bug with radiotap vendor namespace
parsing if you don't register for the given
namespace extensions. Fix this by passing
only the unknown vendor namespaces and the
registered data to frontends, but not both.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Thu, 14 Oct 2010 05:20:26 +0000 (10:50 +0530)]
ath9k_htc: set probe request rx filter
This patch enables to receive probe request frames on p2p
client mode.
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Paul Fox [Wed, 13 Oct 2010 19:14:56 +0000 (20:14 +0100)]
libertas: Communicate USB transfer errors
The return code was being overwritten with -1.
Useful for debugging.
Signed-off-by: Paul Fox <pgf@laptop.org>
Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Thu, 14 Oct 2010 14:02:39 +0000 (16:02 +0200)]
ath9k_hw: remove enum wireless_mode and its users
The wireless mode bitfield was only used to detect 2.4 and 5 GHz support,
which can be simplified by using ATH9K_HW_CAP_* capabilities.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Wed, 13 Oct 2010 14:43:27 +0000 (16:43 +0200)]
ath9k: remove sc->cur_rate_table and sc->cur_rate_mode
Set the rate table in the rc module properly based on band and
HT capabilities instead, which was already partially done, but
not for every mode.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Wed, 13 Oct 2010 14:43:26 +0000 (16:43 +0200)]
ath9k: make rate control debugfs stats per station
Move them to the same debugfs file that the other rc modules use.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Tue, 12 Oct 2010 14:08:03 +0000 (16:08 +0200)]
ath9k: add missing locking around ath9k_hw_proc_mib_event
ath9k_hw_proc_mib_event updates the cycle counters, so it common->cc_lock
must be acquired.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Tue, 12 Oct 2010 14:08:02 +0000 (16:08 +0200)]
ath9k_hw: fix PHY counter overflow handling in ANI v1
PHY counter overflows need to be checked for the old ANI version,
because of its use of interrupt based counter overflow reports when
the counters exceed the configured thresholds.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Tue, 12 Oct 2010 14:08:01 +0000 (16:08 +0200)]
ath9k_hw: fix division by zero in the ANI monitor code
The commit "ath9k_hw: remove code duplication in phy error counter handling"
split off some duplicate code into a separate function, but did not have a
return code for aborting ANI processing based on counter values.
This introduced a divide by zero issue.
This patch adds the missing return code check in ath9k_hw_ani_monitor
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Tue, 12 Oct 2010 12:02:53 +0000 (14:02 +0200)]
ath9k: do not track cycle counter updates in powersave mode
While the chip is in powersave mode, the cycle counter updates do not
contain useful values. While the chip is in full sleep, the rx_clear
signal stays high, indicating a busy medium.
To ensure sane values, update cycle counters before going into
powersave, and clear them right after switching back to awake.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John Fastabend [Fri, 15 Oct 2010 16:27:38 +0000 (09:27 -0700)]
ixgbe: DCB: remove DCB check config
Remove a DCB check config from DCB configuration we
continue to configure DCB even if it fails so don't
even bother to check. Plus user space (lldpad) checks
this before programming the hw anyways.
Worse case is we program some values into the hw that
don't make total sense resulting in incorrect bandwidth
allocation.
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Carolyn Wyborny [Tue, 12 Oct 2010 22:27:02 +0000 (22:27 +0000)]
igb: add check for fiber/serdes devices to igb_set_spd_dplx;
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Emil Tantilov [Tue, 12 Oct 2010 22:20:59 +0000 (22:20 +0000)]
ixgbe: declare functions as static
Following patch fixes warnings reported by `make namespacecheck`
Reported by Stephen Hemminger
CC: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Emil Tantilov [Tue, 12 Oct 2010 22:20:34 +0000 (22:20 +0000)]
ixgbe: remove unused functions
Remove functions that are declared, but not used in the driver.
This patch fixes warnings reported by `make namespacecheck`
Reported by Stephen Hemminger
CC: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Wed, 13 Oct 2010 14:06:51 +0000 (14:06 +0000)]
cnic: Add support for 57712 device
Add new interrupt ack functions and other hardware interface logic to
support the new device.
Update version to 2.2.6.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Wed, 13 Oct 2010 14:06:50 +0000 (14:06 +0000)]
cnic: Decouple uio close from cnic shutdown
During cnic shutdown, the original driver code requires userspace to
close the uio device within a few seconds. This doesn't always happen
as the userapp may be hung or otherwise take a long time to close. The
system may crash when this happens.
We fix the problem by decoupling the uio structures from the cnic
structures during cnic shutdown. We do not unregister the uio device
until the cnic driver is unloaded. This eliminates the unreliable wait
loop for uio to close.
All uio structures are kept in a linked list. If the device is shutdown
and later brought back up again, the uio strcture will be found in the
linked list and coupled back to the cnic structures.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Wed, 13 Oct 2010 14:06:49 +0000 (14:06 +0000)]
cnic: Add cnic_uio_dev struct
and put all uio related structures and ring buffers in it. This allows
uio operations to be done independent of the cnic device structures.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Wed, 13 Oct 2010 14:06:48 +0000 (14:06 +0000)]
cnic: Add cnic_free_uio()
to free all UIO related structures.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Wed, 13 Oct 2010 14:06:47 +0000 (14:06 +0000)]
cnic: Defer iscsi connection cleanup
The bnx2x devices require a 2 second quiet time before sending the last
RAMROD command to destroy a connection. This sleep wait adds up to a
long delay when iscsid is serially destroying maultiple connections.
Create a workqueue to perform the final connection cleanup in the
background to speed up the process. This significantly speeds up the
process as the wait time can be done in parallel for multiple connections.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Wed, 13 Oct 2010 14:06:46 +0000 (14:06 +0000)]
cnic: Add cnic_bnx2x_destroy_ramrod()
Refactoring code for the next patch to defer connection clean up.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Wed, 13 Oct 2010 14:06:45 +0000 (14:06 +0000)]
cnic: Convert ctx_flags to bit fields
so that we can additional bit definitions without requiring a spinlock.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Wed, 13 Oct 2010 14:06:44 +0000 (14:06 +0000)]
cnic: Add common cnic_request_irq()
to reduce some duplicate code. Also, use tasklet_kill() in
cnic_free_irq() to wait for the cnic_irq_task to complete.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wey-Yi Guy [Fri, 8 Oct 2010 23:05:19 +0000 (16:05 -0700)]
iwlwifi: move agn only eeprom functions to separate file
Some of the functions in iwl-eeprom.c file are for agn devices only,
Those functions do not have to be part of iwlcore.ko, so move those
to iwl-agn-eeprom.c file.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg [Thu, 7 Oct 2010 11:00:33 +0000 (04:00 -0700)]
iwlagn: check beacon frame size
When the beacon_skb is NULL, we might still
attempt to use it in this code path (if we
ever get here) -- make the code a bit more
defensive and check the return value of
iwl_fill_beacon_frame() against zero.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg [Thu, 7 Oct 2010 10:52:35 +0000 (03:52 -0700)]
iwlwifi: blink LED in IBSS mode
We recently found that contrary to expectations,
the LED is not blinking in IBSS mode. Fix this.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg [Thu, 7 Oct 2010 11:02:03 +0000 (04:02 -0700)]
iwlwifi: rewrite RXON checks
The RXON checking is a bit magical, and prints
out too much information if something goes wrong.
Make it less magical and print out only the items
that were actually wrong.
Also remove the comment about removing it -- the
driver is constantly changing so these checks are
useful.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Wey-Yi Guy [Wed, 6 Oct 2010 20:46:11 +0000 (13:46 -0700)]
iwlagn: 6050 ops should be used;
For 6050 series of devices, 6050 ops should be used;
One of the 6050 config still use 6000 ops, fix it.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg [Mon, 4 Oct 2010 12:50:36 +0000 (05:50 -0700)]
iwlwifi: clean up some beacon handling
There's no need to check for NULL before
calling dev_kfree_skb() since it is valid
to call it on NULL -- it becomes a no-op.
There's also no need to initialise the
beacon_skb variable to NULL just after
the memory it is in has been kzalloc'ed.
Some minor whitespace cleanups, and a
lock assertion in a function that needs
the mutex (to access the beacon_skb var)
complete the patch.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg [Mon, 4 Oct 2010 12:50:06 +0000 (05:50 -0700)]
iwlwifi: rename ibss_beacon variable
Since we're also going to support AP (GO) mode,
the variable isn't used for just IBSS beacons
any more -- rename it to not mislead readers.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg [Mon, 4 Oct 2010 12:47:23 +0000 (05:47 -0700)]
iwlwifi: allow probe-after-rx on 2.4 GHz
There are two passive 2.4 GHz channels: 12 and 13.
If you have a hidden SSID on those, you will not
be able to connect to it because we don't send out
probe requests there. We can allow this by using
the firmware's probe-after-rx functionality on
those channels as well.
This fixes
https://bugzilla.kernel.org/show_bug.cgi?id=16462
Reported-by: Daniel J Blueman <daniel.blueman@gmail.com>
Tested-by: Daniel J Blueman <daniel.blueman@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Wey-Yi Guy [Thu, 23 Sep 2010 22:24:22 +0000 (15:24 -0700)]
iwlgn: need longer tx queue stuck timer for coex devices
For BT/WiFi combo devices, need longer tx stuck queue
timer, so those devices won't reload firmware too often.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Kumar Sanghvi [Tue, 12 Oct 2010 20:17:25 +0000 (20:17 +0000)]
Documentation: Update Phonet doc for Pipe controller changes
Updates to Phonet doc for Pipe controller 'connect' socket
implementation and changes related to socket options.
Signed-off-by: Kumar Sanghvi <kumar.sanghvi@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Kumar Sanghvi [Tue, 12 Oct 2010 20:14:43 +0000 (20:14 +0000)]
Phonet: 'connect' socket implementation for Pipe controller
Based on suggestion by Rémi Denis-Courmont to implement 'connect'
for Pipe controller logic, this patch implements 'connect' socket
call for the Pipe controller logic.
The patch does following:-
- Removes setsockopts for PNPIPE_CREATE and PNPIPE_DESTROY
- Adds setsockopt for setting the Pipe handle value
- Implements connect socket call
- Updates the Pipe controller logic
User-space should now follow below sequence with Pipe controller:-
-socket
-bind
-setsockopt for PNPIPE_PIPE_HANDLE
-connect
-setsockopt for PNPIPE_ENCAP_IP
-setsockopt for PNPIPE_ENABLE
GPRS/3G data has been tested working fine with this.
Signed-off-by: Kumar Sanghvi <kumar.sanghvi@stericsson.com>
Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Paul Gortmaker [Tue, 12 Oct 2010 14:25:58 +0000 (14:25 +0000)]
tipc: clean out all instances of #if 0'd unused code
Remove all instances of legacy, or as yet to be implemented code
that is currently living within an #if 0 ... #endif block.
In the rare instance that some of it be needed in the future,
it can still be dragged out of history, but there is no need
for it to sit in mainline.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Greear [Wed, 13 Oct 2010 19:01:23 +0000 (12:01 -0700)]
ath9k: Fix potential use-after-free.
The ath_debug_stat_tx references bf->bf_mpdu, which
is the skb consumed by ath_tx_complete. So, call
the ath_debug_stat_tx method first.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 13 Oct 2010 17:23:21 +0000 (19:23 +0200)]
mac80211: fix SMPS request
It looks like I submitted a different patch
than I tested, because clearly the code in
mac80211 is missing actually propagating the
requested SMPS mode. Fix that!
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Wed, 13 Oct 2010 14:29:31 +0000 (17:29 +0300)]
ath9k: Set RX filter for Probe Request based on filter flag
This allows mac80211 to enable receiving of Probe Request frames in
station mode which is needed for P2P.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 13 Oct 2010 10:06:24 +0000 (12:06 +0200)]
mac80211: add probe request filter flag
Using the frame registration notification, we
can see when probe requests are requested and
notify the low-level driver via filtering. The
flag is also set in AP and IBSS modes.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 13 Oct 2010 10:06:23 +0000 (12:06 +0200)]
cfg80211: notify drivers about frame registrations
Drivers may need to adjust their filters according
to frame registrations, so notify them about them.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Wed, 13 Oct 2010 06:17:09 +0000 (11:47 +0530)]
ath9k: Fix documentation in rate control
This fix updates the documenation in Rate Control Table structure
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ben Greear [Tue, 12 Oct 2010 17:55:38 +0000 (10:55 -0700)]
ath5k: Move debugfs under ieee80211/[wiphy-name]
This automatically keeps things proper when wiphy
is renamed.
Based on patch by Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Ben Greear <greearb@candelatech.com>
Acked-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gerrit Renker [Tue, 12 Oct 2010 05:07:42 +0000 (07:07 +0200)]
wext: fix alignment problem in serializing 'struct iw_point'
wext: fix alignment problem in serializing 'struct iw_point'
This fixes a typo in the definition of the serialized length of struct iw_point:
a) wireless.h is exported to userspace, the typo causes IW_EV_POINT_PK_LEN
to be 12 on 64-bit, and 8 on 32-bit systems (causing misalignment);
b) in compat-64 mode iwe_stream_add_point() memcpys overlap (see below).
The second case in in compat-64 mode looks like (variable names are as in
include/net/iw_handler.h:iwe_stream_add_point()):
point_len = IW_EV_COMPAT_POINT_LEN = 8
lcp_len = IW_EV_COMPAT_LCP_LEN = 4
2nd memcpy: IW_EV_POINT_PK_LEN - IW_EV_LCP_PK_LEN = 12 - 4 = 8
IW_EV_LCP_PK_LEN
<--------------> *---> 'extra' data area
+-------+-------+-------+-------+---------------+------- ...-+
| len | cmd |length | flags | (empty) -> extra ... |
+-------+-------+-------+-------+---------------+------- ...-+
2 2 2 2 4
lcp_len
<--------------> <-!! OVERLAP !!>
<--1st memcpy--><------- 2nd memcpy ----------->
<---- 3rd memcpy ------- ... >
<--------- point_len ---------->
This case could cause overrun whenever iw_point.length < 4.
The other two cases are -
* 32-bit systems: IW_EV_POINT_PK_LEN - IW_EV_LCP_PK_LEN = 8 - 4 = 4,
the second memcpy copies exactly the 4 required bytes;
* 64-bit systems: IW_EV_POINT_PK_LEN - IW_EV_LCP_PK_LEN = 12 - 4 = 8,
the second memcpy copies a superfluous (but non overlapping) 4 bytes.
The patch changes IW_EV_POINT_PK_LEN to be 8, so that in all 3 cases always only
the requested iw_point.{length,flags} (both __u16) are copied, avoiding overrrun
(compat-64) and superfluous copy (64-bit). In addition, the userspace header is
sanitized (in agreement with version 30 of the wireless tools).
Many thanks to Johannes Berg for help and review with this patch.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David S. Miller [Wed, 13 Oct 2010 16:11:26 +0000 (09:11 -0700)]
s390: ctcm_mpc: Fix build after netdev refcount changes.
Reported-by: Sachin Sant <sachinp@in.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Tue, 12 Oct 2010 18:07:44 +0000 (11:07 -0700)]
ath5k: fix build break from "ath5k: Print out opmode in debugfs"
Also improve ath_opmode_to_string usage by having it return UNKNOWN
rather than NULL in the event of failure to map the opmode value to a
representative string.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ben Greear [Mon, 11 Oct 2010 17:28:59 +0000 (10:28 -0700)]
wireless: Print wiphy name in sysfs.
The index cannot be used to reliably reconstruct a phy
name, so explicitly add the phy name to sysfs so that scripts
can figure out the parent phy device for a particular
wireless interface.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Tue, 12 Oct 2010 19:52:25 +0000 (15:52 -0400)]
Merge branch 'wireless-next-2.6' of git://git./linux/kernel/git/iwlwifi/iwlwifi-2.6
Eric Dumazet [Mon, 11 Oct 2010 10:22:12 +0000 (10:22 +0000)]
net: percpu net_device refcount
We tried very hard to remove all possible dev_hold()/dev_put() pairs in
network stack, using RCU conversions.
There is still an unavoidable device refcount change for every dst we
create/destroy, and this can slow down some workloads (routers or some
app servers, mmap af_packet)
We can switch to a percpu refcount implementation, now dynamic per_cpu
infrastructure is mature. On a 64 cpus machine, this consumes 256 bytes
per device.
On x86, dev_hold(dev) code :
before
lock incl 0x280(%ebx)
after:
movl 0x260(%ebx),%eax
incl fs:(%eax)
Stress bench :
(Sending 160.000.000 UDP frames,
IP route cache disabled, dual E5540 @2.53GHz,
32bit kernel, FIB_TRIE)
Before:
real 1m1.662s
user 0m14.373s
sys 12m55.960s
After:
real 0m51.179s
user 0m15.329s
sys 10m15.942s
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dmitry Kravkov [Tue, 12 Oct 2010 09:02:21 +0000 (09:02 +0000)]
bnx2x: Fixing a typo: added a missing RSS enablement
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Tested-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 12 Oct 2010 18:43:42 +0000 (11:43 -0700)]
Merge branch 'dccp' of git://eden-feed.erg.abdn.ac.uk/net-next-2.6
Gustavo F. Padovan [Fri, 8 Oct 2010 12:13:28 +0000 (09:13 -0300)]
Bluetooth: update MAINTAINERS for Bluetooth subsys
Add myself to MAINTAINERS and update the git trees.
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Karl Beldan [Thu, 7 Oct 2010 19:57:10 +0000 (21:57 +0200)]
Bluetooth: hci_uart: Fix typo in stats for sco tx
s/stat.cmd_tx++/stat.sco_tx++ for HCI_SCODATA_PKT
Signed-off-by: Karl Beldan <karl.beldan@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andrei Emeltchenko [Fri, 1 Oct 2010 09:05:11 +0000 (12:05 +0300)]
Bluetooth: clean up rfcomm code
Remove dead code and unused rfcomm thread events
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Haijun Liu [Thu, 30 Sep 2010 08:52:40 +0000 (16:52 +0800)]
Bluetooth: Update conf_state before send config_req out
Update conf_state with L2CAP_CONF_REQ_SENT before send config_req out in
l2cap_config_req().
Signed-off-by: Haijun Liu <haijun.liu@atheros.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo F. Padovan [Fri, 24 Sep 2010 23:30:57 +0000 (20:30 -0300)]
Bluetooth: Use the proper error value from bt_skb_send_alloc()
&err points to the proper error set by bt_skb_send_alloc() when it
fails.
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo F. Padovan [Fri, 3 Sep 2010 21:29:46 +0000 (18:29 -0300)]
Bluetooth: make batostr() print in the right order
The Bluetooth core uses the the BD_ADDR in the opposite order from the
human readable order. So we are changing batostr() to print in the
correct order and then removing some baswap(), as they are not needed
anymore.
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo F. Padovan [Fri, 3 Sep 2010 20:51:57 +0000 (17:51 -0300)]
Bluetooth: remove unused variable from cmtp
A value was attributed to 'src', but no one was using.
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andrei Emeltchenko [Wed, 15 Sep 2010 11:28:43 +0000 (14:28 +0300)]
Bluetooth: check for l2cap header in start fragment
BLUETOOTH SPECIFICATION Version 4.0 [Vol 3] page 36 mentioned
"Note: Start Fragments always begin with the Basic L2CAP header
of a PDU."
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andrei Emeltchenko [Wed, 15 Sep 2010 11:28:44 +0000 (14:28 +0300)]
Bluetooth: check L2CAP length in first ACL fragment
Current Bluetooth code assembles fragments of big L2CAP packets
in l2cap_recv_acldata and then checks allowed L2CAP size in
assemled L2CAP packet (pi->imtu < skb->len).
The patch moves allowed L2CAP size check to the early stage when
we receive the first fragment of L2CAP packet. We do not need to
reserve and keep L2CAP fragments for bad packets.
Updated version after comments from Mat Martineau <mathewm@codeaurora.org>
and Gustavo Padovan <padovan@profusion.mobi>.
Trace below is received when using stress tools sending big
fragmented L2CAP packets.
...
[ 1712.798492] swapper: page allocation failure. order:4, mode:0x4020
[ 1712.804809] [<
c0031870>] (unwind_backtrace+0x0/0xdc) from [<
c00a1f70>]
(__alloc_pages_nodemask+0x4)
[ 1712.814666] [<
c00a1f70>] (__alloc_pages_nodemask+0x47c/0x4d4) from
[<
c00a1fd8>] (__get_free_pages+)
[ 1712.824645] [<
c00a1fd8>] (__get_free_pages+0x10/0x3c) from [<
c026eb5c>]
(__alloc_skb+0x4c/0xfc)
[ 1712.833465] [<
c026eb5c>] (__alloc_skb+0x4c/0xfc) from [<
bf28c738>]
(l2cap_recv_acldata+0xf0/0x1f8 )
[ 1712.843322] [<
bf28c738>] (l2cap_recv_acldata+0xf0/0x1f8 [l2cap]) from
[<
bf0094ac>] (hci_rx_task+0x)
...
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Nobuhiro Iwamatsu [Fri, 20 Aug 2010 07:24:07 +0000 (16:24 +0900)]
Bluetooth: Add support Bluetooth controller of MacbookPro 7,1
Bluetooth controller of MacbookPro 7,1 does not work.
Because Device Class of these controllers was set 255 (Vendor Sepecific Class).
T: Bus=04 Lev=02 Prnt=04 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=05ac ProdID=8213 Rev=01.86
S: Manufacturer=Apple Inc.
S: Product=Bluetooth USB Host Controller
S: SerialNumber=
5C5948C81B99
C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I: If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=00 Driver=(none)
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Nobuhiro Iwamatsu [Fri, 20 Aug 2010 07:24:06 +0000 (16:24 +0900)]
Bluetooth: Add support Bluetooth controller of MacbookPro 6,2
Bluetooth controller of MacbookPro 6,2 does not work.
Because Device Class of these controllers was set 255 (Vendor Sepecific Class).
T: Bus=01 Lev=03 Prnt=03 Port=02 Cnt=03 Dev#= 8 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=05ac ProdID=8218 Rev=00.22
S: Manufacturer=Apple Inc.
S: Product=Bluetooth USB Host Controller
C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I: If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Johan Hedberg [Thu, 9 Sep 2010 07:32:39 +0000 (10:32 +0300)]
Bluetooth: Don't clear the blacklist when closing the HCI device
Clearing the blacklist in hci_dev_do_close() would mean that user space
needs to do extra work to re-block devices after a DEVDOWN-DEVUP cycle.
This patch removes the clearing of the blacklist in this case and
thereby saves user space from the extra work.
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Acked-by: Ville Tervo <ville.tervo@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andrei Emeltchenko [Wed, 8 Sep 2010 13:26:53 +0000 (16:26 +0300)]
Bluetooth: remove extra newline from debug output
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Acked-by: Ville Tervo <ville.tervo@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Mat Martineau [Wed, 8 Sep 2010 17:05:29 +0000 (10:05 -0700)]
Bluetooth: Use a stream-oriented recvmsg with SOCK_STREAM L2CAP sockets.
L2CAP ERTM sockets can be opened with the SOCK_STREAM socket type,
which is a mandatory request for ERTM mode.
However, these sockets still have SOCK_SEQPACKET read semantics when
bt_sock_recvmsg() is used to pull data from the receive queue. If the
application is only reading part of a frame, then the unread portion
of the frame is discarded. If the application requests more bytes
than are in the current frame, only the current frame's data is
returned.
This patch utilizes common code derived from RFCOMM's recvmsg()
function to make L2CAP SOCK_STREAM reads behave like RFCOMM reads (and
other SOCK_STREAM sockets in general). The application may read one
byte at a time from the input stream and not lose any data, and may
also read across L2CAP frame boundaries.
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Mat Martineau [Wed, 8 Sep 2010 17:05:28 +0000 (10:05 -0700)]
Bluetooth: Use common SOCK_STREAM receive code in RFCOMM
To reduce code duplication, have rfcomm_sock_recvmsg() call
bt_sock_stream_recvmsg(). The common bt_sock_stream_recvmsg()
code is nearly identical, with the RFCOMM-specific functionality
for deferred setup and connection unthrottling left in
rfcomm_sock_recvmsg().
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Mat Martineau [Wed, 8 Sep 2010 17:05:27 +0000 (10:05 -0700)]
Bluetooth: Add common code for stream-oriented recvmsg()
This commit adds a bt_sock_stream_recvmsg() function for use by any
Bluetooth code that uses SOCK_STREAM sockets. This code is copied
from rfcomm_sock_recvmsg() with minimal modifications to remove
RFCOMM-specific functionality and improve readability.
L2CAP (with the SOCK_STREAM socket type) and RFCOMM have common needs
when it comes to reading data. Proper stream read semantics require
that applications can read from a stream one byte at a time and not
lose any data. The RFCOMM code already operated on and pulled data
from the underlying L2CAP socket, so very few changes were required to
make the code more generic for use with non-RFCOMM data over L2CAP.
Applications that need more awareness of L2CAP frame boundaries are
still free to use SOCK_SEQPACKET sockets, and may verify that they
connection did not fall back to basic mode by calling getsockopt().
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Mat Martineau [Wed, 8 Sep 2010 17:05:26 +0000 (10:05 -0700)]
Bluetooth: Validate PSM values in calls to connect() and bind()
Valid L2CAP PSMs are odd numbers, and the least significant bit of the
most significant byte must be 0.
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Yuri Kululin [Fri, 23 Jul 2010 09:57:12 +0000 (13:57 +0400)]
Bluetooth: Fix RFCOMM RPN negotiation
According to the ETSI 3GPP TS 07.10 the default bit rate value for RFCOMM
is 9600 bit/s. Return this bit rate in case of RPN request and accept other
sane bit rates proposed by the sender in RPM command.
Signed-off-by: Yuri Kululin <ext-yuri.kululin@nokia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
David Vrabel [Mon, 9 Aug 2010 21:42:21 +0000 (17:42 -0400)]
Bluetooth: Support SDIO devices that are AMP controllers
Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
David Vrabel [Mon, 9 Aug 2010 21:38:10 +0000 (17:38 -0400)]
Bluetooth: HCI devices are either BR/EDR or AMP radios
HCI transport drivers may not know what type of radio an AMP device has
so only say whether they're BR/EDR or AMP devices.
Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Johannes Berg [Tue, 12 Oct 2010 09:26:13 +0000 (02:26 -0700)]
iwl3945: fix queue allocation
commit
6f98613258b966ffe0e6def18129b386514d10e0
Author: Jay Sternberg <jay.e.sternberg@intel.com>
Date: Sat Sep 18 09:07:04 2010 -0700
iwlagn: reduce redundant parameter definitions
broke 3945 because Jay accidentally removed the
num_of_queues parameter for 3945, so that we now
attempt to allocate a zero-sized queue array,
which leads to SLUB returning ZERO_SIZE_PTR (0x10)
which we then try to dereference thus crashing the
system. Restore the necessary num_of_queues param.
This fixes
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2254
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Wey-Yi Guy [Mon, 11 Oct 2010 21:24:05 +0000 (14:24 -0700)]
iwlagn: prio_tbl need to download before calibration
For WiFi/BT combo devices, priority table always need to download
before perform any calibration operation.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Wey-Yi Guy [Thu, 23 Sep 2010 16:56:51 +0000 (09:56 -0700)]
iiwlagn: always download priority table
For advance BT/WiFi co-exist, always download bt priority table
before sending bt_config command
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Gerrit Renker [Mon, 11 Oct 2010 18:44:42 +0000 (20:44 +0200)]
dccp: cosmetics - warning format
This omits the redundant "DCCP:" in warning messages, since DCCP_WARN() already
echoes the function name, avoiding messages like
kernel: [10988.766503] dccp_close: DCCP: ABORT -- 209 bytes unread
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Gerrit Renker [Mon, 11 Oct 2010 18:41:13 +0000 (20:41 +0200)]
dccp: schedule an Ack when receiving timestamps
This schedules an Ack when receiving a timestamp, exploiting the
existing inet_csk_schedule_ack() function, saving one case in the
`dccp_ack_pending()' function.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Ivo Calado [Mon, 11 Oct 2010 18:40:04 +0000 (20:40 +0200)]
dccp: generalise data-loss condition
This patch generalises the task of determining data loss from RFC 4340, 7.7.1.
Let S_A, S_B be sequence numbers such that S_B is "after" S_A, and let
N_B be the NDP count of packet S_B. Then, using modulo-2^48 arithmetic,
D = S_B - S_A - 1 is an upper bound of the number of lost data packets,
D - N_B is an approximation of the number of lost data packets
(there are cases where this is not exact).
The patch implements this as
dccp_loss_count(S_A, S_B, N_B) := max(S_B - S_A - 1 - N_B, 0)
Signed-off-by: Ivo Calado <ivocalado@embedded.ufcg.edu.br>
Signed-off-by: Erivaldo Xavier <desadoc@gmail.com>
Signed-off-by: Leandro Sales <leandroal@gmail.com>
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Gerrit Renker [Mon, 11 Oct 2010 18:37:38 +0000 (20:37 +0200)]
dccp: remove unused argument in CCID tx function
This removes the argument `more' from ccid_hc_tx_packet_sent, since it was
nowhere used in the entire code.
(Btw, this argument was not even used in the original KAME code where the
function initially came from; compare the variable moreToSend in the
freebsd61-dccp-kame-28.08.2006.patch kept by Emmanuel Lochin.)
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Gerrit Renker [Mon, 11 Oct 2010 18:36:33 +0000 (20:36 +0200)]
dccp: merge now-reduced connect_init() function
After moving the assignment of GAR/ISS from dccp_connect_init() to
dccp_transmit_skb(), the former function becomes very small, so that
a merger with dccp_connect() suggests itself.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Gerrit Renker [Mon, 11 Oct 2010 18:35:40 +0000 (20:35 +0200)]
dccp: fix the adjustments to AWL and SWL
This fixes a problem and a potential loophole with regard to seqno/ackno
validity: currently the initial adjustments to AWL/SWL are only performed
once at the begin of the connection, during the handshake.
Since the Sequence Window feature is always greater than Wmin=32 (7.5.2),
it is however necessary to perform these adjustments at least for the first
W/W' (variables as per 7.5.1) packets in the lifetime of a connection.
This requirement is complicated by the fact that W/W' can change at any time
during the lifetime of a connection.
Therefore it is better to perform that safety check each time SWL/AWL are
updated, as implemented by the patch.
A second problem solved by this patch is that the remote/local Sequence Window
feature values (which set the bounds for AWL/SWL/SWH) are undefined until the
feature negotiation has completed.
During the initial handshake we have more stringent sequence number protection;
the changes added by this patch effect that {A,S}W{L,H} are within the correct
bounds at the instant that feature negotiation completes (since the SeqWin
feature activation handlers call dccp_update_gsr/gss()).
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Michael Chan [Mon, 11 Oct 2010 23:12:28 +0000 (16:12 -0700)]
bnx2: Enable AER on PCIE devices only
To prevent unnecessary error message. pci_save_state() is also moved to
the end of ->probe() so that all PCI config, including AER state, will be
saved.
Update version to 2.0.18.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Mon, 11 Oct 2010 23:12:00 +0000 (16:12 -0700)]
bnx2: Update firmware to 6.0.x.
- Improved flow control and simplified interface
- Use hardware RSS indirection table instead of the slower firmware-
based table
- Lower latency interrupt on 5709
Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Mon, 11 Oct 2010 12:20:54 +0000 (12:20 +0000)]
neigh: reorder struct neighbour fields
Le mardi 12 octobre 2010 à 00:02 +0200, Eric Dumazet a écrit :
> Here is the followup patch.
>
> Thanks !
>
Oops, this was an old version, the up2date ones also took care of "used"
field.
I guess its time for a sleep, sorry again.
[PATCH net-next V2] neigh: reorder struct neighbour fields
(refcnt) and (ha_lock, ha, used, dev, output, ops, primary_key) should
be placed on a separate cache lines.
refcnt can be often written, while other fields are mostly read.
This gave me good result on stress test :
before:
real 0m45.570s
user 0m15.525s
sys 9m56.669s
After:
real 0m41.841s
user 0m15.261s
sys 8m45.949s
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Fri, 8 Oct 2010 06:37:34 +0000 (06:37 +0000)]
net dst: use a percpu_counter to track entries
struct dst_ops tracks number of allocated dst in an atomic_t field,
subject to high cache line contention in stress workload.
Switch to a percpu_counter, to reduce number of time we need to dirty a
central location. Place it on a separate cache line to avoid dirtying
read only fields.
Stress test :
(Sending 160.000.000 UDP frames,
IP route cache disabled, dual E5540 @2.53GHz,
32bit kernel, FIB_TRIE, SLUB/NUMA)
Before:
real 0m51.179s
user 0m15.329s
sys 10m15.942s
After:
real 0m45.570s
user 0m15.525s
sys 9m56.669s
With a small reordering of struct neighbour fields, subject of a
following patch, (to separate refcnt from other read mostly fields)
real 0m41.841s
user 0m15.261s
sys 8m45.949s
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Thu, 7 Oct 2010 10:44:07 +0000 (10:44 +0000)]
neigh: Protect neigh->ha[] with a seqlock
Add a seqlock in struct neighbour to protect neigh->ha[], and avoid
dirtying neighbour in stress situation (many different flows / dsts)
Dirtying takes place because of read_lock(&n->lock) and n->used writes.
Switching to a seqlock, and writing n->used only on jiffies changes
permits less dirtying.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 11 Oct 2010 19:30:34 +0000 (12:30 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6
Conflicts:
net/core/ethtool.c
Kees Cook [Mon, 11 Oct 2010 19:23:25 +0000 (12:23 -0700)]
net: clear heap allocations for privileged ethtool actions
Several other ethtool functions leave heap uncleared (potentially) by
drivers. Some interfaces appear safe (eeprom, etc), in that the sizes
are well controlled. In some situations (e.g. unchecked error conditions),
the heap will remain unchanged in areas before copying back to userspace.
Note that these are less of an issue since these all require CAP_NET_ADMIN.
Cc: stable@kernel.org
Signed-off-by: Kees Cook <kees.cook@canonical.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ivo van Doorn [Mon, 11 Oct 2010 13:39:48 +0000 (15:39 +0200)]
rt2x00: Fix URB error handling
kill_urb guarentees that when the function returns, the URB has
been fully killed. This means we don't need the extra sleeping
after the call to kill_urb.
kill_urb can however also guarentee the submit_urb to fail, as
a result, we must catch the return value from submit_urb an
correctly mark the entry as owned by the driver, and the
status as broken.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Mon, 11 Oct 2010 13:39:04 +0000 (15:39 +0200)]
rt2x00: Don't perform watchdog checks on empty queue
The currently used watchdog functions cannot be applied
to empty queues.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Mon, 11 Oct 2010 13:38:45 +0000 (15:38 +0200)]
rt2x00: Make queue_entry flags access atomic
All access to the queue_entry->flags can be done concurrently,
so all flags must use the atomic operators. On most locations
this was already done, so just fix the last few non-atomic
versions.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Mon, 11 Oct 2010 13:38:26 +0000 (15:38 +0200)]
rt2x00: Fix dead queue when skb allocation failed
When the RX skb allocation failed, we should recycle
the previously allocated skbuffer. By calling return
we would kill the RX queue completely since the
entry would be invalidated.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Mon, 11 Oct 2010 13:38:07 +0000 (15:38 +0200)]
rt2x00: Validate MCS on RX path
Similar to the PLCP signal and bitrates values,
we should validate the MCS value from the RX descriptor
before sending it to mac80211.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>