Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
authorLinus Torvalds <torvalds@evo.osdl.org>
Mon, 5 Sep 2005 07:11:50 +0000 (00:11 -0700)
committerLinus Torvalds <torvalds@evo.osdl.org>
Mon, 5 Sep 2005 07:11:50 +0000 (00:11 -0700)
1  2 
drivers/net/wireless/airo.c

@@@ -1040,7 -1040,7 +1040,7 @@@ typedef struct 
        u16 status;
  } WifiCtlHdr;
  
 -WifiCtlHdr wifictlhdr8023 = {
 +static WifiCtlHdr wifictlhdr8023 = {
        .ctlhdr = {
                .ctl    = HOST_DONT_RLSE,
        }
@@@ -1111,13 -1111,13 +1111,13 @@@ static int airo_thread(void *data)
  static void timer_func( struct net_device *dev );
  static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
  #ifdef WIRELESS_EXT
 -struct iw_statistics *airo_get_wireless_stats (struct net_device *dev);
 +static struct iw_statistics *airo_get_wireless_stats (struct net_device *dev);
  static void airo_read_wireless_stats (struct airo_info *local);
  #endif /* WIRELESS_EXT */
  #ifdef CISCO_EXT
  static int readrids(struct net_device *dev, aironet_ioctl *comp);
  static int writerids(struct net_device *dev, aironet_ioctl *comp);
 -int flashcard(struct net_device *dev, aironet_ioctl *comp);
 +static int flashcard(struct net_device *dev, aironet_ioctl *comp);
  #endif /* CISCO_EXT */
  #ifdef MICSUPPORT
  static void micinit(struct airo_info *ai);
@@@ -1226,12 -1226,6 +1226,12 @@@ static int setup_proc_entry( struct net
  static int takedown_proc_entry( struct net_device *dev,
                                struct airo_info *apriv );
  
 +static int cmdreset(struct airo_info *ai);
 +static int setflashmode (struct airo_info *ai);
 +static int flashgchar(struct airo_info *ai,int matchbyte,int dwelltime);
 +static int flashputbuf(struct airo_info *ai);
 +static int flashrestart(struct airo_info *ai,struct net_device *dev);
 +
  #ifdef MICSUPPORT
  /***********************************************************************
   *                              MIC ROUTINES                           *
  
  static int RxSeqValid (struct airo_info *ai,miccntx *context,int mcast,u32 micSeq);
  static void MoveWindow(miccntx *context, u32 micSeq);
 -void emmh32_setseed(emmh32_context *context, u8 *pkey, int keylen, struct crypto_tfm *);
 -void emmh32_init(emmh32_context *context);
 -void emmh32_update(emmh32_context *context, u8 *pOctets, int len);
 -void emmh32_final(emmh32_context *context, u8 digest[4]);
 +static void emmh32_setseed(emmh32_context *context, u8 *pkey, int keylen, struct crypto_tfm *);
 +static void emmh32_init(emmh32_context *context);
 +static void emmh32_update(emmh32_context *context, u8 *pOctets, int len);
 +static void emmh32_final(emmh32_context *context, u8 digest[4]);
 +static int flashpchar(struct airo_info *ai,int byte,int dwelltime);
  
  /* micinit - Initialize mic seed */
  
@@@ -1308,7 -1301,7 +1308,7 @@@ static int micsetup(struct airo_info *a
        int i;
  
        if (ai->tfm == NULL)
-               ai->tfm = crypto_alloc_tfm("aes", 0);
+               ai->tfm = crypto_alloc_tfm("aes", CRYPTO_TFM_REQ_MAY_SLEEP);
  
          if (ai->tfm == NULL) {
                  printk(KERN_ERR "airo: failed to load transform for AES\n");
        return SUCCESS;
  }
  
 -char micsnap[]= {0xAA,0xAA,0x03,0x00,0x40,0x96,0x00,0x02};
 +static char micsnap[] = {0xAA,0xAA,0x03,0x00,0x40,0x96,0x00,0x02};
  
  /*===========================================================================
   * Description: Mic a packet
@@@ -1577,7 -1570,7 +1577,7 @@@ static void MoveWindow(miccntx *context
  static unsigned char aes_counter[16];
  
  /* expand the key to fill the MMH coefficient array */
 -void emmh32_setseed(emmh32_context *context, u8 *pkey, int keylen, struct crypto_tfm *tfm)
 +static void emmh32_setseed(emmh32_context *context, u8 *pkey, int keylen, struct crypto_tfm *tfm)
  {
    /* take the keying material, expand if necessary, truncate at 16-bytes */
    /* run through AES counter mode to generate context->coeff[] */
  }
  
  /* prepare for calculation of a new mic */
 -void emmh32_init(emmh32_context *context)
 +static void emmh32_init(emmh32_context *context)
  {
        /* prepare for new mic calculation */
        context->accum = 0;
  }
  
  /* add some bytes to the mic calculation */
 -void emmh32_update(emmh32_context *context, u8 *pOctets, int len)
 +static void emmh32_update(emmh32_context *context, u8 *pOctets, int len)
  {
        int     coeff_position, byte_position;
    
  static u32 mask32[4] = { 0x00000000L, 0xFF000000L, 0xFFFF0000L, 0xFFFFFF00L };
  
  /* calculate the mic */
 -void emmh32_final(emmh32_context *context, u8 digest[4])
 +static void emmh32_final(emmh32_context *context, u8 digest[4])
  {
        int     coeff_position, byte_position;
        u32     val;
@@@ -2239,7 -2232,7 +2239,7 @@@ static void airo_read_stats(struct airo
        u32 *vals = stats_rid.vals;
  
        clear_bit(JOB_STATS, &ai->flags);
 -      if (ai->power) {
 +      if (ai->power.event) {
                up(&ai->sem);
                return;
        }
        ai->stats.rx_fifo_errors = vals[0];
  }
  
 -struct net_device_stats *airo_get_stats(struct net_device *dev)
 +static struct net_device_stats *airo_get_stats(struct net_device *dev)
  {
        struct airo_info *local =  dev->priv;
  
@@@ -2410,8 -2403,7 +2410,7 @@@ void stop_airo_card( struct net_device 
                }
          }
  #ifdef MICSUPPORT
-       if (ai->tfm)
-               crypto_free_tfm(ai->tfm);
+       crypto_free_tfm(ai->tfm);
  #endif
        del_airo_dev( dev );
        free_netdev( dev );
@@@ -2421,7 -2413,7 +2420,7 @@@ EXPORT_SYMBOL(stop_airo_card)
  
  static int add_airo_dev( struct net_device *dev );
  
 -int wll_header_parse(struct sk_buff *skb, unsigned char *haddr)
 +static int wll_header_parse(struct sk_buff *skb, unsigned char *haddr)
  {
        memcpy(haddr, skb->mac.raw + 10, ETH_ALEN);
        return ETH_ALEN;
@@@ -2688,7 -2680,7 +2687,7 @@@ static struct net_device *init_wifidev(
        return dev;
  }
  
 -int reset_card( struct net_device *dev , int lock) {
 +static int reset_card( struct net_device *dev , int lock) {
        struct airo_info *ai = dev->priv;
  
        if (lock && down_interruptible(&ai->sem))
        return 0;
  }
  
 -struct net_device *_init_airo_card( unsigned short irq, int port,
 -                                  int is_pcmcia, struct pci_dev *pci,
 -                                  struct device *dmdev )
 +static struct net_device *_init_airo_card( unsigned short irq, int port,
 +                                         int is_pcmcia, struct pci_dev *pci,
 +                                         struct device *dmdev )
  {
        struct net_device *dev;
        struct airo_info *ai;
@@@ -2969,7 -2961,7 +2968,7 @@@ static int airo_thread(void *data) 
                        break;
                }
  
 -              if (ai->power || test_bit(FLAG_FLASHING, &ai->flags)) {
 +              if (ai->power.event || test_bit(FLAG_FLASHING, &ai->flags)) {
                        up(&ai->sem);
                        continue;
                }
@@@ -5521,7 -5513,7 +5520,7 @@@ static int airo_pci_resume(struct pci_d
        pci_restore_state(pdev);
        pci_enable_wake(pdev, pci_choose_state(pdev, ai->power), 0);
  
 -      if (ai->power > 1) {
 +      if (ai->power.event > 1) {
                reset_card(dev, 0);
                mpi_init_descriptors(ai);
                setup_card(ai, dev->dev_addr, 0);
@@@ -7123,7 -7115,7 +7122,7 @@@ static int airo_ioctl(struct net_devic
        int rc = 0;
        struct airo_info *ai = (struct airo_info *)dev->priv;
  
 -      if (ai->power)
 +      if (ai->power.event)
                return 0;
  
        switch (cmd) {
@@@ -7202,7 -7194,7 +7201,7 @@@ static void airo_read_wireless_stats(st
  
        /* Get stats out of the card */
        clear_bit(JOB_WSTATS, &local->flags);
 -      if (local->power) {
 +      if (local->power.event) {
                up(&local->sem);
                return;
        }
        local->wstats.miss.beacon = vals[34];
  }
  
 -struct iw_statistics *airo_get_wireless_stats(struct net_device *dev)
 +static struct iw_statistics *airo_get_wireless_stats(struct net_device *dev)
  {
        struct airo_info *local =  dev->priv;
  
@@@ -7457,8 -7449,14 +7456,8 @@@ static int writerids(struct net_device 
   * Flash command switch table
   */
  
 -int flashcard(struct net_device *dev, aironet_ioctl *comp) {
 +static int flashcard(struct net_device *dev, aironet_ioctl *comp) {
        int z;
 -      int cmdreset(struct airo_info *);
 -      int setflashmode(struct airo_info *);
 -      int flashgchar(struct airo_info *,int,int);
 -      int flashpchar(struct airo_info *,int,int);
 -      int flashputbuf(struct airo_info *);
 -      int flashrestart(struct airo_info *,struct net_device *);
  
        /* Only super-user can modify flash */
        if (!capable(CAP_NET_ADMIN))
   * card.
   */
  
 -int cmdreset(struct airo_info *ai) {
 +static int cmdreset(struct airo_info *ai) {
        disable_MAC(ai, 1);
  
        if(!waitbusy (ai)){
   * mode
   */
  
 -int setflashmode (struct airo_info *ai) {
 +static int setflashmode (struct airo_info *ai) {
        set_bit (FLAG_FLASHING, &ai->flags);
  
        OUT4500(ai, SWS0, FLASH_COMMAND);
   * x 50us for  echo .
   */
  
 -int flashpchar(struct airo_info *ai,int byte,int dwelltime) {
 +static int flashpchar(struct airo_info *ai,int byte,int dwelltime) {
        int echo;
        int waittime;
  
   * Get a character from the card matching matchbyte
   * Step 3)
   */
 -int flashgchar(struct airo_info *ai,int matchbyte,int dwelltime){
 +static int flashgchar(struct airo_info *ai,int matchbyte,int dwelltime){
        int           rchar;
        unsigned char rbyte=0;
  
   * send to the card
   */
  
 -int flashputbuf(struct airo_info *ai){
 +static int flashputbuf(struct airo_info *ai){
        int            nwords;
  
        /* Write stuff */
  /*
   *
   */
 -int flashrestart(struct airo_info *ai,struct net_device *dev){
 +static int flashrestart(struct airo_info *ai,struct net_device *dev){
        int    i,status;
  
        ssleep(1);                      /* Added 12/7/00 */