Commit Graph

12277 Commits

Author SHA1 Message Date
Michael Buesch
99e0fca674 b43: (b2062) Fix crystal frequency calculations
This fixes the crystal frequency calculations in the b2062 init code.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:49 -05:00
Michael Buesch
686aa5f213 b43: Port spec bugfixes for the LP baseband init
A few bugs were fixed in the LP baseband init specs.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:49 -05:00
Roel Kluin
baf62eecfa libertas: pos[4] tested twice, 2nd should be pos[5]
pos[4] can't be both 0x43 and 0x04, 2nd should be pos[5]

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:49 -05:00
Mike Rapoport
0c2bec9694 libertas: if_spi: add ability to call board specific setup/teardown methods
In certain cases it is required to perform board specific actions
before activating libertas G-SPI interface. These actions may include
power up of the chip, GPIOs setup, proper pin-strapping and SPI
controller config.
This patch adds ability to call board specific setup/teardown methods

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Andrey Yurovsky <andrey@cozybit.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:48 -05:00
Luis R. Rodriguez
de9f97efb2 ath9k: fix reg_notifier() flags used upon a country IE
The nl80211 rule flags were being used.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:48 -05:00
Michael Buesch
24b5bcc6ae b43: Add LP 2062 radio init
This adds initialization code for the 2062 radio.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:48 -05:00
Michael Buesch
6c1bb9276c b43: Add LP-PHY baseband init for >=rev2
This adds code for the baseband init of LP-PHY >=2.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:48 -05:00
Danny Kukawka
3302e44dcd iwlwifi: another led naming fix
Fixed led device naming for the iwlwifi (iwl-3945) driver. Due
to the documentation of the led subsystem/class the naming should
be "devicename:colour:function" while not applying sections
should be left blank.

This should lead to e.g. "iwl-%s::RX" instead of "iwl-%s:RX".

Signed-off-by: Danny Kukawka <dkukawka@suse.de>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:47 -05:00
Danny Kukawka
b34196d7d0 rt2x00: fix led naming
Fixed led device naming for the rt2x00 driver. Due to the
documentation of the led subsystem/class the naming should be
"devicename:colour:function" while not applying sections
should be left blank.

This should lead to e.g. "%s::radio" instead of "%s:radio".

Signed-off-by: Danny Kukawka <dkukawka@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:47 -05:00
Danny Kukawka
b157b5e60b b43legacy: fix led naming
Fixed led device naming for the b43legacy driver. Due to the
documentation of the led subsystem/class the naming should be
"devicename:colour:function" while not applying sections
should be left blank.

This should lead to e.g. "b43legacy-%s::rx" instead of
"b43legacy-%s:rx".

Signed-off-by: Danny Kukawka <dkukawka@suse.de>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:47 -05:00
Danny Kukawka
0818cb8adf ath9k: fix led naming
Fixed led device naming for the ath9k driver. Due to the
documentation of the led subsystem/class the naming should be
"devicename:colour:function" while not applying sections
should be left blank.

This should lead to e.g. "ath9k-%s::rx" instead of "ath9k-%s:rx".

Signed-off-by: Danny Kukawka <dkukawka@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:47 -05:00
Michael Buesch
a387cc7d38 b43: Add LP-PHY register definitions
This adds register definitions for the LP-PHY.
This also adds a few minor empty function bodies for the LP-init.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:46 -05:00
Ivo van Doorn
964d6ad935 Add new rt73usb USB ID
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:46 -05:00
Johannes Berg
7fee5372d8 mac80211: remove HW_SIGNAL_DB
Giving the signal in dB isn't much more useful to userspace
than giving the signal in unspecified units. This removes
some radiotap information for zd1211 (the only driver using
this flag), but it helps a lot for getting cfg80211-based
scanning which won't support dB, and zd1211 being dB is a
little fishy anyway.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Bruno Randolf <bruno@thinktube.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:44 -05:00
Sujith
7a7dec6562 ath9k: Add debugfs files for printing TX rate details
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:44 -05:00
Sujith
c89424df44 ath9k: Handle mac80211's RC flags for MCS rates
mac80211 notifies the RC algorithm if RTS/CTS and short preamble
are needed. The RC flags for MCS rates are currently not handled
by mac80211, and ath9k's RC doesn't set the flags either. Fix this.

Also, set the rts_cts_rate_idx inside the RC algorithm.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:44 -05:00
Sujith
3900898c7a ath9k: Cleanup get_rate() interface
The interface to calculate the TX rate for a data frame
was convoluted with lots of redundant arguments being
passed around. Remove all of that and make it simple.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:44 -05:00
Felix Fietkau
a6c8d375f5 ath5k: properly free rx dma descriptors
When freeing rx dma descriptors, use the right buffer size.
Fixes kernel oopses on module unload on ixp4xx and most likely
other platforms as well.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:43 -05:00
Harvey Harrison
c1b4aa3fb6 wireless: replace uses of __constant_{endian}
The base versions handle constant folding now.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:43 -05:00
Danny Kukawka
e5d24efe52 iwlwifi: fix led naming
Fixed led device naming for the iwl driver. Due to the
documentation of the led subsystem/class the naming should be
"devicename:colour:function" while not applying sections
should be left blank.

This should lead to e.g. "iwl-phy0::RX" instead of "iwl-phy0:RX".

Signed-off-by: Danny Kukawka <dkukawka@suse.de>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:43 -05:00
Jay Sternberg
9a23e5a226 ipw2x00: correct Kconfig to prevent following entries from not indenting
not defining dependencies for LIBIPW caused the following entries to not be
indented. changing this entry to depend on PCI && WLAN_80211 corrects this
issue

Signed-off-by: Jay Sternberg <jay.e.sternberg@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:43 -05:00
Jay Sternberg
29f35c149e iwlwifi: remove chain noise calibration functions from 6000 family
redefine structures that contain function pointer for chain noise reset
and chain noise gain for the 6000 family since these are not needed.

Signed-off-by: Jay Sternberg <jay.e.sternberg@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:42 -05:00
Jay Sternberg
e8c00dcb02 iwlwifi: define structures and functions externally for customization
defined the structures and functions as extern to alter behavior used by
5000 series for other products including 100 and 6000 series

Signed-off-by: Jay Sternberg <jay.e.sternberg@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:42 -05:00
Jay Sternberg
76a2407a5b iwlwifi: correct API command overlap
Correct the API commands where same command id used for two different
commands. Update max api versions for affected devices.

TX_ANT_CONFIGURATION_CMD was already using id 0x98, so
REPLY_TX_POWER_DBM_CMD moved to 0x95

Older API interfaces may used original value so V1 defines provided.

Signed-off-by: Jay Sternberg <jay.e.sternberg@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:42 -05:00
Jay Sternberg
050681b77d iwlwifi: parametrize configuration of the PLL for exclusion on 6000
added a config parameter to enable setting PLL_CFG.  older hardware has
this parameter set true.  the 6000 family does not support this setting,
so this parameter set false.

Signed-off-by: Jay Sternberg <jay.e.sternberg@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:42 -05:00
Jay Sternberg
c0bac76a22 iwlwifi: simplify parameter setting to allow support for 6000 series
by parametrizing the set hw function, in addition to allowing for
supporting the 6000 family significantly simplify the addition of new
hardware.

Signed-off-by: Jay Sternberg <jay.e.sternberg@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:42 -05:00
Jay Sternberg
2264596d6d iwlwifi: add new HW_REV_TYPEs for Intel WiFi Link 100, 6000 and 6050 Series
simply add definitions for the HW_REV_TYPEs for the new devices.

Signed-off-by: Jay Sternberg <jay.e.sternberg@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:41 -05:00
Vasanthakumar Thiagarajan
f2bffa7ea0 ath9k: Fix LED blink pattern
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:40 -05:00
Sujith
547c376376 ath9k: Remove a bunch of unused macros
RX filter masks are already defined in enum ath9k_rx_filter
in ath9k.h

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:39 -05:00
Sujith
feed029cd6 ath9k: Fix typo in checking for chip revision
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:39 -05:00
Luis R. Rodriguez
7519a8f077 ath9k: remove passive scan on 5 GHz if country IE knows better
If we have new found information about our location and the
current country regulatory domain does not have passive scan
flag requirements we should be able to actively scan now on those
channels.

Since AP functionality is not allowed where passive scan flags are
set this means if you have a world regulatory domain and you get a
country IE that allows that channel (with active scan) then we lift
the passive-scan requirement so you can then use AP mode.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:38 -05:00
Luis R. Rodriguez
547e4c2e64 ath9k: move check for radar freqs into a helper
This will be used later.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:36 -05:00
Luis R. Rodriguez
8c63c46d58 ath9k: replace usage of internal wireless_modes for conf
No need to use our internal wireless mode variable when
cfg80211 already has its own.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:35 -05:00
Vivek Natarajan
4e30ffa29c ath9k: Enable MIB and TIM interrupts for station mode.
Enable operating mode specific interrupts in ath9k_add_interface instead
of ath9k_start.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:35 -05:00
Sujith
d22b0022e7 ath9k: Fix lockdep warning
This patch fixes the lockdep warning shown below, and also
initializes the starting sequence number when starting a TX
aggregation session.

 =============================================
 [ INFO: possible recursive locking detected ]
 2.6.29-rc2-wl #21
 ---------------------------------------------
 swapper/0 is trying to acquire lock:
  (_xmit_IEEE80211#2){-+..}, at: [<ffffffff80456d71>] __qdisc_run+0x221/0x290

 but task is already holding lock:
  (_xmit_IEEE80211#2){-+..}, at: [<ffffffff80456d71>] __qdisc_run+0x221/0x290

 other info that might help us debug this:
 7 locks held by swapper/0:
  #0:  (rcu_read_lock){..--}, at: [<ffffffff80442a63>] dev_queue_xmit+0x53/0x620
  #1:  (_xmit_ETHER#2){-+..}, at: [<ffffffff80456d71>] __qdisc_run+0x221/0x290
  #2:  (rcu_read_lock){..--}, at: [<ffffffff80442a63>] dev_queue_xmit+0x53/0x620
  #3:  (_xmit_IEEE80211#2){-+..}, at: [<ffffffff80456d71>] __qdisc_run+0x221/0x290
  #4:  (rcu_read_lock){..--}, at: [<ffffffffa0154919>] ieee80211_master_start_xmit+0x219/0x6c0 [mac80211]
  #5:  (rcu_read_lock){..--}, at: [<ffffffffa01427c6>] ieee80211_start_tx_ba_session+0x66/0x4e0 [mac80211]
  #6:  (rcu_read_lock){..--}, at: [<ffffffff80442a63>] dev_queue_xmit+0x53/0x620

 stack backtrace:
 Pid: 0, comm: swapper Not tainted 2.6.29-rc2-wl #21
 Call Trace:
  <IRQ>  [<ffffffff8026c329>] __lock_acquire+0x1be9/0x1c40
  [<ffffffff80442af1>] dev_queue_xmit+0xe1/0x620
  [<ffffffff8026a8cc>] __lock_acquire+0x18c/0x1c40
  [<ffffffff8026c3d5>] lock_acquire+0x55/0x70
  [<ffffffff80456d71>] __qdisc_run+0x221/0x290
  [<ffffffff804dbeb9>] _spin_lock+0x39/0x50
  [<ffffffff80456d71>] __qdisc_run+0x221/0x290
  [<ffffffff804dbd2f>] _spin_unlock+0x1f/0x50
  [<ffffffff80456d71>] __qdisc_run+0x221/0x290
  [<ffffffff80442d18>] dev_queue_xmit+0x308/0x620
  [<ffffffff80442a63>] dev_queue_xmit+0x53/0x620
  [<ffffffffa0142a63>] ieee80211_start_tx_ba_session+0x303/0x4e0 [mac80211]
  [<ffffffffa01427c6>] ieee80211_start_tx_ba_session+0x66/0x4e0 [mac80211]
  [<ffffffffa0149dae>] rate_control_get_rate+0xae/0xc0 [mac80211]
  [<ffffffffa01526b5>] invoke_tx_handlers+0x655/0x1000 [mac80211]
  [<ffffffff802699fd>] mark_held_locks+0x4d/0x90
  [<ffffffff804dbcf5>] _spin_unlock_irqrestore+0x65/0x80
  [<ffffffffa0151aaa>] __ieee80211_tx_prepare+0x16a/0x310 [mac80211]
  [<ffffffffa0151adc>] __ieee80211_tx_prepare+0x19c/0x310 [mac80211]
  [<ffffffff80439cc2>] pskb_expand_head+0x112/0x190
  [<ffffffffa0154986>] ieee80211_master_start_xmit+0x286/0x6c0 [mac80211]
  [<ffffffffa0154919>] ieee80211_master_start_xmit+0x219/0x6c0 [mac80211]
  [<ffffffff8026a8cc>] __lock_acquire+0x18c/0x1c40
  [<ffffffff80456d8e>] __qdisc_run+0x23e/0x290
  [<ffffffff80442d18>] dev_queue_xmit+0x308/0x620
  [<ffffffff80442a63>] dev_queue_xmit+0x53/0x620
  [<ffffffffa0154221>] ieee80211_subif_start_xmit+0x4a1/0x980 [mac80211]
  [<ffffffffa0153f18>] ieee80211_subif_start_xmit+0x198/0x980 [mac80211]
  [<ffffffff80456d8e>] __qdisc_run+0x23e/0x290
  [<ffffffff80442d18>] dev_queue_xmit+0x308/0x620
  [<ffffffff80442a63>] dev_queue_xmit+0x53/0x620
  [<ffffffffa028ecfd>] ip6_output+0x62d/0x1230 [ipv6]
  [<ffffffff8024ca00>] __mod_timer+0xb0/0xd0
  [<ffffffffa02ad25a>] mld_sendpack+0x3fa/0x4a0 [ipv6]
  [<ffffffffa02ace60>] mld_sendpack+0x0/0x4a0 [ipv6]
  [<ffffffffa02adf90>] mld_ifc_timer_expire+0x0/0x340 [ipv6]
  [<ffffffffa02ae219>] mld_ifc_timer_expire+0x289/0x340 [ipv6]
  [<ffffffffa02adf90>] mld_ifc_timer_expire+0x0/0x340 [ipv6]
  [<ffffffff8024c097>] run_timer_softirq+0x147/0x220
  [<ffffffff802473fb>] __do_softirq+0x9b/0x180
  [<ffffffff80265516>] tick_dev_program_event+0x36/0xb0
  [<ffffffff8020d77c>] call_softirq+0x1c/0x30
  [<ffffffff8020f2c5>] do_softirq+0x65/0xb0
  [<ffffffff80246ebd>] irq_exit+0x9d/0xc0
  [<ffffffff80221db6>] smp_apic_timer_interrupt+0x86/0xd0
  [<ffffffff8020d1b3>] apic_timer_interrupt+0x13/0x20

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:35 -05:00
Ivo van Doorn
0cbe006461 rt2x00: Validate firmware in driver
The get_firmware_crc() callback function isn't flexible
enough when dealing with multiple firmware versions.
It might in some cases be possible that the firmware
file contains multiple CRC checksums.

Create the check_firmware() callback function where the driver
has complete freedom in how to validate the firmware.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:35 -05:00
Ivo van Doorn
a2c9b652a1 rt2x00: Add kill_tx_queue callback function
provide rt2x00lib the possibility to kill a particular TX queue.
This can be useful when disabling the radio, but more importantly
will allow beaconing to be disabled when mac80211 requests this
(during scanning for example)

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:34 -05:00
Ivo van Doorn
382fe0f2da rt2x00: Move intf_work to mac82011 workqueue
ieee80211_iterate_active_interfaces() no longer acquires the
RTNL lock which means the intf_work handler can be safely
used from the mac80211 workqueue again.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:34 -05:00
Winkler, Tomas
d25aabb0a1 iwlwifi: unify iwlagn and 3945 power save management
This patch unifies 3945 and iwlagn power save management
This patch also better separates system state from user setting.
System state shall be removed later as this shall be shifted to user space

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:34 -05:00
Tomas Winkler
e1623446bb iwlwifi: don't use implicit priv in IWL_DEBUG
Call IWL_DEBUG macro with explicit priv argument.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:34 -05:00
Winkler, Tomas
450154e4f4 iwlwifi: check return value of pci_enable_device
pci_enable_device is tagged with __must_check therefore
don't ignore the return value in pci_resume handlers

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:33 -05:00
Winkler, Tomas
dfb39e8295 iwlwifi: iwl3945_send_tx_power must be static
iwl3945_send_tx_power must be static

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:33 -05:00
Winkler, Tomas
7530f85f08 iwlwifi: suppress unused variable warning when compiling w/o IWLWIFI_DEBUG
This patch adds __maybe_unused attribute to priv variables used in
functions that used it solely for debug printouts

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:33 -05:00
Samuel Ortiz
8ccde88a87 iwl3945: Getting rid of the *39_rxon iwl_priv fields
The iwl_rxon_cmd is really just a iwl3945_rxon_cmd structure extension.
So, we can use the *_rxon fields from iwl_priv instead of the 3945 specific
ones (*39_rxon). We have to then be careful when submitting REPLY_RXON host
commands, since the command length as to be set according to the HW. As
another precaution the reserved4 and reserved5 fields are cleared before being
sent to the 3945.

With the *39_rxon removal, a lot of duplicated code can be removed from the
3945 code base.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:33 -05:00
Andrey Borzenkov
d14c7c1d6a orinoco: checkpatch cleanup
Fix errors and obvious warnings reported by checkpatch in all files
except orinoco.c. Orinoco.c is part of different patch series of Dave.

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:32 -05:00
Dhananjay Phadke
b3df68f8f5 netxen: fix msi-x interrupt handling
o Cut down msi-x vectors from 8 to 1 since only one is used for now.
o Use separate handler for msi-x, that doesn't unnecessarily scrub
  msi status register.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-08 19:20:19 -08:00
Risto Suominen
b991d2bc4a de2104x: force correct order when writing to rx ring
DescOwn should not be set, thus allowing the chip to use the
descriptor, before everything else is set up correctly.

Signed-off-by: Risto Suominen <Risto.Suominen@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-08 17:50:34 -08:00
Alex Williamson
cfbf84fcbc tun: Fix unicast filter overflow
Tap devices can make use of a small MAC filter set via the
TUNSETTXFILTER ioctl.  The filter has a set of exact matches
plus a hash for imperfect filtering of additional multicast
addresses.  The current code is unbalanced, adding unicast
addresses to the multicast hash, but only checking the hash
against multicast addresses.  This results in the filter
dropping unicast addresses that overflow the exact filter.
The fix is simply to disable the filter by leaving count set
to zero if we find non-multicast addresses after the exact
match table is filled.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-08 17:49:17 -08:00
David S. Miller
409f0a9014 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-agn.c
	drivers/net/wireless/iwlwifi/iwl3945-base.c
2009-02-07 02:52:44 -08:00
Jesse Brandeburg
593721833d igb: remove dead code in transmit routine
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-07 02:43:18 -08:00
Alexander Duyck
86d5d38fa1 igb: update version number and copyright dates
Update the version number to 1.3.16 and update copyright dates for 2009.

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>
2009-02-07 02:43:17 -08:00
Alexander Duyck
265de40908 igb: fix two minor items found during code review
This patch addresses two minor items I found while cleaning up the igb
driver for our sourceforge version.

The first clears the context index if we don't flag that we need it.

The second item is that eims_other should be used instead of bit defines
when setting all of the EICS bits prior to reset.

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>
2009-02-07 02:43:16 -08:00
Alexander Duyck
04fe63583d igb: update stats before doing reset in igb_down
It was seen with repeated interface up/down testing that there was a large
stray between the stats reported by the queues and the stats reported by the
HW.  It was found to be an issue in that hw stats were being reset without
first being recorded.  This change records the stats before wiping them from
the system via the reset.

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>
2009-02-07 02:43:16 -08:00
Alexander Duyck
450c87c8d2 igb: remove redundant count set and err_hw_init
Remove the setting of ring->count variables from igb_probe as they are
duplicating the same configuration that is done igb_alloc_queues.

Remove the err_hw_init tag as it can be replaced by err_sw_init.

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>
2009-02-07 02:43:15 -08:00
Alexander Duyck
8675737a9c igb: remove disable_av variable from mac_info struct
The disable_av variable is never used by the driver and provides no value as
it is likely a leftover debugging variable.  I have removed it and replaced
the one spot that checked for it with a check for a valid address.

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>
2009-02-07 02:43:15 -08:00
Alexander Duyck
fa4dfae0ce igb: change pba size determination from if to switch statement
As additional hardware is added to the igb driver it is easier to support
the expansion via switch statements instead of using nested ifs.  For
this reason I am changing this to a switch statement.

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>
2009-02-07 02:43:14 -08:00
Alexander Duyck
a8564f033e igb: move get_hw_control within igb_resume.
Move igb_get_hw_control up so that it is called just after the reset in
igb_resume.  This notifies the HW sooner that the driver is reassuming
control of the device.

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>
2009-02-07 02:43:14 -08:00
Alexander Duyck
4a3c6433e4 igb: don't read eicr when responding to legacy interrupts
The interrupt handler was reading eicr and then doing nothing with the
result.  I have removed the variable and the register read since they
provide no value to the legacy interrupt handler.

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>
2009-02-07 02:43:13 -08:00
Alexander Duyck
28b0759c22 igb: remove unnecessary adapter->hw calls when just hw-> will do.
There were several spots in the code making calls to adapter->hw when they
could have just been accessing hw-> directly.  I cleaned up the spots where
this was visibly apparent.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-07 02:43:13 -08:00
Alexander Duyck
8a900862a2 igb: rename igb_update_mc_addr_list_82575 to not include the 82575
There isn't much point in having the _82575 hanging off the end of this
function since there aren't any other version of this function running
around within this driver.  This also allows for a bit of whitespace
cleanup due to a shorter function name.

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>
2009-02-07 02:43:12 -08:00
Alexander Duyck
4b1a987736 igb: remove redundant timer updates and cleanup watchdog_task
The igb watchdog task is modifying the watchdog timer twice duing a single
run.  It only needs to be called once to reschedule itself for 2 seconds from
the last time it ran.

In addition I removed the allocation of the mac_info structure since it is
only called twice and is easier to access via the e1000_hw struct.

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>
2009-02-07 02:43:10 -08:00
Alexander Duyck
eebbbdba5e igb: cleanup igb_netpoll to be more friendly with napi & GRO
This patch cleans up igb_netpoll so that it is more friendly with both the
current napi and newly introduced GRO features.

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>
2009-02-07 02:43:09 -08:00
Alexander Duyck
dda0e0834c igb: add counter for dma out of sync errors
Add a counter for dma out of sync errors reported via interrupt.

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>
2009-02-07 02:43:08 -08:00
Alexander Duyck
2753f4cebf igb: update testing done by ethtool
Most of the code for the testing has pretty much become stale at this point
and is need of update.  This update just streamlines most of the code,
widens the range of interrupt testing.

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>
2009-02-07 02:43:08 -08:00
Alexander Duyck
7d8eb29e6e igb: update feature flags supported in ethtool
This driver is currently using HW_CSUM which is not correct.  Update this
to use the IP_CSUM and IPV6_CSUM flags.  In addition consolidate the TSO
flag setting.

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>
2009-02-07 02:43:07 -08:00
Alexander Duyck
0fbe67af3e igb: remove unused rx_hdr_split statistic
This statistic is not used and so it is safe to remove

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>
2009-02-07 02:43:07 -08:00
Alexander Duyck
312c75aee7 igb: rename nvm ops
All of the nvm ops have the tag _nvm added to the end which is redundant
since all of the calls to the ops have to go through the nvm ops struct
anyway.

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>
2009-02-07 02:43:06 -08:00
Alexander Duyck
a8d2a0c27f igb: rename phy ops
This patch renames write_phy_reg to write_reg and read_phy_reg to read_reg.
It seems redundant to call out phy in an operation that is part of the
phy_ops struct.

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>
2009-02-07 02:43:05 -08:00
Alexander Duyck
40a70b3889 igb: read address from RAH/RAL instead of from EEPROM
Instead of pulling the mac address from EEPROM it is easier to pull it from
the RAL/RAH registers and then just copy it into the address structures.

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>
2009-02-07 02:43:05 -08:00
Alexander Duyck
c1889bfe68 igb: make dev_spec a union and remove dynamic allocation
This patch makes dev_spec a union and simplifies it so that it does not
require dynamic allocation and freeing in the driver.

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>
2009-02-07 02:43:04 -08:00
Alexander Duyck
4d6b725e4d igb: add link check function
Add a link check function to contain all activities related to verifying
that the link is present.  The current approach is a bit cludgy and needs
to be cleaned up.

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>
2009-02-07 02:43:04 -08:00
Alexander Duyck
aed5dec370 igb: remove check for needing an io port
Since igb supports only pci-e nics and there is no plan to support any
legacy pci parts in the driver there isn't really much need for checking to
see if an io port is needed.

In the unlikely event that we do begin supporting legacy pci parts then we
can see about adding this code back to the driver.

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>
2009-02-07 02:43:03 -08:00
Alexander Duyck
83b7180d0d igb: move initialization of number of queues into set_interrupt_capability
This patch moves the initialization of the number of queues into
set_interrupt_capability.  This allows the number of queues to increase in
the unlikely event that the system initially fails to allocate enough msi-x
interrupts, does a suspend/resume, and then can allocate enough interrupts
on resume.

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>
2009-02-07 02:43:02 -08:00
Alexander Duyck
db76176215 igb: move setting of buffsz out of repeated path in alloc_rx_buffers
buffsz is being repeatedly set when allocaing buffers.  Since this value
should only need to be set once in the function I am moving it out of the
looped portion of the 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>
2009-02-07 02:43:02 -08:00
Alexander Duyck
69d3ca5357 igb: optimize/refactor receive path
While cleaning up the skb_over panic with small frames I found there was
room for improvement in the ordering of operations within the rx receive
flow.  These changes will place the prefetch for the next descriptor to a
point earlier in the rx 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>
2009-02-07 02:43:01 -08:00
David S. Miller
0b492fce3d sunhme: Don't match PCI devices in SBUS probe.
Unfortunately, the OF device tree nodes for SBUS and PCI
hme devices have the same device node name on some systems.

So if the name of the parent node isn't 'sbus', skip it.

Based upon an excellent report and detective work by
Meelis Roos and Eric Brower.

Signed-off-by: David S. Miller <davem@davemloft.net>
Tested-by: Meelis Roos <mroos@linux.ee>
2009-02-07 02:20:25 -08:00
Peter P Waskiewicz Jr
3e450669cc ixgbe: Fix a set_num_queues() bug that can result in num_(r|t)x_queues = 0
Now that our set_num_queues() routines for each feature are re-entrant, and
can be called at any point, they shouldn't zero out the feature's indices
or mask bits.  Subsequent calls into those routines for those features can
result in zero Rx and Tx queues being assigned, causing a panic later in
driver reinitialization.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-07 02:16:59 -08:00
Ayaz Abdulla
2813ddd1bf forcedeth: bump version to 63
This patch bumps the version up to 63

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-07 00:25:18 -08:00
Ayaz Abdulla
daa91a9d24 forcedeth: recover error support
This patch adds another type of recoverable error to the driver. It also
modifies the sequence for recovery to include a mac reset and clearing
of interrupts.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-07 00:25:00 -08:00
Ayaz Abdulla
c1086cda7d forcedeth: ethtool tx csum fix
This patch fixes the ethtool tx csum "set" command. A recent patch was
submitted to remove HW_CSUM and use IP_CSUM instead. Therefore, the
corresponding ethtool command should also be modified.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-07 00:24:39 -08:00
Ayaz Abdulla
b6e4405bf7 forcedeth: msi interrupt fix
This patch fixes an issue with the suspend/resume cycle with msi
interrupts. See bugzilla number 10487 for more details. The fix is to
re-setup a private msi pci config offset field.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-07 00:24:15 -08:00
Ayaz Abdulla
cac1c52c36 forcedeth: mgmt unit interface
This patch updates the logic used to communicate with the mgmt unit. It
also adds a version check for a newer mgmt unit firmware.

* Fixed udelay to schedule_timeout_uninterruptible

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-07 00:23:57 -08:00
Ondrej Zary
152abd139c 3c509: Fix resume from hibernation for PnP mode.
From: Ondrej Zary <linux@rainbow-software.org>

last year, I posted a patch which fixed hibernation on 3c509
cards. That was back in 2.6.24. It worked fine in 2.6.25. But then I
stopped using hibernation (as it did not work with my new IT8212 RAID
controller).

Now I fixed it and noticed that 3c509 does not wake up properly
anymore (in 2.6.28) - neither in PnP nor in ISA modes. ifconfig
down/up makes the card work again in PnP mode. However, in ISA mode,
ifconfig up ends with "No such device" error.

Comparing the 3c509 driver between 2.6.25 and 2.6.28, there's only
some statistics-related change. So the cause of the problem must be
somewhere else.

This patch makes the resume work in PnP mode, but it's still not
enough for ISA mode.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-06 22:04:08 -08:00
Ilkka Virta
71822faa3b sungem: Soft lockup in sungem on Netra AC200 when switching interface up
From: Ilkka Virta <itvirta@iki.fi>

In the lockup situation the driver seems to go off in an eternal storm
of interrupts right after calling request_irq(). It doesn't actually
do anything interesting in the interrupt handler. Since connecting the link
afterwards works, something later in initialization must fix this.

Looking at gem_do_start() and gem_open(), it seems that the only thing
done while opening the device after the request_irq(), is a call to
napi_enable().

I don't know what the ordering requirements are for the
initialization, but I boldly tried to move the napi_enable() call
inside gem_do_start() before the link state is checked and interrupts
subsequently enabled, and it seems to work for me. Doesn't even break
anything too obvious...

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-06 22:00:36 -08:00
Ivan Vecera
355423d084 r8169: Don't update statistics counters when interface is down
Some Realtek chips (RTL8169sb/8110sb in my case) are unable to retrieve
ethtool statistics when the interface is down. The process stays in
endless loop in rtl8169_get_ethtool_stats. This is because these chips
need to have receiver enabled (CmdRxEnb bit in ChipCmd register) that is
cleared when the interface is going down. It's better to update statistics
only when the interface is up and otherwise return copy of statistics
grabbed when the interface was up (in rtl8169_close).

It is interesting that PCI-E NICs (like 8168b/8111b...) are not affected.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-06 21:49:57 -08:00
Peter P Waskiewicz Jr
12207e498b ixgbe: Defeature Tx Head writeback
Tx Head writeback is causing multi-microsecond stalls on PCIe chipsets, due
to partial cacheline writebacks.  Removing this feature removes these
issues.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-06 21:47:24 -08:00
Peter P Waskiewicz Jr
0ecc061d19 ixgbe: Update flow control state machine in link setup
The flow control handling is overly complicated and difficult to maintain.
This patch cleans up the flow control handling and makes it much more
explicit.  It also adds 1G flow control autonegotiation, for 1G copper
links, 1G KX links, and 1G fiber links.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-06 21:46:54 -08:00
Yinghai Lu
394827913e forcedeth: enable msix to default
Impact: change default

msix and napic can work again

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-06 01:31:12 -08:00
Yinghai Lu
033e97b24a forcedeth: ck804 and mcp55 doesn't need timerirq
Impact: cleanup

so get less irq.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-06 01:30:56 -08:00
Yinghai Lu
0335ef5d59 forcedeth: disable irq at first before schedule rx
Impact: clean up

schedule it later after disable it.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-06 01:30:36 -08:00
Yinghai Lu
79d30a581f forcedeth: don't clear nic_poll_irq too early
Impact: fix bug

for msix, we still need that flag to enable irq respectively

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-06 01:30:01 -08:00
Yinghai Lu
ddb213f076 forcedeth: make msi-x different name for rx-tx
Impact: make /proc/interrupts could show more info which irq is rx or other for msi-x

add three name fields for rx, tx, other

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-06 01:29:23 -08:00
Alex Chiang
612e244c12 e1000e: normalize usage of serdes_has_link
Cosmetic change to use struct e1000_mac_info.serdes_has_link
consistently as the 'bool' that it's declared as.

No functional change.

Signed-off-by: Alex Chiang <achiang@hp.com>
Acked-by: Jeff Kirsher <Jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-05 23:55:45 -08:00
Peter P Waskiewicz Jr
34b0368c68 ixgbe: Display EEPROM version in ethtool -i queries
Currently ixgbe does not display the EEPROM version in ethtool -i, where
other drivers do.  The EEPROM version is located at offset 0x29.  This
patch adds support to display it.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-05 23:54:42 -08:00
Peter P Waskiewicz Jr
3201d3130e ixgbe: Update link setup code to better support autonegotiation of speed
The current code has some flaws in it when performing autonegotiation,
especially on KX/KX4 links.  This patch updates the code to better handle
the autonegotiation states on link setup.  The patch also removes a redundant
link configuration call on driver load, and moves link configuration to
the ->open() path.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-05 23:54:21 -08:00
Peter P Waskiewicz Jr
bc97114d3f ixgbe: Refactor set_num_queues() and cache_ring_register()
The current code to determine the number of queues the device will want
on driver initialization is ugly and difficult to maintain.  It also
doesn't allow for easy expansion for future features or future hardware.
This patch refactors these routines, and make them easier to deal with.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-05 23:53:59 -08:00
Herbert Xu
33dccbb050 tun: Limit amount of queued packets per device
Unlike a normal socket path, the tuntap device send path does
not have any accounting.  This means that the user-space sender
may be able to pin down arbitrary amounts of kernel memory by
continuing to send data to an end-point that is congested.

Even when this isn't an issue because of limited queueing at
most end points, this can also be a problem because its only
response to congestion is packet loss.  That is, when those
local queues at the end-point fills up, the tuntap device will
start wasting system time because it will continue to send
data there which simply gets dropped straight away.

Of course one could argue that everybody should do congestion
control end-to-end, unfortunately there are people in this world
still hooked on UDP, and they don't appear to be going away
anywhere fast.  In fact, we've always helped them by performing
accounting in our UDP code, the sole purpose of which is to
provide congestion feedback other than through packet loss.

This patch attempts to apply the same bandaid to the tuntap device.
It creates a pseudo-socket object which is used to account our
packets just as a normal socket does for UDP.  Of course things
are a little complex because we're actually reinjecting traffic
back into the stack rather than out of the stack.

The stack complexities however should have been resolved by preceding
patches.  So this one can simply start using skb_set_owner_w.

For now the accounting is essentially disabled by default for
backwards compatibility.  In particular, we set the cap to INT_MAX.
This is so that existing applications don't get confused by the
sudden arrival EAGAIN errors.

In future we may wish (or be forced to) do this by default.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-05 21:25:32 -08:00
David S. Miller
12402b5b7a Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2009-02-05 15:08:11 -08:00
David S. Miller
7870389478 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-02-04 16:52:41 -08:00
David S. Miller
005c79b3d4 Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ 2009-02-04 16:51:58 -08:00