All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Convert drivers to a common rtl_phy_scan_operation_backup() routine
@ 2013-09-26 18:25 Larry Finger
  2013-09-26 18:25 ` [PATCH 1/7] rtlwifi: Implement " Larry Finger
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Larry Finger @ 2013-09-26 18:25 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Larry Finger, netdev

Several of the driver implement this routine using the same code. This set
of patches creates a common routine in driver rtlwifi, converts each of the
drivers to use the new routine, and then deletes the now unused old code.

These patches rely on two prerequisite patches:

[PATCH 11/11] rtlwifi: Remove extern from function prototypes by Joe Perches
TCH] rtlwifi: remove duplicate declarations and macros in headers by Catalin Iacob

None of these patches fix any bugs. They merely reduce the size of the source code,
thus they need no particular priority.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---

Larry Finger (7):
  rtlwifi: Implement a common rtl_phy_scan_operation_backup() routine
  rtlwifi: rtl8192cu: Convert to use new rtl_phy_scan_operation_backup()
    routine
  rtlwifi: rtl8192ce: Convert driver to use new
    rtl_phy_scan_operation_backup() routine
  rtlwifi: rtl8192c: Remove rtl8192c_phy_scan_operation_backup()
  rtlwifi: rtl8192ce: Convert driver to use new
    rtl_phy_scan_operation_backup() routine
  rtlwifi: rtl8723ae: Convert driver to use new
    rtl_phy_scan_operation_backup() routine
  rtlwifi: rtl8188ee: Convert driver to use new
    rtl_phy_scan_operation_backup() routine

 drivers/net/wireless/rtlwifi/base.c                | 29 +++++++++++++++++++++
 drivers/net/wireless/rtlwifi/base.h                |  1 +
 drivers/net/wireless/rtlwifi/rtl8188ee/phy.c       | 28 --------------------
 drivers/net/wireless/rtlwifi/rtl8188ee/phy.h       |  1 -
 drivers/net/wireless/rtlwifi/rtl8188ee/sw.c        |  3 ++-
 drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c | 30 ----------------------
 drivers/net/wireless/rtlwifi/rtl8192c/phy_common.h |  2 --
 drivers/net/wireless/rtlwifi/rtl8192ce/phy.h       |  1 -
 drivers/net/wireless/rtlwifi/rtl8192ce/sw.c        |  3 ++-
 drivers/net/wireless/rtlwifi/rtl8192cu/sw.c        |  3 ++-
 drivers/net/wireless/rtlwifi/rtl8192de/phy.c       | 28 --------------------
 drivers/net/wireless/rtlwifi/rtl8192de/phy.h       |  1 -
 drivers/net/wireless/rtlwifi/rtl8192de/sw.c        |  3 ++-
 drivers/net/wireless/rtlwifi/rtl8723ae/phy.c       | 29 ---------------------
 drivers/net/wireless/rtlwifi/rtl8723ae/phy.h       |  1 -
 drivers/net/wireless/rtlwifi/rtl8723ae/sw.c        |  3 ++-
 16 files changed, 40 insertions(+), 126 deletions(-)

-- 
1.8.1.4


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/7] rtlwifi: Implement a common rtl_phy_scan_operation_backup() routine
  2013-09-26 18:25 [PATCH 0/7] Convert drivers to a common rtl_phy_scan_operation_backup() routine Larry Finger
@ 2013-09-26 18:25 ` Larry Finger
  2013-09-26 18:25 ` [PATCH 2/7] rtlwifi: rtl8192cu: Convert to use new " Larry Finger
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Larry Finger @ 2013-09-26 18:25 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Larry Finger, netdev

Several of the drivers supported by rtlwifi individually implement the same
routine that supports scans. As a first step, create this routine in
driver rtlwifi.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
 drivers/net/wireless/rtlwifi/base.c | 29 +++++++++++++++++++++++++++++
 drivers/net/wireless/rtlwifi/base.h |  1 +
 2 files changed, 30 insertions(+)

diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index 8bb4a9a..9a78e3d 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -1613,6 +1613,35 @@ err_free:
 }
 EXPORT_SYMBOL(rtl_send_smps_action);
 
+void rtl_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation)
+{
+	struct rtl_priv *rtlpriv = rtl_priv(hw);
+	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
+	enum io_type iotype;
+
+	if (!is_hal_stop(rtlhal)) {
+		switch (operation) {
+		case SCAN_OPT_BACKUP:
+			iotype = IO_CMD_PAUSE_DM_BY_SCAN;
+			rtlpriv->cfg->ops->set_hw_reg(hw,
+						      HW_VAR_IO_CMD,
+						      (u8 *)&iotype);
+			break;
+		case SCAN_OPT_RESTORE:
+			iotype = IO_CMD_RESUME_DM_BY_SCAN;
+			rtlpriv->cfg->ops->set_hw_reg(hw,
+						      HW_VAR_IO_CMD,
+						      (u8 *)&iotype);
+			break;
+		default:
+			RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
+				 "Unknown Scan Backup operation.\n");
+			break;
+		}
+	}
+}
+EXPORT_SYMBOL(rtl_phy_scan_operation_backup);
+
 /* There seem to be issues in mac80211 regarding when del ba frames can be
  * received. As a work around, we make a fake del_ba if we receive a ba_req;
  * however, rx_agg was opened to let mac80211 release some ba related
diff --git a/drivers/net/wireless/rtlwifi/base.h b/drivers/net/wireless/rtlwifi/base.h
index c07f114..0cd0742 100644
--- a/drivers/net/wireless/rtlwifi/base.h
+++ b/drivers/net/wireless/rtlwifi/base.h
@@ -152,5 +152,6 @@ int rtlwifi_rate_mapping(struct ieee80211_hw *hw,
 bool rtl_tx_mgmt_proc(struct ieee80211_hw *hw, struct sk_buff *skb);
 struct sk_buff *rtl_make_del_ba(struct ieee80211_hw *hw,
 				u8 *sa, u8 *bssid, u16 tid);
+void rtl_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation);
 
 #endif
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/7] rtlwifi: rtl8192cu: Convert to use new rtl_phy_scan_operation_backup() routine
  2013-09-26 18:25 [PATCH 0/7] Convert drivers to a common rtl_phy_scan_operation_backup() routine Larry Finger
  2013-09-26 18:25 ` [PATCH 1/7] rtlwifi: Implement " Larry Finger
@ 2013-09-26 18:25 ` Larry Finger
  2013-09-26 18:25   ` Larry Finger
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Larry Finger @ 2013-09-26 18:25 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Larry Finger, netdev

Now that the routine exists in driver rtlwifi, convert rtl8192cu to use it.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
 drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
index 2bd5985..9936de7 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
@@ -31,6 +31,7 @@
 #include "../core.h"
 #include "../usb.h"
 #include "../efuse.h"
+#include "../base.h"
 #include "reg.h"
 #include "def.h"
 #include "phy.h"
@@ -117,7 +118,7 @@ static struct rtl_hal_ops rtl8192cu_hal_ops = {
 	.set_bw_mode = rtl92c_phy_set_bw_mode,
 	.switch_channel = rtl92c_phy_sw_chnl,
 	.dm_watchdog = rtl92c_dm_watchdog,
-	.scan_operation_backup = rtl92c_phy_scan_operation_backup,
+	.scan_operation_backup = rtl_phy_scan_operation_backup,
 	.set_rf_power_state = rtl92cu_phy_set_rf_power_state,
 	.led_control = rtl92cu_led_control,
 	.enable_hw_sec = rtl92cu_enable_hw_security_config,
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/7] rtlwifi: rtl8192ce: Convert driver to use new rtl_phy_scan_operation_backup() routine
@ 2013-09-26 18:25   ` Larry Finger
  0 siblings, 0 replies; 9+ messages in thread
From: Larry Finger @ 2013-09-26 18:25 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Larry Finger, netdev

Now that rtl_phy_scan_operation_backup() exists, convert rtl8192ce to use it.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
 drivers/net/wireless/rtlwifi/rtl8192ce/phy.h | 1 -
 drivers/net/wireless/rtlwifi/rtl8192ce/sw.c  | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h
index bb319b0..ff32b5b 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h
@@ -202,7 +202,6 @@ void rtl92c_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw);
 void rtl92c_phy_get_txpower_level(struct ieee80211_hw *hw, long *powerlevel);
 void rtl92c_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel);
 bool rtl92c_phy_update_txpower_dbm(struct ieee80211_hw *hw, long power_indbm);
-void rtl92c_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation);
 void rtl92c_phy_set_bw_mode(struct ieee80211_hw *hw,
 			    enum nl80211_channel_type ch_type);
 void rtl92c_phy_sw_chnl_callback(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
index 1420356..b790320 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
@@ -30,6 +30,7 @@
 #include "../wifi.h"
 #include "../core.h"
 #include "../pci.h"
+#include "../base.h"
 #include "reg.h"
 #include "def.h"
 #include "phy.h"
@@ -219,7 +220,7 @@ static struct rtl_hal_ops rtl8192ce_hal_ops = {
 	.set_bw_mode = rtl92c_phy_set_bw_mode,
 	.switch_channel = rtl92c_phy_sw_chnl,
 	.dm_watchdog = rtl92c_dm_watchdog,
-	.scan_operation_backup = rtl92c_phy_scan_operation_backup,
+	.scan_operation_backup = rtl_phy_scan_operation_backup,
 	.set_rf_power_state = rtl92c_phy_set_rf_power_state,
 	.led_control = rtl92ce_led_control,
 	.set_desc = rtl92ce_set_desc,
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/7] rtlwifi: rtl8192ce: Convert driver to use new rtl_phy_scan_operation_backup() routine
@ 2013-09-26 18:25   ` Larry Finger
  0 siblings, 0 replies; 9+ messages in thread
From: Larry Finger @ 2013-09-26 18:25 UTC (permalink / raw)
  To: linville-2XuSBdqkA4R54TAoqtyWWQ
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA, Larry Finger,
	netdev-u79uwXL29TY76Z2rM5mHXA

Now that rtl_phy_scan_operation_backup() exists, convert rtl8192ce to use it.

Signed-off-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
---
 drivers/net/wireless/rtlwifi/rtl8192ce/phy.h | 1 -
 drivers/net/wireless/rtlwifi/rtl8192ce/sw.c  | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h
index bb319b0..ff32b5b 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h
@@ -202,7 +202,6 @@ void rtl92c_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw);
 void rtl92c_phy_get_txpower_level(struct ieee80211_hw *hw, long *powerlevel);
 void rtl92c_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel);
 bool rtl92c_phy_update_txpower_dbm(struct ieee80211_hw *hw, long power_indbm);
-void rtl92c_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation);
 void rtl92c_phy_set_bw_mode(struct ieee80211_hw *hw,
 			    enum nl80211_channel_type ch_type);
 void rtl92c_phy_sw_chnl_callback(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
index 1420356..b790320 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
@@ -30,6 +30,7 @@
 #include "../wifi.h"
 #include "../core.h"
 #include "../pci.h"
+#include "../base.h"
 #include "reg.h"
 #include "def.h"
 #include "phy.h"
@@ -219,7 +220,7 @@ static struct rtl_hal_ops rtl8192ce_hal_ops = {
 	.set_bw_mode = rtl92c_phy_set_bw_mode,
 	.switch_channel = rtl92c_phy_sw_chnl,
 	.dm_watchdog = rtl92c_dm_watchdog,
-	.scan_operation_backup = rtl92c_phy_scan_operation_backup,
+	.scan_operation_backup = rtl_phy_scan_operation_backup,
 	.set_rf_power_state = rtl92c_phy_set_rf_power_state,
 	.led_control = rtl92ce_led_control,
 	.set_desc = rtl92ce_set_desc,
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/7] rtlwifi: rtl8192c: Remove rtl8192c_phy_scan_operation_backup()
  2013-09-26 18:25 [PATCH 0/7] Convert drivers to a common rtl_phy_scan_operation_backup() routine Larry Finger
                   ` (2 preceding siblings ...)
  2013-09-26 18:25   ` Larry Finger
@ 2013-09-26 18:25 ` Larry Finger
  2013-09-26 18:25 ` [PATCH 5/7] rtlwifi: rtl8192ce: Convert driver to use new rtl_phy_scan_operation_backup() routine Larry Finger
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Larry Finger @ 2013-09-26 18:25 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Larry Finger, netdev

Drivers rtl8192ce and rtl8192cu no longer rely on this routine. It is removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
 drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c | 30 ----------------------
 drivers/net/wireless/rtlwifi/rtl8192c/phy_common.h |  2 --
 2 files changed, 32 deletions(-)

diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c
index 246e535..0c0e782 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c
@@ -592,36 +592,6 @@ long _rtl92c_phy_txpwr_idx_to_dbm(struct ieee80211_hw *hw,
 }
 EXPORT_SYMBOL(_rtl92c_phy_txpwr_idx_to_dbm);
 
-void rtl92c_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation)
-{
-	struct rtl_priv *rtlpriv = rtl_priv(hw);
-	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
-	enum io_type iotype;
-
-	if (!is_hal_stop(rtlhal)) {
-		switch (operation) {
-		case SCAN_OPT_BACKUP:
-			iotype = IO_CMD_PAUSE_DM_BY_SCAN;
-			rtlpriv->cfg->ops->set_hw_reg(hw,
-						      HW_VAR_IO_CMD,
-						      (u8 *)&iotype);
-
-			break;
-		case SCAN_OPT_RESTORE:
-			iotype = IO_CMD_RESUME_DM_BY_SCAN;
-			rtlpriv->cfg->ops->set_hw_reg(hw,
-						      HW_VAR_IO_CMD,
-						      (u8 *)&iotype);
-			break;
-		default:
-			RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-				 "Unknown Scan Backup operation\n");
-			break;
-		}
-	}
-}
-EXPORT_SYMBOL(rtl92c_phy_scan_operation_backup);
-
 void rtl92c_phy_set_bw_mode(struct ieee80211_hw *hw,
 			    enum nl80211_channel_type ch_type)
 {
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.h b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.h
index 24957e2..e79dabe 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.h
@@ -203,8 +203,6 @@ void rtl92c_phy_get_txpower_level(struct ieee80211_hw *hw,
 void rtl92c_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel);
 bool rtl92c_phy_update_txpower_dbm(struct ieee80211_hw *hw,
 					  long power_indbm);
-void rtl92c_phy_scan_operation_backup(struct ieee80211_hw *hw,
-					     u8 operation);
 void rtl92c_phy_set_bw_mode(struct ieee80211_hw *hw,
 				   enum nl80211_channel_type ch_type);
 void rtl92c_phy_sw_chnl_callback(struct ieee80211_hw *hw);
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 5/7] rtlwifi: rtl8192ce: Convert driver to use new rtl_phy_scan_operation_backup() routine
  2013-09-26 18:25 [PATCH 0/7] Convert drivers to a common rtl_phy_scan_operation_backup() routine Larry Finger
                   ` (3 preceding siblings ...)
  2013-09-26 18:25 ` [PATCH 4/7] rtlwifi: rtl8192c: Remove rtl8192c_phy_scan_operation_backup() Larry Finger
@ 2013-09-26 18:25 ` Larry Finger
  2013-09-26 18:25 ` [PATCH 6/7] rtlwifi: rtl8723ae: " Larry Finger
  2013-09-26 18:25 ` [PATCH 7/7] rtlwifi: rtl8188ee: " Larry Finger
  6 siblings, 0 replies; 9+ messages in thread
From: Larry Finger @ 2013-09-26 18:25 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Larry Finger, netdev

Now that rtl_phy_scan_operation_backup() exists, convert rtl8192de to use it.
Routine rtl92d_phy_scan_operation_backup() is no longer used and is removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
 drivers/net/wireless/rtlwifi/rtl8192de/phy.c | 28 ----------------------------
 drivers/net/wireless/rtlwifi/rtl8192de/phy.h |  1 -
 drivers/net/wireless/rtlwifi/rtl8192de/sw.c  |  3 ++-
 3 files changed, 2 insertions(+), 30 deletions(-)

diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c
index 840bac5..13196cc 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c
@@ -1022,34 +1022,6 @@ void rtl92d_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel)
 	rtl92d_phy_rf6052_set_ofdm_txpower(hw, &ofdmpowerlevel[0], channel);
 }
 
-void rtl92d_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation)
-{
-	struct rtl_priv *rtlpriv = rtl_priv(hw);
-	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
-	enum io_type iotype;
-
-	if (!is_hal_stop(rtlhal)) {
-		switch (operation) {
-		case SCAN_OPT_BACKUP:
-			rtlhal->current_bandtypebackup =
-						 rtlhal->current_bandtype;
-			iotype = IO_CMD_PAUSE_DM_BY_SCAN;
-			rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_IO_CMD,
-						      (u8 *)&iotype);
-			break;
-		case SCAN_OPT_RESTORE:
-			iotype = IO_CMD_RESUME_DM_BY_SCAN;
-			rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_IO_CMD,
-						      (u8 *)&iotype);
-			break;
-		default:
-			RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-				 "Unknown Scan Backup operation\n");
-			break;
-		}
-	}
-}
-
 void rtl92d_phy_set_bw_mode(struct ieee80211_hw *hw,
 			    enum nl80211_channel_type ch_type)
 {
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/phy.h b/drivers/net/wireless/rtlwifi/rtl8192de/phy.h
index 8f07606..33df0d1c 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/phy.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/phy.h
@@ -139,7 +139,6 @@ bool rtl92c_phy_config_rf_with_feaderfile(struct ieee80211_hw *hw,
 					  enum radio_path rfpath);
 void rtl92d_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw);
 void rtl92d_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel);
-void rtl92d_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation);
 void rtl92d_phy_set_bw_mode(struct ieee80211_hw *hw,
 			    enum nl80211_channel_type ch_type);
 u8 rtl92d_phy_sw_chnl(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/sw.c b/drivers/net/wireless/rtlwifi/rtl8192de/sw.c
index c18c04b..edab5a5 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/sw.c
@@ -30,6 +30,7 @@
 #include "../wifi.h"
 #include "../core.h"
 #include "../pci.h"
+#include "../base.h"
 #include "reg.h"
 #include "def.h"
 #include "phy.h"
@@ -236,7 +237,7 @@ static struct rtl_hal_ops rtl8192de_hal_ops = {
 	.set_bw_mode = rtl92d_phy_set_bw_mode,
 	.switch_channel = rtl92d_phy_sw_chnl,
 	.dm_watchdog = rtl92d_dm_watchdog,
-	.scan_operation_backup = rtl92d_phy_scan_operation_backup,
+	.scan_operation_backup = rtl_phy_scan_operation_backup,
 	.set_rf_power_state = rtl92d_phy_set_rf_power_state,
 	.led_control = rtl92de_led_control,
 	.set_desc = rtl92de_set_desc,
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 6/7] rtlwifi: rtl8723ae: Convert driver to use new rtl_phy_scan_operation_backup() routine
  2013-09-26 18:25 [PATCH 0/7] Convert drivers to a common rtl_phy_scan_operation_backup() routine Larry Finger
                   ` (4 preceding siblings ...)
  2013-09-26 18:25 ` [PATCH 5/7] rtlwifi: rtl8192ce: Convert driver to use new rtl_phy_scan_operation_backup() routine Larry Finger
@ 2013-09-26 18:25 ` Larry Finger
  2013-09-26 18:25 ` [PATCH 7/7] rtlwifi: rtl8188ee: " Larry Finger
  6 siblings, 0 replies; 9+ messages in thread
From: Larry Finger @ 2013-09-26 18:25 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Larry Finger, netdev

Now that rtl_phy_scan_operation_backup() exists, convert rtl8723ae to use it.
Routine rtl8723ae_phy_scan_operation_backup() is no longer used and is removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
 drivers/net/wireless/rtlwifi/rtl8723ae/phy.c | 29 ----------------------------
 drivers/net/wireless/rtlwifi/rtl8723ae/phy.h |  1 -
 drivers/net/wireless/rtlwifi/rtl8723ae/sw.c  |  3 ++-
 3 files changed, 2 insertions(+), 31 deletions(-)

diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/phy.c b/drivers/net/wireless/rtlwifi/rtl8723ae/phy.c
index eafbb18..5d318a8 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/phy.c
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/phy.c
@@ -934,35 +934,6 @@ static long _phy_txpwr_idx_to_dbm(struct ieee80211_hw *hw,
 	return pwrout_dbm;
 }
 
-void rtl8723ae_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation)
-{
-	struct rtl_priv *rtlpriv = rtl_priv(hw);
-	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
-	enum io_type iotype;
-
-	if (!is_hal_stop(rtlhal)) {
-		switch (operation) {
-		case SCAN_OPT_BACKUP:
-			iotype = IO_CMD_PAUSE_DM_BY_SCAN;
-			rtlpriv->cfg->ops->set_hw_reg(hw,
-						      HW_VAR_IO_CMD,
-						      (u8 *)&iotype);
-
-			break;
-		case SCAN_OPT_RESTORE:
-			iotype = IO_CMD_RESUME_DM_BY_SCAN;
-			rtlpriv->cfg->ops->set_hw_reg(hw,
-						      HW_VAR_IO_CMD,
-						      (u8 *)&iotype);
-			break;
-		default:
-			RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-				 "Unknown Scan Backup operation.\n");
-			break;
-		}
-	}
-}
-
 void rtl8723ae_phy_set_bw_mode_callback(struct ieee80211_hw *hw)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/phy.h b/drivers/net/wireless/rtlwifi/rtl8723ae/phy.h
index bbb950d..c3adc72 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/phy.h
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/phy.h
@@ -203,7 +203,6 @@ void rtl8723ae_phy_get_txpower_level(struct ieee80211_hw *hw, long *powerlevel);
 void rtl8723ae_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel);
 bool rtl8723ae_phy_update_txpower_dbm(struct ieee80211_hw *hw,
 				      long power_indbm);
-void rtl8723ae_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation);
 void rtl8723ae_phy_set_bw_mode_callback(struct ieee80211_hw *hw);
 void rtl8723ae_phy_set_bw_mode(struct ieee80211_hw *hw,
 			       enum nl80211_channel_type ch_type);
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c b/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
index d9ee2ef..62b204f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
@@ -33,6 +33,7 @@
 
 #include "../core.h"
 #include "../pci.h"
+#include "../base.h"
 #include "reg.h"
 #include "def.h"
 #include "phy.h"
@@ -220,7 +221,7 @@ static struct rtl_hal_ops rtl8723ae_hal_ops = {
 	.set_bw_mode = rtl8723ae_phy_set_bw_mode,
 	.switch_channel = rtl8723ae_phy_sw_chnl,
 	.dm_watchdog = rtl8723ae_dm_watchdog,
-	.scan_operation_backup = rtl8723ae_phy_scan_operation_backup,
+	.scan_operation_backup = rtl_phy_scan_operation_backup,
 	.set_rf_power_state = rtl8723ae_phy_set_rf_power_state,
 	.led_control = rtl8723ae_led_control,
 	.set_desc = rtl8723ae_set_desc,
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 7/7] rtlwifi: rtl8188ee: Convert driver to use new rtl_phy_scan_operation_backup() routine
  2013-09-26 18:25 [PATCH 0/7] Convert drivers to a common rtl_phy_scan_operation_backup() routine Larry Finger
                   ` (5 preceding siblings ...)
  2013-09-26 18:25 ` [PATCH 6/7] rtlwifi: rtl8723ae: " Larry Finger
@ 2013-09-26 18:25 ` Larry Finger
  6 siblings, 0 replies; 9+ messages in thread
From: Larry Finger @ 2013-09-26 18:25 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Larry Finger, netdev

Now that rtl_phy_scan_operation_backup() exists, convert rtl8188ee to use it.
Routine rtl88e_phy_scan_operation_backup() is no longer used and is removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
 drivers/net/wireless/rtlwifi/rtl8188ee/phy.c | 28 ----------------------------
 drivers/net/wireless/rtlwifi/rtl8188ee/phy.h |  1 -
 drivers/net/wireless/rtlwifi/rtl8188ee/sw.c  |  3 ++-
 3 files changed, 2 insertions(+), 30 deletions(-)

diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/phy.c b/drivers/net/wireless/rtlwifi/rtl8188ee/phy.c
index e655c04..d67f9c7 100644
--- a/drivers/net/wireless/rtlwifi/rtl8188ee/phy.c
+++ b/drivers/net/wireless/rtlwifi/rtl8188ee/phy.c
@@ -1136,34 +1136,6 @@ void rtl88e_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel)
 					   &bw40_pwr[0], channel);
 }
 
-void rtl88e_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation)
-{
-	struct rtl_priv *rtlpriv = rtl_priv(hw);
-	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
-	enum io_type iotype;
-
-	if (!is_hal_stop(rtlhal)) {
-		switch (operation) {
-		case SCAN_OPT_BACKUP:
-			iotype = IO_CMD_PAUSE_DM_BY_SCAN;
-			rtlpriv->cfg->ops->set_hw_reg(hw,
-						      HW_VAR_IO_CMD,
-						      (u8 *)&iotype);
-			break;
-		case SCAN_OPT_RESTORE:
-			iotype = IO_CMD_RESUME_DM_BY_SCAN;
-			rtlpriv->cfg->ops->set_hw_reg(hw,
-						      HW_VAR_IO_CMD,
-						      (u8 *)&iotype);
-			break;
-		default:
-			RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-				 "Unknown Scan Backup operation.\n");
-			break;
-		}
-	}
-}
-
 void rtl88e_phy_set_bw_mode_callback(struct ieee80211_hw *hw)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/phy.h b/drivers/net/wireless/rtlwifi/rtl8188ee/phy.h
index 71ddf4f..8e1f1be 100644
--- a/drivers/net/wireless/rtlwifi/rtl8188ee/phy.h
+++ b/drivers/net/wireless/rtlwifi/rtl8188ee/phy.h
@@ -213,7 +213,6 @@ bool rtl88e_phy_rf_config(struct ieee80211_hw *hw);
 void rtl88e_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw);
 void rtl88e_phy_get_txpower_level(struct ieee80211_hw *hw, long *powerlevel);
 void rtl88e_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel);
-void rtl88e_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation);
 void rtl88e_phy_set_bw_mode_callback(struct ieee80211_hw *hw);
 void rtl88e_phy_set_bw_mode(struct ieee80211_hw *hw,
 			    enum nl80211_channel_type ch_type);
diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/sw.c b/drivers/net/wireless/rtlwifi/rtl8188ee/sw.c
index c254693..347af1e 100644
--- a/drivers/net/wireless/rtlwifi/rtl8188ee/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8188ee/sw.c
@@ -30,6 +30,7 @@
 #include "../wifi.h"
 #include "../core.h"
 #include "../pci.h"
+#include "../base.h"
 #include "reg.h"
 #include "def.h"
 #include "phy.h"
@@ -244,7 +245,7 @@ static struct rtl_hal_ops rtl8188ee_hal_ops = {
 	.set_bw_mode = rtl88e_phy_set_bw_mode,
 	.switch_channel = rtl88e_phy_sw_chnl,
 	.dm_watchdog = rtl88e_dm_watchdog,
-	.scan_operation_backup = rtl88e_phy_scan_operation_backup,
+	.scan_operation_backup = rtl_phy_scan_operation_backup,
 	.set_rf_power_state = rtl88e_phy_set_rf_power_state,
 	.led_control = rtl88ee_led_control,
 	.set_desc = rtl88ee_set_desc,
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-09-26 18:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-26 18:25 [PATCH 0/7] Convert drivers to a common rtl_phy_scan_operation_backup() routine Larry Finger
2013-09-26 18:25 ` [PATCH 1/7] rtlwifi: Implement " Larry Finger
2013-09-26 18:25 ` [PATCH 2/7] rtlwifi: rtl8192cu: Convert to use new " Larry Finger
2013-09-26 18:25 ` [PATCH 3/7] rtlwifi: rtl8192ce: Convert driver " Larry Finger
2013-09-26 18:25   ` Larry Finger
2013-09-26 18:25 ` [PATCH 4/7] rtlwifi: rtl8192c: Remove rtl8192c_phy_scan_operation_backup() Larry Finger
2013-09-26 18:25 ` [PATCH 5/7] rtlwifi: rtl8192ce: Convert driver to use new rtl_phy_scan_operation_backup() routine Larry Finger
2013-09-26 18:25 ` [PATCH 6/7] rtlwifi: rtl8723ae: " Larry Finger
2013-09-26 18:25 ` [PATCH 7/7] rtlwifi: rtl8188ee: " Larry Finger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.