Commit Graph

131673 Commits (849b7967818995a32c3017542e33eb3155944368)

Author SHA1 Message Date
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
Luis R. Rodriguez f130347c2d cfg80211: add get reg command
This lets userspace request to get the currently set
regulatory domain.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:45 -05:00
Luis R. Rodriguez 47f4d8872f mac80211: do not TX injected frames when not allowed
Monitor mode is able to TX by using injected frames. We should
not allow injected frames to be sent unless allowed by regulatory
rules. Since AP mode uses a monitor interfaces to transmit
management frames we have to take care to not break AP mode as
well while resolving this. We can deal with this by allowing compliant
APs solutions to inform mac80211 if their monitor interface is
intended to be used for an AP by setting a cfg80211 flag for the
monitor interface. hostapd, for example, currently does its own
checks to ensure AP mode is not used on channels which require radar
detection. Once such solutions are available it can can add this
flag for monitor interfaces.

Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:45 -05:00
Johannes Berg 7230645e32 mac80211: convert master interface to netdev_ops
Also call our own ieee80211_master_setup routine instead of
overwriting almost all the values from ether_setup; this
loses a few assignments that are pointless on the master
interface anyway.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:45 -05:00
Johannes Berg 587e729ecf mac80211: convert to net_device_ops
Convert to new net_device_ops in 2.6.28 and later.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:44 -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
Alina Friedrichsen c4e3a58448 mac80211: IBSS join rework
I hold back this patch for around a week to avoid
confusion. This is the second step of
"mac80211: Fixed BSSID handling revisited".

With it, in the situation of a strange merge to the
same BSSID (e.g. caused by a TSF overflow) only
reset_tsf() is called.

And sta_info_flush_delayed() is only called if you
change the network manually, not on an automatic
BSSID merge.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:40 -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
Alina Friedrichsen c0415b547d mac80211: Creating new IBSS with fixed BSSID
This fixes a bug when creating a new IBSS network with a
fixed BSSID. The fixed BSSID situation is now with one of
my last patches handled in ieee80211_sta_find_ibss()
function.

It's more robust to test against
(ifsta->flags & IEEE80211_STA_PREV_BSSID_SET), because
ifsta->state is not seted right in every situation and so
the creating of the new IBSS network sometimes hangs after
the first try to scan for a network to merge.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:39 -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
Sujith e374055afb mac80211: Reset assoc_scan_tries after an unsuccessful scan run
Trying to associate with a non-existent SSID stops the
state machine after the first run. Subsequent association
requests fail to start the scan engine. Fix this by resetting
assoc_scan_tries to zero after completing a scan run.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09 15:03:38 -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
Herbert Xu aa6320d336 gro: Optimise TCP packet reception
gro: Optimise TCP packet reception

As this function can be called more than half a million times for
10GbE, it's important to optimise it as much as we can.

This patch uses bit ops to logical ops, as well as open coding
memcmp to exploit alignment properties.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-08 20:22:19 -08:00
Herbert Xu a5ad24be72 gro: Optimise IPv4 packet reception
As this function can be called more than half a million times for
10GbE, it's important to optimise it as much as we can.

This patch does some obvious changes to use 2-byte and 4-byte
operations instead of byte-oriented ones where possible.  Bit
ops are also used to replace logical ops to reduce branching.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-08 20:22:19 -08:00
Herbert Xu aa4b9f533e gro: Optimise Ethernet header comparison
This patch optimises the Ethernet header comparison to use 2-byte
and 4-byte xors instead of memcmp.  In order to facilitate this,
the actual comparison is now carried out by the callers of the
shared dev_gro_receive function.

This has a significant impact when receiving 1500B packets through
10GbE.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-08 20:22:18 -08:00
Herbert Xu 4ae5544f9a gro: Remember number of held packets instead of counting every time
This patch prepares for the move of the same_flow checks out of
dev_gro_receive.  As such we need to remember the number of held
packets since doing a loop just to count them every time is silly.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-08 20:22:17 -08:00
David S. Miller d6301d3dd1 net: Increase default NET_SKB_PAD to 32.
Several devices need to insert some "pre headers" in front of the
main packet data when they transmit a packet.

Currently we allocate only 16 bytes of pad room and this ends up not
being enough for some types of hardware (NIU, usb-net, s390 qeth,
etc.)

So increase this to 32.

Note that drivers still need to check in their transmit routine
whether enough headroom exists, and if not use skb_realloc_headroom().
Tunneling, IPSEC, and other encapsulation methods can cause the
padding area to be used up.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-08 19:24:13 -08: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