/[linux-patches]/genpatches-2.6/tags/2.6.14-5/1009_2_prism54-frame-size.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.14-5/1009_2_prism54-frame-size.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 226 - (show annotations) (download)
Fri Dec 2 12:14:55 2005 UTC (12 years, 2 months ago) by dsd
File size: 1833 byte(s)
2.6.14-5 release
1 From stable-bounces@linux.kernel.org Fri Oct 28 13:12:10 2005
2 Date: Sat, 22 Oct 2005 11:01:02 +0200
3 From: Roger While <simrw@sim-basis.de>
4 To: netdev@vger.kernel.org
5 Cc: jgarzik@pobox.com
6 Subject: [PATCH 2.6.14-rc5] prism54 : Fix frame length
7
8 prism54 is leaking information when passing transmits to the firmware.
9 There is no requirement to adjust the length to >= ETH_ZLEN.
10 Just pass the skb length (after possible adjustment).
11
12 This should also be considered for 2.6.13 stable.
13
14 Signed-off-by: Roger While <simrw@sim-basis.de>
15 Acked-by: Jeff Garzik <jgarzik@pobox.com>
16 Signed-off-by: Chris Wright <chrisw@osdl.org>
17 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 ---
19 drivers/net/wireless/prism54/islpci_eth.c | 7 +------
20 1 file changed, 1 insertion(+), 6 deletions(-)
21
22 --- linux-2.6.14.1.orig/drivers/net/wireless/prism54/islpci_eth.c
23 +++ linux-2.6.14.1/drivers/net/wireless/prism54/islpci_eth.c
24 @@ -97,12 +97,6 @@ islpci_eth_transmit(struct sk_buff *skb,
25 /* lock the driver code */
26 spin_lock_irqsave(&priv->slock, flags);
27
28 - /* determine the amount of fragments needed to store the frame */
29 -
30 - frame_size = skb->len < ETH_ZLEN ? ETH_ZLEN : skb->len;
31 - if (init_wds)
32 - frame_size += 6;
33 -
34 /* check whether the destination queue has enough fragments for the frame */
35 curr_frag = le32_to_cpu(cb->driver_curr_frag[ISL38XX_CB_TX_DATA_LQ]);
36 if (unlikely(curr_frag - priv->free_data_tx >= ISL38XX_CB_TX_QSIZE)) {
37 @@ -213,6 +207,7 @@ islpci_eth_transmit(struct sk_buff *skb,
38 /* store the skb address for future freeing */
39 priv->data_low_tx[index] = skb;
40 /* set the proper fragment start address and size information */
41 + frame_size = skb->len;
42 fragment->size = cpu_to_le16(frame_size);
43 fragment->flags = cpu_to_le16(0); /* set to 1 if more fragments */
44 fragment->address = cpu_to_le32(pci_map_address);

  ViewVC Help
Powered by ViewVC 1.1.20