GitHub/LineageOS/android_kernel_samsung_universal7580.git
16 years agomac80211/cfg80211: check endianness in sparse runs
Johannes Berg [Tue, 9 Dec 2008 11:39:52 +0000 (12:39 +0100)]
mac80211/cfg80211: check endianness in sparse runs

Make sure sparse checks endianness when run on mac80211/cfg80211.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: remove fragmentation offload functionality
Johannes Berg [Tue, 9 Dec 2008 11:30:03 +0000 (12:30 +0100)]
mac80211: remove fragmentation offload functionality

There's no driver that actually does fragmentation on the
device, and the callback is buggy (when it returns an error,
mac80211's fragmentation status is changed so reading the
frag threshold from userspace reads the new value despite
the error). Let's just remove it, if we really find some
hardware supporting it we can add it back later.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: remove fragmentation workaround again
Johannes Berg [Tue, 9 Dec 2008 11:26:14 +0000 (12:26 +0100)]
ath9k: remove fragmentation workaround again

Looking at the RC algorithm this is no longer necessary.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: fix build error (iwl-rx.c).
Rami Rosen [Tue, 9 Dec 2008 06:37:28 +0000 (08:37 +0200)]
iwlwifi: fix build error (iwl-rx.c).

This patch adds #ifdef CONFIG_IWLWIFI_DEBUG in iwl_rx_reply_rx()
method in iwlwifi/iwl-rx.c) to avoid build error  caused by "iwlwifi:
implement iwl_debug_report_frame for iwlagn".

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: only create default STA interface if supported
Johannes Berg [Mon, 8 Dec 2008 23:10:30 +0000 (00:10 +0100)]
mac80211: only create default STA interface if supported

Drivers will support this, obviously, but this forces them to
set it up properly.

(This includes the fix posted as "mac80211: fix ifmodes check" and
tested in wireless-testing by Hin-Tak and others. -- JWL)

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoieee80211_security: correct warning about width of auth_mode
John W. Linville [Mon, 8 Dec 2008 19:51:41 +0000 (14:51 -0500)]
ieee80211_security: correct warning about width of auth_mode

Also remove auth_algo which is unused.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: avoid rx frames with corrupted descriptor.
Senthil Balasubramanian [Mon, 8 Dec 2008 14:13:50 +0000 (19:43 +0530)]
ath9k: avoid rx frames with corrupted descriptor.

Setting RX_ABORT/RX_DIS after MAC reset and clearing RX_ABORT/RX_DIS
after enbling RXE/RXDP to avoid rx frames with corrupted descriptor
status.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: Incorrect band enum causes invalid antenna configuration.
Senthil Balasubramanian [Mon, 8 Dec 2008 14:13:49 +0000 (19:43 +0530)]
ath9k: Incorrect band enum causes invalid antenna configuration.

It's a regression from the patch titled "ath9k: Use mac80211's band
macros and remove enum hal_freq_band". MAC80211 band macros can't be
mapped directly with our hal band enum.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: Adding support for Atheros AR9285 chipset.
Senthil Balasubramanian [Mon, 8 Dec 2008 14:13:48 +0000 (19:43 +0530)]
ath9k: Adding support for Atheros AR9285 chipset.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: Adding initvalues for Atheros AR9285 chipset.
Senthil Balasubramanian [Mon, 8 Dec 2008 14:13:47 +0000 (19:43 +0530)]
ath9k: Adding initvalues for Atheros AR9285 chipset.

This patch adds the initvalues required for AR9285 chipset.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: Adding AR9285 chipset register information.
Senthil Balasubramanian [Mon, 8 Dec 2008 14:13:46 +0000 (19:43 +0530)]
ath9k: Adding AR9285 chipset register information.

Adding AR9285 register information.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agocfg80211: fix nl80211 frequency handling
Johannes Berg [Mon, 8 Dec 2008 11:39:04 +0000 (12:39 +0100)]
cfg80211: fix nl80211 frequency handling

Fix two small bugs with HT frequency setting:
 * HT is accepted even when the driver is incapable
 * HT40 is accepted when the driver cannot do 40 MHz
 (both on the selected band)

Also simplify the code a little.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: improve sta_notify documentation
Johannes Berg [Mon, 8 Dec 2008 10:18:32 +0000 (11:18 +0100)]
mac80211: improve sta_notify documentation

Mention more possible STA entries and document the atomic requirement.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: Merge structures ath_atx, ath_node_aggr with ath_node
Sujith [Sun, 7 Dec 2008 16:13:36 +0000 (21:43 +0530)]
ath9k: Merge structures ath_atx, ath_node_aggr with ath_node

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: Remove remaining occurrences of CONFIG_SLOW_ANT_DIV
Sujith [Sun, 7 Dec 2008 16:13:10 +0000 (21:43 +0530)]
ath9k: Remove remaining occurrences of CONFIG_SLOW_ANT_DIV

Slow Antenna Diversity has been removed, these are remnants
of the old code.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: Add a debugfs file to show interrupt statistics
Sujith [Sun, 7 Dec 2008 16:12:44 +0000 (21:42 +0530)]
ath9k: Add a debugfs file to show interrupt statistics

Location: ath9k/<phy>/interrupt

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: Maintain rate table choice after association
Sujith [Sun, 7 Dec 2008 16:12:10 +0000 (21:42 +0530)]
ath9k: Maintain rate table choice after association

A scan run after association would change sc_curmode which is
used to get the current rate table. This patch fixes it
by removing sc_curmode and setting the rate table in usage in cur_rate_table
on association.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: Fix bug in rate table management
Sujith [Sun, 7 Dec 2008 16:11:37 +0000 (21:41 +0530)]
ath9k: Fix bug in rate table management

The proper rate table wouldn't be used if a disassoc
happens and a new attempt is made to associate using
wpa_supplicant. This patch fixes it by storing the rate
table to be used on association.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: Disable staggered Beacon frame scheduling
Jouni Malinen [Fri, 5 Dec 2008 18:43:27 +0000 (20:43 +0200)]
ath9k: Disable staggered Beacon frame scheduling

It looks like there are some issues in the current ath9k version as
far as staggered Beacon frame scheduling is concerned. This results in
Beacon frame timestamp being off by 25 milliseconds or so which can
cause issues with multicast power save buffering in AP mode. Some
client stations fail to receive multicast frames when there is this
large an offset between TBTT and actual Beacon transmission time.

Since ath9k does not yet support multiple BSSes anyway, the staggered
Beacon frame scheduling is just increasing the number of interrupts at
this point. The easiest fix for the timestamp offset is to disable
staggered Beacon frames for now. We need to redesign beacon.c anyway
when adding multi-BSS support with mac80211 since the existing code
depends on different mechanism for Beacon frame transmission.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: Free Beacon skbs in AP mode
Jouni Malinen [Fri, 5 Dec 2008 18:42:45 +0000 (20:42 +0200)]
ath9k: Free Beacon skbs in AP mode

Fix a memory leak where AP mode did not free transmitted Beacon frame
skbs.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Acked-by: Pat Erley <pat-lkml@erley.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: cleanup (remove pm_state)
Rami Rosen [Fri, 5 Dec 2008 16:16:21 +0000 (18:16 +0200)]
iwlwifi: cleanup (remove pm_state)

This patches removes unused variable (pm_state) from iwl-dev.h and
from iwl-3945.h. (wireless-testing tree)

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: use rmb/wmb to protect indirect mmio operation
Zhu, Yi [Fri, 5 Dec 2008 15:58:41 +0000 (07:58 -0800)]
iwlwifi: use rmb/wmb to protect indirect mmio operation

This patch protects iwlwifi indirect mmio operations with rmb() and
wmb(). It makes sure CPU reordering won't affect our indirect mmio
access.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: iwl_poll_{direct_}bit cleanup
Zhu, Yi [Fri, 5 Dec 2008 15:58:40 +0000 (07:58 -0800)]
iwlwifi: iwl_poll_{direct_}bit cleanup

The patch merges implementation of iwl_poll_bit() and
iwl_poll_direct_bit() by letting the latter be a special case of
the former.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: fix "MAC in deep sleep" error
Zhu, Yi [Fri, 5 Dec 2008 15:58:39 +0000 (07:58 -0800)]
iwlwifi: fix "MAC in deep sleep" error

This patch fixes the misue of CSR_GP_CNTRL with CSR_RESET address
in polling the CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY bit in
iwl4965_apm_reset(). This causes "MAC in deep sleep" error sometimes.
The patch also fixes the timeout value and the iwl_poll_bit() return
value check.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-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>
16 years agoiwlwifi: fix time interval misuse in iwl_poll_{direct_}bit
Zhu, Yi [Fri, 5 Dec 2008 15:58:38 +0000 (07:58 -0800)]
iwlwifi: fix time interval misuse in iwl_poll_{direct_}bit

The patch fixes the misuse of microsecond with millisecond in the
polling mechanism of the iwlwifi driver. The impact of this problem
is the unacceptable latency for the whole system (especially during
bringing down the wlan interface).

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-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>
16 years agoiwl3945: Fix rate scale for B-mode connection
Abbas, Mohamed [Fri, 5 Dec 2008 15:58:37 +0000 (07:58 -0800)]
iwl3945: Fix rate scale for B-mode connection

This patch make sure we use only CCK rate for B only network.
For 3945 driver, it sets REPLY_RATE_SCALE command every time
we connect to a new network. In this command we set for every
rate the number of try and next rate. The problem mac80211 reports
same mode for both B and G mode as IEEE80211_BAND_2GHZ which will cause
using invalid rate other than CCK in B only network. THis patch
on association will examine sta valid rate on association, if no
OFDM rate in valid available rates it considers it as B only mode so
we can set REPLY_RATE_SCALE command with valid B only network and only
choose CCK rate in rate scaling.

Signed-off-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>
16 years agoiwlwifi: implement iwl_debug_report_frame for iwlagn
Halperin, Daniel C [Fri, 5 Dec 2008 15:58:36 +0000 (07:58 -0800)]
iwlwifi: implement iwl_debug_report_frame for iwlagn

The old version of this code was copied from 3945 and never updated. This patch
cleans up structs that do not apply and accounts for other changes from
3945->iwlagn (e.g., PHY info can come in a separate cmd response from the
ucode.)

Signed-off-by: Daniel Halperin <daniel.c.halperin@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: remove WARN_ON() from ieee80211_hw_config
Reinette Chatre [Thu, 4 Dec 2008 22:49:08 +0000 (14:49 -0800)]
mac80211: remove WARN_ON() from ieee80211_hw_config

ieee80211_hw_config can return an error when the hardware
has rfkill enabled. A WARN_ON() is too harsh for this
failure as it is a valid scenario. Only comment this warning
as we would like to have it back when rfkill is integrated into
mac80211.

Also reintroduce propagation of error if ieee80211_hw_config fails
in ieee80211_config_beacon.

This patch partially reverts patch:
5f0387fc3337ca26f0745f945f550f0c3734960f
"mac80211: clean up ieee80211_hw_config errors"

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: Incorrect LEAP authentication algorithm identifier.
Senthil Balasubramanian [Thu, 4 Dec 2008 15:08:13 +0000 (20:38 +0530)]
wireless: Incorrect LEAP authentication algorithm identifier.

This patch fixes a regression introduced by
"wireless: avoid some net/ieee80211.h vs. linux/ieee80211.h conflicts"
LEAP authentication algorithm identifier should be 128.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agortl8187: Improve wireless statistics for RTL8187
Larry Finger [Thu, 4 Dec 2008 04:21:20 +0000 (22:21 -0600)]
rtl8187: Improve wireless statistics for RTL8187

The current wireless statistics for the RTL8187 poorly indicate the signal
strength and quality. With testing, I found that the AGC value is inversely
correlated with the strength as in the RTL8187B. By implementing a similar
calculation, much more code becomes common to the two devices.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested by: Martín Ernesto Barreyro <barreyromartin@gmail.com>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agonet: Add support for the KS8695 ethernet devices.
Daniel Silverstone [Fri, 12 Dec 2008 05:00:29 +0000 (21:00 -0800)]
net: Add support for the KS8695 ethernet devices.

Implements the KS8695 ethernet device (ks8695net).

This driver is only of use on the KS8695 which is an ARM9 based SoC. The
documentation on this SoC is sparse and poor, with barely a register
description and a rough outline of how the ethernet works, this driver was
therefore written with strong reference to the Micrel supplied Linux 2.6.9
port, and to Andrew Victor's ks8695eth driver.

Signed-off-by: Daniel Silverstone <dsilvers@simtec.co.uk>
Signed-off-by: Vincent Sanders <vince@simtec.co.uk>
Acked-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotc35815: Enable StripCRC feature
Atsushi Nemoto [Fri, 12 Dec 2008 04:58:04 +0000 (20:58 -0800)]
tc35815: Enable StripCRC feature

The chip can strip CRC automatically on receiving.  Enable it.

Also fix potential RX_BUF_SIZE calculation bug which was obscured by
alignment.  And use proper symbols (NET_IP_ALIGN, ETH_FCS_LEN, etc.)
instead of magic numbers.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosmsc9420: SMSC LAN9420 10/100 PCI ethernet adapter
Steve Glendinning [Fri, 12 Dec 2008 04:54:30 +0000 (20:54 -0800)]
smsc9420: SMSC LAN9420 10/100 PCI ethernet adapter

This patch adds a driver for the LAN9240 PCI ethernet adapter.

Changes since initial submission:
 - debug msg_level has been changed to use standard definitions
 - convert to use net_device_ops

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoigb: fixup AER with proper error handling
Jeff Kirsher [Fri, 12 Dec 2008 04:34:19 +0000 (20:34 -0800)]
igb: fixup AER with proper error handling

Based on Peter Waskiewicz patch for ixgbe.  Add error handling based on
Hemminger's recommendation.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetfilter: xt_NFLOG is dependant of nfnetlink_log
Eric Leblond [Thu, 11 Dec 2008 01:24:33 +0000 (17:24 -0800)]
netfilter: xt_NFLOG is dependant of nfnetlink_log

The patch "don't call nf_log_packet in NFLOG module" make xt_NFLOG
dependant of nfnetlink_log. This patch forces the dependencies to fix
compilation in case only xt_NFLOG compilation was asked and modifies the
help message accordingly to the change.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetns: ip6mr: enable namespace support in ipv6 multicast forwarding code
Benjamin Thery [Thu, 11 Dec 2008 00:30:15 +0000 (16:30 -0800)]
netns: ip6mr: enable namespace support in ipv6 multicast forwarding code

This last patch makes the appropriate changes to use and propagate the
network namespace where needed in IPv6 multicast forwarding code.

This consists mainly in replacing all the remaining init_net occurences
with current netns pointer retrieved from sockets, net devices or
mfc6_caches depending on the routines' contexts.

Some routines receive a new 'struct net' parameter to propagate the current
netns:
* ip6mr_get_route
* ip6mr_cache_report
* ip6mr_cache_find
* ip6mr_cache_unresolved
* mif6_add/mif6_delete
* ip6mr_mfc_add/ip6mr_mfc_delete
* ip6mr_reg_vif

All the IPv6 multicast forwarding variables moved to struct netns_ipv6 by
the previous patches are now referenced in the correct namespace.

Changelog:
==========
* Take into account the net associated to mfc6_cache when matching entries in
  mfc_unres_queue list.
* Call mroute_clean_tables() in ip6mr_net_exit() to free memory allocated
  per-namespace.
* Call dev_net_set() in ip6mr_reg_vif() to initialize dev->nd_net
  correctly.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetns: ip6mr: declare ip6mr /proc/net entries per-namespace
Benjamin Thery [Thu, 11 Dec 2008 00:29:48 +0000 (16:29 -0800)]
netns: ip6mr: declare ip6mr /proc/net entries per-namespace

Declare IPv6 multicast forwarding /proc/net entries per-namespace:
/proc/net/ip6_mr_vif
/proc/net/ip6_mr_cache

Changelog
=========
V2:
* In routine ipmr_mfc_seq_idx(), only match entries belonging to current
  netns in mfc_unres_queue list.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetns: ip6mr: declare reg_vif_num per-namespace
Benjamin Thery [Thu, 11 Dec 2008 00:29:24 +0000 (16:29 -0800)]
netns: ip6mr: declare reg_vif_num per-namespace

Preliminary work to make IPv6 multicast forwarding netns-aware.

Declare variable 'reg_vif_num' per-namespace, moves into struct netns_ipv6.

At the moment, this variable is only referenced in init_net.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetns: ip6mr: declare mroute_do_assert and mroute_do_pim per-namespace
Benjamin Thery [Thu, 11 Dec 2008 00:28:44 +0000 (16:28 -0800)]
netns: ip6mr: declare mroute_do_assert and mroute_do_pim per-namespace

Preliminary work to make IPv6 multicast forwarding netns-aware.

Declare IPv6 multicast forwarding variables 'mroute_do_assert' and
'mroute_do_pim' per-namespace in struct netns_ipv6.

At the moment, these variables are only referenced in init_net.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetns: ip6mr: declare counter cache_resolve_queue_len per-namespace
Benjamin Thery [Thu, 11 Dec 2008 00:27:21 +0000 (16:27 -0800)]
netns: ip6mr: declare counter cache_resolve_queue_len per-namespace

Preliminary work to make IPv6 multicast forwarding netns-aware.

Declare variable cache_resolve_queue_len per-namespace: moves it into
struct netns_ipv6.

This variable counts the number of unresolved cache entries queued in the
list mfc_unres_queue. This list is kept global to all netns as the number
of entries per namespace is limited to 10 (hardcoded in routine
ip6mr_cache_unresolved).
Entries belonging to different namespaces in mfc_unres_queue will be
identified by matching the mfc_net member introduced previously in
struct mfc6_cache.

Keeping this list global to all netns, also allows us to keep a single
timer (ipmr_expire_timer) to handle their expiration.
In some places cache_resolve_queue_len value was tested for arming
or deleting the timer. These tests were equivalent to testing
mfc_unres_queue value instead and are replaced in this patch.

At the moment, cache_resolve_queue_len is only referenced in init_net.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetns: ip6mr: dynamically allocate mfc6_cache_array
Benjamin Thery [Thu, 11 Dec 2008 00:24:07 +0000 (16:24 -0800)]
netns: ip6mr: dynamically allocate mfc6_cache_array

Preliminary work to make IPv6 multicast forwarding netns-aware.

Dynamically allocates IPv6 multicast forwarding cache, mfc6_cache_array,
and moves it to struct netns_ipv6.

At the moment, mfc6_cache_array is only referenced in init_net.

Replace 'ARRAY_SIZE(mfc6_cache_array)' with mfc6_cache_array size: MFC6_LINES.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetns: ip6mr: store netns in struct mfc6_cache
Benjamin Thery [Thu, 11 Dec 2008 00:22:34 +0000 (16:22 -0800)]
netns: ip6mr: store netns in struct mfc6_cache

This patch stores into struct mfc6_cache the network namespace each
mfc6_cache belongs to. The new member is mfc6_net.

mfc6_net is assigned at cache allocation and doesn't change during
the rest of the cache entry life.

This will help to retrieve the current netns around the IPv6 multicast
forwarding code.

At the moment, all mfc6_cache are allocated in init_net.

Changelog:
==========
* Use write_pnet()/read_pnet() to set and get mfc6_net.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetns: ip6mr: dynamically allocates vif6_table
Benjamin Thery [Thu, 11 Dec 2008 00:15:08 +0000 (16:15 -0800)]
netns: ip6mr: dynamically allocates vif6_table

Preliminary work to make IPv6 multicast forwarding netns-aware.

Dynamically allocates interface table vif6_table and moves it to
struct netns_ipv6, and updates MIF_EXISTS() macro.

At the moment, vif6_table is only referenced in init_net.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetns: ip6mr: allocate mroute6_socket per-namespace.
Benjamin Thery [Thu, 11 Dec 2008 00:07:08 +0000 (16:07 -0800)]
netns: ip6mr: allocate mroute6_socket per-namespace.

Preliminary work to make IPv6 multicast forwarding netns-aware.

Make IPv6 multicast forwarding mroute6_socket per-namespace,
moves it into struct netns_ipv6.

At the moment, mroute6_socket is only referenced in init_net.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: Make static
Roel Kluin [Wed, 10 Dec 2008 23:18:31 +0000 (15:18 -0800)]
net: Make static

Sparse asked whether these could be static.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosmsc911x: add dynamic bus configuration
Steve Glendinning [Wed, 5 Nov 2008 00:35:38 +0000 (00:35 +0000)]
smsc911x: add dynamic bus configuration

Convert the driver to select 16-bit or 32-bit bus access at runtime,
at a small performance cost.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoixgbe: Implement PCIe AER support
Peter P Waskiewicz Jr [Wed, 10 Dec 2008 09:13:08 +0000 (01:13 -0800)]
ixgbe: Implement PCIe AER support

This patch implements the PCIe Advanced Error Reporting callbacks in
ixgbe.  The 82598 hardware supports AER, so we enable 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>
16 years agoigb: Correctly determine pci-e function number in virtual environment
Alexander Duyck [Wed, 10 Dec 2008 09:09:53 +0000 (01:09 -0800)]
igb: Correctly determine pci-e function number in virtual environment

When running in a virtual environment the ports of an 82575/6 can appear to
be single function devices which is not correct.  To resolve this we rely
on the function number stored in the status 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>
16 years agoigb: update handling of RCTL for smaller buffer sizes
Alexander Duyck [Wed, 10 Dec 2008 09:08:59 +0000 (01:08 -0800)]
igb: update handling of RCTL for smaller buffer sizes

As we begin to move into virtualization the use of a global value for
buffer sizes becomes undesirable.  This change makes it so only 256 and 512
byte buffers require use of the RCTL 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>
16 years agobonding: turn all bond_parm_tbls const
Holger Eitzenberger [Wed, 10 Dec 2008 07:10:38 +0000 (23:10 -0800)]
bonding: turn all bond_parm_tbls const

Turn all bond_parm_tbls const.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobonding: make tbl argument to bond_parse_parm() const
Holger Eitzenberger [Wed, 10 Dec 2008 07:10:17 +0000 (23:10 -0800)]
bonding: make tbl argument to bond_parse_parm() const

bond_parse_parm() parses a parameter table for a particular value and
is therefore not modifying the table at all.  Therefore make the 2nd
argument const, thus allowing to make the tables const later.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobonding: remove duplicate declarations
Holger Eitzenberger [Wed, 10 Dec 2008 07:09:49 +0000 (23:09 -0800)]
bonding: remove duplicate declarations

Remove some declarations from bonding.c as they are declared in bonding.h
already.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobonding: use pr_debug instead of own macros
Holger Eitzenberger [Wed, 10 Dec 2008 07:09:22 +0000 (23:09 -0800)]
bonding: use pr_debug instead of own macros

Use pr_debug() instead of own macros.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobonding: fix compile error if debug enabled
Holger Eitzenberger [Wed, 10 Dec 2008 07:08:55 +0000 (23:08 -0800)]
bonding: fix compile error if debug enabled

This is what I get if debug is enabled:

drivers/net/bonding/bond_ipv6.c: In function 'bond_na_send':
drivers/net/bonding/bond_ipv6.c:75: error: 'slave' undeclared (first use in this function)
drivers/net/bonding/bond_ipv6.c:75: error: (Each undeclared identifier is reported only once
drivers/net/bonding/bond_ipv6.c:75: error: for each function it appears in.)

This patch fixes that.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobonding: use table for mode names
Holger Eitzenberger [Wed, 10 Dec 2008 07:08:09 +0000 (23:08 -0800)]
bonding: use table for mode names

Use a small array in bond_mode_name() for the names, thus saving some
space:

before

    text     data      bss      dec    hex filename
   57736     9372      344    67452  1077c drivers/net/bonding/bonding.ko

after
    text     data      bss      dec    hex filename
   57441     9372      344    67157  10655 drivers/net/bonding/bonding.ko

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobonding: add and use bond_is_lb()
Holger Eitzenberger [Wed, 10 Dec 2008 07:07:13 +0000 (23:07 -0800)]
bonding: add and use bond_is_lb()

Introduce and use bond_is_lb(), it is usefull to shorten the repetitive
check for either ALB or TLB mode.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agopkt_sched: sch_htb: Optimize WARN_ONs in htb_dequeue_tree() etc.
Jarek Poplawski [Wed, 10 Dec 2008 06:35:02 +0000 (22:35 -0800)]
pkt_sched: sch_htb: Optimize WARN_ONs in htb_dequeue_tree() etc.

We can skip WARN_ON() in htb_dequeue_tree() because there should be
always a similar warning from htb_lookup_leaf() earlier.

The first WARN_ON() in in htb_lookup_leaf() is changed to BUG_ON()
because most likly this should end with oops anyway.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agopkt_sched: sch_htb: Optimize htb_find_next_upper()
Jarek Poplawski [Wed, 10 Dec 2008 06:34:40 +0000 (22:34 -0800)]
pkt_sched: sch_htb: Optimize htb_find_next_upper()

htb_id_find_next_upper() is usually called to find a class with next
id after some previously removed class, so let's move a check for
equality to the end: it's the least likely here.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agophy: Add LSI ET1011C PHY driver
Chaithrika U S [Wed, 10 Dec 2008 06:21:25 +0000 (22:21 -0800)]
phy: Add LSI ET1011C PHY driver

Adds LSI ET1011C PHY driver.
This driver is used by TI DM646x EVM.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobluetooth: Fix unused var warning properly in rfcomm_sock_ioctl().
David S. Miller [Tue, 9 Dec 2008 09:04:27 +0000 (01:04 -0800)]
bluetooth: Fix unused var warning properly in rfcomm_sock_ioctl().

As Stephen Rothwell points out, we don't want 'sock' here but
rather we really do want 'sk'.

This local var is protected by all sorts of bluetooth debugging
kconfig vars, but BT_DBG() is just a straight pr_debug() call
which is unconditional.

pr_debug() evaluates it's args only if either DEBUG or
CONFIG_DYNAMIC_PRINTK_DEBUG is defined.

Solving this inside of the BT_DBG() macro is non-trivial since
it's varargs.  And these ifdefs are ugly.

So, just mark this 'sk' thing __maybe_unused and kill the ifdefs.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomyri10ge: check fragmentation in LRO get_frag_header()
Brice Goglin [Tue, 9 Dec 2008 08:14:27 +0000 (00:14 -0800)]
myri10ge: check fragmentation in LRO get_frag_header()

Add a fragmentation check to myri10ge's LRO get_frag_header() callback.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Andrew Gallatin <gallatin@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobluetooth: Fix rfcomm_sock_ioctl() build failure with debugging enabled.
David S. Miller [Tue, 9 Dec 2008 08:01:53 +0000 (00:01 -0800)]
bluetooth: Fix rfcomm_sock_ioctl() build failure with debugging enabled.

It's 'sock' not 'sk'.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agohydra: fix compilation
Alexey Dobriyan [Tue, 9 Dec 2008 07:50:18 +0000 (23:50 -0800)]
hydra: fix compilation

drivers/net/hydra.c:163: error: 'hydra_netdev_ops' undeclared (first use in this function)

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agodccp ccid-2: Phase out the use of boolean Ack Vector sysctl
Gerrit Renker [Mon, 8 Dec 2008 09:19:06 +0000 (01:19 -0800)]
dccp ccid-2: Phase out the use of boolean Ack Vector sysctl

This removes the use of the sysctl and the minisock variable for the Send Ack
Vector feature, as it now is handled fully dynamically via feature negotiation
(i.e. when CCID-2 is enabled, Ack Vectors are automatically enabled as per
 RFC 4341, 4.).

Using a sysctl in parallel to this implementation would open the door to
crashes, since much of the code relies on tests of the boolean minisock /
sysctl variable. Thus, this patch replaces all tests of type

if (dccp_msk(sk)->dccpms_send_ack_vector)
/* ... */
with
if (dp->dccps_hc_rx_ackvec != NULL)
/* ... */

The dccps_hc_rx_ackvec is allocated by the dccp_hdlr_ackvec() when feature
negotiation concluded that Ack Vectors are to be used on the half-connection.
Otherwise, it is NULL (due to dccp_init_sock/dccp_create_openreq_child),
so that the test is a valid one.

The activation handler for Ack Vectors is called as soon as the feature
negotiation has concluded at the
 * server when the Ack marking the transition RESPOND => OPEN arrives;
 * client after it has sent its ACK, marking the transition REQUEST => PARTOPEN.

Adding the sequence number of the Response packet to the Ack Vector has been
removed, since
 (a) connection establishment implies that the Response has been received;
 (b) the CCIDs only look at packets received in the (PART)OPEN state, i.e.
     this entry will always be ignored;
 (c) it can not be used for anything useful - to detect loss for instance, only
     packets received after the loss can serve as pseudo-dupacks.

There was a FIXME to change the error code when dccp_ackvec_add() fails.
I removed this after finding out that:
 * the check whether ackno < ISN is already made earlier,
 * this Response is likely the 1st packet with an Ackno that the client gets,
 * so when dccp_ackvec_add() fails, the reason is likely not a packet error.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agodccp: Remove manual influence on NDP Count feature
Gerrit Renker [Mon, 8 Dec 2008 09:18:37 +0000 (01:18 -0800)]
dccp: Remove manual influence on NDP Count feature

Updating the NDP count feature is handled automatically now:
 * for CCID-2 it is disabled, since the code does not use NDP counts;
 * for CCID-3 it is enabled, as NDP counts are used to determine loss lengths.

Allowing the user to change NDP values leads to unpredictable and failing
behaviour, since it is then possible to disable NDP counts even when they
are needed (e.g. in CCID-3).

This means that only those user settings are sensible that agree with the
values for Send NDP Count implied by the choice of CCID. But those settings
are already activated by the feature negotiation (CCID dependency tracking),
hence this form of support is redundant.

At startup the initialisation of the NDP count feature uses the default
value of 0, which is done implicitly by the zeroing-out of the socket when
it is allocated. If the choice of CCID or feature negotiation enables NDP
count, this will then be updated via the NDP activation handler.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agodccp: Remove obsolete parts of the old CCID interface
Gerrit Renker [Mon, 8 Dec 2008 09:18:05 +0000 (01:18 -0800)]
dccp: Remove obsolete parts of the old CCID interface

The TX/RX CCIDs of the minisock are now redundant: similar to the Ack Vector
case, their value equals initially that of the sysctl, but at the end of
feature negotiation may be something different.

The old interface removed by this patch thus has been replaced by the newer
interface to dynamically query the currently loaded CCIDs.

Also removed are the constructors for the TX CCID and the RX CCID, since the
switch "rx <-> non-rx" is done by the handler in minisocks.c (and the handler
is the only place in the code where CCIDs are loaded).

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agodccp: Clean up old feature-negotiation infrastructure
Gerrit Renker [Mon, 8 Dec 2008 09:17:32 +0000 (01:17 -0800)]
dccp: Clean up old feature-negotiation infrastructure

The code removed by this patch is no longer referenced or used, the added
lines update documentation and copyrights.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agodccp: Integration of dynamic feature activation - part 3 (client side)
Gerrit Renker [Mon, 8 Dec 2008 09:16:27 +0000 (01:16 -0800)]
dccp: Integration of dynamic feature activation - part 3 (client side)

This integrates feature-activation in the client:

 1. When dccp_parse_options() fails, the reset code is already set; request_sent\
    _state_process() currently overrides this with `Packet Error', which is not
    intended - changed to use the reset code supplied by dccp_parse_options().

 2. When feature negotiation fails, the socket should be marked as not usable,
    so that the application is notified that an error occurred. This is achieved
    by a new label 'unable_to_proceed': generating an error code of `Aborted',
    setting the socket state to CLOSED, returning with ECOMM in sk_err.

 3. Avoids parsing the Ack twice in Respond state by not doing option processing
    again in dccp_rcv_respond_partopen_state_process (as option processing has
    already been done on the request_sock in dccp_check_req).

Since this addresses congestion-control initialisation, a corresponding
FIXME has been removed.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agodccp: Integration of dynamic feature activation - part 2 (server side)
Gerrit Renker [Mon, 8 Dec 2008 09:15:55 +0000 (01:15 -0800)]
dccp: Integration of dynamic feature activation - part 2 (server side)

This patch integrates the activation of features at the end of negotiation
into the server-side code.

Note regarding the removal of 'const':
--------------------------------------
 The 'const' attribute has been removed from 'dreq' since dccp_activate_values()
 needs to operate on dreq's feature list. Part of the activation is to remove
 those options from the list that have already been confirmed, hence it is not
 purely read-only.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agodccp: Integration of dynamic feature activation - part 1 (socket setup)
Gerrit Renker [Mon, 8 Dec 2008 09:15:26 +0000 (01:15 -0800)]
dccp: Integration of dynamic feature activation - part 1 (socket setup)

This first patch out of three replaces the hardcoded default settings with
initialisation code for the dynamic feature negotiation.

The patch also ensures that the client feature-negotiation queue is flushed
only when entering the OPEN state.

Since confirmed Change options are removed as soon as they are confirmed
(in the DCCP-Response), this ensures that Confirm options are retransmitted.

Note on retransmitting Confirm options:
---------------------------------------
Implementation experience showed that it is necessary to retransmit Confirm
options. Thanks to Leandro Melo de Sales who reported a bug in an earlier
revision of the patch set, resulting from not retransmitting these options.

As long as the client is in PARTOPEN, it needs to retransmit the Confirm
options for the Change options received on the DCCP-Response from the server.

Otherwise, if the packet containing the Confirm options gets dropped in the
network, the connection aborts due to undefined feature negotiation state.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetdevice: Kill netdev->priv
Wang Chen [Mon, 8 Dec 2008 09:14:16 +0000 (01:14 -0800)]
netdevice: Kill netdev->priv

This is the last shoot of this series.
After I removing all directly reference of netdev->priv, I am killing
"priv" of "struct net_device" and fixing relative comments/docs.

Anyone will not be allowed to reference netdev->priv directly.
If you want to reference the memory of private data, use netdev_priv()
instead.
If the private data is not allocted when alloc_netdev(), use
netdev->ml_priv to point that memory after you creating that private
data.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agostaging-winbond: Kill directly reference of netdev->priv
Wang Chen [Mon, 8 Dec 2008 09:13:25 +0000 (01:13 -0800)]
staging-winbond: Kill directly reference of netdev->priv

This driver is not yet finished.
At this time, we don't know how netdev be created and how
private data be allocated.
So, simply use netdev_priv() now and leave some temp comment.

Compile test only.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agostaging-slicoss: Kill directly reference of netdev->priv
Wang Chen [Sun, 7 Dec 2008 07:59:10 +0000 (23:59 -0800)]
staging-slicoss: Kill directly reference of netdev->priv

Simply replace netdev->priv with netdev_priv().

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agostaging-p80211: Kill directly reference of netdev->priv
Wang Chen [Sun, 7 Dec 2008 07:58:37 +0000 (23:58 -0800)]
staging-p80211: Kill directly reference of netdev->priv

In this driver, netdev's private data is wlandevice_t.  And the
wlandev(type of wlandevice_t) is exist before netdev be allocated.  So
use netdev->ml_priv to point to the private data.

I am not sure whether I should consider the kernel version older than
2.3.38.  Because in those kernels, netdevice_t is "structure dev"
instead of "structure net_device" and of course "dev->ml_priv" will
cause compile error.  But before my patch, in function wlan_setup(),
there is a ether_setup(net_device) which already broke kernels which
older than 2.3.38.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agos390_net: Kill directly reference of netdev->priv
Wang Chen [Sun, 7 Dec 2008 07:57:49 +0000 (23:57 -0800)]
s390_net: Kill directly reference of netdev->priv

The private data comes from ccwgroup_device.
So just don't allocate private data memory when do alloc_netdev()
and use netdev->ml_priv to reference private data.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: Fix incorrect use of loose in spider_net.c
Nick Andrew [Sun, 7 Dec 2008 07:57:14 +0000 (23:57 -0800)]
net: Fix incorrect use of loose in spider_net.c

Fix incorrect use of loose in spider_net.c

It should be 'lose', not 'loose'.

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agowireless: Fix incorrect use of loose in wext.c
Nick Andrew [Sun, 7 Dec 2008 07:55:32 +0000 (23:55 -0800)]
wireless: Fix incorrect use of loose in wext.c

Fix incorrect use of loose in wext.c

It should be 'lose', not 'loose'.

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: fix tso_should_defer in 64bit
Ilpo Järvinen [Sat, 6 Dec 2008 06:49:37 +0000 (22:49 -0800)]
tcp: fix tso_should_defer in 64bit

Since jiffies is unsigned long, the types get expanded into
that and after long enough time the difference will therefore
always be > 1 (and that probably happens near boot as well as
iirc the first jiffies wrap is scheduler close after boot to
find out problems related to that early).

This was originally noted by Bill Fink in Dec'07 but nobody
never ended fixing it.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: use tcp_write_xmit also in tcp_push_one
Ilpo Järvinen [Sat, 6 Dec 2008 06:48:55 +0000 (22:48 -0800)]
tcp: use tcp_write_xmit also in tcp_push_one

tcp_minshall_update is not significant difference since it only
checks for not full-sized skb which is BUG'ed on the push_one
path anyway.

tcp_snd_test is tcp_nagle_test+tcp_cwnd_test+tcp_snd_wnd_test,
just the order changed slightly.

net/ipv4/tcp_output.c:
  tcp_snd_test              |  -89
  tcp_mss_split_point       |  -91
  tcp_may_send_now          |  +53
  tcp_cwnd_validate         |  -98
  tso_fragment              | -239
  __tcp_push_pending_frames | -1340
  tcp_push_one              | -146
 7 functions changed, 53 bytes added, 2003 bytes removed, diff: -1950

net/ipv4/tcp_output.c:
  tcp_write_xmit | +1772
 1 function changed, 1772 bytes added, diff: +1772

tcp_output.o.new:
 8 functions changed, 1825 bytes added, 2003 bytes removed, diff: -178

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Sat, 6 Dec 2008 06:54:40 +0000 (22:54 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:

drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-sta.c

16 years agotcp: move some parts from tcp_write_xmit
Ilpo Järvinen [Sat, 6 Dec 2008 06:43:56 +0000 (22:43 -0800)]
tcp: move some parts from tcp_write_xmit

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: share code through function, not through copy-paste. :-)
Ilpo Järvinen [Sat, 6 Dec 2008 06:43:26 +0000 (22:43 -0800)]
tcp: share code through function, not through copy-paste. :-)

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: drop tcp_bound_rto, merge content of it tcp_set_rto
Ilpo Järvinen [Sat, 6 Dec 2008 06:43:08 +0000 (22:43 -0800)]
tcp: drop tcp_bound_rto, merge content of it tcp_set_rto

Both are called by the same sites.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: no need to pass prev skb around, reduces arg pressure
Ilpo Järvinen [Sat, 6 Dec 2008 06:42:41 +0000 (22:42 -0800)]
tcp: no need to pass prev skb around, reduces arg pressure

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: introduce struct tcp_sacktag_state to reduce arg pressure
Ilpo Järvinen [Sat, 6 Dec 2008 06:42:22 +0000 (22:42 -0800)]
tcp: introduce struct tcp_sacktag_state to reduce arg pressure

There are just too many args to some sacktag functions. This
idea was first proposed by David S. Miller around a year ago,
and the current situation is much worse that what it was back
then.

tcp_sacktag_one can be made a bit simpler by returning the
new sacked (it can be achieved with a single variable though
the previous code "caching" sacked into a local variable and
therefore it is not exactly equal but the results will be the
same).

codiff on x86_64
  tcp_sacktag_one         |  -15
  tcp_shifted_skb         |  -50
  tcp_match_skb_to_sack   |   -1
  tcp_sacktag_walk        |  -64
  tcp_sacktag_write_queue |  -59
  tcp_urg                 |   +1
  tcp_event_data_recv     |   -1
 7 functions changed, 1 bytes added, 190 bytes removed, diff: -189

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: make mtu probe failure to not break gso'ed skbs unnecessarily
Ilpo Järvinen [Sat, 6 Dec 2008 06:41:26 +0000 (22:41 -0800)]
tcp: make mtu probe failure to not break gso'ed skbs unnecessarily

I noticed that since skb->len has nothing to do with actual segment
length with gso, we need to figure it out separately, reuse
a function from the recent shifting stuff (generalize it).

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: Fix thinko making the not-shiftable to cover S|R as well
Ilpo Järvinen [Sat, 6 Dec 2008 06:41:06 +0000 (22:41 -0800)]
tcp: Fix thinko making the not-shiftable to cover S|R as well

S|R won't result in S if just SACK is received. DSACK is
another story (but it is covered correctly already).

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: force mss equality with the next skb too.
Ilpo Järvinen [Sat, 6 Dec 2008 06:40:47 +0000 (22:40 -0800)]
tcp: force mss equality with the next skb too.

Also make if-goto forest nicer looking.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agodccp: use roundup instead of opencoding
Ilpo Järvinen [Sat, 6 Dec 2008 06:39:49 +0000 (22:39 -0800)]
dccp: use roundup instead of opencoding

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotty: driverdata and discdata are void *
Alan Cox [Sat, 6 Dec 2008 06:32:22 +0000 (22:32 -0800)]
tty: driverdata and discdata are void *

Remove all the extra casting while we are cleaning up

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotty: Flags should be accessed via the foo_bit interfaces
Alan Cox [Sat, 6 Dec 2008 06:31:52 +0000 (22:31 -0800)]
tty: Flags should be accessed via the foo_bit interfaces

We have various drivers that poke around directly and we need to clean this
up before it causes problems.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Sat, 6 Dec 2008 06:23:34 +0000 (22:23 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6

16 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Sat, 6 Dec 2008 06:09:56 +0000 (22:09 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

16 years agoigb/e1000e: Naming interrupt vectors
Alexander Duyck [Fri, 5 Dec 2008 23:08:03 +0000 (15:08 -0800)]
igb/e1000e: Naming interrupt vectors

Change interrupt vector naming to match recent changes from Robert Olsson.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoath9k: Use GFP_ATOMIC when allocating TX private area
Luis R. Rodriguez [Wed, 3 Dec 2008 11:35:30 +0000 (03:35 -0800)]
ath9k: Use GFP_ATOMIC when allocating TX private area

Using GFP_KERNEL was wrong and produces a 'scheduling while atomic'
bug as we're in a tasklet. Also, check for proper return values
now, in case allocation fails and be sure to stop the TX queue
in case of memory issues but gaurantee the TX queue will
eventually be woken up.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: Check for pci_map_single() errors
Luis R. Rodriguez [Wed, 3 Dec 2008 11:35:29 +0000 (03:35 -0800)]
ath9k: Check for pci_map_single() errors

pci_map_single() can fail so detect those errors with
pci_dma_mapping_error() and deal with them accordingly.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Correctly initialize AID during set_key()
Ivo van Doorn [Wed, 3 Dec 2008 16:30:22 +0000 (17:30 +0100)]
rt2x00: Correctly initialize AID during set_key()

Request the AID from hardware and provide this id
to the driver (in case they need it).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Move crypto TX descriptor handling to rt2x00crypto.c
Ivo van Doorn [Wed, 3 Dec 2008 16:29:48 +0000 (17:29 +0100)]
rt2x00: Move crypto TX descriptor handling to rt2x00crypto.c

Move all code which determines the right TX descriptor
fields specific to crypto support into rt2x00crypto.c.
This makes the code in rt2x00queue more simpler and
better concentrates all crypto code into a single location.

With this we can also remove some ifdefs in rt2x00queue.c
since the code inside the ifdef is either very small, or
only calling empty functions (see empty function definitions
in rt2x00lib.h).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Fix check for BSS info changes
Ivo van Doorn [Wed, 3 Dec 2008 16:29:21 +0000 (17:29 +0100)]
rt2x00: Fix check for BSS info changes

Fix ERP configuration, due to a too strict changes
flags checking we never updated the short slot time
or basic rate mask when no other changes were made
at the same time.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agogeneric swap(): ath9k: rename swap() to swap_array()
Wu Fengguang [Wed, 3 Dec 2008 08:19:04 +0000 (00:19 -0800)]
generic swap(): ath9k: rename swap() to swap_array()

In preparation for the introduction of a generic swap() macro.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Cc: Senthil Balasubramanian <senthilkumar@atheros.com>
Cc: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>