Staging: rtl8192e: Move static variable to device struct
authorMike McCormack <mikem@ring3k.org>
Mon, 31 Jan 2011 13:10:12 +0000 (22:10 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 31 Jan 2011 21:57:05 +0000 (13:57 -0800)
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rtl8192e/r8192E.h
drivers/staging/rtl8192e/r8192E_core.c

index 0189a3d290e85a1086b0c6e37b08823fc949269a..a8b69d3960ae3693b828e558e366b02883589aa7 100644 (file)
@@ -975,6 +975,10 @@ typedef struct r8192_priv
        bool    bLastDTPFlag_High;
        bool    bLastDTPFlag_Low;
 
+       /* OFDM RSSI. For high power or not */
+       u8      phy_check_reg824;
+       u32     phy_reg824_bit9;
+
        //Add by amy for Rate Adaptive
        rate_adaptive rate_adaptive;
        //Add by amy for TX power tracking
index c5be6bcbd49f19f4f020bfbf5b1e8630f69afc15..bb86f93c00863189d49685c1719eec7593b5b4a1 100644 (file)
@@ -5001,10 +5001,6 @@ static void rtl8192_query_rxphystatus(
        u8                              is_cck_rate=0;
        u8                              rf_rx_num = 0;
 
-       /* 2007/07/04 MH For OFDM RSSI. For high power or not. */
-       static  u8              check_reg824 = 0;
-       static  u32             reg824_bit9 = 0;
-
        is_cck_rate = rx_hal_is_cck_rate(pdrvinfo);
 
        // Record it for next packet processing
@@ -5015,10 +5011,10 @@ static void rtl8192_query_rxphystatus(
        pstats->bPacketBeacon = precord_stats->bPacketBeacon = bPacketBeacon;
        pstats->bToSelfBA = precord_stats->bToSelfBA = bToSelfBA;
        /*2007.08.30 requested by SD3 Jerry */
-       if(check_reg824 == 0)
+       if (priv->phy_check_reg824 == 0)
        {
-               reg824_bit9 = rtl8192_QueryBBReg(priv->ieee80211->dev, rFPGA0_XA_HSSIParameter2, 0x200);
-               check_reg824 = 1;
+               priv->phy_reg824_bit9 = rtl8192_QueryBBReg(priv->ieee80211->dev, rFPGA0_XA_HSSIParameter2, 0x200);
+               priv->phy_check_reg824 = 1;
        }
 
 
@@ -5064,7 +5060,7 @@ static void rtl8192_query_rxphystatus(
                }
 #endif
 
-               if(!reg824_bit9)
+               if (!priv->phy_reg824_bit9)
                {
                        report = pcck_buf->cck_agc_rpt & 0xc0;
                        report = report>>6;