summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_net.c35
-rw-r--r--linux/drivers/media/dvb/ttpci/ttpci-eeprom.c6
2 files changed, 28 insertions, 13 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.c b/linux/drivers/media/dvb/dvb-core/dvb_net.c
index fc919f4aa..4e7db9720 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_net.c
@@ -32,6 +32,13 @@
#include "dvb_functions.h"
+#if 1
+#define dprintk(x...) printk(x)
+#else
+#define dprintk(x...)
+#endif
+
+
#define DVB_NET_MULTICAST_MAX 10
struct dvb_net_priv {
@@ -124,7 +131,9 @@ void dvb_net_sec(struct net_device *dev, u8 *pkt, int pkt_len)
eth[3] = pkt[0x08];
eth[4] = pkt[0x04];
eth[5] = pkt[0x03];
+
eth[6] = eth[7] = eth[8] = eth[9] = eth[10] = eth[11] = 0;
+
eth[12] = 0x08;
eth[13] = 0x00;
@@ -204,8 +213,11 @@ int dvb_net_filter_set (struct net_device *dev,
(*secfilter)->filter_mask[10] = mac_mask[1];
(*secfilter)->filter_mask[11] = mac_mask[0];
- printk("%s: filter mac=%02x %02x %02x %02x %02x %02x\n",
+ dprintk("%s: filter mac=%02x %02x %02x %02x %02x %02x\n",
dev->name, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
+ dprintk("%s: filter mask=%02x %02x %02x %02x %02x %02x\n",
+ dev->name, mac_mask[0], mac_mask[1], mac_mask[2],
+ mac_mask[3], mac_mask[4], mac_mask[5]);
return 0;
}
@@ -240,6 +252,8 @@ int dvb_net_feed_start (struct net_device *dev)
if (priv->mode < 3)
dvb_net_filter_set(dev, &priv->secfilter, mac, mask_normal);
+ dprintk("%s: mode %i\n", __FUNCTION__, priv->mode);
+
switch (priv->mode) {
case 1:
for (i=0; i<priv->multi_num; i++)
@@ -317,17 +331,17 @@ void tq_set_multicast_list (void *data)
priv->mode = 0;
if (dev->flags & IFF_PROMISC) {
- printk("%s: promiscuous mode\n", dev->name);
+ dprintk("%s: promiscuous mode\n", dev->name);
priv->mode = 3;
} else if((dev->flags & IFF_ALLMULTI)) {
- printk("%s: allmulti mode\n", dev->name);
+ dprintk("%s: allmulti mode\n", dev->name);
priv->mode = 2;
} else if(dev->mc_count) {
int mci;
struct dev_mc_list *mc;
- printk("%s: set_mc_list, %d entries\n",
- dev->name, dev->mc_count);
+ dprintk("%s: set_mc_list, %d entries\n",
+ dev->name, dev->mc_count);
priv->mode = 1;
priv->multi_num = 0;
@@ -447,13 +461,12 @@ int dvb_net_add_if(struct dvb_net *dvbnet, u16 pid)
int result;
int if_num;
- if_num=get_if(dvbnet);
- if (if_num<0)
+ if ((if_num = get_if(dvbnet)) < 0)
return -EINVAL;
- net=&dvbnet->device[if_num];
- demux=dvbnet->demux;
-
+ net = &dvbnet->device[if_num];
+ demux = dvbnet->demux;
+
net->base_addr = 0;
net->irq = 0;
net->dma = 0;
@@ -461,6 +474,8 @@ int dvb_net_add_if(struct dvb_net *dvbnet, u16 pid)
memcpy(net->name, "dvb0_0", 7);
net->name[3] = dvbnet->dvbdev->adapter->num + '0';
net->name[5] = if_num + '0';
+ net->addr_len = 6;
+ memcpy(net->dev_addr, dvbnet->dvbdev->adapter->proposed_mac, 6);
net->next = NULL;
net->init = dvb_net_init_dev;
diff --git a/linux/drivers/media/dvb/ttpci/ttpci-eeprom.c b/linux/drivers/media/dvb/ttpci/ttpci-eeprom.c
index 3f02e8068..188de32bb 100644
--- a/linux/drivers/media/dvb/ttpci/ttpci-eeprom.c
+++ b/linux/drivers/media/dvb/ttpci/ttpci-eeprom.c
@@ -39,7 +39,7 @@
#include "dvb_i2c.h"
#include "dvb_functions.h"
-#if 0
+#if 1
#define dprintk(x...) printk(x)
#else
#define dprintk(x...)
@@ -106,11 +106,11 @@ int ttpci_eeprom_parse_mac (struct dvb_i2c_bus *i2c)
decodeMAC(decodedMAC, encodedMAC);
memcpy(i2c->adapter->proposed_mac, decodedMAC, 6);
- dprintk("%s adapter %i has MAC addr = %x:%x:%x:%x:%x:%x\n",
+ dprintk("%s adapter %i has MAC addr = %02x:%02x:%02x:%02x:%02x:%02x\n",
i2c->adapter->name, i2c->adapter->num,
decodedMAC[0],decodedMAC[1],decodedMAC[2],
decodedMAC[3],decodedMAC[4],decodedMAC[5]);
- dprintk("encoded MAC was %x:%x:%x:%x:%x:%x\n",
+ dprintk("encoded MAC was %02x:%02x:%02x:%02x:%02x:%02x\n",
encodedMAC[0],encodedMAC[1],encodedMAC[2],
encodedMAC[3],encodedMAC[4],encodedMAC[5]);
return 0;