diff options
Diffstat (limited to 'drivers/net/wireless/airo.c')
-rw-r--r-- | drivers/net/wireless/airo.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 6db1fb6461de..2be65d308fbe 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -1308,7 +1308,7 @@ static int micsetup(struct airo_info *ai) { | |||
1308 | int i; | 1308 | int i; |
1309 | 1309 | ||
1310 | if (ai->tfm == NULL) | 1310 | if (ai->tfm == NULL) |
1311 | ai->tfm = crypto_alloc_tfm("aes", 0); | 1311 | ai->tfm = crypto_alloc_tfm("aes", CRYPTO_TFM_REQ_MAY_SLEEP); |
1312 | 1312 | ||
1313 | if (ai->tfm == NULL) { | 1313 | if (ai->tfm == NULL) { |
1314 | printk(KERN_ERR "airo: failed to load transform for AES\n"); | 1314 | printk(KERN_ERR "airo: failed to load transform for AES\n"); |
@@ -2239,7 +2239,7 @@ static void airo_read_stats(struct airo_info *ai) { | |||
2239 | u32 *vals = stats_rid.vals; | 2239 | u32 *vals = stats_rid.vals; |
2240 | 2240 | ||
2241 | clear_bit(JOB_STATS, &ai->flags); | 2241 | clear_bit(JOB_STATS, &ai->flags); |
2242 | if (ai->power) { | 2242 | if (ai->power.event) { |
2243 | up(&ai->sem); | 2243 | up(&ai->sem); |
2244 | return; | 2244 | return; |
2245 | } | 2245 | } |
@@ -2410,8 +2410,7 @@ void stop_airo_card( struct net_device *dev, int freeres ) | |||
2410 | } | 2410 | } |
2411 | } | 2411 | } |
2412 | #ifdef MICSUPPORT | 2412 | #ifdef MICSUPPORT |
2413 | if (ai->tfm) | 2413 | crypto_free_tfm(ai->tfm); |
2414 | crypto_free_tfm(ai->tfm); | ||
2415 | #endif | 2414 | #endif |
2416 | del_airo_dev( dev ); | 2415 | del_airo_dev( dev ); |
2417 | free_netdev( dev ); | 2416 | free_netdev( dev ); |
@@ -2969,7 +2968,7 @@ static int airo_thread(void *data) { | |||
2969 | break; | 2968 | break; |
2970 | } | 2969 | } |
2971 | 2970 | ||
2972 | if (ai->power || test_bit(FLAG_FLASHING, &ai->flags)) { | 2971 | if (ai->power.event || test_bit(FLAG_FLASHING, &ai->flags)) { |
2973 | up(&ai->sem); | 2972 | up(&ai->sem); |
2974 | continue; | 2973 | continue; |
2975 | } | 2974 | } |
@@ -3259,7 +3258,7 @@ badrx: | |||
3259 | wstats.noise = apriv->wstats.qual.noise; | 3258 | wstats.noise = apriv->wstats.qual.noise; |
3260 | wstats.updated = IW_QUAL_LEVEL_UPDATED | 3259 | wstats.updated = IW_QUAL_LEVEL_UPDATED |
3261 | | IW_QUAL_QUAL_UPDATED | 3260 | | IW_QUAL_QUAL_UPDATED |
3262 | | IW_QUAL_NOISE_UPDATED; | 3261 | | IW_QUAL_DBM; |
3263 | /* Update spy records */ | 3262 | /* Update spy records */ |
3264 | wireless_spy_update(dev, sa, &wstats); | 3263 | wireless_spy_update(dev, sa, &wstats); |
3265 | } | 3264 | } |
@@ -3605,7 +3604,7 @@ void mpi_receive_802_11 (struct airo_info *ai) | |||
3605 | wstats.noise = ai->wstats.qual.noise; | 3604 | wstats.noise = ai->wstats.qual.noise; |
3606 | wstats.updated = IW_QUAL_QUAL_UPDATED | 3605 | wstats.updated = IW_QUAL_QUAL_UPDATED |
3607 | | IW_QUAL_LEVEL_UPDATED | 3606 | | IW_QUAL_LEVEL_UPDATED |
3608 | | IW_QUAL_NOISE_UPDATED; | 3607 | | IW_QUAL_DBM; |
3609 | /* Update spy records */ | 3608 | /* Update spy records */ |
3610 | wireless_spy_update(ai->dev, sa, &wstats); | 3609 | wireless_spy_update(ai->dev, sa, &wstats); |
3611 | } | 3610 | } |
@@ -5521,7 +5520,7 @@ static int airo_pci_resume(struct pci_dev *pdev) | |||
5521 | pci_restore_state(pdev); | 5520 | pci_restore_state(pdev); |
5522 | pci_enable_wake(pdev, pci_choose_state(pdev, ai->power), 0); | 5521 | pci_enable_wake(pdev, pci_choose_state(pdev, ai->power), 0); |
5523 | 5522 | ||
5524 | if (ai->power > 1) { | 5523 | if (ai->power.event > 1) { |
5525 | reset_card(dev, 0); | 5524 | reset_card(dev, 0); |
5526 | mpi_init_descriptors(ai); | 5525 | mpi_init_descriptors(ai); |
5527 | setup_card(ai, dev->dev_addr, 0); | 5526 | setup_card(ai, dev->dev_addr, 0); |
@@ -6490,22 +6489,20 @@ static int airo_get_range(struct net_device *dev, | |||
6490 | range->max_qual.qual = 100; /* % */ | 6489 | range->max_qual.qual = 100; /* % */ |
6491 | else | 6490 | else |
6492 | range->max_qual.qual = airo_get_max_quality(&cap_rid); | 6491 | range->max_qual.qual = airo_get_max_quality(&cap_rid); |
6493 | range->max_qual.level = 0; /* 0 means we use dBm */ | 6492 | range->max_qual.level = 0x100 - 120; /* -120 dBm */ |
6494 | range->max_qual.noise = 0; | 6493 | range->max_qual.noise = 0x100 - 120; /* -120 dBm */ |
6495 | range->max_qual.updated = 0; | ||
6496 | 6494 | ||
6497 | /* Experimental measurements - boundary 11/5.5 Mb/s */ | 6495 | /* Experimental measurements - boundary 11/5.5 Mb/s */ |
6498 | /* Note : with or without the (local->rssi), results | 6496 | /* Note : with or without the (local->rssi), results |
6499 | * are somewhat different. - Jean II */ | 6497 | * are somewhat different. - Jean II */ |
6500 | if (local->rssi) { | 6498 | if (local->rssi) { |
6501 | range->avg_qual.qual = 50; /* % */ | 6499 | range->avg_qual.qual = 50; /* % */ |
6502 | range->avg_qual.level = 186; /* -70 dBm */ | 6500 | range->avg_qual.level = 0x100 - 70; /* -70 dBm */ |
6503 | } else { | 6501 | } else { |
6504 | range->avg_qual.qual = airo_get_avg_quality(&cap_rid); | 6502 | range->avg_qual.qual = airo_get_avg_quality(&cap_rid); |
6505 | range->avg_qual.level = 176; /* -80 dBm */ | 6503 | range->avg_qual.level = 0x100 - 80; /* -80 dBm */ |
6506 | } | 6504 | } |
6507 | range->avg_qual.noise = 0; | 6505 | range->avg_qual.noise = 0x100 - 85; /* -85 dBm */ |
6508 | range->avg_qual.updated = 0; | ||
6509 | 6506 | ||
6510 | for(i = 0 ; i < 8 ; i++) { | 6507 | for(i = 0 ; i < 8 ; i++) { |
6511 | range->bitrate[i] = cap_rid.supportedRates[i] * 500000; | 6508 | range->bitrate[i] = cap_rid.supportedRates[i] * 500000; |
@@ -6728,15 +6725,17 @@ static int airo_get_aplist(struct net_device *dev, | |||
6728 | if (local->rssi) { | 6725 | if (local->rssi) { |
6729 | qual[i].level = 0x100 - BSSList.dBm; | 6726 | qual[i].level = 0x100 - BSSList.dBm; |
6730 | qual[i].qual = airo_dbm_to_pct( local->rssi, BSSList.dBm ); | 6727 | qual[i].qual = airo_dbm_to_pct( local->rssi, BSSList.dBm ); |
6731 | qual[i].updated = IW_QUAL_QUAL_UPDATED; | 6728 | qual[i].updated = IW_QUAL_QUAL_UPDATED |
6729 | | IW_QUAL_LEVEL_UPDATED | ||
6730 | | IW_QUAL_DBM; | ||
6732 | } else { | 6731 | } else { |
6733 | qual[i].level = (BSSList.dBm + 321) / 2; | 6732 | qual[i].level = (BSSList.dBm + 321) / 2; |
6734 | qual[i].qual = 0; | 6733 | qual[i].qual = 0; |
6735 | qual[i].updated = IW_QUAL_QUAL_INVALID; | 6734 | qual[i].updated = IW_QUAL_QUAL_INVALID |
6735 | | IW_QUAL_LEVEL_UPDATED | ||
6736 | | IW_QUAL_DBM; | ||
6736 | } | 6737 | } |
6737 | qual[i].noise = local->wstats.qual.noise; | 6738 | qual[i].noise = local->wstats.qual.noise; |
6738 | qual[i].updated = IW_QUAL_LEVEL_UPDATED | ||
6739 | | IW_QUAL_NOISE_UPDATED; | ||
6740 | if (BSSList.index == 0xffff) | 6739 | if (BSSList.index == 0xffff) |
6741 | break; | 6740 | break; |
6742 | } | 6741 | } |
@@ -6862,15 +6861,17 @@ static inline char *airo_translate_scan(struct net_device *dev, | |||
6862 | if (ai->rssi) { | 6861 | if (ai->rssi) { |
6863 | iwe.u.qual.level = 0x100 - bss->dBm; | 6862 | iwe.u.qual.level = 0x100 - bss->dBm; |
6864 | iwe.u.qual.qual = airo_dbm_to_pct( ai->rssi, bss->dBm ); | 6863 | iwe.u.qual.qual = airo_dbm_to_pct( ai->rssi, bss->dBm ); |
6865 | iwe.u.qual.updated = IW_QUAL_QUAL_UPDATED; | 6864 | iwe.u.qual.updated = IW_QUAL_QUAL_UPDATED |
6865 | | IW_QUAL_LEVEL_UPDATED | ||
6866 | | IW_QUAL_DBM; | ||
6866 | } else { | 6867 | } else { |
6867 | iwe.u.qual.level = (bss->dBm + 321) / 2; | 6868 | iwe.u.qual.level = (bss->dBm + 321) / 2; |
6868 | iwe.u.qual.qual = 0; | 6869 | iwe.u.qual.qual = 0; |
6869 | iwe.u.qual.updated = IW_QUAL_QUAL_INVALID; | 6870 | iwe.u.qual.updated = IW_QUAL_QUAL_INVALID |
6871 | | IW_QUAL_LEVEL_UPDATED | ||
6872 | | IW_QUAL_DBM; | ||
6870 | } | 6873 | } |
6871 | iwe.u.qual.noise = ai->wstats.qual.noise; | 6874 | iwe.u.qual.noise = ai->wstats.qual.noise; |
6872 | iwe.u.qual.updated = IW_QUAL_LEVEL_UPDATED | ||
6873 | | IW_QUAL_NOISE_UPDATED; | ||
6874 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_QUAL_LEN); | 6875 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_QUAL_LEN); |
6875 | 6876 | ||
6876 | /* Add encryption capability */ | 6877 | /* Add encryption capability */ |
@@ -7123,7 +7124,7 @@ static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
7123 | int rc = 0; | 7124 | int rc = 0; |
7124 | struct airo_info *ai = (struct airo_info *)dev->priv; | 7125 | struct airo_info *ai = (struct airo_info *)dev->priv; |
7125 | 7126 | ||
7126 | if (ai->power) | 7127 | if (ai->power.event) |
7127 | return 0; | 7128 | return 0; |
7128 | 7129 | ||
7129 | switch (cmd) { | 7130 | switch (cmd) { |
@@ -7202,7 +7203,7 @@ static void airo_read_wireless_stats(struct airo_info *local) | |||
7202 | 7203 | ||
7203 | /* Get stats out of the card */ | 7204 | /* Get stats out of the card */ |
7204 | clear_bit(JOB_WSTATS, &local->flags); | 7205 | clear_bit(JOB_WSTATS, &local->flags); |
7205 | if (local->power) { | 7206 | if (local->power.event) { |
7206 | up(&local->sem); | 7207 | up(&local->sem); |
7207 | return; | 7208 | return; |
7208 | } | 7209 | } |
@@ -7223,13 +7224,12 @@ static void airo_read_wireless_stats(struct airo_info *local) | |||
7223 | local->wstats.qual.level = (status_rid.normalizedSignalStrength + 321) / 2; | 7224 | local->wstats.qual.level = (status_rid.normalizedSignalStrength + 321) / 2; |
7224 | local->wstats.qual.qual = airo_get_quality(&status_rid, &cap_rid); | 7225 | local->wstats.qual.qual = airo_get_quality(&status_rid, &cap_rid); |
7225 | } | 7226 | } |
7226 | local->wstats.qual.updated = IW_QUAL_QUAL_UPDATED | IW_QUAL_LEVEL_UPDATED; | ||
7227 | if (status_rid.len >= 124) { | 7227 | if (status_rid.len >= 124) { |
7228 | local->wstats.qual.noise = 0x100 - status_rid.noisedBm; | 7228 | local->wstats.qual.noise = 0x100 - status_rid.noisedBm; |
7229 | local->wstats.qual.updated |= IW_QUAL_NOISE_UPDATED; | 7229 | local->wstats.qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM; |
7230 | } else { | 7230 | } else { |
7231 | local->wstats.qual.noise = 0; | 7231 | local->wstats.qual.noise = 0; |
7232 | local->wstats.qual.updated |= IW_QUAL_NOISE_INVALID; | 7232 | local->wstats.qual.updated = IW_QUAL_QUAL_UPDATED | IW_QUAL_LEVEL_UPDATED | IW_QUAL_NOISE_INVALID | IW_QUAL_DBM; |
7233 | } | 7233 | } |
7234 | 7234 | ||
7235 | /* Packets discarded in the wireless adapter due to wireless | 7235 | /* Packets discarded in the wireless adapter due to wireless |