aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/airo.c
diff options
context:
space:
mode:
authorJean Tourrilhes <jt@hpl.hp.com>2005-09-02 14:45:10 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-06 22:45:14 -0400
commitce6623c3d8f932a15306355a7c9a0cdfdd6a26ec (patch)
treedcf668df052a28ffa94bb30c1056f760c6858320 /drivers/net/wireless/airo.c
parent61bd49631474c8763676a6ac72461cb523ddb78a (diff)
[PATCH] airo : WE-19 support
Dan Williams already included most parts of my WE-19 patch for the airo driver in the kernel. There was just a few bits he could not do because WE-19 itself was not in the kernel. Those are the missing bits. Tested with 2.6.13 (with real HW). Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/wireless/airo.c')
-rw-r--r--drivers/net/wireless/airo.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index dbcb5a8a2194..89c2ff9570d5 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -3258,7 +3258,7 @@ badrx:
3258 wstats.noise = apriv->wstats.qual.noise; 3258 wstats.noise = apriv->wstats.qual.noise;
3259 wstats.updated = IW_QUAL_LEVEL_UPDATED 3259 wstats.updated = IW_QUAL_LEVEL_UPDATED
3260 | IW_QUAL_QUAL_UPDATED 3260 | IW_QUAL_QUAL_UPDATED
3261 | IW_QUAL_NOISE_UPDATED; 3261 | IW_QUAL_DBM;
3262 /* Update spy records */ 3262 /* Update spy records */
3263 wireless_spy_update(dev, sa, &wstats); 3263 wireless_spy_update(dev, sa, &wstats);
3264 } 3264 }
@@ -3604,7 +3604,7 @@ void mpi_receive_802_11 (struct airo_info *ai)
3604 wstats.noise = ai->wstats.qual.noise; 3604 wstats.noise = ai->wstats.qual.noise;
3605 wstats.updated = IW_QUAL_QUAL_UPDATED 3605 wstats.updated = IW_QUAL_QUAL_UPDATED
3606 | IW_QUAL_LEVEL_UPDATED 3606 | IW_QUAL_LEVEL_UPDATED
3607 | IW_QUAL_NOISE_UPDATED; 3607 | IW_QUAL_DBM;
3608 /* Update spy records */ 3608 /* Update spy records */
3609 wireless_spy_update(ai->dev, sa, &wstats); 3609 wireless_spy_update(ai->dev, sa, &wstats);
3610 } 3610 }
@@ -6489,22 +6489,20 @@ static int airo_get_range(struct net_device *dev,
6489 range->max_qual.qual = 100; /* % */ 6489 range->max_qual.qual = 100; /* % */
6490 else 6490 else
6491 range->max_qual.qual = airo_get_max_quality(&cap_rid); 6491 range->max_qual.qual = airo_get_max_quality(&cap_rid);
6492 range->max_qual.level = 0; /* 0 means we use dBm */ 6492 range->max_qual.level = 0x100 - 120; /* -120 dBm */
6493 range->max_qual.noise = 0; 6493 range->max_qual.noise = 0x100 - 120; /* -120 dBm */
6494 range->max_qual.updated = 0;
6495 6494
6496 /* Experimental measurements - boundary 11/5.5 Mb/s */ 6495 /* Experimental measurements - boundary 11/5.5 Mb/s */
6497 /* Note : with or without the (local->rssi), results 6496 /* Note : with or without the (local->rssi), results
6498 * are somewhat different. - Jean II */ 6497 * are somewhat different. - Jean II */
6499 if (local->rssi) { 6498 if (local->rssi) {
6500 range->avg_qual.qual = 50; /* % */ 6499 range->avg_qual.qual = 50; /* % */
6501 range->avg_qual.level = 186; /* -70 dBm */ 6500 range->avg_qual.level = 0x100 - 70; /* -70 dBm */
6502 } else { 6501 } else {
6503 range->avg_qual.qual = airo_get_avg_quality(&cap_rid); 6502 range->avg_qual.qual = airo_get_avg_quality(&cap_rid);
6504 range->avg_qual.level = 176; /* -80 dBm */ 6503 range->avg_qual.level = 0x100 - 80; /* -80 dBm */
6505 } 6504 }
6506 range->avg_qual.noise = 0; 6505 range->avg_qual.noise = 0x100 - 85; /* -85 dBm */
6507 range->avg_qual.updated = 0;
6508 6506
6509 for(i = 0 ; i < 8 ; i++) { 6507 for(i = 0 ; i < 8 ; i++) {
6510 range->bitrate[i] = cap_rid.supportedRates[i] * 500000; 6508 range->bitrate[i] = cap_rid.supportedRates[i] * 500000;
@@ -6727,15 +6725,17 @@ static int airo_get_aplist(struct net_device *dev,
6727 if (local->rssi) { 6725 if (local->rssi) {
6728 qual[i].level = 0x100 - BSSList.dBm; 6726 qual[i].level = 0x100 - BSSList.dBm;
6729 qual[i].qual = airo_dbm_to_pct( local->rssi, BSSList.dBm ); 6727 qual[i].qual = airo_dbm_to_pct( local->rssi, BSSList.dBm );
6730 qual[i].updated = IW_QUAL_QUAL_UPDATED; 6728 qual[i].updated = IW_QUAL_QUAL_UPDATED
6729 | IW_QUAL_LEVEL_UPDATED
6730 | IW_QUAL_DBM;
6731 } else { 6731 } else {
6732 qual[i].level = (BSSList.dBm + 321) / 2; 6732 qual[i].level = (BSSList.dBm + 321) / 2;
6733 qual[i].qual = 0; 6733 qual[i].qual = 0;
6734 qual[i].updated = IW_QUAL_QUAL_INVALID; 6734 qual[i].updated = IW_QUAL_QUAL_INVALID
6735 | IW_QUAL_LEVEL_UPDATED
6736 | IW_QUAL_DBM;
6735 } 6737 }
6736 qual[i].noise = local->wstats.qual.noise; 6738 qual[i].noise = local->wstats.qual.noise;
6737 qual[i].updated = IW_QUAL_LEVEL_UPDATED
6738 | IW_QUAL_NOISE_UPDATED;
6739 if (BSSList.index == 0xffff) 6739 if (BSSList.index == 0xffff)
6740 break; 6740 break;
6741 } 6741 }
@@ -6861,15 +6861,17 @@ static inline char *airo_translate_scan(struct net_device *dev,
6861 if (ai->rssi) { 6861 if (ai->rssi) {
6862 iwe.u.qual.level = 0x100 - bss->dBm; 6862 iwe.u.qual.level = 0x100 - bss->dBm;
6863 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 );
6864 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;
6865 } else { 6867 } else {
6866 iwe.u.qual.level = (bss->dBm + 321) / 2; 6868 iwe.u.qual.level = (bss->dBm + 321) / 2;
6867 iwe.u.qual.qual = 0; 6869 iwe.u.qual.qual = 0;
6868 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;
6869 } 6873 }
6870 iwe.u.qual.noise = ai->wstats.qual.noise; 6874 iwe.u.qual.noise = ai->wstats.qual.noise;
6871 iwe.u.qual.updated = IW_QUAL_LEVEL_UPDATED
6872 | IW_QUAL_NOISE_UPDATED;
6873 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);
6874 6876
6875 /* Add encryption capability */ 6877 /* Add encryption capability */
@@ -7222,13 +7224,12 @@ static void airo_read_wireless_stats(struct airo_info *local)
7222 local->wstats.qual.level = (status_rid.normalizedSignalStrength + 321) / 2; 7224 local->wstats.qual.level = (status_rid.normalizedSignalStrength + 321) / 2;
7223 local->wstats.qual.qual = airo_get_quality(&status_rid, &cap_rid); 7225 local->wstats.qual.qual = airo_get_quality(&status_rid, &cap_rid);
7224 } 7226 }
7225 local->wstats.qual.updated = IW_QUAL_QUAL_UPDATED | IW_QUAL_LEVEL_UPDATED;
7226 if (status_rid.len >= 124) { 7227 if (status_rid.len >= 124) {
7227 local->wstats.qual.noise = 0x100 - status_rid.noisedBm; 7228 local->wstats.qual.noise = 0x100 - status_rid.noisedBm;
7228 local->wstats.qual.updated |= IW_QUAL_NOISE_UPDATED; 7229 local->wstats.qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM;
7229 } else { 7230 } else {
7230 local->wstats.qual.noise = 0; 7231 local->wstats.qual.noise = 0;
7231 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;
7232 } 7233 }
7233 7234
7234 /* Packets discarded in the wireless adapter due to wireless 7235 /* Packets discarded in the wireless adapter due to wireless