]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
15 years agotcp: remove parameter from tcp_recv_urg().
Rami Rosen [Thu, 19 Mar 2009 01:50:09 +0000 (18:50 -0700)]
tcp: remove parameter from tcp_recv_urg().

This patch removes an unused parameter (addr_len) from tcp_recv_urg()
method in net/ipv4/tcp.c.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: Fix incorrect disable_ipv6 behavior
Brian Haley [Thu, 19 Mar 2009 01:22:48 +0000 (18:22 -0700)]
ipv6: Fix incorrect disable_ipv6 behavior

Fix the behavior of allowing both sysctl and addrconf_dad_failure()
to set the disable_ipv6 parameter without any bad side-effects.
If DAD fails and accept_dad > 1, we will still set disable_ipv6=1,
but then instead of allowing an RA to add an address then
immediately fail DAD, we simply don't allow the address to be
added in the first place.  This also lets the user set this flag
and disable all IPv6 addresses on the interface, or on the entire
system.

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoa2065: skb_padto cleanups
Dave Jones [Thu, 19 Mar 2009 01:17:48 +0000 (18:17 -0700)]
a2065: skb_padto cleanups

Remove unnecessary check (skb_padto does the same check)
Remove unnecessary duplicate variable
Remove unnecessary clearing of padded part of skb.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Tue, 17 Mar 2009 22:04:31 +0000 (15:04 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6

15 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Tue, 17 Mar 2009 22:01:30 +0000 (15:01 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/igb/igb_main.c
drivers/net/qlge/qlge_main.c
drivers/net/wireless/ath9k/ath9k.h
drivers/net/wireless/ath9k/core.h
drivers/net/wireless/ath9k/hw.c

15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Tue, 17 Mar 2009 21:29:22 +0000 (14:29 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

15 years agonetxen: fix firmware download warnings
Dhananjay Phadke [Tue, 17 Mar 2009 20:14:22 +0000 (13:14 -0700)]
netxen: fix firmware download warnings

Fix following warnings, by using integer firmware types.

drivers/net/netxen/netxen_nic_hw.c: In function 'netxen_load_firmware':
drivers/net/netxen/netxen_nic_hw.c:1146: warning: comparison with string literal results in unspecified behavior
drivers/net/netxen/netxen_nic_hw.c:1146: warning: comparison with string literal results in unspecified behavior
drivers/net/netxen/netxen_nic_hw.c:1146: warning: comparison with string literal results in unspecified behavior
drivers/net/netxen/netxen_nic_hw.c:1159: warning: comparison with string literal results in unspecified behavior
drivers/net/netxen/netxen_nic_hw.c:1159: warning: comparison with string literal results in unspecified behavior
drivers/net/netxen/netxen_nic_hw.c:1159: warning: comparison with string literal results in unspecified behavior

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
David S. Miller [Tue, 17 Mar 2009 20:12:47 +0000 (13:12 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6

15 years agogro: Fix legacy path napi_complete crash
Herbert Xu [Tue, 17 Mar 2009 20:11:29 +0000 (13:11 -0700)]
gro: Fix legacy path napi_complete crash

On the legacy netif_rx path, I incorrectly tried to optimise
the napi_complete call by using __napi_complete before we reenable
IRQs.  This simply doesn't work since we need to flush the held
GRO packets first.

This patch fixes it by doing the obvious thing of reenabling
IRQs first and then calling napi_complete.

Reported-by: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogro: Fix vlan/netpoll check again
Herbert Xu [Tue, 17 Mar 2009 20:10:52 +0000 (13:10 -0700)]
gro: Fix vlan/netpoll check again

Jarek Poplawski pointed out that my previous fix is broken for
VLAN+netpoll as if netpoll is enabled we'd end up in the normal
receive path instead of the VLAN receive path.

This patch fixes it by calling the VLAN receive hook.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoiwlwifi: correct log level when error occurs
Reinette Chatre [Wed, 11 Mar 2009 18:18:01 +0000 (11:18 -0700)]
iwlwifi: correct log level when error occurs

user needs to see this message even if debugging disabled

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: print contents of control register when error occurs
Reinette Chatre [Wed, 11 Mar 2009 18:18:00 +0000 (11:18 -0700)]
iwlwifi: print contents of control register when error occurs

hopefully the register contents will guide us to why this failure occured

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlagn: fix warning when set WEP key
Mohamed Abbas [Wed, 11 Mar 2009 18:17:59 +0000 (11:17 -0700)]
iwlagn: fix warning when set WEP key

iwl_clear_station_table will be called every time rxon called.
In this function ucode_key_table is set to 0 even though a static
WEP security is set. This will cause in many warning and might be
an issue if dynamic WEP is set. This patch make sure we keep track
of all existing static WEP when this function is called.

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>
15 years agoiwl3945: unmap previously mapped memory
Reinette Chatre [Wed, 11 Mar 2009 18:17:58 +0000 (11:17 -0700)]
iwl3945: unmap previously mapped memory

During preparation of TX we create DMA mapping to TX command as part of
preparing the TFD. This mapping needs to be cleared at the time TFD is
freed.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: use iwl_tx_cmd_complete
Abhijeet Kolekar [Wed, 11 Mar 2009 18:17:57 +0000 (11:17 -0700)]
iwl3945: use iwl_tx_cmd_complete

iwl3945 uses iwl_tx_cmd_complete to reclaim the unused buffers of the queue.
iwl_tx_cmd_complete in turn call the iwl_hcmd_queue_reclaim which will
unmap the dma mapping to tx_cmd and frees the memory.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945 : fix rate scaling
Abhijeet Kolekar [Wed, 11 Mar 2009 18:17:56 +0000 (11:17 -0700)]
iwl3945 : fix rate scaling

Patch fixes the bug 1900 at
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1900

Issues:
Throughput and success ratio calculations were not done properly.
Number of retries were exceeding 16.

Fix:
Patch fixes above issues by doing window calculations inline with iwlwifi
Patch adds sanity check to limit number of retries to 16.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@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>
15 years agoiwl3945: use iwl_led structure
Abhijeet Kolekar [Wed, 11 Mar 2009 18:17:55 +0000 (11:17 -0700)]
iwl3945: use iwl_led structure

3945 can now use iwl_led's structure from iwlwifi.
Patch also removes CONFIG_IWL3945_LEDS flag from Kconfig as 3945's led
support will now be enabled if user selects CONFIG_IWLWIFI_LEDS.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: fix sparse error
Abhijeet Kolekar [Wed, 11 Mar 2009 18:17:54 +0000 (11:17 -0700)]
iwl3945: fix sparse error

error is:
iwl3945-base.c:545:5: warning: symbol 'iwl3945_set_dynamic_key' was not
declared. Should it be static?

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: verify the antenna selection when receive fixed rate debugfs
Wey-Yi Guy [Tue, 10 Mar 2009 21:35:12 +0000 (14:35 -0700)]
iwlwifi: verify the antenna selection when receive fixed rate debugfs

When iwlwifi driver receive fixed rate debugfs command, validate the
antenna selection, if the selection is invalid, report the valid antenna
choice and do not set the rate scale table to fixed rate. Otherwise, set
the entire rate scale table to the fixed rate request by the user. this
validation can prevent sysassert happen in uCode

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: check IEEE80211_TX_STAT_AMPDU for agg pkt
Wey-Yi Guy [Tue, 10 Mar 2009 21:35:11 +0000 (14:35 -0700)]
iwlwifi: check IEEE80211_TX_STAT_AMPDU for agg pkt

when perform rate scaling, in tx status function, checking for
IEEE80211_TX_STAT_AMPDU flag instead of IEEE_TX_CTL_AMPDU flag to perform
AMPDU rate scaling operation.

IEEE80211_TX_CTL_AMPDU was set by mac80211 for aggregation pkt. But when
iwlwifi receive the tx status reply, it reset the flag to following
info->flags = IEEE80211_TX_STAT_ACK;
info->flags |= IEEE80211_TX_STAT_AMPDU;
it causes the rate-scaling to not work for aggregation pkt if we checking
for IEEE80211_TX_CTL_AMPDU flag.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: HT performance improvement changes
Wey-Yi Guy [Tue, 10 Mar 2009 21:35:10 +0000 (14:35 -0700)]
iwlwifi: HT performance improvement changes

During rate scaling, checking for 0 retry count before decrement
the count by 1, this can avoid the retry count to become 255 (0xff),
which will cause the rate to drop faster than what we expect during good
condition (receive 0 retry packet). also change the algorithm to make
the rate not drop faster than what we like.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: remove un-necessary rs_tl_turn_on_agg() after agg enabled
Wey-Yi Guy [Tue, 10 Mar 2009 21:35:09 +0000 (14:35 -0700)]
iwlwifi: remove un-necessary rs_tl_turn_on_agg() after agg enabled

After the MLME handshaking complete and tx aggregation started for the
tid. Do not send unnecessary turn on aggregation request to mac80211.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: add rf information in rate_scale debugfs command
Wey-Yi Guy [Tue, 10 Mar 2009 21:35:08 +0000 (14:35 -0700)]
iwlwifi: add rf information in rate_scale debugfs command

Adding more Radio information when displaying
rate_scale_table. This can help to understand how many antenna and the
current RF condition such as SISO, MIMO2, MIMO3.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: add valid tx antenna information in rate_scale_table debugfs
Wey-Yi Guy [Tue, 10 Mar 2009 21:35:07 +0000 (14:35 -0700)]
iwlwifi: add valid tx antenna information in rate_scale_table debugfs

when display rate_scale_table debugfs information, also display valid tx
antenna information, this will help user to select correct antenna when
issue fixed rate debugfs command

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Acked-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoray_cs: checkpatch.pl and Lindent cleanups
John Daiker [Tue, 10 Mar 2009 13:59:54 +0000 (06:59 -0700)]
ray_cs: checkpatch.pl and Lindent cleanups

Before: 1099 errors, 93 warnings, 2854 lines checked
After:  19 errors, 47 warnings, 2976 lines checked

The big bulk of this is code indent and over 80 character lines
(Lindent did this part) Other changes are foo * bar spacing, and
trailing whitespace.

v2: Cleans up ill-indented comments.  Subsequently, this reduces the
number of warnings, too.  Thanks to Joe Perches for pointing this out!

v3: Ran the whole file through Lindent first... which does most of
the work for me. :) Again, thanks to Joe Perches for this.

This is my final answer!

Signed-off-by: John Daiker <daikerjohn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomwl8k: Marvell TOPDOG wireless driver
Lennert Buytenhek [Tue, 10 Mar 2009 09:13:33 +0000 (10:13 +0100)]
mwl8k: Marvell TOPDOG wireless driver

Add a driver for Marvell 88w8xxx TOPDOG PCI/PCIe wireless parts.
This initial version supports the 88w8687 802.11b/g PCIe part on
channels 1-11, and only STA mode is currently implemented.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Fix FIF_PROMISC_IN_BSS processing in station mode
Jouni Malinen [Tue, 10 Mar 2009 08:55:50 +0000 (10:55 +0200)]
ath9k: Fix FIF_PROMISC_IN_BSS processing in station mode

We must not disable ACK sending in this case since it would break
normal station operations. In addition, clarify the comment about AP
mode to make more sense.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Add spectrum management to HW capabilities
Sujith [Tue, 10 Mar 2009 05:09:53 +0000 (10:39 +0530)]
ath9k: Add spectrum management to HW capabilities

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: make few eeprom and calib items static
Luis R. Rodriguez [Tue, 10 Mar 2009 02:09:42 +0000 (22:09 -0400)]
ath9k: make few eeprom and calib items static

This fixes the sparse complaints:

drivers/net/wireless/ath9k/eeprom.c:1407:5: warning: symbol
'ath9k_hw_4k_get_spur_channel' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:1436:19: warning: symbol
'eep_4k_ops' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2808:5: warning: symbol
'ath9k_hw_def_get_spur_channel' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2837:19: warning: symbol
'eep_def_ops' was not declared. Should it be static?
  CC [M]  drivers/net/wireless/ath9k/eeprom.o
  CHECK   drivers/net/wireless/ath9k/mac.c
  CC [M]  drivers/net/wireless/ath9k/mac.o
  CHECK   drivers/net/wireless/ath9k/calib.c
drivers/net/wireless/ath9k/calib.c:883:6: warning: symbol 'ar9285_clc'
was not declared. Should it be static?

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: downgrade xmit queue full message to xmit debug
Luis R. Rodriguez [Tue, 10 Mar 2009 02:09:41 +0000 (22:09 -0400)]
ath9k: downgrade xmit queue full message to xmit debug

This is not a fatal message, hitting it simply means we're
going to tell the upper layers to slow their horses down but
as we make more descriptors available we let the show continue
by waking up the queues in ath_wake_mac80211_queue().

We downgrade this as otherwise we fill up your kernel log with
messages which can be common under heavy traffic.

Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211_hwsim: add regulatory testing options
Luis R. Rodriguez [Tue, 10 Mar 2009 02:08:27 +0000 (22:08 -0400)]
mac80211_hwsim: add regulatory testing options

This adds a module parameter for mac80211_hwsim regulatory testing.
This module parameter is designed specifically to help test the
different possible types of driver specific regulatory requests
and also helps to test world roaming, all without any hardware.

If you want to just simply test different alpha2s just use the userspace
regulatory request as this won't buy you anything new.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: add regulatory netlink multicast group
Luis R. Rodriguez [Tue, 10 Mar 2009 02:07:42 +0000 (22:07 -0400)]
cfg80211: add regulatory netlink multicast group

This allows us to send to userspace "regulatory" events.
For now we just send an event when we change regulatory domains.
We also notify userspace when devices are using their own custom
world roaming regulatory domains.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: move enum reg_set_by to nl80211.h
Luis R. Rodriguez [Tue, 10 Mar 2009 02:07:41 +0000 (22:07 -0400)]
cfg80211: move enum reg_set_by to nl80211.h

We do this so we can later inform userspace who set the
regulatory domain and provide details of the request.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: remove REGDOM_SET_BY_INIT
Luis R. Rodriguez [Tue, 10 Mar 2009 02:07:40 +0000 (22:07 -0400)]
cfg80211: remove REGDOM_SET_BY_INIT

This is not used as we can always just assume the first
regulatory domain set will _always_ be a static regulatory
domain. REGDOM_SET_BY_CORE will be the first request from
cfg80211 for a regdomain and that then populates the first
regulatory request.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: deauth before flushing STA information
Herton Ronaldo Krzesinski [Tue, 10 Mar 2009 13:11:09 +0000 (10:11 -0300)]
mac80211: deauth before flushing STA information

Even after commit "mac80211: deauth when interface is marked down"
(e327b847 on Linus tree), userspace still isn't notified when interface
goes down. There isn't a problem with this commit, but because of other
code changes it doesn't work on kernels >= 2.6.28 (works if same/similar
change applied on 2.6.27 for example).

The issue is as follows: after commit "mac80211: restructure disassoc/deauth
flows" in 2.6.28, the call to ieee80211_sta_deauthenticate added by
commit e327b847 will not work: because we do sta_info_flush(local, sdata)
inside ieee80211_stop (iface.c), all stations in interface are cleared, so
when calling ieee80211_sta_deauthenticate->ieee80211_set_disassoc (mlme.c),
inside ieee80211_set_disassoc we have this in the beginning:

         sta = sta_info_get(local, ifsta->bssid);
         if (!sta) {

The !sta check triggers, thus the function returns early and
ieee80211_sta_send_apinfo(sdata, ifsta) later isn't called, so
wpa_supplicant/userspace isn't notified with SIOCGIWAP.

This commit moves deauthentication to before flushing STA info
(sta_info_flush), thus the above can't happen and userspace is really
notified when interface goes down.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: handle failed scan requests in STA mode
Helmut Schaa [Mon, 9 Mar 2009 14:47:08 +0000 (15:47 +0100)]
mac80211: handle failed scan requests in STA mode

If cfg80211 requests a scan it awaits either a return code != 0 from
the scan function or the cfg80211_scan_done to be called. In case of
a STA mac80211's scan function ever returns 0 and queues the scan request.
If ieee80211_sta_work is executed and ieee80211_start_scan fails for
some reason cfg80211_scan_done will never be called but cfg80211 still
thinks the scan was triggered successfully and will refuse any future
scan requests due to drv->scan_req not being cleaned up.

If a scan is triggered from within the MLME a similar problem appears. If
ieee80211_start_scan returns an error, local->scan_req will not be reset
and mac80211 will refuse any future scan requests.

Hence, in both cases call ieee80211_scan_failed (which notifies cfg80211
and resets local->scan_req) if ieee80211_start_scan returns an error.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoatmel: checkpatch.pl cleanups
John Daiker [Mon, 9 Mar 2009 05:18:35 +0000 (22:18 -0700)]
atmel: checkpatch.pl cleanups

Before: 881 errors, 265 warnings, 4507 lines checked
After:  114 errors, 273 warnings, 4548 lines checked

This was mostly "space required after that ',' (ctx:VxV)".
Also a fair number of whitespace, code indent, and C99 comment cleanups.

New warnings introduced are all "line over 80 character"

md5sums are identical, as I skipped any fixes which may have altered the resulting binary.

Signed-off-by: John Daiker <daikerjohn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Fix bug in reading debugfs file 'rcstat'
Sujith [Mon, 9 Mar 2009 04:02:01 +0000 (09:32 +0530)]
ath9k: Fix bug in reading debugfs file 'rcstat'

The rate table would not have been chosen before the interface
has been brought up. Reading 'rcstat' in this case would result
in an oops, fix this.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Fix bug in TX aggregation
Sujith [Mon, 9 Mar 2009 04:01:57 +0000 (09:31 +0530)]
ath9k: Fix bug in TX aggregation

mac80211 expects the driver to fill in the starting
sequence number of an ADDBA request to initiate TX aggregation.
IEEE80211_TX_CTL_AMPDU would be set for frames only after a
successful ADDBA exchange, but we have to increment the
internal sequence counter for the normal(non-AMPDU) data frames proerly.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Initialize ANI properly
Sujith [Mon, 9 Mar 2009 04:01:49 +0000 (09:31 +0530)]
ath9k: Initialize ANI properly

ANI was not being initialized correctly for all HW variants.
This patch fixes it.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: update LED table with reported devices
Bob Copeland [Sun, 8 Mar 2009 05:10:22 +0000 (00:10 -0500)]
ath5k: update LED table with reported devices

This patch adds support for Acer Ferrari 5000, and also specifies
the subsystem device ids for previously reported e-machines e510 and
Acer Aspire One A150.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: use a table for LED parameters
Bob Copeland [Sun, 8 Mar 2009 05:10:21 +0000 (00:10 -0500)]
ath5k: use a table for LED parameters

Put the device id-to-gpio mapping in a table to make it easier to add
new devices.  The list of supported devices is unchanged.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: extract LED code into a separate file
Bob Copeland [Sun, 8 Mar 2009 05:10:20 +0000 (00:10 -0500)]
ath5k: extract LED code into a separate file

Move LED code out of base.c for clarity.

Changes-licensed-under: 3-Clause-BSD
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: don't change mac in eeprom_read_mac on error
Jiri Slaby [Sat, 7 Mar 2009 09:26:42 +0000 (10:26 +0100)]
ath5k: don't change mac in eeprom_read_mac on error

Do not touch mac parameter passed to ath5k_eeprom_read_mac unless
we are sure we have correct address. I.e. when returning error, do
not change it.

While at it, use '= {}' compiler trick for memsetting mac_d.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: constify stuff
Jiri Slaby [Sat, 7 Mar 2009 09:26:41 +0000 (10:26 +0100)]
ath5k: constify stuff

Make some structures const to place them in .rodata, since we won't
change them.

Most important parts of objdump -h:
-  0 .text         00011170
+  0 .text         00011140
-  5 .rodata       0000828e
+  5 .rodata       0000895e
- 13 .data         00000560
+ 13 .data         00000110
- 14 .devinit.data 00000260

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: correct device name for 1000 series
Jay Sternberg [Fri, 6 Mar 2009 21:52:55 +0000 (13:52 -0800)]
iwlwifi: correct device name for 1000 series

device name was changed from 100 to 1000

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>
15 years agoiwl3945: add test for new association
Abhijeet Kolekar [Fri, 6 Mar 2009 21:52:54 +0000 (13:52 -0800)]
iwl3945: add test for new association

Add check for new association to ease reading.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: completely ignore rx'd frames with bad FCS
Christian Lamparter [Thu, 5 Mar 2009 20:28:57 +0000 (21:28 +0100)]
p54: completely ignore rx'd frames with bad FCS

Passing frames with a bad FCS to the user is an optional feature.
However it doesn't work reliable and strangely not in the native monitor mode?!

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoairo_cs: checkpatch.pl cleanups
John Daiker [Fri, 6 Mar 2009 15:09:41 +0000 (07:09 -0800)]
airo_cs: checkpatch.pl cleanups

Hopefully nothing controversial here, since the driver hasn't been touched in a while!

Before: 36 errors, 6 warnings, 482 lines checked
After:  0 errors, 3 warnings, 485 lines checked

This was nearly all trailing whitespace, * and parenthesis spacing, and code indent changes.

md5sum of object file before and after are identical.

Signed-off-by: John Daiker <daikerjohn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Use suitable macros with 4k eeprom data
Vasanthakumar Thiagarajan [Fri, 6 Mar 2009 15:08:36 +0000 (20:38 +0530)]
ath9k: Use suitable macros with 4k eeprom data

This patch improves range and connection stability in AR9285.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoipw2x00: remove obsolete enums
Helmut Schaa [Fri, 6 Mar 2009 14:32:31 +0000 (15:32 +0100)]
ipw2x00: remove obsolete enums

Remove obsolete enums from ipw2x00/ieee80211.h, they are not used anymore.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoipw2x00: Use IE definitions from linux/ieee80211.h
Helmut Schaa [Fri, 6 Mar 2009 14:32:26 +0000 (15:32 +0100)]
ipw2x00: Use IE definitions from linux/ieee80211.h

Use IE definitions from linux/ieee80211.h and drop the appropriate enum
from ipw2x00/ieee80211.h

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoipw2x00: remove duplicated defines
Helmut Schaa [Fri, 6 Mar 2009 14:32:20 +0000 (15:32 +0100)]
ipw2x00: remove duplicated defines

Remove several duplicated defines from ipw2x00/ieee80211.h which are
also available in linux/ieee80211.h.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agolibipw: fix debug output
Helmut Schaa [Fri, 6 Mar 2009 11:02:25 +0000 (12:02 +0100)]
libipw: fix debug output

Replace all remaining occurrences of CONFIG_IEEE80211_DEBUG with
CONFIG_LIBIPW_DEBUG in libipw to allow debug output again.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: always compile ath_radio_{en,dis}able
Gabor Juhos [Fri, 6 Mar 2009 10:17:55 +0000 (11:17 +0100)]
ath9k: always compile ath_radio_{en,dis}able

ath_radio_{en,dis}able is only compiled if RFKILL is enabled, but it is
required by the 'ath9k_wiphy_select' function.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: fix compile error in debug.c
Gabor Juhos [Fri, 6 Mar 2009 08:57:39 +0000 (09:57 +0100)]
ath9k: fix compile error in debug.c

drivers/net/wireless/ath9k/debug.c: In function 'read_file_wiphy':
drivers/net/wireless/ath9k/debug.c:377: error: implicit declaration of
function 'put_unaligned_le32'
drivers/net/wireless/ath9k/debug.c:378: error: implicit declaration of
function 'put_unaligned_le16'

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: fix compile error in ahb.c
Gabor Juhos [Fri, 6 Mar 2009 08:57:38 +0000 (09:57 +0100)]
ath9k: fix compile error in ahb.c

drivers/net/wireless/ath9k/ahb.c: In function 'ath_ahb_probe':
drivers/net/wireless/ath9k/ahb.c:136: error: 'aphy' undeclared (first
use in this function)

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: fix AR_SREV_9100_OR_LATER macro
Gabor Juhos [Fri, 6 Mar 2009 08:08:53 +0000 (09:08 +0100)]
ath9k: fix AR_SREV_9100_OR_LATER macro

The current macro is wrong, because detects some AR5416 devices as an
AR9100 device. The AR5416 devices would have performance issues after
this change, because the contents of the ar5416 specific and of the
ar9100 specificinitval arrays are swapped. Fortunately we can correct
this with the rename of the arrays simply.

Changes-licesed-under: ISC

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: move ar9100 version checking macros into a more appropriate place
Gabor Juhos [Fri, 6 Mar 2009 08:08:52 +0000 (09:08 +0100)]
ath9k: move ar9100 version checking macros into a more appropriate place

All other version checking macros are in a common location within the
reg.h file. The AR_SREV_9100_OR_LATER macro is wrong currently, but will
be fixed with the next patch.

Changes-licensed-under: ISC

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: cleanup AR5416 version checking macros
Gabor Juhos [Fri, 6 Mar 2009 08:08:51 +0000 (09:08 +0100)]
ath9k: cleanup AR5416 version checking macros

Currently we have two different versions of this macros. Because they
would have to do the same thing, we should simplify and merge them.

Changes-licensed-under: ISC

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Incorrect AR9285 version check macro
Senthil Balasubramanian [Fri, 6 Mar 2009 05:54:11 +0000 (11:24 +0530)]
ath9k: Incorrect AR9285 version check macro

Fix AR9285 1.1 and 1.2 version check macro.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: INI update for AR9285 and periodic PA offset caliberation
Senthil Balasubramanian [Fri, 6 Mar 2009 05:54:10 +0000 (11:24 +0530)]
ath9k: INI update for AR9285 and periodic PA offset caliberation

This patch updates the initvalues for AR9285 chipset and also adds
periodic PA offset caliberation.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: RX buffers may be accessed/freed even before initialized/alloced.
Senthil Balasubramanian [Fri, 6 Mar 2009 05:54:09 +0000 (11:24 +0530)]
ath9k: RX buffers may be accessed/freed even before initialized/alloced.

accessing RXBUF list in ath_rx_cleanup may cause panic if
ath_descdma_setup fails even before RXBUF list is initialized.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Get rid of unnecessary ATOMIC memory alloc during init time
Senthil Balasubramanian [Fri, 6 Mar 2009 05:54:08 +0000 (11:24 +0530)]
ath9k: Get rid of unnecessary ATOMIC memory alloc during init time

We can sleep for memory during init time and so allocating rx buffers,
descriptro buffers with GFP_KERNEL should help us to get rid of transient
alloc fails.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: fix max tx power for world regdom on 5 GHz to 20dBm
Luis R. Rodriguez [Fri, 6 Mar 2009 05:19:22 +0000 (21:19 -0800)]
cfg80211: fix max tx power for world regdom on 5 GHz to 20dBm

This is the lowest value amongst countries which do enable 5 GHz operation.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: Enable passive scan on channels 12-14 for world roaming
Luis R. Rodriguez [Fri, 6 Mar 2009 05:19:21 +0000 (21:19 -0800)]
cfg80211: Enable passive scan on channels 12-14 for world roaming

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211_hwsim: add support for 5 GHz
Luis R. Rodriguez [Fri, 6 Mar 2009 05:13:06 +0000 (21:13 -0800)]
mac80211_hwsim: add support for 5 GHz

ACME Inc. is now selling a dual band radio.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: enable power save support
Christian Lamparter [Fri, 6 Mar 2009 01:15:08 +0000 (02:15 +0100)]
p54: enable power save support

This patch enables power save support on all p54 devices.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: initial SoftLED support
Christian Lamparter [Fri, 6 Mar 2009 00:02:04 +0000 (01:02 +0100)]
p54: initial SoftLED support

This patch adds SoftLED support for all p54 devices.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: fix iwconfig txpower off
Christian Lamparter [Thu, 5 Mar 2009 20:31:05 +0000 (21:31 +0100)]
p54: fix iwconfig txpower off

Disabling the receiver logic with P54_FILTER_TYPE_RX_DISABLED is not
supported by all firmwares. However we have an alternative: hibernation.
And the only side effect - so far - is a bit less power consumption. WIN!

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54pci: convert printk(KERN_* to dev_*
Christian Lamparter [Thu, 5 Mar 2009 20:30:37 +0000 (21:30 +0100)]
p54pci: convert printk(KERN_* to dev_*

This patch replaces most printk(KERN_* "") with their by dev_* analogue.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: unify ieee80211 device registration
Christian Lamparter [Thu, 5 Mar 2009 20:30:10 +0000 (21:30 +0100)]
p54: unify ieee80211 device registration

All three drivers (p54pci, p54usb and p54spi) are implementing the
same functionality three times. So, why not put it into the shared library?!

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54usb: stop USB core interference in exit path
Christian Lamparter [Thu, 5 Mar 2009 20:29:51 +0000 (21:29 +0100)]
p54usb: stop USB core interference in exit path

The patch fixes a problem when the (Soft)LED stayed on after the module was unloaded.
It turned out that the USB core disables all endpoints before calling the disconnect method.
So it was impossible to switch off the radio & LEDs.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: create a common debugfs_root for all device instances
Gabor Juhos [Thu, 5 Mar 2009 15:55:18 +0000 (16:55 +0100)]
ath9k: create a common debugfs_root for all device instances

The driver are trying to create an 'ath9k' directory in debugfs for each
device currently. If there are more than one device in the system, the
second try will always fail.

Changes-licensed-under: ISC

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Fix WMM ACM parsing and AC downgrade operation
Jouni Malinen [Thu, 5 Mar 2009 15:23:46 +0000 (17:23 +0200)]
mac80211: Fix WMM ACM parsing and AC downgrade operation

Incorrect local->wmm_acm bits were set for AC_BK and AC_BE. Fix this
and add some comments to make it easier to understand the AC-to-UP(pair)
mapping. Set the wmm_acm bits (and show WMM debug) even if the driver
does not implement conf_tx() handler.

In addition, fix the ACM-based AC downgrade code to not use the
highest priority in error cases. We need to break the loop to get the
correct AC_BK value (3) instead of returning 0 (which would indicate
AC_VO). The comment here was not really very useful either, so let's
provide somewhat more helpful description of the situation.

Since it is very unlikely that the ACM flag would be set for AC_BK and
AC_BE, these bugs are not likely to be seen in real life networks.
Anyway, better do these things correctly should someone really use
silly AP configuration (and to pass some functionality tests, too).

Remove the TODO comment about handling ACM. Downgrading AC is
perfectly valid mechanism for ACM. Eventually, we may add support for
WMM-AC and send a request for a TS, but anyway, that functionality
won't be here at the location of this TODO comment.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: firmware: consistently compile out fw cache support if not requested
Andrey Borzenkov [Sat, 28 Feb 2009 20:09:09 +0000 (23:09 +0300)]
orinoco: firmware: consistently compile out fw cache support if not requested

Currently part of support for FW caching is unconditionally compiled
in even if it is never used. Consistently remove caching support if
not requested by user.

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agozd1211rw: Do not panic on device eject when associated
Jouni Malinen [Mon, 16 Mar 2009 19:47:33 +0000 (21:47 +0200)]
zd1211rw: Do not panic on device eject when associated

zd_op_tx() must not return an arbitrary error value since that can
leave mac80211 trying to retransmit the frame and with the extra data
pushed into the beginning of the skb on every attempt, this will end up
causing a kernel panic (skb_under_panic from skb_push call). This can
happen, e.g., when ejecting the device when associated.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Fix panic on fragmentation with power saving
Jouni Malinen [Fri, 13 Mar 2009 11:59:39 +0000 (13:59 +0200)]
mac80211: Fix panic on fragmentation with power saving

It was possible to hit a kernel panic on NULL pointer dereference in
dev_queue_xmit() when sending power save buffered frames to a STA that
woke up from sleep. This happened when the buffered frame was requeued
for transmission in ap_sta_ps_end(). In order to avoid the panic, copy
the skb->dev and skb->iif values from the first fragment to all other
fragments.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: AR9280 PCI devices must serialize IO as well
Luis R. Rodriguez [Thu, 12 Mar 2009 22:18:50 +0000 (18:18 -0400)]
ath9k: AR9280 PCI devices must serialize IO as well

Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: implement IO serialization
Luis R. Rodriguez [Thu, 12 Mar 2009 22:18:49 +0000 (18:18 -0400)]
ath9k: implement IO serialization

All 802.11n PCI devices (Cardbus, PCI, mini-PCI) require
serialization of IO when on non-uniprocessor systems. PCI
express devices not not require this.

This should fix our only last standing open ath9k kernel.org
bugzilla bug report:

http://bugzilla.kernel.org/show_bug.cgi?id=12110

A port is probably required to older kernels and I can work on
that.

Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agolib80211: silence excessive crypto debugging messages
John W. Linville [Wed, 11 Mar 2009 15:05:25 +0000 (11:05 -0400)]
lib80211: silence excessive crypto debugging messages

When they were part of the now defunct ieee80211 component, these
messages were only visible when special debugging settings were enabled.
Let's mirror that with a new lib80211 debugging Kconfig option.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoGRO: Move netpoll checks to correct location
Herbert Xu [Mon, 16 Mar 2009 17:50:02 +0000 (10:50 -0700)]
GRO: Move netpoll checks to correct location

As my netpoll fix for net doesn't really work for net-next, we
need this update to move the checks into the right place.  As it
stands we may pass freed skbs to netpoll_receive_skb.

This patch also introduces a netpoll_rx_on function to avoid GRO
completely if we're invoked through netpoll.  This might seem
paranoid but as netpoll may have an external receive hook it's
better to be safe than sorry.  I don't think we need this for
2.6.29 though since there's nothing immediately broken by it.

This patch also moves the GRO_* return values to netdevice.h since
VLAN needs them too (I tried to avoid this originally but alas
this seems to be the easiest way out).  This fixes a bug in VLAN
where it continued to use the old return value 2 instead of the
correct GRO_DROP.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: conntrack: check for NEXTHDR_NONE before header sanity checking
Christoph Paasch [Mon, 16 Mar 2009 14:52:11 +0000 (15:52 +0100)]
netfilter: conntrack: check for NEXTHDR_NONE before header sanity checking

NEXTHDR_NONE doesn't has an IPv6 option header, so the first check
for the length will always fail and results in a confusing message
"too short" if debugging enabled. With this patch, we check for
NEXTHDR_NONE before length sanity checkings are done.

Signed-off-by: Christoph Paasch <christoph.paasch@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years agonetfilter: conntrack: fix dropping packet after l4proto->packet()
Christoph Paasch [Mon, 16 Mar 2009 14:51:29 +0000 (15:51 +0100)]
netfilter: conntrack: fix dropping packet after l4proto->packet()

We currently use the negative value in the conntrack code to encode
the packet verdict in the error. As NF_DROP is equal to 0, inverting
NF_DROP makes no sense and, as a result, no packets are ever dropped.

Signed-off-by: Christoph Paasch <christoph.paasch@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years agonetfilter: ctnetlink: fix crash during expectation creation
Pablo Neira Ayuso [Mon, 16 Mar 2009 14:50:51 +0000 (15:50 +0100)]
netfilter: ctnetlink: fix crash during expectation creation

This patch fixes a possible crash due to the missing initialization
of the expectation class when nf_ct_expect_related() is called.

Reported-by: BORBELY Zoltan <bozo@andrews.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years agonetfilter: conntrack: don't deliver events for racy packets
Pablo Neira Ayuso [Mon, 16 Mar 2009 14:06:42 +0000 (15:06 +0100)]
netfilter: conntrack: don't deliver events for racy packets

This patch skips the delivery of conntrack events if the packet
was drop due to a race condition in the conntrack insertion.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years agotcp: make sure xmit goal size never becomes zero
Ilpo Järvinen [Sat, 14 Mar 2009 14:23:07 +0000 (14:23 +0000)]
tcp: make sure xmit goal size never becomes zero

It's not too likely to happen, would basically require crafted
packets (must hit the max guard in tcp_bound_to_half_wnd()).
It seems that nothing that bad would happen as there's tcp_mems
and congestion window that prevent runaway at some point from
hurting all too much (I'm not that sure what all those zero
sized segments we would generate do though in write queue).
Preventing it regardless is certainly the best way to go.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: cache result of earlier divides when mss-aligning things
Ilpo Järvinen [Sat, 14 Mar 2009 22:45:16 +0000 (22:45 +0000)]
tcp: cache result of earlier divides when mss-aligning things

The results is very unlikely change every so often so we
hardly need to divide again after doing that once for a
connection. Yet, if divide still becomes necessary we
detect that and do the right thing and again settle for
non-divide state. Takes the u16 space which was previously
taken by the plain xmit_size_goal.

This should take care part of the tso vs non-tso difference
we found earlier.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: simplify tcp_current_mss
Ilpo Järvinen [Sat, 14 Mar 2009 14:23:05 +0000 (14:23 +0000)]
tcp: simplify tcp_current_mss

There's very little need for most of the callsites to get
tp->xmit_goal_size updated. That will cost us divide as is,
so slice the function in two. Also, the only users of the
tp->xmit_goal_size are directly behind tcp_current_mss(),
so there's no need to store that variable into tcp_sock
at all! The drop of xmit_goal_size currently leaves 16-bit
hole and some reorganization would again be necessary to
change that (but I'm aiming to fill that hole with u16
xmit_goal_size_segs to cache the results of the remaining
divide to get that tso on regression).

Bring xmit_goal_size parts into tcp.c

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: don't check mtu probe completion in the loop
Ilpo Järvinen [Sat, 14 Mar 2009 14:23:04 +0000 (14:23 +0000)]
tcp: don't check mtu probe completion in the loop

It seems that no variables clash such that we couldn't do
the check just once later on. Therefore move it.

Also kill dead obvious comment, dead argument and add
unlikely since this mtu probe does not happen too often.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: consolidate paws check
Ilpo Järvinen [Sat, 14 Mar 2009 14:23:03 +0000 (14:23 +0000)]
tcp: consolidate paws check

Wow, it was quite tricky to merge that stream of negations
but I think I finally got it right:

check & replace_ts_recent:
(s32)(rcv_tsval - ts_recent) >= 0                  => 0
(s32)(ts_recent - rcv_tsval) <= 0                  => 0

discard:
(s32)(ts_recent - rcv_tsval)  > TCP_PAWS_WINDOW    => 1
(s32)(ts_recent - rcv_tsval) <= TCP_PAWS_WINDOW    => 0

I toggled the return values of tcp_paws_check around since
the old encoding added yet-another negation making tracking
of truth-values really complicated.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: kill dead end_seq variable in clean_rtx_queue
Ilpo Järvinen [Sat, 14 Mar 2009 14:23:02 +0000 (14:23 +0000)]
tcp: kill dead end_seq variable in clean_rtx_queue

I've already forgotten what for this was necessary, anyway
it's no longer used (if it ever was).

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: remove pointless .dsack/.num_sacks code
Ilpo Järvinen [Sat, 14 Mar 2009 14:23:01 +0000 (14:23 +0000)]
tcp: remove pointless .dsack/.num_sacks code

In the pure assignment case, the earlier zeroing is
still in effect.

David S. Miller raised concerns if the ifs are there to avoid
dirtying cachelines. I came to these conclusions:

> We'll be dirty it anyway (now that I check), the first "real" statement
> in tcp_rcv_established is:
>
>       tp->rx_opt.saw_tstamp = 0;
>
> ...that'll land on the same dword. :-/
>
> I suppose the blocks are there just because they had more complexity
> inside when they had to calculate the eff_sacks too (maybe it would
> have been better to just remove them in that drop-patch so you would
> have had less head-ache :-)).

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agor8169: revert "r8169: read MAC address from EEPROM on init (2nd attempt)"
françois romieu [Sun, 15 Mar 2009 01:10:50 +0000 (01:10 +0000)]
r8169: revert "r8169: read MAC address from EEPROM on init (2nd attempt)"

It fails on the following systems:
- RTL8169sc/8110sc (XID 18000000)
  reported by Tim Durack <tdurack@gmail.com> (x86)
- RTL8169sb/8110sb (XID 10000000)
  reported by Mikael Pettersson <mikpe@it.uu.se> (ARM)

The patch appeared to work on x86 for the following systems:
RTL8169sb/8110sb 10000000 PCI   (EXT)
RTL8110s         04000000 PCI   (EXT)
RTL8102e         24a00000 PCI-E (LOM)
RTL8168c/8111c   3c2000c0 PCI-E (LOM)
RTL8168b/8111b   38000000 PCI-E (LOM)
RTL8168b/8111b   38000000 PCI-E (EXT)

The patch exposes two problems:
1) while not completely wrong, mac addresses are not read correctly
   from the EEPROM
2) the MAC address registers are not correctly set

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Tested-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agor8169: use hardware auto-padding.
françois romieu [Sun, 15 Mar 2009 01:09:54 +0000 (01:09 +0000)]
r8169: use hardware auto-padding.

It shortens the code and fixes the current pci_unmap leak with
padded skb reported by Dave Jones.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopkt_sched: Change misleading code in class delete.
Jarek Poplawski [Mon, 16 Mar 2009 03:00:19 +0000 (20:00 -0700)]
pkt_sched: Change misleading code in class delete.

While looking for a possible reason of bugzilla report on HTB oops:
http://bugzilla.kernel.org/show_bug.cgi?id=12858
I found the code in htb_delete calling htb_destroy_class on zero
refcount is very misleading: it can suggest this is a common path, and
destroy is called under sch_tree_lock. Actually, this can never happen
like this because before deletion cops->get() is done, and after
delete a class is still used by tclass_notify. The class destroy is
always called from cops->put(), so without sch_tree_lock.

This doesn't mean much now (since 2.6.27) because all vulnerable calls
were moved from htb_destroy_class to htb_delete, but there was a bug
in older kernels. The same change is done for other classful scheds,
which, it seems, didn't have similar locking problems here.

Reported-by: m0sia <m0sia@m0sia.ru>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: reorder fields of struct socket
Eric Dumazet [Mon, 16 Mar 2009 02:59:13 +0000 (19:59 -0700)]
net: reorder fields of struct socket

On x86_64, its rather unfortunate that "wait_queue_head_t wait"
field of "struct socket" spans two cache lines (assuming a 64
bytes cache line in current cpus)

offsetof(struct socket, wait)=0x30
sizeof(wait_queue_head_t)=0x18

This might explain why Kenny Chang noticed that his multicast workload
was performing bad with 64 bit kernels, since more cache lines ping pongs
were involved.

This litle patch moves "wait" field next "fasync_list" so that both
fields share a single cache line, to speedup sock_def_readable()

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb: remove ASPM L0s workaround
Alexander Duyck [Sun, 15 Mar 2009 05:26:40 +0000 (22:26 -0700)]
igb: remove ASPM L0s workaround

The L0s workaround should be moved into a pci quirk and so it is not
necessary in the driver.  This update removes the L0s workaround from the
igb driver.

This was the second half of the PCI quirk patch that Matthew Wilcox did
not pick up when he picked up the quirk patch.

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>
15 years agonetxen: update version to 4.0.30
Dhananjay Phadke [Fri, 13 Mar 2009 14:52:06 +0000 (14:52 +0000)]
netxen: update version to 4.0.30

To mark all features and bugfixes submitted since 4.0.11.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetxen: add receive side scaling (rss) support
Dhananjay Phadke [Fri, 13 Mar 2009 14:52:05 +0000 (14:52 +0000)]
netxen: add receive side scaling (rss) support

This patch enables the load balancing capability of firmware
and hardware to spray traffic into different cpus through
separate rx msix interrupts.

The feature is being enabled for NX3031, NX2031 (old) will be
enabled later. This depends on msi-x and compatibility with
msi and legacy is maintained by enabling single rx ring.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>