]> err.no Git - linux-2.6/blobdiff - drivers/net/wireless/airo.c
[CRYPTO]: Use CRYPTO_TFM_REQ_MAY_SLEEP where appropriate
[linux-2.6] / drivers / net / wireless / airo.c
index c12648d8192b7dd7df2ffbbe7bbb68ccd87a30cb..7fdb85dda4e529614b83c8df7c7da9b534efd718 100644 (file)
@@ -1301,7 +1301,7 @@ static int micsetup(struct airo_info *ai) {
        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");
@@ -2374,7 +2374,7 @@ void stop_airo_card( struct net_device *dev, int freeres )
        /*
         * Clean out tx queue
         */
-       if (test_bit(FLAG_MPI, &ai->flags) && skb_queue_len (&ai->txq) > 0) {
+       if (test_bit(FLAG_MPI, &ai->flags) && !skb_queue_empty(&ai->txq)) {
                struct sk_buff *skb = NULL;
                for (;(skb = skb_dequeue(&ai->txq));)
                        dev_kfree_skb(skb);
@@ -3287,7 +3287,7 @@ exitrx:
                                if (status & EV_TXEXC)
                                        get_tx_error(apriv, -1);
                                spin_lock_irqsave(&apriv->aux_lock, flags);
-                               if (skb_queue_len (&apriv->txq)) {
+                               if (!skb_queue_empty(&apriv->txq)) {
                                        spin_unlock_irqrestore(&apriv->aux_lock,flags);
                                        mpi_send_packet (dev);
                                } else {
@@ -5013,7 +5013,7 @@ static void proc_SSID_on_close( struct inode *inode, struct file *file ) {
        enable_MAC(ai, &rsp, 1);
 }
 
-inline static u8 hexVal(char c) {
+static inline u8 hexVal(char c) {
        if (c>='0' && c<='9') return c -= '0';
        if (c>='a' && c<='f') return c -= 'a'-10;
        if (c>='A' && c<='F') return c -= 'A'-10;