]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/s390/net/claw.c
Merge /pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6-omap-h63xx.git] / drivers / s390 / net / claw.c
index acd2a3f005f154290ca2acc97e085eb1217d2bd5..6dd64d0c8d45df40490c08c43fde4ab974496ac1 100644 (file)
@@ -121,7 +121,7 @@ MODULE_LICENSE("GPL");
 #define DEBUG
 #endif
 
- char debug_buffer[255];
+static char debug_buffer[255];
 /**
  * Debug Facility Stuff
  */
@@ -223,16 +223,14 @@ static void claw_timer ( struct chbk * p_ch );
 /* Functions */
 static int add_claw_reads(struct net_device *dev,
        struct ccwbk* p_first, struct ccwbk* p_last);
-static void inline ccw_check_return_code (struct ccw_device *cdev,
-        int return_code);
-static void inline ccw_check_unit_check (struct chbk * p_ch,
-       unsigned char sense );
+static void ccw_check_return_code (struct ccw_device *cdev, int return_code);
+static void ccw_check_unit_check (struct chbk * p_ch, unsigned char sense );
 static int find_link(struct net_device *dev, char *host_name, char *ws_name );
 static int claw_hw_tx(struct sk_buff *skb, struct net_device *dev, long linkid);
 static int init_ccw_bk(struct net_device *dev);
 static void probe_error( struct ccwgroup_device *cgdev);
 static struct net_device_stats *claw_stats(struct net_device *dev);
-static int inline pages_to_order_of_mag(int num_of_pages);
+static int pages_to_order_of_mag(int num_of_pages);
 static struct sk_buff *claw_pack_skb(struct claw_privbk *privptr);
 #ifdef DEBUG
 static void dumpit (char *buf, int len);
@@ -310,7 +308,7 @@ claw_probe(struct ccwgroup_device *cgdev)
         printk(KERN_INFO "claw: variable cgdev =\n");
         dumpit((char *)cgdev, sizeof(struct ccwgroup_device));
 #endif
-       privptr = kmalloc(sizeof(struct claw_privbk), GFP_KERNEL);
+       privptr = kzalloc(sizeof(struct claw_privbk), GFP_KERNEL);
        if (privptr == NULL) {
                probe_error(cgdev);
                put_device(&cgdev->dev);
@@ -319,7 +317,6 @@ claw_probe(struct ccwgroup_device *cgdev)
                CLAW_DBF_TEXT_(2,setup,"probex%d",-ENOMEM);
                return -ENOMEM;
        }
-       memset(privptr,0x00,sizeof(struct claw_privbk));
        privptr->p_mtc_envelope= kmalloc( MAX_ENVELOPE_SIZE, GFP_KERNEL);
        privptr->p_env = kmalloc(sizeof(struct claw_env), GFP_KERNEL);
         if ((privptr->p_mtc_envelope==NULL) || (privptr->p_env==NULL)) {
@@ -530,7 +527,7 @@ claw_open(struct net_device *dev)
         printk(KERN_INFO "%s:%s Enter  \n",dev->name,__FUNCTION__);
 #endif
        CLAW_DBF_TEXT(4,trace,"open");
-       if (!dev | (dev->name[0] == 0x00)) {
+       if (!dev || (dev->name[0] == 0x00)) {
                CLAW_DBF_TEXT(2,trace,"BadDev");
                printk(KERN_WARNING "claw: Bad device at open failing \n");
                return -ENODEV;
@@ -1311,7 +1308,7 @@ claw_timer ( struct chbk * p_ch )
 *    of magnitude get_free_pages() has an upper order of 9           *
 *--------------------------------------------------------------------*/
 
-static int inline
+static int
 pages_to_order_of_mag(int num_of_pages)
 {
        int     order_of_mag=1;         /* assume 2 pages */
@@ -1483,7 +1480,7 @@ add_claw_reads(struct net_device *dev, struct ccwbk* p_first,
  *                                                                   *
  *-------------------------------------------------------------------*/
 
-static void inline
+static void
 ccw_check_return_code(struct ccw_device *cdev, int return_code)
 {
 #ifdef FUNCTRACE
@@ -1530,7 +1527,7 @@ ccw_check_return_code(struct ccw_device *cdev, int return_code)
 *       ccw_check_unit_check                                         *
 *--------------------------------------------------------------------*/
 
-static void inline
+static void
 ccw_check_unit_check(struct chbk * p_ch, unsigned char sense )
 {
        struct net_device *dev = p_ch->ndev;
@@ -3528,8 +3525,8 @@ unpack_next:
                                 memcpy(skb_put(skb,len_of_data),
                                        privptr->p_mtc_envelope,
                                        len_of_data);
-                                skb->mac.raw=skb->data;
                                 skb->dev=dev;
+                               skb_reset_mac_header(skb);
                                 skb->protocol=htons(ETH_P_IP);
                                 skb->ip_summed=CHECKSUM_UNNECESSARY;
                                 privptr->stats.rx_packets++;