Johannes Berg [Mon, 16 Nov 2009 11:00:40 +0000 (12:00 +0100)]
mac80211: cleanup reorder buffer handling
The reorder buffer handling is written in a quite
peculiar style (especially comments) and also has
a quirk where it invokes the entire reorder code
in ieee80211_sta_manage_reorder_buf() for just a
handful of lines in it with a special argument.
Split out ieee80211_release_reorder_frames which
can then be invoked from BAR handling and other
reordering code, clean up code and comments and
remove function arguments that are now unused from
ieee80211_sta_manage_reorder_buf().
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 16 Nov 2009 11:00:39 +0000 (12:00 +0100)]
mac80211: push michael MIC report after DA check
When we receive a michael MIC failure report from the
hardware we currently do not check whether it is actually
reported on a frame that is destined to us. It shouldn't
be possible to get a michael MIC failure report on other
frames, but it also doesn't hurt to verify.
Also, since we then don't need the station struct that
early, move looking it up a bit later in the RX path.
Finally, while at it, a few code cleanups in the area.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 16 Nov 2009 11:00:38 +0000 (12:00 +0100)]
mac80211: convert aggregation to operate on vifs/stas
The entire aggregation code currently operates on the
hw pointer and station addresses, but that needs to
change to make stations purely per-vif; As one step
preparing for that make the aggregation code callable
with the station, or by the combination of virtual
interface and station address.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Mon, 16 Nov 2009 06:10:53 +0000 (11:40 +0530)]
ath9k: Remove a few unused functions
ATH9K_ANT_VARIABLE is the default diversity control used.
Consequently ath9k_hw_decrease_chain_power() does nothing.
ath9k_hw_setantennaswitch() is unused too.
Also, gbeacon_rate is unused.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Handle beacon interval changes for AP mode.
The original code depended on config_interface() to update
the HW TSF. Since that callback has been removed, handle
it properly.
* Remove unneeded code dealing with key/privacy.
* Set the chainmasks to 1x1 for IBSS when the BSSID is set.
This was happening uncondionally before.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sun, 15 Nov 2009 22:09:25 +0000 (23:09 +0100)]
ath9k: get rid of tx_info_priv
This patch removes the need for separately allocated private tx info
data in ath9k and brings the driver one small step closer to using the
mac80211 rate control API properly.
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 14 Nov 2009 02:29:38 +0000 (03:29 +0100)]
mac80211: reduce the amount of unnecessary traffic on cooked monitor interfaces
In order to handle association and authentication in AP mode,
hostapd needs access to the tx status info of its own frames
through a cooked monitor interface. Without this patch the
cooked monitor interfaces also passed on tx status information
for packets from other virtual interfaces. This creates a
significant performance issue on embedded system. Hostapd
tries to work around this by installing a Linux Socket Filter
that only captures the frames it's interested in, however
data duplication and socket filter matching still uses up
enough CPU cycles to be very noticeable on small systems.
This patch ensures that tx status information of non-injected
frames does not make it to cooked monitor interfaces.
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ben Cahill [Fri, 13 Nov 2009 19:56:38 +0000 (11:56 -0800)]
iwlwifi: Add comments about CSR registers
Also regroup CSR_EEPROM and CSR_OTP bit field definitions.
Signed-off-by: Ben Cahill <ben.m.cahill@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 13 Nov 2009 19:56:37 +0000 (11:56 -0800)]
iwlwifi: handle unicast PS buffering
Using the new mac80211 functionality, this makes
iwlwifi handle unicast PS buffering correctly.
The device works like this:
* when a station goes to sleep, the microcode notices
this and marks the station as asleep
* when the station is marked asleep, the microcode
refuses to transmit to the station and rejects all
frames queued to it with the failure status code
TX_STATUS_FAIL_DEST_PS (a previous patch handled
this correctly)
* when we need to send frames to the station _although_
it is asleep, we need to tell the ucode how many,
and this is asynchronous with sending so we cannot
just send the frames, we need to wait for all other
frames to be flushed, and then update the counter
before sending out the poll response frames. This
is handled partially in the driver and partially in
mac80211.
In order to do all this correctly, we need to
* keep track of how many frames are pending for each
associated client station (avoid doing it for other
stations to avoid the atomic ops)
* tell mac80211 that we driver-block the PS status
while there are still frames pending on the queues,
and once they are all rejected (due to the dest sta
being in PS) unblock mac80211
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 13 Nov 2009 19:56:36 +0000 (11:56 -0800)]
iwlwifi: add sleep_tx_count ucode station API
This field was marked as reserved before since we didn't
use it, but is present in all released firmwares afaict.
We're going to need it soon, so add it now.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 13 Nov 2009 19:56:35 +0000 (11:56 -0800)]
iwlwifi: report PS filtered status
When a frame is sent to a sleeping station, the
microcode reports TX_STATUS_FAIL_DEST_PS as its
status -- we need to translate that to the flag
that mac80211 expects.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Handle BSS_CHANGED_BEACON_ENABLED to enable the sending
of beacons. Also set the correct HT RXON and QoS config.
Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
When sending beacon commands to the uCode, we must
inform it of the offset in the beacon frame of the
TIM Element so it can transmit packets from the
correct queue. This functionality is implemented
in iwl_set_beacon_tim().
Fix a bug setting the rate_n_flags for the beacon
packet. First, it should not use the station table's
rate (it's a management frame), and second it needs
to properly configure the TX antennas.
Finally, also, clean up and comment relevant functions.
Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reinette Chatre [Fri, 13 Nov 2009 19:56:32 +0000 (11:56 -0800)]
iwlagn: power up device before initializing EEPROM
A recent change optimized the power usage by the device by only powering it
up during EEPROM load if it is required (for OTP devices). This change causes
an error on the 1000 series devices during module load.
The error looks as follows:
[ 1624.024524] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27kds
[ 1624.024527] iwlagn: Copyright(c) 2003-2009 Intel Corporation
[ 1624.024711] iwlagn 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1624.024749] iwlagn 0000:01:00.0: setting latency timer to 64
[ 1624.024909] iwlagn 0000:01:00.0: Detected Intel Wireless WiFi Link 1000 Series BGN REV=0x6C
[ 1624.081263] iwlagn 0000:01:00.0: MAC is in deep sleep!. CSR_GP_CNTRL = 0x080003D8
[ 1624.092967] iwlagn 0000:01:00.0: OTP is empty
[ 1624.092988] iwlagn 0000:01:00.0: Unable to init EEPROM
[ 1624.093033] iwlagn 0000:01:00.0: PCI INT A disabled
[ 1624.093065] iwlagn: probe of 0000:01:00.0 failed with error -2
Adding a dump_stack() to where that error is printed shows the following:
[ 1624.024524] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27kds
[ 1624.024527] iwlagn: Copyright(c) 2003-2009 Intel Corporation
[ 1624.024711] iwlagn 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1624.024749] iwlagn 0000:01:00.0: setting latency timer to 64
[ 1624.024909] iwlagn 0000:01:00.0: Detected Intel Wireless WiFi Link 1000 Series BGN REV=0x6C
[ 1624.081263] iwlagn 0000:01:00.0: MAC is in deep sleep!. CSR_GP_CNTRL = 0x080003D8
[ 1624.081263] Pid: 3073, comm: work_for_cpu Tainted: G W 2.6.31.5 #4
[ 1624.081263] Call Trace:
[ 1624.081263] [<ffffffffa02395db>] T.726+0x22b/0x420 [iwlcore]
[ 1624.081263] [<ffffffffa023985a>] iwlcore_eeprom_acquire_semaphore+0x8a/0x190 [iwlcore]
[ 1624.081263] [<ffffffff81110c94>] ? __kmalloc+0x194/0x1c0
[ 1624.081263] [<ffffffffa02391f5>] ? iwlcore_eeprom_verify_signature+0x25/0xf0 [iwlcore]
[ 1624.081263] [<ffffffffa0239c67>] iwl_eeprom_init+0x107/0xf40 [iwlcore]
[ 1624.081263] [<ffffffffa026ab9c>] ? iwl_prepare_card_hw+0x11c/0x470 [iwlagn]
[ 1624.081263] [<ffffffff8127e2a4>] ? pci_bus_write_config_byte+0x64/0x80
[ 1624.081263] [<ffffffffa026b1f8>] iwl_pci_probe+0x308/0xac0 [iwlagn]
[ 1624.081263] [<ffffffff810710a0>] ? do_work_for_cpu+0x0/0x30
[ 1624.081263] [<ffffffff81284912>] local_pci_probe+0x12/0x20
[ 1624.081263] [<ffffffff810710b3>] do_work_for_cpu+0x13/0x30
[ 1624.081263] [<ffffffff81075826>] kthread+0xa6/0xb0
[ 1624.081263] [<ffffffff81012fea>] child_rip+0xa/0x20
[ 1624.081263] [<ffffffff81075780>] ? kthread+0x0/0xb0
[ 1624.081263] [<ffffffff81012fe0>] ? child_rip+0x0/0x20
[ 1624.092967] iwlagn 0000:01:00.0: OTP is empty
[ 1624.092988] iwlagn 0000:01:00.0: Unable to init EEPROM
[ 1624.093033] iwlagn 0000:01:00.0: PCI INT A disabled
[ 1624.093065] iwlagn: probe of 0000:01:00.0 failed with error -2
We know that the routines in this trace, iwlcore_eeprom_acquire_semaphore
and iwlcore_eeprom_verify_signature, only access CSR registers and thus do
not need the device to be awake if it is EEPROM. But for OTP it is required
for the device to be awake to read these registers. Ensure device is awake
before accessing these registers.
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Acked-by: Ben Cahill <ben.m.cahill@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:31 +0000 (11:56 -0800)]
iwlwifi: align tx/rx statistics debugfs format
Align the format for tx_statistics and rx_statistics debugfs output for
better readability
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:30 +0000 (11:56 -0800)]
iwlwifi: eliminate the possible 1/2 dBm tx power loss in 6x00 & 6x50 series
In both 6x00 and 6x50 series, the enhanced/extended tx power table in
EEPROM is used to set the max. tx power limit.
This new tx power table is in 1/2 dBm format, which creates an issue of
possibility of 1/2 dBm loss when driver set the tx power limit; because
of driver keep track and report the tx power in dBm format.
In order to prevent the 1/2 dBm loss, keep track of the true max tx
power in 1/2 dBm format in driver; do the comparison and adjust the tx
power if needed when send tx power command to uCode.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ben Cahill [Fri, 13 Nov 2009 19:56:29 +0000 (11:56 -0800)]
iwl3945: Reset saved POWER_TABLE_CMD in "up"
Power-saving logic will not re-issue a POWER_TABLE_CMD if a new command
matches the prior one. This can be bad if we re-start the device due to
e.g. uCode error; the new POWER_TABLE_CMD (required to invoke power-saving)
may match the prior POWER_TABLE_CMD issued before the uCode error.
Ensure the POWER_TABLE_CMD is sent to device when uCode is up.
Signed-off-by: Ben Cahill <ben.m.cahill@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:28 +0000 (11:56 -0800)]
iwlwifi: update reply_statistics_cmd with 'clear' parameter
When issue REPLY_STATISTICS_CMD to uCode, two possible flag
can be set in the configuration flags
bit 0: Clear statistics
0: Do not clear Statistics counters
1: Clear to zero Statistics counters
Allow "clear" parameter to be set from the caller.
Add debugfs file to clear the statistics counters to help monitor and
debug the uCode behavior.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:27 +0000 (11:56 -0800)]
iwlwifi: remove external reference for non-exist data structure
Number of data structure for 6000 series no longer in production, the
data structure already being removed; also need to remove the external
reference define in iwl-dev.h
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:26 +0000 (11:56 -0800)]
iwlwifi: drop non-production PCI-IDs for 6x50 series
drop the non-production PCI-IDs for 6x50 series
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:25 +0000 (11:56 -0800)]
iwlwifi: remove unused parameter from iwl_channel_info
Number of HT40 power parameters are not used; remove those from
iwl_channel_info data structure
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:24 +0000 (11:56 -0800)]
iwlwifi: disable coex until implementation ready for 6x50
Temporary disable the coex function for wifi/wimax for 6x50
series until the full implementation ready.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:23 +0000 (11:56 -0800)]
iwlwifi: validate enhanced tx power entry
Validate enhanced tx power entry read from EEPROM before applying the
tx power value. Different versions of EEPROM might contain different size
of table; always a good idea to make sure the entry is valid before
applying to the targeted channel.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andrew Morton [Tue, 17 Nov 2009 12:46:44 +0000 (12:46 +0000)]
drivers/atm/solos-pci.c: fix warning/bug, clean up code
drivers/atm/solos-pci.c: In function 'flash_upgrade':
drivers/atm/solos-pci.c:528: warning: 'fw_name' may be used uninitialized in this function
Cc: Chas Williams <chas@cmf.nrl.navy.mil> Cc: David Woodhouse <David.Woodhouse@intel.com> Cc: Nathan Williams <nathan@traverse.com.au> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-By: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Christian Pellegrin <chripell@fsfe.org> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Tue, 17 Nov 2009 05:59:21 +0000 (05:59 +0000)]
linkwatch: linkwatch_forget_dev() to speedup device dismantle
Herbert Xu a écrit :
> On Tue, Nov 17, 2009 at 04:26:04AM -0800, David Miller wrote:
>> Really, the link watch stuff is just due for a redesign. I don't
>> think a simple hack is going to cut it this time, sorry Eric :-)
>
> I have no objections against any redesigns, but since the only
> caller of linkwatch_forget_dev runs in process context with the
> RTNL, it could also legally emit those events.
Thanks guys, here an updated version then, before linkwatch surgery ?
In this version, I force the event to be sent synchronously.
[PATCH net-next-2.6] linkwatch: linkwatch_forget_dev() to speedup device dismantle
time ip link del eth3.103 ; time ip link del eth3.104 ; time ip link del eth3.105
real 0m0.266s
user 0m0.000s
sys 0m0.001s
real 0m0.770s
user 0m0.000s
sys 0m0.000s
real 0m1.022s
user 0m0.000s
sys 0m0.000s
One problem of current schem in vlan dismantle phase is the
holding of device done by following chain :
Octavian Purdila [Mon, 16 Nov 2009 13:49:35 +0000 (13:49 +0000)]
net: introduce NETDEV_UNREGISTER_PERNET
This new event is called once for each unique net namespace in batched
unregister operations (with the argument set to a random device from
that namespace) and once per device in non-batched unregister
operations.
It allows us to factorize some device unregister work such as clearing the
routing cache.
Signed-off-by: Octavian Purdila <opurdila@ixiacom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
John W. Linville [Tue, 17 Nov 2009 15:16:32 +0000 (10:16 -0500)]
znet: fix build failure from i82593.h relocation
znet was including "wireless/i82593.h" (which is a bit wierd), and I
missed that when I relocated i82593.h to drivers/staging/wavelan. Since
I don't have ISA turned-on in my normal .config, I didn't see the build
failures -- mea culpa!
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Heiko Carstens [Tue, 17 Nov 2009 14:47:02 +0000 (06:47 -0800)]
net/s390 drivers: add missing 'const' attribute
Add missing 'const' attribute to avoid the following compile warnings:
drivers/s390/net/ctcm_main.c: In function 'ctcm_init':
drivers/s390/net/ctcm_main.c:1864: warning: assignment from incompatible pointer type
drivers/s390/net/lcs.c: In function 'lcs_init_module':
drivers/s390/net/lcs.c:2468: warning: assignment from incompatible pointer type
drivers/s390/net/claw.c: In function 'claw_init':
drivers/s390/net/claw.c:3408: warning: assignment from incompatible pointer type
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
net: Getting rid of the x86 dependency to built vmxnet3
This patch removes config dependency on x86 to build vmxnet3 driver. Thus
the driver can be built on big endian architectures now. Although vmxnet3
is not supported on VMs other than x86 architecture, all this code goes in
to ensure correctness. If the code is not dependent on x86, it should not
assume little endian architecture in any of its operations.
Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Johannes Berg [Mon, 16 Nov 2009 12:05:34 +0000 (12:05 +0000)]
netlink: remove subscriptions check on notifier
The netlink URELEASE notifier doesn't notify for
sockets that have been used to receive multicast
but it should be called for such sockets as well
since they might _also_ be used for sending and
not solely for receiving multicast. We will need
that for nl80211 (generic netlink sockets) in the
future.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Put Tx and Rx DPC to be handled in the NAPI:
- Saves status blocks.
- Moves the Tx work from hardIRQ to NAPI.
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
fangxiaozhi [Tue, 17 Nov 2009 12:02:24 +0000 (04:02 -0800)]
net: PPP buffer too small for higher speed connections
1. This patch is based on the kernel of 2.6.32-rc7
2. In this patch, we enlarge the out buffer size to optimize the
upload speed for the ppp connection. Then it can support the upload of
HSUPA data cards.
Signed-off-by: fangxiaozhi <huananhu@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
zeal [Mon, 16 Nov 2009 04:58:10 +0000 (04:58 +0000)]
KS8695: fix ks8695_rx() unreasonable action.
ks8695_rx() will call refill_buffers() for every incoming packet.
Its not necessary. We just need do it after finishing receiving thing.
And the 'RX dma engine' is in the same situation.
This blocks our user space application. The following patch may fix it.
Signed-off-by: zeal <zealcook@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
zeal [Mon, 16 Nov 2009 04:58:09 +0000 (04:58 +0000)]
KS8695: fix ks8695_rx_irq() bug.
ks8695 rx irq is edge-level. Before arriving at irq handler, the
corresponding status bit has been clear(irq's ack).
So we should not check it after that.
Signed-off-by: zeal <zealcook@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ben McKeegan [Mon, 16 Nov 2009 03:44:25 +0000 (03:44 +0000)]
ppp: fix BUG on non-linear SKB (multilink receive)
PPP does not correctly call pskb_may_pull() on all necessary receive paths
before reading the PPP protocol, thus causing PPP to report seemingly
random 'unsupported protocols' and eventually trigger BUG_ON(skb->len <
skb->data_len) in skb_pull_rcsum() when receiving multilink protocol in
non-linear skbs.
ppp_receive_nonmp_frame() does not call pskb_may_pull() before reading the
protocol number. For the non-mp receive path this is not a problem, as
this check is done in ppp_receive_frame(). For the mp receive path,
ppp_mp_reconstruct() usually copies the data into a new linear skb.
However, in the case where the frame is made up of a single mp fragment,
the mp header is pulled and the existing skb used. This skb was then
passed to ppp_receive_nonmp_frame() without checking if the encapsulated
protocol header could safely be read.
Signed-off-by: Ben McKeegan <ben@netservers.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Breno Leitao [Tue, 10 Nov 2009 08:37:47 +0000 (08:37 +0000)]
ixgbe: Fixing EEH handler to handle more than one error
After commmit 4b77b0a2ba27d64f58f16d8d4d48d8319dda36ff EEH breaks
after the second error, since it calls pci_restore_state()
but it returns 0, since pci->state_saved is false.
So, this patch just call pci_save_state() after pci_restore_state().
Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jouni Malinen [Mon, 16 Nov 2009 17:54:08 +0000 (19:54 +0200)]
mac80211: Do not queue Probe Request frames for station MLME
Cooked monitor interfaces cannot currently receive Probe Request
frames when the interface is in station mode. However, we do not
process Probe Request frames internally in the station MLME, so there
is no point in queueing the frame here. Remove Probe Request frames
from the queued frame list to allow cooked monitor interfaces to
receive these frames.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland [Mon, 16 Nov 2009 13:30:29 +0000 (08:30 -0500)]
ath5k: allow setting txpower to 0
As a holdover from earlier code when we used to set
the power limit to '0' after a reset to configure the
default transmit power, ath5k interprets txpower=0 as
12.5 dBm. Fix that by just passing 0 through.
This fixes http://bugzilla.kernel.org/show_bug.cgi?id=14567
Cc: stable@kernel.org Reported-by: Daniel Folkers <daniel.folkers@task24.nl> Tested-by: Daniel Folkers <daniel.folkers@task24.nl> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Josef Bacik [Mon, 16 Nov 2009 02:33:18 +0000 (21:33 -0500)]
rt2800: do not enable tbtt unless we are in a beacon mode
Please be gentle, I'm a fs developer and this is my first foray into drivers, as
I'm tired of building ralinks driver everytime I update my kernel. Whenever I
load the rt2800pci driver my box bogs down, and a few printk's later I
discovered its because I was getting 10's of thousands of TBTT interrupts a
second. I discovered this was because we were setting the beacon timer to 0,
which is apparently what TBTT keys off of. It seems to me that we should only
be enabling TBTT when we are in a beacon transmitting mode, which from what I
can tell is in AD-HOC and other such modes where the mac80211 layer would have
given us a proper beacon_int to set the beacon timer to instead of 0. So this
is my fix, only enable TBTT if our sync mode is for beacon. This makes it so my
box doesn't die everytime I load the rt2800pci driver. Let me know if this is
acceptable, I just learned all these terms about 15 minutes ago via wikipedia,
so I really am not familiar with how this stuff is supposed to work. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
rt2x00: Fix BUG on rt2800usb when trying to read eFuse EEPROM.
Current tree hits a BUG_ON in rt2x00_regbusy_read, because the eFuse EEPROM
reading code of rt2800lib uses the function without the csr_mutex locked.
Fix this by locking the csr_mutex for the of the EEPROM reading cycly and
using the _lock variants of the register reading and writing functions.
This also introcudes the register_read_lock function pointer in the
rt2800_ops structure.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Some drivers (rt2800* most notably) cannot set the RF and RT chipset in
the correct order to have the information logging in rt2x00_set_chip
be correct.
Fix this by decoupling the setting of the chipset information from the
logging of the chipset information so that drivers can determine
themselves when all information is set.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
rt2x00: Initialize rf302x RF values properly for rt2800pci.
Ensure RF302x and RF2020 chipsets are handled properly in rt2800lib
for the rt3090 chipset.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mirror the legacy Ralink driver with respect to rt2800 RF register
programming. Execute rt2800_config_channel_rt3x for all RF2020,
RF3020, RF3021 & RF3022 chipsets when operating on RT3070 devices.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eric Dumazet [Sun, 15 Nov 2009 23:30:24 +0000 (23:30 +0000)]
net: Fix the rollback test in dev_change_name()
net: Fix the rollback test in dev_change_name()
In dev_change_name() an err variable is used for storing the original
call_netdevice_notifiers() errno (negative) and testing for a rollback
error later, but the test for non-zero is wrong, because the err might
have positive value as well - from dev_alloc_name(). It means the
rollback for a netdevice with a number > 0 will never happen. (The err
test is reordered btw. to make it more readable.)
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Frank Blaschka [Thu, 12 Nov 2009 00:11:44 +0000 (00:11 +0000)]
qeth: rework TSO functions
The maximum TSO size OSA can handle is 15 * PAGE_SIZE. This
patch reduces gso_max_size to this value and adds some sanity
checks and statistics to the TSO implementation.
Since only layer 3 is able to do TSO move all TSO related functions
to the qeth_l3 module.
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ursula Braun [Thu, 12 Nov 2009 00:11:43 +0000 (00:11 +0000)]
qeth: Recognize return codes of ccw_device_set_online
Setting a qeth device online requires to call function
ccw_device_set_online() for read-, write-, and data-subchannel.
Failures should be detected immediately without an attempt to
invoke follow-on activity qeth_qdio_clear_card().,
In addition, ccw_device_set_online calls are consolidated in
qeth_core_main.c only.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ursula Braun [Thu, 12 Nov 2009 00:11:42 +0000 (00:11 +0000)]
qeth: remaining EDDP cleanup
EDDP code has been removed from qeth in 2009. This patch removes two
useless remaining EDDP-references.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Einar Lueck [Thu, 12 Nov 2009 00:11:41 +0000 (00:11 +0000)]
qeth: Exploit Connection Isolation
Isolate data connection to a shared OSA card against other data
connections to the same OSA card. Connectivity between isolated
data connections sharing the same OSA card is therefore possible only
through external network gear (e.g. a router).
Signed-off-by: Einar Lueck <elelueck@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>