]> err.no Git - linux-2.6/blobdiff - drivers/net/wan/sbni.c
Merge branch 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak...
[linux-2.6] / drivers / net / wan / sbni.c
index 2e8b5c2de887c13c42f04df22175d312fa084568..6596cd0742b9dfd0256c4361d0fe3909b711d4f5 100644 (file)
@@ -391,8 +391,8 @@ sbni_probe1( struct net_device  *dev,  unsigned long  ioaddr,  int  irq )
        spin_lock_init( &nl->lock );
 
        /* store MAC address (generate if that isn't known) */
-       *(u16 *)dev->dev_addr = htons( 0x00ff );
-       *(u32 *)(dev->dev_addr + 2) = htonl( 0x01000000 |
+       *(__be16 *)dev->dev_addr = htons( 0x00ff );
+       *(__be32 *)(dev->dev_addr + 2) = htonl( 0x01000000 |
                ( (mac[num]  ?  mac[num]  :  (u32)((long)dev->priv)) & 0x00ffffff) );
 
        /* store link settings (speed, receive level ) */
@@ -751,7 +751,7 @@ upload_data( struct net_device  *dev,  unsigned  framelen,  unsigned  frameno,
 }
 
 
-static __inline void
+static inline void
 send_complete( struct net_local  *nl )
 {
 #ifdef CONFIG_SBNI_MULTILINE
@@ -1317,7 +1317,7 @@ sbni_ioctl( struct net_device  *dev,  struct ifreq  *ifr,  int  cmd )
                break;
 
        case  SIOCDEVRESINSTATS :
-               if( current->euid != 0 )        /* root only */
+               if (!capable(CAP_NET_ADMIN))
                        return  -EPERM;
                memset( &nl->in_stats, 0, sizeof(struct sbni_in_stats) );
                break;
@@ -1334,7 +1334,7 @@ sbni_ioctl( struct net_device  *dev,  struct ifreq  *ifr,  int  cmd )
                break;
 
        case  SIOCDEVSHWSTATE :
-               if( current->euid != 0 )        /* root only */
+               if (!capable(CAP_NET_ADMIN))
                        return  -EPERM;
 
                spin_lock( &nl->lock );
@@ -1355,7 +1355,7 @@ sbni_ioctl( struct net_device  *dev,  struct ifreq  *ifr,  int  cmd )
 #ifdef CONFIG_SBNI_MULTILINE
 
        case  SIOCDEVENSLAVE :
-               if( current->euid != 0 )        /* root only */
+               if (!capable(CAP_NET_ADMIN))
                        return  -EPERM;
 
                if (copy_from_user( slave_name, ifr->ifr_data, sizeof slave_name ))
@@ -1370,7 +1370,7 @@ sbni_ioctl( struct net_device  *dev,  struct ifreq  *ifr,  int  cmd )
                return  enslave( dev, slave_dev );
 
        case  SIOCDEVEMANSIPATE :
-               if( current->euid != 0 )        /* root only */
+               if (!capable(CAP_NET_ADMIN))
                        return  -EPERM;
 
                return  emancipate( dev );