Commit Graph

94637 Commits

Author SHA1 Message Date
Wey-Yi Guy
a4b96cc4e3 iwlwifi: add bt_init_traffic_load as configurable parameter
Adding configurable parameter in .cfg for the initial Bluetooth traffic
load; set it to IWL_BT_COEX_TRAFFIC_LOAD_NONE for now, but can be change
for debugging or other reason.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:34:20 -04:00
Wey-Yi Guy
7bdc473c7a iwlwifi: add debugfs to control stuck queue timer
In current implementation, stuck queue timer is fixed to 1 second. Add
debugfs file to modify the timer to enhance the flexibility:

Set the monitor_period as following:
   0: disable stuck queue force reset function
   1 - 60000: monitor period (1 - 60 second)

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:34:20 -04:00
Wey-Yi Guy
c6c996b5de iwlwifi: indicate bt_kill condition when receive tx reply
Generate log when receive tx reply with bt_kill count > 0 and
in advance bt coex mode

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:34:19 -04:00
Wey-Yi Guy
aeb4a2eec2 iwlagn: wifi/bt coex configuration sequence
bt config command need to send before the init calibration command,
driver need to let uCode know that calibrations are being performed now
in order to assure antenna is not being taken to BT use during radio/dsp
reads/writes

Also, bt_coex_priorty_table command need to be send right after the
bt_config_command during init sequence. Followed by bt coex envelope
command to initialize and prepare uCode bt state machine

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:34:19 -04:00
Wey-Yi Guy
bee008b783 iwlwifi: add bt full concurrency support
Adding the bluetooth full concurrency support for WiFi/BT combo devices.

Driver should configure uCode to operate in "full concurrency" mode (via
LUT) if both conditions are met:
 - Antenna Coupling is more than 35dB
 - WiFi Channel Inhibition Request is hornored by BT Core

Currently, there is no antenna coupling information provided by uCode;
use module parameter to specified the antenna coupling in dB.

When in "full concurrency" mode, driver need to download different LUT
to uCode while sending bt configuration command; also, driver need to
configure the device operate in 1x1 while in full concurrency mode.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:34:19 -04:00
Johannes Berg
bd6e2d5799 iwlwifi: use antenna A only under high BT load
When bluetooth indicated high load, we should use
only antenna A in 2.4 GHz for management frames.
Add this condition to iwl_toggle_tx_ant() to make
sure it'll always be met. Note that scanning has
a separate way of forcing the antenna, because we
should scan on antenna A only regardless of BT
traffic load.

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>
2010-08-25 14:33:23 -04:00
Wey-Yi Guy
74e5c41baf iwlwifi: Relax uCode timeout/error checking for 6000g2b
Disable plcp error checking for 6000g2b devices, with wifi/bt coex;
this got trigger too often, disable for now until finding better
trigger point.

Also extend the firmware reload timer much longer for BT coex to make sure
there are will be no mistake to reload firmware too fast and too often.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:33:22 -04:00
Johannes Berg
511b082d29 iwlagn: keep BT settings across restart
The BT SCO needs to be re-applied to the device,
while the traffic load just needs to be correct
in software.

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>
2010-08-25 14:33:22 -04:00
Johannes Berg
59079949fa iwlagn: disable gen2b BT coexistence in IBSS
IBSS doesn't allow for coexistence, so it
should be disabled.

Additionally, disable reacting to the BT
profile notification when in IBSS mode,
it likely won't be sent by the device to
start with though.

Also, in IBSS mode, BT coexistence isn't as fully-featured
and we must use a single antenna only. So instead of
peppering the code with new checks, simply pretend
we are in high BT traffic load, which has the needed
effect of disabling antenna B use.

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>
2010-08-25 14:33:22 -04:00
Johannes Berg
a11741383b iwlwifi: reset BT when going down
When we turn off the device, reset BT
data so that we don't have outdated
information when we come up again.

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>
2010-08-25 14:33:22 -04:00
Johannes Berg
290f599cc6 iwlagn: let bluetooth traffic load impact rate scale
Depending on the amount of bluetooth traffic,
using the shared antenna (antenna B) will have
adverse impact on both bluetooth and wireless
traffic. Add controls to improve the situation
by making rate scaling depend on the BT load.

When there's high bluetooth traffic load, there's
little point in trying to aggregate as BT traffic
would disrupt the aggregated frames all the time,
so simply don't start sessions then.

When BT traffic returns to lower levels, the rate
scaling will come here again automatically when
wifi traffic is high enough, and then it will be
able to successfully enable aggregation.

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>
2010-08-25 14:33:22 -04:00
Johannes Berg
9e4afc2189 iwlwifi: add BT notification support for bt coex
When advanced bt coex enabled, uCode will send bt status
notification to driver, here add support for it.

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>
2010-08-25 14:33:21 -04:00
Johannes Berg
d44ae69e80 iwlagn: set BT IGNORE for some frames
The BT ignore bit should be set when transmitting
auth, assoc response and eap frames.

Also, scanning should set the BT ignore bit for the
probe request transmission; Note that we only use
the non-shared antenna.

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>
2010-08-25 14:33:21 -04:00
Johannes Berg
670245ed45 iwlagn: implement advance BT config command
6000g2b hardware implements advance bluetooth coexist command,
implement base on the new API command strucutre.

Also increment the API 5 to support the advance BT/WIfi coex.

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>
2010-08-25 14:33:21 -04:00
Johannes Berg
0288d237ff iwlwifi: add 6000g2b BT coexist API
The new 6000g2b hardware requires a different
bluetooth coexist implementation on the host,
this adds the command/notification definitions
for it.

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>
2010-08-25 14:33:21 -04:00
Wey-Yi Guy
767d055d6a iwlwifi: comments cleanup
No code or function changes, just some cleanup work for
out-of-date comments

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:33:20 -04:00
Wey-Yi Guy
5c673fbf19 iwlwifi: update out-of-date comments
No functional changes, update comments to match current file structure

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:33:20 -04:00
Christian Lamparter
11791a6f75 p54usb: fix off-by-one on !CONFIG_PM
The ISL3887 chip needs a USB reset, whenever the
usb-frontend module "p54usb" is reloaded.

This patch fixes an off-by-one bug, if the user
is running a kernel without the CONFIG_PM option
set and for some reason (e.g.: compat-wireless)
wants to switch between different p54usb modules.

Cc: <stable@kernel.org>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:33:20 -04:00
Rafał Miłecki
049fbfeeb5 b43: N-PHY: add missing phyrxchain setting and fix warning in RX core function
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:33:20 -04:00
Kalle Valo
5effdf18aa wl1251: move include guard after the license
Signed-off-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:33:19 -04:00
Kalle Valo
ba0492cf90 wl1251: remove copyright contact person
As my nokia address doesn't work anymore, it's better just to remove the
copyright contact altogether. We have MODULE_AUTHOR() scripts for these
anyway.

Signed-off-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:33:19 -04:00
Kalle Valo
31c726f096 wl1251: update my email address
I use now my adurom.com address.

Signed-off-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:33:18 -04:00
Christian Lamparter
d7065c3055 p54spi: Kconfig option for config blob
This patch adds an Kconfig option, which allows the user
to select, whenever he/she wants to include a 4k blob for
generic calibration and interface values into the driver,
or cut the module size by about 15 to 20%.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:33:18 -04:00
Bob Copeland
b4c5261206 ath5k: log descriptor chains at a new debug level
Descriptors are currently logged with ATH5K_DEBUG_RESET,
which isn't really apt, and also means we can't see just
the descriptor setup or just the resets.  Add a new
debug level just for that.

Acked-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:33:18 -04:00
Bob Copeland
8801df86d7 ath5k: trivial spelling fixes
Fix some comments:
    s/transmition/transmission/
    s/puting/putting/

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:33:18 -04:00
David Kilroy
9736ebfe39 orinoco: Fix walking past the end of the buffer
Fix walking past the end of the bitrate_table array
in the case when the loop counter == BITRATE_TABLE_SIZE.

Reported by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:33:17 -04:00
Stanislaw Gruszka
b62177a0aa iwlwifi: fix canceling monitor_recover timer
To make del_timer_sync() works we have to assure that timer function
does not rearm the timer. To achieve that we cancel timer with
STATUS_EXIT_PENDING bit set in __iwl{3945,}_down function.

Patch also fix priv->txq memory usage after free for iwl3945, because
it move timer cancellation before iwl3945_hw_txq_ctx_free(priv) is called.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-25 14:33:16 -04:00
David S. Miller
4562487a00 mlx4_en: Fix build warning in mlx4_en_create_rx_ring.
drivers/net/mlx4/en_rx.c: In function ‘mlx4_en_create_rx_ring’:
drivers/net/mlx4/en_rx.c:305: warning: label ‘err_map’ defined but not used

Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24 15:06:27 -07:00
Yevgeny Petrilin
04714a16db mlx4_en: updated driver version
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24 15:00:42 -07:00
Yevgeny Petrilin
fa37a9586f mlx4_en: Moving to work with GRO
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24 15:00:42 -07:00
Yevgeny Petrilin
0533943c5c mlx4_en: UDP RSS support
Adding capability for RSS for UDP traffic, hashing is done based on
IP addresses and UDP port number.
The support depends on HW/FW capabilities.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24 14:57:09 -07:00
Yevgeny Petrilin
d7e1a487d3 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>
2010-08-24 14:54:53 -07:00
Yevgeny Petrilin
bc081cecf3 mlx4_en: get/set ringsize uses actual ring size
In case that the rings were not fully filled, the report in Ethtool
should be according to the actual size that was filled.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24 14:54:52 -07:00
Yevgeny Petrilin
7699517db4 mlx4_en: Fixing report in Ethtool get_settings
The report now based on query from FW, giving the correct tranciever type
and link speed.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24 14:54:51 -07:00
Yevgeny Petrilin
e7c1c2c462 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>
2010-08-24 14:54:51 -07:00
Yevgeny Petrilin
3005ad40b9 mlx4_en: Validate port up prior to transmitting
We might try to use resources which were not activated.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24 14:54:50 -07:00
Yevgeny Petrilin
e5cc44b2eb mlx4_en: Reporting link state with KERN_INFO
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24 14:54:49 -07:00
Yevgeny Petrilin
a0b4e6e09c mlx4_en: Fixed MAX_TX_RINGS definition
Defined as sum of default number of TX rings and number of
rings used for priority flow control mode.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24 14:54:49 -07:00
Yevgeny Petrilin
7c2873809d mlx4_en: performing CLOSE_PORT at the end of tear-down process
All port's resources should be closed before we give the
CLOSE_PORT command to the firmware.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24 14:54:48 -07:00
Yevgeny Petrilin
8bf2e58f8b mlx4_en: Setting dev->perm_addr field
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24 14:54:48 -07:00
Yevgeny Petrilin
00d7d7bc6e 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>
2010-08-24 14:54:47 -07:00
Yevgeny Petrilin
69351a2933 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>
2010-08-24 14:54:47 -07:00
John W. Linville
268bae0b68 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-core.c
	drivers/net/wireless/iwlwifi/iwl-core.h
2010-08-24 16:35:40 -04:00
Johannes Berg
672ddeffeb 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>
2010-08-24 16:32:05 -04:00
Johannes Berg
54c8067a4a 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>
2010-08-24 16:32:05 -04:00
Vivek Natarajan
21cb987914 ath9k_htc: Add support for bluetooth coexistence.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:32:05 -04:00
Vivek Natarajan
d99eeb8742 ath9k_common: Move bt_stomp to common for sharing with ath9k_htc.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:32:05 -04:00
Grazvydas Ignotas
7273b9700b wl1251: wait for join command complete event
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.

Based on wl1271 patch 99d84c1de8
by Luciano Coelho.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:32:04 -04:00
Grazvydas Ignotas
5b44a1b516 wl1251: fix beacon filter table structure
The beacon filter table configuration ACX structure had certain elements
reversed, fix it to match TI driver.

Based on wl1271 patch 1937e74263 by
Juuso Oikarinen.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:32:04 -04:00
Grazvydas Ignotas
d41776fad4 wl1251: fix event handling mechanism
In case both A and B events occured simultaneously, current code
would only process A and clear both interrupts. Make it process both
events instead.

Based on wl1271 patches by Juuso Oikarinen:
1fd2794f36
13f2dc52c6

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:32:03 -04:00
Grazvydas Ignotas
8d5ad08525 wl1251: add missing __packed modifier for some structs
Several acx and cmd structures are missing __packed modifier, add it.
This was noticed while comparing them with corresponding wl1271 code.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:32:03 -04:00
Jay Sternberg
110ff6db6f 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>
2010-08-24 16:32:03 -04:00
Jay Sternberg
3939608591 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>
2010-08-24 16:32:03 -04:00
Wey-Yi Guy
79e88e79a2 iwlwifi: remove unused iwl_send_card_state function
iwl_send_card_state() is not being call from anywhere, remove it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-08-24 16:32:03 -04:00
Wey-Yi Guy
172c1d112a iwlwifi: configurable ampdu factor and density
Add ampdu factor and density to .cfg, this allow both parameters
can be configure per device based.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-08-24 16:32:02 -04:00
Wey-Yi Guy
7ccc896f4c iwlwifi: more generic name for rssi calc in iwlagn
Change the define to more generic naming to match _agn devices
since the rssi calculation are common function for 5000 series and up

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-08-24 16:32:02 -04:00
Wey-Yi Guy
30c1b0f7e9 iwlwifi: additional parameter in REPLY_RX_PHY_CMD
Adding additional parameter in REPLY_RX_PHY_CMD, frame_time indicate the
frame's time on the air based on byte count and frame rate calculation

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-08-24 16:32:02 -04:00
Wey-Yi Guy
80e9158c3f 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>
2010-08-24 16:32:02 -04:00
Wey-Yi Guy
b1a78858c4 iwlagn: adjust starting action for rate scale
During rate scale, reset starting action after making action adjustment
to avoid the possibility of break out of loop too early.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-08-24 16:32:01 -04:00
Johannes Berg
948f5a2f08 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>
2010-08-24 16:32:01 -04:00
Shanyu Zhao
3edb5fd6ac iwlwifi: cleanup iwl_set_rxon_channel()
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>
2010-08-24 16:32:01 -04:00
Shanyu Zhao
aa2dc6b529 iwlwifi: avoid race condition in channel change
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>
2010-08-24 16:32:01 -04:00
Shanyu Zhao
81e95430aa 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>
2010-08-24 16:32:01 -04:00
Wey-Yi Guy
7469701e10 iwlwifi: make aggregation time limit configurable
By default, aggregation time limit is 4000 uSec, add the parameter to
.cfg
to allow this parameter can be configure per device base if needed.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-08-24 16:32:00 -04:00
Wey-Yi Guy
b15826a795 iwlwifi: max/min aggregation time limit
Set the minimum and maximum for aggregation time limit in uSec.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-08-24 16:32:00 -04:00
Wey-Yi Guy
2cbc19f3d0 iwlwifi: additional comments in iwl_cfg
No functional changes, just add additional comments to iwl_cfg structure

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-08-24 16:32:00 -04:00
Wey-Yi Guy
9c82d0a73f iwlwifi: remove unused define
IWL_SIXTY_SECS is not been used, remove it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-08-24 16:32:00 -04:00
Julian Calaby
24e0f9f847 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>
2010-08-24 16:28:20 -04:00
Wey-Yi Guy
6ddbf8cd39 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>
2010-08-24 16:28:19 -04:00
Johannes Berg
2b2d779537 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>
2010-08-24 16:28:17 -04:00
Christian Lamparter
d7eb50c0f7 p54: improve eeprom parser
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>
2010-08-24 16:28:15 -04:00
Christian Lamparter
b9c066597f p54spi: fix eeprom checksum
This patch corrects the bogus descriptor checksum of our
Nokia N8XX EEPROM blob.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:28:14 -04:00
Gábor Stefanik
4e687b2226 b43: N-PHY: Implement RX core state setting for rev.2 and earlier PHYs
Rev.3+ support coming in a later patch.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:28:13 -04:00
Gábor Stefanik
d2730b2a6a b43: N-PHY: Implement MAC PHY clock set
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:28:11 -04:00
Gábor Stefanik
e723ef305c b43: N-PHY: Fix typo in function name (gain_crtl -> gain_ctrl)
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:28:10 -04:00
Gábor Stefanik
e7f45d3ff8 b43: N-PHY: Implement Host Flags write during device init
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:28:09 -04:00
Wey-Yi Guy
0975cc8fbf iwlwifi: separate thermal throttling function
"Thermal Throttling" is an advance feature which only available for
newer _agn devices. Move from iwl-core to iwl-agn for better code
organization.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:28:07 -04:00
Julia Lawall
36d344131c drivers/net/wireless/wl12xx: Use available error codes
Error codes are stored in ret, but the return value is always 0.  Return
ret instead.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
local idexpression x;
constant C;
@@

if (...) { ...
  x = -C
  ... when != x
(
  return <+...x...+>;
|
  return NULL;
|
  return;
|
* return ...;
)
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:28:06 -04:00
Julia Lawall
9f19fa62ed drivers/net/wireless/wl12xx: Use available error codes
In each case, error codes are stored in ret, but the return value is always
0.  Return ret instead.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
local idexpression x;
constant C;
@@

if (...) { ...
  x = -C
  ... when != x
(
  return <+...x...+>;
|
  return NULL;
|
  return;
|
* return ...;
)
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:28:05 -04:00
Bob Copeland
30bf4169ad 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>
2010-08-24 16:28:04 -04:00
Bob Copeland
4afd89d9cf ath5k: remove all mention of monitor iftype
Monitor interfaces are never seen by the driver so these
cases are never reached.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:28:03 -04:00
Bob Copeland
23538c268c 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>
2010-08-24 16:28:01 -04:00
Bob Copeland
a180a13081 ath5k: clean up some comments
This fixes a few misspellings, word repetitions, and some grammar
nits in ath5k comments.  No code changes.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:28:00 -04:00
Nick Kossifidis
b612798098 ath5k: remove own (wrong) IEEE80211_MAX_LEN
Use the version already supplied in include/linux/ieee80211.h.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:27:59 -04:00
Nick Kossifidis
418de6d955 ath5k: rename ath5k_hw_set_associd to _set_bssid
Although the named function also sets the aid, its main
purpose is configuring the bssid and we use that
everywhere else.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24 16:27:58 -04:00
Eric Dumazet
c32d83c042 bcm63xx_enet: use netdev stats
Use integrated net_device stats instead of a private one

Get rid of bcm_enet_get_stats()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24 12:24:07 -07:00
Eric Dumazet
6abc237680 ethoc: get rid of ethoc_stats()
drivers can avoid implementing ndo_get_stats method if using netdevice
stats structure.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24 12:23:01 -07:00
Eric Dumazet
b4ddf4b333 be2net: get rid of be_get_stats()
drivers can avoid implementing ndo_get_stats method if using netdevice
stats structure.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24 12:22:13 -07:00
Dimitris Michailidis
ccea790ef0 cxgb4: update PCI ids
Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-23 20:38:15 -07:00
Dimitris Michailidis
1707aec9ac cxgb4: fix setting of the function number in transmit descriptors
Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-23 20:38:14 -07:00
Dimitris Michailidis
1478b3ee93 cxgb4: support eeprom read/write on functions other than 0
Extend the address translation for eeprom read/write (code used by
ethtool -[eE]) to functions other than 0.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-23 20:38:14 -07:00
Dimitris Michailidis
e46dab4d4b cxgb4: handle Rx/Tx queue ranges not starting at 0
Currently the driver assumes that queue IDs start at 0 but that's true
only for function 0.  To support operation on other functions get the
start of the queue ranges from FW and offset accordingly.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-23 20:38:13 -07:00
David S. Miller
f04b4dd2b1 bna: Delete get_flags and set_flags ethtool methods.
This driver doesn't support LRO, NTUPLE, or the RXHASH
features.  So it should not set these ethtool operations.

This also fixes the warning:

drivers/net/bna/bnad_ethtool.c:1272: warning: initialization from incompatible pointer type

Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-23 20:34:51 -07:00
Rasesh Mody
8b230ed8ec bna: Brocade 10Gb Ethernet device driver
This is patch 1/6 which contains linux driver source for
Brocade's BR1010/BR1020 10Gb CEE capable ethernet adapter.

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>
2010-08-23 20:24:12 -07:00
David S. Miller
2d4833aae6 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	include/linux/if_pppox.h

Fix conflict between Changli's __packed header file fixes and
the new PPTP driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-22 22:37:04 -07:00
Amerigo Wang
f3c58aceaa mlx4: remove num_lro parameter
As suggested by David, this parameter can die, we can use ethtool
to turn LRO on/off. Compile tests only.

Signed-off-by: WANG Cong <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-22 21:43:58 -07:00
Ian Campbell
f502bf2bc0 xen: use less generic names in netfront driver.
All Xen frontend drivers have a couple of identically named functions which
makes figuring out which device went wrong from a stacktrace harder than it
needs to be. Rename them to something specificto the device type.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-22 21:42:55 -07:00
Randy Dunlap
6a6d01d374 isdn/avm: fix build when PCMCIA is not enabled
Why wouldn't kconfig symbol ISDN_DRV_AVMB1_B1PCMCIA also depend on
PCMCIA?

Fix build for PCMCIA not enabled:

ERROR: "b1_free_card" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1ctl_proc_fops" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1_reset_ctr" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1_load_firmware" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1_send_message" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1_release_appl" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1_register_appl" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1_getrevision" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1_detect" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1_interrupt" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!
ERROR: "b1_alloc_card" [drivers/isdn/hardware/avm/b1pcmcia.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Carsten Paeth <calle@calle.de>
Cc: Karsten Keil <isdn@linux-pingi.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-22 21:37:33 -07:00
John Feeney
cd709aa906 bnx2: Add PCI Advanced Error Reporting support.
Signed-off-by: John Feeney <jfeeney@redhat.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-22 21:09:03 -07:00
Dan Carpenter
773bc97397 tokenring: remove unneeded NULL checks
"fw_entry" is always non-NULL at this point and anyway
release_firmware() handles NULL parameters.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-22 00:54:30 -07:00
David S. Miller
d3c6e7ad09 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-08-21 23:32:24 -07:00
Eric Dumazet
c3227e546c amd8111e: use net_device_stats from struct net_device
struct net_device has its own struct net_device_stats member, so use
this one instead of a private copy in the amd8111e_priv struct.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-21 23:09:36 -07:00
Eric Dumazet
a2c483a19a atl1c: use net_device_stats from struct net_device
struct net_device has its own struct net_device_stats member, so use
this one instead of a private copy in the atl1c_adapter struct.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-21 23:09:36 -07:00
Dmitry Kozlov
00959ade36 PPTP: PPP over IPv4 (Point-to-Point Tunneling Protocol)
PPP: introduce "pptp" module which implements point-to-point tunneling protocol using pppox framework
NET: introduce the "gre" module for demultiplexing GRE packets on version criteria
     (required to pptp and ip_gre may coexists)
NET: ip_gre: update to use the "gre" module

This patch introduces then pptp support to the linux kernel which
dramatically speeds up pptp vpn connections and decreases cpu usage in
comparison of existing user-space implementation
(poptop/pptpclient). There is accel-pptp project
(https://sourceforge.net/projects/accel-pptp/) to utilize this module,
it contains plugin for pppd to use pptp in client-mode and modified
pptpd (poptop) to build high-performance pptp NAS.

There was many changes from initial submitted patch, most important are:
1. using rcu instead of read-write locks
2. using static bitmap instead of dynamically allocated
3. using vmalloc for memory allocation instead of BITS_PER_LONG + __get_free_pages
4. fixed many coding style issues
Thanks to Eric Dumazet.

Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-21 23:05:39 -07:00
Dan Carpenter
4da79504b2 qlge: pull NULL check ahead of dereference
There was a dereference before NULL check issue introduced in 1e213303d
"qlge: Add tx multiqueue support."  I've pulled the NULL check of
"net_rsp" forward a couple lines to avoid that.

Also Ron Mercer says that the early exit should be above the index
write.  ql_write_cq_idx(rx_ring);

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 20:48:07 -07:00
Tobias Klauser
0add79e313 tehuti: Use net_device_stats from struct net_device
struct net_device has its own struct net_device_stats member, so use
this one instead of a private copy in the bdx_priv struct.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 17:19:05 -07:00
Tobias Klauser
5dbfbc4027 ep93xx_eth: Use net_device_stats from struct net_device
struct net_device has its own struct net_device_stats member, so use
this one instead of a private copy in the ep93xx_priv struct. As the new
ndo_get_stats function would just return dev->stats we can omit it.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 17:19:04 -07:00
David S. Miller
48d3ff8269 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2010-08-19 16:54:13 -07:00
Amit Kumar Salecha
91fe8173be qlcnic: update version 5.0.8
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:52:43 -07:00
Sucheta Chakraborty
091754a165 qlcnic: rom lock recovery
Fw can get stuck while holding pci semaphore. Driver will not
be able to perform fw initialization, without this lock.
Release semaphore forcefully in that case.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:52:42 -07:00
Sony Chacko
d4066833bb qlcnic: firmware initialization update
Cleanup legacy code which is not valid for Qlogic
CNA adapters.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:52:42 -07:00
Amit Kumar Salecha
63e74e9cb7 qlcnic: fix endiness in eswitch statistics
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:52:41 -07:00
Amit Kumar Salecha
21854f029d qlcnic: mark device state as failed
Mark device state failed in error path.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:52:41 -07:00
Amit Kumar Salecha
78f84e1a70 qlcnic: fix npar state
Privilege functions should wait for npar state to be operational.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:52:40 -07:00
Sony Chacko
fe4d434da8 qlcnic: support anti mac spoofing
Administrator can configure to drop packet in transmit,
if it doesn't match interface mac address, in case of virtual function.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:52:40 -07:00
Rajesh Borundia
0325d69b2a qlcnic: configure offload setting on eswitch
Device is not capable of enabling/disabling offload setting per
port in case of Nic Partition.So offload settings needs to be
enabled/disabled per eswitch and it will affect all the function
on that eswitch.

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>
2010-08-19 16:52:39 -07:00
Rajesh Borundia
4e8acb011f qlcnic: configure port on eswitch
o Nic partition capable devices has embedded switch, this needs to support
various features like external switch.

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>
2010-08-19 16:52:38 -07:00
Sony Chacko
251b036a22 qlcnic: replace magic numbers with defines
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:52:38 -07:00
Sony Chacko
39895e07ca qlcnic: remove unused code
Serial number references are not used in driver.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:52:37 -07:00
Amit Kumar Salecha
f1bf7a5247 qlcnic: fix inconsistent lock state
Spin_lock(rds_ring->lock) is not required while posting buffers
from qlcnic_open and freeing buffers from qlcnic_down.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:52:37 -07:00
Alexander Duyck
84418e3b10 ixgbe: rewrite ethtool test to use standard config functions
This change makes it so that the ethtool loopback test uses the standard
ring configuration and allocation functions.  As a result the loopback test
will be much more effective at testing core driver functionality.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:45:28 -07:00
Alexander Duyck
31f05a2d87 ixgbe: update all DESC_ADV macros to accept a ring pointer
All of the DESC_ADV macros are currently needing the pointers to be
de-referenced before accessing the ring.  Instead of having to add all of
the asterisks it is easier to just update the macro to expect a pointer to
the ring.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:44:27 -07:00
Alexander Duyck
9e10e045f8 ixgbe: combine Rx into into ixgbe_configure_rx
The Rx init is currently split over ixgbe_configure, ixgbe_configure_rx,
and ixgbe_up_complete.  Instead of leaving it split over 3 function it is
easier to consolidate them all into ixgbe_configure_rx.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:44:26 -07:00
Alexander Duyck
2f1860b8d9 ixgbe: pull all Tx init into ixgbe_configure_tx
The Tx init was spread out over ixgbe_configure, ixgbe_configure_tx, and
ixgbe_up_complete.  This change combines all of that into the
ixgbe_configure_tx function in order to simplify the Tx init path.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:44:25 -07:00
Alexander Duyck
a34bcfffae ixgbe: move all GPIE register config into a single function
This change moves all GPIE register configuration into a single function.
The advantage of this is that we can avoid a number of unnecessary
read/modify/write cycles on the register.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:44:25 -07:00
Alexander Duyck
f5b4a52e81 ixgbe: Move virtualization config into a separate function
This change moves the configuration that was done in configure_rx into a
separate virtualization configuration function.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:44:24 -07:00
Alexander Duyck
7367096a43 ixgbe: move all Rx DMA control register writes to one central location
This change moves all of the Rx DMA control register writes to one central
location.  This should help to avoid accidentally overwriting existing
settings.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:44:24 -07:00
Alexander Duyck
477de6ed02 ixgbe: Move max frame size and Rx buffer length configuration into a function
This change consolidates all of the Rx max frame size and Rx buffer length
configuration into a single function.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:44:23 -07:00
Alexander Duyck
826437d3de ixgbe: remove redundant configuration of vmolr, rename generic variable
The vmolr is configured already in ixgbe_set_rx_mode for the PF so there is
no need to set it again in ixgbe_configure_rx.

Instead of using the variable name reg, it is easier to just rename it to
gcr_ext to reflect the register contents that the variable holds.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:44:22 -07:00
Alexander Duyck
1395807091 ixgbe: bump PS header size to 512 bytes
Bump the header size for packet split to 512 bytes since this makes the
best use of the 1k buffer that is allocated for any skb 512 bytes or
smaller.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:44:22 -07:00
Alexander Duyck
f5dc442b46 ixgbe: combine accesses to FCTRL register into ixgbe_set_rx_mode
We are accessing the FCTRL register in multiple spots in the init path and
we can simplify things by combining the configuration all into
ixgbe_set_rx_mode.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:40:52 -07:00
Alexander Duyck
4865452164 ixgbe: pull PSRTYPE configuration into a separate function
The configuration of PSRTYPE was being done conditionally on if packet
split is enabled or not.  It can be configured always since it will not
have any effect when packet split is not enabled.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:40:51 -07:00
Alexander Duyck
acd37177cc ixgbe: pull ring configuration into it's own function
These changes add ixgbe_configure_rx_ring which is used to setup the base
function pointers for the ring.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:40:51 -07:00
Alexander Duyck
05abb126c1 ixgbe: consolidate all setting of MRQC into one function
This change simplifies the configuration of MRQC by consolidating the
setting of it into one function. As such the register is no longer set in
multiple places which should make any future changes easier to work with.
In addition we can combine RSS related register writes into the call since
enabling all of those bits without enabling RSS itself in MRQC should have
no effect.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:40:50 -07:00
Alexander Duyck
43e69bf0f0 ixgbe: move Tx ring configuration into a separate function
This patch moves the Tx ring configuration into a separate function.  In
addition the function drops the setting of the head writeback RO bit since
head writeback is no longer used within ixgbe.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:40:49 -07:00
Alexander Duyck
120ff942cc ixgbe: move configuration of the MTQC register into it's own function
This patch moves the configuration of the MTQC register into it's own
function call similar to ixgbe_setup_mrqc.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:40:49 -07:00
Alexander Duyck
179b4096e2 ixgbe: combine two modifications of TXDCTL into one
In ixgbe_up_complete we were doing a read-modify-write of TXDCTL followed
by another one just a few lines further down.  Instead of performing two
separate read-modify-writes it would make more sense to combine the two
into one.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:40:48 -07:00
Alexander Duyck
67ebd79141 ixgbe: move setting of GSO size for 82598 into ixgbe_configure_dcb
We are unnecessarily modifying the GSO size for all HW when we don't need
to.  The code can be simplified by moving the check for DCB and the
adjustment of the GSO size for 82598 into ixgbe_configure_dcb.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:40:48 -07:00
Alexander Duyck
d716a7d885 ixgbe: remove redundant DMA alignment code
This patch removes the redundant DMA alignment code from the Rx buffer
allocation path.  This code is no longer necessary since all x86 buffers
are now DMA aligned due to recent changes to NET_IP_ALIGN and NET_SKB_PAD.

It also moves the setting of the Rx queue value into the allocation path
since it is more likely that the queue mapping will still be in the cache
at the time of allocation.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:36:45 -07:00
Don Skidmore
083fc582b8 ixgbe: cleanup ixgbe_get_drvinfo to be extra careful with buffer boundaries
Make the code in ixgbe_get_drvinfo more protected against buffer overflow
boundaries by using snprintf and sizeof with snprintf.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 16:36:44 -07:00
Bruce Allan
1aef70ef12 e1000e: don't check for alternate MAC addr on parts that don't support it
From: Bruce Allan <bruce.w.allan@intel.com>

The alternate MAC address feature is only supported by 80003ES2LAN and
82571 LOMs as well as a couple 82571 mezzanine cards.  Checking for an
alternate MAC address on other parts can fail leading to the driver not
able to load.  This patch limits the check for an alternate MAC address
to be done only for parts that support the feature.

This issue has been around since support for the feature was introduced
to the e1000e driver in 2.6.34.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Reported-by: Fabio Varesano <fax8@users.sourceforge.net>
Cc: stable@kernel.org
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 15:48:52 -07:00
Bruce Allan
19833b5dff e1000e: disable ASPM L1 on 82573
On the e1000-devel mailing list, Nils Faerber reported latency issues with
the 82573 LOM on a ThinkPad X60.  It was found to be caused by ASPM L1;
disabling it resolves the latency.  The issue is present in kernels back
to 2.6.34 and possibly 2.6.33.


Reported-by: Nils Faerber <nils.faerber@kernelconcepts.de>
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Cc: stable@kernel.org
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 15:48:30 -07:00
Michal Simek
357e8b5f72 xilinx_emaclite: netpoll support
Netconsole requires poll support.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 00:49:47 -07:00
Michal Simek
8539992f60 ll_temac: Fix poll implementation
Functions ll_temac_rx_irq and ll_temac_tx_irq
have pointer to net_device as second parameter not
pointer to temac_local.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 00:46:57 -07:00
Eric Dumazet
502820a316 netxen: fix a race in netxen_nic_get_stats()
Dont clear netdev->stats, it might give transient wrong values to
concurrent stat readers.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 00:44:03 -07:00
Eric Dumazet
1003201a73 qlnic: fix a race in qlcnic_get_stats()
Dont clear netdev->stats, it might give transient wrong values to
concurrent stat readers.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 00:44:02 -07:00
Kuninori Morimoto
9c38657cfc net: sh_eth: remove unused variable
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 00:39:45 -07:00
Amit Kumar Salecha
772806bbbc netxen: update version 4.0.74
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 00:28:17 -07:00
Amit Kumar Salecha
4be353d516 netxen: fix inconsistent lock state
Spin lock rds_ring->lock is used in poll routine, so other users should
use spin_lock_bh(). While posting rx buffers from netxen_nic_attach,
rds_ring->lock is not required, so cleaning it instead of fixing it by
spin_lock_bh().

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 00:28:16 -07:00
Eric Dumazet
6f0bee16d0 slip: fix get_stats() method
Use integrated net_device_stats instead of a static one, and make sure
no transient values are feeded. ndo_get_stats() can be called by
concurrent cpus.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 00:16:52 -07:00
Eric Dumazet
dd57f970f9 vxge: Implement 64bit stats
vxge_get_stats() is racy, since it clears a block of memory (net_stats)
possibly still used by other cpus.

We can update this driver to full 64bit stats, since ndo_get_stats64()
provides a private block to store results, and driver maintains 64bit
counters already.

We also remove net_stats field from struct vxge_sw_stats

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 00:16:51 -07:00
Tobias Klauser
bb2537f1e7 ether3: Use net_device_stats from struct net_device
struct net_device has its own struct net_device_stats member, so use
this one instead of a private copy in the ether1_priv struct. As the new
ndo_get_stats function would just return dev->stats we can omit it. This
patch also removes an incorrect memset of the stats on open.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 00:12:38 -07:00
Tobias Klauser
25aec76a3b ether1: Use net_device_stats from struct net_device
struct net_device has its own struct net_device_stats member, so use
this one instead of a private copy in the ether1_priv struct. As the new
ndo_get_stats function would just return dev->stats we can omit it. This
patch also removes an incorrect memset of the stats on open.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 00:12:38 -07:00
Robert Jennings
0645bab7da ibmveth: Fix opps during MTU change on an active device
This fixes the following opps which can occur when trying to deallocate
receive buffer pools when changing the MTU of an active ibmveth device.

Oops: Kernel access of bad area, sig: 11 [#1]
NIP: d000000004db00e8 LR: d000000004db00ac CTR: 0000000000591038
REGS: c00000007fff39d0 TRAP: 0300   Not tainted  (2.6.36-rc1)
MSR: 8000000000009032 <EE,ME,IR,DR>  CR: 22248244  XER: 00000002
DAR: 0000000000000488, DSISR: 0000000042000000
TASK = c00000007c463790[6531] 'netserver' THREAD: c00000007a154000 CPU: 0
GPR00: 0000000000000000 c00000007fff3c50 d000000004dbd360 0000000000000001
GPR04: 0000000000000001 1fffffffffffffff 000000000000043c c00000007a8e9f60
GPR08: c00000007a8e9e20 0000000000000245 0000000000000488 0000000000000000
GPR12: 00000000000000c0 c000000006d70000 c00000007bfec098 c00000007bfebc2c
GPR16: c00000007a157c78 0000000000000000 0000000000000001 0000000000000000
GPR20: 0000000000000001 0000000000000010 c000000000b51180 c00000007a8e9d90
GPR24: c00000007a8e9da0 c00000007a8e9580 00000000000005ea 00000000000002ff
GPR28: 0000000000000004 0000000000000080 c000000000a946f8 c00000007a8e9d80
NIP [d000000004db00e8] .ibmveth_remove_buffer_from_pool+0xe8/0x130 [ibmveth]
LR [d000000004db00ac] .ibmveth_remove_buffer_from_pool+0xac/0x130 [ibmveth]
Call Trace:
[c00000007fff3c50] [d000000004db00ac] .ibmveth_remove_buffer_from_pool+0xac/0x130 [ibmveth] (unreliable)
[c00000007fff3cf0] [d000000004db31dc] .ibmveth_poll+0x30c/0x460 [ibmveth]
[c00000007fff3dd0] [c00000000042c4b8] .net_rx_action+0x178/0x278
[c00000007fff3eb0] [c000000000093cf0] .__do_softirq+0x118/0x1f8
[c00000007fff3f90] [c00000000002ab3c] .call_do_softirq+0x14/0x24
[c00000007a157600] [c00000000000e3e4] .do_softirq+0xec/0x110
[c00000007a1576a0] [c000000000093394] .local_bh_enable_ip+0xb4/0xe0
[c00000007a157720] [c0000000004f0bac] ._raw_spin_unlock_bh+0x3c/0x50
[c00000007a157790] [c0000000004186e0] .release_sock+0x158/0x188
[c00000007a157840] [c000000000479660] .tcp_recvmsg+0x560/0x9b8
[c00000007a157970] [c0000000004a0d78] .inet_recvmsg+0x80/0xd8
[c00000007a157a00] [c000000000413e28] .sock_recvmsg+0x128/0x178
[c00000007a157bf0] [c0000000004164ac] .SyS_recvfrom+0xb4/0x148
[c00000007a157d70] [c000000000411f3c] .SyS_socketcall+0x274/0x360
[c00000007a157e30] [c0000000000085b4] syscall_exit+0x0/0x40

Reported-by: Rafael Camarda Silva Folco <rfolco@linux.vnet.ibm.com>
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 00:09:48 -07:00
Oliver Hartkopp
2244d07bfa net: simplify flags for tx timestamping
This patch removes the abstraction introduced by the union skb_shared_tx in
the shared skb data.

The access of the different union elements at several places led to some
confusion about accessing the shared tx_flags e.g. in skb_orphan_try().

    http://marc.info/?l=linux-netdev&m=128084897415886&w=2

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 00:08:30 -07:00
Joe Perches
4d5870ec10 drivers/net/sunvnet.c: Use pr_<level> and netdev_<level>
Use the current message logging styles.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 00:04:34 -07:00
Joe Perches
c6c759884b drivers/net/sungem: Use netdev_<level>, netif_<level> and pr_<level>
Use the current logging message styles.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 00:04:33 -07:00
Tobias Klauser
0b29b894b1 sunhme: Use return value of register_netdev
Use the return value provided by register_netdev on error instead of
using a previously set value.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 00:04:32 -07:00
Tobias Klauser
cb5d991a99 greth: Use return value of register_netdev
Use the return value provided by register_netdev on error instead of
hard setting it to -ENOMEM.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-19 00:04:31 -07:00
Andre Detsch
2928db4c3c ehea: Fix synchronization between HW and SW send queue
ehea: Fix synchronization between HW and SW send queue

When memory is added to / removed from a partition via the Memory DLPAR
mechanism, the eHEA driver has to do a couple of things to reflect the
memory change in its own IO address translation tables. This involves
stopping and restarting the HW queues.
During this operation, it is possible that HW and SW pointer into these
queues get out of sync. This results in a situation where packets that
are attached to a send queue are not transmitted immediately, but
delayed until further X packets have been put on the queue.

This patch detects such loss of synchronization, and resets the ehea
port when needed.

Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-18 23:50:51 -07:00
Yaniv Rosner
96ac4f6b32 bnx2x: Update bnx2x version to 1.52.53-4
Update bnx2x version to 1.52.53-4

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-18 23:42:36 -07:00
Yaniv Rosner
3971a230f9 bnx2x: Fix PHY locking problem
PHY locking is required between two ports for some external PHYs. Since
initialization was done in the common init function (called only on the
first port initialization) rather than in the port init function, there
was in fact no PHY locking between the ports.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-18 23:42:35 -07:00
Sachin Sanap
a49f37eed2 net: add Fast Ethernet driver for PXA168.
Signed-off-by: Sachin Sanap <ssanap@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-18 23:30:42 -07:00
Julia Lawall
900853a4db drivers/net/qlcnic: Use available error codes
The error code is stored in the variable err, but it is the variable ret
that is returned instead.  So store the error code in ret.  Err is then
useless.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
local idexpression x;
constant C;
@@

if (...) { ...
  x = -C
  ... when != x
(
  return <+...x...+>;
|
  return NULL;
|
  return;
|
* return ...;
)
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-18 14:26:32 -07:00
Joe Perches
636b8116d4 drivers/net/pcmcia: Use pr_<level> and netdev_<level>
On Mon, 2010-08-09 at 17:34 +0200, Dominik Brodowski wrote:
> look good from a PCMCIA point of view, therefore:
> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>

If PCMCIA is still being looked after, then here's
another for you, maybe for 2.6.37.

Use the more descriptive logging message styles.

There are whitespace/indentation errors in the original
sources that these changes do not modify, so checkpatch
errors were cheerfully ignored.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-18 14:26:30 -07:00
Jon Mason
666be4298b s2io: Update driver version
Update s2io driver's version to reflect the series of patches.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-18 14:24:50 -07:00
Jon Mason
be265e9bae s2io: remove unused code
usr_addrs is never referenced outside the initial struct population
during open, thus making it unnecessary.  Remove it, the code that
references it, and the struct that it is the only user of.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-18 14:24:50 -07:00
Wey-Yi Guy
6a017e043a iwlwifi: use long monitor timer for 5300 series
For 5000 series of devices, use long monitor timer to check
stuck tx queues.

This modification apply to all the 5000 series including 5300 and others.

Cc: stable@kernel.org [2.6.35]
Reported-by: drago01 <drago01@gmail.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-18 16:37:44 -04:00
Joe Perches
5db5584441 drivers/net/wireless: Restore upper case words in wiphy_<level> messages
Commit c96c31e499
"(drivers/net/wireless: Use wiphy_<level>)"
inadvertently changed some upper case words to
lower case.  Restore the original case.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-18 16:37:44 -04:00
Joe Perches
baeb2ffab4 drivers/net: Convert unbounded kzalloc calls to kcalloc
These changes may be slightly safer in some instances.

There are other kzalloc calls with a multiply, but those
calls are typically "small fixed #" * sizeof(some pointer)"
and those are not converted.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 17:45:14 -07:00
Johannes Berg
8b8ab9d5e3 iwlwifi: fix 3945 filter flags
Applying the filter flags directly as done since

commit 3474ad635d
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Thu Apr 29 04:43:05 2010 -0700

    iwlwifi: apply filter flags directly

broke 3945 under some unknown circumstances, as
reported by Alex.

Since I want to keep the direct application of
filter flags on iwlagn, duplicate the code into
both 3945 and agn and remove committing the
RXON that broke things from the 3945 version.

Cc: stable@kernel.org [2.6.35]
Reported-by: Alex Romosan <romosan@sycorax.lbl.gov>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-17 14:38:14 -04:00
John W. Linville
c206a04fba ipw2100: don't sync status queue entries
These are allocated with pci_alloc_consistent, so calling
pci_dma_sync_single_for_cpu is incorrect usage of the API.  Remove this
misuse and consequently avoid the following backtrace:

WARNING: at lib/dma-debug.c:902 check_sync+0xce/0x43a()
Hardware name: 2373HU6
ipw2100 0000:02:02.0: DMA-API: device driver tries to sync DMA memory it has not allocated [device address=0x0000000034e88008] [size=8 bytes]
Modules linked in: microcode ipw2100(+) snd_seq_device ppdev libipw nsc_ircc snd_pcm lib80211 video output irda parport_pc cfg80211 parport thinkpad_acpi e1000 iTCO_wdt crc_ccitt snd_timer iTCO_vendor_support snd i2c_i801 pcspkr rfkill soundcore joydev snd_page_alloc yenta_socket radeon ttm drm_kms_helper drm i2c_algo_bit i2c_core [last unloaded: scsi_wait_scan]
Pid: 0, comm: swapper Tainted: G        W   2.6.35-wl+ #8
Call Trace:
 [<c043aa42>] warn_slowpath_common+0x6a/0x7f
 [<c05d252a>] ? check_sync+0xce/0x43a
 [<c043aaca>] warn_slowpath_fmt+0x2b/0x2f
 [<c05d252a>] check_sync+0xce/0x43a
 [<c046189a>] ? print_lock_contention_bug+0x11/0xb2
 [<c05d2b6f>] debug_dma_sync_single_for_cpu+0x47/0x49
 [<c06cbd3c>] ? ehci_irq+0x31/0x331
 [<f82a224a>] ? ipw2100_irq_tasklet+0x24/0x5e9 [ipw2100]
 [<f82a224a>] ? ipw2100_irq_tasklet+0x24/0x5e9 [ipw2100]
 [<f82a221d>] pci_dma_sync_single_for_cpu.clone.1+0x42/0x4b [ipw2100]
 [<f82a23a2>] ipw2100_irq_tasklet+0x17c/0x5e9 [ipw2100]
 [<c043fd87>] tasklet_action+0x78/0xcb
 [<c0440293>] __do_softirq+0xc4/0x183
 [<c044038d>] do_softirq+0x3b/0x5f
 [<c04404d0>] irq_exit+0x3a/0x6d
 [<c0404423>] do_IRQ+0x8b/0x9f
 [<c04038b5>] common_interrupt+0x35/0x3c
 [<c062ecfa>] ? acpi_idle_enter_simple+0xfe/0x13c
 [<c045007b>] ? exit_itimers+0x2d/0x73
 [<c062ecfc>] ? acpi_idle_enter_simple+0x100/0x13c
 [<c070bf10>] cpuidle_idle_call+0x78/0xdc
 [<c040251c>] cpu_idle+0x9b/0xb7
 [<c07b1dd2>] rest_init+0xa6/0xab
 [<c0a4b96d>] start_kernel+0x389/0x38e
 [<c0a4b0c9>] i386_start_kernel+0xc9/0xd0

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-17 14:38:14 -04:00
Sucheta Chakraborty
24763d80fb qlcnic: turn off lro when rxcsum is disabled.
o Also dont allow lro to be turn on, if rx csum is disabled

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 03:59:49 -07:00
Sony Chacko
8dec32cc42 qlcnic: fix link diag test
o Give sufficient time for all makes of PHY modules
  to establish the link after loopback test.
o Perform online test before offline test.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 03:59:48 -07:00
Sony Chacko
69324275de qlcnic: fix link status message
Display interface name with netdev_info() for link status message.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 03:59:48 -07:00
Amit Kumar Salecha
b602121229 qlcnic: add eswitch statistics support
Adding eswitch statistics support. User can get
whole eswitch stats or stats of func belong to that eswitch.

Added:
o command to get statistics of eswitch and function.
o sysfs support to export eswitch and func statatistics.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 03:59:47 -07:00
Rajesh Borundia
ecd7d31038 qlcnic: fix for setting function modes
function modes was not working with CNA device, in CNA mode
other function(FCOE) can be enabled before nic.

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>
2010-08-17 03:59:46 -07:00
Amit Kumar Salecha
3c4b23b1be qlcnic: device state management fixes for virtual func
o NPAR state should be set to operationl by Mangement function only.
o NPAR state should be set to non operational before device reset.
o VF function should wait for NPAR state to be operational.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 03:59:46 -07:00
Amit Kumar Salecha
933fce12a3 qlcnic: fix aer for virtual func
Virtual function are not privilge to initialize firmware.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 03:59:45 -07:00
Roopa Prabhu
1f76da51f5 enic: Mark intr_timer in vnic_enet_config as deprecated
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 02:32:59 -07:00
Roopa Prabhu
832177901a enic: Check if rq/wq buf not NULL before freeing them
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 02:32:58 -07:00
Roopa Prabhu
ce16cc02f9 enic: Clean up: remove enic_dev_stats_clear
Remove function enic_dev_stats_clear and its reference in enic device
init code. Firmware clears device stats on device open. So, no need for
the driver to do it again.

Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 02:32:58 -07:00
Roopa Prabhu
7c46835e48 enic: Use offsetof macro in vic tlv length calculation
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 02:32:58 -07:00
Roopa Prabhu
ae94abe168 enic: Add new firmware devcmds
Add new firmware devcmds:  CMD_PROXY_BY_INDEX, CMD_CONFIG_INFO_GET

Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 02:32:57 -07:00
Roopa Prabhu
90cf0b53d7 enic: Add support for firmware management device
This patch adds support for firmware management device in enic driver.
A management device is a virtual PCIe device that firmware can present
to the host as its management endpoint. It provides the interface between
the host and adapter firmware for all management operations.

Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 02:32:56 -07:00
Roopa Prabhu
294dab25e7 enic: Add set mac address
This patch implements the ndo_set_mac_address netdev operation for an enic device

Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 02:32:56 -07:00
Florian Fainelli
559764d199 cpmac: fix all checkpatch errors and warnings
This patches fixes a couple of checkpatch warnings and errors:
- lines over 80 columns
- printk() instead of pr_cont()
- assignments in tests (if ((foo == bar())))

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 02:32:55 -07:00
Tobias Klauser
264fd77a67 am79c961a: Use net_device_stats from struct net_device
struct net_device has its own struct net_device_stats member, so we can
use this one instead of a private copy in the dev_priv struct.

Cc: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 02:32:55 -07:00
Florian Fainelli
2154c704c7 r6040: fix all checkpatch errors and warnings
This patch fixes a couple of errors and warnings spotted by checkpatch.pl:
- some lines were over 80 columns
- there were some whitespaces left

The call to printk is now replaced by a call to pr_info and the log-level
included in the driver version is now removed, so there are no longer false
positives on this warning.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 02:32:54 -07:00
Joe Perches
7136e11e0c pcnet_cs: Use pr_fmt and pr_<level>
It looks as if the printks in get_ax88190 are
incorrect and were duplicated and superceded by a
test in pcnet_config, so I removed them.

Changed the level of the ax88190 test to KERN_NOTICE
to match the other message styles in pcnet_config.

Compiled but untested.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 02:32:54 -07:00
Wolfram Sang
ea0a52c4fd pcnet_cs: Use proper netdev_*-printouts
To prevent broken messages like:

[  204.024291] eth%d: pcnet_reset_8390() did not complete.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Joe Perches <joe@perches.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 02:32:53 -07:00
Ben Hutchings
0141480205 ethtool: Provide a default implementation of ethtool_ops::get_drvinfo
The driver name and bus address for a net_device can normally be found
through the driver model now.  Instead of requiring drivers to provide
this information redundantly through the ethtool_ops::get_drvinfo
operation, use the driver model to do so if the driver does not define
the operation.  Since ETHTOOL_GDRVINFO no longer requires the driver
to implement any operations, do not require net_device::ethtool_ops to
be set either.

Remove implementations of get_drvinfo and ethtool_ops that provide
only this information.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17 02:31:15 -07:00
Julia Lawall
f7df0b8d92 drivers/isdn: Adjust confusing if indentation
In hisax/hfc_sx.c and mISDN/l1oip_core.c, the code after the if is
outdented so that it is not aligned with the if branch.

In mISDN/dsp_cmx.c, an else is added between the original if branch and the
following statement, in line with the code following it.  Without this
change, the first assignment to dsp->rx_W has no useful effect.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable braces4@
position p1,p2;
statement S1,S2;
@@

(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

if (p1[0].column == p2[0].column):
  cocci.print_main("branch",p1)
  cocci.print_secs("after",p2)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-16 21:06:30 -07:00
Julia Lawall
9e1634a734 drivers/net: Adjust confusing if indentation
Outdent the code following the if.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable braces4@
position p1,p2;
statement S1,S2;
@@

(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

if (p1[0].column == p2[0].column):
  cocci.print_main("branch",p1)
  cocci.print_secs("after",p2)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-16 21:06:29 -07:00
Julia Lawall
1f1d47ef47 drivers/net/hamradio: Adjust confusing if indentation
Indent the branch of an if.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable braces4@
position p1,p2;
statement S1,S2;
@@

(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

if (p1[0].column == p2[0].column):
  cocci.print_main("branch",p1)
  cocci.print_secs("after",p2)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-16 21:06:29 -07:00
Julia Lawall
cc81735e80 drivers/net/bnx2x: Adjust confusing if indentation
Outdent the code following the if.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable braces4@
position p1,p2;
statement S1,S2;
@@

(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

if (p1[0].column == p2[0].column):
  cocci.print_main("branch",p1)
  cocci.print_secs("after",p2)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-16 21:06:28 -07:00
Julia Lawall
2145f1afc6 drivers/net: Adjust confusing if indentation
Outdent the code following the if.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable braces4@
position p1,p2;
statement S1,S2;
@@

(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

if (p1[0].column == p2[0].column):
  cocci.print_main("branch",p1)
  cocci.print_secs("after",p2)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-16 21:06:28 -07:00
Julia Lawall
6f74dbbc29 drivers/atm: Adjust confusing if indentation
Indent the branch of an if.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable braces4@
position p1,p2;
statement S1,S2;
@@

(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

if (p1[0].column == p2[0].column):
  cocci.print_main("branch",p1)
  cocci.print_secs("after",p2)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-16 21:06:27 -07:00
Julia Lawall
022484c172 drivers/net: Adjust confusing if indentation
In amd8111e.c, indent the branch of an if.
In eepro.c, outdent the code following the if.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable braces4@
position p1,p2;
statement S1,S2;
@@

(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

if (p1[0].column == p2[0].column):
  cocci.print_main("branch",p1)
  cocci.print_secs("after",p2)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-16 21:06:26 -07:00
Julia Lawall
9b0f1d8596 drivers/net/irda: Adjust confusing if indentation
Indent the branch of an if.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable braces4@
position p1,p2;
statement S1,S2;
@@

(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

if (p1[0].column == p2[0].column):
  cocci.print_main("branch",p1)
  cocci.print_secs("after",p2)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-16 21:06:26 -07:00