aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2008-03-19 12:08:32 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-03-25 16:41:50 -0400
commitff829ae01644c10722132a45981615be962c4a5c (patch)
treeb86f3d285af36523a6960400c715f6d596b0c3d2 /drivers
parente98a88dd33b7188ce84533e128101dd9630ae592 (diff)
libertas: store rssi as an u32
Don't store an (hardware base) u8 value in bss_descriptor, but just an unsigned int (RSSI is really unsigned). Compilers generate more efficent code for ints than for bytes. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/libertas/debugfs.c2
-rw-r--r--drivers/net/wireless/libertas/scan.c4
-rw-r--r--drivers/net/wireless/libertas/scan.h7
3 files changed, 4 insertions, 9 deletions
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
index 6d7c0d9b677b..7072e26b42d9 100644
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -78,7 +78,7 @@ static ssize_t lbs_getscantable(struct file *file, char __user *userbuf,
78 u16 spectrum_mgmt = (iter_bss->capability & WLAN_CAPABILITY_SPECTRUM_MGMT); 78 u16 spectrum_mgmt = (iter_bss->capability & WLAN_CAPABILITY_SPECTRUM_MGMT);
79 79
80 pos += snprintf(buf+pos, len-pos, 80 pos += snprintf(buf+pos, len-pos,
81 "%02u| %03d | %04ld | %s |", 81 "%02u| %03d | %04d | %s |",
82 numscansdone, iter_bss->channel, iter_bss->rssi, 82 numscansdone, iter_bss->channel, iter_bss->rssi,
83 print_mac(mac, iter_bss->bssid)); 83 print_mac(mac, iter_bss->bssid));
84 pos += snprintf(buf+pos, len-pos, " %04x-", iter_bss->capability); 84 pos += snprintf(buf+pos, len-pos, " %04x-", iter_bss->capability);
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
index 0598541451d8..3825b7979fc4 100644
--- a/drivers/net/wireless/libertas/scan.c
+++ b/drivers/net/wireless/libertas/scan.c
@@ -602,7 +602,7 @@ static int lbs_scan_networks(struct lbs_private *priv, int full_scan)
602 lbs_deb_scan("scan table:\n"); 602 lbs_deb_scan("scan table:\n");
603 list_for_each_entry(iter, &priv->network_list, list) 603 list_for_each_entry(iter, &priv->network_list, list)
604 lbs_deb_scan("%02d: BSSID %s, RSSI %d, SSID '%s'\n", 604 lbs_deb_scan("%02d: BSSID %s, RSSI %d, SSID '%s'\n",
605 i++, print_mac(mac, iter->bssid), (int)iter->rssi, 605 i++, print_mac(mac, iter->bssid), iter->rssi,
606 escape_essid(iter->ssid, iter->ssid_len)); 606 escape_essid(iter->ssid, iter->ssid_len));
607 mutex_unlock(&priv->lock); 607 mutex_unlock(&priv->lock);
608#endif 608#endif
@@ -948,7 +948,7 @@ struct bss_descriptor *lbs_find_ssid_in_list(struct lbs_private *priv,
948 uint8_t *bssid, uint8_t mode, 948 uint8_t *bssid, uint8_t mode,
949 int channel) 949 int channel)
950{ 950{
951 uint8_t bestrssi = 0; 951 u32 bestrssi = 0;
952 struct bss_descriptor * iter_bss = NULL; 952 struct bss_descriptor * iter_bss = NULL;
953 struct bss_descriptor * found_bss = NULL; 953 struct bss_descriptor * found_bss = NULL;
954 struct bss_descriptor * tmp_oldest = NULL; 954 struct bss_descriptor * tmp_oldest = NULL;
diff --git a/drivers/net/wireless/libertas/scan.h b/drivers/net/wireless/libertas/scan.h
index c50c8b74714b..b50cf1415e04 100644
--- a/drivers/net/wireless/libertas/scan.h
+++ b/drivers/net/wireless/libertas/scan.h
@@ -34,14 +34,9 @@ struct bss_descriptor {
34 u8 ssid_len; 34 u8 ssid_len;
35 35
36 u16 capability; 36 u16 capability;
37 37 u32 rssi;
38 /* receive signal strength in dBm */
39 long rssi;
40
41 u32 channel; 38 u32 channel;
42
43 u16 beaconperiod; 39 u16 beaconperiod;
44
45 u32 atimwindow; 40 u32 atimwindow;
46 41
47 /* IW_MODE_AUTO, IW_MODE_ADHOC, IW_MODE_INFRA */ 42 /* IW_MODE_AUTO, IW_MODE_ADHOC, IW_MODE_INFRA */