--- skystar2_cvs_hwfilt.c	2003-12-02 17:02:26.000000000 +0100
+++ skystar2_cvs_hwfilt_fixed.c	2003-12-02 17:04:05.000000000 +0100
@@ -101,7 +101,7 @@
 	u16 pids[38];
 	u16 pid_list[256];
 	u16 pid_count;
-	u8 wb_open;
+	u8 wb_opened;
 	u32 mac_filter;
 };
 
@@ -1143,7 +1143,7 @@
 	for (i = 0; i < 0x27; i++)
 		adapter->pids[i] = 0x1FFF;
 	adapter->pid_count=0;
-	adapter->wb_open=0;
+	adapter->wb_opened=0;
 	
 	pid_set_group_pid(adapter, 0);
 	pid_set_group_mask(adapter, 0x1FE0);
@@ -1162,7 +1162,7 @@
 	if (pid == 0x1FFF)
 		return 0;
    
-	if(pid==0x2000 && adapter->wb_open!=0) return 1; // do we need this?
+	if(pid==0x2000 && adapter->wb_opened!=0) return 1; // do we need this?
 	
 	for(i=0; i<adapter->pid_count; i++)
 		if(adapter->pid_list[i]==pid) return 1;
@@ -1262,7 +1262,7 @@
 
 static void open_whole_bandwidth(struct adapter *adapter)
 {
-        dprintk("%s:\n", __FUNCTION__);
+        dprintk("%s: because of %i\n", __FUNCTION__, adapter->wb_opened);
 	
 	pid_set_group_pid(adapter, 0);
 
@@ -1367,9 +1367,9 @@
 	
 	if(pid==0x2000)
 	{
-		open_whole_bandwidth(adapter);
 		adapter->wb_opened|=1;
 		// 1 is for opened by 0x2000
+		open_whole_bandwidth(adapter);
 		return 1;
 	}
 	
@@ -1380,18 +1380,18 @@
 		if(adapter->pid_list[i]==pid) return 1;
 	
 	if(adapter->pid_count==256) return -1; // no more pids can be added
-	adapter->pid_list[pid_count]=pid;      // register pid
+	adapter->pid_list[adapter->pid_count]=pid;      // register pid
 	adapter->pid_count++;
 	
 	// setup a filter for the pid
 	// if there are no filters left, let the whole ts pass
 	if(add_hw_pid(adapter,pid)==-1)
 	{
-		open_whole_bandwidth(adapter);
 		adapter->wb_opened|=2;
 		// 2 is for opened by overflow
+		open_whole_bandwidth(adapter);
 	}
-	
+      }
 	return 1;
 }
 
