Arthur Jones [Thu, 19 Mar 2009 01:13:08 +0000 (01:13 +0000)]
e1000e: allow tx of pre-formatted vlan tagged packets
As with igb, when the e1000e driver is fed 802.1q
packets with hardware checksum on, it chokes with an
error of the form:
checksum_partial proto=81!
As the logic there was not smart enough to look into
the vlan header to pick out the encapsulated protocol.
There are times when we'd like to send these packets
out without having to configure a vlan on the interface.
Here we check for the vlan tag and allow the packet to
go out wiht the correct hardware checksum.
Thanks to Kand Ly <kand@riverbed.com> for discovering the
issue and the coming up with a solution. This patch is
based upon his work.
Fixups from Stephen Hemminger <shemminger@vyatta.com> and
Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Arthur Jones <ajones@riverbed.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: Stephen Hemminger <shemminger@vyatta.com>
CC: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Thu, 19 Mar 2009 01:12:50 +0000 (01:12 +0000)]
e1000e: fix dma error handling issues
There were a few issues I noticed in e1000e. These include a double free
of the skb if mapping fails, and the fact that context descriptors appear
to be left in the descriptor ring after the failure.
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>
Alexander Duyck [Thu, 19 Mar 2009 01:12:27 +0000 (01:12 +0000)]
e1000e: add support for 82583 device id
Add device ID and related support for 82583 mac.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Radheka Godse <radheka.godse@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>
Steve Glendinning [Fri, 20 Mar 2009 08:14:53 +0000 (01:14 -0700)]
smsc9420: fix big endian rx checksum offload
The cpu_to_le16 here looks suspicious to me, I don't think we need it
because put_unaligned_le16 also does this.
I don't currently have any big endian hardware with a PCI bus available
to test on, so I haven't been able to verify this.
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 20 Mar 2009 07:51:22 +0000 (00:51 -0700)]
sunvnet: Convert to net_device_ops.
Signed-off-by: David S. Miller <davem@davemloft.net>
Steve Glendinning [Thu, 19 Mar 2009 00:24:46 +0000 (00:24 +0000)]
smsc911x: allow setting of mac address
This patch replaces the generic eth_mac_addr function with one that
also updates the hardware mac address registers. It also renames the
existing smsc911x_set_mac_address function to
smsc911x_hw_set_mac_address for clarity.
Newer LAN911x and all LAN921x devices also support changing the mac
address while the device is running, which is useful for some bonding
modes.
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Steve Glendinning [Thu, 19 Mar 2009 00:24:45 +0000 (00:24 +0000)]
smsc911x: replace print_mac with %pM
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Steve Glendinning [Thu, 19 Mar 2009 00:24:44 +0000 (00:24 +0000)]
smsc911x: define status word positions as constants
The vast majority of bit constants in this driver are defined in the
header file, but TX and RX status word bits are not. This patch (which
should make no functional change) defines these, to make the driver
slightly more readable.
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Fri, 20 Mar 2009 06:49:41 +0000 (23:49 -0700)]
rtnetlink: add new value for DHCP added routes
To improve manageability, it would be good to be able to disambiguate routes
added by administrator from those added by DHCP client. The only necessary
kernel change is to add value to rtnetlink include file so iproute2 utility
can use it.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Kumar Gala [Thu, 19 Mar 2009 06:28:22 +0000 (23:28 -0700)]
gianfar: pass the proper dev to DMA ops
We need to be passing the of_platform device struct into the DMA ops as
its the one that has the archdata setup to know which low-level DMA ops we
should be using (not the net_device one). This isn't an issue until we
expect the archdata to be setup correctly.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Thu, 19 Mar 2009 02:11:29 +0000 (19:11 -0700)]
tipc: fix non-const printf format arguments
Fix warnings from current gcc about using non-const strings as printf
args in TIPC. Compile tested only (not a TIPC user).
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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>
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>
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>
David S. Miller [Tue, 17 Mar 2009 22:04:31 +0000 (15:04 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6
David S. Miller [Tue, 17 Mar 2009 22:01:30 +0000 (15:01 -0700)]
Merge branch 'master' of /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
David S. Miller [Tue, 17 Mar 2009 21:29:22 +0000 (14:29 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6
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>
David S. Miller [Tue, 17 Mar 2009 20:12:47 +0000 (13:12 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/kaber/nf-2.6
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>