Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a783f1ee5b112a0258762877ec7c1ce8810f3cd8
Commit:     a783f1ee5b112a0258762877ec7c1ce8810f3cd8
Parent:     caef47a0dc2b17ea6fb0119d3678b4b21ae70daa
Author:     Holger Schurig <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 13:08:24 2007 -0400
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 16:50:02 2007 -0700

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 drivers/net/wireless/libertas/cmd.c  |    2 +-
 drivers/net/wireless/libertas/dev.h  |    2 --
 drivers/net/wireless/libertas/main.c |    3 ---
 drivers/net/wireless/libertas/rx.c   |    4 ++--
 4 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/libertas/cmd.c 
b/drivers/net/wireless/libertas/cmd.c
index 0da013f..72e76e4 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,
        lbs_deb_enter(LBS_DEB_CMD);
        cmd->command = cpu_to_le16(CMD_802_11_RSSI);
        cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_rssi) + S_DS_GEN);
-       cmd->params.rssi.N = cpu_to_le16(priv->adapter->bcn_avg_factor);
+       cmd->params.rssi.N = cpu_to_le16(DEFAULT_BCN_AVG_FACTOR);
 
        /* reset Beacon SNR/NF/RSSI values */
        adapter->SNR[TYPE_BEACON][TYPE_NOAVG] = 0;
diff --git a/drivers/net/wireless/libertas/dev.h 
b/drivers/net/wireless/libertas/dev.h
index 850518e..7623400 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -334,8 +334,6 @@ struct _wlan_adapter {
        u8 wpa_ie_len;
 
        /** Requested Signal Strength*/
-       u16 bcn_avg_factor;
-       u16 data_avg_factor;
        u16 SNR[MAX_TYPE_B][MAX_TYPE_AVG];
        u16 NF[MAX_TYPE_B][MAX_TYPE_AVG];
        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 da418db..6ba3fa4 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)
        wlan_adapter *adapter = priv->adapter;
        int i;
 
-       adapter->bcn_avg_factor = DEFAULT_BCN_AVG_FACTOR;
-       adapter->data_avg_factor = DEFAULT_DATA_AVG_FACTOR;
-
        /* ATIM params */
        adapter->atimwindow = 0;
 
diff --git a/drivers/net/wireless/libertas/rx.c 
b/drivers/net/wireless/libertas/rx.c
index 2473931..83a7765 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)
 static void wlan_save_rawSNRNF(wlan_private * priv, struct rxpd *p_rx_pd)
 {
        wlan_adapter *adapter = priv->adapter;
-       if (adapter->numSNRNF < adapter->data_avg_factor)
+       if (adapter->numSNRNF < DEFAULT_DATA_AVG_FACTOR)
                adapter->numSNRNF++;
        adapter->rawSNR[adapter->nextSNRNF] = p_rx_pd->snr;
        adapter->rawNF[adapter->nextSNRNF] = p_rx_pd->nf;
        adapter->nextSNRNF++;
-       if (adapter->nextSNRNF >= adapter->data_avg_factor)
+       if (adapter->nextSNRNF >= DEFAULT_DATA_AVG_FACTOR)
                adapter->nextSNRNF = 0;
        return;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to