aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2007-08-02 13:08:24 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:50:02 -0400
commita783f1ee5b112a0258762877ec7c1ce8810f3cd8 (patch)
tree9f8020ea75e9d4aca94032479b0e9810e4f187ca /drivers/net/wireless/libertas
parentcaef47a0dc2b17ea6fb0119d3678b4b21ae70daa (diff)
[PATCH] libertas: remove adapter->{data,bcn}_avg_factor
Those two variables were initialized with some default values, but there is no code that would ever change them. So we could use as well the defaults directly. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r--drivers/net/wireless/libertas/cmd.c2
-rw-r--r--drivers/net/wireless/libertas/dev.h2
-rw-r--r--drivers/net/wireless/libertas/main.c3
-rw-r--r--drivers/net/wireless/libertas/rx.c4
4 files changed, 3 insertions, 8 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 0da013f3b0d8..72e76e4ec7a9 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -671,7 +671,7 @@ static int wlan_cmd_802_11_rssi(wlan_private * priv,
671 lbs_deb_enter(LBS_DEB_CMD); 671 lbs_deb_enter(LBS_DEB_CMD);
672 cmd->command = cpu_to_le16(CMD_802_11_RSSI); 672 cmd->command = cpu_to_le16(CMD_802_11_RSSI);
673 cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_rssi) + S_DS_GEN); 673 cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_rssi) + S_DS_GEN);
674 cmd->params.rssi.N = cpu_to_le16(priv->adapter->bcn_avg_factor); 674 cmd->params.rssi.N = cpu_to_le16(DEFAULT_BCN_AVG_FACTOR);
675 675
676 /* reset Beacon SNR/NF/RSSI values */ 676 /* reset Beacon SNR/NF/RSSI values */
677 adapter->SNR[TYPE_BEACON][TYPE_NOAVG] = 0; 677 adapter->SNR[TYPE_BEACON][TYPE_NOAVG] = 0;
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h
index 850518e9cbcb..76234000e5bc 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -334,8 +334,6 @@ struct _wlan_adapter {
334 u8 wpa_ie_len; 334 u8 wpa_ie_len;
335 335
336 /** Requested Signal Strength*/ 336 /** Requested Signal Strength*/
337 u16 bcn_avg_factor;
338 u16 data_avg_factor;
339 u16 SNR[MAX_TYPE_B][MAX_TYPE_AVG]; 337 u16 SNR[MAX_TYPE_B][MAX_TYPE_AVG];
340 u16 NF[MAX_TYPE_B][MAX_TYPE_AVG]; 338 u16 NF[MAX_TYPE_B][MAX_TYPE_AVG];
341 u8 RSSI[MAX_TYPE_B][MAX_TYPE_AVG]; 339 u8 RSSI[MAX_TYPE_B][MAX_TYPE_AVG];
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index da418dbe8865..6ba3fa498e99 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -998,9 +998,6 @@ static void wlan_init_adapter(wlan_private * priv)
998 wlan_adapter *adapter = priv->adapter; 998 wlan_adapter *adapter = priv->adapter;
999 int i; 999 int i;
1000 1000
1001 adapter->bcn_avg_factor = DEFAULT_BCN_AVG_FACTOR;
1002 adapter->data_avg_factor = DEFAULT_DATA_AVG_FACTOR;
1003
1004 /* ATIM params */ 1001 /* ATIM params */
1005 adapter->atimwindow = 0; 1002 adapter->atimwindow = 0;
1006 1003
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c
index 2473931f8151..83a7765fd23c 100644
--- a/drivers/net/wireless/libertas/rx.c
+++ b/drivers/net/wireless/libertas/rx.c
@@ -85,12 +85,12 @@ static u8 wlan_getavgnf(wlan_private * priv)
85static void wlan_save_rawSNRNF(wlan_private * priv, struct rxpd *p_rx_pd) 85static void wlan_save_rawSNRNF(wlan_private * priv, struct rxpd *p_rx_pd)
86{ 86{
87 wlan_adapter *adapter = priv->adapter; 87 wlan_adapter *adapter = priv->adapter;
88 if (adapter->numSNRNF < adapter->data_avg_factor) 88 if (adapter->numSNRNF < DEFAULT_DATA_AVG_FACTOR)
89 adapter->numSNRNF++; 89 adapter->numSNRNF++;
90 adapter->rawSNR[adapter->nextSNRNF] = p_rx_pd->snr; 90 adapter->rawSNR[adapter->nextSNRNF] = p_rx_pd->snr;
91 adapter->rawNF[adapter->nextSNRNF] = p_rx_pd->nf; 91 adapter->rawNF[adapter->nextSNRNF] = p_rx_pd->nf;
92 adapter->nextSNRNF++; 92 adapter->nextSNRNF++;
93 if (adapter->nextSNRNF >= adapter->data_avg_factor) 93 if (adapter->nextSNRNF >= DEFAULT_DATA_AVG_FACTOR)
94 adapter->nextSNRNF = 0; 94 adapter->nextSNRNF = 0;
95 return; 95 return;
96} 96}