GitHub/exynos8895/android_kernel_samsung_universal8895.git
16 years agoiwlwifi: don't fail if scan is issued too early
Tomas Winkler [Wed, 24 Sep 2008 05:57:46 +0000 (13:57 +0800)]
iwlwifi: don't fail if scan is issued too early

This patch returns success and empty scan on scans requests that were
rejected because issued too early. The cached bss list from previous
scanning will be returned by mac80211.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlagn: downgrade BUG_ON in interrupt
Johannes Berg [Tue, 23 Sep 2008 17:18:43 +0000 (19:18 +0200)]
iwlagn: downgrade BUG_ON in interrupt

This BUG_ON really shouldn't trigger, but if it does, as on my machine,
it leaves you wondering what happened because you won't see it. Let's
instead leak a bit of state and memory and at least make it possible to
report it to the kerneloops project to track it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agopcmcia: Fix up legacy driver IRQs
Alan Cox [Tue, 23 Sep 2008 12:53:09 +0000 (13:53 +0100)]
pcmcia: Fix up legacy driver IRQs

The PCMCIA layer obsoleted asking for per device private IRQS some years
ago and all the drivers by inspection correctly use dev_id and handle
shared interrupts [they get em anyway in most PCI bridged PCMCIA/Cardbus]
so can be adjusted.

This gets rid of the various bugs reported where there is spewage about
conflicting irq types and sometimes the driver won't load.

(Note I don't have all of these devices to test each one beyond by inspection)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: a global static to local static improvement
Denis ChengRq [Mon, 22 Sep 2008 18:35:37 +0000 (02:35 +0800)]
wireless: a global static to local static improvement

There are two improvements in this simple patch:
1. wiphy_counter is a static var only used in one function, so
   can use local static instead of global static;
2. wiphy_counter wrap handling killed one comparision;

Signed-off-by: Denis ChengRq <crquan@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Fix HW crypto key handling
Ivo van Doorn [Mon, 22 Sep 2008 17:40:04 +0000 (19:40 +0200)]
rt2x00: Fix HW crypto key handling

When a crypto key is being removed, rt2x00mac should not
reset the key->hw_key_idx value because that will prevent
the driver from removing the correct key from the hardware.

Furthermore ffz() starts counting at 0 instead of 1, so we don't
need to substract 1 from the resulting value.

Signed-off-by: Stephen Blackheath <tramp.enshrine.stephen@blacksapphire.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix led behavior in IBSS
Emmanuel Grumbach [Mon, 22 Sep 2008 14:10:10 +0000 (17:10 +0300)]
mac80211: fix led behavior in IBSS

This patch fixes the led behavior in IBSS. After we joined an IBSS cell we
need to inform the led that we got associated. Although there is no 802.11
association in IBSS mode, the semantic of "There is a link" is relevant.
This allows the led to blink in IBSS mode (at least this solves a bug for
iwlwifi).

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: Add a few comments about mibevents
Luis R. Rodriguez [Mon, 22 Sep 2008 08:14:02 +0000 (01:14 -0700)]
ath9k: Add a few comments about mibevents

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: probe with correct SSID
Johannes Berg [Fri, 19 Sep 2008 03:10:34 +0000 (05:10 +0200)]
mac80211: probe with correct SSID

While associated, we should probe with the SSID we're associated to,
not the scan SSID.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: clean up rate control API
Johannes Berg [Thu, 18 Sep 2008 16:14:18 +0000 (18:14 +0200)]
mac80211: clean up rate control API

Long awaited, hard work. This patch totally cleans up the rate control
API to remove the requirement to include internal headers outside of
net/mac80211/.

There's one internal use in the PID algorithm left for mesh networking,
we'll have to figure out a way to clean that one up and decide how to
do the peer link evaluation, possibly independent of the rate control
algorithm or via new API.

Additionally, ath9k is left using the cross-inclusion hack for now, we
will add new API where necessary to make this work properly, but right
now I'm not expert enough to do it. It's still off better than before.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix mesh action frame handling
Johannes Berg [Thu, 18 Sep 2008 10:24:20 +0000 (12:24 +0200)]
mac80211: fix mesh action frame handling

When I split off the action frame handling I made the code drop
all action frames we don't want to handle. This is wrong since
some action frames are actually handled via rx_h_mgmt through
being queued to the sta/mesh implementations.

Thanks to Li YanBo for noticing the problem.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Li YanBo <dreamfly281@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: mesh portal functionality support
YanBo [Mon, 22 Sep 2008 05:30:32 +0000 (13:30 +0800)]
mac80211: mesh portal functionality support

Currently the mesh code doesn't support bridging mesh point interfaces
with wired ethernet or AP to construct an MPP or MAP. This patch adds
code to support the "6 address frame format packet" functionality to
mesh point interfaces. Now the mesh network can be used as backhaul
for end to end communication.

Signed-off-by: Li YanBo <dreamfly281@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: Fix TSF Adjust usage
Sujith [Wed, 17 Sep 2008 04:46:07 +0000 (10:16 +0530)]
ath9k: Fix TSF Adjust usage

TSF adjust is needed only for AP mode when staggered beacons
are used. Since we support only a single interface in IBSS mode,
disable setting the TSF adjust register.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: Fix nexttbtt calculation
Sujith [Wed, 17 Sep 2008 04:45:36 +0000 (10:15 +0530)]
ath9k: Fix nexttbtt calculation

nexttbtt has to be obtained from the timestamp of the beacon
obtained from mac80211. Fix this.
And <asm/unaligned.h> is not needed anymore.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: Whitespace cleanup
Sujith [Wed, 17 Sep 2008 04:45:09 +0000 (10:15 +0530)]
ath9k: Whitespace cleanup

Also, remove comments that are not relevant anymore.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: remove HT flags from RXON when not in HT anymore
Emmanuel Grumbach [Wed, 17 Sep 2008 02:10:05 +0000 (10:10 +0800)]
iwlwifi: remove HT flags from RXON when not in HT anymore

This patch removes the HT flags from RXON when moving from HT to legacy.
This avoids keeping those flags set and possibly miss configuring firmware.

If we are configured in HT, fat channel: channel 1 above, and move later
to legacy channel 11, we need to clear the FAT channel control flags in
RXON. If we don't, the firmware will understand this as channel 11 above
which is not possible due to regulatory constraints, leading to firmware
crash.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: Reduce the WPA key installation time (fixups)
Javier Cardona [Wed, 17 Sep 2008 01:08:39 +0000 (18:08 -0700)]
libertas: Reduce the WPA key installation time (fixups)

This patch addresses comments from Dan Williams about the patch
committed as "libertas: Reduce the WPA key installation time."

Signed-off-by: Javier Cardona <javier@cozybit.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: Fix bad udelay calls on AR5210 code
Nick Kossifidis [Wed, 17 Sep 2008 00:33:19 +0000 (03:33 +0300)]
ath5k: Fix bad udelay calls on AR5210 code

 * Fix bad udelay calls (using > 2000us) in AR5210 code and clean up
 some bits on nic_reset (AR5210 support is still in bad shape)

 Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agocfg80211: reject invalid configuration items
Johannes Berg [Tue, 16 Sep 2008 18:39:36 +0000 (20:39 +0200)]
cfg80211: reject invalid configuration items

Reject configuring mesh-id for non-mesh, monitor flags for non-monitor.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: allow interface settings changes only when down
Johannes Berg [Tue, 16 Sep 2008 18:22:21 +0000 (20:22 +0200)]
mac80211: allow interface settings changes only when down

We currently allow monitor flags changes and mesh ID changes when
the interface is up, which can lead to trouble. Change it to only
allow when down.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agocfg80211: allow set_interface without type
Johannes Berg [Tue, 16 Sep 2008 18:22:09 +0000 (20:22 +0200)]
cfg80211: allow set_interface without type

Which then causes no type change.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agocfg80211: show interface type
Johannes Berg [Tue, 16 Sep 2008 12:55:09 +0000 (14:55 +0200)]
cfg80211: show interface type

This patch makes cfg80211 show the interface in the nl80211
information about a specific interface. API users are required
to keep the type updated (everything else is fairly complicated)
but you will get a warning if you fail to keep it updated.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: make master iface not wireless
Johannes Berg [Tue, 16 Sep 2008 12:18:59 +0000 (14:18 +0200)]
mac80211: make master iface not wireless

There's no need to register the master netdev with cfg80211,
in fact, this is quite dangerous and lead to having to add
checks for the master interface all over the config handlers.
This patch removes the "ieee80211_ptr" from the master iface
in favour of having a small netdev_priv() associated with
the master interface that stores the ieee80211_local pointer.
Because of this, a lot of code in the configuration handlers
can go away. To make this patch easier to verify I have also
removed a number of wiphy_priv() calls in favour of getting
the sdata first and then the local pointer from that.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: make PS use named constants
Tomas Winkler [Tue, 16 Sep 2008 06:01:04 +0000 (14:01 +0800)]
iwlwifi: make PS use named constants

This patch adds named constants for configuring MIMO power save
chain settings.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: don't delay scan in IBSS mode
Tomas Winkler [Tue, 16 Sep 2008 06:01:03 +0000 (14:01 +0800)]
iwlwifi: don't delay scan in IBSS mode

Scan need to be delayed only after association to allow EAPOL
exchange. We don't need the delay for IBSS mode.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: Issue warning when RFKILL_INPUT is not enabled
Larry Finger [Tue, 16 Sep 2008 19:56:49 +0000 (14:56 -0500)]
b43: Issue warning when RFKILL_INPUT is not enabled

If the system is misconfigured with CONFIG_RFKILL set but CONFIG_RFKILL_INPUT
not set, the built-in radio LEDs will not work. In the current code, no warning
is issued.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agocfg80211: fix code ordering in header file
Johannes Berg [Mon, 15 Sep 2008 11:11:19 +0000 (13:11 +0200)]
cfg80211: fix code ordering in header file

Luis added the regulatory hint stuff to this file without
observing that __ieee80211_get_channel and ieee80211_get_channel
really belong together.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agocfg80211: clean up static regdomain mess
Johannes Berg [Mon, 15 Sep 2008 09:26:47 +0000 (11:26 +0200)]
cfg80211: clean up static regdomain mess

The statically defined regdomains are used in a very convoluted
way, use them instead to prime the information we have and then
continue operating normally.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agocfg80211: fix regulatory code const
Johannes Berg [Mon, 15 Sep 2008 09:10:52 +0000 (11:10 +0200)]
cfg80211: fix regulatory code const

A few pointers and structures in the regulatory code are const,
but because it wasn't done properly a whole bunch of bogus
casts were needed to compile without warning. Mark everything
const properly to avoid that kind of junk code.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agocfg80211: clean up regulatory mess
Johannes Berg [Mon, 15 Sep 2008 08:56:48 +0000 (10:56 +0200)]
cfg80211: clean up regulatory mess

The recent code from Luis is an #ifdef hell and contains lots of
code that's stuffed into the wrong file making a whole bunch of
things needlessly non-static, and besides, what is it doing in
core.c??

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agocfg80211: fix static regdomains
Johannes Berg [Mon, 15 Sep 2008 08:30:34 +0000 (10:30 +0200)]
cfg80211: fix static regdomains

When Luis added the static regdomains back he used +/-20
of the centre frequencies to account for 40MHz bandwidth
neglecting the fact that 40MHz bandwidth cannot be used
on the channels close to the allowed band edges.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: Read scan flags correctly on x86-64
David Kilroy [Sat, 13 Sep 2008 11:22:05 +0000 (12:22 +0100)]
wireless: Read scan flags correctly on x86-64

The SIOCSIWSCAN handler is passed data in an iw_point structure. Some
drivers erronously use an iw_param instead.

On 32 bit architectures the difference isn't noticed as the flags
parameter tends to be the only one used by scan handlers and is at the
same offset.

On 64 bit architectures the pointer in the iw_point structure means the
flag parameter is at different offsets in these structures.

Thanks to Jean Tourrilhes for tracking this down for orinoco, and Pavel
Roskin for confirming the fix and identifying other suspect handlers.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoaoe: Fix OOPS after SKB queue changes.
David S. Miller [Wed, 24 Sep 2008 03:47:22 +0000 (20:47 -0700)]
aoe: Fix OOPS after SKB queue changes.

Reported by Thomas Graf.

If we don't unlink the SKB from the queue when we send it
out in aoenet_xmit(), dev_hard_start_xmit() will see skb->next
as non-NULL and interpret this to mean the SKB is part of a
GSO segment list.

Add __skb_unlink() call to fix that.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agocan: Add documentation for virtual CAN driver usage
Oliver Hartkopp [Tue, 23 Sep 2008 21:53:14 +0000 (14:53 -0700)]
can: Add documentation for virtual CAN driver usage

This patch adds a usage documentation for the virtual CAN driver (vcan).

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: Fix queue traversal in tcp_use_frto().
David S. Miller [Tue, 23 Sep 2008 09:51:41 +0000 (02:51 -0700)]
tcp: Fix queue traversal in tcp_use_frto().

We must check tcp_skb_is_last() before doing a tcp_write_queue_next().

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: Fix order of tests in tcp_retransmit_skb()
David S. Miller [Tue, 23 Sep 2008 08:29:23 +0000 (01:29 -0700)]
tcp: Fix order of tests in tcp_retransmit_skb()

tcp_write_queue_next() must only be made if we know that
tcp_skb_is_last() evaluates to false.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoppp_generic: Use skb_peek() in ppp_receive_mp_frame().
David S. Miller [Tue, 23 Sep 2008 08:17:18 +0000 (01:17 -0700)]
ppp_generic: Use skb_peek() in ppp_receive_mp_frame().

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoneigh: Remove by-hand SKB queue handling.
David S. Miller [Tue, 23 Sep 2008 08:11:18 +0000 (01:11 -0700)]
neigh: Remove by-hand SKB queue handling.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agopkt_sched: Remove the tx queue state check in qdisc_run()
Jarek Poplawski [Tue, 23 Sep 2008 08:05:56 +0000 (01:05 -0700)]
pkt_sched: Remove the tx queue state check in qdisc_run()

The current check wrongly uses the state of one (currently the first)
tx queue for all tx queues in case of non-default qdiscs. This check
mainly prevented requeuing loop with __netif_schedule(), but now it's
controlled inside __qdisc_run(), while dequeuing. The wrongness of
this check was first noticed by Herbert Xu.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: Use SKB queue handling interfaces instead of by-hand versions.
David S. Miller [Tue, 23 Sep 2008 07:50:13 +0000 (00:50 -0700)]
tcp: Use SKB queue handling interfaces instead of by-hand versions.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: Add skb_queue_walk_from() and skb_queue_walk_from_safe().
David S. Miller [Tue, 23 Sep 2008 07:49:44 +0000 (00:49 -0700)]
net: Add skb_queue_walk_from() and skb_queue_walk_from_safe().

These will be used by TCP write queue handling and elsewhere.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: Add skb_queue_next().
David S. Miller [Tue, 23 Sep 2008 07:44:42 +0000 (00:44 -0700)]
net: Add skb_queue_next().

A lot of code wants to iterate over an SKB queue at the top level using
it's own control structure and iterator scheme.

Provide skb_queue_next(), which is only valid to invoke if
skb_queue_is_last() returns false.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: Use skb_queue_is_last() instead of by-hand version.
David S. Miller [Tue, 23 Sep 2008 07:34:37 +0000 (00:34 -0700)]
tcp: Use skb_queue_is_last() instead of by-hand version.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: Add skb_queue_is_last().
David S. Miller [Tue, 23 Sep 2008 07:34:07 +0000 (00:34 -0700)]
net: Add skb_queue_is_last().

Several bits of code want to know "is this the last SKB in
a queue", and all of them implement this by hand.

Provide an common interface to make this check.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agousbatm: Use skb_queue_walk_safe() instead of by-hand implementation.
David S. Miller [Tue, 23 Sep 2008 07:27:47 +0000 (00:27 -0700)]
usbatm: Use skb_queue_walk_safe() instead of by-hand implementation.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agozd1211: Use skb_queue_walk() instead of by-hand implementation.
David S. Miller [Tue, 23 Sep 2008 07:23:30 +0000 (00:23 -0700)]
zd1211: Use skb_queue_walk() instead of by-hand implementation.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agode4x5: Use skb_queue_head instead of by-hand implementation.
David S. Miller [Tue, 23 Sep 2008 07:19:19 +0000 (00:19 -0700)]
de4x5: Use skb_queue_head instead of by-hand implementation.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agopkt_sched: Check the state of tx_queue in dequeue_skb()
Jarek Poplawski [Tue, 23 Sep 2008 05:16:23 +0000 (22:16 -0700)]
pkt_sched: Check the state of tx_queue in dequeue_skb()

Check in dequeue_skb() the state of tx_queue for requeued skb to save
on locking and re-requeuing, and possibly remove the current check in
qdisc_run(). Based on the idea of Alexander Duyck.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agopkt_sched: Always use q->requeue in dev_requeue_skb().
David S. Miller [Tue, 23 Sep 2008 05:15:58 +0000 (22:15 -0700)]
pkt_sched: Always use q->requeue in dev_requeue_skb().

There is no reason to call into the complicated qdiscs
just to remember the last SKB where we found the device
blocked.

The SKB is outside of the qdiscs realm at this point.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agopkt_sched: Make qdisc->gso_skb a list.
David S. Miller [Tue, 23 Sep 2008 05:15:30 +0000 (22:15 -0700)]
pkt_sched: Make qdisc->gso_skb a list.

The idea is that we can use this to get rid of
->requeue().

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosctp: Use skb_queue_walk_safe() and skb_queue_split_tail_init().
David S. Miller [Tue, 23 Sep 2008 05:14:36 +0000 (22:14 -0700)]
sctp: Use skb_queue_walk_safe() and skb_queue_split_tail_init().

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: Fix bus in SKB queue splicing interfaces.
David S. Miller [Tue, 23 Sep 2008 04:57:21 +0000 (21:57 -0700)]
net: Fix bus in SKB queue splicing interfaces.

Handle the case of head being non-empty, by adding list->qlen
to head->qlen instead of using direct assignment.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: network device name ifalias support
Stephen Hemminger [Tue, 23 Sep 2008 04:28:11 +0000 (21:28 -0700)]
net: network device name ifalias support

This patch add support for keeping an additional character alias
associated with an network interface. This is useful for maintaining
the SNMP ifAlias value which is a user defined value. Routers use this
to hold information like which circuit or line it is connected to. It
is just an arbitrary text label on the network device.

There are two exposed interfaces with this patch, the value can be
read/written either via netlink or sysfs.

This could be maintained just by the snmp daemon, but it is more
generally useful for other management tools, and the kernel is good
place to act as an agreed upon interface to store it.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agousbnet: Use skb_queue_walk_safe() instead of by-hand implementation.
David S. Miller [Tue, 23 Sep 2008 03:18:47 +0000 (20:18 -0700)]
usbnet: Use skb_queue_walk_safe() instead of by-hand implementation.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoPhonet: kernel documentation
Remi Denis-Courmont [Tue, 23 Sep 2008 03:09:46 +0000 (20:09 -0700)]
Phonet: kernel documentation

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoPhonet: emit errors when a packet cannot be delivered locally
Remi Denis-Courmont [Tue, 23 Sep 2008 03:09:13 +0000 (20:09 -0700)]
Phonet: emit errors when a packet cannot be delivered locally

When there is no listener socket for a received packet, send an error
back to the sender.

Signed-off-by: Remi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoPhonet: proc interface for port range
Remi Denis-Courmont [Tue, 23 Sep 2008 03:08:39 +0000 (20:08 -0700)]
Phonet: proc interface for port range

Phonet endpoints are bound to individual ports.
This provides a /proc/sys/net/phonet (or sysctl) interface for
selecting the range of automatically allocated ports (much like the
ip_local_port_range with IPv4).

Signed-off-by: Remi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoPhonet: provide MAC header operations
Remi Denis-Courmont [Tue, 23 Sep 2008 03:08:04 +0000 (20:08 -0700)]
Phonet: provide MAC header operations

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoPhonet: Phonet datagram transport protocol
Remi Denis-Courmont [Tue, 23 Sep 2008 03:05:57 +0000 (20:05 -0700)]
Phonet: Phonet datagram transport protocol

This provides the basic SOCK_DGRAM transport protocol for Phonet.

Signed-off-by: Remi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoPhonet: common socket glue
Remi Denis-Courmont [Tue, 23 Sep 2008 03:05:19 +0000 (20:05 -0700)]
Phonet: common socket glue

This provides the socket API for the Phonet protocols family.

Signed-off-by: Remi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoPhonet: Netlink interface
Remi Denis-Courmont [Tue, 23 Sep 2008 03:04:30 +0000 (20:04 -0700)]
Phonet: Netlink interface

This provides support for configuring Phonet addresses, notifying
Phonet configuration changes, and dumping the configuration.

Signed-off-by: Remi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoPhonet: network device and address handling
Remi Denis-Courmont [Tue, 23 Sep 2008 03:03:44 +0000 (20:03 -0700)]
Phonet: network device and address handling

This provides support for adding Phonet addresses to and removing
Phonet addresses from network devices.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoPhonet: add CONFIG_PHONET
Remi Denis-Courmont [Tue, 23 Sep 2008 03:03:00 +0000 (20:03 -0700)]
Phonet: add CONFIG_PHONET

Signed-off-by: Remi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoPhonet: PF_PHONET protocol family support
Remi Denis-Courmont [Tue, 23 Sep 2008 03:02:10 +0000 (20:02 -0700)]
Phonet: PF_PHONET protocol family support

This is the basis for the Phonet protocol families, and introduces
the ETH_P_PHONET packet type and the PF_PHONET socket family.

Signed-off-by: Remi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoPhonet: global definitions
Remi Denis-Courmont [Tue, 23 Sep 2008 02:51:15 +0000 (19:51 -0700)]
Phonet: global definitions

Signed-off-by: Remi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoipsec: Fix xfrm_state_walk race
Herbert Xu [Tue, 23 Sep 2008 02:48:19 +0000 (19:48 -0700)]
ipsec: Fix xfrm_state_walk race

As discovered by Timo Teräs, the currently xfrm_state_walk scheme
is racy because if a second dump finishes before the first, we
may free xfrm states that the first dump would walk over later.

This patch fixes this by storing the dumps in a list in order
to calculate the correct completion counter which cures this
problem.

I've expanded netlink_cb in order to accomodate the extra state
related to this.  It shouldn't be a big deal since netlink_cb
is kmalloced for each dump and we're just increasing it by 4 or
8 bytes.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agocassini: use request_firmware
Jaswinder Singh [Tue, 23 Sep 2008 02:27:10 +0000 (19:27 -0700)]
cassini: use request_firmware

Firmware blob looks like this...
        __le16 load_address
        unsigned char data[]

[akpm@linux-foundation.org: include vmalloc.h]
Signed-off-by: Jaswinder Singh <jaswinder@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet/atm/lec.c: drop code after return
Julia Lawall [Tue, 23 Sep 2008 02:24:45 +0000 (19:24 -0700)]
net/atm/lec.c: drop code after return

The break after the return serves no purpose.

Signed-off-by: Julia Lawall <julia@diku.dk>
Reviewed-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agodrivers/net/wan: Use DIV_ROUND_UP
Julia Lawall [Tue, 23 Sep 2008 02:23:48 +0000 (19:23 -0700)]
drivers/net/wan: Use DIV_ROUND_UP

The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.

An extract of the semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@haskernel@
@@

#include <linux/kernel.h>

@depends on haskernel@
expression n,d;
@@

(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP((n),d)
+ DIV_ROUND_UP(n,d)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP(n,(d))
+ DIV_ROUND_UP(n,d)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agodrivers/atm: Use DIV_ROUND_UP
Julia Lawall [Tue, 23 Sep 2008 02:22:58 +0000 (19:22 -0700)]
drivers/atm: Use DIV_ROUND_UP

The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.

In the case of the file drivers/atm/eni.c, I am a little bit suspicious of
the -1 at the end of the affected expression.  Please check that that is
what is wanted.

An extract of the semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@haskernel@
@@

#include <linux/kernel.h>

@depends on haskernel@
expression n,d;
@@

(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP((n),d)
+ DIV_ROUND_UP(n,d)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP(n,(d))
+ DIV_ROUND_UP(n,d)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agohci_usb: replace mb with smp_mb
Ming Lei [Tue, 23 Sep 2008 02:21:51 +0000 (19:21 -0700)]
hci_usb: replace mb with smp_mb

smp_mb is enough for ordering memory operations among processors,and mb is
more expensive than smp_mb for UP machine, so replace it with smp_mb().

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: em_cmp.c use unaligned access helpers
Harvey Harrison [Tue, 23 Sep 2008 02:20:51 +0000 (19:20 -0700)]
net: em_cmp.c use unaligned access helpers

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoirda: follow lspci device/vendor style
Bjorn Helgaas [Tue, 23 Sep 2008 02:20:06 +0000 (19:20 -0700)]
irda: follow lspci device/vendor style

Use "[%04x:%04x]" for PCI vendor/device IDs to follow the format used by
lspci(8).

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomISDN: misc timerdev fixes
Andi Kleen [Tue, 23 Sep 2008 02:18:15 +0000 (19:18 -0700)]
mISDN: misc timerdev fixes

- Remove noop VFS stubs. The VFS does that on a NULL pointer anyways.
- Fix timer handler prototype to be correct
- Comment ugly SMP race I didn't fix.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomISDN: annotate iomem pointer and add statics
Harvey Harrison [Tue, 23 Sep 2008 02:16:51 +0000 (19:16 -0700)]
mISDN: annotate iomem pointer and add statics

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomISDN: endian annotations for struct zt
Harvey Harrison [Tue, 23 Sep 2008 02:16:20 +0000 (19:16 -0700)]
mISDN: endian annotations for struct zt

Found two possible bugs where the z1 value was used directly without
byteswapping.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agodrivers/isdn/capi/kcapi.c: Adjust error handling code involving capi_ctr_put
Julia Lawall [Tue, 23 Sep 2008 02:04:54 +0000 (19:04 -0700)]
drivers/isdn/capi/kcapi.c: Adjust error handling code involving capi_ctr_put

After calling capi_ctr_get, error handling code should call capi_ctr_put.

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r@
expression x,E;
statement S;
position p1,p2,p3;
@@

(
if ((x = capi_ctr_get@p1(...)) == NULL || ...) S
|
x = capi_ctr_get@p1(...)
... when != x
if (x == NULL || ...) S
)
<...
if@p3 (...) { ... when != capi_ctr_put(x)
                  when != if (x) { ... capi_ctr_put(x); ...}
    return@p2 ...;
}
...>
(
return x;
|
return 0;
|
x = E
|
E = x
|
capi_ctr_put(x)
)

@exists@
position r.p1,r.p2,r.p3;
expression x;
int ret != 0;
statement S;
@@

* x = capi_ctr_get@p1(...)
  <...
* if@p3 (...)
  S
  ...>
* return@p2 \(NULL\|ret\);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetfilter: xt_time gives a wrong monthday in a leap year
Kaihui Luo [Tue, 23 Sep 2008 02:02:36 +0000 (19:02 -0700)]
netfilter: xt_time gives a wrong monthday in a leap year

The function localtime_3 in xt_time.c gives a wrong monthday in a leap
year after 28th 2.  calculating monthday should use the array
days_since_leapyear[] not days_since_year[] in a leap year.

Signed-off-by: Kaihui Luo <kaih.luo@gmail.com>
Acked-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agocxgb3: Use SKB list interfaces instead of home-grown implementation.
David S. Miller [Mon, 22 Sep 2008 08:29:52 +0000 (01:29 -0700)]
cxgb3: Use SKB list interfaces instead of home-grown implementation.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoisdn: isdn_ppp: Use SKB list facilities instead of home-grown implementation.
David S. Miller [Mon, 22 Sep 2008 08:15:02 +0000 (01:15 -0700)]
isdn: isdn_ppp: Use SKB list facilities instead of home-grown implementation.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobluetooth: hci_bcsp: Use SKB list interfaces instead of home-grown stuff.
David S. Miller [Mon, 22 Sep 2008 05:44:08 +0000 (22:44 -0700)]
bluetooth: hci_bcsp: Use SKB list interfaces instead of home-grown stuff.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoaoe: Use SKB interfaces for list management instead of home-grown stuff.
David S. Miller [Mon, 22 Sep 2008 05:36:49 +0000 (22:36 -0700)]
aoe: Use SKB interfaces for list management instead of home-grown stuff.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: Add new interfaces for SKB list light-weight init and splicing.
David S. Miller [Mon, 22 Sep 2008 05:36:24 +0000 (22:36 -0700)]
net: Add new interfaces for SKB list light-weight init and splicing.

This will be used by subsequent changesets.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoatm: idt77252: Use generic SKB queue management instead of home-grown scheme.
David S. Miller [Mon, 22 Sep 2008 04:38:26 +0000 (21:38 -0700)]
atm: idt77252: Use generic SKB queue management instead of home-grown scheme.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: Remove __skb_insert() calls outside of skbuff internals.
David S. Miller [Mon, 22 Sep 2008 04:28:51 +0000 (21:28 -0700)]
net: Remove __skb_insert() calls outside of skbuff internals.

This minor cleanup simplifies later changes which will convert
struct sk_buff and friends over to using struct list_head.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: advertise MSS requested by user
Tom Quetchenbach [Sun, 21 Sep 2008 07:21:51 +0000 (00:21 -0700)]
tcp: advertise MSS requested by user

I'm trying to use the TCP_MAXSEG option to setsockopt() to set the MSS
for both sides of a bidirectional connection.

man tcp says: "If this option is set before connection establishment, it
also changes the MSS value announced to the other end in the initial
packet."

However, the kernel only uses the MTU/route cache to set the advertised
MSS. That means if I set the MSS to, say, 500 before calling connect(),
I will send at most 500-byte packets, but I will still receive 1500-byte
packets in reply.

This is a bug, either in the kernel or the documentation.

This patch (applies to latest net-2.6) reduces the advertised value to
that requested by the user as long as setsockopt() is called before
connect() or accept(). This seems like the behavior that one would
expect as well as that which is documented.

I've tried to make sure that things that depend on the advertised MSS
are set correctly.

Signed-off-by: Tom Quetchenbach <virtualphtn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: Use hton[sl]() instead of __constant_hton[sl]() where applicable
Arnaldo Carvalho de Melo [Sun, 21 Sep 2008 05:20:49 +0000 (22:20 -0700)]
net: Use hton[sl]() instead of __constant_hton[sl]() where applicable

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomultiq: requeue should rewind the current_band
Alexander Duyck [Sun, 21 Sep 2008 05:07:34 +0000 (22:07 -0700)]
multiq: requeue should rewind the current_band

Currently dequeueing a packet and requeueing the same packet will cause a
different packet to be pulled on the next dequeue.  This change forces
requeue to rewind the current_band.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: back retransmit_high when it over-estimated
Ilpo Järvinen [Sun, 21 Sep 2008 04:26:22 +0000 (21:26 -0700)]
tcp: back retransmit_high when it over-estimated

If lost skb is sacked, we might have nothing to retransmit
as high as the retransmit_high is pointing to, so place
it lower to avoid unnecessary walking.

This is mainly for the case where high L'ed skbs gets sacked.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: don't clear lost_skb_hint when not necessary
Ilpo Järvinen [Sun, 21 Sep 2008 04:25:52 +0000 (21:25 -0700)]
tcp: don't clear lost_skb_hint when not necessary

Most importantly avoid doing it with cumulative ACK. However,
since we have lost_cnt_hint in the picture as well needing
adjustments, it's not as trivial as dealing with
retransmit_skb_hint (and cannot be done in the all place we
could trivially leave retransmit_skb_hint untouched).

With the previous patch, this should mostly remove O(n^2)
behavior while cumulative ACKs start flowing once rexmit
after a lossy round-trip made it through.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: don't clear retransmit_skb_hint when not necessary
Ilpo Järvinen [Sun, 21 Sep 2008 04:25:15 +0000 (21:25 -0700)]
tcp: don't clear retransmit_skb_hint when not necessary

Most importantly avoid doing it with cumulative ACK. Not clearing
means that we no longer need n^2 processing in resolution of each
fast recovery.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: remove retransmit_skb_hint clearing from failure
Ilpo Järvinen [Sun, 21 Sep 2008 04:24:49 +0000 (21:24 -0700)]
tcp: remove retransmit_skb_hint clearing from failure

This doesn't much sense here afaict, probably never has. Since
fragmenting and collapsing deal the hints by themselves, there
should be very little reason for the rexmit loop to do that.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: reorganize retransmit code loops
Ilpo Järvinen [Sun, 21 Sep 2008 04:24:21 +0000 (21:24 -0700)]
tcp: reorganize retransmit code loops

Both loops are quite similar, so they can be combined
with little effort. As a result, forward_skb_hint becomes
obsolete as well.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: remove tp->lost_out guard to make joining diff nicer
Ilpo Järvinen [Sun, 21 Sep 2008 04:23:49 +0000 (21:23 -0700)]
tcp: remove tp->lost_out guard to make joining diff nicer

The validity of the retransmit_high must then be ensured
if no L'ed skb exits!

This makes a minor change to behavior, we now have to
iterate the head to find out that the loop terminates.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: Reorganize skb tagbit checks
Ilpo Järvinen [Sun, 21 Sep 2008 04:22:59 +0000 (21:22 -0700)]
tcp: Reorganize skb tagbit checks

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: remove obsolete validity concern
Ilpo Järvinen [Sun, 21 Sep 2008 04:22:17 +0000 (21:22 -0700)]
tcp: remove obsolete validity concern

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: add tcp_can_forward_retransmit
Ilpo Järvinen [Sun, 21 Sep 2008 04:21:54 +0000 (21:21 -0700)]
tcp: add tcp_can_forward_retransmit

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: No need to clear retransmit_skb_hint when SACKing
Ilpo Järvinen [Sun, 21 Sep 2008 04:21:16 +0000 (21:21 -0700)]
tcp: No need to clear retransmit_skb_hint when SACKing

Because lost counter no longer requires tuning, this is
trivial to remove (the tuning wouldn't have been too
hard either) because no "new" retransmittable skb appeared
below retransmit_skb_hint when SACKing for sure.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: Kill precaution that's very likely obsolete
Ilpo Järvinen [Sun, 21 Sep 2008 04:20:50 +0000 (21:20 -0700)]
tcp: Kill precaution that's very likely obsolete

I suspect it might have been related to the changed amount
of lost skbs, which was counted by retransmit_cnt_hint that
got changed.

The place for this clearing was very illogical anyway,
it should have been after the LOST-bit clearing loop to
make any sense.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: convert retransmit_cnt_hint to seqno
Ilpo Järvinen [Sun, 21 Sep 2008 04:20:20 +0000 (21:20 -0700)]
tcp: convert retransmit_cnt_hint to seqno

Main benefit in this is that we can then freely point
the retransmit_skb_hint to anywhere we want to because
there's no longer need to know what would be the count
changes involve, and since this is really used only as a
terminator, unnecessary work is one time walk at most,
and if some retransmissions are necessary after that
point later on, the walk is not full waste of time
anyway.

Since retransmit_high must be kept valid, all lost
markers must ensure that.

Now I also have learned how those "holes" in the
rexmittable skbs can appear, mtu probe does them. So
I removed the misleading comment as well.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: add helper for lost bit toggling
Ilpo Järvinen [Sun, 21 Sep 2008 04:19:22 +0000 (21:19 -0700)]
tcp: add helper for lost bit toggling

This useful because we'd need to verifying soon in many places
which makes things slightly more complex than it used to be.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>