The patch titled dvb-core-ule-fixes-and-rfc4326-additions-kernel-2616-tidy has been added to the -mm tree. Its filename is dvb-core-ule-fixes-and-rfc4326-additions-kernel-2616-tidy.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this From: Andrew Morton <akpm@xxxxxxxx> Attempt to salvage the coding style a bit. This driver is a disaster. Cc: Christian Praehauser <cpraehaus@xxxxxxxxxxxxxx> Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/media/dvb/dvb-core/dvb_net.c | 73 +++++++++++++------------ 1 files changed, 40 insertions(+), 33 deletions(-) diff -puN drivers/media/dvb/dvb-core/dvb_net.c~dvb-core-ule-fixes-and-rfc4326-additions-kernel-2616-tidy drivers/media/dvb/dvb-core/dvb_net.c --- devel/drivers/media/dvb/dvb-core/dvb_net.c~dvb-core-ule-fixes-and-rfc4326-additions-kernel-2616-tidy 2006-04-19 23:55:50.000000000 -0700 +++ devel-akpm/drivers/media/dvb/dvb-core/dvb_net.c 2006-04-19 23:55:50.000000000 -0700 @@ -241,7 +241,7 @@ static int ule_bridged_sndu( struct dvb_ return 0; } -static int ule_exthdr_padding( struct dvb_net_priv *p ) +static int ule_exthdr_padding(struct dvb_net_priv *p) { return 0; } @@ -272,11 +272,11 @@ static int handle_one_ule_extension( str ext_len = ule_mandatory_ext_handlers[htype]( p ); if(ext_len >= 0) { p->ule_next_hdr += ext_len; - if (! p->ule_bridged) { - p->ule_sndu_type = ntohs( *(unsigned short *)p->ule_next_hdr ); + if (!p->ule_bridged) { + p->ule_sndu_type = ntohs(*(unsigned short *)p->ule_next_hdr); p->ule_next_hdr += 2; } else { - p->ule_sndu_type = ntohs( *(unsigned short *)(p->ule_next_hdr + ((p->ule_dbit ? 2 : 3) * ETH_ALEN)) ); + p->ule_sndu_type = ntohs(*(unsigned short *)(p->ule_next_hdr + ((p->ule_dbit ? 2 : 3) * ETH_ALEN))); /* This assures the extension handling loop will terminate. */ } } @@ -291,7 +291,10 @@ static int handle_one_ule_extension( str (void)ule_optional_ext_handlers[htype]( p ); p->ule_next_hdr += ext_len; p->ule_sndu_type = ntohs( *(unsigned short *)(p->ule_next_hdr-2) ); - /* note: the length of the next header type is included in the length of THIS optional extension header */ + /* + * note: the length of the next header type is included in the + * length of THIS optional extension header + */ } return ext_len; @@ -304,10 +307,13 @@ static int handle_ule_extensions( struct p->ule_next_hdr = p->ule_skb->data; do { l = handle_one_ule_extension( p ); - if (l < 0) return l; /* Stop extension header processing and discard SNDU. */ + if (l < 0) + return l; /* Stop extension header processing and discard SNDU. */ total_ext_len += l; #ifdef ULE_DEBUG - dprintk("handle_ule_extensions: ule_next_hdr=%p, ule_sndu_type=%i, l=%i, total_ext_len=%i\n", p->ule_next_hdr, (int) p->ule_sndu_type, l, total_ext_len); + dprintk("handle_ule_extensions: ule_next_hdr=%p, ule_sndu_type=%i, " + "l=%i, total_ext_len=%i\n", p->ule_next_hdr, + (int) p->ule_sndu_type, l, total_ext_len); #endif } while (p->ule_sndu_type < 1536); @@ -645,28 +651,25 @@ static void dvb_net_ule( struct net_devi * * Check, if the payload of this SNDU should be passed up the stack. */ - register int drop = 0; + int drop = 0; #define MAC_ADDR_PRINTFMT "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x" #define MAX_ADDR_PRINTFMT_ARGS(macap) (macap)[0],(macap)[1],(macap)[2],(macap)[3],(macap)[4],(macap)[5] - if(priv->rx_mode != RX_MODE_PROMISC) - { - if(priv->ule_skb->data[0] & 0x01) - { + if (priv->rx_mode != RX_MODE_PROMISC) { + if (priv->ule_skb->data[0] & 0x01) { /* multicast or broadcast */ - if(priv->rx_mode == RX_MODE_MULTI) { - int i; - for(i=0; i<priv->multi_num && memcmp( priv->ule_skb->data, priv->multi_macs[i], ETH_ALEN ); i++); - if(i == priv->multi_num) - drop = 1; - } - else if(priv->rx_mode != RX_MODE_ALL_MULTI) - { - if(memcmp( priv->ule_skb->data, bc_addr, ETH_ALEN )) + if (priv->rx_mode == RX_MODE_MULTI) { + int i; + for (i = 0; i < priv->multi_num && memcmp(priv->ule_skb->data, priv->multi_macs[i], ETH_ALEN); i++) + ; + if (i == priv->multi_num) + drop = 1; + } else if (priv->rx_mode != RX_MODE_ALL_MULTI) { + if (memcmp(priv->ule_skb->data, bc_addr, ETH_ALEN)) drop = 1; /* no broadcast; */ } /* else: all multicast mode: accept all multicast packets */ } - else if(memcmp( priv->ule_skb->data, dev->dev_addr, ETH_ALEN )) + else if (memcmp(priv->ule_skb->data, dev->dev_addr, ETH_ALEN)) drop = 1; /* else: destination address matches the MAC address of our receiver device */ } @@ -698,23 +701,27 @@ static void dvb_net_ule( struct net_devi skb_pull( priv->ule_skb, l ); } - /* Construct/assure correct ethernet header. - * Note: in bridged mode (priv->ule_bridged != 0) we already have the (original) ethernet header - * at the start of the payload (after optional dest. address and any extension headers). - * */ + /* + * Construct/assure correct ethernet header. + * Note: in bridged mode (priv->ule_bridged != + * 0) we already have the (original) ethernet + * header at the start of the payload (after + * optional dest. address and any extension + * headers). + */ - if (! priv->ule_bridged) { - skb_push( priv->ule_skb, ETH_HLEN); + if (!priv->ule_bridged) { + skb_push(priv->ule_skb, ETH_HLEN); ethh = (struct ethhdr *)priv->ule_skb->data; - if(!priv->ule_dbit) /* dest_addr buffer is only valid if priv->ule_dbit == 0 */ - { - memcpy( ethh->h_dest, dest_addr, ETH_ALEN ); - memset( ethh->h_source, 0, ETH_ALEN ); + if (!priv->ule_dbit) { + /* dest_addr buffer is only valid if priv->ule_dbit == 0 */ + memcpy(ethh->h_dest, dest_addr, ETH_ALEN); + memset(ethh->h_source, 0, ETH_ALEN); } else /* zeroize source and dest */ memset( ethh, 0, ETH_ALEN*2 ); - ethh->h_proto = htons( priv->ule_sndu_type ); + ethh->h_proto = htons(priv->ule_sndu_type); } /* else: skb is in correct state; nothing to do. */ priv->ule_bridged = 0; _ Patches currently in -mm which might be from akpm@xxxxxxxx are origin.patch config_net=n-build-fix.patch git-acpi.patch acpi-update-asus_acpi-driver-registration-fix.patch acpi-memory-hotplug-cannot-manage-_crs-with-plural-resoureces.patch catch-notification-of-memory-add-event-of-acpi-via-container-driver-register-start-func-for-memory-device.patch catch-notification-of-memory-add-event-of-acpi-via-container-driveravoid-redundant-call-add_memory.patch sony_apci-resume.patch powernow-k8-crash-workaround.patch git-dvb.patch dvb-core-ule-fixes-and-rfc4326-additions-kernel-2616-tidy.patch sparc32-vivi-fix.patch git-dvb-compat-build-fix.patch bt866-build-fix.patch connector-exports.patch git-libata-all.patch git-mtd.patch pci-error-recovery-e1000-network-device-driver.patch gregkh-pci-pci-64-bit-resources-drivers-others-changes-amba-fix.patch git-pcmcia.patch git-scsi-misc.patch git-scsi-misc-scsi_kmap_atomic_sg-warning-fix.patch megaraid-unused-variable.patch git-watchdog.patch arm-add_memory-build-fix.patch pg_uncached-is-ia64-only.patch migration-remove-unnecessary-pageswapcache-checks-fix.patch wait_table-and-zonelist-initializing-for-memory-hotadd-wait_table-initialization-fixes.patch preserve-write-permissions-in-migration-entries-fix.patch slab-cleanup-kmem_getpages-fix.patch slab-stop-using-list_for_each-fix.patch acx1xx-wireless-driver.patch prune_one_dentry-tweaks.patch mmput-might-sleep.patch tpm-use-clear_bit-fix.patch tpm-use-clear_bit-fix-fix.patch tpm-use-clear_bit-fix-fix-fix-fix.patch hangcheck-remove-monotomic_clock-on-x86.patch pi-futex-futex-code-cleanups-fix.patch reiser4.patch kgdb-core-lite-add-reboot-command.patch kgdb-8250-fix.patch nr_blockdev_pages-in_interrupt-warning.patch device-suspend-debug.patch revert-tty-buffering-comment-out-debug-code.patch slab-leaks3-default-y.patch x86-kmap_atomic-debugging.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html