diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-09-12 11:43:28 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-12 11:43:28 -0400 |
commit | c925f1ea9ec20a95d46f57810f4a4d69db74580e (patch) | |
tree | 150d09324f1cf6b231bbe1f3791a75f9169470dd /drivers/net/wireless/prism54 | |
parent | 8083e1656211eb1487329923d592ee061d08d7b3 (diff) | |
parent | 884d3a2bad7293e56fe99d9322a1090bfdfd7c4e (diff) |
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream
Diffstat (limited to 'drivers/net/wireless/prism54')
-rw-r--r-- | drivers/net/wireless/prism54/isl_ioctl.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index 0c30fe7e8f7f..c09fbf733b3a 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.c +++ b/drivers/net/wireless/prism54/isl_ioctl.c | |||
@@ -46,6 +46,10 @@ static size_t prism54_wpa_bss_ie_get(islpci_private *priv, u8 *bssid, u8 *wpa_ie | |||
46 | static int prism54_set_wpa(struct net_device *, struct iw_request_info *, | 46 | static int prism54_set_wpa(struct net_device *, struct iw_request_info *, |
47 | __u32 *, char *); | 47 | __u32 *, char *); |
48 | 48 | ||
49 | /* In 500 kbps */ | ||
50 | static const unsigned char scan_rate_list[] = { 2, 4, 11, 22, | ||
51 | 12, 18, 24, 36, | ||
52 | 48, 72, 96, 108 }; | ||
49 | 53 | ||
50 | /** | 54 | /** |
51 | * prism54_mib_mode_helper - MIB change mode helper function | 55 | * prism54_mib_mode_helper - MIB change mode helper function |
@@ -644,6 +648,32 @@ prism54_translate_bss(struct net_device *ndev, char *current_ev, | |||
644 | current_ev = iwe_stream_add_point(current_ev, end_buf, | 648 | current_ev = iwe_stream_add_point(current_ev, end_buf, |
645 | &iwe, wpa_ie); | 649 | &iwe, wpa_ie); |
646 | } | 650 | } |
651 | /* Do the bitrates */ | ||
652 | { | ||
653 | char * current_val = current_ev + IW_EV_LCP_LEN; | ||
654 | int i; | ||
655 | int mask; | ||
656 | |||
657 | iwe.cmd = SIOCGIWRATE; | ||
658 | /* Those two flags are ignored... */ | ||
659 | iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0; | ||
660 | |||
661 | /* Parse the bitmask */ | ||
662 | mask = 0x1; | ||
663 | for(i = 0; i < sizeof(scan_rate_list); i++) { | ||
664 | if(bss->rates & mask) { | ||
665 | iwe.u.bitrate.value = (scan_rate_list[i] * 500000); | ||
666 | current_val = iwe_stream_add_value(current_ev, current_val, | ||
667 | end_buf, &iwe, | ||
668 | IW_EV_PARAM_LEN); | ||
669 | } | ||
670 | mask <<= 1; | ||
671 | } | ||
672 | /* Check if we added any event */ | ||
673 | if ((current_val - current_ev) > IW_EV_LCP_LEN) | ||
674 | current_ev = current_val; | ||
675 | } | ||
676 | |||
647 | return current_ev; | 677 | return current_ev; |
648 | } | 678 | } |
649 | 679 | ||