Skip to contentSkip to conversation

Staging: rtlwifi: Remove code guarded by undefined macros

PATCH In review Bhanusree Pola 2 participants 2 messages Feb 23, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: rtlwifi: Remove code guarded by undefined macros

removes the code block guarded by never set CONFIG_PM defines

---
 drivers/staging/rtlwifi/base.c | 15 ---------------
 1 file changed, 15 deletions(-)
drivers/staging/rtlwifi/base.c +0 -15
index 35df2cf60619..88838ab9e428 100644
@@ -423,21 +423,6 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
 	/* hw->max_rates = 1; */
 	hw->sta_data_size = sizeof(struct rtl_sta_info);
 
-/* wowlan is not supported by kernel if CONFIG_PM is not defined */
-#ifdef CONFIG_PM
-	if (rtlpriv->psc.wo_wlan_mode) {
-		if (rtlpriv->psc.wo_wlan_mode & WAKE_ON_MAGIC_PACKET)
-			rtlpriv->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT;
-		if (rtlpriv->psc.wo_wlan_mode & WAKE_ON_PATTERN_MATCH) {
-			rtlpriv->wowlan.n_patterns =
-				MAX_SUPPORT_WOL_PATTERN_NUM;
-			rtlpriv->wowlan.pattern_min_len = MIN_WOL_PATTERN_SIZE;
-			rtlpriv->wowlan.pattern_max_len = MAX_WOL_PATTERN_SIZE;
-		}
-		hw->wiphy->wowlan = &rtlpriv->wowlan;
-	}
-#endif
-
 	/* <6> mac address */
 	if (is_valid_ether_addr(rtlefuse->dev_addr)) {
 		SET_IEEE80211_PERM_ADDR(hw, rtlefuse->dev_addr);
Signature · 1 line
2.17.1
#1 lore raw
Quoted 1 line · Bhanusree Pola

removes the code block guarded by never set CONFIG_PM defines

Imperative means no "s". Each sentence in the log message should start with a capital letter and end with a period.

How do you know that CONFIG_PM is never set? The CONFIG means that it is part of the configuration system, so you shouldn't be looking for a #define. You would need to poke around in make menuconfig, maks xconfig, etc, but this could be complex.

julia

Quoted 42 lines
---
 drivers/staging/rtlwifi/base.c | 15 ---------------
 1 file changed, 15 deletions(-)
drivers/staging/rtlwifi/base.c +0 -16
index 35df2cf60619..88838ab9e428 100644
@@ -423,21 +423,6 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
 	/* hw->max_rates = 1; */
 	hw->sta_data_size = sizeof(struct rtl_sta_info);
 
-/* wowlan is not supported by kernel if CONFIG_PM is not defined */
-#ifdef CONFIG_PM
-	if (rtlpriv->psc.wo_wlan_mode) {
-		if (rtlpriv->psc.wo_wlan_mode & WAKE_ON_MAGIC_PACKET)
-			rtlpriv->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT;
-		if (rtlpriv->psc.wo_wlan_mode & WAKE_ON_PATTERN_MATCH) {
-			rtlpriv->wowlan.n_patterns =
-				MAX_SUPPORT_WOL_PATTERN_NUM;
-			rtlpriv->wowlan.pattern_min_len = MIN_WOL_PATTERN_SIZE;
-			rtlpriv->wowlan.pattern_max_len = MAX_WOL_PATTERN_SIZE;
-		}
-		hw->wiphy->wowlan = &rtlpriv->wowlan;
-	}
-#endif
-
 	/* <6> mac address */
 	if (is_valid_ether_addr(rtlefuse->dev_addr)) {
 		SET_IEEE80211_PERM_ADDR(hw, rtlefuse->dev_addr);
--

2.17.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190223141335.6650-1-bhanusreemahesh%40gmail.com.
For more options, visit https://groups.google.com/d/optout.