[linux-dvb] Patch 23 / 50: code cleanup for dvbnet
Uwe Bugla
uwe.bugla at gmx.de
Fri Jun 23 17:14:42 CEST 2006
#Applies against: 2.6.17
#Signed-off-by: Uwe Bugla <uwe.bugla at gmx.de>
#Changes: fix type and / or tab errors, wipes out uncommented material
--- a/drivers/media/dvb/dvb-core/dvb_net.c 2006-05-27 14:03:00
+++ b/drivers/media/dvb/dvb-core/dvb_net.c 2006-05-28 16:20:00
@@ -28,30 +28,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
- */
-
-/*
- * ULE ChangeLog:
- * Feb 2004: hl/ws v1: Implementing draft-fair-ipdvb-ule-01.txt
- *
- * Dec 2004: hl/ws v2: Implementing draft-ietf-ipdvb-ule-03.txt:
- * ULE Extension header handling.
- * Bugreports by Moritz Vieth and Hanno Tersteegen,
- * Fraunhofer Institute for Open Communication Systems
- * Competence Center for Advanced Satellite Communications.
- * Bugfixes and robustness improvements.
- * Filtering on dest MAC addresses, if present (D-Bit = 0)
- * ULE_DEBUG compile-time option.
- */
-
-/*
* FIXME / TODO (dvb_net.c):
- *
* Unloading does not work for 2.6.9 kernels: a refcount doesn't go to zero.
- *
* TS_FEED callback is called once for every single TS cell although it is
* registered (in dvb_net_feed_start()) for 100 TS cells (used for dvb_net_ule()).
- *
*/
#include <linux/module.h>
@@ -408,7 +388,6 @@
if (priv->ule_skb) {
dev_kfree_skb( priv->ule_skb );
/* Prepare for next SNDU. */
- // reset_ule(priv); moved to below.
((struct dvb_net_priv *) dev->priv)->stats.rx_errors++;
((struct dvb_net_priv *) dev->priv)->stats.rx_frame_errors++;
}
@@ -619,7 +598,6 @@
int l = handle_ule_extensions( priv );
if (l < 0) {
/* Mandatory extension header unknown or TEST SNDU. Drop it. */
- // printk( KERN_WARNING "Dropping SNDU, extension headers.\n" );
dev_kfree_skb( priv->ule_skb );
goto sndu_done;
}
@@ -635,7 +613,6 @@
/* The destination MAC address is the next data in the skb. */
if (memcmp( priv->ule_skb->data, dev->dev_addr, ETH_ALEN )) {
/* MAC addresses don't match. Drop SNDU. */
- // printk( KERN_WARNING "Dropping SNDU, MAC address.\n" );
dev_kfree_skb( priv->ule_skb );
goto sndu_done;
}
@@ -666,8 +644,6 @@
priv->ule_skb->protocol = dvb_net_eth_type_trans(priv->ule_skb, dev);
/* If D-bit is set (i.e. destination MAC address not present),
* receive the packet anyhow. */
- /* if (priv->ule_dbit && skb->pkt_type == PACKET_OTHERHOST)
- priv->ule_skb->pkt_type = PACKET_HOST; */
((struct dvb_net_priv *) dev->priv)->stats.rx_packets++;
((struct dvb_net_priv *) dev->priv)->stats.rx_bytes += priv->ule_skb->len;
netif_rx(priv->ule_skb);
@@ -684,11 +660,6 @@
priv->ule_skb = NULL;
priv->ule_sndu_type_1 = 0;
priv->ule_sndu_len = 0;
- // printk(KERN_WARNING "More data in current TS: [%#x %#x %#x %#x]\n",
- // *(from_where + 0), *(from_where + 1),
- // *(from_where + 2), *(from_where + 3));
- // printk(KERN_WARNING "ts @ %p, stopped @ %p:\n", ts, from_where + 0);
- // hexdump(ts, 188);
} else {
new_ts = 1;
ts += TS_SZ;
@@ -712,8 +683,6 @@
printk(KERN_WARNING "buffer2 not 0: %p.\n", buffer2);
if (buffer1_len > 32768)
printk(KERN_WARNING "length > 32k: %zu.\n", buffer1_len);
- /* printk("TS callback: %u bytes, %u TS cells @ %p.\n",
- buffer1_len, buffer1_len / TS_SZ, buffer1); */
dvb_net_ule(dev, buffer1, buffer1_len);
return 0;
}
@@ -766,7 +735,6 @@
* 12 byte MPE header; 4 byte checksum; + 2 byte alignment, 8 byte LLC/SNAP
*/
if (!(skb = dev_alloc_skb(pkt_len - 4 - 12 + 14 + 2 - snap))) {
- //printk(KERN_NOTICE "%s: Memory squeeze, dropping packet.\n", dev->name);
stats->rx_dropped++;
return;
}
@@ -972,8 +940,7 @@
priv->tsfeed->start_filtering(priv->tsfeed);
} else
ret = -EINVAL;
-
-error:
+ error:
mutex_unlock(&priv->mutex);
return ret;
}
--
Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl
More information about the linux-dvb
mailing list