OSDN Git Service

rtlwifi: Convert the wake_match variable to local
authorLarry Finger <Larry.Finger@lwfinger.net>
Thu, 4 Apr 2019 18:29:31 +0000 (13:29 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 13 Apr 2019 11:15:45 +0000 (14:15 +0300)
In five of the drivers, the contents of bits 29-31 of one of the RX
descriptors is used to set bits in a variable that is used to save the
wakeup condition for output in a debugging statement. The resulting
variable is not used anywhere else even though it is stored in a struct
and could be available in other routines. This variable is changed to be
local.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c.rej [new file with mode: 0644]
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c
drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c
drivers/net/wireless/realtek/rtlwifi/wifi.h

index 2dd0169..483dc8b 100644 (file)
@@ -372,8 +372,9 @@ bool rtl88ee_rx_query_desc(struct ieee80211_hw *hw,
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rx_fwinfo_88e *p_drvinfo;
        struct ieee80211_hdr *hdr;
-
+       u8 wake_match;
        u32 phystatus = GET_RX_DESC_PHYST(pdesc);
+
        status->packet_report_type = (u8)GET_RX_STATUS_DESC_RPT_SEL(pdesc);
        if (status->packet_report_type == TX_REPORT2)
                status->length = (u16)GET_RX_RPT2_DESC_PKT_LEN(pdesc);
@@ -400,17 +401,17 @@ bool rtl88ee_rx_query_desc(struct ieee80211_hw *hw,
 
        status->macid = GET_RX_DESC_MACID(pdesc);
        if (GET_RX_STATUS_DESC_PATTERN_MATCH(pdesc))
-               status->wake_match = BIT(2);
+               wake_match = BIT(2);
        else if (GET_RX_STATUS_DESC_MAGIC_MATCH(pdesc))
-               status->wake_match = BIT(1);
+               wake_match = BIT(1);
        else if (GET_RX_STATUS_DESC_UNICAST_MATCH(pdesc))
-               status->wake_match = BIT(0);
+               wake_match = BIT(0);
        else
-               status->wake_match = 0;
-       if (status->wake_match)
+               wake_match = 0;
+       if (wake_match)
                RT_TRACE(rtlpriv, COMP_RXDESC, DBG_LOUD,
                "GGGGGGGGGGGGGet Wakeup Packet!! WakeMatch=%d\n",
-               status->wake_match);
+               wake_match);
        rx_status->freq = hw->conf.chandef.chan->center_freq;
        rx_status->band = hw->conf.chandef.chan->band;
 
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c.rej b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c.rej
new file mode 100644 (file)
index 0000000..aa03d46
--- /dev/null
@@ -0,0 +1,10 @@
+--- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c
++++ drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c
+@@ -373,6 +373,7 @@ bool rtl88ee_rx_query_desc(struct ieee80211_hw *hw,
+       struct rx_fwinfo_88e *p_drvinfo;
+       struct ieee80211_hdr *hdr;
+       u32 phystatus = GET_RX_DESC_PHYST(pdesc);
++      u8 wake_match;
+       status->packet_report_type = (u8)GET_RX_STATUS_DESC_RPT_SEL(pdesc);
+       if (status->packet_report_type == TX_REPORT2)
index 49a4c84..d297cfc 100644 (file)
@@ -331,6 +331,7 @@ bool rtl92ee_rx_query_desc(struct ieee80211_hw *hw,
        struct rx_fwinfo *p_drvinfo;
        struct ieee80211_hdr *hdr;
        u32 phystatus = GET_RX_DESC_PHYST(pdesc);
+       u8 wake_match;
 
        if (GET_RX_STATUS_DESC_RPT_SEL(pdesc) == 0)
                status->packet_report_type = NORMAL_RX;
@@ -351,17 +352,17 @@ bool rtl92ee_rx_query_desc(struct ieee80211_hw *hw,
 
        status->macid = GET_RX_DESC_MACID(pdesc);
        if (GET_RX_STATUS_DESC_PATTERN_MATCH(pdesc))
-               status->wake_match = BIT(2);
+               wake_match = BIT(2);
        else if (GET_RX_STATUS_DESC_MAGIC_MATCH(pdesc))
-               status->wake_match = BIT(1);
+               wake_match = BIT(1);
        else if (GET_RX_STATUS_DESC_UNICAST_MATCH(pdesc))
-               status->wake_match = BIT(0);
+               wake_match = BIT(0);
        else
-               status->wake_match = 0;
-       if (status->wake_match)
+               wake_match = 0;
+       if (wake_match)
                RT_TRACE(rtlpriv, COMP_RXDESC, DBG_LOUD,
                         "GGGGGGGGGGGGGet Wakeup Packet!! WakeMatch=%d\n",
-                        status->wake_match);
+                        wake_match);
        rx_status->freq = hw->conf.chandef.chan->center_freq;
        rx_status->band = hw->conf.chandef.chan->band;
 
index a382cdc..d87ba03 100644 (file)
@@ -300,7 +300,7 @@ bool rtl8723be_rx_query_desc(struct ieee80211_hw *hw,
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rx_fwinfo_8723be *p_drvinfo;
        struct ieee80211_hdr *hdr;
-
+       u8 wake_match;
        u32 phystatus = GET_RX_DESC_PHYST(pdesc);
 
        status->length = (u16)GET_RX_DESC_PKT_LEN(pdesc);
@@ -330,17 +330,17 @@ bool rtl8723be_rx_query_desc(struct ieee80211_hw *hw,
 
 
        if (GET_RX_STATUS_DESC_PATTERN_MATCH(pdesc))
-               status->wake_match = BIT(2);
+               wake_match = BIT(2);
        else if (GET_RX_STATUS_DESC_MAGIC_MATCH(pdesc))
-               status->wake_match = BIT(1);
+               wake_match = BIT(1);
        else if (GET_RX_STATUS_DESC_UNICAST_MATCH(pdesc))
-               status->wake_match = BIT(0);
+               wake_match = BIT(0);
        else
-               status->wake_match = 0;
-       if (status->wake_match)
+               wake_match = 0;
+       if (wake_match)
                RT_TRACE(rtlpriv, COMP_RXDESC, DBG_LOUD,
                "GGGGGGGGGGGGGet Wakeup Packet!! WakeMatch=%d\n",
-               status->wake_match);
+               wake_match);
        rx_status->freq = hw->conf.chandef.chan->center_freq;
        rx_status->band = hw->conf.chandef.chan->band;
 
index db5e628..7b6faf3 100644 (file)
@@ -436,7 +436,7 @@ bool rtl8821ae_rx_query_desc(struct ieee80211_hw *hw,
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rx_fwinfo_8821ae *p_drvinfo;
        struct ieee80211_hdr *hdr;
-
+       u8 wake_match;
        u32 phystatus = GET_RX_DESC_PHYST(pdesc);
 
        status->length = (u16)GET_RX_DESC_PKT_LEN(pdesc);
@@ -473,18 +473,18 @@ bool rtl8821ae_rx_query_desc(struct ieee80211_hw *hw,
                status->packet_report_type = NORMAL_RX;
 
        if (GET_RX_STATUS_DESC_PATTERN_MATCH(pdesc))
-               status->wake_match = BIT(2);
+               wake_match = BIT(2);
        else if (GET_RX_STATUS_DESC_MAGIC_MATCH(pdesc))
-               status->wake_match = BIT(1);
+               wake_match = BIT(1);
        else if (GET_RX_STATUS_DESC_UNICAST_MATCH(pdesc))
-               status->wake_match = BIT(0);
+               wake_match = BIT(0);
        else
-               status->wake_match = 0;
+               wake_match = 0;
 
-       if (status->wake_match)
+       if (wake_match)
                RT_TRACE(rtlpriv, COMP_RXDESC, DBG_LOUD,
                         "GGGGGGGGGGGGGet Wakeup Packet!! WakeMatch=%d\n",
-                        status->wake_match);
+                        wake_match);
        rx_status->freq = hw->conf.chandef.chan->center_freq;
        rx_status->band = hw->conf.chandef.chan->band;
 
index e32e9ff..518aaa8 100644 (file)
@@ -2138,7 +2138,6 @@ struct rtl_stats {
        u8 packet_report_type;
 
        u32 macid;
-       u8 wake_match;
        u32 bt_rx_rssi_percentage;
        u32 macid_valid_entry[2];
 };